////////////////////////////////////////////////////////////////////////////////
// FUNKTIONEN FÜR POPUP-FENSTER                                               //
// Original-FileName:   bdm_win.js                                            //
// Version:             1.0.00.6                                              //
////////////////////////////////////////////////////////////////////////////////
// Overflow Funktionen: - LaunchWin                                           //
//                      - LaunchFullWin                                       //
//                      - LaunchCenteredWin                                   //
//                      - LaunchNewsWin                                       //
//                      - LaunchStoreWin                                      //
//                      - LaunchWallpaper                                     //
////////////////////////////////////////////////////////////////////////////////
//                                              © http://www.bill-da-macha.de //
////////////////////////////////////////////////////////////////////////////////

//------------------------------------------------------------------------------replacer
if(top.location != window.location)
    top.location.replace(window.location.href);

//------------------------------------------------------------------------------launch win
function launchwin(winurl,winname,winfeatures)
{
    //This launches a new window and then
    //focuses it if window.focus() is supported.
    newwin = window.open(winurl,winname,winfeatures);
    if(parseInt(navigator.appVersion) >= 4)
    {
        //delay a bit here because IE4 encounters errors
        //when trying to focus a recently opened window
         setTimeout('newwin.focus();',250);
    }
}

//------------------------------------------------------------------------------launch full win
function launchFullWin(winurl,winname)
{
    //This launches a new window and then
    //focuses it if window.focus() is supported.
      var winl = 0;//screen.width / 2;
      var wint = 0;//screen.height / 2;
    newwin = window.open(winurl,winname,'scrollbars=yes,resizable=yes,menubar=yes,toolbar=yes,top=' + wint + ',left=' + winl + ',width=' + screen.availWidth + ',height=' + screen.availHeight);
    if(parseInt(navigator.appVersion) >= 4)
    {
        //delay a bit here because IE4 encounters errors
        //when trying to focus a recently opened window
         setTimeout('newwin.focus();',250);
    }
}

//------------------------------------------------------------------------------launch centered win
function launchCenteredWin(url, name, width, height, otherfeatures)
{
  var str = "height=" + height + ",innerHeight=" + height;
  str += ",width=" + width + ",innerWidth=" + width;
  if (window.screen) {
    var ah = screen.availHeight - 30;
    var aw = screen.availWidth - 10;

    var xc = (aw - width) / 2;
    var yc = (ah - height) / 2;

    str += ",left=" + xc + ",screenX=" + xc;
    str += ",top=" + yc + ",screenY=" + yc;
  }
  newwin = window.open(url, name, str + ',' + otherfeatures);
  if(parseInt(navigator.appVersion) >= 4)
  {
    //delay a bit here because IE4 encounters errors
    //when trying to focus a recently opened window
     setTimeout('newwin.focus();',250);
  }
}

//------------------------------------------------------------------------------launch news win
function launchNewsWin(winurl,winname)
{
    //This launches a new window and then
    //focuses it if window.focus() is supported.
    newwin = window.open(winurl,winname,'scrollbars=yes,resizable=yes,width=800,height=600');
    if(parseInt(navigator.appVersion) >= 4)
    {
        //delay a bit here because IE4 encounters errors
        //when trying to focus a recently opened window
         setTimeout('newwin.focus();',250);
    }
}

//------------------------------------------------------------------------------launch wallpaper
function launchWallpaper(winurl,winname)
{
    //This launches a new window and then
    //focuses it if window.focus() is supported.
    newwin = window.open(winurl,winname,'scrollbars=no,resizable=no,width=515,height=385');
    if(parseInt(navigator.appVersion) >= 4)
    {
        //delay a bit here because IE4 encounters errors
        //when trying to focus a recently opened window
         setTimeout('newwin.focus();',250);
    }
}
