function ValidateContact()
{
	var x;
	var alertmsg;
	x=0;
	alertmsg = "The following fields are required: \n";
	if (document.getElementById("ename").value==""){alertmsg = alertmsg + "\nName";x = x + 1;}
	if (document.getElementById("eemail").value==""){alertmsg = alertmsg + "\nEmail";x = x + 1;}
	if (document.getElementById("esubject").value==""){alertmsg = alertmsg + "\nSubject";x = x + 1;}
	if (document.getElementById("ebody").value==""){alertmsg = alertmsg + "\nBody";x = x + 1;}
	if (x == 0){document.getElementById("contactform").submit();}
	else{alert(alertmsg);return false;}	
}

function ValidateSupport()
{
	var x;
	var alertmsg;
	x=0;
	alertmsg = "The following fields are required: \n";
	if (document.getElementById("eid").value==""){alertmsg = alertmsg + "\nCustomer ID";x = x + 1;}
	if (document.getElementById("ecompany").value==""){alertmsg = alertmsg + "\nCompany";x = x + 1;}
	if (document.getElementById("ename").value==""){alertmsg = alertmsg + "\nName";x = x + 1;}
	if (document.getElementById("eemail").value==""){alertmsg = alertmsg + "\nEmail";x = x + 1;}
	if (document.getElementById("ephone").value==""){alertmsg = alertmsg + "\nPhone";x = x + 1;}
	if (document.getElementById("etype").value==""){alertmsg = alertmsg + "\nSubject";x = x + 1;}
	if (document.getElementById("ebody").value==""){alertmsg = alertmsg + "\nBody";x = x + 1;}
	if (x == 0){document.getElementById("supportform").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(); 
	}
}

function SwapImage(which,image) 
{
	if (document.images) 
	{
		which.src = "images/" + image;
	}
}

function PreloadImages()
{
	if (document.images)
    {
		var i = 0;
		imgObject = new Image();
		imgObject.src = "../images/btn_top_home2.jpg";
		imgObject.src = "../images/btn_top_contact2.jpg";		
    }
}