var Browser = {
	w3c : document.getElementById,
	iex : document.all,
	scrollLoop : false,    // boolean
	scrollInterval : null, // setInterval id
	currentBlock : null,   // object reference
	getWindowHeight : function(){
		if(this.iex) return (document.documentElement.clientHeight) ? document.documentElement.clientHeight : document.body.clientHeight;
		else return window.innerHeight;
	},
	getScrollLeft : function(){
		if(this.iex) return (document.documentElement.scrollLeft) ? document.documentElement.scrollLeft : document.body.scrollLeft;
		else return window.pageXOffset;
	},
	getScrollTop : function(){
		if(this.iex) return (document.documentElement.scrollTop) ? document.documentElement.scrollTop : document.body.scrollTop;
		else return window.pageYOffset;
	},
	getElementYpos : function(el){
		var y = 0;
		while(el.offsetParent){
			y += el.offsetTop
			el = el.offsetParent;
		}
		return y;
	},
	scroll : function(num){
		if(!this.w3c){
			location.href = "#"+this.anchorName+num;
			return;
		}
		if(this.scrollLoop){
			clearInterval(this.scrollInterval);
			this.scrollLoop = false;
			this.scrollInterval = null;
		}
		if(this.currentBlock != null) this.currentBlock.className = this.offClassName;
		this.currentBlock = document.getElementById(this.blockName+num);
		this.currentBlock.className = this.onClassName;
		var doc = document.getElementById(this.containerName);
		var documentHeight = this.getElementYpos(doc) + doc.offsetHeight;
		var windowHeight = this.getWindowHeight();
		var ypos = this.getElementYpos(this.currentBlock);
		if(ypos > documentHeight - windowHeight) ypos = documentHeight - windowHeight;
		this.scrollTo(0,ypos);
	},
	scrollTo : function(x,y){
		if(this.scrollLoop){
			var left = this.getScrollLeft();
			var top = this.getScrollTop();
			if(Math.abs(left-x) <= 1 && Math.abs(top-y) <= 1){
				window.scrollTo(x,y);
				clearInterval(this.scrollInterval);
				this.scrollLoop = false;
				this.scrollInterval = null;
			}else{
				window.scrollTo(left+(x-left)/2, top+(y-top)/2);
			}
		}else{
			this.scrollInterval = setInterval("Browser.scrollTo("+x+","+y+")",100);
			this.scrollLoop = true;
		}
	}
};

// ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
/*
using the following line, IE/PC returns an incorrect number when getting the document height.
var document_height = document.all ? document.body.offsetHeight : window.document.height;
To fix this problem, a container div is wrapped around the content so the correct height 
can be determined.
*/

// Edit these variables

Browser.containerName = "container"; // The id name of the div containing the content
Browser.anchorName    = "anchor";    // The alpha portion of the anchor names
Browser.blockName     = "d";     // The alpha portion of the content blocks
Browser.onClassName   = "active";    // The CSS class name for the 'on' state
Browser.offClassName  = "visited";   // The CSS class name for the 'off' state

// ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
function Is () 
{   // convert all characters to lowercase to simplify testing 
    var agt=navigator.userAgent.toLowerCase(); 

    // *** BROWSER VERSION *** 
    // Note: On IE5, these return 4, so use is.ie5up to detect IE5. 
    this.major = parseInt(navigator.appVersion); 
    this.minor = parseFloat(navigator.appVersion); 

    this.nav = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) && (agt.indexOf('webtv')==-1)); 
    this.nav2 = (this.nav && (this.major == 2)); 
    this.nav3 = (this.nav && (this.major == 3)); 
    this.nav4 = (this.nav && (this.major == 4)); 
    this.nav4up = (this.nav && (this.major >= 4)); 
    this.navonly = (this.nav && ((agt.indexOf(";nav") != -1) || (agt.indexOf("; nav") != -1)) ); 
    this.nav5 = (this.nav && (this.major == 5)); 
    this.nav5up = (this.nav && (this.major >= 5));

    this.ie = (agt.indexOf("msie") != -1); 
    this.ie3 = (this.ie && (this.major < 4)); 
    this.ie4 = (this.ie && (this.major == 4) && (agt.indexOf("msie 5.0")==-1) ); 
    this.ie4up = (this.ie  && (this.major >= 4)); 
    this.ie5 = (this.ie && (this.major == 4) && (agt.indexOf("msie 5.0")!=-1) ); 
    this.ie5up = (this.ie  && !this.ie3 && !this.ie4);
	
	this.opera = (agt.indexOf("opera") != -1); 

    // *** PLATFORM *** 
    this.win = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) ); 
    this.mac = (agt.indexOf("mac")!=-1); 
    this.linux = (agt.indexOf("inux")!=-1); 
} 

var is = new Is();
function unblur() {
this.blur();
}

	function blurLinks() {
		if (!document.getElementById) return;
		theLinks = document.getElementsByTagName("a");
		for(i=0; i<theLinks.length; i++) {
			theLinks[i].onfocus = unblur;
		}
		theMaps = document.getElementsByTagName("area");
		for(i=0; i<theMaps.length; i++) {
			theMaps[i].onfocus = unblur;
		}
	}
	
	function simplePreload()
{ 
  var args = simplePreload.arguments;
  document.imageArray = new Array(args.length);
  for(var i=0; i<args.length; i++)
  {
    document.imageArray[i] = new Image;
    document.imageArray[i].src = args[i];
  }
}

