// JavaScript Document
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
function MM_setTextOfLayer(){
rit.innerHTML = "<span class='style38'>WWW.MEDGASCABINETS.COM </span> SECURALL&reg; offers medical gas storage cabinets for safe and compliant storage of portable oxygen cylinders. These cylinder storage cabinets are ideal for hospitals and nursing homes for convenient access."
}
function div_build(){
rit.innerHTML = "<span class='style38'>WWW.SECURALLBUILDINGS.COM </span> SECURALL&reg; is the manufacturer of Chemical Storage Buildings for Hazardous Materials and Pesticide Storage.  Compliance with EPA and OSHA.  Fire rated outdoor drum storage buildings for hazmat storage."
}

function div_prod(){
rit.innerHTML = "<span class='style38'>WWW.SECURALLPRODUCTS.COM </span> SECURALL&reg; specializes in safety storage equipment such as safety cabinets, hazmat buildings, cleaning tanks, and firearm safes.  Our products safely store flammable liquids, corrosives, hazardous waste, pesticides, industrial supplies, laboratory chemicals and more.  Designed to meet OSHA, NFPA, FM, EPA and other government regulations."
}
function div_doors(){
rit.innerHTML = "<span class='style38'>WWW.SECURALLDOORS.COM SECURALL&reg;</span> Doors is a leading national provider of Heavy-Duty Reinforced Steel Doors suitable for installation in steel, masonry, and wood stud.  SECURALL&reg; Doors are a great fit for residential, commercial, and industrial applications and installations, and provide a contractor friendly and cost-effective means of reducing on-site labor on construction projects."
}
function div_null(){
rit.innerHTML = "<center><span class='style38'>Place your mouse over the site layouts to view the site description. </span><br> <br></center>"
}
function chk(){
if (document.form1.company.value ==""){
alert("Please Enter the Company Name")
document.form1.company.focus();
return false;
}
if (document.form1.first_name.value ==""){
alert("Please Enter you Name")
document.form1.first_name.focus();
return false;
}

if (document.form1.last_name.value ==""){
alert("Please Enter you Last Name")
document.form1.last_name.focus();
return false;
}

if (document.form1.address.value ==""){
alert("Please Enter your Mailing Address")
document.form1.address.focus();
return false;
}
if (document.form1.city.value ==""){
alert("Please Enter your City")
document.form1.city.focus();
return false;
}
if (document.form1.state.value ==""){
alert("Please Enter your State")
document.form1.state.focus();
return false;
}
var zipValue =document.form1.zip.value  
if (zipValue == ""){
  alert("Please Enter Zip code")
  document.form1.zip.focus()
  return false
  }
else
   {
   if (isNaN(zipValue)){
     alert("Please Enter a valid Zip Number")
     document.form1.zip.focus()
     document.form1.zip.select()
     return false
      }
   }
   
   var emailValue = document.form1.email.value

var phone =document.form1.phone.value  
if (phone == ""){
  alert("Please Enter your contact number")
  document.form1.phone.focus()
  return false
  }

if (emailValue == ""){
        alert("You Should Enter your Email-ID for future contact")
      document.form1.email.focus()
      return false
     }
 
else
    {
      var mailId =false
      for (i=0; i<emailValue.length; ++i){
             if (emailValue.substring(i,i+1) == "@"){
                                           mailId = true
                                           break
                                      } 
          }
       if (mailId==false){
          alert("Please enter a valid Email-Id ")
          document.form1.email.focus()
          document.form1.email.select()
          return false
        }
     }   



if (document.form1.comments.value ==""){
quess = confirm("You are about to send this information without any comments??","yes","no")
if (quess == false){
document.form1.comments.focus();
return false;
}

}
document.form1.submit();
}

