function checkForm() {
name = document.getElementById("fullname").value;
if (name == "") { document.getElementById("nameError").style.display = "inline";
document.getElementById("fullname").select();
document.getElementById("fullname").focus();
return false;
}email = document.getElementById("emailstring").value;
if (email==null) {
document.getElementById("emailError").style.display = "inline";
document.getElementById("emailstring").select();
document.getElementById("emailstring").focus();
return false;
}if (email.length==0) {  
document.getElementById("emailError").style.display = "inline";
document.getElementById("emailstring").select();
document.getElementById("emailstring").focus();
return false;
}if (email.indexOf("@") < 1) { //  must contain @, and it must not be the first character
document.getElementById("emailError").style.display = "inline";
document.getElementById("emailstring").select();
document.getElementById("emailstring").focus();
return false;
} else if (email.lastIndexOf(".") <= email.indexOf("@")) {  // last dot must be after the @
document.getElementById("emailError").style.display = "inline";
document.getElementById("emailstring").select();
document.getElementById("emailstring").focus();
return false;
} else if (email.indexOf("@") == email.length) {  // @ must not be the last character
document.getElementById("emailError").style.display = "inline";
document.getElementById("emailstring").select();
document.getElementById("emailstring").focus();
return false;
} else if (email.indexOf("..") >=0) { // two periods in a row is not valid
document.getElementById("emailError").style.display = "inline";
document.getElementById("emailstring").select();
document.getElementById("emailstring").focus();
return false;
} else if (email.indexOf(".") == email.length) {  // . must not be the last character
document.getElementById("emailError").style.display = "inline";
document.getElementById("emailstring").select();
document.getElementById("emailstring").focus();
return false;
}postcode = document.getElementById("postcodestring").value;
if (postcode == "") { document.getElementById("postcodeError").style.display = "inline";
document.getElementById("postcodestring").select();
document.getElementById("postcodestring").focus();
return false;
}return true; 
}function checkFirstForm(){
if(document.serverForm.width.selectedIndex == 0){
document.getElementById("upperformError").style.display = "inline";
return false;
}if(document.serverForm.profile.selectedIndex == 0){
document.getElementById("upperformError").style.display = "inline";
return false;
}if(document.serverForm.rim.selectedIndex == 0){
document.getElementById("upperformError").style.display = "inline";
return false;
}return true;
}function hideDiv(){
if(document.getElementById){
document.getElementById('overlay2').style.display="none";
}}
