// product links
i = 0;
total = 2;
var loadImage = new Image(total);
var staticImage = new Image(total);
var myImageString = new Array("viewshowroomgallery","ourhawaiishowroom2");

for ( i=0; i<total; i++){
	loadImage[i] = new Image();
	loadImage[i].src = "images/" + myImageString[i] + "_2.gif";
	staticImage[i] = new Image();
	staticImage[i].src = "images/" + myImageString[i] + ".gif";
}

function checkForm(){
	if ( myForm.nme.value == "" ){
		alert("Please provide us with your name.");
		myForm.nme.focus();
		return false;
	}

	if ( myForm.email.value == "" ){
		alert("Please provide us with your E-mail address.");
		myForm.email.focus();
		return false;
	}
	else{
		if ( !IsEmail(myForm.email.value) ){
			alert("Invalid E-mail format.");
			myForm.email.focus();
			return false;
		}
	}

	return (true);
}

function checkForm_CGI(){
	if ( myForm.First_Last_Name.value == "" ){
		alert("Please provide us with your name.");
		myForm.First_Last_Name.focus();
		return false;
	}

	if ( myForm.formmail_mail_email.value == "" ){
		alert("Please provide us with your E-mail address.");
		myForm.formmail_mail_email.focus();
		return false;
	}
	else{
		if ( !IsEmail(myForm.formmail_mail_email.value) ){
			alert("Invalid E-mail format.");
			myForm.formmail_mail_email.focus();
			return false;
		}
	}

	return (true);
}

function IsEmail(Expression){
	if (Expression == null)
		return (false);

	var supported = 0;
	if (window.RegExp){
		var tempStr = "a";
		var tempReg = new RegExp(tempStr);
		if (tempReg.test(tempStr)) supported = 1;
	}
	if (!supported)
		return (Expression.indexOf(".") > 2) && (Expression.indexOf("@") > 0);

	var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
	var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
	return (!r1.test(Expression) && r2.test(Expression));
}

function processPage(){
	if ( aseForm.zip.value == "" ){
		alert("Invalid zip code.");
		aseForm.zip.focus();
		return false;
	}

	var zipCode = aseForm.zip.value;

	mapIt( zipCode );

	return true;
}

function goLiteVisit(FRM,BTN){
	window.document.forms[FRM].elements[BTN].style.color = "#898989";
}

function goDarkVisit(FRM,BTN){
	window.document.forms[FRM].elements[BTN].style.color = "#000000";
}

function mapIt(zipCode){
	var p1 = "http://maps.google.com/maps?f=d&hl=en&geocode=&time=&date=&ttype=&saddr=";
	var p2 = "&daddr=1755+Rollins+Rd,+Burlingame,+CA+94010&sll=37.599,-122.37819&sspn=0.006681,0.011544";
	var p3 = "&ie=UTF8&ll=37.651209,-122.371902&spn=0.243009,0.462799&z=11&om=1";

	var dest = p1 + zipCode + p2 + p3

	window.open(dest,'aseWindow','','');
}

 



