var imgs = new Array();
var count;

var imglist = new Array (
	"Grafx/menu-home-on.gif",
	"Grafx/menu-about-on.gif",
	"Grafx/menu-services-on.gif",
	"Grafx/menu-1031-on.gif",
	"Grafx/menu-home-off.gif",
	"Grafx/menu-about-off.gif",
	"Grafx/menu-services-off.gif",
	"Grafx/menu-1031-off.gif"
);
	
if (document.images) {
	for (count=0; count<imglist.length; count++) {imgs[count]=new Image(); imgs[count].src=imglist[count];}
}

// *****************************************************
function msover(img,ref) {document.images[img].src = ref;} 
function msout(img,ref)  {document.images[img].src = ref;}

// *****************************************************
function newWindow(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+',toolbar=no,status=no,scrollbars='+scroll+',resizable=no'
	win = window.open(mypage, myname, winprops)
	
	win.window.focus();
}

// *****************************************************
function GetObject(n){
	var x,t; 
	
	if ((n.indexOf("?")) > 0 && parent.frames.length) {
		t = n.split("?");
		x=eval("parent.frames['"+t[1]+"'].document.getElementById('"+t[0]+"')");
	} else {
		x=document.getElementById(n)
	}
	return x;
}

// ************************************************************
function validateHeightsForm() {

	var errMsg;
	var errAlert;
	
	errMsg = "";
	errAlert = "Please correct the following items before continuing.\n\n";

	if (document.heightsForm.aaFirstName.value == "") {errMsg = errMsg + "- First Name\n";}
	if (document.heightsForm.acLastName.value == "") {errMsg = errMsg + "- Last Name\n";}
	if (document.heightsForm.adAddressOne.value == "") {errMsg = errMsg + "- Address One\n";}
	if (document.heightsForm.afAddressCity.value == "") {errMsg = errMsg + "- City\n";}
	if (document.heightsForm.ahAddressZipCode.value == "") {errMsg = errMsg + "- Zip Code\n";}
	if (document.heightsForm.aiAddressPhone.value == "") {errMsg = errMsg + "- Phone\n";}
	
	if (document.heightsForm.Email.value == "") {
		errMsg = errMsg + "- Email\n";
	} else {
		if ((document.heightsForm.Email.value.indexOf("@") < 1) || (document.heightsForm.Email.value.indexOf(".") < 3)) {
			errMsg = errMsg + "- Email Format\n";
		}
	}
	
	if (errMsg != "") {
		errAlert = errAlert + errMsg;
		alert(errAlert);
		return false;
	} else {
		document.heightsForm.submit();
		return true;
	}
}


