
// smart popup function, works with or without JavaScript.
// use in a link as follows:
//
//   <a href="dest.html"
//      target="SHPopup"
//      onclick="OpenPopup(this.href); return false;">
//
// with:
// dest.hmtl - the destination URL
//
// so, if JavaScript is disabled, "dest.html" is opened in a new main window.
// if JavaScript is available, a popup is opened using the function
// OpenPopup() in "onclick".
//
// to avoid default anchor processing, "false" is returned from "onclick". as
// some JavaScript implementations don't regard the return value, the page
// in the popup windows may be loaded twice...
//
// (C) 2000-2001 ctnm, Hamburg
// if you steal our code, don't ask for help.
//
function OpenPopup(cUrl)
{
    // open new window;
    // no spaces in string, bug in function window.open()
    var cWindow = window.open(cUrl,"SHPopup","width=320,height=400,resizable=yes,scrollbars=yes");

    // bring window to top
    if( !cWindow.opener )
    {
    	cWindow.opener = self;
    }

    if( cWindow.focus != null )
    {
    	cWindow.focus();
    }
}

//
// Ergaenzung von Michael Motylewski fuer die Einblendung nicht veraenderbarer Glossarfenster
//
function OpenGlossar(cUrl)
{
    // open new window;
    // no spaces in string, bug in function window.open()
    var cWindow = window.open(cUrl,"SHGlossar","width=460,height=500,status=no,scrollbars=yes,resizable=no,screenX=20,screenY=40,left=20,top=40");

    // bring window to top
    if( !cWindow.opener )
    {
    	cWindow.opener = self;
    }

    if( cWindow.focus != null )
    {
    	cWindow.focus();
    }
}

//
// Ergaenzung von Michael Motylewski fuer die Einblendung veraenderbarer PDF-Fenster
//
function OpenPDF(cUrl)
{
    // open new window;
    // no spaces in string, bug in function window.open()
    var cWindow = window.open(cUrl,"pdf","width=640,height=480,status=no,scrollbars=yes,resizable=yes,screenX=20,screenY=40,left=20,top=40");

    // bring window to top
    if( !cWindow.opener )
    {
    	cWindow.opener = self;
    }

    if( cWindow.focus != null )
    {
    	cWindow.focus();
    }
}

//
// Ergaenzung von Michael Motylewski fuer die Einblendung veraenderbarer PDF-Fenster
//
function OpenWin(cUrl,cWinName,nWidth,nHeight,nMenu,nStatus,nLocation)
{
    // open new window;
    // no spaces in string, bug in function window.open()
    var cWindow = window.open(cUrl,cWinName,"width="+nWidth+",height="+nHeight+",menubar="+nMenu+",status="+nStatus+",location="+nLocation+",resizable=yes,scrollbars=yes,screenX=20,screenY=20,left=20,top=20");

    // bring window to top
    if( !cWindow.opener )
    {
    	cWindow.opener = self;
    }

    if( cWindow.focus != null )
    {
    	cWindow.focus();
    }
}


//
// Ergaenzung von Michael Motylewski fuer die Einblendung von Bildern
//
function OpenImage(cUrl,nWidth,nHeight)
{
    // open new window;
    // no spaces in string, bug in function window.open()
    var cWindow = window.open(cUrl,"SHImage","width="+nWidth+",height="+nHeight+",status=no,resizable=yes,scrollbars=yes,screenX=20,screenY=20,left=20,top=20");

    // bring window to top
    if( !cWindow.opener )
    {
    	cWindow.opener = self;
    }

    if( cWindow.focus != null )
    {
    	cWindow.focus();
    }
}



