// JavaScript Document

function mClick(url) {
	window.open("/"+url, "_self");
}

function mOver(el, id) {
	el.className = "menu_act";
}

function mOut(el, id) {
	el.className = "menu";
}

function mOverSub(el) {
	el.className = "menu_sub_act";
}

function mOutSub(el) {
	el.className = "menu_sub";
}

function clearInput(el, def, type) {
	if(el.value == def) {
		el.value = "";
		if(type != null) {
			el.type = type;
		}
	}
}

function resetInput(el, def, type) {
	if(el.value == "") {
		el.value = def;
		if(type != null) {
			el.type = type;
		}
	}
}

function iFocus(el) {
	el.style.backgroundColor = '#EFF3F7';
}

function iBlur(el) {
	el.style.backgroundColor = '#DBE8EC';
}

function change_bild_gross(src, title) {
	if(document.getElementById('bild_gross') != null) {
		document.getElementById('bild_gross').src = src;
		document.getElementById('bild_gross').title = title;
	}
}

function seite_empfehlen_popup(url) {
	var popup = window.open('/popup-empfehlen.php?url='+encodeURI(url), 'empfehlen_popup', 'resizable=no,scrollbars=no,width=400,height=390');
}

function print_popup() {
	var popup = window.open(print_url, 'print_popup', 'width=610,height=700,resizable=yes,location=no,menubar=no,toolbar=no,status=no,scrollbars=yes');
}

function kontaktbox_newsletter_popup() {
	var email = document.getElementsByName('newsletter_email')[0].value;
	if(email == 'Ihre E-Mail Adresse') email = '';
	var popup = window.open('/popup-newsletter.php?email='+email, 'newsletter_popup', 'resizable=no,scrollbars=no,width=400,height=390');
	// gibt 'false' zurueck damit Formular nicht abgesendet wird
	return false;
}   