 // browser sniffer
 	var agt            = navigator.userAgent.toLowerCase();
    var is_major       = parseInt(navigator.appVersion);
    var is_minor       = parseFloat(navigator.appVersion);
    var is_nav         = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
    var is_nav2        = (is_nav && (is_major == 2));
    var is_nav3        = (is_nav && (is_major == 3));
    var is_nav4        = (is_nav && (is_major == 4));
    var is_nav4up      = (is_nav && (is_major >= 4));
    var is_navonly     = (is_nav && ((agt.indexOf(";nav") != -1) || (agt.indexOf("; nav") != -1)) );
    var is_nav6        = (is_nav && (is_major == 5));
    var is_nav6up      = (is_nav && (is_major >= 5));
    var is_gecko       = (agt.indexOf('gecko') != -1);
    //var is_ie          = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
    var is_ie3         = (is_ie && (is_major < 4));
    var is_ie4         = (is_ie && (is_major == 4) && (agt.indexOf("msie 5")==-1) );
    var is_ie       = (is_ie && (is_major >= 4));
    var is_ie5         = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
    var is_ie5_5       = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
    var is_ie5up       = (is_ie && !is_ie3 && !is_ie4);
    
var is_ie = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;    // 

    var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
        var is_aol         = (agt.indexOf("aol") != -1);
    var is_aol3        = (is_aol && is_ie3);
    var is_aol4        = (is_aol && is_ie4);
    var is_aol5        = (agt.indexOf("aol 5") != -1);
    var is_aol6        = (agt.indexOf("aol 6") != -1);
    var is_opera       = (agt.indexOf("opera") != -1);
    var is_opera2      = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);
    var is_opera3      = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);
    var is_opera4      = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);
    var is_opera5      = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
    var is_opera5up    = (is_opera && !is_opera2 && !is_opera3 && !is_opera4);
    var is_webtv       = (agt.indexOf("webtv") != -1);
    var is_TVNavigator = ((agt.indexOf("navio") != -1) || (agt.indexOf("navio_aoltv") != -1));
    var is_AOLTV       = is_TVNavigator;
    var is_hotjava     = (agt.indexOf("hotjava") != -1);
    var is_hotjava3    = (is_hotjava && (is_major == 3));
    var is_hotjava3up  = (is_hotjava && (is_major >= 3));
    var is_omniweb       = (agt.indexOf("omniweb") != -1);

// *** PLATFORM ***
    var is_win   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
    // NOTE: On Opera 3.0, the userAgent string includes "Windows 95/NT4" on all
    //        Win32, so you can't distinguish between Win95 and WinNT.
    var is_win95 = ((agt.indexOf("win95")!=-1) || (agt.indexOf("windows 95")!=-1));

    // is this a 16 bit compiled version?
    var is_win16 = ((agt.indexOf("win16")!=-1) || 
               (agt.indexOf("16bit")!=-1) || (agt.indexOf("windows 3.1")!=-1) || 
               (agt.indexOf("windows 16-bit")!=-1) );  

    var is_win31 = ((agt.indexOf("windows 3.1")!=-1) || (agt.indexOf("win16")!=-1) ||
                    (agt.indexOf("windows 16-bit")!=-1));

    // NOTE: Reliable detection of Win98 may not be possible. It appears that:
    //       - On Nav 4.x and before you'll get plain "Windows" in userAgent.
    //       - On Mercury client, the 32-bit version will return "Win98", but
    //         the 16-bit version running on Win98 will still return "Win95".
    var is_win98 = ((agt.indexOf("win98")!=-1) || (agt.indexOf("windows 98")!=-1));
    var is_winnt = ((agt.indexOf("winnt")!=-1) || (agt.indexOf("windows nt")!=-1));
    var is_win32 = (is_win95 || is_winnt || is_win98 || 
                    ((is_major >= 4) && (navigator.platform == "Win32")) ||
                    (agt.indexOf("win32")!=-1) || (agt.indexOf("32bit")!=-1));

    var is_os2   = ((agt.indexOf("os/2")!=-1) || 
                    (navigator.appVersion.indexOf("OS/2")!=-1) ||   
                    (agt.indexOf("ibm-webexplorer")!=-1));

    var is_mac    = (agt.indexOf("mac")!=-1);
    var is_mac68k = (is_mac && ((agt.indexOf("68k")!=-1) || 
                               (agt.indexOf("68000")!=-1)));
    var is_macppc = (is_mac && ((agt.indexOf("ppc")!=-1) || 
                                (agt.indexOf("powerpc")!=-1)));

    var is_irix  = (agt.indexOf("irix") !=-1);    // SGI
    var is_irix5 = (agt.indexOf("irix 5") !=-1);
    var is_irix6 = ((agt.indexOf("irix 6") !=-1) || (agt.indexOf("irix6") !=-1));








