// JavaScript Document

function pageLoad()
{
	//getAd();	
}

var hidemenu = "";

function submitNow()
{
	//alert("called");
	with(document)
	{
		form1.submit();
	}
}
function buttonOver(button)
{
	with(document)
	{
	getElementById(button).style.backgroundImage = "url(images/button_over.jpg)";
	getElementById(button).style.cursor = 'pointer';
	}
	reveal(button);
}

function buttonOut(button)
{
	document.getElementById(button).style.backgroundImage = "url(images/button.jpg)";
	hide("clubs");
}

function featureOver(button)
{
	document.getElementById(button).style.backgroundImage = "url(images/feature_over.jpg)";
}

function featureOut(button)
{
	document.getElementById(button).style.backgroundImage = "url(images/feature.jpg)";
}

function linkOver(theId,button)
{
	with(document)
	{
		//getElementById("menu_1").style.visibility = "hidden";
		getElementById(theId).style.backgroundColor = "#dcddde";
		getElementById(theId).style.cursor = 'pointer';
	}
	//reveal(button);
}

function linkOut(theId,button)
{
	with(document)
	{
		getElementById(theId).style.backgroundColor = "#ffffff";
		//body.style.cursor = 'default';
	}
	//hide(button);
}

function linkClick(theName)
{
	window.location = theName;
}

function reveal(menu)
{
	clearTimeout(hidemenu);
	if(menu == "clubs") document.getElementById("menu_1").style.visibility = "visible";
	else hide("clubs");
}

function hide(menu)
{
	clearTimeout(hidemenu);
	if(menu == 'clubs') hidemenu = setTimeout("hide2('clubs');",1000);
}

function hide2(menu)
{
	if(menu == "clubs") document.getElementById("menu_1").style.visibility = "hidden";
}

function clearTimer(menu)
{
	clearTimeout(hidemenu);
}





// random ad generator
var ad_array = new Array
(
	Array("banner01.gif", "http://www.monicawhite.com" ),
	Array("banner02.jpg", "http://www.944.com" ),
	Array("banner03.jpg", "http://www.dreamcarrentals.com" )
)


function getAd()
{
	var theNumber = Math.floor(Math.random()*ad_array.length);
	with(document)
	{
	getElementById("theAd").src = "images/" +  ad_array[theNumber][0];
	getElementById("banner_URL").href = ad_array[theNumber][1];
	getElementById("banner_URL").target = "_blank";
	}
	//alert(theNumber);
}

function getMainPic(Name,ID)
{
	with(document)
	{
	getElementById("MainPic").src = Name + ".jpg";
	getElementById(ID).src = Name + "_TN_roll.jpg";
	}
}

function getSwap(ID,Graphic)
{
	with(document)
	{
		getElementById(ID).style.cursor = 'pointer';
		getElementById(ID).src = Graphic;
	}
}
function getUnSwap(ID,Graphic)
{
	with(document)
	{
		getElementById(ID).src = Graphic;
	}
}

function getThumb(Name,ID)
{
	with(document)
	{
	getElementById(ID).src = Name + "_TN.jpg";
	}
}

function getPointer(ID)
{
	with(document)
	{
	getElementById(ID).style.cursor = 'pointer';
	}
}

function popUp(URL) 
{
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=630,height=520');");
}

function formPopUp(URL) 
{
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=630,height=780');");
}

//test
function open_popupWindow(url,name,width, height){
        window.open(url,name,'toolbar=no, location=no, directories=no, status=no,menubar=no, scrollbars=yes, resizable=no, width='+width+',height='+height+' ');
}
