function Label1(){
if (document.form1.Label[5].checked == true){
	
lable11.innerHTML = "<table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td width='38%'> <div align='center'>Label Background Color</div></td><td width='62%'><input name='label_bg_color' type='text' id='label_bg_color' size='35'></td></tr><tr><td><div align='center'>Text Color </div></td><td><input name='label_color' type='text' id='label_color' size='35'></td></tr><tr><td><div align='center'>Label Wording </div></td><td><input name='special_wording' type='text' id='special_wording' size='45'></td></tr></table>"
}

else 
{
lable11.innerHTML = ""
}
}

function kick_recess(){
if (document.form1.cabinet_type[3].checked == true){	
kick_recess1.innerHTML = "<table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td width='18%'><div align='center'><strong>Kick Recess:</strong></div></td><td width='28%'><div align='center'><input name='kickrecess' type='radio' value='Standard'>Standard (3 1/4&quot;H x 4&quot;D)</div></td><td width='28%'><div align='center'><input name='kickrecess' type='radio' value='Special'>Special (H&quot;xD&quot;)<input name='Kick_Recess_special' type='text' id='Kick_Recess_special' size='8'> &nbsp; </div></td><td width='26%'><div align='center'></div></td></tr><tr><td colspan='4'><table width='532' border='1' align='center' cellpadding='0' cellspacing='0'><col width='131' span='2'><tr height='18'><td height='18' colspan='2' class='style64'><div align='center'>Kick Recess Restrictions</div></td></tr><tr ><td width='235' height='18'><div align='center'>Max H = 36&quot;</div></td><td width='295'><div align='center'>Min D = 22&quot;</div></td></tr><tr ><td colspan='2' rowspan='2' height='34'><div align='center'>*Cabinet    dimensions are restricted to prevent tipping of cabinet during use</div></td></tr><tr height='17'> </tr></table></td></tr></table>"
}
else
kick_recess1.innerHTML = ""
}
function vents1(){
if (document.form1.cabinet_type[4].checked == true){	
vents.innerHTML = "<table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td width='14%'><div align='center'><span class='style106'>*</span><strong>Vents:</strong></div></td><td width='32%'><div align='center'><input name='vents' type='radio' value='Standard Back Vents'>Standard Back Vents</div></td><td width='25%'><div align='center'><input name='vents' type='radio' value='Standard Side Vents'>Standard Side Vents </div></td><td width='29%'><div align='center'><input name='vents' type='radio' value='Custom Vents'>Custom Vents</div></td></tr><tr><td colspan='4'><div align='center'><table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td><div align='center'><strong>Custom Vents: </strong></div></td><td><textarea name='custom_vent' cols='38' rows='4' id='custom_vent'></textarea></td></tr></table></div></td></tr></table>"
}
else
vents.innerHTML = ""
}

function casters1(){
if (document.form1.Extra_Features[0].checked == true){	
casters.innerHTML = "<table width='508' border='1' align='center' cellpadding='0' cellspacing='0'><col width='131' span='2'><tr height='18'><td height='18' colspan='2' class='style64'><div align='center'>Welded Caster Restrictions</div></td></tr><tr height='18'><td width='210' height='18'>Max H = 36&quot;</td><td width='278'>Min D = 24&quot;</td></tr><tr height='17'><td colspan='2' rowspan='2' height='34'>*Cabinet    dimensions are restricted to prevent tipping of cabinet during use</td></tr><tr height='17'> </tr><tr height='17'><td colspan='2' rowspan='2' height='34'>*Welded    Casters should not be used on cabinet with kick recess to avoid tipping</td></tr><tr height='17'> </tr></table>"
}
else
casters.innerHTML = ""
}

