function getCheckedValue(radioObj) {
	if(!radioObj)
		return "";
	var radioLength = radioObj.length;
	if(radioLength == undefined)
		if(radioObj.checked)
			return radioObj.value;
		else
			return "";
	for(var i = 0; i < radioLength; i++) {
		if(radioObj[i].checked) {
			return radioObj[i].value;
		}
	}
	return "";
}

function cover1_submit(){
var stilus = getCheckedValue(document.forms["form_0"].elements['stilus']);
var tipus = getCheckedValue(document.forms["form_0"].elements['tipus']);
if((stilus >= 1 && stilus <=2) && (tipus >= 1 && tipus <=2))
document.form_0.submit();
else
alert("Selecting type ans Style is mandatory. Please use the radio buttons to make a selection");
}

function cover2a_submit(){
var width = document.form_3.width.value;
var height = document.form_3.height.value; 
var depth =  document.form_3.depth.value;
if(width>0 && height>0 && depth>0)
document.form_3.submit();
else
alert("Please select the required dimensions!");
}