//// ESTABLISH BROWSER AND PLATFORM// ADAPTED FROM NETSCAPE WITH PERMISSION//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));var is_nav4   = (is_nav && (is_major == 4));var is_nav4up = (is_nav && (is_major >= 4));var is_nav5   = (is_nav && (is_major == 5));var is_nav5up = (is_nav && (is_major >= 5));var is_ie    = (agt.indexOf("msie") != -1);var is_ie4   = (is_ie && (is_major == 4) && (agt.indexOf("msie 5")==-1) );var is_ie4up = (is_ie && (is_major >= 4));var is_ie5   = (is_ie && (is_major == 4) && (agt.indexOf("msie 5")!=-1) );var is_ie5up = (is_ie && !is_ie4);var is_aol   = (agt.indexOf("aol") != -1);var is_aol4  = (is_aol && is_ie4);var is_opera = (agt.indexOf("opera") != -1);var is_webtv = (agt.indexOf("webtv") != -1);var is_win = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );var is_mac = (agt.indexOf("mac")!=-1);var nscp4 = is_nav4var ie4   = is_ie4var dom1  = (is_nav5up || is_ie5up)if (is_mac && is_ie5){	dom1 = false}function handleResize(){		if(res != browserWidth())	{	location.reload()	}		return false}function imgOn(layerName,imgName){	if (nscp4)	{			eval("document." + layerName + ".document[imgName].src = " + imgName + "on.src");	}	else if(dom1)	{			document.getElementById(imgName).src = eval(imgName + "on.src");	}	else 	{		document [imgName].src = eval(imgName + "on.src");	}}function imgOff(layerName,imgName){	if (nscp4)	{			eval("document." + layerName + ".document[imgName].src = " + imgName + "off.src");	}	else if(dom1)	{			document.getElementById(imgName).src = eval(imgName + "off.src");	}	else 	{		//alert("on ie");		document [imgName].src = eval(imgName + "off.src");	}}function getObj(obj){	if (dom1)	{	compLayr = document.getElementById(obj).style	}	else if (nscp4)	{	compLayr = document.layers[obj]	}	else	{	compLayr = document.all[obj].style	}	return compLayr}//// CUSTOM APIs//function setTop(layr,num){	obj = getObj(layr)	obj.top = num}function setLeft(layr,num){	obj = getObj(layr)	obj.left = num}function getTop(layr){	obj = getObj(layr)	if (dom1)	{	return (document.getElementById(layr).offsetTop)	}	else if (nscp4)	{	return (obj.top)	}	else	{	return (obj.posTop)	}}function getLeft(layr){	obj = getObj(layr)	if (dom1)	{	return (document.getElementById(layr).offsetLeft)	}	else if (nscp4)	{	return (obj.left)	}	else	{	return (obj.posLeft)	}}function incTop(layr,num){	obj = getObj(layr)	obj.top = getTop(layr) + num}function incLeft(layr,num){	obj = getObj(layr)	obj.left = getLeft(layr) + num}function setZindex(layr,num){	obj = getObj(layr)	obj.zIndex = num}function show(layr){	obj = getObj(layr)	obj.visibility = "visible"}function hide(layr){	obj = getObj(layr)	obj.visibility = "hidden"}function layerWidth(layr){	if (dom1)	{	return (document.getElementById(layr).offsetWidth)	}	else if (nscp4)	{	return eval("document." + layr + ".document.width")	}	else	{	return (document.all[layr].scrollWidth)	}}	function layerHeight(layr){	if (dom1)	{	return (document.getElementById(layr).offsetHeight)	}	else if (nscp4)	{	return eval("document." + layr + ".document.height")	}	else	{	return (document.all[layr].scrollHeight)	}}function layerClip(layr,topA,rightA,bottomA,leftA){	obj = getObj(layr)	if (dom1 || (ie4 && !is_mac))	{	obj.clip = "rect(" + topA + " " + rightA + " " + bottomA + " " + leftA + ")"	}	else if (nscp4)	{	obj.clip.top = topA		obj.clip.left = leftA		obj.clip.bottom = bottomA		obj.clip.right = rightA	}	else if (ie4 && is_mac)	{	obj.clip = "rect(0 100% 100% 0)"	}}function browserWidth(){	if (is_nav)	{	return (window.innerWidth)	}	else	{	return (document.body.clientWidth)	}}function browserHeight(){	if (is_nav)	{	return (window.innerHeight)	}	else	{	return (document.body.clientHeight)	}}function randQuote(){var image;var qt = Math.floor(Math.random() * 7) 	if( qt == 0)	{		show('qt1');	}		if( qt == 1)	{		show('qt2');	}		if( qt == 2)	{		show('qt3');	}		if( qt == 3)	{		show('qt4');	}		if( qt == 4)	{		show('qt5');	}		if( qt == 5)	{		show('qt6');	}	if( qt == 6)	{		show('qt7');	}	}function randStories(){var image;var stor = Math.floor(Math.random() * 3) 	if( stor == 0)	{		show('stor1');	}		if( stor == 1)	{		show('stor2');	}		if( stor == 2)	{		show('stor3');	}		}function randShorts(){var image;var sht = Math.floor(Math.random() * 3) 	if( sht == 0)	{		show('short1');	}		if( sht == 1)	{		show('short2');	}		if( sht == 2)	{		show('short3');	}		} function openWin(url,x,y){	if (document.all)        var xMax = screen.width, yMax = screen.height;    else        if (document.layers)            var xMax = window.outerWidth, yMax = window.outerHeight;        else            var xMax = 800, yMax=600;    var xOffset = (xMax - x)/2, yOffset = (yMax - y)/2;	window.open(url,'futureWin','width='+x+',height='+y+',screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+',resizable=no,status=no,scrollbars=no,toolbar=no');} function openWideWin(url,x,y){	if (document.all)        var xMax = screen.width, yMax = screen.height;    else        if (document.layers)            var xMax = window.outerWidth, yMax = window.outerHeight;        else            var xMax = 800, yMax=600;    var xOffset = (xMax - x)/2, yOffset = (yMax - y)/2;	window.open(url,'wideWin','width='+x+',height='+y+',screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+',resizable=no,status=no,scrollbars=no,toolbar=no');} function openXWideWin(url,x,y){	if (document.all)        var xMax = screen.width, yMax = screen.height;    else        if (document.layers)            var xMax = window.outerWidth, yMax = window.outerHeight;        else            var xMax = 800, yMax=600;    var xOffset = (xMax - x)/2, yOffset = (yMax - y)/2;	window.open(url,'xwideWin','width='+x+',height='+y+',screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+',resizable=no,status=no,scrollbars=no,toolbar=no');}