

/* 
  ##################################################################################################### 
*/

var version=parseFloat(navigator.appVersion), agent=navigator.userAgent.toLowerCase();
var opera=(agent.indexOf('opera')!=-1)?true:false;
var ie=((document.all)&&(version>=4.0)&&(!opera))?true:false;
var nn4=document.layers?true:false;
var dom=(document.getElementById && !document.all)?true:false; 

function getBrowserX() {
if (ie || opera) {
if (typeof(window.screenLeft) == 'undefined') return 0; else return (window.screenLeft);
} else
if (dom || nn4) {
if (typeof(window.screenX) == 'undefined') return 0; else return (window.screenX);
} else return 0;
} 

function getBrowserY() {
if (ie || opera) {
if (typeof(window.screenTop) == 'undefined') return 0; else return (window.screenTop);
} else
if (dom || nn4) {
if (typeof(window.screenY) == 'undefined') return 0; else return (window.screenY);
} else return 0;
}

function getBrowserW() {
  return (typeof window.outerWidth == 'undefined') ? document.body.clientWidth : window.outerWidth;
}

function getBrowserH() {
  return (typeof window.outerHeight == 'undefined') ? document.body.clientHeight : window.outerHeight;
}

/*
  Generische Methode zum Öffnen eines Popups;
  zentriert über dem aufrufenden Browserfenster.
*/
/* function openPopupHtml(title, filename, windowname, breite, hoehe) */
function openCenteredPopup(htmlPage, windowname, breite, hoehe) 
{
 /* htmlPage = "http://www.fondssystem.de/cgi-bin/fs/screenshot.pl?" + title + "&" + filename; */
  
  x =  (getBrowserW() / 2) + getBrowserX();
  x = x - (breite / 2);
  
  y =  (getBrowserH() / 2) + getBrowserY();
  y = y - (hoehe / 2);
  y = y - 20;  
  
  Popup = window.open(htmlPage, windowname,
          "screenX=" + x + ",left=" + x +
          ",screenY=" + y + ",top=" + y +
          ",width=" + breite + ",height=" + hoehe +
          ",toolbar=no,location=no," +
          "directories=no,status=yes,menubar=no," +
          "scrollbars=no,resizable=yes,dependent=yes");
  Popup.focus();
}

/* 
  ##################################################################################################### 
*/


function EasyOrderDownload(Dest) {
 DownloadWindow = window.open("dummy.htm","DownloadWindow","left=100,top=200,width=425,height=220,resizable=no,dependent=yes");
 DownloadWindow.location = Dest;
 DownloadWindow.focus();
}

function EasyOrderRegister(Dest) {
 RegisterWindow = window.open("dummy.htm","RegisterWindow","left=20,top=50,width=440,height=400,resizable=no,dependent=yes,scrollbars");
 RegisterWindow.location = Dest;
 RegisterWindow.focus();
}

function EasyOrderDetails(Dest) {
 DetailWindow = window.open("dummy.htm","DetailWindow","left=30,top=60,width=440,height=400,resizable=no,dependent=yes,scrollbars");
 DetailWindow.location = Dest;
 DetailWindow.focus();
}

function unavailable() {
 UnavailableWindow = window.open("unavailable.htm","UnavailableWindow","left=130,top=160,width=400,height=130,resizable=no,dependent=yes");
 UnavailableWindow.focus();
}

function popup_banner() {
 PopWindow1 = window.open("banner.htm","PopWindow1","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,dependent=yes,width=440,height=270,top=190,left=250");
 PopWindow1.focus();
}

function popup_grafik() {
 PopWindow2 = window.open("grafik.htm","PopWindow2","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,dependent=yes,width=440,height=270,top=190,left=250");
 PopWindow2.focus();
}

function popup_rtfapi() {
 PopWindow6 = window.open("rtfapi.htm","PopWindow6","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,dependent=yes,width=575,height=365,top=160,left=190");
 PopWindow6.focus();
}

function popup_rtfapicommandline() {
 /* PopWindow7 = window.open("rtfapicomline.htm","PopWindow7","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,dependent=yes,width=715,height=475,top=200,left=250");
 PopWindow7.focus();
 */
 openCenteredPopup("rtfapicomline.htm", "RTFPopup", 710, 480);
}

function popup_md5detector() {
 openCenteredPopup("md5detector.htm", "MD5Popup", 310, 180);
}

function popup_sellsystem() {
/* PopWindowSellSystem = window.open("popupsellsystem.htm","PopWindowSellSystem","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,dependent=yes,width=1120,height=825,top=50,left=50");
 PopWindowSellSystem.focus();
*/
  openCenteredPopup("popupsellsystem.htm", "SellSystemPopup", 1150, 830);
}

function popup_renopack() {
/*
 PopWindowRenoPack = window.open("popuprenopack.htm","PopWindowRenoPack","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,dependent=yes,width=1045,height=650,top=50,left=50");
 PopWindowRenoPack.focus();
*/
  openCenteredPopup("popuprenopack.htm", "RenoPopup", 1060, 650);
}

function popup_kulkwitzcup() {
/*
 PopWindowKulkwitzcup = window.open("popupkulkwitzcup.htm","PopWindowKulkwitzcup","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,dependent=yes,width=845,height=690,top=50,left=50");
 PopWindowKulkwitzcup.focus();
*/
  openCenteredPopup("popupkulkwitzcup.htm", "KulkiPopup", 860, 690);
}

function popup_filedeleter() {
/* PopWindow6 = window.open("filedeleterpopup.htm","PopWindow6","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,dependent=yes,width=715,height=430,top=200,left=250");
 PopWindow6.focus();
*/
  openCenteredPopup("filedeleterpopup.htm", "FileDeleterPopup", 710, 430);
}

function popup_europcar() {
 PopWindow6 = window.open("europcar.htm","PopWindow6","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,dependent=yes,width=440,height=550,top=200,left=250");
 PopWindow6.focus();
}

function popup_grafikzoom(img) {
 if (img == 1)
 {
 PopWindow4 = window.open("grafikzoom1.htm","PopWindow4","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,dependent=yes,width=440,height=370,top=120,left=290");
 PopWindow4.focus();
 } else
 if (img == 2)
 {
 PopWindow4 = window.open("grafikzoom2.htm","PopWindow4","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,dependent=yes,width=440,height=370,top=120,left=290");
 PopWindow4.focus();
 } else
 if (img == 3)
 {
 PopWindow5 = window.open("grafikzoom3.htm","PopWindow5","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,dependent=yes,width=475,height=370,top=120,left=290");
 PopWindow5.focus();
 };
}

function popup_scripts() {
 isVisible = true;
 /* PopWindow3 = window.open("","PopWindow3","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,dependent=yes,width=440,height=110,top=190,left=250"); */
 PopWindow3 = window.open("","PopWindow3","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,dependent=yes,width=440,height=270,top=190,left=250");
 PopWindow3.focus();

 if (PopWindow3.innerheight < 200) {isVisible = false};
 PopWindow3.location = "scripts.htm";

 if (isVisible == false) {
 xstep = 20;
 ystep = 20;
 x = 0;
 y = 180;
 while ((x > 0)||(y > 0))
 { y -= 20;  if (y <= 0 ) {ystep = 0 }; PopWindow3.resizeBy(0, ystep);}
 }
}

function init(page) {
 if(self == top) { location.href = page; }
}


