// // Tobias (12.2.2008): // functions.js.php war mal eine Kopie von "function.js", um hier PHP-Funktionalit�t anwenden zu k�nnen // allerdings hat sich functions.js.php weiterentwickelt (gegeben�ber functions.js) und benutzt aktuell // gar kein PHP // /** * Verweist auf die gegenene Seite. * @param langId die Id der Sprache, in der die gegebene Seite dargestellt werden soll * @param what die Seite, auf die verwiesen werden soll */ function link (langId, what, partnerId) { if (langId == null || langId == "") { langId = "SE"; } if (partnerId == null) { partnerId = 0; } langId = langId.toUpperCase(); switch(what){ case 'Tour': window.location.href = 'tour.php?langId=' + langId + '&partnerId=' + partnerId; break; case 'Mitgliedschaft': window.location.href = 'payment/index.php?langId=' + langId + '&partnerId=' + partnerId; break; case 'Home': window.location.href = 'index.php?langId=' + langId + '&partnerId=' + partnerId; break; case 'Gutschein': window.location.href = 'gutschein.php?langId=' + langId + '&partnerId=' + partnerId; break; case 'AGB': window.location.href = 'agb.php?langId=' + langId + '&partnerId=' + partnerId; break; case 'Eltern': window.location.href = 'eltern.php?langId=' + langId + '&partnerId=' + partnerId; break; case 'impressum': window.location.href = 'impressum.php?langId=' + langId + '&partnerId=' + partnerId; break; case 'anmeldung': window.location.href = 'anmeldung.php?langId=' + langId + '&partnerId=' + partnerId; break; case 'Hilfe': window.location.href = 'hilfe.php?langId=' + langId + '&partnerId=' + partnerId; break; case 'daten': window.location.href = 'datenschutz.php?langId=' + langId + '&partnerId=' + partnerId; break; case 'kontakt': window.location.href = 'kontakt.php?langId=' + langId + '&partnerId=' + partnerId; break; case 'einfuehrung': window.location.href = 'eltern_einfuehrung.php?langId=' + langId + '&partnerId=' + partnerId; break; case 'sicherheit': window.location.href = 'eltern_sicherheit.php?langId=' + langId + '&partnerId=' + partnerId; break; case 'hintergrund': window.location.href = 'eltern_hintergrund.php?langId=' + langId + '&partnerId=' + partnerId; break; case 'andere': window.location.href = 'eltern_andere.php?langId=' + langId + '&partnerId=' + partnerId; break; case 'privat': window.location.href = 'eltern_privat.php?langId=' + langId + '&partnerId=' + partnerId; break; case 'blog': window.location.href = '/blog'; break; case 'shop': window.location.href = 'shop.php?langId=' + langId + '&partnerId=' + partnerId; break; case 'presse': window.location.href = 'presse.php?langId=' + langId + '&partnerId=' + partnerId; break; case 'preise': window.location.href = 'preise.php?langId=' + langId + '&partnerId=' + partnerId; break; case 'sitemap': window.location.href = 'sitemap.php?langId=' + langId + '&partnerId=' + partnerId; break; case 'jobs': window.location.href = 'jobs.php?langId=' + langId + '&partnerId=' + partnerId; break; default: break; } if(what.match('h_')){ target = what.split('_'); top = target[1]; query = ''; if (target.length > 2) { query = 'load=' + target[2] + '+' + target[3]; } window.location.href = 'hilfe_sub_' + top + '.php?' + query; } } function bhover(id){ document.getElementById(id+'2').style.display = "block"; document.getElementById(id+'3').style.display = "none"; } function bnormal(id){ document.getElementById(id+'2').style.display = "none"; document.getElementById(id+'3').style.display = "none"; } function bclick(id){ document.getElementById(id+'2').style.display = 'none'; document.getElementById(id+'3').style.display = "block"; } function fnormal(){ document.getElementById("spielen_hover").style.display = 'none'; document.getElementById("spielen_click").style.display = 'none'; } function fhover(){ document.getElementById("spielen_hover").style.display = 'block'; document.getElementById("spielen_click").style.display = 'none'; } function fclick(){ document.getElementById("spielen_hover").style.display = 'none'; document.getElementById("spielen_click").style.display = 'block'; if(navigator.appName == 'Opera')link('anmeldung'); } /** * Zeigt die gegebene Seite in der gegebenen Sprache als Popup an * (d.h. aktueller Inhalt wird ausgegraut und Seite dar�bergelegt). * @param langId die Id der Sprache, in der die gegebene Seite dargestellt werden soll * @param site die Seite, die in einem Popup dargestellt werden soll */ function overlaybox_show(langId, site) { if (langId == null || langId == "") { langId = "DE"; } langId = langId.toUpperCase(); switch(site){ case 'werbefrei': document.getElementById("overlaybox_iframe").style.height = "251px"; break; case 'spiele': document.getElementById("overlaybox_iframe").style.height = "320px"; break; case 'english': document.getElementById("overlaybox_iframe").style.height = "430px"; break; case 'chat': document.getElementById("overlaybox_iframe").style.height = "474px"; break; } var height = document.body.scrollHeight; if (height < window.innerHeight) { height = window.innerHeight; } document.getElementById("overlaybox_outer").style.height = height + "px"; document.getElementById("overlaybox_outer").style.width = document.body.offsetWidth + "px"; document.getElementById("overlaybox_img").style.height = height + "px"; document.getElementById("overlaybox_img").style.width = document.body.offsetWidth + "px"; try{ document.getElementById("overlaybox_inner").style.marginTop = window.pageYOffset + 50 + "px"; } catch (e){ try{ document.getElementById("overlaybox_inner").style.marginTop = document.documentElement.scrollTop +50 + "px"; } catch (e){ document.getElementById("overlaybox_inner").style.marginTop = document.body.scrollTop + 50 + "px"; } } document.getElementById("overlaybox_img").style.display = "block"; document.getElementById("overlaybox_outer").style.display = "block"; frames[0].location.href = site + '.php?langId=' + langId; } /** * Blendet den aktuellen Popup aus. */ function overlaybox_hide(){ document.getElementById("overlaybox_outer").style.display = "none"; document.getElementById("overlaybox_img").style.display = "none"; } var start = -130; var height = 135; var elements = new Array(); var positions = new Array(); var pause = 10000; var counter = 1; var ready = false; function prepare_slide(){ while(true){ var news = document.getElementById('news'+counter); if(news != null){ elements.push('news'+counter); start += height; positions.push(start); news.style.top = start+'px'; counter++; } else break; } ready = true; } function moveElements(){ time = 30; if(ready == false)prepare_slide(); for(var j=0 ; j