function chk_color(){
if (document.form1.Color[8].checked == true){
	document.form1.other_color.disabled=false
c_color.innerHTML = "<table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td width='33%'><strong>If custom color, will customer send the paint?</strong></td><td width='67%'><div align='left'><input name='specialcolor' type='radio' value='customer will send the paint'>Yes &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br><input name='specialcolor' type='radio' value='SECURALL® to supply paint, Customer will provide paint chip with P.O.'> &nbsp; No (SECURALL<sup><span lang='en-us'><sup>&reg;</sup></span></sup> to supply paint, Customer must provide paint chip with P.O.)</div></td></tr></table>"
}

else 
{
c_color.innerHTML = ""
document.form1.other_color.value = "" 
document.form1.other_color.disabled=true
}
}


function chk(){
if (document.form1.quantity_cabinets.value ==""){
alert("Please Enter the quantity for the cabinets")
document.form1.quantity_cabinets.focus();
return false;
}

if (document.form1.height.value =="H" || document.form1.height.value ==""){
alert("Please Enter the dimension")
document.form1.height.select();
document.form1.height.focus();
return false;
}
if (document.form1.width.value =="W" || document.form1.width.value =="" ){
alert("Please Enter the dimension")
document.form1.width.select();
document.form1.width.focus();
return false;
}
if (document.form1.depth.value =="D" || document.form1.depth.value ==""){
alert("Please Enter the dimension")
document.form1.depth.select();
document.form1.depth.focus();
return false;
}
if (document.form1.cabinet_construction.value == ""){
alert("Please select the Construction type")
document.form1.cabinet_construction.focus();
return false;
}
if (document.form1.cabinets_type[0].checked == false && document.form1.cabinets_type[1].checked == false && document.form1.cabinets_type[2].checked == false && document.form1.cabinets_type[3].checked == false && document.form1.cabinets_type[4].checked == false && document.form1.cabinets_type[5].checked == false && document.form1.cabinets_type[6].checked == false && document.form1.cabinets_type[7].checked == false && document.form1.cabinets_type[8].checked == false){
alert("Please select the Cabinet type")
document.form1.cabinets_type[0].focus();
return false;
}
if (document.form1.cabinets_type[8].checked == true && document.form1.to_store.value == ""){
alert("Please Provide details about the storage")
document.form1.to_store.focus();
return false;
}
if (document.form1.cabinet_construction.value != "Type 304 Stainless Steel" && document.form1.cabinet_construction.value != "Type 316 Stainless Steel") {
if (document.form1.Color[0].checked == false && document.form1.Color[1].checked == false && document.form1.Color[2].checked == false && document.form1.Color[3].checked == false && document.form1.Color[4].checked == false && document.form1.Color[5].checked == false && document.form1.Color[6].checked == false && document.form1.Color[7].checked == false && document.form1.Color[8].checked == false){
alert("Please Select the color of the cabinet")
document.form1.Color[0].focus();
return false;
} }
if (document.form1.Color[8].checked == true && document.form1.other_color.value == ""){
alert("Please Enter the Custome Color")
document.form1.other_color.focus();
return false;
}


if (document.form1.Color[8].checked == true && (document.form1.specialcolor[0].checked == false && document.form1.specialcolor[1].checked== false)){

alert("Would you supply the Color?")
document.form1.specialcolor[0].focus
return (false);
}

if (document.form1.cabinet_construction.value == "Type 304 Stainless Steel" || document.form1.cabinet_construction.value == "Type 316 Stainless Steel") {
	document.form1.Color[0].checked = false; 
	document.form1.Color[1].checked = false ; document.form1.Color[2].checked = false; document.form1.Color[3].checked = false ; document.form1.Color[4].checked = false ; document.form1.Color[5].checked = false ; document.form1.Color[6].checked = false ; document.form1.Color[7].checked = false ; document.form1.Color[8].checked = false
}

if (document.form1.door_style[0].checked == false && document.form1.door_style[1].checked == false && document.form1.door_style[2].checked == false ){
alert("Please select the door style")
document.form1.door_style[0].focus();
return false;
}



if (document.form1.quantity_shelf.value ==""){
alert("Please Enter the quantity for the shelves or Enter 0")
document.form1.quantity_shelf.focus();
return false;
}
if (isNaN(document.form1.quantity_shelf.value)){
alert("Please Enter the valid quantity or write 0 for null")
document.form1.quantity_shelf.select();
return false;
}


if (document.form1.quantity_shelf.value > 0 && document.form1.shelf_type.value == "" ){
alert("Please select the self type")
document.form1.shelf_type.focus();
return false;
}
if (document.form1.quantity_polyliners.value ==""){
alert("Please Enter the quantity for poly liners or Enter 0")
document.form1.quantity_polyliners.focus();
return false;
}
if (isNaN(document.form1.quantity_polyliners.value)){
alert("Please Enter the valid quantity or write 0 for null")
document.form1.quantity_polyliners.select();
return false;
}

if (document.form1.Label[0].checked == false && document.form1.Label[1].checked == false && document.form1.Label[2].checked == false && document.form1.Label[3].checked == false && document.form1.Label[4].checked == false && document.form1.Label[5].checked == false){
alert("Please select the Label style")
document.form1.Label[0].focus();
return false;
}
if (document.form1.Label[5].checked == true && document.form1.label_bg_color.value == "" ){
	alert("Please Enter the Label Backgorund Color")
document.form1.label_bg_color.select();
return false;
}
if (document.form1.Label[5].checked == true && document.form1.label_color.value == "" ){
	alert("Please Enter the Text Color")
document.form1.label_color.select();
return false;
}
if (document.form1.Label[5].checked == true && document.form1.special_wording.value == "" ){
	alert("Please Enter the Label Wording")
document.form1.special_wording.select();
return false;
}

if (document.form1.cabinet_type[3].checked == true) {
	if ( document.form1.kickrecess[0].checked == false && document.form1.kickrecess[1].checked == false){	
alert("Please select the Kick Recess Type")
document.form1.kickrecess[0].focus();
return false;
}
if (document.form1.kickrecess[1].checked == true && document.form1.Kick_Recess_special.value == ""){	
alert("Please Enter the Dimension")
document.form1.Kick_Recess_special.focus();
return false;
}
}

if (document.form1.cabinet_type[4].checked == true ) {
if (document.form1.vents[0].checked == false && document.form1.vents[1].checked == false && document.form1.vents[2].checked == false){	
alert("Please select the vent style")
document.form1.vents[0].focus();
return false;
}
if (document.form1.vents[2].checked == true && document.form1.custom_vent.value == ""){	
alert("Please Enter the Vent Location")
document.form1.custom_vent.focus();
return false;
}
}


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;
}

   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.freight_cost.checked == true){

if (document.form1.destinationaddress.value ==""){
alert("Please Enter your Destination Address")
document.form1.destinationaddress.focus();
return false;
}
if (document.form1.destination_city.value ==""){
alert("Please Enter your City")
document.form1.destination_city.focus();
return false;
}
if (document.form1.destination_state.value ==""){
alert("Please Enter your State")
document.form1.destination_state.focus();
return false;
}
var zipValue =document.form1.destination_zip.value  
if (zipValue == ""){
  alert("Please Enter Zip code")
  document.form1.destination_zip.focus()
  return false
  }
else
   {
   if (isNaN(zipValue)){
     alert("Please Enter a valid Zip Number")
     document.form1.destination_zip.focus()
     document.form1.destination_zip.select()
     return false
      }
   }
   
   if (document.form1.destination_country.value ==""){
alert("Please Enter your country")
document.form1.destination_country.focus();
return false;
}
}
if (document.form1.distributor[0].checked == false && document.form1.distributor[1].checked == false ){
alert("Please select if you are a Distributor of SECURALL® Products ??")
document.form1.distributor[0].focus();
return false;
}
if (document.form1.features.value ==""){
quess = confirm("You are about to send this information without any comments??","yes","no")
if (quess == false){
document.form1.features.focus();
return false;
}
}
document.form1.submit();
}

