// JavaScript Document
function validEmail(email) {
invalidChars = " /:,;"
if (email == "") {					
return false
}
for (i=0; i<invalidChars.length; i++) {	
badChar = invalidChars.charAt(i)
if (email.indexOf(badChar,0) > -1) {
return false
}
}
atPos = email.indexOf("@",1)			
if (atPos == -1) {
return false
}
if (email.indexOf("@",atPos+1) != -1) 
{	
return false
}
periodPos = email.indexOf(".",atPos)
if (periodPos == -1) {			
return false
}
if (periodPos+3 > email.length)	
{	
return false
}
return true
}

function chkemail(f){
if (!validEmail(f.value)) {
alert("Sorry the email address seems to be invalid")
f.select;
			
}

}
function verify(f){
	
	for(var i=0;i<f.length;i++){
var e =f.elements[i];
		if((e.value=="") && (!e.optional)){
alert("Sorry"+ " " + e.name +" appears to be blank." +"\n"+ " This information is required" +"\n"+ " to process this form");
e.focus();
return false;
		}
		if (!validEmail(f.email.value)) {
alert("Sorry the email address seems to be invalid or incomplete")
f.email.focus;
	return false		
}

}
return true
}
function popup2(url,w,h,t,l){
l=(screen.width-w)/2
Dapop=window.open(url,'pop2','width='+w+',height='+h+',top='+t+',left='+l+',resizable=yes, scrollbars=yes');
Dapop.focus();
}
function popup(url,w,h,t,l){
l=(screen.width-w)/2
Dapop=window.open(url,'pop1','width='+w+',height='+h+',top='+t+',left='+l+',resizable=yes, scrollbars=yes');
Dapop.focus();
}

function smallpop(url,w,h,t,l){
l=(screen.width-w)/2
Dapop=window.open(url,'pop1','width='+w+',height='+h+',top='+t+',left='+l+',resizable=yes, scrollbars=no');
Dapop.focus();
}
