//*****Variablen****//
var da = (document.all) ? 1 : 0;
var pr = (window.print) ? 1 : 0;
var mac = (navigator.userAgent.indexOf("Mac") != -1); 

//Browser bestimmen
var agt=navigator.userAgent.toLowerCase(); 
var is_major = parseInt(navigator.appVersion); 
var is_minor = parseFloat(navigator.appVersion); 
var nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
            && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
            && (agt.indexOf('webtv')==-1));

var nav4 = (nav && (is_major == 4));
var nav4up = (nav && (is_major >= 4));
var navonly      = (nav && ((agt.indexOf(";nav") != -1) ||
                      (agt.indexOf("; nav") != -1)) );
var nav5 = (nav && (is_major == 5));
var nav5up = (nav && (is_major >= 5));
var ie   = (agt.indexOf("msie") != -1);
var ie3  = (ie && (is_major < 4));
var ie4  = (ie && (is_major == 4) && (agt.indexOf("msie 5.0")==-1) );
var ie4up  = (ie  && (is_major >= 4));
var ie5  = (ie && (is_major == 5) && (agt.indexOf("msie 5.0")!=-1) );
var ie5up  = (ie  && !ie3 && !ie4);
var op = (agt.indexOf('opera')!=-1);

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


//Popup öffnen öffnen
function openWindow(url,w,h){
	var rndURL = (1000*Math.random());
	newWindow = window.open(url,'Fenster','width='+w+',height='+h+',top='+(screen.height-h)/2+',left='+(screen.width-w)/2+',location=0,directories=0,status=yes,menuBar=no,toolbar=no,scrollBars=yes,resizable=yes');
	newWindow.focus();
}


//Popup öffnen öffnen
function openWindow(url,w,h){
	var rndURL = (1000*Math.random());
	newWindow = window.open(url,'Fenster','width='+w+',height='+h+',top='+(screen.height-h)/2+',left='+(screen.width-w)/2+',location=0,directories=0,status=yes,menuBar=no,toolbar=no,scrollBars=yes,resizable=yes');
	newWindow.focus();
}


function updateOpener() {
    opener.location.href = opener.location.href;
}
function updateOpenerIndex(newurl) {
    self.opener.location.replace(newurl);
}