function checkCush( ) {

var chklength = Math.round(document.form1.length.value)
var chkwidth = Math.round(document.form1.width.value)
var chkdepth = Math.round(document.form1.depth.value)
var chkinnerwidth = Math.round(document.form1.innerwidth.value)
var chkinnerlength = Math.round(document.form1.innerlength.value)
var chkinnerfront = Math.round(document.form1.innerfront.value)
var chkfront = Math.round(document.form1.front.value)
 
if (document.form1.length.value.length <1 ) 
{alert ("Please put a value in the 'length' box") 
       return false}
if (document.form1.width.value.length <1 ) 
{alert ("Please put a value in the 'width' box") 
       return false}  
if (document.form1.depth.value.length <1 ) 
{alert ("Please put a value in the 'depth' box") 
       return false} 
if (document.form1.innerwidth.value.length <1 ) 
{alert ("Please put a value in the 'Inner Width' box") 
       return false} 
if (document.form1.innerlength.value.length <1 ) 
{alert ("Please put a value in the 'Inner Length' box") 
       return false} 
if (document.form1.innerfront.value.length <1 ) 
{alert ("Please put a value in the 'Inner Front' box") 
       return false} 
if (document.form1.front.value.length <1 ) 
{alert ("Please put a value in the 'Front' box") 
       return false} 
if (chkinnerwidth >= chkwidth) 
{alert ("the measurement 'Inner Width' must be less than 'Width'") 
       return false} 
if (chkinnerfront >= chkwidth) 
{alert ("the measurement 'Inner Front' must be less than 'Width'") 
       return false} 
if (chkfront >= chkwidth) 
{alert ("the measurement 'Front' must be less than 'Width'") 
       return false} 

if (chkinnerlength >= chklength) 
{alert ("the measurement 'Inner Length' must be less than 'length' ") 
       return false} 

document.form1.submit()
return true
}


function boxChangecush(x){
if (x==2) {
document.form1.firmness.selectedIndex=1 ;
document.form1.firmness.disabled=true
}
else {
document.form1.firmness.disabled=false
}
}


function boxChangewrap(x){
if (x>0) {
document.form1.stocking.selectedIndex=1 ;
document.form1.stocking.disabled=true
}
else {
document.form1.stocking.disabled=false ;
document.form1.stocking.selectedIndex=0
}
}
