function PicPrev(url, src) {
	url = url + "?src=" + src;
	NewWindow(url, 100, 100, "showimg", "yes");
}

function NewWindow(url, w, h, name, scroll) {
	NewWin = window.open(url,name,"width="+w+",height="+h+",scrollbars="+scroll+",status=no,toolbar=no,menubar=no,resizable=yes");
	NewWin.focus();
}

function preview() {
	url = p + ";bPrint:1";
	printWin = window.open(url, "printpage", "width=570,height=700,scrollbars=yes,status=no,toolbar=no,menubar=yes,resizable=no");
	printWin.focus();
}

function recommend(sLS,iW,iN) {
	url = sLS+";weiterempfehlen;w:"+iW+";n:"+iN+";bPrint:1.htm";
	recommendWin = window.open(url, "recommendpage", "width=570,height=700,scrollbars=yes,status=no,toolbar=no,menubar=yes,resizable=no");
	recommendWin.focus();
}

function booklet(sLS,iW,iN) {
	url = sLS+";booklet-bestellung;w:"+iW+";n:"+iN+";bPrint:1.htm";
	recommendWin = window.open(url, "bookletorderpage", "width=570,height=700,scrollbars=yes,status=no,toolbar=no,menubar=yes,resizable=no");
	recommendWin.focus();
}

function search() {
	document.frmSearch.submit();
}

function newwin(w,h) {
  myparm = 'width='+ w +',height='+ h +',scrollbars=no,status=no,toolbar=no,menubar=no'

  mywindow=window.open('','newwin',myparm)
  mywindow.focus();
}


function show(e)	{
  
  if (document.all) {

	 document.all[e].style.visibility = 'visible';
	}
	else if (document.layers)	{
	
	document.layers[e].visibility = 'show';
	}
	else if (document.getElementById)	{

	document.getElementById(e).style.visibility = 'visible';
  }
  
}

function hide(e)	{
  
  if (document.all)	{

	 document.all[e].style.visibility = 'hidden';
  }
	else if (document.layers)	{
	
	document.layers[e].visibility = 'hidden';
	}
	else if (document.getElementById){

	document.getElementById(e).style.visibility = 'hidden';
  }
}

function PreloadNavImg(iID){
	arNavImages[iID]=new Array();

	arNavImages[iID][0]=new Image;
	arNavImages[iID][0].src=PH+"/img/mnu/mnu_"+iID+"_link.gif";

	arNavImages[iID][1]=new Image;
	arNavImages[iID][1].src=PH+"/img/mnu/mnu_"+iID+"_hover.gif";
	arNavImages[iID][2]=new Image;
	arNavImages[iID][2].src=PH+"/img/mnu/mnu_"+iID+"_active.gif";
}

function getWindowHeight() {
	var windowHeight = 0;
	if (typeof(window.innerHeight) == 'number') {
		windowHeight = window.innerHeight;
	}
	else {
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		}
		else {
			if (document.body && document.body.clientHeight) {
				windowHeight = document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}
function setFooter() {
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		if (windowHeight > 0) {
			var contentHeight = document.getElementById('main').offsetHeight;
			var footerElement = document.getElementById('footer');
			var footerHeight  = footerElement.offsetHeight;
			if (windowHeight - (contentHeight + footerHeight) >= 0) {
				footerElement.style.position = 'absolute';
				footerElement.style.bottom = '0px';
			}
			else {
				footerElement.style.position = 'static';
			}
		}
	}
}

