
/*  This script works with the xhtml tag "target=rel" in a link tag to open a new broswer window. This script is used because the previous method of using "target=blank" has been depricated in XHTML Strict documents. */

<script type="text/javascript">
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;
  </script>
  
  

 <script type="text/javascript">  /* Script for the Contact Us email form */  
  function isEmail(string) {
   if (!string) return false;
   var iChars = "*|,\":<>[]{}`\;()&$#%";
   for (var i = 0; i < string.length; i++) {
      if (iChars.indexOf(string.charAt(i)) != -1)
         return false
   
   var at = "@";
   if ( string.indexOf(at) == -1 ) {
                return false;
        }
   return true;
  }
  function checkform (form)
  {
        if (form.firstName.value == "") {

        alert( "Please enter your first name.");

        form.firstName.focus();

        return false;
        }

        if (form.lastName.value == "") {

        alert( "Please enter your last name.");

        form.lastName.focus();

        return false;

        }
                if (form.telephone.value == "") {
        alert( "Please enter your telephone number plus area code.");
        form.lastName.focus();
        return false;
        }
                if (form.company.value == "") {

        alert( "Please enter your company name.");

        form.lastName.focus();

        return false;

        }

        if (form.email.value == "") {

        alert( "Please enter your email.");

        form.email.focus();

        return false;

        }
        if (isEmail(form.email.value) != true ) {

        alert( "Please enter a valid email address.");

        form.email.focus();

        return false;

        }
        return true;
  }
  </script>


