<!--

var verNum;
var sPath;
var sPath2;

var iBase;
verNum = parseInt(navigator.appVersion);
sPath = "images/";
//sPath2 = "/media/images/layoutImages/topNavImages/topSubNavImages/";
sPrefix = "";

initBase();

function initBase(){
	var x;
	x= window.screen.width;
	if(x<1024){
		iBase = 100;
	}else if(x=1024){
		iBase = 210;
	}else if(x>1024){
		iBase = 0;
	}
}

function getBase(){
	return iBase;
}

//THIS JAVASCRIPT FUNCTION SETS THE ACTION VALUE
	//UPON BUTTON CLICK
	function setTask(sForm,sTask,bSubmit){
		
		var sLoc = "";
	
		sLoc = eval("document."+ sForm +".action");
		sLoc = sLoc + "&task=" + sTask;
		eval("document."+ sForm +".action = sLoc");
		
		if(bSubmit){
			eval("document."+ sForm +".submit()");
		}
	}	
	
	function setChapter(sForm,sChapter,bSubmit){
		var sLoc = "";
	
		sLoc = eval("document."+ sForm +".action");
		sLoc = sLoc + "&chapter=" + sChapter;
		eval("document."+ sForm +".action = sLoc");
		
		if(bSubmit){
			eval("document."+ sForm +".submit()");
		}
	}					

	
	function dispForm(sURL){
		window.open(sURL,'PrintForm','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=500,top=100,left=150');
	}	
	
	function popUpWin(sURL, iWidth, iHeight, iX, iY){
		//X=100
		//Y=150
		window.open(sURL,'PrintForm','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width='+ iWidth +',height='+ iHeight +',top=100,left=150');
	}

	
	function pageJump(sForm,sWho){
		eval("document."+ sForm +"."+ sWho +".focus()");
	}
	
	function redirParent(sLoc, bClose){
		opener.location = sLoc;	
		if(bClose){
			window.close();	
		}
	}	

	
	function setParentFormValue(sForm,sField,sValue){
		eval("opener."+ sForm +"."+ sField +".value = '"+ sValue +"'");
	}

	function cancelClick(sWhere){
		switch(sWhere){
			case "freebieCenter":
				document.location.href="/?class=freebieCenter&chapter=1";
				break;
				
			default:	
				document.location.href="/";
				break;
		}	
	}

	
	function writeFreebieDiv(nXMax,nYMax){
		var nX;
		var nY;
		
		switch(nXMax){
			case 1024:
				nX = 150;
				nY = 200;
				break;
				
			case 800:
				nX = 50;
				nY = 130;
				break;
				
			case 640:
				break;
				
			default:
				
		}
		
		
		document.write ('	<div id="jet" name="jet" style="position:absolute; width:160px; height:140px; z-index:2; left: '+ nX +'px; top: '+ nY +'; visibility: visible;">');
		document.write ('	<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" z-index:2;'); 
		document.write ('		codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"');
		document.write ('		 WIDTH=160 HEIGHT=300>');
		document.write ('		<PARAM NAME=movie VALUE="/media/flash/freebie.swf"> <PARAM NAME=loop VALUE=false> <PARAM NAME=z-index VALUE=2> <PARAM NAME=quality VALUE=high> <PARAM NAME=wmode VALUE=transparent> <PARAM NAME=bgcolor VALUE=#666666> <EMBED src="/media/flash/freebie.swf" loop=false quality=high wmode=transparent bgcolor=#666666  WIDTH=160 HEIGHT=300 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>');
		document.write ('	</OBJECT>');
		document.write ('	</div>');
	}


function getFloatingMenuX(prevBtnWidth){
	var newX;
	
	if (!isNaN(prevBtnWidth)){
		newX = getBase() + prevBtnWidth;
	}else{
		newX = 0;
	}
	
	return newX;
}


button = new Array(19);

button[0] = "generalInfo";
button[1] = "aboutUs";
button[2] = "afterHours";


mevent = new Array(3);
mevent[0] = "";
mevent[1] = "_on";
//IF YOU HAVE A SPECIFIC IMAGE TO FLIP TO ONCLICK RUN IT HERE
//mevent[2] = "_click";


//IF YOU HAVE A SPECIFIC IMAGE TO FLIP TO ONCLICK SET J<3 ELSE SET TO 2
for(j=0;j<2;j++)
{
	
	for(i=0;i<button.length;i++)
	{
		eval(button[i]+mevent[j]+" = new Image;")

		tmpPath = sPath;
		sImgPrefix = "";
	
	eval(button[i]+mevent[j]+".src = '"+tmpPath+sImgPrefix+button[i]+mevent[j]+".jpg';")
	//alert(button[i]+mevent[j]+".src");
	}
	//alert(j);
}



function flipOver(imgName) {
if (verNum >= 3) 
{
	if(document [imgName].src != eval(imgName+"_on.src"))
	{
	document [imgName].src = eval(imgName+"_on.src");
	}
}
}

function flipOut(imgName) {
if (verNum >= 3)
{
	if(document [imgName].src != eval(imgName+".src"))
	{
	document [imgName].src = eval(imgName+".src");
	}
}
}
//-->


