function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function popup() {
	var w = 640;
	var h = 480;
	var name = "openwin"
	flashwin=window.open('popup.htm',name,'menubar=no,height='+h+',width='+w+',top='+((screen.height-h)/2)+',left='+((screen.width-w)/2)+',screenX='+((screen.width-w)/2)+',screenY='+((screen.height-h)/2)+',scrollbars=1,resizable=1,alwaysRaised=yes');
	flashwin.focus();
}

function requestinfo() {
	var w = 553;
	var h = 500;
	var name = "requestinfo"
	flashwin=window.open('requestinfo.asp',name,'menubar=no,height='+h+',width='+w+',top='+((screen.height-h)/2)+',left='+((screen.width-w)/2)+',screenX='+((screen.width-w)/2)+',screenY='+((screen.height-h)/2)+',scrollbars=yes,resizable=no,alwaysRaised=yes');
	flashwin.focus();
}

function enlarge(image) {
	var w = 599;
	var h = 594;
	var name = "enlarge"
	flashwin=window.open('enlarge.asp?image='+image+'.gif',name,'menubar=no,height='+h+',width='+w+',top='+((screen.height-h)/2)+',left='+((screen.width-w)/2)+',screenX='+((screen.width-w)/2)+',screenY='+((screen.height-h)/2)+',scrollbars=no,resizable=no,alwaysRaised=yes');
	flashwin.focus();
}

function checkField() {
		var temp = document.theForm.first.value;
		if ((temp == '') || (temp.charAt(0) == ' ')){
			alert("Please enter first name.");
			document.theForm.first.focus();
			return false;
		}
		
		var temp = document.theForm.last.value;
		if ((temp == '') || (temp.charAt(0) == ' ')){
			alert("Please enter last name.");
			document.theForm.last.focus();
			return false;
		}
		
		var temp = document.theForm.address.value;
		if ((temp == '') || (temp.charAt(0) == ' ')){
			alert("Please enter address name.");
			document.theForm.address.focus();
			return false;
		}
		
		var temp = document.theForm.city.value;
		if ((temp == '') || (temp.charAt(0) == ' ')){
			alert("Please enter city name.");
			document.theForm.city.focus();
			return false;
		}
		
		var temp = document.theForm.state.value;
		if ((temp == '') || (temp.charAt(0) == ' ')){
			alert("Please enter state name.");
			document.theForm.state.focus();
			return false;
		}
		
		var temp = document.theForm.zipcode.value;
		if ((temp == '') || (temp.charAt(0) == ' ')){
			alert("Please enter zipcode name.");
			document.theForm.zipcode.focus();
			return false;
		}
		
		var temp = document.theForm.email.value;
		//if ((temp != '') && (temp.charAt(0) != ' ')){
			var exclude=/[^@\-\.\w]|^[_@\.\-]|[\._\-]{2}|[@\.]{2}|(@)[^@]*\1/;
			var check=/@[\w\-]+\./;
			var checkend=/\.[a-zA-Z]{2,3}$/;
		
			if(((temp.search(exclude) != -1)||(temp.search(check)) == -1)||(temp.search(checkend) == -1)) {
				alert("Invalid email address!");
				document.theForm.email.focus();
				return false;
			}
		//}
}