// JavaScript Document
function submit_frm(){
document.form1.action = "sub_quote-test2.asp"
	return chk(this);
}
function add_door(){
document.form1.action = "sub_quote-test1.asp"
	return chk(this);
}
function chk(){
	
  
	if (document.form1.company.value ==""){
alert("Please Enter the Company Name")
document.form1.company.focus();
return false;
}
	if (document.form1.contact.value =="" || document.form1.contact.value =="First Name"){
alert("Please Enter the First Name")
document.form1.contact.focus();
document.form1.contact.select();
return false;
}
if (document.form1.lname.value =="" || document.form1.lname.value =="Last Name"){
alert("Please Enter the Last Name")
document.form1.lname.focus();
document.form1.lname.select();
return false;
}
if (document.form1.name.value ==""){
alert("Please Enter you Name")
document.form1.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 (document.form1.bill_country.value == 'USA'){
   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
        }
     }   

var shadd1Value= document.form1.shadd.value
  if (shadd1Value == ""){
      alert("Please Enter address1 in shipping information")
      document.form1.shadd.focus()
      return false
   }
var shcityValue = document.form1.shcity.value   
   if (shcityValue == ""){
     alert("Please Enter City in shipping information")
     document.form1.shcity.focus()
     return false
    }
	   if (document.form1.shstate.value == ""){
      alert("Please Enter State in shipping information")
      document.form1.shstate.focus()
      return false
   }  
var shzipValue =document.form1.shzip.value    
   if (shzipValue == ""){
      alert("Please Enter Zip in shipping information")
      document.form1.shzip.focus()
      return false
     } 
if (document.form1.doortype.value == ""){
  alert("Please select the door type")
  document.form1.doortype.focus()
  return false
  }
 if (document.form1.firerating.value == ""){
  alert("Please select the fire rating")
  document.form1.firerating.focus()
  return false
  }
if (document.form1.door_type.value == ""){
  alert("Please select the door type")
  document.form1.door_type.focus()
  return false
  }
	var phone = document.form1.ITEM1_Width.value  
if (phone == ""){
  alert("Please select the door width")
  document.form1.ITEM1_Width.focus()
  return false
  }	
  
  if (phone == "Custom Width In Inch"){
	  if(document.form1.custom_w.value == "" )
  {
	  alert("Please enter the door width")
	  document.form1.custom_w.focus()
  return false
  }
  else if( document.form1.custom_w.value.indexOf('"') > 0){
	  new_str = document.form1.custom_w.value
	 new_str = new_str.replace(/"/g,"")
	document.form1.custom_w.value = new_str
	return false
  }
 if (document.form1.door_type.value == "Single Door"  && document.form1.custom_w.value > 48 && (document.form1.firerating.value == "1-1/2 Hour" || document.form1.firerating.value == "45 Min")){
alert("Door width can't be more than 48 Inch. for the 45 min. or 1-1/2 Hr. fire rated single door")
document.form1.custom_w.select();
document.form1.custom_w.focus();
return false;
}
if (document.form1.door_type.value == "Single Door" && document.form1.firerating.value == "3 Hour" && document.form1.custom_w.value > 42){
alert("Door width can't be more than 42 Inch. for the 3 Hr. fire rated single door")
document.form1.custom_w.select();
document.form1.custom_w.focus();
return false;
}
 if (document.form1.door_type.value == "Double Door" && document.form1.custom_w.value > 84 && (document.form1.firerating.value == "1-1/2 Hour" || document.form1.firerating.value == "45 Min" || document.form1.firerating.value == "3 Hour")){
alert("Width can't be more than 84 Inch. for the fire rated double door")
document.form1.custom_w.select();
document.form1.custom_w.focus();
return false;
}
  }
  
  if (document.form1.height.value == ""){
  alert("Please select the door height")
  document.form1.height.focus()
  return false
  }	
   

  if (document.form1.height.value == "Custom Height In Inch"){
	  if(document.form1.custom_h.value == "" ){
  alert("Please enter the door height")
  document.form1.custom_h.focus()
  return false
  }	
  else if (document.form1.custom_h.value.indexOf('"') > 0  ){
     str_frm = document.form1.custom_h.value
		str_frm = str_frm.replace(/"/g,"")
	document.form1.custom_h.value = str_frm
	return false
   }
   
   if (document.form1.firerating.value == "3 Hour" && document.form1.custom_h.value > 84 ){
alert("Door Height can't be more than 84 Inch. for the 3 Hr. fire rated door")
document.form1.custom_h.select();
document.form1.custom_h.focus();
return false;
}
if (document.form1.custom_h.value > 96 && (document.form1.firerating.value == "1-1/2 Hour" || document.form1.firerating.value == "45 Min")){
alert("Door height can't be more than 96 Inch. for the fire rated door")
document.form1.custom_h.select();
document.form1.custom_h.focus();
return false;
}

  }
  
  if (document.form1.wall_costruction.value == ""){
  alert("Please select the wall costruction type")
  document.form1.wall_costruction.focus()
  return false
  }	
   if (document.form1.fram_type.value == ""){
  alert("Please select the frame type")
  document.form1.fram_type.focus()
  return false
  }		
  if (document.form1.frame_size.value == "" && document.form1.fram_type.value != "None"){
  alert("Please select the frame size")
  document.form1.frame_size.focus()
  return false
  }	
   
  else if (document.form1.frame_size.value == "Custom Jamb Depth In Inch" && document.form1.frame_size_c.value == ""){
  alert("Please Enter the frame size")
  document.form1.frame_size_c.focus()
  return false
  }	
  
  if (document.form1.acchor.value == "" && document.form1.fram_type.value != "None"){
  alert("Please select the anchor type")
  document.form1.acchor.focus()
  return false
  }	
 
  if (document.form1.hinge.value == ""){
  alert("Please select the hinge type")
  document.form1.hinge.focus()
  return false
  }	
  else if (document.form1.hinge.value == "Other" && document.form1.hinge_c.value == ""){
  alert("Please enter the hinge type required")
  document.form1.hinge_c.focus()
  return false
  }	
  
   if (document.form1.hardware.value == ""){
  alert("Please select the hardware type")
  document.form1.hardware.focus()
  return false
  }	
    if (document.form1.lockset.value == ""){
  alert("Please select the lockset type")
  document.form1.lockset.focus()
  return false
  }
  else if (document.form1.lockset.value == "Other" && document.form1.lockset_c.value == ""){
  alert("Please enter the lockset type")
  document.form1.lockset_c.focus()
  return false
  }
   if (document.form1.trim_handle.value == "" && (document.form1.lockset.value =="Panic Bar Exit Device-Rim (Brushed Chrome Finish)" || document.form1.lockset.value =="Panic Bar Exit Device-Rim (Aluminum Painted Finish)" || document.form1.lockset.value =="Panic Bar Exit Device-Surface- Vertical Rod (Brushed Chrome Finish)" || document.form1.lockset.value =="Panic Bar Exit Device-Surface- Vertical Rod (Aluminum Painted Finish)" || document.form1.lockset.value =="Panic Bar Exit Device- Concealed Vertical Rod (Stainless Steel Finish)" || document.form1.lockset.value =="Panic Bar Exit Device-Surface- Vertical Rod (Aluminum Painted Finish)")){
  alert("Please select the trim handle type")
  document.form1.trim_handle.focus()
  return false
  }	
  
     if (document.form1.deadbolt.value == "" && (document.form1.lockset.value =="Knob Style- Entry Function with Keyed Lock (Stainless Steel Finish)" || document.form1.lockset.value =="Knob Style- Passage Function with No Lock (Stainless Steel Finish)" || document.form1.lockset.value =="Lever Style- Entry Function with Keyed Lock (Brushed Chrome Finish)" || document.form1.lockset.value =="Lever Style- Passage with No Lock (Brushed Chrome Finish)" || document.form1.lockset.value =="Mortise Lock-Lever Entry Function with a Deadbolt (Brushed Chrome Finish)" || document.form1.lockset.value =="Push and Pull Plates (Brushed Chrome Finish)")){
  alert("Please select the deadbolt type")
  document.form1.deadbolt.focus()
  return false
  }	
  
  if (document.form1.trim_handle.value == "Other" && document.form1.trim_handle_c.value == ""){
  alert("Please enter the custom trim handle type")
  document.form1.trim_handle_c.focus()
  return false
  }	
     if (document.form1.color.value == ""){
  alert("Please select the color")
  document.form1.color.focus()
  return false
  }	
  else if (document.form1.color.value == "Custom Color" && document.form1.color_c.value == ""){
  alert("Please enter the custom color")
  document.form1.color_c.focus()
  return false
  }	
  
   if (document.form1.handing.value == ""){
  alert("Please select the handing")
  document.form1.handing.focus()
  return false
  }	
     if (document.form1.window3.value == ""){
  alert("Please select the window size")
  document.form1.window3.focus()
  return false
  }	
  if (document.form1.window3.value == "Custom Size" && document.form1.window_c.value == ""){
  alert("Please enter the window size")
  document.form1.window_c.focus()
  return false
  }	

     if (document.form1.glass.value == "" && document.form1.window3.value != "None" ){
  alert("Please select the window frame type")
  document.form1.glass.focus()
  return false
  }	
     if (document.form1.louver.value == ""){
  alert("Please select the louver type")
  document.form1.louver.focus()
  return false
  }	
     if (document.form1.door_closer.value == "" && document.form1.hinge.value != "4-1/2 x 4-1/2 Hinge Spring Loaded Self Closing (Primed Finish)"){
  alert("Please select the door closer type")
  document.form1.door_closer.focus()
  return false
  }	
  
  if (document.form1.kick.value == ""){
  alert("Please select the kick plate type")
  document.form1.kick.focus()
  return false
  }	
 else if (document.form1.kick.value == "Other" && document.form1.kick_c.value == ""){
  alert("Please enter the kick plate type required")
  document.form1.kick_c.focus()
  return false
  }	
  

  if (document.form1.preinstall_hard.value == "select"){
  alert("Please select if you want us install hardware")
  document.form1.preinstall_hard.focus()
  return false
  }	 
  if (document.form1.prepare_1.disabled == false){
  if (document.form1.prepare_1.value == ""){
  alert("Please select if you want us to prepare for the hardware")
  document.form1.prepare_1.focus()
  return false
  }	}
 
  
 	
if (document.form1.qty.value == "") {
alert("please enter the quantity")
document.form1.qty.focus()
return false
}
else if ( isNaN(document.form1.qty.value)){
alert("please enter valid quantity")
document.form1.qty.select()
document.form1.qty.focus()
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;
}
}	

if (document.form1.resale[0].checked == false && document.form1.resale[1].checked == false){
  alert("Please select if this door is for Resale")
  document.form1.resale[0].focus()
  return false
  }	

 document.form1.submit();
}
function checkdoor()
{
	//alert(document.form1.firerating.value)
	if (document.form1.door_type.value == ""){
		alert("Please Choose Door Type First!!")
     document.form1.door_type.focus();
	return false; 
	}
}
function checkfire1()
{
	//alert(document.form1.firerating.value)
	if (document.form1.firerating.value == ""){
		alert("Please Choose Fire Rating First!!")
     document.form1.firerating.focus();
	return false; 
	}
}

function width2(){
//alert ("rit")
if (document.form1.ITEM1_Width.value =="Custom Width In Inch"){
width1.innerHTML = "<input name='custom_w' type='text' class='blue'  size='20' tabindex='17'  /><span class='style43'> Inch.</span>"}
else
width1.innerHTML =""
}
function height1(){
if (document.form1.height.value =="Custom Height In Inch"){
height2.innerHTML = "<input name='custom_h' type='text' class='blue'  size='20' tabindex='18' /> <span class='style43'> Inch.</span>"
}
else{
height2.innerHTML =""
}
}




function sel_drop(){
	document.form1.firerating.selectedIndex= 0
	document.form1.door_type.selectedIndex= 0
	document.form1.ITEM1_Width.selectedIndex= 0
	document.form1.height.selectedIndex= 0
	document.form1.wall_costruction.selectedIndex= 0
	document.form1.fram_type.selectedIndex= 0
	document.form1.frame_size.selectedIndex= 0
	document.form1.acchor.selectedIndex= 0
	document.form1.hinge.selectedIndex= 0
	document.form1.hardware.selectedIndex= 0
	document.form1.lockset.selectedIndex= 0
	document.form1.trim_handle.selectedIndex= 0
	document.form1.deadbolt.selectedIndex= 0
	document.form1.color.selectedIndex= 0
	document.form1.handing.selectedIndex= 0
	document.form1.window3.selectedIndex= 0
	document.form1.glass.selectedIndex= 0
	document.form1.louver.selectedIndex= 0
	document.form1.door_closer.selectedIndex= 0
	document.form1.kick.selectedIndex= 0
	document.form1.preinstall_hard.selectedIndex= 0
	document.form1.prepare_1.selectedIndex= 0
}
function firerating_door(){

if (document.form1.door_type.value == "Single Door"){
document.form1.handing.options.length = 0
document.form1.handing.options[document.form1.handing.options.length]= new Option("Choose Handing_",""); 
document.form1.handing.options[document.form1.handing.options.length]= new Option("1 - Left Hand","LH"); 
document.form1.handing.options[document.form1.handing.options.length]= new Option("2 - Right Hand","RH");
document.form1.handing.options[document.form1.handing.options.length]= new Option("3 - Left Hand Reverse","LHR"); 
document.form1.handing.options[document.form1.handing.options.length]= new Option("4 - Right Hand Reverse","RHR");
}


if (document.form1.door_type.value == "Double Door"){
document.form1.handing.options.length = 0
document.form1.handing.options[document.form1.handing.options.length]= new Option("Choose Handing_",""); 
document.form1.handing.options[document.form1.handing.options.length]= new Option("5 - Left Hand Active","LHA"); 
document.form1.handing.options[document.form1.handing.options.length]= new Option("6 - Right Hand Active","RHA");
document.form1.handing.options[document.form1.handing.options.length]= new Option("7 - Left Hand Reverse Active","LHRA");
document.form1.handing.options[document.form1.handing.options.length]= new Option("8 - Right Hand Reverse Active","RHRA");
document.form1.handing.options[document.form1.handing.options.length]= new Option("9 - Double Hand","DH");
document.form1.handing.options[document.form1.handing.options.length]= new Option("10 - Double Hand Reverse","DHR");

}

}

function firerating1(){

if (document.form1.firerating.value == "Non Rated"){
document.form1.window3.options.length = 0
document.form1.window3.options[document.form1.window3.options.length]= new Option("Choose Window Size_",""); 
document.form1.window3.options[document.form1.window3.options.length]= new Option("10x10 Wired Glass","10x10 Wired Glass"); 
document.form1.window3.options[document.form1.window3.options.length]= new Option("10x10 Tempered Glass","10x10 Tempered Glass");
document.form1.window3.options[document.form1.window3.options.length]= new Option("4x25 Wired Glass","4x25 Wired Glass"); 
document.form1.window3.options[document.form1.window3.options.length]= new Option("4x25 Tempered Glass","4x25 Tempered Glass");
document.form1.window3.options[document.form1.window3.options.length]= new Option("22x30 Wired Glass","22x30 Wired Glass"); 
document.form1.window3.options[document.form1.window3.options.length]= new Option("22x30 Tempered Glass","22x30 Tempered Glass");
document.form1.window3.options[document.form1.window3.options.length]= new Option("22x34 Wired Glass","22x34 Wired Glass"); 
document.form1.window3.options[document.form1.window3.options.length]= new Option("22x34 Tempered Glass","22x34 Tempered Glass");
document.form1.window3.options[document.form1.window3.options.length]= new Option("20x54 Wired Glass","20x54 Wired Glass"); 
document.form1.window3.options[document.form1.window3.options.length]= new Option("20x54 Tempered Glass","20x54 Tempered Glass");
document.form1.window3.options[document.form1.window3.options.length]= new Option("Custom Size","Custom Size");
document.form1.window3.options[document.form1.window3.options.length]= new Option("None","None");


}
else if (document.form1.firerating.value == "45 Min"){
document.form1.window3.options.length = 0
document.form1.window3.options[document.form1.window3.options.length]= new Option("Choose Window Size_",""); 
document.form1.window3.options[document.form1.window3.options.length]= new Option("10x10 Wired Glass","10x10 Wired Glass"); 
document.form1.window3.options[document.form1.window3.options.length]= new Option("10x10 Ceramic Glass","10x10 Ceramic Glass");
document.form1.window3.options[document.form1.window3.options.length]= new Option("4x25 Wired Glass","4x25 Wired Glass"); 
document.form1.window3.options[document.form1.window3.options.length]= new Option("4x25 Ceramic Glass","4x25 Ceramic Glass");
document.form1.window3.options[document.form1.window3.options.length]= new Option("22x30 Wired Glass","22x30 Wired Glass"); 
document.form1.window3.options[document.form1.window3.options.length]= new Option("22x30 Ceramic Glass","22x30 Ceramic Glass");
document.form1.window3.options[document.form1.window3.options.length]= new Option("22x34 Wired Glass","22x34 Wired Glass"); 
document.form1.window3.options[document.form1.window3.options.length]= new Option("22x34 Ceramic Glass","22x34 Ceramic Glass");
document.form1.window3.options[document.form1.window3.options.length]= new Option("20x54 Wired Glass","20x54 Wired Glass"); 
document.form1.window3.options[document.form1.window3.options.length]= new Option("20x54 Ceramic Glass","20x54 Ceramic Glass");
document.form1.window3.options[document.form1.window3.options.length]= new Option("None","None");


}
else if (document.form1.firerating.value == "1-1/2 Hour"){
document.form1.window3.options.length = 0
document.form1.window3.options[document.form1.window3.options.length]= new Option("Choose Window Size_",""); 
document.form1.window3.options[document.form1.window3.options.length]= new Option("10x10 Wired Glass","10x10 Wired Glass"); 
document.form1.window3.options[document.form1.window3.options.length]= new Option("10x10 Ceramic Glass","10x10 Ceramic Glass");
document.form1.window3.options[document.form1.window3.options.length]= new Option("4x25 Wired Glass","4x25 Wired Glass"); 
document.form1.window3.options[document.form1.window3.options.length]= new Option("4x25 Ceramic  Glass","4x25 Ceramic Glass");
document.form1.window3.options[document.form1.window3.options.length]= new Option("22x30 Ceramic Glass","22x30 Ceramic Glass");
document.form1.window3.options[document.form1.window3.options.length]= new Option("22x34 Ceramic Glass","22x34 Ceramic Glass");
document.form1.window3.options[document.form1.window3.options.length]= new Option("20x54 Ceramic Glass","20x54 Ceramic Glass");
document.form1.window3.options[document.form1.window3.options.length]= new Option("None","None");


}
else if (document.form1.firerating.value == "3 Hour"){
document.form1.window3.options.length = 0
document.form1.window3.options[document.form1.window3.options.length]= new Option("Choose Window Size_",""); 
document.form1.window3.options[document.form1.window3.options.length]= new Option("10x10 Ceramic Glass","10x10 Ceramic Glass");
document.form1.window3.options[document.form1.window3.options.length]= new Option("4x25 Ceramic  Glass","4x25 Ceramic Glass");
document.form1.window3.options[document.form1.window3.options.length]= new Option("None","None");

}

if (document.form1.firerating.value == "Non Rated"){
document.form1.hinge.options.length = 0
document.form1.hinge.options[document.form1.hinge.options.length]= new Option("Choose Hinge Type_",""); 
document.form1.hinge.options[document.form1.hinge.options.length]= new Option("4-1/2 x 4-1/2 Hinge (Primed Finish) (Recommended for Non-Rated Doors)","4-1/2 x 4-1/2 Hinge (Primed Finish) (Recommended for Non-Rated Doors)"); 
document.form1.hinge.options[document.form1.hinge.options.length]= new Option("4-1/2 x 4-1/2 Hinge Ball Bearing (Primed Finish) (Required for Fire Rate Doors)","4-1/2 x 4-1/2 Hinge Ball Bearing (Primed Finish) (Required for Fire Rate Doors)");
document.form1.hinge.options[document.form1.hinge.options.length]= new Option("4-1/2 x 4-1/2 Hinge Non-Removable Pin (Primed Finish)","4-1/2 x 4-1/2 Hinge Non-Removable Pin (Primed Finish)"); 
document.form1.hinge.options[document.form1.hinge.options.length]= new Option("4-1/2 x 4-1/2 Hinge Spring Loaded Self Closing (Primed Finish)","4-1/2 x 4-1/2 Hinge Spring Loaded Self Closing (Primed Finish)");
document.form1.hinge.options[document.form1.hinge.options.length]= new Option("Continuous Hinge (Aluminum Finish)","Continuous Hinge (Aluminum Finish)"); 
document.form1.hinge.options[document.form1.hinge.options.length]= new Option("Other","Other");


}
else{
document.form1.hinge.options.length = 0
document.form1.hinge.options[document.form1.hinge.options.length]= new Option("Choose Hinge Type_",""); 
document.form1.hinge.options[document.form1.hinge.options.length]= new Option("4-1/2 x 4-1/2 Hinge Ball Bearing (Primed Finish) (Required for Fire Rate Doors)","4-1/2 x 4-1/2 Hinge Ball Bearing (Primed Finish) (Required for Fire Rate Doors)");
document.form1.hinge.options[document.form1.hinge.options.length]= new Option("4-1/2 x 4-1/2 Hinge Non-Removable Pin (Primed Finish)","4-1/2 x 4-1/2 Hinge Non-Removable Pin (Primed Finish)"); 
document.form1.hinge.options[document.form1.hinge.options.length]= new Option("4-1/2 x 4-1/2 Hinge Spring Loaded Self Closing (Primed Finish)","4-1/2 x 4-1/2 Hinge Spring Loaded Self Closing (Primed Finish)");
document.form1.hinge.options[document.form1.hinge.options.length]= new Option("Continuous Hinge (Aluminum Finish)","Continuous Hinge (Aluminum Finish)"); 
document.form1.hinge.options[document.form1.hinge.options.length]= new Option("Other","Other");




}
}
function prepare_2(){document.form1.prepare_3.value = ""}

function prepare1(){

if (document.form1.prepare_1.value == "Yes"){
		prepare2.innerHTML = "<textarea name='prepare_3' cols='25' rows='3' onClick='prepare_2();' tabindex='24'>Add Comment (If Any)</textarea>"
}
else{ prepare2.innerHTML = ""  }
}
function jambtype(){
if (document.form1.fram_type.value =="None"){
	document.form1.frame_size.selectedIndex = 0;
		document.form1.frame_size.disabled = true

document.form1.acchor.selectedIndex = 0;
		document.form1.acchor.disabled = true

}

else{
	document.form1.frame_size.disabled = false
	document.form1.acchor.disabled = false}

}
function frame_size1(){
if (document.form1.frame_size.value =="Custom Jamb Depth In Inch"){
frame_size2.innerHTML = "<input name='frame_size_c' type='text' class='blue'  size='20' tabindex='1' /> <span class='style43'> Inch.</span>"}
else
frame_size2.innerHTML =""
}
function lockset1(){
if (document.form1.lockset.value =="Other"){
lockset2.innerHTML = "<span class=style41>Custom Lockset </span><input name='lockset_c' type='text' class='blue'  size='20' tabindex='1' />"}
else
{lockset2.innerHTML =""}

if (document.form1.lockset.value =="Panic Bar Exit Device-Rim (Brushed Chrome Finish)" || document.form1.lockset.value =="Panic Bar Exit Device-Rim (Aluminum Painted Finish)" || document.form1.lockset.value =="Panic Bar Exit Device-Surface- Vertical Rod (Brushed Chrome Finish)" || document.form1.lockset.value =="Panic Bar Exit Device-Surface- Vertical Rod (Aluminum Painted Finish)" || document.form1.lockset.value =="Panic Bar Exit Device- Concealed Vertical Rod (Stainless Steel Finish)" || document.form1.lockset.value =="Panic Bar Exit Device-Surface- Vertical Rod (Aluminum Painted Finish)")
{
document.form1.trim_handle.disabled = false	
document.form1.deadbolt.selectedIndex = 0;
	document.form1.deadbolt.disabled = true
	
}
else
{
	document.form1.trim_handle.selectedIndex = 0;
	document.form1.trim_handle.disabled = true
	document.form1.deadbolt.disabled = false}
	
if (document.form1.lockset.value == "None" && document.form1.louver.value == "None" && document.form1.door_closer.value == "None" && document.form1.kick.value == "None"){
document.form1.prepare_1.disabled = false
}
else{
	document.form1.prepare_1.disabled = true
}
}
function louver1(){
	if (document.form1.lockset.value == "None" && document.form1.louver.value == "None" && document.form1.door_closer.value == "None" && document.form1.kick.value == "None"){
document.form1.prepare_1.disabled = false
}
else{
	document.form1.prepare_1.disabled = true
}
}

function door_closer1(){
	if (document.form1.lockset.value == "None" && document.form1.louver.value == "None" && document.form1.door_closer.value == "None" && document.form1.kick.value == "None"){
document.form1.prepare_1.disabled = false
}
else{
	document.form1.prepare_1.disabled = true
}
}
function window1(){
	if (document.form1.window3.value =="Custom Size"){
window2.innerHTML = "<input name='window_c' type='text' class='blue'  size='20' tabindex='1'/>"}
else{
window2.innerHTML =""
}
if (document.form1.window3.value =="None"){
	document.form1.glass.selectedIndex = 0;
	document.form1.glass.disabled = true;
}
else{
document.form1.glass.disabled = false;
}
}
function trim_handle1(){
if (document.form1.trim_handle.value =="Other"){
trim_handle2.innerHTML = "<input name='trim_handle_c' type='text' class='blue'  size='20' tabindex='1' />"}
else
trim_handle2.innerHTML =""
}
function color1(){
if (document.form1.color.value =="Custom Color"){
color2.innerHTML = "<input name='color_c' type='text' class='blue'  size='20' tabindex='1' />"}
else
color2.innerHTML =""
}
function hinge1(){
if (document.form1.hinge.value =="Other"){
hinge2.innerHTML = "<span class=style41>Custom Hinge Type </span><input name='hinge_c' type='text' class='blue'  size='30' tabindex='1' />"}
else{
hinge2.innerHTML = ""}

if (document.form1.hinge.value == "4-1/2 x 4-1/2 Hinge Spring Loaded Self Closing (Primed Finish)"){
	document.form1.door_closer.selectedIndex = 0;
		document.form1.door_closer.disabled = true}
else{document.form1.door_closer.disabled = false}
}

function kick1(){
if (document.form1.kick.value =="Other"){
kick2.innerHTML = "<input name='kick_c' type='text' class='blue'  size='20' tabindex='1' />"}
else{
kick2.innerHTML = ""}

if (document.form1.lockset.value == "None" && document.form1.louver.value == "None" && document.form1.door_closer.value == "None" && document.form1.kick.value == "None"){
document.form1.prepare_1.disabled = false
}
else{
	document.form1.prepare_1.disabled = true
}

}


function country_name(){
var selectedItem = document.form1.countryName1.selectedIndex
document.form1.sh_country.value = document.form1.countryName1[selectedItem].text
//alert(document.form1.sh_country.value)
}

function country_name1(){
var selectedItem = document.form1.countryname.selectedIndex
document.form1.bill_country.value = document.form1.countryname[selectedItem].text
//alert(document.form1.bill_country.value)

}


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


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_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 chk_same(){
if (document.form1.same.checked){
document.form1.shadd.value = document.form1.address.value
document.form1.shcity.value = document.form1.city.value
document.form1.shzip.value  = document.form1.zip.value 
document.form1.shstate.value = document.form1.state.value
var selectedItem = document.form1.countryname.selectedIndex
document.form1.sh_country.value = document.form1.countryname[selectedItem].text
document.form1.countryName1.selectedIndex = selectedItem;
}
else
{
document.form1.shadd.value = ""
document.form1.shcity.value = ""
document.form1.shzip.value  = ""
document.form1.shstate.value = ""
}
}