var confirmMsg  = 'Please select a bench size and enter a proper quantity if your quote should include benches.';
	var subwindow;

function checkBenches(theForm)
{
	if(theForm.metal_benches_quote != undefined && theForm.metal_benches_quote[0].checked != true) {
		if (theForm.metal_benches_quantity.value == "") {
		    alert (confirmMsg) ;
		    theForm.metal_benches_quantity.focus() ;
		    return false ;
   		}

   		var chkZ = 1;
		for (i = 0; i < theForm.metal_benches_quantity.value.length; ++i)
			if (theForm.metal_benches_quantity.value.charAt(i) < "0" || theForm.metal_benches_quantity.value.charAt(i) > "9")
				chkZ = -1;
		if (chkZ == -1) {
			alert (confirmMsg) ;
			theForm.metal_benches_quantity.focus() ;
			return false ;
		}

   		if (theForm.metal_benches_size.value == "") {
		      alert (confirmMsg) ;
		      theForm.metal_benches_size.focus() ;
		      return false ;
   		}
	}

	if(theForm.plastic_benches_quote != undefined && theForm.plastic_benches_quote[0].checked != true) {
		if (theForm.plastic_benches_quantity.value == "") {
		    alert (confirmMsg) ;
		    theForm.plastic_benches_quantity.focus() ;
		    return false ;
   		}

   		var chkZ = 1;
		for (i = 0; i < theForm.plastic_benches_quantity.value.length; ++i)
			if (theForm.plastic_benches_quantity.value.charAt(i) < "0" || theForm.plastic_benches_quantity.value.charAt(i) > "9")
				chkZ = -1;
		if (chkZ == -1) {
			alert (confirmMsg) ;
			theForm.plastic_benches_quantity.focus() ;
			return false ;
		}

   		if (theForm.plastic_benches_size.value == "") {
		      alert (confirmMsg) ;
		      theForm.plastic_benches_size.focus() ;
		      return false ;
   		}
	}
}