function virtualtour1(file){newurl='../mod_panorama/mod_panorama.php?db=$db&w=500&h=340&file='+file;nw=window.open(newurl,'nwi1','width=500,height=340');nw.focus();}
function virtualtour2(file){newurl='../mod_panorama/mod_panorama.php?db=$db&w=800&h=550&file='+file;nw=window.open(newurl,'nwi2','width=800,height=550');nw.focus();}


wmtt=null;globIndex=50;document.onmousemove=updateWMTT;var xwert=50;var ywert=50;function updateWMTT(e){x=(document.all)?window.event.x+document.documentElement.scrollLeft:e.pageX;y=(document.all)?window.event.y+document.documentElement.scrollTop:e.pageY;if(wmtt!=null){xwert=x-125;ywert=y-12;wmtt.style.left=xwert+"px";wmtt.style.top=ywert+"px";}}
function startWMTT(id){wmtt=document.getElementById(id);++globIndex;wmtt.style.zIndex=globIndex;}
function stopWMTT(){wmtt=null;}
function showWMTT(id){var allPageTags=new Array();var allPageTags=document.getElementsByTagName('div');for(i=0;i<allPageTags.length;i++){if(allPageTags[i].className=='tooltip'){allPageTags[i].style.display='none';}}
wmtt=document.getElementById(id);wmtt.style.display="block";if(xwert!=""){wmtt.style.left=xwert+"px";}
if(ywert!=""){wmtt.style.top=ywert+"px";}
wmtt=null;}
function hideWMTT(id){wmtt=document.getElementById(id);wmtt.style.display="none";wmtt=null;}
function toFrontWMTT(id){wmtt=document.getElementById(id);++globIndex;wmtt.style.zIndex=globIndex;wmtt=null;}

if (crossfade_load == true) {
window.addEventListener?window.addEventListener("load",so_init,false):window.attachEvent("onload",so_init);var d=document,imgs=new Array(),zInterval=null,current=0,pause=false;function so_init(){if(!d.getElementById||!d.createElement)return;css=d.createElement("link");css.setAttribute("href",crossfade_dir);css.setAttribute("rel","stylesheet");css.setAttribute("type","text/css");d.getElementsByTagName("head")[0].appendChild(css);imgs=d.getElementById("crossimageContainer").getElementsByTagName("img");for(i=1;i<imgs.length;i++)imgs[i].xOpacity=0;imgs[0].style.display="block";imgs[0].xOpacity=.99;setTimeout(so_xfade,crossfade_speed);}
function so_xfade(){cOpacity=imgs[current].xOpacity;nIndex=imgs[current+1]?current+1:0;nOpacity=imgs[nIndex].xOpacity;cOpacity-=.05;nOpacity+=.05;imgs[nIndex].style.display="block";imgs[current].xOpacity=cOpacity;imgs[nIndex].xOpacity=nOpacity;setOpacity(imgs[current]);setOpacity(imgs[nIndex]);if(cOpacity<=0){imgs[current].style.display="none";current=nIndex;setTimeout(so_xfade,crossfade_speed);}else{setTimeout(so_xfade,crossfade_steps);}
function setOpacity(obj){if(obj.xOpacity>.99){obj.xOpacity=.99;return;}
obj.style.opacity=obj.xOpacity;obj.style.MozOpacity=obj.xOpacity;obj.style.filter="alpha(opacity="+(obj.xOpacity*100)+")";}}
}