function druckVorschau(winName)
{
 li_left = (screen.width-800)/2;
 li_top  = (screen.height - 600)/2;
 Math.round(li_left);
 Math.round(li_top);
 F1 = window.open("druckversion.php",winName,"left=" + li_left + ",top=" + li_top + ",width=670,height=600,scrollbars=yes,status=no,menubar=no,resizable=yes,locationbar=no");
}



function setBackground(nr)
{
 red = eval("document.getElementById('red"+nr+"')");
 text = eval("document.getElementById('text"+nr+"')");
 white = eval("document.getElementById('white"+nr+"')");
 red.style.backgroundColor='#EE3338';
 text.style.backgroundColor='#FFFFFF';
 white.style.backgroundColor='#FFFFFF';
}
 
function resetBackground(nr)
{
 red = eval("document.getElementById('red"+nr+"')");
 text = eval("document.getElementById('text"+nr+"')");
 white = eval("document.getElementById('white"+nr+"')");
 red.style.backgroundColor='#DDDCDC';
 text.style.backgroundColor='#DDDCDC';
 white.style.backgroundColor='#DDDCDC';
}

function setBackgroundRe(nr)
{
 red = eval("document.getElementById('redRe"+nr+"')");
 text = eval("document.getElementById('textRe"+nr+"')");
 white = eval("document.getElementById('whiteRe"+nr+"')");
 red.style.backgroundColor='#EE3338';
 text.style.backgroundColor='#FFFFFF';
 white.style.backgroundColor='#FFFFFF';
}
 
function resetBackgroundRe(nr)
{
 red = eval("document.getElementById('redRe"+nr+"')");
 text = eval("document.getElementById('textRe"+nr+"')");
 white = eval("document.getElementById('whiteRe"+nr+"')");
 red.style.backgroundColor='#DDDCDC';
 text.style.backgroundColor='#DDDCDC';
 white.style.backgroundColor='#DDDCDC';
}




function Fensterweite()
{
 if (window.innerWidth) return window.innerWidth;
 else if (document.body && document.body.clientWidth) return document.body.clientWidth;
 else return 0;
}

function Fensterhoehe()
{
 if (window.innerHeight) return window.innerHeight;
 else if (document.body && document.body.offsetHeight) return document.body.offsetHeight;
 else return 0;
}


function neuAufbau()
{
 if (Weite != Fensterweite() || Hoehe != Fensterhoehe())
 window.history.go(0);
}

function openWindow(filename,title,width,height)
{
 opts = "width="+width+",height="+height+",status=no,location=no,menuebar=no,resizable=no,toolbar=no";
 win = window.open(filename,title,opts);
}

function MM_openBrWindow(lokalUrl,winName,target) 
  {               
   li_left = (screen.width-800)/2;
   li_top  = (screen.height - 600)/2;
   Math.round(li_left);
   Math.round(li_top);   
   F1 = window.open("",winName,"left=" + li_left + ",top=" + li_top + ",width=700,height=400,scrollbars=yes,status=yes,menubar=yes,resizable=yes,location,personalbar,toolbar");            
   F1.document.close();
   F1.document.open("text/html");   
   F1.document.writeln('<html>');
   F1.document.writeln('<head>');
   F1.document.writeln('<script language="JavaScript">');   
   F1.document.writeln('<!--');
   F1.document.writeln('function popup()');
   F1.document.writeln('{');
   F1.document.writeln('top.name = "main_window";');
   F1.document.writeln('var popupURL = "'+target+'";');
   F1.document.writeln('var popup = window.open(popupURL,"neuesfenster","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=200,height=200");');
   F1.document.writeln('if( navigator.appName.substring(0,8) == "Netscape" )');
   F1.document.writeln('{');
   F1.document.writeln('popup.location = popupURL;');
   F1.document.writeln('popup.opener = self;');
   F1.document.writeln('}');
   F1.document.writeln('}');
   F1.document.writeln('// -->');
   F1.document.writeln('</script>');
   F1.document.writeln('<title>Untitled</title>');
   F1.document.writeln('</head>');
   F1.document.writeln('<frameset cols="*" border="0" onUnload="popup()">');
   F1.document.writeln('<frame 	src="'+lokalUrl+'" noresize border="0" name="pdf"></frame>');
   F1.document.writeln('</frameset>');
   F1.document.writeln('<body>');
   F1.document.writeln('</body>');
   F1.document.writeln('</html>');
   F1.document.close();
  }   