function openFenster(URL, NAME, WIDTH, HIGHT){
	URL = encodeURI(URL);
	var wWidth=WIDTH;
	var wHeight=HIGHT;
	var wTop=(screen.height-HIGHT)/2;
	var wLeft=(screen.width-WIDTH)/2;
	NAME = open(URL,NAME,"dependent=yes,height="+wHeight+",width="+wWidth+",left="+wLeft+",top="+wTop+",location=no,menubar=no,resizeable=no,status=no,toolbar=no,scrollbars=yes");
	NAME.focus();
}


function openPopupGeneric(URL, NAME, WIDTH, HEIGHT, SCROLLBAR, RESIZABLE) {
	URL = encodeURI(URL);
	var wWidth=WIDTH;
	var wHeight=HEIGHT;
	var wTop=(screen.height-HEIGHT)/2;
	var wLeft=(screen.width-WIDTH)/2;
    if (SCROLLBAR=='1' || SCROLLBAR=='true' || SCROLLBAR=='yes') SCROLLBAR = 'yes'; else SCROLLBAR = 'no';
    if (RESIZABLE=='1' || RESIZABLE=='true' || RESIZABLE=='yes') RESIZABLE = 'yes'; else RESIZABLE = 'no';
    options = "dependent=yes,height="+wHeight+",width="+wWidth+",left="+wLeft
        +",top="+wTop+",location=no,menubar=no,resizable="+RESIZABLE
        +",status=no,toolbar=no,scrollbars="+SCROLLBAR;
    //window.alert(SCROLLBAR + ',' + RESIZABLE + ',' + options);
	NAME = open(URL,NAME,options);
	NAME.focus();
}

var ns4 = (document.layers)? true:false;
var ns6 = (document.getElementById)? true:false;
var ie  = (document.all)? true:false;

function showLayer(name){//layername
	if (ie) {document.all[''+name].style.visibility = "visible"}
	else if(ns4) {document.layers[''+name].visibility = "show";}
	else if(ns6) {document.getElementById(''+name).style.visibility = "visible";}
	aktLayerName=name;
}
function hideLayer(name){
	if (ie) {document.all[''+name].style.visibility = "hidden"}
	else if(ns4) {document.layers[''+name].visibility = "hide"}
	else if(ns6) {document.getElementById(''+name).style.visibility = "hidden";}
	aktLayerName='';
}
function layerPos(name, l, t){//layername, leftpos, toppos
	if (ie){
		document.all[''+name].style.left = l;
		document.all[''+name].style.top = t;
	}else if(ns4){
		document.layers[''+name].left = l;
		document.layers[''+name].top = t;
	}else if(ns6){
		document.getElementById(''+name).style.left = l;
		document.getElementById(''+name).style.top = t;
	}
}
function prev_img(img, img_w, img_h){
 if(img_w == '' || img_w == '0' || img_h == '' || img_h == '0'){
  img_w = 500;
  img_h = 500;
 }
 img_w = img_w *1 + 30;
 img_h = img_h *1 + 120;
 popUpWin = open('image_detail.php?img='+img, 'popUpImgw', 'toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width='+ img_w+',height='+img_h);
 popUpWin.focus();
}
function openPopUpWin(URL, picName,  winWidth, winHeight){//open popup window
	popUpWin = open(URL+'?picName='+picName+'?w='+winWidth+'?h='+winHeight, 'popUpWindow', 'toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width='+ winWidth+',height='+winHeight);
	popUpWin.focus();
}
function openLlW(URL, name, w, h){
	URL = encodeURI(URL);
	llWin = open(URL, name, 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width='+w+',height='+h);
	llWin.focus();
}
function empfehlung(eid, evar){
	eWin = open('empfehlung.php?id='+eid+'&var='+evar, 'eWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=460,height=424');
	eWin.focus();
}
function print_page(url){
	pWin = open(url+'&to_do=print', 'pWin', 'toolbar=yes,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=no,copyhistory=no,width=744,height=600');
	pWin.focus();
}

function showTitle(title)
{
	top.document.title=title;
}

function checkFrame(path,struktur_id)
{
	if (top==self)
	{
		if (path!=""&&struktur_id!="")
		{
			top.location.href="..//index.php?path="+path+"&struktur_id="+struktur_id;
		}
		else
		{
			top.location.href="../index.php";
		}
	}
}
function showTooltip(id)
	{
		try
		{
			tooltip = document.getElementById(id);
			tooltip.style.display="block";
		}
		catch (error)
		{
			error=null;
		}
	}
	
	function hideTooltip()
	{
		try
		{
			tooltip.style.display="none";
		}
		catch (error)
		{
			error=null;
		}
	}