<!--
<!-- Buttons preload and hover effects -->

var browserName = navigator.appName;
var browserVer = parseInt ( navigator.appVersion );
var version;

if ( browserName == "Netscape" && browserVer <= 2 ) version = "n2";
if ( browserName == "Microsoft Internet Explorer" && browserVer <= 3 ) version = "e3";

if ( version == "n2" || version == "e3" )
{ 
    }
    else {

 About_Off              = new Image ( 115 , 35 );
 About_On               = new Image ( 115, 35 );
 About_Off.src          = "images/Buttons/Hover/About-Off.gif";
 About_On.src           = "images/Buttons/Hover/About-On.gif";

 Contact_Off            = new Image ( 115 , 35 );
 Contact_On             = new Image ( 115, 35 );
 Contact_Off.src        = "images/Buttons/Hover/Contact-Off.gif";
 Contact_On.src         = "images/Buttons/Hover/Contact-On.gif";

 Frames_A_Off           = new Image ( 115 , 35 );
 Frames_A_On            = new Image ( 115, 35 );
 Frames_A_Off.src       = "images/Buttons/Hover/Frames-A-Off.gif";
 Frames_A_On.src        = "images/Buttons/Hover/Frames-A-On.gif";

 Home_Off               = new Image ( 115 , 35 );
 Home_On                = new Image ( 115, 35 );
 Home_Off.src           = "images/Buttons/Hover/Home-Off.gif";
 Home_On.src            = "images/Buttons/Hover/Home-On.gif";

 Frames_B_Off           = new Image ( 115 , 35 );
 Frames_B_On            = new Image ( 115, 35 );
 Frames_B_Off.src       = "images/Buttons/Hover/Frames-B-Off.gif";
 Frames_B_On.src        = "images/Buttons/Hover/Frames-B-On.gif";

 Frames_C_Off           = new Image ( 115 , 35 );
 Frames_C_On            = new Image ( 115, 35 );
 Frames_C_Off.src       = "images/Buttons/Hover/Frames-C-Off.gif";
 Frames_C_On.src        = "images/Buttons/Hover/Frames-C-On.gif";

 Frames_D_Off           = new Image ( 115 , 35 );
 Frames_D_On            = new Image ( 115, 35 );
 Frames_D_Off.src       = "images/Buttons/Hover/Frames-D-Off.gif";
 Frames_D_On.src        = "images/Buttons/Hover/Frames-D-On.gif";

 Frames_EF_Off          = new Image ( 115 , 35 );
 Frames_EF_On           = new Image ( 115, 35 );
 Frames_EF_Off.src      = "images/Buttons/Hover/Frames-EF-Off.gif";
 Frames_EF_On.src       = "images/Buttons/Hover/Frames-EF-On.gif";

 Frames_Clip_Off        = new Image ( 115 , 35 );
 Frames_Clip_On         = new Image ( 115, 35 );
 Frames_Clip_Off.src    = "images/Buttons/Hover/Frames-Clip-Off.gif";
 Frames_Clip_On.src     = "images/Buttons/Hover/Frames-Clip-On.gif";

 Mounts_Off             = new Image ( 115 , 35 );
 Mounts_On              = new Image ( 115, 35 );
 Mounts_Off.src         = "images/Buttons/Hover/Mounts-Off.gif";
 Mounts_On.src          = "images/Buttons/Hover/Mounts-On.gif";

 Multi_Aperture_Off     = new Image ( 115 , 35 );
 Multi_Aperture_On      = new Image ( 115, 35 );
 Multi_Aperture_Off.src = "images/Buttons/Hover/Multi-Aperture-Off.gif";
 Multi_Aperture_On.src  = "images/Buttons/Hover/Multi-Aperture-On.gif";

 Retail_Off             = new Image ( 115 , 35 );
 Retail_On              = new Image ( 115, 35 );
 Retail_Off.src         = "images/Buttons/Hover/Retail-Off.gif";
 Retail_On.src          = "images/Buttons/Hover/Retail-On.gif";

 Order_Off = new Image ( 115 , 35 );
 Order_On = new Image ( 115, 35 );
 Order_Off.src = "images/Buttons/Hover/Order-Off.gif";
 Order_On.src = "images/Buttons/Hover/Order-On.gif";

}
function button_on ( imgName )
{
 if (version == "n2" || version == "e3")
 {
    } else {
  butOn = eval(imgName + "_On.src");
  document [imgName].src = butOn;
 }
}
function button_off ( imgName )
{
 if (version == "n2" || version == "e3")
 {
    } else {
  butOff = eval(imgName + "_Off.src");
  document [imgName].src = butOff;
 }
}

