MediaWiki:Common.js

Aus biergärtenmünchen.de
Wechseln zu: Navigation, Suche

Hinweis: Leere nach dem Speichern den Browser-Cache, um die Änderungen sehen zu können.

  • Firefox/Safari: Umschalttaste drücken und gleichzeitig Aktualisieren anklicken oder entweder Strg+F5 oder Strg+R (⌘+R auf dem Mac) drücken
  • Google Chrome: Umschalttaste+Strg+R (⌘+Umschalttaste+R auf dem Mac) drücken
  • Internet Explorer: Strg+F5 drücken oder Strg drücken und gleichzeitig Aktualisieren anklicken
  • Opera: Gehe zu Menü → Einstellungen (Opera → Einstellungen auf dem Mac) und dann auf Datenschutz & Sicherheit → Browserdaten löschen → Gespeicherte Bilder und Dateien.
/* Das folgende JavaScript wird für alle Benutzer geladen. */

//alert(document.location.href);

var RecaptchaOptions = {
    theme : 'white'
 };


/* start rotating banner */
/* Banner 160x600 */
/* Add image and URL in array and upload/protect image and preload
   (first letter or image name must be capitalised) */

/* define the images directory including trailing slash */
var beergarden_banner_dir = '/images/beer/';

var beergarden_banners = new Array("Muhlenpark_01.jpg",
                                   "Aujaeger_03.jpg",
                                   "Aujaeger_04_de.jpg",
                                   "Alter_Wirt_Etterschlag_01.jpg",
                                   "Kneissl_04.jpg",
                                   "Hofbrauhaus_Keller_Freising_03.jpg",
                                   "Zur_Einkehr_03.jpg");
 
var beergarden_links = new Array("/admin/biergartenmunchen.de/redirect.cgi?url=/Biergarten_Muehlenpark",
                                 "/Aujäger",
                                 "/Aujäger",
                                 "/Alter_Wirt_Etterschlag",
                                 "/Räuber-Kneißl-Garten",
                                 "/admin/biergartenmunchen.de/redirect.cgi?url=/Hofbrauhaus-Keller_Freising",
                                 "/admin/biergartenmunchen.de/redirect.cgi?url=/Rothmeyer%27s_Zur_Einkehr");

function start_animation(){
setTimeout('beergarden_blender()',15000); /* 15 second */
}

beergarden_banner1 = new Image(160,600);
beergarden_banner1.src = beergarden_banner_dir + "Muhlenpark_01.jpg";

beergarden_banner2 = new Image(160,600);
beergarden_banner2.src = beergarden_banner_dir + "Aujaeger_03.jpg";

beergarden_banner3 = new Image(160,600);
beergarden_banner3.src = beergarden_banner_dir + "Aujaeger_04_de.jpg";

beergarden_banner4 = new Image(160,600);
beergarden_banner4.src = beergarden_banner_dir + "Alter_Wirt_Etterschlag_01.jpg";

beergarden_banner5 = new Image(160,600);
beergarden_banner5.src = beergarden_banner_dir + "Kneissl_04.jpg";

beergarden_banner6 = new Image(160,600);
beergarden_banner6.src = beergarden_banner_dir + "Zur_Einkehr_03.jpg";

beergarden_banner6 = new Image(160,600);
beergarden_banner6.src = beergarden_banner_dir + "Hofbrauhaus_Keller_Freising_03.jpg";



function beergarden_swap(){
opacity = 0;
IE_opacity = 0;

if (navigator.appVersion.indexOf("MSIE") != -1){
document.getElementById("blendinger").style.filter = "alpha(opacity=0)";
interval = setInterval("blendinger_IE()",50)

}
else {
document.getElementById("blendinger").style.opacity=0;
interval = setInterval("blendinger_opacity()",50)
}
}

function blendinger_IE(){
if (IE_opacity < 100){
IE_opacity = IE_opacity +4;
document.getElementById("blendinger").style.filter = "alpha(opacity="+IE_opacity+")";

}

else{
clearInterval(interval);
IE_count = 0;
}
}

function blendinger_opacity(){
 
if (opacity < 1){
opacity = (Math.floor(opacity * 100) +4) / 100;
document.getElementById("blendinger").style.opacity=opacity;

}
else{
clearInterval(interval);

}
}

var beergarden_array_index = beergarden_links.length -1;
var first_beergarden_index = Math.round(beergarden_array_index * Math.random())

var beergarden_cycle = first_beergarden_index;
var beergarden_total = beergarden_banners.length -1;
var beergarden_link = beergarden_links[beergarden_cycle]; /* initially the first */

function beergarden_blender(){

/* first set current image as background */

document.getElementById('background_image').style.backgroundImage='url('+beergarden_banner_dir+beergarden_banners[beergarden_cycle]+')';

beergarden_cycle++;

if (beergarden_cycle == beergarden_banners.length){
beergarden_cycle = 0;
}
 
beergarden_swap();

setTimeout("document.images.beergarden_animation.src=beergarden_banner_dir + beergarden_banners[beergarden_cycle];",10)
               
beergarden_link = beergarden_links[beergarden_cycle] /* update link values */
 
}

/* end rotaing banner */

/* emulate sticky CSS */
if (document.getElementById('p-Matched_content') !=null) {
window.onscroll = function() {  
var header_height = document.getElementById("p-Matched_content").scrollHeight;
if (window.scrollY + 330 > header_height){
document.getElementById("p-Matched_content").style.position="fixed";
document.getElementById("p-Matched_content").style.top="0px";
}
else{
document.getElementById("p-Matched_content").style.position="static";
}
}
}

if (document.getElementById('p-Werbung') !=null) {
window.onscroll = function() {  
var header_height = document.getElementById("p-Werbung").scrollHeight;
if (window.scrollY + 330 > header_height){
document.getElementById("p-Werbung").style.position="fixed";
document.getElementById("p-Werbung").style.top="0px";
}
else{
document.getElementById("p-Werbung").style.position="static";
}
}
}