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

if ( browserName == "Netscape" && browserVer >= 3 ) version = "n3";
if ( browserName == "Microsoft Internet Explorer" && browserVer >= 4 ) version = "e4";

if ( version == "n3" || version == "e4" ) {
   RB_About_Off         = new Image ( 124 , 19 );
   RB_About_On          = new Image ( 124, 19 );
   RB_About_Off.src     = "images/Buttons/Hover/RB-About-Off.gif";
   RB_About_On.src	= "images/Buttons/Hover/RB-About-On.gif";

   RB_Contact_Off       = new Image ( 124 , 19 );
   RB_Contact_On        = new Image ( 124, 19 );
   RB_Contact_Off.src   = "images/Buttons/Hover/RB-Contact-Off.gif";
   RB_Contact_On.src    = "images/Buttons/Hover/RB-Contact-On.gif";

   RB_Estimate_Off      = new Image ( 124 , 19 );
   RB_Estimate_On       = new Image ( 124, 19 );
   RB_Estimate_Off.src  = "images/Buttons/Hover/RB-Estimate-Off.gif";
   RB_Estimate_On.src   = "images/Buttons/Hover/RB-Estimate-On.gif";

   RB_Home_Off          = new Image ( 124 , 19 );
   RB_Home_On           = new Image ( 124, 19 );
   RB_Home_Off.src      = "images/Buttons/Hover/RB-Home-Off.gif";
   RB_Home_On.src       = "images/Buttons/Hover/RB-Home-On.gif";

   RB_Services_Off      = new Image ( 124 , 19 );
   RB_Services_On       = new Image ( 124, 19 );
   RB_Services_Off.src  = "images/Buttons/Hover/RB-Services-Off.gif";
   RB_Services_On.src   = "images/Buttons/Hover/RB-Services-On.gif";

   RB_Plant_Off         = new Image ( 124 , 19 );
   RB_Plant_On          = new Image ( 124, 19 );
   RB_Plant_Off.src     = "images/Buttons/Hover/RB-Plant-Off.gif";
   RB_Plant_On.src      = "images/Buttons/Hover/RB-Plant-On.gif";
}

function button_on ( imgName ) {
   if (version == "n3" || version == "e4") {
      butOn = eval(imgName + "_On.src");
      document [imgName].src = butOn;
   }
}
function button_off ( imgName ) {
   if (version == "n3" || version == "e4") {
      butOff = eval(imgName + "_Off.src");
      document [imgName].src = butOff;
   }
}
function ValidateContactForm(theForm) {
   if (theForm.email_sender.value == "") {
      alert("Please enter a value for the \"email_sender\" field.");
      theForm.email_sender.focus();
      return (false);
   }
   if (theForm.email_sender.value.length < 1) {
      alert("Please enter at least 1 characters in the \"email_sender\" field.");
      theForm.email_sender.focus();
      return (false);
   }
   if (theForm.phone.value == "") {
      alert("Please enter a value for the \"phone\" field.");
      theForm.phone.focus();
      return (false);
   }
   if (theForm.phone.value.length < 1) {
      alert("Please enter at least 1 characters in the \"phone\" field.");
      theForm.phone.focus();
      return (false);
   }
   if (theForm.name_sender.value == "") {
      alert("Please enter a value for the \"name_sender\" field.");
      theForm.name_sender.focus();
      return (false);
   }
   if (theForm.name_sender.value.length < 1) {
      alert("Please enter at least 1 characters in the \"name_sender\" field.");
      theForm.name_sender.focus();
      return (false);
   }
   if (theForm.main_message.value == "") {
      alert("Please enter a value for the \"main_message\" field.");
      theForm.main_message.focus();
      return (false);
   }
   if (theForm.main_message.value.length > 512) {
      alert("Please enter at most 512 characters in the \"main_message\" field.");
      theForm.main_message.focus();
      return (false);
   }
   return (true);
}

function ValidateEstimateForm(theForm) {
  if (theForm.company_name.value == "") {
    alert("Please enter a value for the \"company_name\" field.");
    theForm.company_name.focus();
    return (false);
  }
  if (theForm.company_name.value.length < 1) {
    alert("Please enter at least 1 characters in the \"company_name\" field.");
    theForm.company_name.focus();
    return (false);
  }
  if (theForm.name.value == "") {
    alert("Please enter a value for the \"name\" field.");
    theForm.name.focus();
    return (false);
  }
  if (theForm.name.value.length < 1) {
    alert("Please enter at least 1 characters in the \"name\" field.");
    theForm.name.focus();
    return (false);
  }
  if (theForm.email_address.value == "") {
    alert("Please enter a value for the \"email_address\" field.");
    theForm.email_address.focus();
    return (false);
  }
  if (theForm.email_address.value.length < 1) {
    alert("Please enter at least 1 characters in the \"email_address\" field.");
    theForm.email_address.focus();
    return (false);
  }
  if (theForm.phone.value == "") {
    alert("Please enter a value for the \"phone\" field.");
    theForm.phone.focus();
    return (false);
  }
  if (theForm.phone.value.length < 1) {
    alert("Please enter at least 1 characters in the \"phone\" field.");
    theForm.phone.focus();
    return (false);
  }
  if (theForm.job_title.value == "") {
    alert("Please enter a value for the \"job_title\" field.");
    theForm.job_title.focus();
    return (false);
  }
  if (theForm.job_title.value.length < 1) {
    alert("Please enter at least 1 characters in the \"job_title\" field.");
    theForm.job_title.focus();
    return (false);
  }
  if (theForm.quantity.value == "") {
    alert("Please enter a value for the \"quantity\" field.");
    theForm.quantity.focus();
    return (false);
  }
  if (theForm.quantity.value.length < 1) {
    alert("Please enter at least 1 characters in the \"quantity\" field.");
    theForm.quantity.focus();
    return (false);
  }
  if (theForm.size_finished.value == "") {
    alert("Please enter a value for the \"size_finished\" field.");
    theForm.size_finished.focus();
    return (false);
  }
  if (theForm.size_finished.value.length < 1) {
    alert("Please enter at least 1 characters in the \"size_finished\" field.");
    theForm.size_finished.focus();
    return (false);
  }
  if (theForm.number_of_pages.value == "") {
    alert("Please enter a value for the \"number_of_pages\" field.");
    theForm.number_of_pages.focus();
    return (false);
  }
  if (theForm.number_of_pages.value.length < 1) {
    alert("Please enter at least 1 characters in the \"number_of_pages\" field.");
    theForm.number_of_pages.focus();
    return (false);
  }
  return (true);
}