/* Prototype JavaScript framework, version 1.6.1 * (c) 2005-2009 Sam Stephenson * * Prototype is freely distributable under the terms of an MIT-style license. * For details, see the Prototype web site: http://www.prototypejs.org/ * *--------------------------------------------------------------------------*/ var Prototype = { Version: '1.6.1', Browser: (function(){ var ua = navigator.userAgent; var isOpera = Object.prototype.toString.call(window.opera) == '[object Opera]'; return { IE: !!window.attachEvent && !isOpera, Opera: isOpera, WebKit: ua.indexOf('AppleWebKit/') > -1, Gecko: ua.indexOf('Gecko') > -1 && ua.indexOf('KHTML') === -1, MobileSafari: /Apple.*Mobile.*Safari/.test(ua) } })(), BrowserFeatures: { XPath: !!document.evaluate, SelectorsAPI: !!document.querySelector, ElementExtensions: (function() { var constructor = window.Element || window.HTMLElement; return !!(constructor && constructor.prototype); })(), SpecificElementExtensions: (function() { if (typeof window.HTMLDivElement !== 'undefined') return true; var div = document.createElement('div'); var form = document.createElement('form'); var isSupported = false; if (div['__proto__'] && (div['__proto__'] !== form['__proto__'])) { isSupported = true; } div = form = null; return isSupported; })() }, ScriptFragment: '', 'gi'), ''); if (this.iframe) { var doc = this.iframe.contentDocument; if (!doc && this.iframe.contentWindow) doc = this.iframe.contentWindow.document; if (!doc) { // Opera var pThis = this; setTimeout(function() { pThis.loadHTML(); }, 25); return; } doc.open(); doc.write(s); doc.close(); try { s = doc.getElementById(this.id).innerHTML; } catch (e) { try { s = this.iframe.document.getElementById(this.id).innerHTML; } catch (e) {} // opera } hs.discardElement(this.iframe); } else { regBody = /(
]*>|<\/body>)/ig; if (regBody.test(s)) s = s.split(regBody)[hs.ie ? 1 : 2]; } } hs.getElementByClass(this.content, 'DIV', 'highslide-body').innerHTML = s; this.onLoad(); for (var x in this) this[x] = null; } }; hs.Slideshow = function (expKey, options) { if (hs.dynamicallyUpdateAnchors !== false) hs.updateAnchors(); this.expKey = expKey; for (var x in options) this[x] = options[x]; if (this.useControls) this.getControls(); if (this.thumbstrip) this.thumbstrip = hs.Thumbstrip(this); }; hs.Slideshow.prototype = { getControls: function() { this.controls = hs.createElement('div', { innerHTML: hs.replaceLang(hs.skin.controls) }, null, hs.container); var buttons = ['play', 'pause', 'previous', 'next', 'move', 'full-expand', 'close']; this.btn = {}; var pThis = this; for (var i = 0; i < buttons.length; i++) { this.btn[buttons[i]] = hs.getElementByClass(this.controls, 'li', 'highslide-'+ buttons[i]); this.enable(buttons[i]); } this.btn.pause.style.display = 'none'; //this.disable('full-expand'); }, checkFirstAndLast: function() { if (this.repeat || !this.controls) return; var exp = hs.expanders[this.expKey], cur = exp.getAnchorIndex(), re = /disabled$/; if (cur == 0) this.disable('previous'); else if (re.test(this.btn.previous.getElementsByTagName('a')[0].className)) this.enable('previous'); if (cur + 1 == hs.anchors.groups[exp.slideshowGroup || 'none'].length) { this.disable('next'); this.disable('play'); } else if (re.test(this.btn.next.getElementsByTagName('a')[0].className)) { this.enable('next'); this.enable('play'); } }, enable: function(btn) { if (!this.btn) return; var sls = this, a = this.btn[btn].getElementsByTagName('a')[0], re = /disabled$/; a.onclick = function() { sls[btn](); return false; }; if (re.test(a.className)) a.className = a.className.replace(re, ''); }, disable: function(btn) { if (!this.btn) return; var a = this.btn[btn].getElementsByTagName('a')[0]; a.onclick = function() { return false; }; if (!/disabled$/.test(a.className)) a.className += ' disabled'; }, hitSpace: function() { if (this.autoplay) this.pause(); else this.play(); }, play: function(wait) { if (this.btn) { this.btn.play.style.display = 'none'; this.btn.pause.style.display = ''; } this.autoplay = true; if (!wait) hs.next(this.expKey); }, pause: function() { if (this.btn) { this.btn.pause.style.display = 'none'; this.btn.play.style.display = ''; } clearTimeout(this.autoplay); this.autoplay = null; }, previous: function() { this.pause(); hs.previous(this.btn.previous); }, next: function() { this.pause(); hs.next(this.btn.next); }, move: function() {}, 'full-expand': function() { hs.getExpander().doFullExpand(); }, close: function() { hs.close(this.btn.close); } }; hs.Thumbstrip = function(slideshow) { function add (exp) { hs.extend(options || {}, { overlayId: dom, hsId: 'thumbstrip', className: 'highslide-thumbstrip-'+ mode +'-overlay ' + (options.className || '') }); if (hs.ieLt7) options.fade = 0; exp.createOverlay(options); hs.setStyles(dom.parentNode, { overflow: 'hidden' }); }; function scroll (delta) { selectThumb(undefined, Math.round(delta * dom[isX ? 'offsetWidth' : 'offsetHeight'] * 0.7)); }; function selectThumb (i, scrollBy) { if (i === undefined) for (var j = 0; j < group.length; j++) { if (group[j] == hs.expanders[slideshow.expKey].a) { i = j; break; } } if (i === undefined) return; var as = dom.getElementsByTagName('a'), active = as[i], cell = active.parentNode, left = isX ? 'Left' : 'Top', right = isX ? 'Right' : 'Bottom', width = isX ? 'Width' : 'Height', offsetLeft = 'offset' + left, offsetWidth = 'offset' + width, overlayWidth = div.parentNode.parentNode[offsetWidth], minTblPos = overlayWidth - table[offsetWidth], curTblPos = parseInt(table.style[isX ? 'left' : 'top']) || 0, tblPos = curTblPos, mgnRight = 20; if (scrollBy !== undefined) { tblPos = curTblPos - scrollBy; if (minTblPos > 0) minTblPos = 0; if (tblPos > 0) tblPos = 0; if (tblPos < minTblPos) tblPos = minTblPos; } else { for (var j = 0; j < as.length; j++) as[j].className = ''; active.className = 'highslide-active-anchor'; var activeLeft = i > 0 ? as[i - 1].parentNode[offsetLeft] : cell[offsetLeft], activeRight = cell[offsetLeft] + cell[offsetWidth] + (as[i + 1] ? as[i + 1].parentNode[offsetWidth] : 0); if (activeRight > overlayWidth - curTblPos) tblPos = overlayWidth - activeRight; else if (activeLeft < -curTblPos) tblPos = -activeLeft; } var markerPos = cell[offsetLeft] + (cell[offsetWidth] - marker[offsetWidth]) / 2 + tblPos; hs.animate(table, isX ? { left: tblPos } : { top: tblPos }, null, 'easeOutQuad'); hs.animate(marker, isX ? { left: markerPos } : { top: markerPos }, null, 'easeOutQuad'); scrollUp.style.display = tblPos < 0 ? 'block' : 'none'; scrollDown.style.display = (tblPos > minTblPos) ? 'block' : 'none'; }; // initialize var group = hs.anchors.groups[hs.expanders[slideshow.expKey].slideshowGroup || 'none'], options = slideshow.thumbstrip, mode = options.mode || 'horizontal', floatMode = (mode == 'float'), tree = floatMode ? ['div', 'ul', 'li', 'span'] : ['table', 'tbody', 'tr', 'td'], isX = (mode == 'horizontal'), dom = hs.createElement('div', { className: 'highslide-thumbstrip highslide-thumbstrip-'+ mode, innerHTML: ' '+ ' '+ ' '+ ' ' }, { display: 'none' }, hs.container), domCh = dom.childNodes, div = domCh[0], scrollUp = domCh[1], scrollDown = domCh[2], marker = domCh[3], table = div.firstChild, tbody = dom.getElementsByTagName(tree[1])[0], tr; for (var i = 0; i < group.length; i++) { if (i == 0 || !isX) tr = hs.createElement(tree[2], null, null, tbody); (function(){ var a = group[i], cell = hs.createElement(tree[3], null, null, tr), pI = i; hs.createElement('a', { href: a.href, onclick: function() { hs.getExpander(this).focus(); return hs.transit(a); }, innerHTML: hs.stripItemFormatter ? hs.stripItemFormatter(a) : a.innerHTML }, null, cell); })(); } if (!floatMode) { scrollUp.onclick = function () { scroll(-1); }; scrollDown.onclick = function() { scroll(1); }; hs.addEventListener(tbody, document.onmousewheel !== undefined ? 'mousewheel' : 'DOMMouseScroll', function(e) { var delta = 0; e = e || window.event; if (e.wheelDelta) { delta = e.wheelDelta/120; if (hs.opera) delta = -delta; } else if (e.detail) { delta = -e.detail/3; } if (delta) scroll(-delta * 0.2); if (e.preventDefault) e.preventDefault(); e.returnValue = false; }); } return { add: add, selectThumb: selectThumb } }; hs.langDefaults = hs.lang; // history var HsExpander = hs.Expander; if (hs.ie && window == window.top) { (function () { try { document.documentElement.doScroll('left'); } catch (e) { setTimeout(arguments.callee, 50); return; } hs.ready(); })(); } hs.addEventListener(document, 'DOMContentLoaded', hs.ready); hs.addEventListener(window, 'load', hs.ready); // set handlers hs.addEventListener(document, 'ready', function() { if (hs.expandCursor || hs.dimmingOpacity) { var style = hs.createElement('style', { type: 'text/css' }, null, document.getElementsByTagName('HEAD')[0]); function addRule(sel, dec) { if (!hs.ie) { style.appendChild(document.createTextNode(sel + " {" + dec + "}")); } else { var last = document.styleSheets[document.styleSheets.length - 1]; if (typeof(last.addRule) == "object") last.addRule(sel, dec); } } function fix(prop) { return 'expression( ( ( ignoreMe = document.documentElement.'+ prop + ' ? document.documentElement.'+ prop +' : document.body.'+ prop +' ) ) + \'px\' );'; } if (hs.expandCursor) addRule ('.highslide img', 'cursor: url('+ hs.graphicsDir + hs.expandCursor +'), pointer !important;'); addRule ('.highslide-viewport-size', hs.ie && (hs.uaVersion < 7 || document.compatMode == 'BackCompat') ? 'position: absolute; '+ 'left:'+ fix('scrollLeft') + 'top:'+ fix('scrollTop') + 'width:'+ fix('clientWidth') + 'height:'+ fix('clientHeight') : 'position: fixed; width: 100%; height: 100%; left: 0; top: 0'); } }); hs.addEventListener(window, 'resize', function() { hs.getPageSize(); if (hs.viewport) for (var i = 0; i < hs.viewport.childNodes.length; i++) { var node = hs.viewport.childNodes[i], exp = hs.getExpander(node); exp.positionOverlay(node); if (node.hsId == 'thumbstrip') exp.slideshow.thumbstrip.selectThumb(); } }); hs.addEventListener(document, 'mousemove', function(e) { hs.mouse = { x: e.clientX, y: e.clientY }; }); hs.addEventListener(document, 'mousedown', hs.mouseClickHandler); hs.addEventListener(document, 'mouseup', hs.mouseClickHandler); hs.addEventListener(document, 'ready', hs.setClickEvents); hs.addEventListener(window, 'load', hs.preloadImages); hs.addEventListener(window, 'load', hs.preloadAjax); } hs.graphicsDir = 'img/highslide/'; hs.outlineType = 'rounded-white'; function switch_to_tab(id,name,target) { document.getElementById('rpc_tab_'+name+'_content').innerHTML = 'Moment...'; window.setTimeout("new Ajax.Updater('rpc_tab_"+name+"_content', '"+target+"')",500); for (c = 0; document.getElementById('tab_'+name+'['+0+']'); c++) { if (c == id) { document.getElementById('tab_'+name+'['+c+']').className='tab1'; } else { document.getElementById('tab_'+name+'['+c+']').className='tab0'; } document.getElementById('tab_'+name+'['+c+']').blur(); } return false; } function del_zipsearch() { alert('jo'); switch_content('rpc_content','asd',1,'0','nav=0'); return false; } function switch_lang(lang) { if (lang == 'de') { id = 'rpc_content'; rpc = 'home.de'; scrolltop = '1'; nav = 1; vars_and = '&nav=1'; } if (lang == 'uk') { id = 'rpc_content'; rpc = 'home.uk'; scrolltop = '1'; nav = 48; vars_and = '&nav=48'; } new Ajax.Updater('rpc_nav_basic', 'rpc/nav.basic.rpc.php?modus=rpc&target_rpc=rpc_nav_basic&rpc='+rpc+vars_and, { onComplete: function() { new Ajax.Updater('rpc_content', 'rpc/general.rpc.php?modus=rpc&target_rpc=rpc_content&rpc='+rpc+vars_and, { onComplete: function() { refresh_divs(id,rpc,nav,vars_and); if (document.getElementById('rpc_login')) { new Ajax.Updater('rpc_login', 'rpc/login.rpc.php?modus=rpc&target_rpc=rpc_login&rpc='+rpc+vars_and, { onComplete: function() { /* none */ } }); } // Login if (scrolltop) { eval(scrolltop); } }}); }}); } // ########################################################################### // Funktion um eine AJAX-URL zu interpretieren function check_ajaxurl() { if (window.location.hash != "") { var hashpart = window.location.hash; var ajaxurl = ''; hashpart = hashpart.split("/"); for (c = 1; c < hashpart.length-1; c++) { if (c > 1) { if (c % 2 == 0) { ajaxurl = ajaxurl+'='; } else { ajaxurl = ajaxurl+'&'; } } ajaxurl = ajaxurl+hashpart[c]; // ajax-url fuer funktion switch_content zusammenbauen if (hashpart[c] == "nav") { var nav = hashpart[(c+1)]; } // wenn nav-variable, dann fuer funktion switch_content merken if (hashpart[c] == "tpl") { var rpc = hashpart[(c+1)]; } // wenn tpl-variable, dann fuer funktion switch_content merken } var filterurl = ajaxurl.match(/tpl\=(.*?)\&/g); // tpl aus variablen-variable fuer switch_content filtern ajaxurl = ajaxurl.replace(filterurl,''); switch_content('rpc_content',rpc,1,nav,ajaxurl,'',''); // entsprechende seite aufrufen } } // ########################################################################### // Funktion um den Content-Bereich samt Navigationen zu tauschen / aktualisieren var this_location = new Array(); function switch_content(id,rpc,scrolltop,nav,vars,anker,oncomplete) { // Aktuelle Location merken fuer Reload-Shortcut this_location['id'] = id; this_location['rpc'] = rpc; this_location['scrolltop'] = scrolltop; this_location['nav'] = nav; this_location['vars'] = vars; this_location['anker'] = anker; this_location['oncomplete'] = oncomplete; // Leere Variablen als Standard var vars_ask = '', vars_and = ''; // Wenn Variablen gegeben, dann URL-Zusatz erstellen if (vars) { vars_ask = '?'+vars; vars_and = '&'+vars; } //document.getElementById(id).style.filter = 'Gray()'; // Content-Bereich waehrend des Ladens Grau //document.getElementById(id).style.filter = 'alpha(opacity=50)'; // Content-Bereich waehrend des Ladens Transparent // Wartehinweis einblenden //document.getElementById(id).innerHTML = 'Moment...
'; document.getElementById('loading').style.display = 'block'; document.getElementById('loading').style.visibility = 'visible'; // Wenn nach dem Laden nach oben gescrollt werden soll, dann hier definieren if (scrolltop == 1) { scrolltop = 'window.scrollTo(0,0);'; } else { scrolltop = ''; } // AJAX anschmeissen new Ajax.Updater(id, 'rpc/general.rpc.php?modus=rpc&target_rpc='+id+'&rpc='+rpc+vars_and, { onComplete: function() { refresh_divs(id,rpc,nav,vars_and); if (scrolltop) { eval(scrolltop); } if (oncomplete) { eval(oncomplete); } if (anker) { document.location.href='#'+anker; } } }); // Browser-URL auf AJAX-Url aendern damit Adressbar-Links wieder funktionieren // var ajaxurl = 'tpl='+rpc+vars_and; ajaxurl = ajaxurl.replace(/&/g,'/').replace(/=/g,'/'); document.location.href='./#?/'+ajaxurl+'/'; //document.getElementById(id).focus(); // Focus lenken // Wenn Google Maps vorhanden, dann laden if (document.getElementById('map')) { load(); } // acp template-info-button if (document.getElementById('apanel_tplinfo')) { document.getElementById('apanel_tplinfo').innerHTML = rpc+'.rpc.tpl'+(nav ? ' (ID: '+nav+')' : ''); } // wenn debug-console offen if (document.getElementById('debugconsole') && enable_debug_layer) { document.getElementById('debugconsole').src = 'php/debugconsole.php_error.php'; } // Wenn Google Analytics vorhanden, dann AJAX-Aufruf mitteilen if (typeof(pageTracker) == "object") { pageTracker._trackPageview("/"+rpc+","+nav+".html"); } } // ########################################################################### // Funktion, um weitere Elemente automatisch mit zu tauschen function refresh_divs(id,rpc,nav,vars_and) { if (rpc == 'apo') { document.getElementById('ci_back').style.backgroundImage = 'none'; } else if (document.getElementById('ci')) { document.getElementById('ci_back').style.backgroundImage = 'url('+document.getElementById('ci').innerHTML+')'; } document.getElementById('ajax_locator').value = '1'; // AJAX-History aktivieren document.getElementById('ajax_history').src = 'history,'+rpc+','+nav+'.html'; // Template an AJAX-History uebergeben //if (document.getElementById('rpc_search')) { new Ajax.Updater('rpc_search', 'rpc/search.rpc.php?modus=rpc&target_rpc=rpc_search&rpc='+rpc+vars_and, { onComplete: function() { /* none */ } }); } // Suche if (document.getElementById('rpc_nav_main')) { new Ajax.Updater('rpc_nav_main', 'rpc/nav.main.rpc.php?modus=rpc&target_rpc=rpc_nav_main&rpc='+rpc+vars_and, { onComplete: function() { /* none */ } }); } // Navigation (Main) refreshen if (document.getElementById('rpc_nav_basic')) { new Ajax.Updater('rpc_nav_basic', 'rpc/nav.basic.rpc.php?modus=rpc&target_rpc=rpc_nav_basic&rpc='+rpc+vars_and, { onComplete: function() { /* none */ } }); } // Navigation (Basic) refreshen if (document.getElementById('rpc_nav_top')) { new Ajax.Updater('rpc_nav_top', 'rpc/nav.top.rpc.php?modus=rpc&target_rpc=rpc_nav_top&rpc='+rpc+vars_and, { onComplete: function() { /* none */ } }); } // Navigation (Right) refreshen if (document.getElementById('rpc_nav_left')) { new Ajax.Updater('rpc_nav_left', 'rpc/nav.left.rpc.php?modus=rpc&target_rpc=rpc_nav_left&rpc='+rpc+vars_and, { onComplete: function() { /* none */ } }); } // Navigation (Right) refreshen if (document.getElementById('rpc_nav_right')) { new Ajax.Updater('rpc_nav_right', 'rpc/nav.right.rpc.php?modus=rpc&target_rpc=rpc_nav_right&rpc='+rpc+vars_and, { onComplete: function() { /* none */ } }); } // Navigation (Right) refreshen if (document.getElementById('rpc_nav_bottom')) { new Ajax.Updater('rpc_nav_bottom', 'rpc/nav.bottom.rpc.php?modus=rpc&target_rpc=rpc_nav_bottom&rpc='+rpc+vars_and, { onComplete: function() { /* none */ } }); } // Navigation (Right) refreshen if (document.getElementById('rpc_nav_path')) { new Ajax.Updater('rpc_nav_path', 'rpc/nav.path.rpc.php?modus=rpc&target_rpc=rpc_nav_path&rpc='+rpc+vars_and, { onComplete: function() { /* none */ } }); } // Navigation (Pfad) refreshen if (document.getElementById('rpc_teaser')) { new Ajax.Updater('rpc_teaser', 'rpc/teaser.rpc.php?modus=rpc&target_rpc=rpc_teaser&rpc='+rpc+vars_and, { onComplete: function() { /* none */ } }); } // Navigation (Pfad) refreshen if (document.getElementById('rpc_socialbookmarks')) { new Ajax.Updater('rpc_socialbookmarks', 'rpc/socialbookmarks.rpc.php?modus=rpc&target_rpc=rpc_socialbookmarks&rpc='+rpc+vars_and, { onComplete: function() { /* none */ } }); } // Navigation (Pfad) refreshen google_adsense(); // Google adsense aufrufen // Wenn im Template verwendet, ggf. Galleryscroller initialisieren for (c = 0; document.getElementById('galleryscroller_'+c); c++) { var pb = new poma.scrollbox('galleryscroller_'+c,{'ud':false,'usebuttons':false,'speed':10}); } document.getElementById('this_tpl').innerHTML = rpc; var skin = 'blue'; var force_skin = ''; var logo_base_top = '0px'; if (nav.substring(0,2) == 90) { var skin = 'green'; } if (document.getElementById('this_tpl').innerHTML == 'home.de') { //document.getElementById('fixed_top_blue_blind').style.display = 'none'; new Effect.Morph('fixed_bottom', { style: 'bottom: 0px', duration: 0.4 }); logo_base_top = '-30px'; if (skin == 'green') { new Effect.Morph('logo_green', { style: 'top: '+logo_base_top, duration: 0.3, delay: 0.1 }); } else { new Effect.Morph('logo_blue', { style: 'top: '+logo_base_top, duration: 0.3, delay: 0.2 }); } new Effect.Morph('searchbox', { style: 'top: 50px', duration: 0.2, delay: 0.2 }); new Effect.Morph('fixed_top_blue', { style: 'top: -40px', duration: 0.2, delay: 0.4 }); //new Effect.Morph('fixed_top_blue_blind', { style: 'top: -40px', duration: 0.2, delay: 0 }); new Effect.Morph('flexible_content', { style: 'top: 125px', duration: 0.2, delay: 0.6 }); //window.setTimeout("document.getElementById('fixed_top_blue_blind').style.display = 'block';",600); force_skin = skin; resize_content(); } else { if (document.getElementById('fixed_bottom').style.bottom != '-120px') { //document.getElementById('fixed_top_blue_blind').style.display = 'none'; new Effect.Morph('fixed_bottom', { style: 'bottom: -120px', duration: 0.4 }); logo_base_top = '0px'; new Effect.Morph('flexible_content', { style: 'top: 165px', duration: 0.2, delay: 0.1 }); new Effect.Morph('fixed_top_blue', { style: 'top: 0px', duration: 0.2, delay: 0.2 }); //new Effect.Morph('fixed_top_blue_blind', { style: 'top: 0px', duration: 0.2, delay: 0 }); if (skin == 'green') { new Effect.Morph('logo_green', { style: 'top: '+logo_base_top, duration: 0.3, delay: 0.4 }); } else { new Effect.Morph('logo_blue', { style: 'top: '+logo_base_top, duration: 0.3, delay: 0.4 }); } new Effect.Morph('searchbox', { style: 'top: 90px', duration: 0.2, delay: 0.7 }); //window.setTimeout("document.getElementById('fixed_top_blue_blind').style.display = 'block';",400); force_skin = skin; resize_content(); } } // Wechsel aufs gruene Design if (skin == 'green' || force_skin == 'green') { new Effect.Morph('logo_blue', { style: 'top: -146px', duration: 0.3, afterFinish: function() { new Effect.Morph('fixed_top_gray', { style: 'top: 0px', duration: 0.5, delay: 0.2 }); new Effect.Morph('logo_green', { style: 'top: '+logo_base_top, duration: 0.6, delay: 0.6 }); new Effect.Morph('searchbox', { style: 'background: #579f56', duration: 0.6, delay: 0.6 }); new Effect.Morph('rpc_nav_main', { style: 'margin-left: -'+(Math.round((viewportwidth()/2))+200)+'px', duration: 0.5, afterFinish: function() { document.getElementById('nav_main_col').className = 'nav_main_green'; document.getElementById('nav_basic_col').className = 'nav_basic_green'; document.getElementById('content_col').className = 'content_green'; new Effect.Morph('rpc_nav_main', { style: 'margin-left: -470px', duration: 0.5 }); } }); } }); // Wechsel aufs blaue Design } else if (document.getElementById('fixed_top_gray').style.top == '0px') { new Effect.Morph('logo_green', { style: 'top: -146px', duration: 0.3, afterFinish: function() { new Effect.Morph('fixed_top_gray', { style: 'top: -171px', duration: 0.3, delay: 0.1 }); new Effect.Morph('logo_blue', { style: 'top: '+logo_base_top, duration: 0.6, delay: 0.6 }); new Effect.Morph('searchbox', { style: 'background: #2b69a9', duration: 0.6, delay: 0.6 }); new Effect.Morph('rpc_nav_main', { style: 'margin-left: -'+(Math.round((viewportwidth()/2))+200)+'px', duration: 0.5, afterFinish: function() { document.getElementById('nav_main_col').className = 'nav_main_blue'; document.getElementById('nav_basic_col').className = 'nav_basic_blue'; document.getElementById('content_col').className = 'content_blue'; new Effect.Morph('rpc_nav_main', { style: 'margin-left: -470px', duration: 0.5 }); } }); } }); } // Wenn Google-Plus aufrufen renderPlusone(); // Wartehinweis ausblenden document.getElementById('loading').style.display = 'none'; document.getElementById('loading').style.visibility = 'hidden'; } // ########################################################################### // Google-Plus bei ajax-klick refreshen function renderPlusone() { // Wenn Google-Plus verwendet wird (div vorhanden?) if (document.getElementById('plusone-div')) { gapi.plusone.render("plusone-div", {"size": "small", "count": "true"}); } } // ########################################################################### // Google-Adsense bei ajax-klick refreshen function google_adsense() { /* document.getElementById('google_adsense_1').innerHTML=''; domWrite( "google_adsense_1", "http://pagead2.googlesyndication.com/pagead/show_ads.js", function() { google_ad_client = "pub-0000000000000000"; google_ad_slot = "0000000000"; google_ad_width = 160; google_ad_height = 600; } ); */ } // ########################################################################### // Twitter-div function twitter_updater() { if (document.getElementById('rpc_twitter')) { twitter_updater_upd(); } else { window.clearInterval(twitter_interval); } } function twitter_updater_init() { if (document.getElementById('rpc_twitter')) { twitter_updater_upd(); //var twitter_interval = window.setInterval("twitter_updater()", 60000); // 60 sekunden var twitter_interval = window.setInterval("twitter_updater()", 3600000); // 1 stunde } } function twitter_updater_upd() { new Ajax.Updater('rpc_twitter', 'rpc/general.rpc.php?modus=rpc&rpc=twitter'); } // ########################################################################### // Graypage-Layer document.write(""); function graypage() { document.getElementById('graypage').style.height = document.body.scrollHeight; document.getElementById('graypage').style.width = document.body.scrollWidth; document.getElementById('graypage').style.display = 'block'; document.getElementById('graypage').style.visibility = 'visible'; } function clearpage() { document.getElementById('graypage').style.height = '0px'; document.getElementById('graypage').style.width = '0px'; document.getElementById('graypage').style.display = 'none'; document.getElementById('graypage').style.visibility = 'hidden'; } document.write(""); // ########################################################################### // Ajax-Shortcuts var chr = new Array; function key_press(Ereignis) { if (!Ereignis) { Ereignis = window.event; } if (Ereignis.which) { keycode = Ereignis.which; } else if (Ereignis.keyCode) { keycode = Ereignis.keyCode; } chr[keycode] = 1; if (chr[17] == 1 && chr[220] == 1) { graypage() } // zirkumflex if (chr[87] == 1 && chr[65] == 1) /* w+a */ { window.location.href = './acp/'; chr = new Array; } if (chr[87] == 1 && chr[68] == 1) /* w+d */ { switch_debug_layer(); } if (chr[87] == 1 && chr[73] == 1) /* w+i */ { window.location.href = './image.php'; chr = new Array; } if (chr[87] == 1 && chr[79] == 1) /* w+o */ { window.location.href = document.getElementById('apanel_onlineurl').innerHTML; chr = new Array; } if (chr[87] == 1 && chr[81] == 1) /* w+q */ { window.location.href = './qrcode.php'; chr = new Array; } if (chr[87] == 1 && chr[82] == 1 && this_location['id']) /* w+r */ { switch_content(this_location['id'],this_location['rpc'],this_location['scrolltop'],this_location['nav'],this_location['vars'],this_location['anker'],this_location['oncomplete']); chr = new Array; } // r if (chr[87] == 1 && chr[86] == 1) /* w+v */ { window.location.href = './m/'; chr = new Array; } //document.getElementById('keycodetext').value = keycode + ''; //alert('Taste mit Dezimalwert ' + keycode + ' gedrueckt'); } function key_release(Ereignis) { if (!Ereignis) { Ereignis = window.event; } if (Ereignis.which) { keycode = Ereignis.which; } else if (Ereignis.keyCode) { keycode = Ereignis.keyCode; } chr[keycode] = 0; if (keycode == 27) { chr[17] = 0; clearpage(); } // esc //document.getElementById('keycodetext').value = keycode + ''; //alert('Taste mit Dezimalwert ' + keycode + ' losgelassen'); } document.onkeydown = key_press; document.onkeyup = key_release; // ########################################################################### // Viewports function viewportwidth() { var viewportwidth; // Die meisten Standard-Bowser (mozilla/netscape/opera/ie7) verwenden window.innerWidth if (typeof window.innerWidth != 'undefined') { viewportwidth = window.innerWidth; } // IE6 else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth != 'undefined' && document.documentElement.clientWidth != 0) { viewportwidth = document.documentElement.clientWidth; } // Aeltere IE-Versionen else { viewportwidth = document.getElementsByTagName('body')[0].clientWidth; } return viewportwidth; } function viewportheight() { var viewportheight; // Die meisten Standard-Bowser (mozilla/netscape/opera/ie7) verwenden window.innerHeight if (typeof window.innerHeight != 'undefined') { viewportheight = window.innerHeight; } // IE6 else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientHeight != 'undefined' && document.documentElement.clientHeight != 0) { viewportheight = document.documentElement.clientHeight; } // Aeltere IE-Versionen else { viewportheight = document.getElementsByTagName('body')[0].clientHeight; } return viewportheight; } // ########################################################################### // Scrollbars function getscrollwidth() { var scrOfX = 0; if (typeof(window.pageXOffset ) == 'number' ) { // Netscape scrOfX = window.pageXOffset; } else if (document.body && ( document.body.scrollLeft || document.body.scrollTop )) { // DOM scrOfX = document.body.scrollTop; } else if (document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop )) { // IE6 standards compliant mode scrOfX = document.documentElement.scrollTop; } return scrOfX; } function getscrollheight() { var scrOfY = 0; if (typeof(window.pageYOffset ) == 'number' ) { // Netscape scrOfY = window.pageYOffset; } else if (document.body && ( document.body.scrollLeft || document.body.scrollTop )) { // DOM scrOfY = document.body.scrollTop; } else if (document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop )) { // IE6 standards compliant mode scrOfY = document.documentElement.scrollTop; } return scrOfY; } // ########################################################################### // Mousemoves var mousemove_docEl = (typeof document.compatMode != "undefined" && document.compatMode != "BackCompat") ? "documentElement" : "body"; function mouse_init() { if (document.layers) { document.captureEvents(Event.MOUSEMOVE); } document.onmousemove = mouse_pos; } function mouse_pos(e) { // position where mousemove fired var xPos = e? e.pageX : window.event.x; var yPos = e? e.pageY : window.event.y; // for ie add scroll position if (document.all && !document.captureEvents) { xPos += document[mousemove_docEl].scrollLeft; yPos += document[mousemove_docEl].scrollTop; } if (xPos >= viewportwidth()-170 && yPos <= 300 && document.getElementById('apanel') && document.getElementById('apanel').style.display == 'none') { Effect.toggle('apanel', 'slide', { duration: 0.5 }); } if ((xPos <= viewportwidth()-170 || yPos >= 300) && document.getElementById('apanel') && document.getElementById('apanel').style.display != 'none') { Effect.toggle('apanel', 'slide', { duration: 0.5 }); } if (document.layers) routeEvent(e); } // ########################################################################### // Debug-Layer var enable_debug_layer = 0; function switch_debug_layer() { if (enable_debug_layer == 0) { enable_debug_layer = 1; document.getElementById('debugconsole').style.top = viewportheight()+getscrollheight()-150; Effect.Appear('debugconsole', { duration: 0.5 }); document.getElementById('debugconsole').src = 'php/debugconsole.php_error.php'; } else { enable_debug_layer = 0; Effect.Fade('debugconsole', { duration: 0.5 }); // document.getElementById('debugconsole').src = 'about:blank'; } } // ########################################################################### // Window-Scrolls var unscroll = 0; var unscroll_interval; function clear_unscroll() { if (unscroll == 1) { if (document.getElementById('debugconsole') && enable_debug_layer) { //document.getElementById('debugconsole').style.display = 'block'; document.getElementById('debugconsole').style.top = viewportheight()+getscrollheight()-150; Effect.Appear('debugconsole', { duration: 0.5 }); } unscroll = 0; } } function win_scroll() { if (document.getElementById('debugconsole') && enable_debug_layer) { document.getElementById('debugconsole').style.display = 'none'; // document.getElementById('debugconsole').src = 'about:blank'; //Effect.Fade('debugconsole', { duration: 0.05 }); unscroll = 1; window.clearInterval(unscroll_interval); unscroll_interval = window.setInterval("clear_unscroll()", 200); } } window.onscroll = win_scroll; // ########################################################################### // Resize Content function resize_content() { if (document.getElementById('this_tpl').innerHTML == 'home.de') { home_height = 125; } else { home_height = 165; } if (document.getElementById('this_tpl').innerHTML == 'home.de') { bottom_height = 115; } else { bottom_height = 0; } document.getElementById('flexible_content').style.height = ((viewportheight()-bottom_height)-home_height)+'px'; document.getElementById('ci_back').style.top = '30px'; document.getElementById('ci_back').style.height = (viewportheight()-30)+'px'; document.getElementsByTagName('body')[0].style.overflow = 'hidden'; } // ########################################################################### // init function init() { //check_ajaxurl(); //twitter_updater_init(); document.onload = mouse_init(); } document.onload = init(); var login_afterrequest = false; var login_template = 'login'; var login_lang = 'de' // default var login_nav_id = new Array(); login_nav_id['de'] = 1; login_nav_id['uk'] = 48; var http_request = false; var http_target = false; var http_fields = false; var http_url = ''; function makePOSTRequest(url, parameters) { http_url = url; http_request = false; if (window.XMLHttpRequest) { // Mozilla, Safari,... http_request = new XMLHttpRequest(); if (http_request.overrideMimeType) { // set type accordingly to anticipated content type //http_request.overrideMimeType('text/xml'); http_request.overrideMimeType('text/html'); } } else if (window.ActiveXObject) { // IE try { http_request = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { http_request = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } } if (!http_request) { alert('Fehler: Kann keine XMLHTTP-Instanz erstellen.'); return false; } http_request.onreadystatechange = alertContents; http_request.open('POST', url, true); http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); http_request.setRequestHeader("Content-length", parameters.length); http_request.setRequestHeader("Connection", "close"); http_request.send(parameters); } function alertContents() { if (http_request.readyState == 4) { if (http_request.status == 200) { //alert(http_request.responseText); result = http_request.responseText; //document.getElementById('myspan').innerHTML = result; document.getElementById(http_target).innerHTML = result; // wenn es sich um das loginform handelt if (login_afterrequest) { switch_content('rpc_content',login_template,1,login_nav_id[login_lang],'nav='+login_nav_id[login_lang]); login_afterrequest = false; } } else { alert('Fehler: Die Anfrage konnte nicht gesendet werden.\nHTTP '+http_request.status+' ('+http_url+' > '+http_target+')'); } } } function get(target,file,fields,form) { http_target = target http_fields = fields http_fields = http_fields.split(",") poststr = "" poststr = poststr+'submitfields='+fields+'&' for (c = 0; c < http_fields.length; c++) { if (c > 0) { poststr = poststr+'&' } if (document.forms[form].elements[http_fields[c]]) { if (document.forms[form].elements[http_fields[c]].type == 'radio' && document.forms[form].elements[http_fields[c]].checked) { poststr = poststr+document.forms[form].elements[http_fields[c]].name+'='+encodeURI(document.forms[form].elements[http_fields[c]].value); // +'&' } else if (document.forms[form].elements[http_fields[c]].type == 'checkbox' && document.forms[form].elements[http_fields[c]].checked == true) { //alert(document.getElementById(http_fields[c]).name); // && document.getElementById(http_fields[c]).checked == true poststr = poststr+document.forms[form].elements[http_fields[c]].name+'='+encodeURI(document.forms[form].elements[http_fields[c]].value); } else { //poststr = poststr+http_fields[c]+'='+encodeURI(document.getElementById(http_fields[c]).value); poststr = poststr+http_fields[c]+'='+encodeURI(document.forms[form].elements[http_fields[c]].value); if (document.forms[form].elements[http_fields[c]].name == "action" && document.forms[form].elements[http_fields[c]].value == "login") { login_afterrequest = true; } if (document.forms[form].elements[http_fields[c]].name == "lang") { login_lang = document.forms[form].elements[http_fields[c]].value; } } } else { //alert('Can\'t access field '+http_fields[c]); } } makePOSTRequest(file, poststr); //alert(poststr); } // Spezielle Formfeld-Effekte (Cursor auf/ab, Mausrad auf/ab, etc.) function form_wheel(element) { // Wenn Mausrad-Auf UND Wert ist eine Zahl if (event.wheelDelta >= 0 && !isNaN(element.value)) { num = element.value; if (element.value != '') { num++; element.value = num; } } // Wenn Mausrad-Ab UND Wert ist eine Zahl else if (event.wheelDelta <= 1 && !isNaN(element.value)) { num = element.value; if (element.value != '') { num--; element.value = num; } } } // Funktion um Stadtname durch PLZ zu ermitteln function form_zip_name(zip,cc) { // Wenn Wert ist eine Zahl und Wert ist 4 oder 5 Zeichen lang if (!isNaN(zip) && zip.length >= 4 && zip.length <= 5) { // ZIP-RPC abfragen und Antowrt in das Feld "ort" setzten, sofern Feld existiert var req = new Ajax.Request('rpc/zip.rpc.php', { parameters: 'modus=rpc&zip_name='+zip+'&zip_cc='+cc, method: 'get', asynchronous: false, onSuccess: function (request) { if (document.getElementById('ort')) { document.getElementById('ort').value = request.responseText; } } }); } } // Spezielle Formfeld-Effekte (Cursor auf/ab, Mausrad auf/ab, etc.) function form_key(element,event) { if (!event) { event = window.event; } if (event.which) { Tastencode = event.which; } else if (event.keyCode) { keycode = event.keyCode; } // Wenn Pfeil-Auf-Taste UND Wert ist eine Zahl if ((keycode == 38) && !isNaN(element.value)) { num = element.value; if (element.value != '') { num++; element.value = num; } } // Wenn Pfeil-Ab-Taste UND Wert ist eine Zahl if ((keycode == 40) && !isNaN(element.value)) { num = element.value; if (element.value != '') { num--; element.value = num; } } // Testausgabe des Dezimalwertes, der Taste //window.status = 'Taste mit Dezimalwert ' + keycode + ' gedrueckt'; } /* KALENDER ############################################################### */ //**************************************************************************** // PopCalendar 3.30, Emailware(please mail&commend me if u like it) // Originally coded by Liming(Victor) Weng, email: victorwon@netease.com // Release date: 2000.3.7 // Anyone may modify it to satify his needs, but please leave this comment ahead. //**************************************************************************** var gdCtrl = new Object(); var goSelectTag = new Array(); var gcGray = "#808080"; var gcToggle = "#ffff00"; var gcBG = "#cccccc"; var gdCurDate = new Date(); var giYear = gdCurDate.getFullYear(); var giMonth = gdCurDate.getMonth()+1; var giDay = gdCurDate.getDate(); function fSetDate(iYear, iMonth, iDay){ VicPopCal.style.visibility = "hidden"; gdCtrl.value = iDay+"."+iMonth+"."+iYear; //Here, you could modify the locale as you need !!!! for (i in goSelectTag) if (goSelectTag[i].style) { goSelectTag[i].style.visibility = "visible"; } if (goSelectTag) { goSelectTag.length = 0; } } function fSetSelected(aCell){ var iOffset = 0; var iYear = parseInt(tbSelYear.value); var iMonth = parseInt(tbSelMonth.value); self.event.cancelBubble = true; aCell.bgColor = gcBG; with (aCell.children["cellText"]) { var iDay = parseInt(innerText); if (color==gcGray) iOffset = (Victor<10)?-1:1; iMonth += iOffset; if (iMonth<1) { iYear--; iMonth = 12; }else if (iMonth>12){ iYear++; iMonth = 1; } } fSetDate(iYear, iMonth, iDay); } function Point(iX, iY){ this.x = iX; this.y = iY; } function fBuildCal(iYear, iMonth) { var aMonth=new Array(); for(i=1;i<7;i++) aMonth[i]=new Array(i); var dCalDate=new Date(iYear, iMonth-1, 1); var iDayOfFirst=dCalDate.getDay(); var iDaysInMonth=new Date(iYear, iMonth, 0).getDate(); var iOffsetLast=new Date(iYear, iMonth-1, 0).getDate()-iDayOfFirst+1; var iDate = 1; var iNext = 1; for (d = 0; d < 7; d++) aMonth[1][d] = (d"); write(" | "); write(" "); write(" | "); write(""); write(" | "); write(""); write(" | |||||||
");
write(" ");
write(" ");
write("
| ");
write("