window.onerror = null;
var leftMargin = 25;
var slideTime = 1200;

function layerObject(id,left) {
	//if(is_ie) {
	//	this.obj = document.all[id].style;
	//	this.obj.left = left;
	//	return this.obj;
	//} 
	
	//else {
		this.obj = document.getElementById(id).style;
		this.obj.left = left;
		return this.obj;
	//}
	 
}

function layerSetup() {
	floatLyr = new layerObject('menuDiv', 25);
	window.setInterval("main()", 10)
}

function floatObject() {
	if(is_ie) {
		findWidth = document.body.clientWidth;
   	}
   	
   	else  {
		findWidth = window.innerWidth;
	} 
} 

function main() {
	if(is_ie) {
		this.currentX = menuDiv.style.pixelLeft;
		this.scrollLeft = document.body.scrollLeft;
		mainTrigger();
   	} else {
		this.currentX = parseInt(document.getElementById('menuDiv').style.left);
		this.scrollLeft = scrollX;
		mainTrigger();
	}     	
}

function mainTrigger() {
	var newTargetX = this.scrollLeft + this.leftMargin;
	if ( this.currentX != newTargetX ) {
		if ( newTargetX != this.targetX ) {
			this.targetX = newTargetX;
			floatStart();
		}
		animator();
   	}
}

function floatStart() {
	var now = new Date();
	this.A = this.targetX - this.currentX;
	this.B = Math.PI / ( 2 * this.slideTime );
	this.C = now.getTime();
	if (Math.abs(this.A) > this.findWidth) {
		this.D = this.A > 0 ? this.targetX - this.findWidth : this.targetX + this.findWidth;
		this.A = this.A > 0 ? this.findWidth : -this.findWidth;
	}
	else {
		this.D = this.currentX;
   	}
}

function animator() {

	var now = new Date();
	var newX = this.A * Math.sin( this.B * ( now.getTime() - this.C ) ) + this.D;
	newX = Math.round(newX);
	if (( this.A > 0 && newX > this.currentX ) || ( this.A < 0 && newX < this.currentX )) {
		if ( is_ie ) {
			document.all.menuDiv.style.pixelLeft = newX;
		}
		else {
			document.getElementById('menuDiv').style.left = newX + "px";
		}
   	}
}

function start() {
	
	if(is_ie) {
		pageWidth = document.body.clientWidth;
		pageHeight = document.body.clientHeight;
		layerSetup();
		floatObject();
   	}
   	
   	else  {
		pageWidth = innerWidth;
		pageHeight = innerHeight;
		layerSetup();
		floatObject();
	}
}



// Scroll Scripts
var scrollcount = 0
	

function scrolldown() {

	if (scrollcount == 10) {
		clearTimeout(my_down);
		scrollcount = 0;
	} else {
		my_down = setTimeout("scrolldown()", 1) ;
		self.scrollBy(0,40);
		scrollcount = scrollcount +1;
	}
}

function scrollup() {

	if (scrollcount == 10) {
		clearTimeout(my_up);
		scrollcount = 0;
	} else {
		my_up = setTimeout("scrollup()", 1) ;
		self.scrollBy(0,-40);
		scrollcount = eval(scrollcount +1);
	}
}

function scrollleft() {

	if (scrollcount == 20) {
		clearTimeout(my_left);
		scrollcount = 0;
	} else {
		my_left = setTimeout("scrollleft()", 1) ;
		self.scrollBy(-30,0);
		scrollcount = eval(scrollcount +1);
	}
}



function scrollright() {
	if (scrollcount == 20) {
		clearTimeout(my_right);
		scrollcount = 0;
	} else {
		my_right = setTimeout("scrollright()", 1) ;
		self.scrollBy(30,0);
		scrollcount = eval(scrollcount +1);

	}
}

function no_link(){}

function CSClickReturn () {
	var bAgent = window.navigator.userAgent; 
	var bAppName = window.navigator.appName;
	if ((bAppName.indexOf("Explorer") >= 0) && (bAgent.indexOf("Mozilla/3") >= 0) && (bAgent.indexOf("Mac") >= 0))
		return true; // dont follow link
	else return false; // dont follow link
}




