var ns4 = (document.layers) ? 1 : 0;
var ie4 = (document.all && !document.getElementById) ? 1 : 0;
var ie5 = (document.getElementById) ? 1 : 0;


function winOpen(theUrl,b,h) {	
	h=parseInt(h)+60; b=parseInt(b)+80;
	var winproperties='height='+h+',width='+b+',location=no,menubar=no,scrollbars=yes,toolbar=no, status=yes';
	var windowname,tmp,i;
	tmp=theUrl;i=0;windowname="";
  	for(i=0;i<tmp.length;++i)
   	{
		if(tmp.charAt(i)=='?') i=tmp.length;
		if((tmp.charCodeAt(i)>=48 && tmp.charCodeAt(i)<=57) || (tmp.charCodeAt(i)>=65 && tmp.charCodeAt(i)<=90) || (tmp.charCodeAt(i)>=97 && tmp.charCodeAt(i)<=122)) 
			{windowname=windowname+tmp.charAt(i);}
	}
	tmp=windowname+"=window.open(theUrl,'"+windowname+"',winproperties)"; eval(tmp);
	tmp=windowname+".focus()"; eval(tmp);
	tmp=windowname+".moveTo((screen.width/2)-(b/2),Math.abs((screen.height/2)-(h/2)-20))"; eval(tmp);
}

function really(theUrl,msg) {
	if(confirm(msg)==1) {window.location.href=theUrl;}
}

/* MouseOver Effekt 1 */
function setImg(imgID,source)
{
	document.images[imgID].src = source
}

function initDimensions()
{
	var bodyheight;
	bodyheight = document.body.clientHeight;
	DivObjStyle("content").height=bodyheight-225;
}

function DivObjStyle(div_id)
{
    if (!div_id || div_id.length==0)
    {
       if (document.getElementById) {
           div_obj = document.style;
       }    
       else if (document.layers) {
           div_obj = document;
       }
       else if (document.all) {
           div_obj = document.all.style;
       }
    }
    else {   
       if (document.getElementById) {
          div_obj = document.getElementById(div_id).style;
       }    
       else if (document.layers) {
          div_obj = eval("document."+div_id);
       }
       else if (document.all) {
          div_obj = eval("document.all."+div_id+".style");
       }
    }   
    return div_obj;
}

function NLWindow(Email,abonnieren)
{
	win=window.open("newsletter_popup.asp?email="+Email+"&abonnieren="+abonnieren+"", "Newsletter", "width=300,height=180,locationbar=no,menubar=no,status=no,scrollbars=no,resizable=no"); 
	win.focus();
	return false;
}

function imgPopup(imgurl,b,h)
{
	h=parseInt(h)+50; b=parseInt(b)+40;
	var winproperties='height='+h+',width='+b+',location=no,menubar=no,scrollbars=auto,toolbar=no';
	tmp="NewWindow=window.open('','Detailansicht',winproperties)"; eval(tmp);
	NewWindow.focus();
	NewWindow.document.write ("<html><head><title>DETAILANSICHT");
	NewWindow.document.write ("</title></head>");
	NewWindow.document.write ("<body bgcolor='#cccccc' style='margin:0; padding:0;'>");
	NewWindow.document.write ("<table align='center'><tr>");
	NewWindow.document.write ("<td align='center' valign='top'>");
	NewWindow.document.write ("<table border='1' bgcolor='#000000' cellpadding='0' cellspacing='1'><tr><td align='center'>");
	NewWindow.document.write ("<img src='");
	NewWindow.document.write (imgurl);
	NewWindow.document.write ("'>");
	NewWindow.document.write ("</tr></table>");
	NewWindow.document.write ("</td></tr><tr>");
	NewWindow.document.write ("<td align='center' valign='bottom'>");
	NewWindow.document.write ("<center><form><input type='button' value='FENSTER SCHLIESSEN' style='font-family: Verdana; font-size: 10px' onClick='self.close()'>");
	NewWindow.document.write ("</td></tr></table>");
	NewWindow.document.write ("</form></body></html>");
	NewWindow.document.close();
}

