// JavaScript Document


doc=""

function oeffne_Fensterbild(bildname,name,f_width,f_height){
    if( doc != "" )

     if( !doc.closed )

        doc.close();
		
		doc=window.open("", "fenster", "width="+f_width+",height="+f_height+",menubar=no,status=no,scrollbars=no");
   doc.document.open("text/html");
   doc.document.write('<html><title>'+name+'</title><body bgcolor=#ffffff marginwidth="0" marginheight="0" leftmargin="0" topmargin="0">');
   doc.document.write('<p align=center><img src="'+bildname+'" width="'+f_width+'" height="'+f_height+'">');
   doc.document.write('</p></body></html>');
   doc.document.close();
   doc.focus()
   
  
  }


function GrafikAnzeigen(GrafikURL, Titel, Breite, Hoehe)
{
    Fensteroptionen = "toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0";
 
    Grafikfenster = window.open("", "", Fensteroptionen + ',width=' + Breite + ',height=' + Hoehe);
    Grafikfenster.focus();
    Grafikfenster.document.open();
 
    
with(Grafikfenster)
    {
        document.write("<html><head>");
        document.write("<title>Grafikanzeige</title>");
        document.write("</head>");
        document.write("<body leftmargin=\"0\" marginheight=\"0\" marginwidth=\"0\" topmargin=\"0\">");
        document.write("<img border=\"0\" onclick=\"window.close();\" src=\""+ GrafikURL +"\" title=\"Zum Schließen auf das Foto klicken\">");
        document.write("</body></html>");
    }
 
    return;
}

function openwindow(url,name,h,w)
{
ref = window.open(url,name,"toolbar=no,menubar=no,location=no,directories=no,status=no,scrollbars=no,dependent=yes,resizable=no,copyhistory=yes,height=" + h + ",width=" + w);
	ref.focus()
}


function focusElem(elemId) {
    var elem = document.getElementById(elemId);
    if (elem && elem.focus) {
        elem.focus();
    }
}

function printit(){  
if (window.print) {
    window.print() ;  
} else {
    var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
    WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box    WebBrowser1.outerHTML = "";  
}
}
