//
//     Funktion zum öffnen eines neuen Fensters
//
// Programmierung: HILL GmbH, Parkstein - info@hill.de - www.hill.de
//
//                 Version 1.0  - Date 30.03.01 - mk
//                 
//


var info = null;
var picture = null;

function infoOpen(wath, width, height, top, left, scroll, resize)
{  
  if (info != null) {
    if (!info.closed) {
      info.focus();
      info.location.href = wath;   
    } else {
      info = window.open(wath,'Info','toolbar=no,scrollbars='+ scroll +',directories=no,status=no,resizable='+ resize +',menubar=no,width='+ width +',height='+ height +',left='+ left +',top='+ top);
      info.focus();
    }
  } else {
      info = window.open(wath,'Info','toolbar=no,scrollbars='+ scroll +',directories=no,status=no,resizable='+ resize +',menubar=no,width='+ width +',height='+ height +',left='+ left +',top='+ top);
      info.focus();
  }
}


function infoClose()
{
  if (info != null) {
    if (!info.closed) {
      info.close();
    }
  }
}

function setWindow(wath, width, height, top, left, scroll, resize) {
  
  if (left != 0) {
    newLeft = (screen.availWidth-width-10);
  } else {
    newLeft = left;
  }
  
  dummy = '';

  info = window.open(dummy,'Info','toolbar=no,scrollbars='+ scroll +',directories=no,status=no,resizable='+ resize +',menubar=no,width='+ width +',height='+ height +',left='+ newLeft +',top='+ top);
  setInfoLoading();
  info.focus();
  
      
  infoOpen(wath, width, height, top, newLeft, scroll, resize);
}

function setOpener(wath) {
  window.opener.location.href = wath;
}

function setInfoLoading() {  
  file = '<!-- Programmierung: HILL GmbH, Parkstein - info@hill.de - www.hill.de -->\n'+
         '<html>\n'+
         '<head>\n'+
         '<title>Info Fenster</title>\n'+
         '<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n'+
         '<!-- einbinden von JavaScript Dateien -->\n'+
         '<Script Language=\"JavaScript\">\n'+
         '<!--\n'+
         '  var i = 0;\n'+
         '  var point = null;\n'+
         '  var last = null;\n\n'+
         '  function setLoading() {\n'+
         '    if (i == null) {\n'+
         '      i= 0;\n'+
         '    }\n'+
         '    i++;\n'+
         '    document.write(\".\");\n'+
         '    point= window.setTimeout(\"setLoading()\", 100);\n'+
         '    if (i == 20) {\n'+
         '      window.clearTimeout(point);\n'+
         '      last = \"</b></center>\\n\"+\n'+
         '             \"</font>\\n\"+\n'+
         '             \"</body>\\n\"+\n'+
         '             \"</html>\\n\";\n'+
         '      document.write(last);\n'+
         '    }\n'+
         '  }\n'+
         '//-->\n'+
         '</script>\n'+
         '</head>\n'+
         '<body bgcolor=\"#FFFFFF\" text=\"#000000\">'+
         '<br><br><br><br>'+
         '<font face=\"Arial, Helvetica, sans-serif\" size=\"4\" color=\"#000000\">'+
         '<center><b>Loading\n'+
         '<Script Language=\"JavaScript\">\n'+
         'setLoading();\n'+
         '</script>\n';
         
  info.document.open("text/html", "replace");
  info.document.write(file);
}
