function ValidateForm(strForm)
{
	var x;
	var alertmsg;
	x=0;
	alertmsg = "The following fields are required: \n";
	if(strForm=="contactform")
	{
		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(strForm=="registerform")
	{
		if (document.getElementById("first").value==""){alertmsg = alertmsg + "\nFirst";x = x + 1;}
		if (document.getElementById("last").value==""){alertmsg = alertmsg + "\nLast";x = x + 1;}
		if (document.getElementById("phone").value==""){alertmsg = alertmsg + "\nPhone";x = x + 1;}
		if (document.getElementById("email").value==""){alertmsg = alertmsg + "\nEmail";x = x + 1;}
		if (document.getElementById("address").value==""){alertmsg = alertmsg + "\nAddress";x = x + 1;}
		if (document.getElementById("city").value==""){alertmsg = alertmsg + "\nCity";x = x + 1;}
		if (document.getElementById("state").value==""){alertmsg = alertmsg + "\nState";x = x + 1;}
		if (document.getElementById("zip").value==""){alertmsg = alertmsg + "\nZip";x = x + 1;}
	}
	if(x!=0){alert(alertmsg);return false;}
}

function SwapImage(objImg,strImg) 
{
	if (document.images) 
	{
		objImg.src = "images/" + strImg;
	}
	else if (document.getElementById)
	{
		document.getElementById(objImg).src = "images/" + strImg;
	}
}

function ChangePhoto(strPhoto)
{
	document.getElementById('photo').src = "images/products/" + strPhoto;
}