function CheckRequired(sElement, sType, sLastLabel) {
	var oElement = document.contactform[sElement];
	if (sLastLabel==null) {
		var oLabel   = document.getElementById(sElement + '_label').style;
	} else {
		var oLabel   = document.getElementById(sLastLabel + '_label').style;
	}
	oLabel.backgroundColor = 'transparent';
	switch (sType) {
		case 'select':
			var oValue = oElement.value;
			if (oValue == 0 || oValue == "0") {
				oElement.focus();
				oLabel.backgroundColor = '#F00';
				return false;
			}
			break;
		case 'text':
			var oValue = oElement.value;
			if (oValue.replace(/ /, "") == '') {
				oElement.focus();
				oLabel.backgroundColor = '#F00';
				return false;
			}
			break;
		case 'checkbox':
		case 'radio':
			if (oElement instanceof NodeList) {
				//one must be set
				oneIsChecked = false;
				for (i = 0; i < oElement.length; i++) {
					if (oElement[i].checked) {
						oneIsChecked = true;
					}
				}
				if (!oneIsChecked) {
					oElement[0].focus();
					oLabel.backgroundColor = '#F00';
					return false;
				}
			} else {
				if (!oElement.checked) {
					oElement.focus();
					oLabel.backgroundColor = '#F00';
					return false;
				}
			}
			break;
	}
	return true;
}

