var adlWallPaperLeft=825,activeGalleryTab=new Array(),adPage="homepage",ivwArea="home",mAnim,pAnim,oAnim,zAnim,kAnim,oldTab,eAnim,activeInfoboxTab=1,timerId,timerIdSB,bildSliderLoaded,videoSliderLoaded,loadedImage=new Array(),activeImageGalleryTab=new Array(),regioIMG=new Array(),regioTEXT=new Array(),regioLINK=new Array();
dojo.addOnLoad(pageInit);
function pageInit(){dojo.query("#MainLinks > a").forEach(function(C,B,A){if(dojo.hasClass(C,"active")){activeTab=B+1
}dojo.connect(C,"onmouseover",function(){timerId=setTimeout(function(){mainLinkHover(B+1)
},300)
});
dojo.connect(C,"onmouseout",mainLinkOut)
})
}function mainLinkHover(C){if(activeTab!=C){clearTimeout(timerIdSB);
if(mAnim){mAnim.pause()
}var A=dojo.byId("MainLinks").getElementsByTagName("a").length,B;
for(B=1;
B<=A;
B++){if(activeTab!=B){dojo.byId("Nav"+B).style.top="-20px"
}}dojo.query("#MainLinks > a").removeClass("active");
dojo.addClass(dojo.query("#MainLinks > a")[C-1],"active");
zAnim=dojo.fx.slideTo({node:"Nav"+activeTab,duration:600,left:0,top:20,easing:dojo.fx.easing.bounceOut});
kAnim=dojo.fx.slideTo({node:"Nav"+C,duration:600,left:0,top:0,easing:dojo.fx.easing.bounceOut});
mAnim=dojo.fx.combine([zAnim,kAnim]);
mAnim.play();
activeTab=C
}}function mainLinkOut(){window.clearTimeout(timerId);
mainLinkSetBack()
}function subLinkHover(){window.clearTimeout(timerIdSB)
}function subLinkOut(){window.clearTimeout(timerIdSB);
mainLinkSetBack()
}function mainLinkSetBack(){window.clearTimeout(timerIdSB);
timerIdSB=setTimeout(function(){dojo.query("#MainLinks > a").removeClass("active");
dojo.addClass(dojo.query("#MainLinks > a")[oldTab-1],"active");
dojo.query("#SubNav > div").style({top:"-20px"});
dojo.byId("Nav"+oldTab).style.top="0px";
activeTab=oldTab;
clearTimeout(timerIdSB)
},1500)
}function tin(A){pAnim=dojo.fx.slideTo({node:A,duration:500,left:0,top:80,easing:dojo.fx.easing.bounceOut});
pAnim.play()
}function tout(A){oAnim=dojo.fx.slideTo({node:A,duration:400,left:0,top:112});
pAnim.stop();
oAnim.play()
}function loadSliderImages(B){var A;
if(B=="BildSlider"&&!bildSliderLoaded){A="";
for(i=5;
i<=12;
i++){A=A+'<div><a href="'+BildSliderLink[i]+'"><img src="'+BildSliderUrl[i]+'" alt="" /></a><br/>'+BildSliderText[i]+"</div>"
}dojo.byId(B).innerHTML=dojo.byId(B).innerHTML+A;
bildSliderLoaded=true
}if(B=="VideoSlider"&&!videoSliderLoaded){A="";
for(i=5;
i<=12;
i++){A=A+'<div><table cellspacing="0" cellpadding="0"><tr><td valign="middle"><a href="'+VideoSliderLink[i]+'"><img src="'+VideoSliderUrl[i]+'" alt="'+VideoSliderText[i]+'" /></a></td></tr></table>'+VideoSliderText[i]+"</div>"
}dojo.byId(B).innerHTML=dojo.byId(B).innerHTML+A;
videoSliderLoaded=true
}}function sliderMove(A,B){loadSliderImages(B);
var C=A*390;
if(A==3){C=1087
}dojo.byId(B).style.left=-A+"px"
}function chooseWeather(){dojo.byId("WetterPiktogramm").style.clip="rect(19px,90px,90px,0px)";
dojo.byId("clipperWetter").style.display="block";
var A=dojo.fx.slideTo({node:"chooseWetter",duration:500,left:0,top:0,easing:dojo.fx.easing.backOut});
A.play()
}function setWeather(H,F,C,G){var B=new Date(),E,D,A;
B=new Date(B.getTime()+1000*60*60*24*365);
document.cookie="WetterAuswahl="+H+"; expires="+B.toGMTString()+";";
dojo.byId("WetterLink"+H).blur();
for(i=1;
i<=4;
i++){dojo.byId("WetterLink"+i).className=""
}dojo.byId("WetterLink"+H).className="active";
E=dojo.fx.slideTo({node:"chooseWetter",duration:500,left:320,top:0,easing:dojo.fx.easing.quintIn,onEnd:function(){dojo.byId("clipperWetter").style.display="none";
dojo.byId("WetterPiktogramm").style.clip="rect(0px,90px,90px,0px)"
}});
E.play();
D=dojo.fadeOut({node:"WetterFader",duration:400,onEnd:function(){dojo.byId("WetterStadt").innerHTML=F;
dojo.byId("WetterTemp").innerHTML=C+"&deg;";
dojo.byId("WetterPiktogramm").src="/mauritius/images/wetter/"+G;
A=dojo.fadeIn({node:"WetterFader",duration:400});
A.play()
}});
D.play()
}function reloadIVW(){var A="http://express.ivwbox.de/cgi-bin/ivw/CP/"+ivwArea+";var",B="&zeit="+new Date().getTime(),C=new Image();
C.src=A+"?r="+escape(document.referrer)+B
}function changeContentAd(){reloadIVW();
if(dojo.byId("ContentAd")){if(adPage!=null&&adPage!=""){var A=document.createElement("iframe");
A.setAttribute("width",300);
A.setAttribute("height",250);
A.setAttribute("src",adPage);
A.setAttribute("frameborder","0");
A.setAttribute("scrolling","no");
dojo.byId("ContentAd").innerHTML="";
dojo.byId("ContentAd").appendChild(A)
}}return true
}function galleryForward(C){if(kAnim){if(kAnim.status()=="playing"){return true
}}if(typeof (activeGalleryTab[C])=="undefined"){activeGalleryTab[C]=1
}var E,D,B,A;
if(!dojo.byId("ContentBoxContent"+C+(activeGalleryTab[C]+1))){E="ContentBoxContent"+C+"1"
}else{E="ContentBoxContent"+C+(activeGalleryTab[C]+1)
}D="ContentBoxContent"+C+activeGalleryTab[C];
B=dojo.marginBox(dojo.byId(E)).h-20;
A=dojo.byId(D);
A.className="GalerieBoxInvis";
A.style.left="492px";
dojo.style(dojo.byId(E),"left","492px");
if(kAnim){kAnim.pause()
}dojo.style(dojo.byId("GalleryBox"+C),"height",(B)+"px");
kAnim=dojo.fx.slideTo({node:E,duration:600,left:0,top:0,easing:dojo.fx.easing.quintOut,onEnd:function(){changeContentAd()
}});
kAnim.play();
if(!dojo.byId("ContentBoxContent"+C+(activeGalleryTab[C]+1))){activeGalleryTab[C]=1
}else{activeGalleryTab[C]=activeGalleryTab[C]+1
}}function galleryBack(C){if(kAnim){if(kAnim.status()=="playing"){return true
}}if(typeof (activeGalleryTab[C])=="undefined"){activeGalleryTab[C]=1
}var E=activeGalleryTab[C],F="ContentBoxContent"+C+activeGalleryTab[C],G,B,A,D=1;
if(!dojo.byId("ContentBoxContent"+C+(activeGalleryTab[C]-1))){while(dojo.byId("ContentBoxContent"+C+(E+D))){D++;
G="ContentBoxContent"+C+D;
activeGalleryTab[C]=D
}}else{G="ContentBoxContent"+C+(activeGalleryTab[C]-1);
activeGalleryTab[C]=activeGalleryTab[C]-1
}B=dojo.marginBox(dojo.byId(G)).h-20;
A=dojo.byId(F);
A.className="GalerieBoxInvis";
if(kAnim){kAnim.pause()
}dojo.style(A,"left","-492px");
dojo.style(dojo.byId(G),"left","-492px");
dojo.style(dojo.byId("GalleryBox"+C),"height",(B)+"px");
kAnim=dojo.fx.slideTo({node:G,duration:600,left:0,top:0,easing:dojo.fx.easing.quintOut,onEnd:function(){changeContentAd()
}});
kAnim.play()
}var dmGallery=new Array();
function createGallery(B,A){this.images=A;
dmGallery[B]=new imageGallery(A,B,"");
dmGallery[B].preload(2);
dmGallery[B].preload(this.images[B][0].length-1)
}function createGallery(C,A,B){this.images=A;
dmGallery[C]=new imageGallery(A,C,B);
dmGallery[C].preload(2);
dmGallery[C].preload(this.images[C][0].length-1)
}function imageGallery(A,C,B){this.duration=300;
this.shortcutImage="/mauritius/images/shortcuts.png";
this.shortcutImgRed="/mauritius/images/shortcuts_red.png";
this.id=C;
this.images=A;
this.count=this.images[C][0].length-1;
this.loaded=new Array();
this.active=1;
this.loaded[1]=true;
this.anim=false;
this.scDisplayed=false;
this.preload=function(D){if(!this.loaded[D]){if(B==undefined){dojo.create("div",{id:"ContentBoxContent"+this.id+D,"class":"GalerieBoxImageInvis"},"GalleryBox"+this.id,"last");
dojo.create("img",{src:this.images[this.id][0][D],alt:""},"ContentBoxContent"+this.id+D,"last");
dojo.create("div",{innerHTML:this.images[this.id][1][D],"class":"subLine"},"ContentBoxContent"+this.id+D,"last");
this.loaded[D]=true
}else{if((D!=this.count)){dojo.create("div",{id:"ContentBoxContent"+this.id+D,"class":"GalerieBoxImageInvis"},"GalleryBox"+this.id,"last");
dojo.create("img",{src:this.images[this.id][0][D],alt:""},"ContentBoxContent"+this.id+D,"last");
dojo.create("div",{innerHTML:this.images[this.id][1][D],"class":"subLine"},"ContentBoxContent"+this.id+D,"last");
this.loaded[D]=true
}else{if((D==this.count)){dojo.create("div",{id:"ContentBoxContent"+this.id+D,"class":"GalerieBoxImageInvis"},"GalleryBox"+this.id,"last");
dojo.create("a",{href:B,id:"adContent",target:"_blank"},"ContentBoxContent"+this.id+D,"last");
dojo.create("img",{src:this.images[this.id][0][D],alt:"Mehr Bilder von mir"},"adContent","last");
dojo.create("div",{innerHTML:this.images[this.id][1][D],"class":"subLine"},"ContentBoxContent"+this.id+D,"last");
this.loaded[D]=true
}}}}};
this.forward=function(){if(this.animPhase()){return false
}var F,E,D;
D=(this.active+1<=this.count)?this.active+1:1;
if(B!=undefined){if(this.active==(this.count-1)){dojo.query(".divOverlayGalL")[0].style.display="none";
dojo.query(".divOverlayGalR")[0].style.display="none"
}else{dojo.query(".divOverlayGalL")[0].style.display="block";
dojo.query(".divOverlayGalR")[0].style.display="block"
}}F="ContentBoxContent"+this.id+this.active;
E="ContentBoxContent"+this.id+D;
if(dojo.query("img",dojo.byId("ContentBoxContent"+this.id+D).loaded)){dojo.byId(F).className="GalerieBoxImage";
if(this.active+2<=this.count){this.preload(this.active+2)
}this.setHeight(E);
galleryAnimation(this.id,F,E,1,this.duration);
this.active=D
}this.keyListener();
if(!this.scDisplayed){this.displayShortcut()
}};
this.backward=function(){if(this.animPhase()){return false
}var F,E,D;
D=(this.active-1<1)?this.count:this.active-1;
if(B!=undefined){dojo.query(".divOverlayGalL")[0].style.display="block";
dojo.query(".divOverlayGalR")[0].style.display="block"
}F="ContentBoxContent"+this.id+this.active;
E="ContentBoxContent"+this.id+D;
if(dojo.query("img",dojo.byId("ContentBoxContent"+this.id+D).loaded)){dojo.byId(F).className="GalerieBoxImage";
if(!this.active-2<=1){this.preload(this.active-2)
}if(this.active-2<=1){this.preload(this.count-1)
}this.setHeight(E);
galleryAnimation(this.id,F,E,-1,this.duration);
this.active=D
}this.keyListener()
};
this.setHeight=function(E){var D=dojo.marginBox(dojo.byId(E)).h;
if(D<=100){D="500"
}dojo.style(dojo.byId("GalleryBox"+this.id),"height",(D)+"px")
};
this.keyListener=function(){var D=this;
document.onkeydown=function(E){if(!E){E=window.event
}if(E.keyCode==39){dmGallery[D.id].forward()
}if(E.keyCode==37){dmGallery[D.id].backward()
}}
};
this.animPhase=function(){if(this.anim){if(this.anim.status()=="playing"){return true
}}return false
};
this.displayShortcut=function(){var F=1,E,I,H;
if(document.cookie){if(document.cookie.indexOf("scDisplayCount=")==-1){F=1
}else{E=document.cookie.indexOf("scDisplayCount=")+15;
H=document.cookie.substring(E,document.cookie.length);
I=H.indexOf(";");
if(I==-1){I=H.length
}F=H.substring(0,I)
}}var D=new Date();
D=new Date(D.getTime()+1000*60*60*24*365);
F=new Number(F)+1;
document.cookie="scDisplayCount="+F+"; path=/; expires="+D.toGMTString()+";";
if(F<5){dojo.create("img",{src:this.shortcutImage,alt:"",id:"ShortCutImg",style:"z-index:9997; postion:relative; position:absolute; left: 180px; top: -80px;"},"GalleryBox"+this.id,"last");
dojo.create("img",{src:this.shortcutImgRed,alt:"",id:"ShortCutImgR",style:"z-index:9998; postion:relative; position:absolute; left: 180px; top: 0px"},"GalleryBox"+this.id,"last");
dojo.style("ShortCutImgR","opacity","0");
function G(K,J){dojo.animateProperty({node:"ShortCutImgR",delay:K,duration:300,properties:{opacity:{end:J}}}).play()
}dojo.fx.slideTo({node:"ShortCutImg",delay:2000,left:180,top:0,easing:dojo.fx.easing.backOut,onEnd:function(){for(var K=1200;
K<=3200;
K=K+300){var J=(J<1)?1:0;
G(K,J)
}dojo.animateProperty({node:"ShortCutImg",delay:4000,properties:{opacity:{end:0}}}).play()
}}).play()
}this.scDisplayed=true
}
}function galleryAnimation(G,F,D,C,B){var E=dojo.animateProperty({node:F,duration:B,properties:{left:{end:(-492*C),start:0}}}),A=dojo.animateProperty({node:D,duration:B,properties:{left:{end:0,start:(492*C)}},onEnd:function(){dojo.byId("GalleryImgNr"+G).innerHTML=dmGallery[G].active+" | "+dmGallery[G].count;
changeContentAd()
}});
dmGallery[G].anim=dojo.fx.combine([E,A]);
dmGallery[G].anim.play()
}function showSlideShowWindow(A){dojo.byId("GalleryFull"+A).style.display="block";
dojo.byId("GalleryTeaser"+A).style.display="none";
dmGallery[A].keyListener()
}function hideSlideShowWindow(A){dojo.byId("GalleryFull"+A).style.display="none";
dojo.byId("GalleryTeaser"+A).style.display="block"
}function changeRegion(I,J){var E,C,B,H,G,A,D;
dojo.query("#CHANNEL_SELECTOR_"+J+" > div").removeClass("active");
C=dojo.query(".regioStadt",dojo.byId("CHANNEL_CONTENT_"+J));
dojo.byId("B"+I).className="active";
dojo.place(I,"CHANNEL_CONTENT_"+J,"first");
C=dojo.query(".regioStadt",dojo.byId("REGIONAL"));
try{G=regioIMG[I];
A=regioTEXT[I];
D=regioLINK[I];
if(G!=""){E=dojo.query(".Col3Box",dojo.byId(I))[1];
if(!dojo.query("IMG",E)[0]){E.innerHTML="<a href='"+D+"'><img style='height:114px;' src='"+G+"' alt='"+A+"' /></a>"+E.innerHTML
}}dojo.query(".Col3Box",C[0])[1].style.display="block";
dojo.query(".Col3Box.Weitere > h2",C[0])[0].style.display="none";
dojo.query(".Col3Box.Weitere > h3",C[0])[0].style.display="none";
B=dojo.marginBox(I).h;
dojo.query("#"+I).style({height:"0px",overflow:"hidden",opacity:0});
dojo.fadeIn({node:I,properties:{opacity:{end:1},height:{end:B,unit:"px"}}}).play();
H=new Date();
H=new Date(H.getTime()+1000*60*60*24*365);
document.cookie="selectedSubChannel_"+J+"="+I+"; expires="+H.toGMTString()+";"
}catch(F){}}function searchSet(B,A){switch(B){case"XP":dojo.byId("HeaderSearch").action=A;
dojo.byId("HeaderSearch").method="post";
dojo.byId("TopSearchInput").name="userQuery";
break;
case"GOOGLE":dojo.byId("HeaderSearch").action=A;
dojo.byId("HeaderSearch").method="get";
dojo.byId("TopSearchInput").name="q";
break
}return true
}function displayTab(A){dojo.byId("InfoContent"+activeInfoboxTab).style.display="none";
dojo.byId("InfoTab"+activeInfoboxTab).className="Tab";
activeInfoboxTab=A;
dojo.byId("InfoContent"+activeInfoboxTab).style.display="block";
dojo.byId("InfoTab"+activeInfoboxTab).className="Tab active";
reloadIVW()
}function zoomImage(C,A){var D=C.parentNode.id;
dojo.byId(D).style.display="none";
dojo.byId(A).style.display="block";
reloadIVW();
try{dojo.byId(A).getElementsByTagName("div")[1].style.width=dojo.byId(A).getElementsByTagName("img")[0].width-10+"px"
}catch(B){}}function popIt(A,C,B){window.open(B,"popwin","width="+A+",height="+C+",scrollbars=yes")
}function toggleDiv(C,A){var B=dojo.byId(C);
if(B.style.display=="none"){dojo.fx.wipeIn({node:B,duration:200}).play()
}else{dojo.fx.wipeOut({node:B,duration:200,onEnd:function(){if(A){dojo.query("#"+C).orphan()
}}}).play()
}}function toggleFormAsync(A,D,E){console.log("toggleing div "+E+" with content from "+A+" into "+C);
var C=dojo.byId(D),F,B;
B=dojo.query("#"+D+" > div");
if(B.length>0){F=B[0].id;
if(F){toggleDiv(F,true);
if(F==E){return true
}else{C.innerHTML=""
}}}dojo.xhrGet({url:A,handleAs:"text",handle:function(H,G){if(typeof H=="error"){console.warn("error",G)
}else{dojo.byId(D).innerHTML=H;
toggleDiv(E)
}},error:function(G){console.warn("error",G);
dojo.byId(D).innerHTML="<div>Error while loading form: "+A+"</div>"
}});
return true
}function postForm(B,A){dojo.xhrPost({form:B,handleAs:"text",handle:function(D,C){if(typeof D=="error"){console.warn("error!",C)
}else{dojo.byId(A).innerHTML=D
}}})
}function postFormAndGetComments(D,C,A,B){dojo.xhrPost({form:D,handleAs:"text",handle:function(F,E){if(typeof F=="error"){console.warn("error!",E)
}else{dojo.byId(C).innerHTML=F;
dojo.xhrGet({url:A,handleAs:"text",handle:function(H,G){if(typeof H=="error"){console.warn("error",G)
}else{dojo.byId(B).innerHTML=H
}},error:function(G){console.warn("error",G);
dojo.byId(B).innerHTML="<div>Error while loading form: "+A+"</div>"
}})
}}})
}function postFormAndLoadRecommendations(C,A,B,D){dojo.xhrPost({form:C,handleAs:"text",handle:function(F,E){if(typeof F=="error"){console.warn("error!",E)
}else{dojo.byId(A).innerHTML=F;
dojo.xhrGet({url:B,handleAs:"text",handle:function(H,G){if(typeof H=="error"){console.warn("error",G)
}else{dojo.byId(D).innerHTML=H
}},error:function(G){console.warn("error",G);
dojo.byId(D).innerHTML="<div>Error while loading form: "+B+"</div>"
}})
}}})
}function toggleDivWithHeight(C,A){var B=dojo.byId(C);
alert(B.style.height);
if(B.style.height!=A+"px"||B.style.height=="auto"){B.style.height=A+"px;"
}else{alert("else");
B.style.height="0px"
}}function submitForm(B){var A=dojo.byId(B);
A.submit();
return false
}function commentMagicBox(){dynamicCommentMagicBox(155)
}function dynamicCommentMagicBox(A){dojo.query("#commBox").style({height:"0px",overflow:"hidden",opacity:0});
dojo.fx.chain([dojo.animateProperty({node:"commBox",properties:{height:{end:A,unit:"px"}}}),dojo.animateProperty({node:"commBox",properties:{opacity:{end:1}}})]).play()
}function showCommentLogin(){dojo.query("#commBox").style({height:"0px",overflow:"hidden",opacity:0});
dojo.query("#kommloginform").style({height:"180px",overflow:"hidden",opacity:0});
dojo.animateProperty({node:"kommloginform",properties:{opacity:{end:1}}}).play()
}function showLoggedInForm(){dojo.query("#kommloggedform").style({height:"180px",display:"block"});
dojo.byId("kommloginform").style.display="none"
}function modifyAndSubmitSseForm(B,A,C,D){dojo.byId(B).elements[A].value=C;
dojo.xhrPost({form:B,handleAs:"text",handle:function(F,E){if(typeof F=="error"){console.warn("error!",E)
}else{dojo.byId(D).innerHTML=F
}}});
return false
}function switchPasswordField(A){A.style.display="none";
if(A.id=="loginpwd"){dojo.byId("loginpwd_dummy").style.display="block"
}else{var B=dojo.byId("loginpwd");
B.value="";
B.style.display="block";
B.focus()
}}function submitLoginForm(E,C,B){var D=dojo.byId(C).value;
dojo.byId(B).value=D;
var A=dojo.byId(E);
A.submit();
return false
}function showFullComment(A){dojo.byId("commText"+A).style.display="none";
dojo.byId("commFullText"+A).style.display="block"
}function loadSseContent(C,A){var B={postMode:"ajax"};
loadContent(C,A,B)
}function loadSseContent(E,A,B,D){var C=new Array();
C.postMode="ajax";
C[B]=D;
loadContent(E,A,C)
}function loadContent(C,A,B){dojo.xhrPost({content:B,handleAs:"text",url:A,handle:function(E,D){dojo.byId(C).innerHTML=E
}})
}function facebookLogin(A){var B=dojo.byId("newcomment").value;
FB.Connect.requireSession(function(){dojo.xhrPost({content:{usercomment:B},handleAs:"text",url:A,handle:function(D,C){window.location.reload()
}})
},true)
}function trackClick(C,B,D){var A="/analytics/tracker+ffffff.gif?m=v&c=page_."+C+"_."+B+"_."+D+"*DEFAULT*de&r="+escape(document.referrer)+"&p="+new Date().getTime();
dojo.xhrGet({url:A,handleAs:"text",handle:function(F,E){}})
};