function setBG(id, newClass){
//var identity;
	identity=document.getElementById(id);
	identity.className=newClass;

}

function new_window(image) {
var url;
url="images/" + image;
link = window.open(url,"Link","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=700,height=500,left=10,top=10");
}

function openURL(url) {
link = window.open(url,"Link","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=700,height=500,left=10,top=10");
}

function goContact(name){
window.location.href="contactmodel.asp?model=" + name;
}

/// validate email address
function checkEmail(email){
var email = email;
if(email == "") {
	alert("Invalid Email Address...");
	return(false);
}
else
{
	intWhere = email.indexOf("@");
	intDec = email.indexOf(".", intWhere);
	if (intWhere == -1)
		{alert("A valid e-mail address will contain one @ (at) symbol");
		return(false);}
	if (intDec == -1)
		{alert("The server portion of the e-mail address is not valid");
		return(false);}	
}
return(true)
}

function isEmpty(text, varName){
var empty = text == "";
if(empty) {
	alert("Invalid Entry : " + varName);
}
return(empty)
}

function isAlphaNumeric(str){
  var re = /[^a-zA-Z0-9]/g
  if (re.test(str)) return false;
  return true;
}