function checksearchfrm(frm,field) {
		var theform = document.forms[frm].elements[field];
		if (theform.value ==''){
			alert ("Es wurde kein Suchbegriff eingegeben");
			theform.focus();
			return false;
		}
		else if(theform.value.length < 3){
			alert ("Der Suchbegriff muss mindestens aus drei Zeichen bestehen.");
			theform.focus();
			return false;
		}
		else {
			return true;
		}
	}
	
function search(url) {
	var TheQuery=document.search.query.value;
	document.location.href=url+'?query=' + encodeURI(TheQuery);	
}

function fontsize(s) {
	document.cookie = "fontsize="+s+"; path=/";
	arrCockie = document.cookie.split(';');
	var fs = "80%";
	for( var i = 0; i < arrCockie.length; i++) {
		if(arrCockie[i].indexOf('fontsize=') != -1) {
			//alert(arrCockie[i]);
			arrFs = arrCockie[i].split('=');
			fs = arrFs[1]
		}
	}
	var el=document.getElementById("body");	
	el.style.fontSize = fs;
}

function checkFontSize() {
	arrCockie = document.cookie.split(';');
	var fs = "80%";
	for( var i = 0; i < arrCockie.length; i++) {
		if(arrCockie[i].indexOf('fontsize=') != -1) {
			//alert(arrCockie[i]);
			arrFs = arrCockie[i].split('=');
			fs = arrFs[1]
		}
	}
	var el=document.getElementById("body");	
	el.style.fontSize = fs;
}


function checkPLZ() {
	//Error in Firefox when pressing ENTER in the field PLZ
	if(document.Kontakt.PLZ.value == "") {
	   document.Kontakt.PLZ.focus();
	   return false;	
	}
}


function newwindow(URL) {
	links = screen.width/2 - 650/2;
	oben = screen.height/2 - 550/2;
    var fenster=open(URL,+ "SatWindow","height=550,width=650,left="+links+",top="+oben+",toolbar=no,location=no,menubar=no,resizable=no,status=no,scrollbars=yes");
	if(fenster.closed == true) aktuell;
	else  fenster.focus()
}

function ebookWindow(URL) {
	links = screen.width/2 - 1000/2;
	oben = screen.height/2 - 800/2;
    var fenster=open(URL,+ "SatWindow","height=800,width=1000,left="+links+",top="+oben+",toolbar=no,location=no,menubar=no,resizable=yes,status=no,scrollbars=yes");
	if(fenster.closed == true) aktuell;
	else  fenster.focus()
}
