function PreloadImages()
{
	imgObj = new Image();
	imgUrl = new Array();
	
	imgUrl[0] = "http://www.grandphoenix.net/btn_index_2.gif";
	imgUrl[1] = "http://www.grandphoenix.net/btn_about_2.gif";
	imgUrl[2] = "http://www.grandphoenix.net/btn_classic_2.gif";
	imgUrl[3] = "http://www.grandphoenix.net/btn_muscle_2.gif";
	imgUrl[4] = "http://www.grandphoenix.net/btn_performance_2.gif";
	imgUrl[5] = "http://www.grandphoenix.net/btn_contact_2.gif";	
	
	var i = 0;
	for(i=0;i<=3;i++)
	{ 
		imgObj.src = imgUrl[i];
	}
	
}

function SwapImage(which,image) 
{
	if (document.images) 
	{
		which.src = "images/" + image;
	}
	else if (document.getElementById)
	{
		document.getElementById(which).src = "images/" + image;
	}
}

function ValidateContact()
{
	var x;
	var alertmsg;
	
	x=0;
	alertmsg = "The following fields are required: ";

	if (document.getElementById("ename").value == ""){if (x > 0){alertmsg = alertmsg + ", ";}alertmsg = alertmsg + "Name";x = x + 1;}
	if (document.getElementById("eemail").value == ""){if (x > 0){alertmsg = alertmsg + ", ";}alertmsg = alertmsg + "Email";x = x + 1;}
	if (document.getElementById("esubject").value == ""){if (x > 0){alertmsg = alertmsg + ", ";}alertmsg = alertmsg + "Subject";x = x + 1;}
	if (document.getElementById("ebody").value == ""){if (x > 0){alertmsg = alertmsg + ", ";}alertmsg = alertmsg + "Body";x = x + 1;}
	if (x == 0)
	{
		document.getElementById("contactform").submit();
	}
	else
	{
		alert(alertmsg);
		return false;
	}	
}

function popup(mypage, myname, w, h, scroll) 
{
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) 
	{ 
		win.window.focus(); 
	}
}