function SwapImage(imgToSwapIn,imgLocation) {
imgToSwapIn = eval(imgToSwapIn + ".src");
document [imgLocation].src = imgToSwapIn;
}
function createInput(oName,oType, oValue){
if(navigator.appName == "Netscape"){
document.write("");
} else {
document.write("");
}
}
function stateSelection(id, showMenu){
document.write("\n");
}
function sendPage(){
var vSender;
var vRecipient;
var ok;
sender = document.forms.emailafriend.sender.value;
recipient = document.forms.emailafriend.recipient.value;
rArray = recipient.split(",");
rArray.push(sender);
invalid = new Array();
ok = true;
var atPos ;
var pPos ;
for(i=0; i -1 || pPos == -1 || recipient == "" || sender == ""){
ok = false;
}
}
if(!ok){
alert("One or more of the email addresses you entered are invalid!");
return false;
} else {
return true;
}
}
function checkFileType(){
var fileName, filePath, fileExtention, fileN;
filePath = document.forms.request.attachment.value ;
var n = 0 ;
for(i=1; i 5 || zip.length < 5 || isNaN(zip)){
invalid.push("Zip Code");
ok = false;
}
var atPos = email.indexOf("@",1);
var pPos = email.indexOf(".",1);
if(email == "" || atPos == -1 || email.indexOf("@",atPos+1) > -1 || pPos == -1){
invalid.push("Email");
ok = false;
}
if(phone == ""){
invalid.push("Phone");
ok = false;
}
if(!upload){
invalid.push("Upload File");
ok = false;
}
if(!ok){
var message;
message = "The following fields are either empty\nor invalid!\n\n"
for(i = 0; i < invalid.length; i++){
message = message + "- " + invalid[i] + "\n";
}
alert(message);
return false;
} else {
return true;
}
}
function sendForm(formName){
document [formName].submit();
}
function jumpMenu(newLoc){
newPage = newLoc.options[newLoc.selectedIndex].value ;
if(newPage != ""){
window.location.href = newPage
}
}
function alertUser(message){
alert(message);
}