function checkSearch(formID){
	myForm = document.getElementById(formID);
	if (typeof(myForm) != "object") return false;
	myElements = myForm.elements;
	myError = new Array();
	for (f=0; f<myElements.length; f++){
		myElement = myElements[f];
		if (myElement.id.indexOf('_req') != -1){
			// REQUIRED FIELD
			if (myElement.value == "Suchbegriff") {
				myError.push(myElement);
			}
		}
	}
	if (myError.length > 0){
		alert("Bitte geben Sie einen Suchbegriff ein!");
		myError[0].focus();
		return false;
	} else { 
		return true;
	}
	return false;
}
function checkForm(formID){
	myForm = document.getElementById(formID);
	if (typeof(myForm) != "object") return false;
	myElements = myForm.elements;
	myError = new Array();
	for (f=0; f<myElements.length; f++){
		myElement = myElements[f];
		if (myElement.id.indexOf('_req') != -1){
			// REQUIRED FIELD
			if (myElement.value == "") {
				myError.push(myElement);
			}
		}
	}
	if (myError.length > 0){
		alert("Bitte füllen Sie alle Pflichtfelder aus!");
		myError[0].focus();
		return false;
	} else { 
		return true;
	}
	return false;
}
function showcontact()
{
	document.getElementById('switch-contact').style.display = 'block';
	document.getElementById('switch-imprint').style.display = 'none';
	
	document.getElementById('contact-a').style.textDecoration = 'underline';
	document.getElementById('imprint-a').style.textDecoration = 'none';
}
function showimprint()
{
	document.getElementById('switch-imprint').style.display = 'block';
	document.getElementById('switch-contact').style.display = 'none';
	
	document.getElementById('imprint-a').style.textDecoration = 'underline';
	document.getElementById('contact-a').style.textDecoration = 'none';
}
function popup(w,h,url)
{
	x = screen.availWidth/2-w/2;
	y = screen.availHeight/2-h/2;
	var popupWindow = window.open(
		url,'','width='+w+',height='+h+',left='+x+',top='+y+',screenX='+x+',screenY='+y+',scrollbars=yes');
}