function SwitchImage_Inline(imgName, imgSrc) 
{
  if (document.images)
  {
    if (imgSrc != "none")
    {
      document.images[imgName].src = imgSrc;
    }
  }
}

function ChangeBGcolor(BGcolor,CellName)
{
if (document.all)
{
 var thestyle= eval ('document.all.'+CellName+'.style');
 thestyle.backgroundColor=BGcolor;
 }
}


// CODE USED TO POP NEW WINDOWS
// -----------------------------------------------------------------------------
	window.onerror=null
	var TimerID = null;
	var timer = 0;
	var screenHeight=window.screen.height;
	var screenWidth=window.screen.width;
// -----------------------------------------------------------------------------
function popWindowCenter(URLString,windowWidth,windowHeight,scrollbarValue) {
	var Xcoordinate = (screenWidth-windowWidth)/2;
	var Ycoordinate = (screenHeight-windowHeight)/4;
	poppedWindowCenter = window.open(URLString+'.html','loading','width='+windowWidth+',height='+windowHeight+',scrollbars='+scrollbarValue+',toolbar=no,menubar=no,status=yes,directories=no,location=no,resizable=yes');
	poppedWindowCenter.moveTo(Xcoordinate,Ycoordinate);
	poppedWindowCenter.focus();
}

// -------------------------------------------------------------------------
// HERE BEGINS THE CSS INFORMATION FOR MAC USERS WITH NETSCAPE
// -------------------------------------------------------------------------
if ((is.nav4) && (is.mac))
	{ SITE_CSS = '<STYLE type="text/css">' +
	'</STYLE>';
		}
// -------------------------------------------------------------------------
// HERE BEGINS THE CSS INFORMATION FOR WINDOWS USERS WITH IE 4+
// AND NETSCAPE 6 & OPERA ON ALL PLATFORMS.
// -------------------------------------------------------------------------
else if (((is.ie4up) && (is.win)) || (is.nav5up) || (is.opera))
	{ SITE_CSS = '<STYLE type="text/css">' +
'.textfield { font: 11px/11px Verdana, Geneva, Arial, sans-serif; color: #000000; background-color: #eeeeee; border: 1px solid #999999; width: 100%; height: 20px; margin: 0px; padding: 0px; cursor: text; }'+
'textarea { font: 11px/13px Verdana, Geneva, Arial, sans-serif; color: #000000; background-color: #eeeeee; border: 1px solid #999999; width: 100%; height: 100px; padding: 2px; margin: 0px; cursor: text; }'+
'select { font: 11px/11px Verdana, Geneva, Arial, sans-serif; color: #000000; background-color: #eeeeee; border: 1px solid #999999; width: 100%; height: 20px; margin: 0px; padding: 0px; cursor: hand; }'+
'</STYLE>';
		}
// -------------------------------------------------------------------------
// HERE BEGINS THE CSS INFORMATION FOR MAC USERS WITH IE
// -------------------------------------------------------------------------
if ((is.ie4up) && (is.mac))
	{ SITE_CSS = '<STYLE type="text/css">' +
'.textfield { font: 11px/11px Verdana, Geneva, Arial, sans-serif; color: #000000; background-color: #eeeeee; border: 1px solid #999999; width: 100%; height: 20px; margin: 0px; padding: 0px; cursor: text; }'+
'textarea { font: 11px/13px Verdana, Geneva, Arial, sans-serif; color: #000000; background-color: #eeeeee; border: 1px solid #999999; width: 100%; height: 100px; padding: 2px; margin: 0px; cursor: text; }'+
'select { font: 11px/11px Verdana, Geneva, Arial, sans-serif; color: #000000; background-color: #eeeeee; border: 1px solid #999999; width: 100%; height: 20px; margin: 0px; padding: 0px; cursor: hand; }'+
'</STYLE>';
		}
// -------------------------------------------------------------------------
// HERE BEGINS THE CSS INFORMATION FOR ALL OTHER VISITORS
// -------------------------------------------------------------------------
else { SITE_CSS = '<STYLE type="text/css">' +
'.textfield { font: 11px/11px Verdana, Geneva, Arial, sans-serif; color: #000000; background-color: #eeeeee; border: 1px solid #999999; width: 100%; height: 20px; margin: 0px; padding: 0px; cursor: text; }'+
'textarea { font: 11px/13px Verdana, Geneva, Arial, sans-serif; color: #000000; background-color: #eeeeee; border: 1px solid #999999; width: 100%; height: 100px; padding: 2px; margin: 0px; cursor: text; }'+
'select { font: 11px/11px Verdana, Geneva, Arial, sans-serif; color: #000000; background-color: #eeeeee; border: 1px solid #999999; width: 100%; height: 20px; margin: 0px; padding: 0px; cursor: hand; }'+
'</STYLE>';
		}
// -------------------------------------------------------------------------
	document.write(SITE_CSS)