<!--
// Functions

var ClickCount = 0;
function checkForm(theForm) {
if (theForm.name.value=="") {
alert("Please add your name");
theForm.name.focus();
return false;
}
if (theForm.tel.value=="") {
alert("Please add your telephone number");
theForm.tel.focus();
return false;
}
if (theForm.email.value=="") {
alert("Please enter your email address");
theForm.email.focus();
return false;
}
if (theForm.email.value.indexOf("@") == -1) {
alert("Please enter a valid email address (you have not entered an @ sign)");
theForm.email.focus();
return false;
}    
if (theForm.email.value.indexOf(".") == -1) {
alert("Please enter a valid email address (you have not entered a full stop anywhere)");
theForm.email.focus();
return false;
}
  if (ClickCount > 0)
  {   
    alert("Your enquiry is being processed. Please be patient.") ;
    return false;
  }

ClickCount = 1;
return true;
}

///// 

var ClickCount2 = 0;
function checkSellForm(theForm) {

if (theForm.make.value=="") {
alert("Please add the make");
theForm.make.focus();
return false;
}
if (theForm.model.value=="") {
alert("Please add the model");
theForm.model.focus();
return false;
}
if (theForm.type.selectedIndex==0) {
alert("Please add the type of unit");
return false;
}
if (theForm.year.value=="") {
alert("Please add the year of manufacture");
theForm.model.focus();
return false;
}
if (theForm.condition.selectedIndex==0) {
alert("Please add the condition of unit");
return false;
}
if (theForm.length.value=="") {
alert("Please add the length of the unit");
theForm.length.focus();
return false;
}
if (theForm.name.value=="") {
alert("Please add your name");
theForm.name.focus();
return false;
}
if (theForm.tel.value=="") {
alert("Please add your telephone number");
theForm.tel.focus();
return false;
}
if (theForm.email.value=="") {
alert("Please enter your email address");
theForm.email.focus();
return false;
}
if (theForm.email.value.indexOf("@") == -1) {
alert("Please enter a valid email address (you have not entered an @ sign)");
theForm.email.focus();
return false;
}    
if (theForm.email.value.indexOf(".") == -1) {
alert("Please enter a valid email address (you have not entered a full stop anywhere)");
theForm.email.focus();
return false;
}
  if (ClickCount2 > 0)
  {   
    alert("Your enquiry is being processed. Please be patient.") ;
    return false;
  }

ClickCount2 = 1;
return true;
}


function externalLinks() { 
 if (!document.getElementsByTagName) return; 
 var anchors = document.getElementsByTagName("a"); 
 for (var i=0; i<anchors.length; i++) { 
   var anchor = anchors[i]; 
   if (anchor.getAttribute("href") && 
       anchor.getAttribute("rel") == "external") 
     anchor.target = "_blank"; 
 } 
} 
window.onload = externalLinks;




//-->
