
<!--

// Email Validation.

function check_email(e) {
ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";

for(i=0; i < e.length ;i++){
if(ok.indexOf(e.charAt(i))<0){ 
return (false);
}	
} 

if (document.images) {
re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
if (!e.match(re) && e.match(re_two)) {
return (-1);		
} 

}

}

// -->

<!--

function check_form(f) { // f is the form (passed using the this keyword)
// check the first email address ( the exclamation means "not" )
if(!check_email(form.email.value)){
alert("Please enter a valid email address.");
form.email.value = ""
form.email.focus(); 
// if the browser is Netscape 6 or IE
if(document.all || document.getElementByID){
// change the color of text field
// form.email.style.background = "yellow";
}
// make sure the form is not submitted
return false;
}

if(form.email.value == "just@testing.com"){
alert("Please enter a valid email address.");
form.email.value = ""
form.email.focus(); 
// if the browser is Netscape 6 or IE
if(document.all || document.getElementByID){
// change the color of text field
// form.email.style.background = "yellow";
}
// make sure the form is not submitted
return false;
}

if(form.email.value == "test@testing.com"){
alert("Please enter a valid email address.");
form.email.value = ""
form.email.focus(); 
// if the browser is Netscape 6 or IE
if(document.all || document.getElementByID){
// change the color of text field
// form.email.style.background = "yellow";
}
// make sure the form is not submitted
return false;
}

if(form.email.value == "test@test.com"){
alert("Please enter a valid email address.");
form.email.value = ""
form.email.focus(); 
// if the browser is Netscape 6 or IE
if(document.all || document.getElementByID){
// change the color of text field
// form.email.style.background = "yellow";
}
// make sure the form is not submitted
return false;
}


if(form.email.value == "fuck@you.com"){
alert("Please enter a valid email address.");
form.email.value = ""
form.email.focus(); 
// if the browser is Netscape 6 or IE
if(document.all || document.getElementByID){
// change the color of text field
// form.email.style.background = "yellow";
}
// make sure the form is not submitted
return false;
}

if(form.email.value == "blah@blah.com"){
alert("Please enter a valid email address.");
form.email.value = ""
form.email.focus(); 
// if the browser is Netscape 6 or IE
if(document.all || document.getElementByID){
// change the color of text field
// form.email.style.background = "yellow";
}
// make sure the form is not submitted
return false;
}

submitonce(form);

}


function submitonce(theform){
//if IE 4+ or NS 6+
if (document.all||document.getElementById){
//screen thru every element in the form, and hunt down "submit" and "reset"
for (i=0;i<theform.length;i++){
var tempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
//disable em
tempobj.disabled=true
}
}
}

// -->
