// archINFORM - JavaScript Bibliothek // Cookie Routinen // [.1] function Cookie(document, name , hours, path, domain, secure) { // [.2] this.$document = document; this.$name = name; if (hours) this.$expiration = new Date((new Date()).getTime() + hours * 3600000); else this.$expiration = null; if (path) this.$path = path; else this.$path = null; if (domain) this.$domain; else this.$domain = null; if (secure) this.$secure = true; else this.$secure = false; } // [.3] function _Cookie_store() { // [.4] var cookieval = ""; for (var prop in this) { // [.5] if ((prop.charAt(0) == '$') || ((typeof this[prop]) == 'function')) continue; if (cookieval != "") cookieval += '&'; cookieval += prop + ':' + escape(this[prop]); } // [.6] var cookie = this.$name + '=' + cookieval; if (this.$expiration) cookie += '; expires=' + this.$expiration.toGMTString(); if (this.$path) cookie += '; path=' + this.$path; if (this.$domain) cookie += '; domain=' + this.$domain; if (this.$secure) cookie += '; secure'; // [.7] this.$document.cookie = cookie; } // [.8] function _Cookie_load() { // [.9] var allcookies = this.$document.cookie; if (allcookies == "") return false; // [.10] var start = allcookies.indexOf(this.$name + '='); if (start == -1) return false; // [.11] start += this.$name.length + 1; // [.12] var end = allcookies.indexOf(';', start); if (end == -1) end = allcookies.length; var cookieval = allcookies.substring(start, end); // [.13] var a = cookieval.split('&'); // [.14] for (var i = 0; i < a.length; i++) // [.15] a[i] = a[i].split(':'); // [.16] for (var i = 0; i < a.length; i++) this[a[i][0]] = unescape(a[i][1]); // [.17] return true; } // [.18] function _Cookie_remove() { var cookie = this.$name + '='; if (this.$path) cookie += '; path=' + this.$path; if (this.$domain) cookie += '; domain=' + this.$domain; cookie += '; expires=Fri, 02-Jan-1970 00:00:00 GMT'; this.$document.cookie = cookie; } // [.19] new Cookie(); Cookie.prototype.store = _Cookie_store; Cookie.prototype.load = _Cookie_load; Cookie.prototype.remove = _Cookie_remove; //======================================================= // The code above is the definition of The Cookie class. // The code below is the archINFORM use of that class. // Cookie Class code written by David Flanagan //======================================================= // [.20] var visitordata = new Cookie(document, "prefs", 5000, "/", "archinform.de"); visitordata.load(); // [.21] // visitordata.store(); vorlaeufig nicht in Benutzung var CookieChanged = false; // function PrefCountSet() { if (visitordata.visits == null) visitordata.visits = 1; else visitordata.visits++; CookieChanged = true; } // function PrefLangGet() { return visitordata.language; } // function PrefLangSet(Sprache) { visitordata.language = Sprache; CookieChanged = true; } // function PrefSave() { if (CookieChanged) visitordata.store(); } function PrefDelete() { visitordata.remove(); } function map(name) { window.open("/map/" + name + ".htm", "map", "location=no,directories=no,menubar=no,status=no,scrollbars=no,width=500,height=500,resizable=no"); } // Routinen zum Nachladen des Navigations-Frameset bei Bedarf // [.22] var DescStatusTextEN = "english version"; var DescStatusTextDE = "deutsche Version"; if (document.images) { var co_language_en = new Image(); co_language_en.src = "../icons/co_language.en.gif"; var c_language_en = new Image(); c_language_en.src = "../icons/c_language.en.gif"; var co_language_de = new Image(); co_language_de.src = "../icons/co_language.de.gif"; var c_language_de = new Image(); c_language_de.src = "../icons/c_language.de.gif"; } function aktiv_language_en(bild,text) {window.status = text; if (document.images) bild.src = co_language_en.src;} function deaktiv_language_en(bild) {window.status = ""; if (document.images) bild.src = c_language_en.src;} function aktiv_language_de(bild,text) {window.status = text; if (document.images) bild.src = co_language_de.src;} function deaktiv_language_de(bild) {window.status = ""; if (document.images) bild.src = c_language_de.src;} // function FramesLoaded() { var frm = (top.frames.length) if (frm != 5) { if (IE4) document.writeln(''); document.writeln(''); document.writeln(''); document.write(''); document.write(''); document.write(''); document.writeln(''); document.writeln(''); document.write(''); document.write(''); document.write(''); document.writeln(''); document.writeln('
'); document.write(''); document.writeln(''); document.write(''); document.write('[english]'); document.writeln(''); document.write(''); document.write('[reload navigation environment]'); document.write(''); document.writeln('
'); document.writeln(''); document.write(''); document.write('[deutsch]'); document.writeln(''); document.write(''); document.write('[Navigationsleiste nachladen]'); document.write(''); document.writeln('
'); if (IE4) document.writeln('

