// global variables: var strSWVersion = 'Version 10.0 B1'; // current software version var strSWVersionShort = '10'; var strHWPVersion = '1'; // current version of +Hardware var strRevisionDateG = '01.01.2024'; // revision date of web site var strRevisionDateE = '01-01-2024'; // MM-TT-YYYY: revision date var strSWDateG = '10.07.2023'; // release date of current version var strSWDateE = '07-10-2023'; // MM-TT-YYYY: release date of current version var strHWPDateG = '10.07.2023'; // release date of current version of +Hardware var strHWPDateE = '07-10-2023'; // MM-TT-YYYY: release date of current version +Hardware // var strSWVersionLab = ''; // current software laboratory version ("" if there is none) var strSWVersionLab = 'Version 10.0 B13'; // current software laboratory version ("" if there is none) var oClosureBegin = new Date(2022, 7, 19); // (YY, MM, TT) office closure - attention: subtract 1 from month var oClosureEnd = new Date(2022, 7, 22); var strRootPath = '..'; var nScreenWidth = 1000; var nColCount = 2; var bForumLock = false; strHWPVersion = strSWVersion + '-' + strHWPVersion; ForwardToPrimary(); if (g_bForwardToSecure) { ForwardToSecure(); } function HeaderWithCookiePermission(nLan, nTopic, strHeading, strForumMenu, strRootPathPar) { // ********************************************************************************** // // language selection for forum: var strFilePath = UrlGetFilePath(document.URL); if (strFilePath.indexOf('/' + g_strForumDir + '/') >= 0) { var strLang = UrlGetParam(document.URL, 'nlang'); if (strLang != '') { if (!OnChangeLanguage((strLang == 'en') ? 1 : 2)) { return; } location.href = UrlExtractParam(document.URL, 'nlang'); } } // ********************************************************************************** nLan = AdjustLanguage(nLan); if (!CookieIsPermitted(nLan)) { return; } Header(nLan, nTopic, strHeading, strForumMenu, strRootPathPar); } function Header(lan, topic, heading, ForumMenu, strRootPathPar) { lan = AdjustLanguage(lan); var bReconstruct = false; // set this to true to enable forwarding to reconstruction page if (bReconstruct) { if (InputRead('allowentry') == 'yes') { SessionWrite('allowentry', 'yes'); } else { if (InputRead('allowentry') == 'no') { SessionWrite('allowentry', 'no'); } location.href = g_strUrl + '/reconstruct/index.html'; return; } } var bDisableForum = false; // set this to true to disable forum var oNow = new Date(); var oDisable = new Date(2014, 11, 17); if (oNow < oDisable) { bDisableForum = true; // set this to true to disable forum } if (bDisableForum) { if (document.URL.indexOf('/' + g_strForumDir + '/') >= 0) { AlertEx((lan == 2) ? "Das Forum ist wegen Datenbankproblemen zeitweilig leider nicht zugreifbar." : "Due to database problems the forum is temporarily not available."); location.href = g_strUrl + '/index.html'; return; } } if ((typeof strRootPathPar) != 'undefined') { strRootPath = strRootPathPar; } var showmenushow = false; var showmenu = true; if ((typeof ForumMenu) != 'undefined') { showmenushow = navigator.cookieEnabled; showmenu = (CookieRead("MenuForum") != 'no'); } nScreenWidth = 1000; if (!showmenu) { nColCount = 1; nScreenWidth = window.innerWidth; if ((typeof nScreenWidth) == 'undefined') { nScreenWidth = document.body.clientWidth; if ((typeof nScreenWidth) == 'undefined') { nScreenWidth = document.documentElement.clientWidth; if ((typeof nScreenWidth) == 'undefined') { nScreenWidth = document.documentElement.clientWidth; } nScreenWidth = screen.width; } } nScreenWidth = Math.max(850, nScreenWidth - 50); } else { if (screen.width >= 1280) { nColCount = 3; nScreenWidth = 1150; } } heading = document.title; var doc = document; // window.onload = OnLoad; if (window.addEventListener) window.addEventListener("load", OnLoad, false) else if (window.attachEvent) window.attachEvent("onload", OnLoad) else window.onload=OnLoad doc.write('
');/*AHe*/ doc.write(' ');/*AHe*/ doc.write(' '); PageHeader(lan); doc.write('
'); LeftColumn(lan, topic, heading, ForumMenu); RightColumn(lan, ForumMenu); CenterColumn(lan, heading, showmenu, showmenushow); } function SubmitSearchQuery(nLan) { window.location = strRootPath + '/' + ((nLan == 2) ? 'seiten' : 'pages') + '/search.htm?SEARCHTERM=' + escape(document.getElementById('SEARCHTERM').value); return false; } function OnFocusSearchQuery(nLan, oInput) { if (oInput.value == ((nLan == 2) ? 'Suchen auf ' + g_strDomain + '...' : 'Search ' + g_strDomain + '...')) { oInput.value = ''; oInput.style.color = ''; } return false; } function Search(nLan) { return; var doc = document; doc.write(''); } function AdjustLanguage(nLan) { switch (nLan) { case 1: case 2: { return nLan; } default: { var strLan = CookieRead('phpbb3_kdilf_lang'); switch (strLan) { case 'en': { return 1; } case 'de': { return 2; } default: { var bGerman = false; if ((typeof navigator.browserLanguage) != 'undefined') { if (navigator.browserLanguage.substring(0,2) == 'de') { bGerman = true; } } else if ((typeof navigator.language) != 'undefined') { if (navigator.language.substring(0,2) == 'de') { bGerman = true; } } return bGerman ? 2 : 1; } } } } } function OnChangeLanguage(nLan) { if (!CookieIsPermitted(nLan)) { return false; } var strLan = ((nLan == 1) ? 'en' : 'de'); CookieWrite('phpbb3_kdilf_lang', strLan, 10*365*24*60*60*1000); return true; } function Language(lan) { var doc = document; var strLinkGerman = document.URL; var strLinkEnglish = document.URL; strLinkGerman = strLinkGerman.replace(/pages/g, 'seiten'); strLinkGerman = strLinkGerman.replace(/nlang=en/g, 'nlang=de'); strLinkEnglish = strLinkEnglish.replace(/seiten/g, 'pages'); strLinkEnglish = strLinkEnglish.replace(/nlang=de/g, 'nlang=en'); if ((UrlGetFilePath(document.URL).indexOf('/' + g_strForumDir + '/') >= 0) && (UrlGetParam(document.URL, 'nlang') == '')) { strLinkEnglish = strLinkEnglish + ((strLinkEnglish.indexOf('?') >= 0) ? '&' : '?') + 'nlang=en'; strLinkGerman = strLinkGerman + ((strLinkGerman.indexOf('?') >= 0) ? '&' : '?') + 'nlang=de'; } doc.write('
'); doc.write(''); doc.write('
'); doc.write(((lan == 2) ? '' : '') + '' + ((lan == 2) ? 'Deutsch' : 'German') + '' + ((lan == 2) ? '' : '')); doc.write(''); doc.write(((lan != 2) ? '' : '') + '' + ((lan == 2) ? 'Englisch' : 'English') + '' + ((lan != 2) ? '' : '')); doc.write('
'); doc.write('
'); } function PageHeader(lan) { var doc = document; doc.write(''); doc.write(''); } function MenuRight(lan) { var doc = document; var url = document.URL.toString().substr(0, 5); var prefix = ''; if (lan == 2) { prefix = (url == "https") ? g_strUrl + '/seiten/' : '../seiten/'; } else if (lan == 0) { prefix = (url == "https") ? g_strUrl + '/pages/' : 'pages/'; } else { prefix = (url == "https") ? g_strUrl + '/pages/' : '../pages/'; } strOutput="'); } function LeftColumn(lan, topic, heading, ForumMenu) { if (nColCount <= 1) { return; } var doc = document; doc.write('
');/*AHe*/ doc.write('
'); LeftMenu(lan, ForumMenu); doc.write('
'); if (nColCount <= 2) { Splash(lan, topic); ShowHits(lan); } doc.write('
');/*AHe*/ } function RightColumn(lan, ForumMenu) { if (nColCount <= 2) { return; } var doc = document; doc.write('
');/*AHe*/ doc.write('
'); RightMenu(lan, ForumMenu); doc.write('
'); Splash(lan); ShowHits(lan); doc.write('
');/*AHe*/ } function LeftMenu(lan, strForumMenu) { if (nColCount <= 2) { BreakingNews(lan, true); } var doc = document; var url = document.URL.toString().substr(0, 5); var prefix = ''; if (lan == 2) { prefix = (url == "https") ? g_strUrl + '/seiten/' : '../seiten/'; } else if (lan == 0) { prefix = (url == "https") ? g_strUrl + '/pages/' : 'pages/'; } else { prefix = (url == "https") ? g_strUrl + '/pages/' : '../pages/'; } /* if (((typeof ForumMenu) != 'undefined') && (nColCount <= 2)) { MenuOben((lan == 1)? 'Forum' : 'Forum', 'menu_forum'); doc.write(ForumMenu); MenuUnten('menu_forum'); } */ if (nColCount <= 2) { ForumMenu(lan); } MenuOben((lan <= 1)? 'Products' : 'Produkte','menu_products');/*AHe*/ MenuEntry((lan <= 1)? "TrainController™" : "TrainController™", prefix + "traincontroller.htm"); MenuEntry((lan <= 1)? "TrainProgrammer™" : "TrainProgrammer™", prefix + "trainprogrammer.htm"); MenuEntry((lan <= 1)? "Handheld Control +SmartHand™" : "Handsteuerung +SmartHand™", prefix + "handheld.htm"); MenuEntry((lan <= 1)? "Auto Control +Street™" : "Autosteuerung +Street™", prefix + "street.htm"); MenuEntry((lan <= 1)? "Sound +4DSound™" : "Sound +4DSound™", prefix + "sound.htm"); MenuEntry((lan <= 1)? "+Cargo™" : "+Cargo™", prefix + "cargo.htm"); MenuEntry((lan <= 1)? "Network +Net™" : "Netzwerk +Net™", prefix + "network.htm"); // MenuEntry((lan <= 1)? "Rocomotion™" : "Rocomotion™", prefix + "rocomotion.htm"); MenuUnten('menu_products');/*AHe*/ MenuOben((lan <= 1)? 'News' : 'Aktuelles','menu_news');/*AHe*/ if (lan <= 1) { MenuEntry("Latest Announcements", g_strForumUrl + "/viewforum.php?f=10&language=english"); } else { MenuEntry("Neueste Ankündigungen", g_strForumUrl + "/viewforum.php?f=11&language=german"); } MenuEntry((lan <= 1)? "Version History" : "Versionshistorie", prefix + "history.htm"); MenuUnten('menu_news');/*AHe*/ MenuOben((lan <= 1)? 'Online Shop' : 'Online-Shop','menu_shop');/*AHe*/ MenuEntry((lan <= 1)? "Ordering & Pricing" : "Bestellung & Preise", prefix + "register.htm"); MenuEntry((lan <= 1)? "Upgrade License" : "Upgrade-Lizenz", prefix + "upgrade.htm"); if (lan <= 1) { MenuEntry('Your Shopping Cart', g_strSecureUrl + '/pages/cart.htm'); } else { MenuEntry('Ihr Warenkorb', g_strSecureUrl + '/seiten/cart.htm'); } MenuUnten('menu_shop');/*AHe*/ MenuOben((lan <= 1)? 'Links' : 'Verweise','menu_links');/*AHe*/ MenuEntry((lan <= 1)? "About us" : "Über uns", prefix + "vision.htm"); MenuEntry((lan <= 1)? "References" : "Referenzen", prefix + "references.htm"); MenuEntry((lan <= 1)? 'System Requirements' : 'Systemanforderungen', (lan <= 1)? (g_strForumUrl + '/viewtopic.php?t=6263') : (g_strForumUrl + '/viewtopic.php?t=6264')); MenuEntry((lan <= 1)? "Digital Systems" : "Digitalsysteme", prefix + "hardware.htm"); MenuEntry((lan <= 1)? "Advice & Help" : "Rat & Tat", prefix + "references.htm#Rat_und_Tat"); MenuEntry((lan <= 1)? "Training Courses" : "Seminare", prefix + "references.htm#Seminare"); MenuEntry((lan <= 1)? "Exhibition Layouts" : "Ausstellungsanlagen", prefix + "references.htm#Ausstellungsanlagen"); MenuEntry((lan <= 1)? "Press" : "Presse", prefix + "references.htm#Presse"); MenuEntry((lan <= 1)? "Dealers" : "Händler", prefix + "dealerlist.htm"); MenuUnten('menu_links');/*AHe*/ } function RightMenu(lan, strForumMenu) { BreakingNews(lan, true); var doc = document; var url = document.URL.toString().substr(0, 5); var prefix = ''; if (lan == 2) { prefix = (url == "https") ? g_strUrl + '/seiten/' : '../seiten/'; } else if (lan == 0) { prefix = (url == "https") ? g_strUrl + '/pages/' : 'pages/'; } else { prefix = (url == "https") ? g_strUrl + '/pages/' : '../pages/'; } /* if ((typeof ForumMenu) != 'undefined') { MenuOben((lan == 1)? 'Forum' : 'Forum', 'menu_forum'); doc.write(ForumMenu); MenuUnten('menu_forum'); } */ ForumMenu(lan); } function ForumMenu(lan) { if (bForumLock) { var doc = document; doc.write(''); if (lan==2) { doc.write('Momentan ist das Forum nicht erreichbar.'); } else { doc.write('The forum is currently not accessible.'); } doc.write(''); return; } var url = document.URL.toString().substr(0, 5); var strForumUrl = (url == "https") ? g_strSecureForumUrl : g_strForumUrl; var strForumMenuUrl = ((typeof g_strForumMenuUrl) != 'undefined') ? g_strForumMenuUrl : g_strForumUrl; if (url == "https") { strForumMenuUrl = ((typeof g_strSecureForumMenuUrl) != 'undefined') ? g_strSecureForumMenuUrl : g_strSecureForumUrl; } if (strForumMenuUrl != '') { var strLang = ''; var strFilePath = UrlGetFilePath(document.URL); if (strFilePath.indexOf('/' + g_strForumDir + '/') < 0) { strLang = '?language=' + ((lan == 1) ? 'en' : 'de'); } document.write(''); } } function MenuSwitch(nLan) { if (navigator.cookieEnabled) { var bShowMenu = (CookieRead("MenuForum") != 'no'); if (bShowMenu) { document.write('' + ((nLanguage != 2) ? 'Hide Menu' : 'Menü verbergen') + ''); } else { document.write('' + ((nLanguage != 2) ? 'Show Menu' : 'Menü anzeigen') + ''); } } } function MenuHide() { CookieWrite("MenuForum", "no", 3*24*60*60*1000); location.reload(); } function MenuShow() { CookieWrite("MenuForum", "yes", 3*24*60*60*1000); location.reload(); } function MenuTitle(Title) { var doc = document; doc.write(' '); } function MenuTitleTop() { var doc = document; doc.write('
');/*AHe*/ doc.write('
');/*AHe*/ doc.write('
');/*AHe*/ } function MenuTitleFoot() { var doc = document; doc.write('
');/*AHe*/ doc.write('
');/*AHe*/ doc.write('
');/*AHe*/ } function MenuFooter() { var doc = document; doc.write('
');/*AHe*/ doc.write('
');/*AHe*/ doc.write('
');/*AHe*/ doc.write('
');/*AHe*/ doc.write('
');/*AHe*/ doc.write('
');/*AHe*/ } function MenuOben(Title,Menu_Typ) /*AHe neue Funktion, die oberen Teil eines Menu-Blockes abdeckt */ { var doc = document; MenuTitleTop(); MenuTitle(Title); MenuTitleFoot(); doc.write(''); MenuFooter(); } function MenuEntry(Text, Url) { var doc = document; doc.write('
  • '); doc.write('' + Text + ''); doc.write('
  • '); } function MenuTitleRight() /* momentan identisch mit MenuTitleTop */ { var doc = document; doc.write('
    ');/*AHe*/ doc.write('
    ');/*AHe*/ doc.write('
    ');/*AHe*/ } function MenuRightEntry(Text, Url) { var doc = document; VerticalText('
  • ' + Text + '
  • ', 'float:left;');/*AHe*/ } function NaviEntry(Text, Url, bBullet)/*AHe*/ { if ((typeof Url) != 'undefined') { document.write('
  • ' + Text + '
  • '); } else { document.write('
  • ' + Text + '
  • '); } if ((typeof bBullet) == 'undefined') { bBullet = true; } if (bBullet) { document.write('
  • '); } } function BreakingNews(lan, bLeftMenu) { var doc = document; var strCode = GetVerticalTextCode((lan == 2) ? 'Letzte Neuigkeiten' : 'Breaking News'); if (bLeftMenu) { // return; MenuOben(strCode, 'left_header'); doc.write('
    '); var i; for (i = 0; i < 2; i++) { if (i == 0) { doc.write('
    '); doc.write('


    '); } else { doc.write('
    '); doc.write('
    '); } var oNow = new Date(); if (oNow.getTime() <= (oClosureEnd.getTime() + 1000 * 60 * 60 * 24 * 1)) { doc.write(''); if (lan==2) { doc.write(oClosureBegin.getDate() + '.' + (oClosureBegin.getMonth() + 1) + '. bis ' + oClosureEnd.getDate() + '.' + (oClosureEnd.getMonth() + 1) + '.' + oClosureEnd.getFullYear() + ':
    Unser Büro ist geschlossen.
    Alle in diesem Zeitraum eingehenden Bestellungen werden danach so schnell wie möglich bearbeitet.
    Vielen Dank für Ihr Verständnis.'); doc.write('
    '); } else { doc.write((oClosureBegin.getMonth() + 1) + '-' + oClosureBegin.getDate() + ' to ' + (oClosureEnd.getMonth() + 1) + '-' + oClosureEnd.getDate() + '-' + oClosureEnd.getFullYear() + ':
    Our office is closed.
    All orders received during this period will be processed as soon as possible thereafter.
    Thank you very much for your understanding.'); doc.write('
    '); } doc.write('
    '); } doc.write(''); if (lan==2) { // doc.write('18.11. bis 21.11.2010:
    Besuchen Sie uns auf der Modellbahn Köln.
    Mehr >'); // doc.write('
    '); // doc.write('05.04.2014:
    Offizielle Unterstützung für Windows 8!'); // doc.write('
    '); var strNews = ''; strNews = ''; if (strNews != '') { doc.write(strNews); doc.write('
    '); } doc.write(strSWDateG + ':
    Aktuelle Software:
    ' + strSWVersion + ' Download >'); doc.write('
    '); /* doc.write(''); doc.write('Achtung:
    Upgrades auf Version 10 zum Spezialpreis nur noch bis Jahresende möglich.

    Mehr Informationen >'); doc.write('
    '); doc.write('
    '); */ doc.write(''); doc.write('Achtung
    TrainController-Anwender:

    Ab Version 10 muß Ihr Modellbahn-PC mit dem Internet verbunden sein.

    Mehr Informationen >'); doc.write('
    '); doc.write('
    '); /* doc.write(''); doc.write('Achtung:
    Für Lizenzen von TrainController 7, 8 und 9, die vor dem 1. Juli 2021 erworben wurden, bieten wir keinen Austausch von defekten USB-Sticks mehr an.

    Mehr Informationen >'); doc.write('
    '); doc.write('
    '); */ doc.write('30.12.2019:
    Wir begrüßen das 20000. Mitglied in unserem Forum !'); } else { // doc.write('11-18 to 11-21-2010:
    Visit us at the train show in Koeln.
    More >'); // doc.write('
    '); // doc.write('04-05-2014:
    Official Support of Windows 8!'); // doc.write('
    '); doc.write(strSWDateE + ':
    Current Software:
    ' + strSWVersion + ' Download >'); doc.write('
    '); /* doc.write(''); doc.write('Attention:
    Upgrades to version 10 at a special price are only possible until the end of the year.

    More Information>'); doc.write('
    '); doc.write('
    '); */ doc.write(''); doc.write('Attention
    TrainController Users:

    From Version 10, your model railway PC must be connected to the Internet.

    More Information>'); doc.write('
    '); doc.write('
    '); /* doc.write(''); doc.write('Attention:
    For TrainController 7, 8 and 9 licenses that were purchased before July 1st, 2021, we no longer offer the replacement of defective USB sticks.

    More Information>'); doc.write('
    '); doc.write('
    '); */ doc.write('12-30-2019:
    We welcome member no. 20000 in our forum !'); } doc.write('
    '); if (i == 0) { } else { doc.write('
    '); } doc.write('
    '); // ticker; } doc.write('
    '); MenuUnten('left_header'); } else { return; MenuTitleRight() doc.write('
    '); var strCode = GetVerticalTextCode((lan == 2) ? 'Aktuelle Schlagzeile' : 'Breaking News'); CenterText(strCode); doc.write('
    '); MenuTitleFoot() doc.write('
    '); doc.write(''); /******************************************** doc.write(''); ********************************************/ /******************************************** var strHeadLine = ''; strHeadLine = ''; if (strHeadLine != '') { doc.write(''); } else { doc.write(''); doc.write(''); doc.write(''); } ********************************************/ /******************************************** Remove -> doc.write(''); doc.write(''); doc.write(''); Remove <- *********************************************/ doc.write('
    '); doc.write(''); if (lan==2) { doc.write('
    Derzeit kann es beim Zugriff über das Netz der Telekom zu Störungen kommen.
    Wenn das Laden von Inhalten unseres Servers nicht klappt, so probieren Sie es bitte später noch einmal.
    '); } else { // doc.write('New Version ' + strSWVersionShort + ' released !!

    Read more...'); } doc.write('
    '); doc.write('
    '); doc.write('
    '); doc.write(strHeadLine ); doc.write('

    '); doc.write('
    '); doc.write('Version 10'); doc.write(''); doc.write(''); if (lan==2) { doc.write('Neue Version 10 erschienen !!

    Weiterlesen...'); } else { doc.write('New Version 10 released !!

    Read more...'); } doc.write('
    '); doc.write('
    '); doc.write('
    '); doc.write('Version 10'); doc.write(''); doc.write('Christmas'); doc.write(''); doc.write(''); if (lan==2) { // doc.write('
    Wir wünschen allen Anwendern, Freunden und Geschäftspartnern mit Ihren Familien
    ein ////////. ////fröhliches Weihnachtsfest
    und einen guten Start in ein gesundes und erfolgreiches Neues Jahr !'); doc.write('
    Wir wünschen allen Anwendern, Freunden und Geschäftspartnern mit Ihren Familien
    eine schöne Weihnachtszeit
    und bleiben Sie gesund !'); } else { // doc.write('
    We wish all users, friends and partners
    Merry Christmas
    and a Happy New Year !'); doc.write('
    We wish all users, friends and partners
    Merry Christmas
    and stay healthy !'); } doc.write('

    '); doc.write('
    '); doc.write('
    '); doc.write('Christmas'); doc.write('
    '); doc.write('
    '); MenuFooter();/*AHe*/ } } function CenterColumn(lan, heading, showmenu, showmenushow) { var doc = document; var url = document.URL.toString().substr(0, 5); var link = ''; var image = ''; strStyle = ''; if (nColCount <= 1) { strStyle += ' margin-left: 0em;'; } if (nColCount <= 2) { strStyle += ' margin-right: 0em;'; } doc.write('
    '); BreakingNews(lan, false); MenuTitleRight() if ((typeof heading) != 'undefined') { doc.write('
    '); CenterText(GetVerticalTextCode(heading, 'float: left; ')); doc.write('
    '); if (showmenushow) { if (showmenu) { doc.write('' + ((lan <= 1) ? 'Hide Menu' : 'Menü verbergen') + ''); } else { doc.write('' + ((lan <= 1) ? 'Show Menu' : 'Menü anzeigen') + ''); } } } MenuTitleFoot() doc.write('
    '); doc.write('
    '); } function RightFooter(lan) { var doc = document; var strCurrentLocation = document.URL; var url = strCurrentLocation.toString().substr(0, 5); doc.write(' '); MenuFooter();/*AHe*/ doc.write('
    '); doc.write('
    '); doc.write('
    '); RightFooter(lan); doc.write('
    '); AlertExImpl(); } /****************************************************************************************************/ /* */ /* The splash boxes */ /* */ /****************************************************************************************************/ function SplashContent(nLan, strImage, upper, lower) { var doc = document; doc.write('
    '); VerticalText('
    ' + upper + '
    ', 'width: 100%;'); doc.write('
    '); doc.write('
    '); var nSep = strImage.indexOf('/'); // Photo(nLan, strImage.substr(0, nSep), strImage.substr(nSep), PHOTOBLOCK | PHOTONOBORDER | PHOTONOSHADOW, ' ') Image(nLan, strRootPath + '/images/layout/' + strImage + '.jpg', '', PHOTOBLOCK | PHOTONOBORDER | PHOTONOSHADOW); // doc.write(''); // doc.write('
    '); doc.write('
    '); doc.write('
    '); VerticalText('
    ' + lower + '
    ', 'width: 100%;'); doc.write('
    '); } function Splash(nLan, topic) { var doc = document; var astrImage = new Array(); var nImage = 0; astrImage[nImage++] = 'berlin/101'; astrImage[nImage++] = 'berlin/102'; astrImage[nImage++] = 'berlin/103'; astrImage[nImage++] = 'dietenhofen/101'; astrImage[nImage++] = 'driburg/101'; astrImage[nImage++] = 'eversum/101'; astrImage[nImage++] = 'eversum/102'; astrImage[nImage++] = 'koenigstein/101'; astrImage[nImage++] = 'koenigstein/102'; astrImage[nImage++] = 'oberhausen/101'; astrImage[nImage++] = 'oberhausen/102'; astrImage[nImage++] = 'oberhausen/103'; astrImage[nImage++] = 'oberhausen/104'; astrImage[nImage++] = 'oberhausen/105'; astrImage[nImage++] = 'oberhausen/106'; astrImage[nImage++] = 'oberhausen/107'; astrImage[nImage++] = 'selbitz/101'; astrImage[nImage++] = 'selbitz/102'; astrImage[nImage++] = 'selbitz/103'; astrImage[nImage++] = 'selbitz/104'; astrImage[nImage++] = 'veit/101'; astrImage[nImage++] = 'veit/102'; astrImage[nImage++] = 'veit/103'; var now = new Date(); var nImage = (now.getSeconds()) % astrImage.length; strImage = astrImage[nImage]; var astrTitle = new Array(); var astrText = new Array(); var nIndex = 0; if (nLan==1) { var i; for (i = 0; i < 3; i++) { astrTitle[nIndex] = 'TrainController'; astrText[nIndex++] = 'The leading software for Model Railroad Computer Control!'; } for (i = 0; i < 2; i++) { astrTitle[nIndex] = 'TrainProgrammer'; astrText[nIndex++] = 'For all DCC-, Selectrix- and LocoNet compatible Decoder and Devices!'; } astrTitle[nIndex] = 'TrainController'; astrText[nIndex++] = 'Award Winning!'; astrTitle[nIndex] = 'Railroad & Co.™
    Forum'; astrText[nIndex++] = 'More than
    20000
    Members!'; astrTitle[nIndex] = '+SmartHand
    Mobile'; astrText[nIndex++] = 'Control your layout with your cell phone!'; astrTitle[nIndex] = '+SmartHand
    Mobile'; astrText[nIndex++] = 'Control your layout with a second PC!'; astrTitle[nIndex] = '+SmartHand'; astrText[nIndex++] = 'The smart handheld railroad control system!'; astrTitle[nIndex] = '+Net'; astrText[nIndex++] = 'Control your layout in a network with several computers!'; astrTitle[nIndex] = '+Street'; astrText[nIndex++] = 'Realistic control of street traffic!'; astrTitle[nIndex] = '+4DSound'; astrText[nIndex++] = 'Realistic multi train/
    multi channel surround sound for your trains!'; astrTitle[nIndex] = 'Railroad & Co.™'; astrText[nIndex++] = 'New:
    Version ' + strSWVersionShort + '!'; astrTitle[nIndex] = 'Railroad & Co.™'; astrText[nIndex++] = 'Order all programs conveniently on the Internet!'; } else { var i; for (i = 0; i < 3; i++) { astrTitle[nIndex] = 'TrainController'; astrText[nIndex++] = 'Das führende Programm zur Steuerung von Modellbahnen!'; } for (i = 0; i < 2; i++) { astrTitle[nIndex] = 'TrainProgrammer'; astrText[nIndex++] = 'Für alle DCC-, Selectrix- und LocoNet- kompatiblen Decoder und Geräte!'; } astrTitle[nIndex] = 'TrainController'; astrText[nIndex++] = 'Als Testsieger ausgezeichnet!'; astrTitle[nIndex] = 'Railroad & Co.™
    Forum'; astrText[nIndex++] = 'Mehr als 20000 Mitglieder!'; astrTitle[nIndex] = '+SmartHand
    Mobile'; astrText[nIndex++] = 'Steuern Sie Ihre Anlage mit Ihrem Handy!'; astrTitle[nIndex] = '+SmartHand
    Mobile'; astrText[nIndex++] = 'Steuern Sie Ihre Anlage mit einem zweiten PC!'; astrTitle[nIndex] = '+SmartHand'; astrText[nIndex++] = 'Das intelligente Handreglersystem für Ihre Anlage!'; astrTitle[nIndex] = '+Net'; astrText[nIndex++] = 'Steuern Sie Ihre Anlage im Netzwerk mit mehreren Computern!'; astrTitle[nIndex] = '+Street'; astrText[nIndex++] = 'Abwechslungsreicher Straßenverkehr!'; astrTitle[nIndex] = '+Street'; astrText[nIndex++] = 'Volle Unterstützung von Abstandssteuerungen!'; astrTitle[nIndex] = '+4DSound'; astrText[nIndex++] = 'Realistischer Mehrzug-/
    Mehrkanal-Sound
    für jede Modellbahn!'; astrTitle[nIndex] = 'Railroad & Co.™'; astrText[nIndex++] = 'Jetzt aktuell:
    Version ' + strSWVersionShort + '!'; astrTitle[nIndex] = 'Railroad & Co.™'; astrText[nIndex++] = 'Alle Produkte
    bequem über
    Internet bestellen!'; } // if(topic==0) { topic = (Math.round(Math.random() * 100)); } topic = topic % astrText.length; doc.write(' '); MenuDarkFooter() /*AHe 100806 */ } function MenuDarkHeader() /*AHe 100806 */ { var doc = document; doc.write('
    '); doc.write('
    '); doc.write('
    '); doc.write('
    '); doc.write('
    '); doc.write('
    '); } function MenuDarkFooter() /*AHe 100806 */ { var doc = document; doc.write('
    '); doc.write('
    '); doc.write('
    '); doc.write('
    '); doc.write('
    '); doc.write('
    '); } /****************************************************************************************************/ /* */ /* hit counter */ /* */ /****************************************************************************************************/ function ShowHits(nLan) { return; // disabled for the time being if (!navigator.cookieEnabled) { return; } var url = document.URL.toString().substr(0, 5); if (url == "https") { return; } var doc = document; if (!IsMyself() && (CookieRead("ShowClusterMap") != 'no')) { doc.write('Locations of visitors to this page'); } // if (IsMyself()) { doc.write('
    '); // doc.write((nLan == 2) ? 'Woher kommen unsere Besucher?' : 'Where our visitors come from:'); doc.write('Locations of visitors to this page
    '); doc.write(''); // doc.write((nLan == 2) ? 'Zum Vergrössern
    Landkarte anklicken.' : 'Click to map for larger image.'); doc.write('
    '); doc.write('
    '); } CookieWrite("ShowClusterMap", "no", 30*60*1000); } /****************************************************************************************************/ /* */ /* Cookie helper functions */ /* */ /****************************************************************************************************/ function CookieIsPermittedCheck() { return (CookieRead('CookieAccepted') == 'yes'); } function CookiePermissionSet(nLan) { // CookieWrite('CookieAccepted', 'yes', 4*7*24*60*60*1000); CookieWrite('CookieAccepted', 'yes'); // this is a good opportunity to store the language: OnChangeLanguage(nLan); } function CookieGetCookiePage(nLan) { var strUrl = g_strUrl + ((nLan == 2) ? '/seiten' : '/pages') + '/cookie.htm'; if (UrlGetFileBase(location.href) == 'cookie.htm') { var strParam = UrlGetParamString(location.href); if (nLan == 1) { strParam = strParam.replace(/seiten/g, 'pages'); } else { strParam = strParam.replace(/pages/g, 'seiten'); } return strUrl + strParam; } var arrParam = new Array(); arrParam[arrParam.length] = 'Continue'; var arrValue = new Array(); arrValue[arrValue.length] = encodeURIComponent(location.href); return strUrl + '?' + arrParam[0] + '=' + arrValue[0]; } function CookieIsPermitted(nLan) { // CookieWrite('CookieAccepted', '', 4*7*24*60*60*1000); if (!CookieIsPermittedCheck()) { var strUrl = CookieGetCookiePage(nLan); if (strUrl != location.href) { location.href = strUrl; window.reload(); } return false; } return true; } function CookieWrite(name, value, expires) { switch (name) { case 'CookieAccepted': case 'letstest': { break; } default: { if (!CookieIsPermitted(2)) { return; } break; } } var cook = name + '=' + value + ';path=/'; if ((typeof expires) != 'undefined') { var a = new Date(); a = new Date(a.getTime() + expires); cook = cook + ';expires=' + a.toGMTString() + ';'; } document.cookie = cook; } function CookieRead(name) { var a = document.cookie; var res = ''; while(a != '') { var cookiename = a.substring(0,a.search('=')); var n = a.search(';'); if (n < 0) { n = a.length; } var cookiewert = a.substring(a.search('=')+1, n); while (cookiename.substring(0, 1) == ' ') { cookiename = cookiename.substring(1); } if(name == cookiename) { res = cookiewert; a = ''; } else { var i = a.search(';')+1; if(i == 0){i = a.length} a = a.substring(i,a.length); } } return(res) } /****************************************************************************************************/ /* */ /* "Pseudo Session Var" helper functions */ /* */ /****************************************************************************************************/ function SessionRead(name) { var strSession = CookieRead('SESSION'); var aSession = strSession.split(' '); for (var i = 0; i < aSession.length; i += 2) { if (aSession[i] == name) { return decodeURI(aSession[i + 1]); } } return ''; } function SessionWrite(name, value, bExtend) { if ((typeof bExtend) == 'undefined') { bExtend = false; } if (bExtend) { var strOldValue = SessionRead(name); if (strOldValue.indexOf(value) >= 0) { return; } value = strOldValue + value; } var strSession = CookieRead('SESSION'); var aSession = strSession.split(' '); for (var i = 0; i < aSession.length; i += 2) { if (aSession[i] == name) { if (value != '') { aSession[i+1] = encodeURI(value); } else { aSession.splice(i, 2); } break; } } if ((i >= aSession.length) && (value != '')) { aSession[i] = name; aSession[i+1] = encodeURI(value); } strSession = aSession.join(' '); CookieWrite('SESSION', strSession, 12*60*60*1000); if ((value != '') && (SessionRead(name) == '')) { if (CalcLanguage() == 2) { alert("Achtung: die Benutzung von Cookies muss eingeschaltet sein,\nda unser Shopsystem sonst nicht funktioniert."); } else { alert("Attention: the use of cookies must be enabled,\notherwise our shop system will not work."); } return; } } /****************************************************************************************************/ /* */ /* Param line helper functions */ /* */ /****************************************************************************************************/ function ParameterRead(name) { var a = location.href; var n = -1; for (var c = 0; c < a.length; c++) { if (a.substring(c, c+1) == '?') { n = c; break; } } if (n < 0) { return ''; } a = a.substring(n+1,a.length); var res = ''; while(a != '') { var cookiename = a.substring(0,a.search('=')); var n = a.search('\&'); if (n < 0) { n = a.length; } var cookiewert = a.substring(a.search('=')+1, n); while (cookiename.substring(0, 1) == ' ') { cookiename = cookiename.substring(1); } if(name == cookiename) { res = cookiewert; a = ''; } else { var i = a.search('&')+1; if(i == 0){i = a.length} a = a.substring(i,a.length); } } for (var c = 0; c < res.length; c++) { if (res.substring(c, c+1) == '+') { res = res.substring(0, c) + ' ' + res.substring(c + 1, res.length); } } return unescape(res); return decodeURIComponent(res); } function ParameterConvert(arrParam, arrValue) { var a = location.href; var n = a.indexOf('?'); if (n < 0) { return ''; } a = a.substring(n+1,a.length); while(a != '') { var cookiename = a.substring(0,a.search('=')); var n = a.search('\&'); if (n < 0) { n = a.length; } var cookiewert = a.substring(a.search('=')+1, n); while (cookiename.substring(0, 1) == ' ') { cookiename = cookiename.substring(1); } arrParam[arrParam.length] = cookiename; arrValue[arrValue.length] = unescape(cookiewert); var i = a.search('&')+1; if(i == 0){i = a.length} a = a.substring(i,a.length); } } function InputRead(name) { var strRes = ParameterRead(name); if (strRes == '') { strRes = SessionRead(name); } if (strRes == '') { strRes = CookieRead(name); } return strRes; } function WriteHiddenParam(strParam, strValue) { if ((typeof strValue) == 'undefined') { strValue = InputRead(strParam); } document.write(''); } function PostToURL(strUrl, arrParam, arrValue) { var form = document.createElement('form'); form.setAttribute('method', 'POST'); form.setAttribute('action', strUrl); form.setAttribute('style', 'display: none'); for (var i = 0, l = arrValue.length; i < l; i++) { var e = document.createElement('input'); e.setAttribute('type', 'hidden'); e.setAttribute('name', arrParam[i]); e.setAttribute('value', arrValue[i]); form.appendChild(e); } document.body.appendChild(form); form.submit(); // document.body.removeChild(form); } /****************************************************************************************************/ /* */ /* misc helper functions */ /* */ /****************************************************************************************************/ function UrlGetProt(strUrl) { arr = UrlSplit(strUrl); return arr['Prot']; } function UrlGetHost(strUrl) { arr = UrlSplit(strUrl); return arr['Host']; } function UrlGetFile(strUrl) { arr = UrlSplit(strUrl); return arr['File']; } function UrlGetFilePath(strUrl) { arr = UrlSplit(strUrl); return arr['FilePath']; } function UrlGetFileBase(strUrl) { arr = UrlSplit(strUrl); return arr['FileBase']; } function UrlGetParamString(strUrl) { arr = UrlSplit(strUrl); return arr['ParamString']; } function UrlGetParam(strUrl, strKey) { arr = UrlSplit(strUrl); for (var v = 0; v < arr['ParamArrayKey'].length; v++) { if (arr['ParamArrayKey'][v] == strKey) { return arr['ParamArrayValue'][v]; } } return ''; } function UrlExtractParam(strUrl, strKey) { var arr = UrlSplit(strUrl); var strUrlNew = arr['Prot'] + arr['Host'] + arr['FilePath']; var bFirst = true; for (var v = 0; v < arr['ParamArrayKey'].length; v++) { if (arr['ParamArrayKey'][v] == strKey) { continue; } strUrlNew += (bFirst ? '?' : '&') + arr['ParamArrayKey'][v] + '=' + arr['ParamArrayValue'][v]; } return strUrlNew; } var g_arrUrlCache = new Array(); var g_strUrlCache = ''; function UrlSplit(strUrl) { if (strUrl == g_strUrlCache) { return g_arrUrlCache; } var nFind = strUrl.indexOf('//'); strProt = (nFind >= 0) ? strUrl.substr(0, nFind + 2) : 'http://'; strFile = strUrl.substr(nFind + 2); nFind = strFile.indexOf('/'); strHost = (nFind >= 0) ? strFile.substr(0, nFind) : strFile; strFile = (nFind >= 0) ? strFile.substr(nFind) : ''; var arr = new Array(); arr['Prot'] = strProt; arr['Host'] = strHost; arr['File'] = strFile; var nFind = strFile.indexOf('?'); var strFilePath = strFile; var strParamString = ''; if (nFind >= 0) { strFilePath = strFile.substr(0, nFind); strParamString = strFile.substr(nFind); } arr['FilePath'] = strFilePath; arr['ParamString'] = strParamString; var strFileBase = strFilePath; nFind = strFilePath.lastIndexOf('/'); if (nFind >= 0) { strFileBase = strFilePath.substr(nFind + 1); } arr['FileBase'] = strFileBase; // params in an array: arrParamKey = new Array(); arrParamValue = new Array(); strParamRest = strParamString.substr(1); var res = ''; while(strParamRest != '') { var strKey = strParamRest.substring(0,strParamRest.search('=')); var n = strParamRest.search('\&'); if (n < 0) { n = strParamRest.length; } var strValue = strParamRest.substring(strParamRest.search('=')+1, n); while (strKey.substring(0, 1) == ' ') { strKey = strKey.substring(1); } arrParamKey[arrParamKey.length] = strKey; arrParamValue[arrParamValue.length] = unescape(strValue); var i = strParamRest.search('&')+1; if(i == 0){i = strParamRest.length} strParamRest = strParamRest.substring(i); } arr['ParamArrayKey'] = arrParamKey; arr['ParamArrayValue'] = arrParamValue; /* for (var v = 0; v < arr['ParamArrayKey'].length; v++) { alert(arr['ParamArrayKey'][v] + ' = ' + arr['ParamArrayValue'][v]); } */ g_strUrlCache = strUrl; g_arrUrlCache = arr; return arr; } function ForwardToPrimary() { if (((typeof g_bPrimaryServer) != 'undefined') && g_bPrimaryServer ) { return; } var strLetsTest = InputRead('letstest'); if (strLetsTest != '') { CookieWrite('letstest', strLetsTest); return; } location.href = 'https://www.freiwald.com'; } function ForwardToSecure() { var arr = UrlSplit(location.href); strUrl = g_strSecureUrl + arr['File']; if (strUrl != location.href) { location.href = strUrl; } } function CalcLanguage() { if (location.href.indexOf("seiten") >= 0) { return 2; } return 0; } function IsLocalTest() { return (document.URL.toString().substr(0, 4) == 'file'); } function IsMyself() { var strMyself = ParameterRead('myself'); if (strMyself == '1') { CookieWrite("MySelf", "yes", 10*365*24*60*60*1000); return true; } else if (strMyself == '0') { CookieWrite("MySelf", "no", 10*365*24*60*60*1000); return false; } if (CookieRead("MySelf") == 'yes') { return true; } return false; } function isalpha(c) { if (('A' <= c) && (c <= 'Z')) { return true; } if (('a' <= c) && (c <= 'z')) { return true; } return false; } function isdigit(c) { if (('0' <= c) && (c <= '9')) { return true; } return false; } function isalnum(c) { return (isdigit(c) || isalpha(c)); } function hexval(c) { switch (c) { case '0': return 0; case '1': return 1; case '2': return 2; case '3': return 3; case '4': return 4; case '5': return 5; case '6': return 6; case '7': return 7; case '8': return 8; case '9': return 9; case 'a': case 'A': return 10; case 'b': case 'B': return 11; case 'c': case 'C': return 12; case 'd': case 'D': return 13; case 'e': case 'E': return 14; case 'f': case 'F': return 15; } return 0; } function atox(str) { if (str.length != 2) { return 0; } return hexval(str.charAt(0)) * 16 + hexval(str.charAt(1)); } function LocationReplace(str) { var strHref = location.href; strHref = strHref.replace("http:", "https:"); var strTmp = str.replace("http:", "https:"); if (strHref == strTmp) { return; } location.replace(str); } function IsAfter(nDay, nMonth, nYear) { var oBegin = new Date(nYear, nMonth - 1, nDay); // attention: subtract 1 from month var oNow = new Date(); return (oNow >= oBegin); } function IsBefore(nDay, nMonth, nYear) { var oEnd = new Date(nYear, nMonth - 1, nDay, 23, 59, 59); // attention: subtract 1 from month var oNow = new Date(); return (oNow <= oEnd); } function IsBetween(nDayBegin, nMonthBegin, nYearBegin, nDayEnd, nMonthEnd, nYearEnd) { return (IsAfter(nDayBegin, nMonthBegin, nYearBegin) && IsBefore( nDayEnd, nMonthEnd, nYearEnd)); } /****************************************************************************************************/ /* */ /* file functions */ /* */ /****************************************************************************************************/ function TrimString(str) { return str.replace(/^\s+|\s+$/gm,''); // trimm the sting on both ends: } function FileNameToUrl(strFile) { if (strFile.substr(0, 5) == 'http:') { return strFile; } var strLocation = (IsLocalTest()) ? (g_strUrl + '/seiten/download.htm') : location.href; strLocation = strLocation.replace('\\', '/'); strLocation = strLocation.substring(0, strLocation.lastIndexOf('/') + 1); return strLocation + strFile; } function FileFetchHeader(strUrl) { try { var req=new XMLHttpRequest(); req.open("HEAD", strUrl, false); req.send(null); if(req.status== 200) { return req.getAllResponseHeaders(); // return req.getResponseHeader(strWch); } else { return ''; } } catch(er) { return ''; } } function CFileInfo(strFile) { var strUrl = FileNameToUrl(strFile); this.m_strInfo = FileFetchHeader(strUrl); /* this.m_strName = strName; this.m_strID = strID; this.m_strShareItID = strID; this.m_nPrice = nPrice; this.m_oShippingCosts = ((typeof oShippingCosts) != 'undefined') ? oShippingCosts : new ShopShipping(); this.m_strCurrency = strCurrency; this.m_bNotAvailable = bNotAvailable; */ } CFileInfo.prototype.GetParam = function(strKey) { if (this.m_strInfo == '') { return ''; } var nIndex = this.m_strInfo.indexOf(strKey); if (nIndex < 0) { return ''; } var strParam = this.m_strInfo.substr(nIndex + strKey.length); if (strParam.substr(0, 1) == ':') { strParam = strParam.substr(1); } nIndex = strParam.indexOf('\n'); if (nIndex > 0) { strParam = strParam.substr(0, nIndex); } strParam = TrimString(strParam); // trimm the sting on both ends: return strParam; } CFileInfo.prototype.GetSize = function(bPrintable) { var strSize = this.GetParam('Content-Length'); if ((typeof bPrintable) == 'undefined') { bPrintable = true; } if (bPrintable) { var nSize = Number(strSize); var nTmp = Math.floor(nSize/100000); if (nTmp != 0) { strSize = String(nTmp/10); if (strSize.indexOf('.') < 0) { strSize += '.0'; } strSize += ' MB'; } } return strSize; } CFileInfo.prototype.GetDate = function(nLan) { var strDate = this.GetParam('Last-Modified'); var nIndex = strDate.indexOf(','); if (nIndex >= 0) { strDate = strDate.substr(nIndex + 1); } nIndex = strDate.indexOf(':'); if (nIndex >= 2) { strDate = strDate.substr(0, nIndex - 2); } var astrMonth = [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec', ]; var nMonth = 0; for (nMonth = 0; nMonth < 12; nMonth++) { if (strDate.indexOf(astrMonth[nMonth]) >= 0) { break; } } strDate = strDate.replace(astrMonth[nMonth], '.' + ((nMonth + 1 < 10) ? '0' : '') + String(nMonth + 1) + '.'); strDate = strDate.replace(/ /g, ''); nIndex = strDate.indexOf('.'); if (nIndex == 1) { strDate = '0' + strDate; } if (typeof nLan == undefined) { nLan = 2; // assume german } if (nLan == 1) { strDate = strDate.substr(3, 2) + '-' + strDate.substr(0, 2) + '-' + strDate.substr(6, 4); } return strDate; } CFileInfo.prototype.GetVersion = function() { var strVersion = this.GetDate(2); return strVersion.substr(3); } /****************************************************************************************************/ /* */ /* new functions */ /* */ /****************************************************************************************************/ function OnLoad() { CalcContentDimensions(); } function CalcContentDimensions() { var arrIFrame = document.getElementsByName('iframe'); if ((typeof arrIFrame) == 'undefined') { arrIFrame = document.all.iframe; } var nCount = 0; if ((typeof arrIFrame) != 'undefined') { nCount = arrIFrame.length; } for (nIndex = 0; nIndex < nCount; nIndex++) { var oIFrame = arrIFrame[nIndex]; oIFrame.style.height = oIFrame.contentWindow.document.body.scrollHeight + 'px'; } return; var scroll = document.all.right_content_scroll; scroll.style.overflow = 'auto'; var footer = document.all.right_footer; var page = document.all.center_column; var rcScroll = CalcElementRect(scroll); var rcFooter = CalcElementRect(footer); var rcPage = CalcElementRect(page); rcScroll.bottom += document.body.clientHeight - rcFooter.bottom - (rcFooter.top - rcPage.bottom); var nHeight = (rcScroll.bottom - rcScroll.top); if (nHeight < 50) { nHeight = 50; } var strHeight = nHeight + 'px'; scroll.style.height = strHeight; } function Rect(l, t, r, b) { this.left = l; this.top = t; this.right = r; this.bottom = b; } function Size(cx, cy) { this.cx = cx; this.cy = cy; } function CalcElementRect(o) { var rect = new Rect(0, 0, 0, 0); rect.right = o.offsetWidth; rect.bottom = o.offsetHeight; while(1) { // alert(o.tagName + ' ' + o.offsetLeft); rect.left += o.offsetLeft; rect.top += o.offsetTop; o = o.offsetParent; if (o == null) { break; } } rect.right += rect.left; rect.bottom += rect.top; return rect; } function CalcElementSize(o) { var sz = new Size(0, 0, 0, 0); sz.cx = o.offsetWidth; sz.cy = o.offsetHeight; return sz; } function OnGraphicLinkHover(div) { div.id = 'graphiclink_hover'; } function OnGraphicLinkOut(div) { div.id = 'graphiclink'; } function GraphicLink(link, image, text, x, y, width, height, alttext, nFlags) { if ((typeof alttext) == 'undefined') { alttext = text; } if ((typeof nFlags) == 'undefined') { nFlags = 0; } if (nFlags & PHOTOSPLASHOFFSET) { width = 200; height = 125; } document.write(''); } var PHOTOLEFT = 1; var PHOTORIGHT = 2; var PHOTOCENTER = 3; var PHOTOBLOCK = 4; var PHOTOBLOCKLEFT = 5; var PHOTOBLOCKRIGHT = 6; var PHOTOTEXTOUTSIDE = 8; var PHOTONOBORDER = 16; var PHOTONOSHADOW = 32; var PHOTOSPLASHOFFSET = 1; var PHOTOSPLASH = 64; function Photo(nLan, location, image, flags, strText, author) { var strImage = '../images/layout/' + location + '/' + image + '.jpg'; var strNewText = ''; switch (location) { case 'berlin': { if (((typeof author) == 'undefined') || (author == '')) { author = 'Technikmuseum'; } strNewText = 'Deutsches Technikmuseum Berlin'; break; } case 'budapest': { if (((typeof author) == 'undefined') || (author == '')) { author = 'Miniversum'; } strNewText = 'Miniversum Budapest'; break; } case 'dietenhofen': { if (((typeof author) == 'undefined') || (author == '')) { author = 'Miniatur Erlebniswelt'; } strNewText = 'Miniatur Erlebniswelt Dietenhofen'; break; } case 'driburg': { if (((typeof author) == 'undefined') || (author == '')) { author = 'Modellbundesbahn'; } strNewText = 'Modellbundesbahn Bad Driburg'; break; } case 'eversum': { if (((typeof author) == 'undefined') || (author == '')) { author = 'Freizeitpark'; } strNewText = 'Modellbahn im Freizeitpark Eversum'; break; } case 'koenigstein': { if (((typeof author) == 'undefined') || (author == '')) { author = 'Miniatur-Elbtalbahn'; } strNewText = 'Miniatur-Elbtalbahn Königstein'; break; } case 'oberhausen': { if (((typeof author) == 'undefined') || (author == '')) { author = 'Modellbahnwelt'; } strNewText = 'Modellbahnwelt Odenwald'; break; } case 'petersburg': { if (((typeof author) == 'undefined') || (author == '')) { author = 'Grand-Maket'; } strNewText = 'Grand-Maket St. Petersburg'; break; } case 'selbitz': { if (((typeof author) == 'undefined') || (author == '')) { author = 'Lokland'; } strNewText = 'Lokland Selbitz'; break; } case 'veit': { if (((typeof author) == 'undefined') || (author == '')) { author = 'Museum St. Veit'; } strNewText = (nLan == 1) ? 'Layout in the Museum St. Veit' : 'Modellbahnanlage im Museum St. Veit'; break; } } if (((typeof strText) == 'undefined') || (strText == '')) { strText = strNewText; } if (nLan == 1) { strText += ' (Photo: ' + author + ')'; } else { strText += ' (Foto: ' + author + ')'; } if ((typeof flags) == 'undefined') { flags = PHOTOCENTER; } Image(nLan, strImage, strText, flags); } function ShadowTop(flags) { if ((typeof flags) == 'undefined') { flags = 0; } if (flags & PHOTONOSHADOW) { return; } var strBorder = (flags & PHOTONOBORDER) ? ' border-width: 0px;' : ''; if (flags & PHOTOTEXTOUTSIDE) { document.write('
    '); } document.write('
    '); document.write('
    '); document.write('
    '); document.write('
    '); document.write('
    '); } function ShadowBottom(flags) { if ((typeof flags) == 'undefined') { flags = 0; } if (flags & PHOTONOSHADOW) { return; } document.write('
    '); document.write('
    '); document.write('
    '); document.write('
    '); document.write('
    '); if (flags & PHOTOTEXTOUTSIDE) { document.write('
    '); } } function Image(lan, strImage, strText, flags) { if ((typeof strImage) == 'undefined') { return; } if ((typeof flags) == 'undefined') { flags = PHOTOCENTER + PHOTOTEXTOUTSIDE; } var align = flags & 7; var strClass = ''; switch(align) { case PHOTOBLOCK: { strClass = 'class="photoblock" '; break; } case PHOTOCENTER: { strClass = 'class="photocenter" '; break; } case PHOTOLEFT: { strClass = 'class="photoleft" '; break; } case PHOTORIGHT: { strClass = 'class="photoright" '; break; } case PHOTOBLOCKLEFT: { strClass = 'class="photoblockleft" '; break; } case PHOTOBLOCKRIGHT: { strClass = 'class="photoblockright" '; break; } } if ((typeof strText) == 'undefined') { strText = ''; } switch(align) { case PHOTOBLOCK: case PHOTOBLOCKLEFT: { document.write('
    '); break; } } document.write('
    '); document.write('
    '); ShadowTop(flags); document.write('' + strText + ''); ShadowBottom(flags); if (strText != '') { if (flags & PHOTOTEXTOUTSIDE) { document.write('
    '); document.write('' + strText + ''); document.write('
    '); } else { document.write('
    '); document.write('' + strText + ''); document.write('
    '); document.write('
    '); document.write('' + strText + ''); document.write('
    '); } } document.write('
    '); document.write('
    '); switch(align) { case PHOTOBLOCK: case PHOTOBLOCKRIGHT: { document.write('
    '); break; } } } function ImageShadow(nDrawShadow) { var doc = document; if ((typeof nDrawShadow) != 'undefined') { doc.write('
    ');/*AHe*/ } else { doc.write('
    ');/*AHe*/ } doc.write('
    ');/*AHe*/ doc.write('
    ');/*AHe*/ doc.write('
    ');/*AHe*/ doc.write('
    ');/*AHe*/ doc.write('
    ');/*AHe*/ } function ResizeIFrame(iframe) { iframe.style.height = ((iframe.parentNode.style.visibility == 'visible') ? iframe.contentWindow.document.body.scrollHeight : 0) + 'px'; } function OnClickToggleIFrame(div) { if (div.childNodes[0].style.visibility == 'visible') { div.childNodes[0].style.visibility = 'hidden'; div.childNodes[0].style.width = '0px'; div.childNodes[0].style.height = '0px'; div.childNodes[1].style.visibility = 'visible'; div.childNodes[1].style.width = ''; div.childNodes[1].style.height = ''; var iframe = div.childNodes[1].childNodes[1].childNodes[0]; iframe.style.height = iframe.contentWindow.document.body.scrollHeight + 'px' } else { div.childNodes[0].style.visibility = 'visible'; div.childNodes[0].style.width = ''; div.childNodes[0].style.height = ''; div.childNodes[1].style.visibility = 'hidden'; div.childNodes[1].style.width = '0px'; div.childNodes[1].style.height = '0px'; var iframe = div.childNodes[1].childNodes[1].childNodes[0]; iframe.style.height = '0px' } } function ToggleIFrame(lan, visible, hidden, url) { document.write('
    '); document.write('
    ' + visible + '
    '); document.write('
    '); document.write('
    ' + hidden + '

    '); document.write('
    '); document.write('
    '); document.write('
    ' + hidden + '
    '); document.write('
    '); document.write('
    '); } function VerticalTop(strWidthFloat) { document.write(GetVerticalTopCode(strWidthFloat)); } function IsIE() { if (navigator.appName == 'Microsoft Internet Explorer') { return true; } return false; } function GetVerticalTopCode(strWidthFloat) { if ((typeof strWidthFloat) == 'undefined') { strWidthFloat = 'width:auto;'; } var strCode = ''; if (IsIE()) { strCode += '
    '; strCode += ''; strCode += ''; strCode += ''; strCode += ''; strCode += '
    '; } else { strCode += '
    '; strCode += '
    '; } return strCode; } function VerticalBottom() { document.write(GetVerticalBottomCode()); } function GetVerticalBottomCode() { var strCode = ''; if (IsIE()) { strCode += '
    '; strCode += '
    '; } else { strCode += '
    '; strCode += '
    '; } return strCode; } function CenterText(strText) { document.write(GetCenterTextCode(strText)); } function GetCenterTextCode(strText) { var strCode = ''; strCode += '
    '; strCode += ''; strCode += ''; strCode += ''; strCode += ''; strCode += ''; strCode += '
    '; strCode += '
    ' + strText + '
    '; strCode += '
    '; return strCode; } function VerticalText(strText, strWidthFloat) { document.write(GetVerticalTextCode(strText, strWidthFloat)); } function GetVerticalTextCode(strText, strWidthFloat) { var strCode = ''; strCode += GetVerticalTopCode(strWidthFloat); strCode += strText; strCode += GetVerticalBottomCode(); return strCode; } function DisplaySubmitButton(strText, strForm, strIfFunction, bLineBreak) { document.write(GetSubmitButtonCode(strText, strForm, strIfFunction, bLineBreak)); } function GetSubmitButtonCode(strText, strForm, strIfFunction, bLineBreak) { var strAction; if (((typeof strIfFunction) != 'undefined') && (strIfFunction != '')) { strAction = 'if (' + strIfFunction + ') document.' + strForm + '.submit();"'; } else { strAction = 'document.' + strForm + '.submit();'; } return GetButtonCode(strText, strAction, bLineBreak); } function DisplayUrlButton(strText, strUrl, bLineBreak, bExtern) { document.write(GetUrlButtonCode(strText, strUrl, bLineBreak, bExtern)); } function GetUrlButtonCode(strText, strUrl, bLineBreak, bExtern) { var strAction; if ((typeof strUrl) != 'undefined') { var strSuffix = strUrl.substr(strUrl.length - 4, strUrl.length).toUpperCase(); switch (strSuffix) { case '.PDF': { bExtern = true; break; } } if (((typeof bExtern) != 'undefined') && bExtern) { strAction = 'window.open(\'' + strUrl + '\');'; } else { strAction = 'location.href=\'' + strUrl + '\''; } } return GetButtonCode(strText, strAction, bLineBreak); } function DisplayButton(strText, strAction, bLineBreak) { document.write(GetButtonCode(strText, strAction, bLineBreak)); } function GetButtonCode(strText, strAction, bLineBreak) { var strCode = ''; strCode += '
    '); document.write('
    '); VerticalText('

    ' + strTitle + '

    ', 'width: 100%;'); document.write('
    '); } else { _FrameTop(); } document.write(''); } function TableBottom() { document.write(''); document.write('
     
    '); _FrameBottom(); } function _FrameTop() { document.write('
    '); } function _FrameBottom() { document.write('
    '); } function FrameTop() { _FrameTop(); document.write('
    '); } function FrameBottom() { document.write('
    '); // class="text_box" _FrameBottom(); } function TableHeader(strEntry0, strEntry1, strEntry2, strEntry3, strEntry4, strEntry5, strEntry6, strEntry7, strEntry8, strEntry9) { TableRowEx(0, 'th', strEntry0, strEntry1, strEntry2, strEntry3, strEntry4, strEntry5, strEntry6, strEntry7, strEntry8, strEntry9); } function TableHeaderWithLongCol(nLongCol, strEntry0, strEntry1, strEntry2, strEntry3, strEntry4, strEntry5, strEntry6, strEntry7, strEntry8, strEntry9) { TableRowEx(nLongCol, 'th', strEntry0, strEntry1, strEntry2, strEntry3, strEntry4, strEntry5, strEntry6, strEntry7, strEntry8, strEntry9); } function TableRow(strEntry0, strEntry1, strEntry2, strEntry3, strEntry4, strEntry5, strEntry6, strEntry7, strEntry8, strEntry9) { TableRowEx(0, 'td', strEntry0, strEntry1, strEntry2, strEntry3, strEntry4, strEntry5, strEntry6, strEntry7, strEntry8, strEntry9); } function TableRowWithLongCol(nLongCol, strEntry0, strEntry1, strEntry2, strEntry3, strEntry4, strEntry5, strEntry6, strEntry7, strEntry8, strEntry9) { TableRowEx(nLongCol, 'td', strEntry0, strEntry1, strEntry2, strEntry3, strEntry4, strEntry5, strEntry6, strEntry7, strEntry8, strEntry9); } function TableRowEx(nLongCol, strType, strEntry0, strEntry1, strEntry2, strEntry3, strEntry4, strEntry5, strEntry6, strEntry7, strEntry8, strEntry9) { var strText = ''; var astrEntry = new Array(); astrEntry[0] = strEntry0; if ((typeof strEntry1) != 'undefined') { astrEntry[1] = strEntry1; } if ((typeof strEntry2) != 'undefined') { astrEntry[2] = strEntry2; } if ((typeof strEntry3) != 'undefined') { astrEntry[3] = strEntry3; } if ((typeof strEntry4) != 'undefined') { astrEntry[4] = strEntry4; } if ((typeof strEntry5) != 'undefined') { astrEntry[5] = strEntry5; } if ((typeof strEntry6) != 'undefined') { astrEntry[6] = strEntry6; } if ((typeof strEntry7) != 'undefined') { astrEntry[7] = strEntry7; } if ((typeof strEntry8) != 'undefined') { astrEntry[8] = strEntry8; } if ((typeof strEntry9) != 'undefined') { astrEntry[9] = strEntry9; } strText += ''; var e; for (e = 0; e < astrEntry.length; e++) { strText += '<' + strType; if (strType == 'td') { strText += ' class="row'; if (e == nLongCol) { if (astrEntry.length <= 1) { strText += '0'; } else { strText += '1'; } } else { strText += '2'; } strText += '" style="vertical-align: middle;'; if (strType == 'td') { if (e == nLongCol) { strText += ' width: 100%;"'; if (astrEntry.length <= 1) { strText += ' colspan="100"'; } } else { strText += '"'; } } } else if (e == nLongCol) { strText += ' style="width: 30em;"'; } strText += '>'; strText += astrEntry[e]; strText += ''; } strText += ''; document.write(strText); } function FormTableTop(strTitle) { TableTop(); TableHeader('
    ' + strTitle + '
    '); document.write(''); document.write(''); } function FormTableBottom(strBottomLine) { var doc = document; doc.write('
    '); doc.write(''); if (((typeof strBottomLine) != 'undefined') && (strBottomLine != '')) { doc.write(''); CenterText(strBottomLine); doc.write(''); } TableBottom(); } function DisplayEMail(strEmail) { if (((typeof strEmail) == 'undefined') || (strEmail == '')) { strEmail = 'freiwaldsoftwarecontact@freiwald.com'; } document.write('' + strEmail + ''); } /***********************************************************************************************************/ // // Ticker: // /***********************************************************************************************************/ function TickerStart() { var arrTicker = document.getElementsByName('ticker'); if ((typeof arrTicker) == 'undefined') { arrTicker = document.all.ticker; } var nCount = 0; if ((typeof arrTicker) != 'undefined') { nCount = arrTicker.length; } var nIndex = 0; for (nIndex = 0; nIndex < nCount; nIndex++) { oTicker = arrTicker[nIndex]; oTicker.parentNode.style.position = "relative"; oTicker.parentNode.style.overflow = "hidden"; oTicker.style.position = "absolute"; oTicker.style.top = "0px"; oTicker.style.left = "0px"; var oTicker2 = oTicker.parentNode.childNodes[1]; oTicker2.style.position = "absolute"; oTicker2.style.top = "0px"; oTicker2.style.left = "0px"; TickerTick(oTicker); } } var bTickerPause = false; function TickerPause(bPause) { bTickerPause = bPause; } function TickerTick(oTicker) { if (!bTickerPause) { var nTop = parseInt(oTicker.style.top); nTop--; var sz = CalcElementSize(oTicker); var oTicker2 = oTicker.parentNode.childNodes[1]; var sz2 = CalcElementSize(oTicker2); var nTop2 = (nTop <= 0) ? (nTop + sz.cy) : (nTop - sz2.cy); if ((nTop2 < 0) && (nTop < 0)) { nTop = nTop2 + sz2.cy; } oTicker.style.top = nTop + "px"; oTicker2.style.top = nTop2 + "px"; } window.setTimeout("TickerTick(oTicker)", 60); } function IsNewConsumerDirective() { var oBegin = new Date(2014, 5, 13); // office closure - attention: subtract 1 from month // var oBegin = new Date(2014, 4, 26); // office closure - attention: subtract 1 from month var oNow = new Date(); if (oNow >= oBegin) { return true; } else { return false; } } /***********************************************************************************************************/ // // custom alert and confirm: // /***********************************************************************************************************/ var _AlertEx; var _ConfirmEx; function customAlert(inGlobalVar) { var createDom = function(type) { this.el = document.createElement(type); this.attr = function(attr) { var $this = this; for (var key in attr) { $this.el.setAttribute(key, attr[key]); } return $this; } this.parent = function(parent, wrap) { wrap = (wrap) ? document.querySelector(wrap) : document; parent = wrap.querySelector(parent) parent.appendChild(this.el); return this; } this.html = function(html) { this.el.innerHTML = html return this; } return this; } function mergeObjects(obj1, obj2) { for (var key in obj2) { obj1[key] = obj2[key]; } return obj1; } function Alert() { var AlertDefaultOptions = { 'button': 'OK', 'title': 'Alert' }; this.render = function(dialog, options) { if (options) { this.options = mergeObjects(AlertDefaultOptions, options); } else { this.options = AlertDefaultOptions; } var alertBox = document.querySelector("#customalert"); alertBox.querySelector(".header").innerHTML = this.options.title; alertBox.querySelector(".body").innerHTML = dialog; alertBox.querySelector(".button-done").innerHTML = this.options.button; // document.querySelector("html").style.overflow = "hidden"; document.querySelector("#customalert-overlay").style.display = "block"; alertBox.style.display = "block"; }; this.done = function() { document.querySelector("#customalert").style.display = null; document.querySelector("#customalert-overlay").style.display = null; // document.querySelector("html").style.overflow = "auto"; if (typeof this.callback == 'function') { this.callback.call() } } } function Confirm() { var confirmDefaultOptions = { "done": { "text": "Ok", "bold": false, "default": true }, "cancel": { "text": "Cancel", "bold": false, "default": false }, 'title': 'Confirm' }; var getText = function(options, obj) { if (options[obj].bold) { return "" + options[obj].text + "" } return options[obj].text } this.callback = function(data) {}; this.render = function(dialog, options) { this.options = confirmDefaultOptions; if (options) { if (options.done && typeof options.done == "string") { options.done = { "text": options.done } } if (options.cancel && typeof options.cancel == "string") { options.cancel = { "text": options.cancel } } if (options.cancel.default == true) { options.done.default = false; } else { options.done.default = true; } console.log(confirmDefaultOptions) if (options.cancel) { this.options.cancel = mergeObjects(confirmDefaultOptions.cancel, options.cancel) } if (options.done) { this.options.done = mergeObjects(confirmDefaultOptions.done, options.done) } if (options.title || (options.title == '')) { this.options.title = options.title } } var confirmBox = document.querySelector("#customconfirm"); confirmBox.querySelector(".header").innerHTML = this.options.title; confirmBox.querySelector(".body").innerHTML = dialog; confirmBox.querySelector(".button-cancel").innerHTML = getText(this.options, "cancel"); confirmBox.querySelector(".button-done").innerHTML = getText(this.options, "done"); // document.querySelector("html").style.overflow = "hidden"; document.querySelector("#customconfirm-overlay").style.display = "block"; confirmBox.style.display = "block"; }; this.done = function() { this.end(); if (this.callbackSuccess) { return this.callbackSuccess(); } this.callback(true); } this.cancel = function() { this.end(); if (this.callbackCancel) { return this.callbackCancel(); } this.callback(false); } this.end = function() { document.querySelector("#customconfirm").style.display = "none"; document.querySelector("#customconfirm-overlay").style.display = "none"; // document.querySelector("html").style.overflow = "auto"; } } var cAlert, cConfirm; if (document.getElementById("customalert") == null) { createDom('div').attr({ "id": "customalert-overlay", "class": "customalert-overlay" }).parent("body") createDom('div').attr({ "id": "customalert", "class": "customalert customalert-alert" }).parent("body") createDom("div").attr({ "class": "header" }).parent("#customalert"); createDom("div").attr({ "class": "body" }).parent("#customalert"); createDom("div").attr({ "class": "footer" }).parent("#customalert"); createDom("div").attr({ "class": "but", "onclick": "window.customalert.done()" }).parent(".footer", "#customalert"); createDom("div").attr({ "class": "but-l" }).parent(".but", "#customalert"); createDom("div").attr({ "class": "but-r" }).parent(".but-l", "#customalert"); createDom("div").attr({ "class": "but-c button-done" }).parent(".but-r", "#customalert"); /* createDom("button").attr({ "class": "btn btn-primary custom-alert button-done", "onclick": "window.customalert.done()" }).parent(".footer", "#customalert"); */ window.addEventListener('keydown', function(e) { var customConfirm = document.getElementById("customconfirm"); var customAlert = document.getElementById("customalert"); if (((customConfirm != null) && (customConfirm.style.display == "block")) || ((customAlert != null) && (customAlert.style.display == "block"))) { } else { return; } e.preventDefault(); e.stopPropagation(); var keynum = e.keyCode ? e.keyCode : e.which; if (keynum == 13) { if (customConfirm.style.display == "block") { if (window.customconfirm.options.cancel.default) { window.customconfirm.cancel(); } else { window.customconfirm.done(); } } else if (customAlert.style.display == "block") { window.customalert.done(); } } else if (keynum == 27 && customConfirm.style.display == "block"){ window.customconfirm.cancel(); } }, false); cAlert = window.Alert = function(dialog, options, callback) { window.customalert = new Alert(); if (typeof options == 'function') { window.customalert.callback = options; options = null } else { window.customalert.callback = callback || null; } window.customalert.render(dialog, options); }; } if (document.getElementById("customconfirm") == null) { createDom('div').attr({ "id": "customconfirm-overlay", "class": "customalert-overlay" }).parent("body") createDom('div').attr({ "id": "customconfirm", "class": "customalert customalert-confirm" }).parent("body") createDom('div').attr({ "class": "header", }).parent("#customconfirm") createDom('div').attr({ "class": "body", }).parent("#customconfirm") createDom('div').attr({ "class": "footer", }).parent("#customconfirm") createDom("div").attr({ "id": "customconfirm-done", "class": "but", "onclick": "window.customconfirm.done()" }).parent(".footer", "#customconfirm"); createDom("div").attr({ "class": "but-l" }).parent("#customconfirm-done"); createDom("div").attr({ "class": "but-r" }).parent(".but-l", "#customconfirm-done"); createDom("div").attr({ "class": "but-c button-done" }).parent(".but-r", "#customconfirm-done"); createDom("div").attr({ "id": "customconfirm-cancel", "class": "but", "onclick": "window.customconfirm.cancel()" }).parent(".footer", "#customconfirm"); createDom("div").attr({ "class": "but-l" }).parent("#customconfirm-cancel"); createDom("div").attr({ "class": "but-r" }).parent(".but-l", "#customconfirm-cancel"); createDom("div").attr({ "class": "but-c button-cancel" }).parent(".but-r", "#customconfirm-cancel"); /* createDom('button').attr({ "class": "btn btn-success custom-alert button-done", "onclick": "window.customconfirm.done()" }).parent(".footer", "#customconfirm") createDom('button').attr({ "class": "btn btn-danger button-cancel", "onclick": "window.customconfirm.cancel()" }).parent(".footer", "#customconfirm") */ cConfirm = window.Confirm = function(dialog, callback, options) { window.customconfirm = new Confirm(); if (typeof callback == 'object') { window.customconfirm.callbackSuccess = callback.success; window.customconfirm.callbackCancel = callback.cancel; } else { window.customconfirm.callback = callback; } window.customconfirm.render(dialog, options); }; } if (inGlobalVar === false) { return { "alert": cAlert, "confirm": cConfirm } } else { _AlertEx = cAlert; _ConfirmEx = cConfirm; // window.alert = cAlert // window.confirm = cConfirm } } function AlertEx(strText, Param1, Param2, Param3) { if ((typeof _AlertEx) == 'undefined') { new customAlert(); } var fCallback; var strTitle = ''; var strButton = 'OK'; if ((typeof Param1) == 'function') { fCallback = Param1; } else if ((typeof Param1) == 'string') { strTitle = Param1; } if ((typeof Param2) == 'function') { fCallback = Param2; } else if ((typeof Param2) == 'string') { if ((typeof Param1) == 'string') { strButton = Param2; } else { strTitle = Param2; } } if ((typeof Param3) == 'function') { fCallback = Param3; } else if ((typeof Param3) == 'string') { strButton = Param3; } if ((typeof fCallback) == 'function') { if ((typeof _AlertEx) == 'undefined') { new customAlert(); } _AlertEx( strText, { "title": strTitle, "button": strButton }, fCallback); } else { SessionWrite("ALERT", strText); setTimeout(function() { AlertExImpl(strTitle, strButton); }, 100); } } function AlertExImpl(strTitle, strButton) { var strText = SessionRead("ALERT"); if (strText == '') { return; } if ((typeof strTitle) == 'undefined') { strTitle = ''; } if ((typeof strButton) == 'undefined') { strButton = 'OK'; } if ((typeof _AlertEx) == 'undefined') { new customAlert(); } _AlertEx( decodeURIComponent(strText), { "title": strTitle, "button": strButton }); SessionWrite('ALERT', ''); } function ConfirmEx(strText, Param1, Param2, Param3, Param4) { if ((typeof _ConfirmEx) == 'undefined') { new customAlert(); } var fCallback; var strTitle = ''; var strOK = 'OK'; var strCancel = 'Cancel'; if ((typeof Param1) == 'function') { fCallback = Param1; } else if ((typeof Param1) == 'string') { strTitle = Param1; } if ((typeof Param2) == 'function') { fCallback = Param2; } else if ((typeof Param2) == 'string') { if ((typeof Param1) == 'string') { strOK = Param2; } else { strTitle = Param2; } } if ((typeof Param3) == 'function') { fCallback = Param3; } else if ((typeof Param3) == 'string') { if (strOK == Param2) { strCancel = Param3; } else { strOK = Param3; } } if ((typeof Param4) == 'function') { fCallback = Param4; } else if ((typeof Param4) == 'string') { strCancel = Param4; } _ConfirmEx( strText, fCallback, { "title": strTitle, "done": { "text": strOK, "bold": false, "default": true }, "cancel": { "text": strCancel, "bold": false, "default": false }, } ); }