
function emptySearch() {
    window.document.such.such.value = '';
}

function mm_start() {
    window.open("http://www.spectrumww.de/adventskalender/start.html","","width=870,height=730,status=no,location=0,menubar=0,resizable=0,scrollbars=yes");
}

function reqSubmit() {
	var reqFields = document.getElementById('Require').value.split(',');
	var sendForm = reqFields.length;
	for (x = 0; x < reqFields.length; x++) {
		if (document.getElementById(reqFields[x]).value == '') {
			document.getElementById('label_'+reqFields[x]).style.borderColor = '#ff0000';
			document.getElementById('req').style.display = 'block';
			document.getElementById('req').focus();
			var fehler = true;
		} else if(document.getElementById(reqFields[x]).type == 'radio' && document.getElementById(reqFields[x]).checked == false ) {
			document.getElementById('label_'+reqFields[x]).style.borderColor = '#ff0000';
			document.getElementById('req').style.display = 'block';
			document.getElementById('req').focus();
			var fehler = true;
		} else if(document.getElementById(reqFields[x]).type == 'select-one' && document.getElementById(reqFields[x]).selectedIndex == 0) {
			document.getElementById('label_'+reqFields[x]).style.borderColor = '#ff0000';
			document.getElementById('req').style.display = 'block';
			document.getElementById('req').focus();
			var fehler = true;
		} else {
			document.getElementById('label_'+reqFields[x]).style.borderColor = 'transparent';
			sendForm--;
		}
	}
	if(fehler == true) {
		//alert("!!");
		return false;
	}
//	if (sendForm == 0) {
//		document.getElementById('req').style.display = 'none';
//		document.forms.MailForm.submit();
//	}
}

function reqReset() {
	var reqFields = document.getElementById('Require').value.split(',');
	document.getElementById('req').style.display = 'none';
	for (x = 0; x < reqFields.length; x++) {
		document.getElementById(reqFields[x]).style.backgroundColor = 'transparent';
	}
}

