if(top!=self)top.location=self.location;var IS_IE=navigator.userAgent.search(/MSIE/)!=-1;var IS_OPERA=navigator.userAgent.search(/Opera/)!=-1;var IMG_PATH="../layout/templates/images/";window.onload=function(){preloadImages();showNewsSelect();hideImageNavLayers()};function showNewsSelect(){if(!IS_OPERA){var selectEl=document.getElementById("newsSelect");if(selectEl){selectEl.style.display="block"}}};function loadNews(oSelect,sFrameId){var value=oSelect.options[oSelect.options.selectedIndex].value;if(value=="#"){return}else{var frame=document.getElementById(sFrameId);frame.src="news.php?year="+value}};function setNews(oNewsTable){document.getElementById("newsList").innerHTML=oNewsTable.innerHTML;oNewsTable.innerHTML="";var selectEl=document.getElementById("newsSelect");var year=selectEl.options[selectEl.options.selectedIndex].value;if(year!="#"){var spanEl=document.getElementById("newsSpan");spanEl.style.fontWeight="bold";spanEl.firstChild.nodeValue=year}};function setHighlightColor(darkBg,element){element.style.backgroundColor=darkBg?"#EFE7D1":"#F5F0DB"}function startColorFader(darkBg,element){var step=0;var colorSequence;if(darkBg){colorSequence=["#EFE7D1","#ede6d3","#e9e5d7","#e5e4da","#e2e3dd"]}else{colorSequence=["#F5F0DB","#f4f0dd","#f2efe1","#f0efe4","#efefe7"]}var ival=window.setInterval(function(){element.style.backgroundColor=colorSequence[step];if(step===4){window.clearInterval(ival)}step++},200)}function preloadImages(){var path=IMG_PATH+"/";var prevSrc;var btn={navBack:{a:{src:path+"menu_over_left.gif"}},navHome:{a:{src:path+"menu_over_home.gif"}},navTours:{a:{src:path+"menu_over_tours.gif"}},navGallery:{a:{src:path+"menu_over_fotos.gif"}},navGbook:{a:{src:path+"menu_over_gb.gif"}},navLinks:{a:{src:path+"menu_over_links.gif"}},navForward:{a:{src:path+"menu_over_right.gif"}}};for(var b in btn){btn[b].a.img=new Image;btn[b].a.img.src=btn[b].a.src;btn[b].i=new Object;btn[b].i.clicked=false;btn[b].i.img=document.getElementById(b);btn[b].i.img.onclick=function(e){btn[this.id].i.clicked=true};btn[b].i.img.onmouseover=function(e){prevSrc=btn[this.id].i.img.src;btn[this.id].i.img.src=btn[this.id].a.img.src};btn[b].i.img.onmouseout=function(e){if(!btn[this.id].i.clicked){btn[this.id].i.img.src=prevSrc}}}};var winMap={};function popWin(sUrl,nWidth,nHeight){var name=sUrl.slice(sUrl.lastIndexOf("/")+1,sUrl.lastIndexOf("."));if(IS_IE)name=name.replace(/-/,"_");var openWin=winMap[name];if(openWin&&typeof openWin!='undefined'){if(openWin.closed){openWin=window.open(sUrl,name,"width="+nWidth+",height="+nHeight+",status=1,dependent")};openWin.focus()}else{winMap[name]=window.open(sUrl,name,"width="+nWidth+",height="+nHeight+",status=1,dependent");winMap[name].focus()}};nereidFadeObjects=new Object();nereidFadeTimers=new Object();function nereidFade(object,destOp,rate,delta){if(!document.all)return;if(object!="[object]"){setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);return};clearTimeout(nereidFadeTimers[object.sourceIndex]);diff=destOp-object.filters.alpha.opacity;direction=1;if(object.filters.alpha.opacity>destOp){direction=-1};delta=Math.min(direction*diff,delta);object.filters.alpha.opacity+=direction*delta;if(object.filters.alpha.opacity!=destOp){nereidFadeObjects[object.sourceIndex]=object;nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate)}};var img2dim={};var ratio=1.02;function scale(obj){img2dim[obj.src]={w:obj.width,h:obj.height};if(obj.width<=obj.height){obj.style.marginBottom=0}else{obj.style.marginBottom=1};obj.style.marginTop=0;obj.height=Math.round(obj.height*ratio);obj.style.marginLeft=0;obj.style.marginRight=0;obj.width=Math.round(obj.width*ratio)};function rescale(obj){obj.width=img2dim[obj.src].w;obj.style.marginLeft=1;obj.style.marginRight=1;obj.height=img2dim[obj.src].h;obj.style.marginBottom=1;obj.style.marginTop=1};document.onkeydown=keyNaviHandler;function keyNaviHandler(ev){if(window.lightboxActive)return;var aEl;if(!ev)ev=window.event;switch(ev.keyCode){case 37:aEl=document.getElementById("prev_image_url");if(!aEl){aEl=document.getElementsByName("day_before")[0]};break;case 39:aEl=document.getElementById("next_image_url");if(!aEl){aEl=document.getElementsByName("day_after")[0]};break};if(aEl&&aEl.href){window.location.href=aEl.href}};var navAniActive=false;var normalNavPath;function showNavHint(oLayer,bShowAni){if(bShowAni&&navAniActive)return;var transBgrd="transparent url(../layout/templates/images/blank.gif) no-repeat";if(bShowAni){oLayer.style.background=oLayer.hoverBgrd;window.setTimeout(function(){showNavHint(oLayer,false)},2500);navAniActive=true}else{oLayer.style.background=transBgrd;navAniActive=false}};function loadGalleryPage(sIconId){var icon=document.getElementById(sIconId);if(icon)window.location.href=icon.parentNode.href};function hideImageNavLayers(){if(!document.getElementById("imageFrame"))return;if(document.getElementById("prevImageIcon")){var pl=document.getElementById("prevImageLayer");pl.hoverBgrd="url(../layout/templates/images/gallery/naviHint_prev.gif) left 30px no-repeat";pl.onclick=function(){loadGalleryPage('prevImageIcon')};pl.onmousemove=function(){showNavHint(pl,true)};pl.onmouseout=function(){showNavHint(pl,false)};pl.style.display="block"};if(document.getElementById("nextImageIcon")){var nl=document.getElementById("nextImageLayer");nl.hoverBgrd="url(../layout/templates/images/gallery/naviHint_next.gif) right 30px no-repeat";nl.onclick=function(){loadGalleryPage('nextImageIcon')};nl.onmousemove=function(){showNavHint(nl,true)};nl.onmouseout=function(){showNavHint(nl,false)};nl.style.display="block"}};