function $Id(idName){return document.getElementById(idName)}function ttHudBox(name){this.name=typeof (name)!="undefined"?name:"ttHud"}ttHudBox.prototype={opac:0,flagHud:false,flagContent:false,globalContentWidth:0,globalContentHeight:0,globalCustomerHeadHeight:0,globalCustomerWidth:56,globalCustomerHeight:56,ttGenerateHudBox:function(contentUrl,contentWidth,contentHeight,styleCustomer){this.globalContentWidth=parseInt(contentWidth);this.globalContentHeight=parseInt(contentHeight);this.globalCustomerHeadHeight=typeof (customerHeadHeight)!="undefined"?customerHeadHeight:0;
if($Id("ttHudBox")==null||typeof ($Id("ttHudBox"))=="undefined"){var opacDiv=document.createElement("div");var opacDiv_id=document.createAttribute("id");opacDiv_id.nodeValue="ttHudBox";opacDiv.setAttributeNode(opacDiv_id);document.body.appendChild(opacDiv)}if($Id("ttHudContainer")==null||typeof ($Id("ttHudContainer"))=="undefined"){var opacDiv=document.createElement("div");var opacDiv_id=document.createAttribute("id");opacDiv_id.nodeValue="ttHudContainer";opacDiv.setAttributeNode(opacDiv_id);document.body.appendChild(opacDiv)
}this.flagHud=true;this.ttFillHudBox(contentUrl,parseInt(contentWidth),parseInt(contentHeight),styleCustomer)},ttFadeInHudBox:function(){if(typeof (detail)!="undefined"&&detail=="zielgebiet"&&regionen_2.length>100&&navigator.appName=="Microsoft Internet Explorer"){this.opac=0.7;$Id("ttHudBox").style.filter="alpha(opacity="+(parseInt(this.opac*100))+")";$Id("ttHudBox").style.display="block";$Id("ttHudContainer").style.display="block";return }if(this.opac<=0.7){if(this.opac==0){$Id("ttHudContentWait").style.display="block";
$Id("ttHudBox").style.display="block"}$Id("ttHudBox").style.opacity=this.opac;$Id("ttHudBox").style.filter="alpha(opacity="+(parseInt(this.opac*100))+")";this.opac+=0.1;setTimeout(function(){ttHud.ttFadeInHudBox()},10)}else{this.opac=0.7;$Id("ttHudContainer").style.display="block"}},ttFadeOutHudBox:function(){this.flagHud=false;if($Id("ttHudContentDivIframe")){$Id("ttHudContentDivIframe").innerHTML="";$Id("ttHudContentDivIframe").style.display="none"}if($Id("ttHudContainer")){$Id("ttHudContainer").innerHTML="";
$Id("ttHudContainer").style.display="none"}this.flagContent=false;if(typeof (detail)!="undefined"&&detail=="zielgebiet"&&regionen_2.length>100&&navigator.appName=="Microsoft Internet Explorer"){this.opac=0;$Id("ttHudBox").style.filter="alpha(opacity="+(parseInt(this.opac*100))+")";$Id("ttHudBox").style.display="none";$Id("ttHudBox").innerHTML="";return }if(this.opac>=0){$Id("ttHudBox").style.opacity=this.opac;$Id("ttHudBox").style.filter="alpha(opacity="+(parseInt(this.opac*100))+")";this.opac-=0.1;
setTimeout("ttHud.ttFadeOutHudBox()",10)}else{this.opac=0;$Id("ttHudBox").style.display="none";$Id("ttHudBox").innerHTML=""}},ttGenerateContentDiv:function(contentUrl,contentWidth,contentHeight){var strHudContent='<div class="ttHudContainerTopLeft iepngfix"><img src="/images/spacer.gif" width="0" height="0" alt="" border="0" /></div>';strHudContent+='<div class="ttHudContainerTopCenter iepngfix" style="width: '+contentWidth+'px;"><img src="images/spacer.gif" width="0" heigtht="0" alt="" border="0" /></div>';
strHudContent+='<div class="ttHudContainerTopRight iepngfix"><img src="images/spacer.gif" width="0" heigtht="0" alt="" border="0" /></div>';strHudContent+='<div class="clearboth"><img src="images/spacer.gif" width="0" heigtht="0" alt="" border="0" /></div>';strHudContent+='<div class="ttHudContainerLeftCenter iepngfix" style="height: '+contentHeight+'px;"><img src="images/spacer.gif" width="0" heigtht="0" alt="" border="0" /></div>';strHudContent+='<div id="ttHudContentDiv" style="width: '+contentWidth+"px; height: "+contentHeight+'px;">';
strHudContent+='<div id="ttHudContentHead" class="ttHudContentHeadStyle iepngfix" onclick="ttHud.ttFadeOutHudBox(); return false;" title="Close"><img src="images/spacer.gif" width="0" heigtht="0" alt="" border="0" /></div>';strHudContent+='<div id="ttHudContentWait" style="top: '+(contentHeight/2-16)+"px; left: "+(contentWidth/2-16)+'px;"></div>';strHudContent+='<div id="ttHudContentDivIframe" style="width: '+contentWidth+"px; height: "+contentHeight+'px;">';strHudContent+='<iframe src="'+contentUrl+'" width="'+contentWidth+'" height="100%" frameborder="0" scrolling="no" style="padding: 0; margin: 0; border: 0; overflow: hidden;"></iframe>';
strHudContent+="</div>";strHudContent+="</div>";strHudContent+='<div class="ttHudContainerRightCenter iepngfix" style="height: '+contentHeight+'px;"><img src="images/spacer.gif" width="0" heigtht="0" alt="" border="0" /></div>';strHudContent+='<div class="clearboth"><img src="images/spacer.gif" width="0" heigtht="0" alt="" border="0" /></div>';strHudContent+='<div class="ttHudContainerBottomLeft iepngfix"><img src="images/spacer.gif" width="0" heigtht="0" alt="" border="0" /></div>';strHudContent+='<div class="ttHudContainerBottomCenter iepngfix" style="width: '+contentWidth+'px;"><img src="images/spacer.gif" width="0" heigtht="0" alt="" border="0" /></div>';
strHudContent+='<div class="ttHudContainerBottomRight iepngfix"><img src="images/spacer.gif" width="0" heigtht="0" alt="" border="0" /></div>';strHudContent+='<div class="clearboth"><img src="images/spacer.gif" width="0" heigtht="0" alt="" border="0" /></div>';return strHudContent},ttFillHudBox:function(contentUrl,contentWidth,contentHeight,styleCustomer){$Id("ttHudBox").style.width="100%";$Id("ttHudBox").style.height="100%";var ttFolder="";if(typeof (engine)!="undefined"&&(engine=="erde"||engine=="fewo")){ttFolder="../"
}$Id("ttHudBox").innerHTML='<iframe src="'+ttFolder+'ttHudBoxIframe.html" class="ttHudBoxIframe" width="100%" height="100%" scrolling="no"></iframe>';$Id("ttHudContainer").style.width=(contentWidth+ttHud.globalCustomerWidth)+"px";$Id("ttHudContainer").style.height=(contentHeight+ttHud.globalCustomerHeight)+"px";$Id("ttHudContainer").innerHTML=this.ttGenerateContentDiv(contentUrl,contentWidth,contentHeight,styleCustomer);this.ttFadeInHudBox();$Id("ttHudContentWait").style.display="none";setTimeout("ttHud.ttPositionHudContainer('"+contentWidth+"', '"+(contentHeight+ttHud.globalCustomerHeight)+"')",1)
},ttPositionHudContainer:function(contentWidth,contentHeight){var scrollPos=0;if(typeof (window.pageYOffset)=="number"){scrollPos=window.pageYOffset}else{if(document.body&&document.body.scrollTop){scrollPos=document.body.scrollTop}else{if(document.documentElement&&document.documentElement.scrollTop){scrollPos=document.documentElement.scrollTop}}}var wSize=ttHud.getWinSize();$Id("ttHudBox").style.width=wSize.width+"px";$Id("ttHudBox").style.height=wSize.height+"px";var hudBoxOffsetWidth=parseInt($Id("ttHudBox").offsetWidth);
var hudBoxOffsetHeight=parseInt($Id("ttHudBox").offsetHeight);var hudContainerOffsetWidth=parseInt(contentWidth);var hudContainerOffsetHeight=parseInt(contentHeight);var centerPosHorizontal=((wSize.width-hudContainerOffsetWidth-ttHud.globalCustomerWidth)/2>=1?((wSize.width-hudContainerOffsetWidth-ttHud.globalCustomerWidth)/2):"0");var centerPosVertical=((wSize.height-hudContainerOffsetHeight)/2>=1?((wSize.height-hudContainerOffsetHeight)/2):"0");$Id("ttHudContainer").style.marginLeft="120px";$Id("ttHudContainer").style.marginTop="184px";
var marginLeft=parseInt($Id("ttHudContainer").style.marginLeft)+ttHud.globalCustomerWidth;var marginTop=parseInt($Id("ttHudContainer").style.marginTop);if(hudBoxOffsetWidth<hudContainerOffsetWidth+marginLeft+15){$Id("ttHudContainer").style.marginLeft="15px"}if(hudBoxOffsetHeight<hudContainerOffsetHeight+marginTop+15){$Id("ttHudContainer").style.marginTop="15px"}$Id("ttHudBox").style.width="100%";if(hudBoxOffsetWidth<document.body.offsetWidth){$Id("ttHudBox").style.width=(document.body.offsetWidth)+"px"
}$Id("ttHudBox").style.height="100%";if(hudBoxOffsetHeight<document.body.offsetHeight){$Id("ttHudBox").style.height=(document.body.offsetHeight)+"px"}if(document.body.offsetHeight>$Id("ttHudBox").offsetHeight){centerPosVertical=((document.body.offsetHeight-$Id("ttHudBox").offsetHeight)/2>=1?((document.body.offsetHeight-$Id("ttHudBox").offsetHeight)/2):"0");$Id("ttHudBox").style.height=(document.body.offsetHeight+scrollPos)+"px"}if(scrollPos>0){$Id("ttHudContainer").style.marginTop=(scrollPos+parseInt(centerPosVertical))+"px"
}if(ttHud.flagContent==false){setTimeout("ttHud.ttshowContent()",700);ttHud.flagContent=true}},ttshowContent:function(){$Id("ttHudContentDivIframe").style.display="block"},ttResizeAction:function(){if(ttHud.flagHud&&typeof ($Id("ttHudBox")!="undefined")&&$Id("ttHudBox")){setTimeout("ttHud.ttPositionHudContainer("+(ttHud.globalContentWidth+ttHud.globalCustomerWidth)+", "+(ttHud.globalContentHeight+ttHud.globalCustomerHeight)+")",1)}},ttMouseAction:function(e){if(ttHud.flagHud&&typeof ($Id("ttHudBox")!="undefined")&&$Id("ttHudBox")){var contentLeftMargin=parseInt($Id("ttHudContainer").style.marginLeft);
var contentTopMargin=parseInt($Id("ttHudContainer").style.marginTop);if(!e){e=window.event}var mouseLeft=e.clientX;var mouseTop=e.clientY;var scrollPos=0;if(typeof (window.pageYOffset)=="number"){scrollPos=window.pageYOffset}else{if(document.body&&document.body.scrollTop){scrollPos=document.body.scrollTop}else{if(document.documentElement&&document.documentElement.scrollTop){scrollPos=document.documentElement.scrollTop}}}if(mouseLeft<contentLeftMargin||scrollPos+mouseTop<contentTopMargin||mouseLeft>(contentLeftMargin+ttHud.globalContentWidth+ttHud.globalCustomerWidth)||scrollPos+mouseTop>(contentTopMargin+ttHud.globalContentHeight)){ttHud.ttFadeOutHudBox()
}}},getWinSize:function(win){if(!win){win=window}var s=new Object();if(typeof win.innerWidth!="undefined"){s.width=win.innerWidth;s.height=win.innerHeight}else{var obj=this.getBody(win);s.width=parseInt(obj.clientWidth);s.height=parseInt(obj.clientHeight)}return s},getBody:function(win){if(win.document.compatMode&&win.document.compatMode=="CSS1Compat"){var mode=win.document.documentElement}else{var mode=win.document.body||null}return mode}};var ttHud=new ttHudBox("ttHud");window.onresize=ttHud.ttResizeAction;
document.onmousedown=ttHud.ttMouseAction;
