/*
   Function which checks that a variant has been selected for at required variant type
*/
function check_selection_variant(iVariantType, sVariantTypeName) {
	oVariantType = eval("document.item_info.variant_type_" + iVariantType);
	if (oVariantType.selectedIndex == 0) {
		alert("Der skal vælges en værdi i feltet '"+sVariantTypeName+"'");
		oVariantType.focus();
		return false;
		}
	return true;
	}





/*
   Function which checks that an accessory has been selected for at required accessory type
*/
function check_selection_accessory(iAccessoryType, sAccessoryTypeName) {
	oAccessoryType = eval("document.item_info.accessory_type_" + iAccessoryType);
	if (oAccessoryType.selectedIndex == 0) {
		alert("Der skal vælges en værdi i feltet '"+sAccessoryTypeName+"'");
		oAccessoryType.focus();
		return false;
		}
	return true;
	}





/*
   Function which checks that a required input field has been filled
*/
function check_input(iCustomInput, sCustomInputName) {
	oCustomInput = eval("document.item_info.custom_input_" + iCustomInput);
	if (oCustomInput.value == "") {
		alert("Der skal indtastes en værdi i feltet '"+sCustomInputName+"'");
		oCustomInput.focus();
		return false;
		}
	return true;
	}





/*
   Function which checks that the quantity is valid
*/
function check_quantity() {
	oQuantity = eval("document.item_info.quantity");
	iQuantity = parseInt(oQuantity.value);
	if (iQuantity >= 1) {
		} else {
		alert("Antallet af varer skal være 1 eller større.");
		oQuantity.focus();
		return false;
		}
	return true;
	}
