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);

var nav = '';
var t2 = -1;
var tTime = 0;

function hideLayer() {
  if((nav != '')&&(t2>=0)){
    MM_showHideLayers(nav,'','hide');
	nav = '';
  }
}

function setLayer(id,x,y) {
  //alert(document.images[0].width);
  hideLayer();
  if(ie4 || dom) wx = document.images[0].width;
  if(ns4 || ns6) wx = document.images[0].width;

  if (ns4) document.layers[id].moveTo(x,y);
  if (ie4) {
    document.all[id].style.left = x;
    document.all[id].style.top = y;
  }
  if (dom) {
    document.getElementById(id).style.left = x+"px";
    document.getElementById(id).style.top = y+"px";
  }
  MM_showHideLayers(id,'','show');
  nav = id;
  clearTime();
}

function clearTime() {
  if(tTime) clearTimeout(tTime);
  t2 = -1;
}

function outLayer(t){
  t2 = t;
  if(t2>0){
    t2--;
    tTime = setTimeout("outLayer(t2)",0);
  }else{
    hideLayer();
	clearTime();
  }
}

// -->

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function PopUpNow(adresse,fenstername,eigenschaften) {
  window.open(adresse,fenstername,eigenschaften);
}

/*function printLayer(lname) {
var txt = document.getElementById('Layer2').innerHTML;
document.open();
document.write(txt + '<br><br>Copyright http://www.saller.at');
document.close();
window.print();
// the previous line may need to be...
// do
}*/

function printLayer(lname) {
var style = "<link href=style.css rel=stylesheet type=text/css />";
var txt = document.getElementById('Layer2').innerHTML;
//window.open();
content = style + txt + '<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=normaleschrift>Copyright http://www.saller.at</span>';

 fenster2=window.open('','myconsole','width=900,height=800'+',menubar=0'+',toolbar=1'+',status=0' +',scrollbars=1' +',resizable=1');
 fenster2.document.write('<html><head><title>Druckfenster</title></head><body onLoad="window.print();">'+content+'</body></html>');
 //fenster2.focus();
 fenster2.document.close("text/html");
 //window.print();

}
