function menuVillen(villa, action) {	
	if (action == 'over') {
		document.getElementById(villa + '_txt').style.backgroundColor = '#000823';
		document.getElementById(villa + '_txt').style.color = '#EBD87F';
		document.getElementById(villa + '_img').src = menuVillenImgs[villa + '_aktive'].src;
	}
	else if(action == 'out') {
		document.getElementById(villa + '_txt').style.backgroundColor = '#EBD87F';
		document.getElementById(villa + '_txt').style.color = '#000823';
		document.getElementById(villa + '_img').src = menuVillenImgs[villa].src;
	}
}

function chcheckbox(checkbox) {
	if (document.getElementById(checkbox).checked == true) {
		document.getElementById(checkbox).checked = false;
	}
	else {
		document.getElementById(checkbox).checked = true;
	}
	return false;
}


function simple_popup_cal(DoomID, url) {
	
	var d = document.getElementById(DoomID + "_d").value;
	var m = document.getElementById(DoomID + "_m").value;
	var y = document.getElementById(DoomID + "_y").value;
	
	var url = url + "/simple_cal.html?d=" + d + "&m=" + m + "&y=" + y;
	
	SimplePopupCal = window.open(url, DoomID, "width=228,height=164,directories=no,toolbar=no,location=no,menubar=no,scrollbars=no,status=no,resizable=no,dependent=no,fullscreen=no");
	
	SimplePopupCal.focus();
	
	return true;
}


function chInputTextAndCeckbox2aktive() {
	var input, i;
	for (i = 0; true; i++) {
		if (! document.getElementsByTagName("input")[i])
			break;
		input = document.getElementsByTagName("input")[i];
		if (input.type != 'text' && input.type != 'checkbox')
			continue;
		input.disabled = false;
	}
	return true;
}


function chInputTextAndCeckbox2disabled() {
	var input, i;
	for (i = 0; true; i++) {
		if (! document.getElementsByTagName("input")[i])
			break;
		input = document.getElementsByTagName("input")[i];
		if (input.type != 'text' && input.type != 'checkbox')
			continue;
		input.disabled = true;
	}
	return true;
}


function popupHelp(url, help) {
	
	var url = url + "/help/" + help + ".html";
	
	helpWindows = window.open(url, "help", "width=400,height=360,directories=no,toolbar=no,location=no,menubar=no,scrollbars=yes,status=no,resizable=yes,dependent=no,fullscreen=no");
	
	helpWindows.focus();
	
	return true;
}


function popupAgb(url) {
	
	var url = url + "/agbpopup.html";
	
	helpWindowsAgb = window.open(url, "help", "width=550,height=700,directories=no,toolbar=no,location=no,menubar=no,scrollbars=yes,status=no,resizable=yes,dependent=no,fullscreen=no");
	
	helpWindowsAgb.focus();
	
	return true;
}