// Trap right mouse clicks to prevent picture theft
// Source! http://javascript.internet.com

function right(e) {
var msg = "Sorry, you don't have permission to right-click.";
if (navigator.appName == 'Netscape' && e.which == 3) {
alert(msg);
return false;
}
if (navigator.appName ==
'Microsoft Internet Explorer' && event.button==2) {
alert(msg);
return false;
}
else return true;
}

function trap() {
if(document.images)
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown = right;
}




//Validates the contact form
//
function validate_contact() {
if (document.contact.name.value.length<1) {
    alert("Please enter your name");
    document.contact.name.focus();
    return false;
}

if (((document.contact.address_1.value.length<6) && (document.contact.phone.value.length<6)) && (document.contact.email_1.value.length<1)) {
    alert("So that I can reply to you, please enter either your address, your phone number, or an e-mail address.");
    document.contact.address_1.focus();
    return false;
}

if ((document.contact.email_1.value.length > 0) || (document.contact.email_2.value.length > 0)) {
   if (document.contact.email_1.value != document.contact.email_2.value){
    alert("Email addresses are not the same.");
    document.contact.email_1.focus();
    return false;
   }
}

if (document.contact.enquiry.value.length<1){
    alert("What's the question?");
    document.contact.enquiry.focus();
    return false;
  }
return true;
}

function submitForm() {
alert('submit');;
return true;
}