<!-- If Javascript enabled - change URL of order form to use SMART form -->
function script_enabled ( URLName ) {
   URLName = URLName + ".shtml";
   window.open(URLName,"_self");
}

function check_mand (tobj)
{
   //
   // Check Mandatory Fields - starting with Contact Name
   //
   var sender_email     = document.contactform.sender_email.value;
   sender_email         = sender_email.replace(/^\s*(.*)/, "$1");
   sender_email         = sender_email.replace(/(.*?)\s*$/, "$1");
   if (sender_email == "") {
      alert('Please enter your e-mail address');
      document.contactform.sender_email.focus();
      return false;
   }
   //
   // Check e-mail format is correct (someone@somewhere.something)
   //
   var sender_email    = document.contactform.sender_email.value
   sender_email        = sender_email.replace(/^\s*(.*)/, "$1");
   sender_email        = sender_email.replace(/(.*?)\s*$/, "$1");
   //
   if (sender_email != "") {
      var emailStr = new String(sender_email);
      var emindex  = emailStr.indexOf("@");
      //
      if (emindex > 0) {
          var pindex = emailStr.indexOf(".",emindex);
          if ((pindex > emindex+1) && (emailStr.length > pindex+1)) {
               //return true;
          } else {
               alert("Please specify a valid e-mail address (yourname@yourdomain.com)");
               document.contactform.sender_email.focus();
               return false;
          }
      } else {
          alert("Please specify a valid e-mail address (yourname@yourdomain.com)");
          document.contactform.sender_email.focus();
          return false;
      }
   }
   //
   // ...continue with other mandatory field validations.
   //
   var sender_name      = document.contactform.sender_name.value;
   sender_name          = sender_name.replace(/^\s*(.*)/, "$1");
   sender_name          = sender_name.replace(/(.*?)\s*$/, "$1");
   if (sender_name     == "") {
      alert('Please enter your full contact name');
      document.contactform.sender_name.focus();
      return false;
   }
   var area_code_phone = document.contactform.area_code_phone.value;
   area_code_phone          = area_code_phone.replace(/^\s*(.*)/, "$1");
   area_code_phone          = area_code_phone.replace(/(.*?)\s*$/, "$1");
   if (area_code_phone     == "") {
      alert('Please enter your telephone area code.');
      document.contactform.area_code_phone.focus();
      return false;
   }
   var phone            = document.contactform.phone.value;
   phone                = phone.replace(/^\s*(.*)/, "$1");
   phone                = phone.replace(/(.*?)\s*$/, "$1");
   if (phone == "") {
      alert('Please enter your telephone number (including area code)');
      document.contactform.phone.focus();
      return false;
   }
   var main_message            = document.contactform.main_message.value;
   main_message                = main_message.replace(/^\s*(.*)/, "$1");
   main_message                = main_message.replace(/(.*?)\s*$/, "$1");
   if (main_message == "") {
      alert('Please enter your message text');
      document.contactform.main_message.focus();
      return false;
   }
   //
   // Validation complete
   //
   return true;
   //
}
function validate_all (tobj)
{
   //
   // Force all mandatory field validation (and other box checks) - from submit button.
   //
   var cm_status = check_mand('ALL');
   if ( (cm_status != true) ) {
      return false;
   }
   return true;
}
// -->
//-->