CSStopExecution=false;
function CSAction(array) {return CSAction2(CSAct, array);}
function CSAction2(fct, array) { 
	var result;
	for (var i=0;i<array.length;i++) {
		if(CSStopExecution) return false; 
		var aa = fct[array[i]];
		if (aa == null) return false;
		var ta = new Array;
		for(var j=1;j<aa.length;j++) {
			if((aa[j]!=null)&&(typeof(aa[j])=="object")&&(aa[j].length==2)){
				if(aa[j][0]=="VAR"){ta[j]=CSStateArray[aa[j][1]];}
				else{if(aa[j][0]=="ACT"){ta[j]=CSAction(new Array(new String(aa[j][1])));}
				else ta[j]=aa[j];}
			} else ta[j]=aa[j];
		}			
		result=aa[0](ta);
	}
	return result;
}
CSAct = new Object;

function CSScrollUp(action){
	if(navigator.appVersion.charAt(0) >=4) {
		if (is_mac) {  
			scrollup(); 
		} else if (is_opera) { 
			self.scrollBy(0,-400); 
		} else {
			var container = 0	
			if (action[2] > 0)		{
				while (container < action[1]) {
   					window.scrollBy(0,-action[2]);
   					container = container + action[2];  
				} 	
      		}
      	}
	}
}

function CSScrollDown(action){
	if(navigator.appVersion.charAt(0) >=4) {
		if (is_mac) {  
			scrolldown(); 
		} else if (is_opera) { 
			self.scrollBy(0,400); 
		} else {
			var container = 0	
			if (action[2] > 0)		{
				while (container < action[1]) {
   					window.scrollBy(0,action[2]);
   					container = container + action[2];  
				} 	
    	  	}
    	}
	}
}

function CSScrollLeft(action){
	if(navigator.appVersion.charAt(0) >=4) {
		if (is_mac) {  
			scrollleft(); 
		} else if (is_opera) { 
			window.scrollBy(-300,0); 
		} else {
			var container = 0	
			if (action[2] > 0)		{
				while (container < action[1]) {
   					window.scrollBy(-action[2],0);
   					container = container + action[2];  
				} 	
    	  	}
    	}
	}
}

function CSScrollRight(action){
	if(navigator.appVersion.charAt(0) >=4) {
		if (is_mac) {  
			scrollright(); 
		} else if (is_opera) { 
			self.scrollBy(300,0); 
			
		} else {
			var container = 0	
			if (action[2] > 0)		{
				while (container < action[1]) {
   					window.scrollBy(action[2],0);
   					container = container + action[2];  
				} 	
    	  	}
    	}
	}
}

CSAct[/*CMP*/ 'scrollpageup'] = new Array(CSScrollUp,400,20);
CSAct[/*CMP*/ 'scrollpagedn'] = new Array(CSScrollDown,400,20);
CSAct[/*CMP*/ 'scrollpageleft'] = new Array(CSScrollLeft,300,20);
CSAct[/*CMP*/ 'scrollpageright'] = new Array(CSScrollRight,300,20);







function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  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=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_setTextOfLayer(objName,x,newText) { //v4.01
  if ((obj=MM_findObj(objName))!=null) with (obj)
    if (document.layers) {document.write(unescape(newText)); document.close();}
    else innerHTML = unescape(newText);
}

function MM_changeProp(objName,x,theProp,theValue) { //v3.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)) eval("obj."+theProp+"='"+theValue+"'");
}

function MM_changeColor(objName, theValue) {
	var obj = document.getElementById(objName);
	if(obj) obj.style.color = theValue;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}


function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


function doback(theURL,docWidth) {
	
	if (document.body.scrollLeft < 100) {
		
		location.href= theURL;

	} else {

		CSAction(new Array(/*CMP*/'scrollpageleft'));
		return CSClickReturn();
			
	}

}

function dofwd(theURL,docWidth) {
	if (document.body.scrollLeft > docWidth-winW) {
		
		location.href= theURL;
				

	} else {

		CSAction(new Array(/*CMP*/'scrollpageright'));
		return CSClickReturn();
		
	}
}

if (is_nav6up) { // corrects for "auto" cock-up in Nav6
	
		document.write('<style type="text/css">');
		document.write('body { overflow: visible;}');
		document.write('.submenu2 { height: 25px;line-height: 25px}');
		document.write('<\/style>');
		
}

if (is_omniweb) { // ???
	
		document.write('<style type="text/css">');
		document.write('.menuBox{float: none;width:100px;}');
		document.write('<\/style>');
}
