// JavaScript Document

ns4=(document.layers)?true:false
ns6=(navigator.userAgent.indexOf("Gecko")!=-1)?true:false
mac=(navigator.appVersion.indexOf("Mac")!=-1)?true:false
mac45=(navigator.appVersion.indexOf("MSIE 4.5")!=-1)?true:false
if(ns6||ns4)mac=false

//loadWait=0;

opera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false
ns61=(parseInt(navigator.productSub)>=20010726)?true:false
ie4=(!document.getElementById&&document.all)?true:false;
ie55=((navigator.appVersion.indexOf("MSIE 6.0")!=-1||navigator.appVersion.indexOf("MSIE 5.5")!=-1))?true:false;
konq=(navigator.userAgent.indexOf("Konqueror")!=-1)?true:false




function WM_netscapeCssFix() {
  /*
    Source: Webmonkey Code Library
    (http://www.hotwired.com/webmonkey/javascript/code_library/)

    Author: Taylor
    Author Email: taylor@wired.com
    Author URL: http://www.taylor.org/
    */

  // This part was inspired by Matthew_Baird@wayfarer.com
  // It gets around another unfortunate bug whereby Netscape 
  // fires a resize event when the scrollbars pop up. This 
  // checks to make sure that the window's available size 
  // has actually changed.
  if (document.WM.WM_netscapeCssFix.initWindowWidth != window.innerWidth || document.WM.WM_netscapeCssFix.initWindowHeight != window.innerHeight) {
    document.location = document.location;
  }
}

function WM_netscapeCssFixCheckIn() {
  // This function checks to make sure the version of Netscape 
  // in use contains the bug; if so, it records the window's 
  // width and height and sets all resize events to be handled 
  // by the WM_netscapeCssFix() function.
  if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) == 4)) {
    if (typeof document.WM == 'undefined'){
      document.WM = new Object;
    }
    if (typeof document.WM.WM_scaleFont == 'undefined') {
      document.WM.WM_netscapeCssFix = new Object;
      document.WM.WM_netscapeCssFix.initWindowWidth = window.innerWidth;
      document.WM.WM_netscapeCssFix.initWindowHeight = window.innerHeight;
    }
    window.onresize = WM_netscapeCssFix;
  }
}

WM_netscapeCssFixCheckIn()

function verifyCompatibleBrowser(){ 
    this.ver=navigator.appVersion 
    this.dom=document.getElementById?1:0 
    this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; 
    this.ie4=(document.all && !this.dom)?1:0; 
    this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
    this.ns4=(document.layers && !this.dom)?1:0; 
    this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5) 
    return this 
} 

bw=new verifyCompatibleBrowser() 

<!-- IE -->
if (document.all) {
  var str = "<STYLE TYPE='text/css'>";
  str += "#divContent {LEFT: 0px; WIDTH: 370px; POSITION: absolute; TOP: 0px;}";
  str += "</STYLE>";
  document.write(str);
}
<!-- NS4 -->
else if (document.layers) {
  var str = "<STYLE TYPE='text/css'>";
  str += "#divContent {LEFT: 0px; WIDTH: 370px; POSITION: absolute; TOP: 0px;}";
  str += "</STYLE>";
  document.write(str);
}
<!-- NS6 -->
else if (document.getElementById) {
  var str = "<STYLE TYPE='text/css'>";
  str += "#divContent {LEFT: 0px; WIDTH: 370px; POSITION: relative; TOP: 0px;}";
  str += "</STYLE>";
  document.write(str);
} else {
  var str = "<STYLE TYPE='text/css'>";
  str += "#divContent {LEFT: 0px; WIDTH: 370px; POSITION: absolute; TOP: 0px;}";
  str += "</STYLE>";
  document.write(str);	
}

var speed=50 
var loop, timer 
 
function ConstructObject(obj,nest){ 
    nest=(!nest) ? '':'document.'+nest+'.' 
    this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0; 
    this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0; 
    this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight 
    this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight 
    this.up=MoveAreaUp;this.down=MoveAreaDown; 
    this.MoveArea=MoveArea; this.x; this.y; 
    this.obj = obj + "Object" 
    eval(this.obj + "=this") 
    return this 
} 
function MoveArea(x,y){ 
    /*
	alert(x);
	alert(y);
	*/
	this.x=x;this.y=y 
    this.css.left=this.x 
    this.css.top=this.y 
	
	document.getElementById('divContent').style.left = this.x+"px";
	document.getElementById('divContent').style.top = this.y+"px";
	
} 
function MoveAreaDown(move){ 
	if(this.y>-this.scrollHeight+objContainer.clipHeight){ 
    this.MoveArea(0,this.y-move) 
    if(loop) setTimeout(this.obj+".down("+move+")",speed) 
        } 
} 
function MoveAreaUp(move){ 
        if(this.y<0){ 
    this.MoveArea(0,this.y-move) 
    if(loop) setTimeout(this.obj+".up("+move+")",speed) 
        } 
} 
function PerformScroll(speed){ 
        if(initialised){ 
                loop=true; 
				//alert(objScroller);
				
                if(speed>0) objScroller.down(speed) 
                else objScroller.up(speed) 
        } 
} 

<!-- function that shifts the object to top -->
function shifttotop(){
    objScroller.MoveArea(0,0) 
}

<!-- function that shifts the object to a specific location -->
function shifttolink(ie,ns4,ns6){
	if (document.all) {
    objScroller.MoveArea(0,ie);
    } else if (document.layers) {
    objScroller.MoveArea(0,ns4);
    } else if (document.getElementById) {
    objScroller.MoveArea(0,ns6);}
}

function CeaseScroll(){ 
    loop=false 
    if(timer) clearTimeout(timer) 
} 

var initialised=false; 
function InitialiseScrollableArea(){ 
    objContainer=new ConstructObject('divContainer') 
    objScroller=new ConstructObject('divContent','divContainer') 
    objScroller.MoveArea(0,0) 
    objContainer.css.visibility='visible' 
    initialised=true;
} 

function displayStatusMsg(msgStr) { 
  status=msgStr;
  document.returnValue = true;
}

function findObj(n, d) { 
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document); return x;
}

function validate() {
    if (initialised == false) {
        window.location.href = window.location.href;
        return false;
    }
    else
        return true;
}