var myimages=new Array()
function preloadimages(){for(i=0;i<preloadimages.arguments.length;i++){myimages[i]=new Image()
myimages[i].src=preloadimages.arguments[i]}}
preloadimages("bg.jpg")
function gotosite(site){if(site!=""){self.location=site}}
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+',scrollbars='+scroll+',resizable,toolbar=no'
win=window.open(mypage,myname,winprops)}
function popup_null(){}
function ValidateForm(theform){if(theform.name.value.length==0){alert("Please enter your Name");theform.name.focus();return false}
if((theform.email.value.length==0)||(theform.phone.value.length==0)){alert("Please enter an E-mail Address or Phone Number");theform.email.focus();return false}
var input_str=theform.email.value;var input_len1=input_str.length;var iserror=0;input_len1=input_str.length;var lastdot=-1;var lastat=-1;var numberat=0;if(theform.email.value.length!=0){for(var j=0;j<input_len1;j++){var ch2=input_str.substring(j,j+1);if(((ch2<"a")||(ch2>"z"))&&((ch2<"A")||(ch2>"Z"))&&((ch2<"0")||(ch2>"9"))&&(ch2!="@")&&(ch2!=".")&&(ch2!="_")&&(ch2!="-")){alert("Please input a valid email address!\nValid characters include A-Z, a-z, 0-9, -, _, . and @");iserror=1;}
if(ch2=="."){if(j==lastdot+1){alert("Please input a valid email address!\nYou can't have two dots next to\neach other'..'.");iserror=1;}
lastdot=j;}
if(ch2=="@"){lastat=j;numberat=numberat+1}
if(ch2==" "){alert("Please input a valid email address!\nYou can't have any spaces in the address.");iserror=1;}}
if(lastat==-1){alert("Please input a valid email address!\nYou don't have an '@'.");iserror=1;}
if(lastat==0){alert("Please input a valid email address!\nYou don't have a name before the '@'.");iserror=1;}
if(numberat>1){alert("Please input a valid email address!\nYou may have only one '@'.");iserror=1;}
if((lastdot<=lastat)||(lastdot>input_len1-3)||(input_len1-lastdot>4)){alert("Please input a valid email address!\nYou don't have a proper domain name!\nUse .com, .org, .net, .us, etc");iserror=1;}
if(lastdot==lastat+1){alert("Please input a valid email address!\nYou don't have a proper organization name!\nUse name@organization.domain");iserror=1;}
if(iserror==1){theform.email.focus();return false;}}
if(theform.phone.value=="5001020"){alert("Submissions from your e-mail address have been blocked. For more information, please contact our office directly.");theform.name.focus();return false}
return true}