'); } } function ImgNav(richtung) { if (document.layers) { document.layers[zeige].visibility = "hidden"; } else if (document.all) { // document.all.tags("div")[zeige].filters.revealTrans.Transition = 12; // document.all.tags("div")[zeige].filters.revealTrans.Apply(); document.all.tags("div")[zeige].style.visibility = "hidden"; // document.all.tags("div")[zeige].filters.revealTrans.Play() } zeige = zeige + richtung; if(zeige > anzahl - 1) zeige = 0; else if (zeige < 0) zeige = anzahl - 1; if (document.layers) document.layers[zeige].visibility = "visible"; else if (document.all) { // document.all.tags("div")[zeige].filters.revealTrans.Transition = 12; // document.all.tags("div")[zeige].filters.revealTrans.Apply(); document.all.tags("div")[zeige].style.visibility = "visible"; // document.all.tags("div")[zeige].filters.revealTrans.Play() } } // Dynamisches HTML Utilities // [.23] var bV = parseInt(navigator.appVersion); var NS4 = (document.layers) ? true : false; var IE4 = ((document.all)&&(bV>=4)) ? true : false; var ver4 = (NS4 || IE4) ? true : false; if (ver4) { with (document) { write(""); } } var isExpanded = false; function getIndex(el) { var ind; var whichEl; var i; ind = null; for (i = 0; i < document.layers.length; i++) { whichEl = document.layers[i]; if (whichEl.id == el) { ind = i; break; } } return ind; } function arrange() { var nexty; var whichel; var i; nextY = document.layers[firstInd].pageY + document.layers[firstInd].document.height; for (i = firstInd + 1; i < document.layers.length; i++) { whichEl = document.layers[i]; if (whichEl.visibility != "hide") { whichEl.pageY = nextY; nextY += whichEl.document.height; } } } function expandIt(el) { var whichEl; var whichIm; if (!ver4) return; if (IE4) { whichEl = eval(el + "Child"); whichIm = event.srcElement; if (whichEl.style.display == "none") { whichEl.style.display = "block"; whichIm.src = "../icons/c_mark_d.gif"; // SetCookie(el,"on",Verfallsdatum,"","www.archinform.de"); } else { whichEl.style.display = "none"; whichIm.src = "../icons/c_mark_r.gif"; // SetCookie(el,"off",Verfallsdatum,"","www.archinform.de"); } } else { var whichEl = eval("document." + el + "Child"); var whichIm = eval("document." + el + "Parent.document.images['imEx']"); if (whichEl.visibility == "hide") { whichEl.visibility = "show"; whichIm.src = "../icons/c_mark_d.gif"; // SetCookie(el,"on",Verfallsdatum,"","www.archinform.de"); } else { whichEl.visibility = "hide"; whichIm.src = "../icons/c_mark_r.gif"; // SetCookie(el,"off",Verfallsdatum,"","www.archinform.de"); } arrange(); } } function showAll() { var whichEl; var i; for (i = firstInd; i < document.layers.length; i++) { whichEl = document.layers[i]; whichEl.visibility = "show"; } } function expandAll() { var newSrc; var whichEl; var divColl; var imColl; var i; if (!ver4) return; newSrc = (isExpanded) ? ".../icons/c_mark_r.gif" : "../icons/c_mark_d.gif"; if (NS4) { document.images["imEx"].src = newSrc; for (i = firstInd; i < document.layers.length; i++) { whichEl = document.layers[i]; if (whichEl.id.indexOf("Parent") != -1) whichEl.document.images["imEx"].src = newSrc; if (whichEl.id.indexOf("Child") != -1) whichEl.visibility = (isExpanded) ? "hide" : "show"; } } arrange(); if (isExpanded) scrollTo(0,document.layers[firstInd].pageY); else { divColl = document.all.tags("DIV"); for (i = 0; i < divColl.length; i++) { if (divColl(i).className == "child") divColl(i).style.display = (isExpanded) ? "none" : "block"; } imColl = document.images.item("imEx"); for (i = 0; i < imColl.length; i++) imColl(i).src = newSrc; } isExpanded = !isExpanded; } function expandItOnStart(el) { var whichEl; var whichIm; if (!ver4) return; if (IE4) { whichEl = eval(el + "Child"); whichIm = event.srcElement; if (whichEl.style.display == "none") { whichEl.style.display = "block"; whichIm.src = "../icons/c_mark_d.gif"; } else { whichEl.style.display = "none"; whichIm.src = "../icons/c_mark_r.gif"; } } else { whichEl = eval("document." + el + "Child"); whichIm = eval("document." + el + "Parent.document.images['imEx']"); if (whichEl.visibility == "hide") { whichEl.visibility = "show"; whichIm.src = "../icons/c_mark_d.gif"; } else { whichEl.visibility = "hide"; whichIm.src = "../icons/c_mark_r.gif"; } arrange(); } } function initIt(viewMode) { var whichEl; var divColl; var i; if (!ver4) return; if (viewMode == 0) { if (NS4) { for (i = 0; i < document.layers.length; i++) { whichEl = document.layers[i]; if (whichEl.id.indexOf("Child") != -1) whichEl.visibility = "hide"; } arrange(); } else { divColl = document.all.tags("DIV"); for (i = 0; i < divColl.length; i++) { whichEl = divColl(i); if (whichEl.className == "child") whichEl.style.display = "none"; } } } else { // if (GetCookie("Menue2") == "off") expandItOnStart("Menue2"); } } function exitIt() { PrefSave(); } var JS11 = true; // Ende der archINFORM - JavaScript Bibliothek