/*	
*
* Deutschlandkarte - maptools
* @version 4.1.4
* @copyright (C) 2010 TENSQUARE gmbh (www.tensquare.de)
* @author UBE
* 
*/
var mapTools={agent:navigator.userAgent.toLowerCase(),ie4up:(document.all)?1:0,opera:(window.opera)?1:0,mac:navigator.userAgent.toLowerCase().indexOf("mac")!=-1,ns4:(document.layers)?1:0,ns6:(!document.all&&document.getElementById)?1:0,ns7:((!document.all&&document.getElementById)&&navigator.vendorSub>=7)?1:0,isIE:(navigator.appVersion.indexOf("MSIE")!=-1)?true:false,isWin:(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false,isOpera:(navigator.userAgent.indexOf("Opera")!=-1)?true:false,wwsPxPath:"/wws/?ctype=counterpixel&id=",wwsPxURL:"",ivwPxURL:"",highlightField:null,controlVersion:function(){var a;
var b;var c;try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");a=b.GetVariable("$version");}catch(c){}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");a="WIN 6,0,21,0";b.AllowScriptAccess="always";a=b.GetVariable("$version");}catch(c){}}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");a=b.GetVariable("$version");}catch(c){}}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");a="WIN 3,0,18,0";}catch(c){}}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
a="WIN 2,0,0,11";}catch(c){a=-1;}}return a;},getSwfVer:function(){var g=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var f=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var a=navigator.plugins["Shockwave Flash"+f].description;var e=a.split(" ");var c=e[2].split(".");var h=c[0];var b=c[1];var d=e[3];if(d==""){d=e[4];}if(d[0]=="d"){d=d.substring(1);}else{if(d[0]=="r"){d=d.substring(1);if(d.indexOf("d")>0){d=d.substring(0,d.indexOf("d"));
}}}g=h+"."+b+"."+d;}}else{if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1){g=4;}else{if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1){g=3;}else{if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1){g=2;}else{if(this.isIE&&this.isWin&&!this.isOpera){g=this.controlVersion();}}}}}return g;},detectFlashVer:function(b,f,c){var g=this.getSwfVer();var h,d,j;if(g==-1){return false;}else{if(g!=0){if(this.isIE&&this.isWin&&!this.isOpera){h=g.split(" ");d=h[1];j=d.split(",");
}else{j=g.split(".");}var a=j[0];var i=j[1];var e=j[2];if(a>parseFloat(b)){return true;}else{if(a==parseFloat(b)){if(i>parseFloat(f)){return true;}else{if(i==parseFloat(f)){if(e>=parseFloat(c)){return true;}}}}}return false;}}},getWWSPxURL:function(){if(this.wwsPxURL!=""){return this.wwsPxURL+"&rs="+Math.random();}else{return"";}},getWWSPxTag:function(a){if(!oeMap||oeMap.getMapServerURL()==""){return"";}var b=typeof(a)=="undefined"?oeMap.logIds.defaultMap:a;this.wwsPxURL=oeMap.getMapServerURL()+this.wwsPxPath+b+"&fpv="+this.getSwfVer();
return'<div><img name="wwspx" id="wwspx" src="'+this.getWWSPxURL()+'"width="1" height="1"></div>';},logVersion:function(a){if(this.getRandom(1,20)>19){return this.getWWSPxTag(a);}return"";},getSZMTag:function(){var a=null,b=null;if(document.getElementById){a=document.getElementById("ivwpx");b=document.getElementById("wwspx");}else{if(document.layers){a=document.layers[0].document.ivwpx;b=document.layers[0].document.wwspx;}else{a=document.ivwpx;b=document.wwspx;}}if(a&&(this.ivwPxURL!="")){a.src=this.ivwPxURL;
}if(b&&(this.wwsPxURL!="")){b.src=this.getWWSPxURL();}},callLoadIVWPixel:function(c){try{var c=(typeof(c)=="undefined"||isNaN(parseInt(c)))?"":c;var b=(typeof(b))=="undefined"?0:b;var d=(typeof(d))=="undefined"?0:d;loadIVWPixel(d,c,b);}catch(a){}},getElement:function(d,f,c,b){var e,a;if(this.ns6){if(c.toLowerCase()=="id"){if((e=d.getElementById(f))){return e;}}if(c.toLowerCase()=="name"){a=d.getElementsByName(f);if((e=a[b])){return e;}}}if(this.ie4up){if(c.toLowerCase()=="id"||c.toLowerCase()=="name"){if((e=d.all(f))){return e;
}}}if(this.ns4){if(c.toLowerCase()=="id"||c.toLowerCase()=="name"){e=d[f];if(!e){e=d.anchors[f];}if(e){return e;}}}return false;},getContent:function(d,g,a){var b="";try{var f=this.getElement(d,g,"id",a);if(!(f=this.getElement(d,g,"name",a))){b="";}b=f.value;}catch(c){b="";}finally{return b;}},setContent:function(c,e,b,a){var d=this.getElement(c,e,"id",a);if(!d){d=this.getElement(c,e,"name",a);}if(!d){return false;}d.value=b;return true;},setFieldVal:function(b,e,h){var c,a,g;g=document;c=(g.forms)?g.forms[b]:null;
if(c){a=c[e];}else{if(g.all){a=g.all[e];}}if(!a&&g.getElementById){a=g.getElementById(e);}if(a&&(a.value!=null)){a.value=h;}},setFieldStyle:function(a,j,b,h,k){var e,c,g;g=document;e=(g.forms)?g.forms[a]:null;if(e){c=e[j];}else{if(g.all){c=g.all[j];}}if(!c&&g.getElementById){c=g.getElementById(j);}if(c&&(c.style.background!=null)){this.highlightField=c;c.style.background=h;var i=this;window.setTimeout(function(){i.removeHighlight(c,b);},k);}},removeHighlight:function(a,b){if(a&&a.style.background!=null){a.style.background=b;
}},getRandom:function(c,a){if(c>a){return(-1);}if(c==a){return(c);}var b=parseInt(Math.random()*(a+1));return(b+c<=a?b+c:b);},noSwf:function(){return(this.ns7&&(navigator.plugins["Shockwave Flash"].description.indexOf("9.0  r28")!=-1))?1:0;},toJSON:function(c){var a=/["\\\x00-\x1f\x7f-\x9f]/g;var b={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};if(!a.test(c)){return'"'+c+'"';}else{return'"'+c.replace(a,function(d){var e=b[d];if(e){return e;}e=d.charCodeAt();return"\\u00"+Math.floor(e/16).toString(16)+(e%16).toString(16);
})+'"';}},extend:function(c,b){for(var a in b){c[a]=b[a];}return c;}};var oeMap={oetbMainWindow:null,swfVersion:{major:8,minor:0,revision:0},mapServerURL:"map3.dasoertliche.de",mapVersion:"v0018",arealMap:{file:"initial_246x254px.swf",style:"width: 100%; height: 15.5em;",logId:""},citySelectionMap:{file:"initial_316x380px.swf",style:"width: 100%; height: 30em;",logId:""},wizardMap:{file:"initial_searchassistant.swf",style:"width: 410px; height: 237px;",overrideStyle:{left:-120,top:7},logId:""},mapFolder:"/mapdata/",altFolder:"alt/",mapBaseUrl:"",mapAltBaseUrl:"",redirectUrl:"/scripts/redir.asp",regionListUrl:"/scripts/getregionlist.asp",language:"de",bgColor:"#FFFFFF",cityListMap:{mapVersion:"v0005",id:"clmap",file:"clmap280x360.swf",bgColor:"#FFFFFF",style:"margin:30px 0 0 0; width: 100%; height: 30em;",cityId:-1,logId:""},clClick:null,clMouseOut:null,clMouseOver:null,mapServerParams:{bn:"",kgs:"",kw:"",ci:"",cmd:"",rs:""},amSearchForm:null,amCiField:null,amCiRefField:null,amKwField:"kw",topkwFieldId:"topKw",subRegionsId:"subRegions",commandId:"cmd",regionSelectId:"rs",cityId:"ci",regionData:null,regionListAreaId:"ortsauswahl",regionListHighlightClass:"hilite",urlParamsId:"urlParams",bookId:"bn",nearbyId:"nearbyBook",regionId:"kgs",kgsParamName:null,nameId:"name",rowTemplate:'<tr id=":::ID:::" onmouseover="javascript:oeMap.onRegionListMouseOver(this.id, :::REGION:::); return false;" onmouseout="javascript:oeMap.onRegionListMouseOut(this.id); return false;" onclick="javascript:oeMap.onRegionSelect(:::REGION:::); return false;"><td><a href="#">:::TEXT:::</a></td></tr>',regionListFooter:'<tr><td><a href="#" class="last_link" onclick="javascript:oeMap.onRegionSelect(:::REGION:::); return false;">:::ALLCITIES:::</a></td></tr>',breadcrumbLink:'<a href="#" class="bread" onclick="javascript:oeMap.onRegionSelect(:::REGION:::); return false;">:::TEXT:::</a>',breadcrumbBoby:"<tr><td>:::TEXT:::</td></tr>",breadcrumbDelimiter:" / ",regionSpace:":::REGION:::",textSpace:":::TEXT:::",idSpace:":::ID:::",allCitiesSpace:":::ALLCITIES:::",listIdPrefix:"regionList_",pageviewListener:[],pageviewEventId:"pageview",flashMapObject:null,highlightFlashVarName:"highlightRegionId",text:{de:{allCities:"In allen Orten suchen",allCitiesCiValue:"Alle Orte der Region"},en:{allCities:"In all these cities",allCitiesCiValue:"Alle Orte der Region"}},jsonpId:"oemapcallback",csCiField:null,csArKeyField:null,csSearchForm:null,staticMode:"",wizardMode:"",mapTagId:"ts_gmap",gmapAreaId:"ortsauswahl_karte",ciFieldId:"Ort_PLZ",keyFieldId:"kgs",kgs:"",buc:"",ci:"",bookNo:"",ciFieldDefaultColor:"#FFFFFF",ciFieldHiliteColor:"#CFDAE6",ciFieldHiliteDuration:300,twistDelay:100,noFlashContent:{map246x254:'<a href="#" onclick="javascript:oeMap.doJump(:::PARAMS:::); return false;"><img src=":::URL:::246x254.gif" width="246" height="254"  /></a> '},showNoFlashContent:0,logIds:{defaultMap:"map",arealMap:"arealmap",cityList:"citylist",regionList:"regionlist",wizardRegionList:"wizardregionlist",wizardCityList:"wizardcitylist"},wizardModeCheckId:"wiz_karte_content",initCall:true,init:function(b,a){this.mapServerURL=this.isUndefined(b)?this.mapServerURL:b;
if(this.mapServerURL.indexOf("://")<0){this.mapServerURL="http://"+this.mapServerURL;}this.mapBaseUrl=this.mapServerURL+this.mapFolder+this.mapVersion+"/";this.mapAltBaseUrl=this.mapBaseUrl+this.altFolder;this.redirectUrl=this.mapServerURL+this.redirectUrl;this.regionListUrl=this.mapServerURL+this.regionListUrl;this.oetbMainWindow=this.isDefined(a)?a:window;},getCitySelectionMap:function(b){var a;if(this.isWizardMode()){a=this.wizardMap;a.logId=this.logIds.wizardRegionList;}else{a=this.citySelectionMap;
a.logId=this.logIds.regionList;}a.regionSelect=1;return this.getMap(a,b);},getMap:function(b,l){var c=20000;var d=this.isDefined(l.kgs)?l.kgs:"";var f=this.isDefined(l.cities)?l.cities:"";var g=this.isDefined(l.showSelAllBtn)?l.showSelAllBtn:"";this.bookNo=this.isUndefined(l.bn)&&isNaN(parseInt(l.bn))?0:parseInt(l.bn);var h=(this.bookNo+c==c)?"":this.bookNo+c;var i=(h=="")?d:"";var j=this.isDefined(b.regionSelect)?b.regionSelect:"";var a=this.wizardMode==1?"select":"";var e="baseurl="+this.mapBaseUrl+"&cities="+escape(f)+"&showselallbtn="+g+"&lang="+this.language+"&staticmode="+this.staticMode+"&rsembedded="+j+"&wizardmode="+this.wizardMode+"&mapmode="+a+"&initialcity="+i+"&bookid="+h;
var k={logId:b.logId,style:b.style,url:this.mapBaseUrl+b.file,flashvars:e};return this.getMapTag(k);},clHighlightCity:function(a){a=this.isUndefined(a)?-1:a;this.setMapVariable("SelectedEntryID",a);},initCityListMap:function(a){this.mapTagId=this.cityListMap.id;var b={logId:(this.isWizardMode()?this.logIds.wizardCityList:this.logIds.cityList),width:this.cityListMap.width,height:this.cityListMap.height,url:this.mapServerURL+"/citylist/"+this.cityListMap.mapVersion+"/"+this.cityListMap.file,flashvars:"cities="+a+"&baseurl="+this.mapServerURL,bgcolor:this.cityListMap.bgColor,style:this.cityListMap.style};
this.expandMapTag(this.getMapTag(b));},isWizardMode:function(){var a=mapTools.getElement(document,this.wizardModeCheckId,"id",0);if(this.wizardMode||a){return true;}return false;},getMapTag:function(d){var b="";if(mapTools.noSwf()){return b;}var f={logId:(this.isUndefined(d.logId))?this.logIds.defaultMap:d.logId,id:(this.isUndefined(d.id))?this.mapTagId:d.id,name:(this.isUndefined(d.name))?this.mapTagId:d.name,width:(this.isUndefined(d.width))?0:d.width,height:(this.isUndefined(d.height))?0:d.height,url:(this.isUndefined(d.url))?"":d.url,bgcolor:(this.isUndefined(d.bgcolor))?this.bgColor:d.bgcolor,style:(this.isUndefined(d.style))?"":d.style,flashvars:(this.isUndefined(d.flashvars))?"":d.flashvars};
if(mapTools.detectFlashVer(this.swfVersion.major,this.swfVersion.minor,this.swfVersion.revision)&&this.mapServerURL){var a={name:f.name,id:f.id,style:f.style};var e={allowScriptAccess:"always",wmode:"transparent",quality:"high",menu:"false",bgcolor:f.bgcolor,FlashVars:f.flashvars};if(mapTools.ie4up&&!mapTools.mac){a.classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000";a.codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0";e.movie=f.url;b="<object ";for(var c in a){b+=c+'="'+a[c]+'" ';
}for(var c in e){b+='><param name="'+c+'" value="'+e[c]+'" /> ';}b+="></object>";}else{if(mapTools.ns6){mapTools.extend(a,e);a.style=f.style;a.src=f.url;a.swLiveConnect="true";a.type="application/x-shockwave-flash";a.pluginspage="http://www.macromedia.com/go/getflashplayer";b="<embed ";for(var c in a){b+=c+'="'+a[c]+'" ';}b+="></embed>";}}}else{if(this.showNoFlashContent){b=this.getNoFlashContent(f);}}if(f.logId!=this.logIds.wizardRegionList||b!=""){if(!this.initCall){mapTools.callLoadIVWPixel(this.buc);
}this.initCall=false;return b+mapTools.getWWSPxTag(f.logId);}return b;},getNoFlashContent:function(c){var a="";var b="{}";if(this.staticMode){a=this.noFlashContent.map246x254.replace(":::URL:::",this.mapAltBaseUrl);if(this.bookNo!=""){b="{id : "+this.bookNo+", idType : 'bookno'}";}a=a.replace(":::PARAMS:::",b);}return a;},initWizardMap:function(){this.wizardMode=1;this.initialize();},initCitySelectionMap:function(){this.initialize();},initArealMap:function(b,a){this.staticMode=1;this.showNoFlashContent=1;
this.arealMap.logId=this.logIds.arealMap;this.expandMapTag(this.getMap(this.arealMap,{bn:b,cities:a}));},expandMapTag:function(a){var b=mapTools.getElement(document,this.gmapAreaId,"id",0);if(b){if(this.isWizardMode()){this.modifyStyle(b,this.wizardMap.overrideStyle);}b.innerHTML=a;this.flashMapObject=this.getFlashMovie();}},modifyStyle:function(b,a){$(b).css(a);},getMapServerURL:function(){if(this.mapServerURL.indexOf("://")<0){this.mapServerURL="http://"+this.mapServerURL;}return this.mapServerURL;
},doTheTwist:function(d,h,c,b,f){if(!this.mapServerURL||!this.oetbMainWindow){return;}var e=this.staticMode&&!c&&d!="mapbookid"&&d!="bookno";if(this.kgsParamName===null){var g={id:e?"":h,idtype:e?"":d,kgs:e?h:c,kw:this.getKeyword(),topKw:this.isTopKw(),citylist:this.staticMode&&!f===true?1:"",ci:this.staticMode&&!f===true?"":b};}else{var g={};g[this.kgsParamName]=e?h:c;}var a=this.createUrl(this.redirectUrl,g);this.oetbMainWindow.location=a;},doJump:function(a){for(var e in a){a[e]=a[e]==null||a[e]=="null"?"":a[e];
}var d=!a.idType?"":a.idType;var h=!a.id?"":a.id;var c=!a.addId?"":a.addId;var b="";if(this.isDefined(a.ci)&&a.ci!=""){b=a.ci;}else{if(this.isDefined(a.name)&&a.name!=""){b=a.name;}}var f=a.cityState;var g=this;window.setTimeout(function(){g.doTheTwist(d,h,c,b,f);},this.twistDelay);},mapInterface:function(b,a){switch(b.toLowerCase()){case"regionselect":this.onRegionSelect(a);break;case"regionrollover":this.onRegionRollOver(a);break;case"regionrollout":this.onRegionRollOut(a);break;case"zoomout":this.onZoomOutButtonClick();
break;case"bookjump":a.idType="mapbookid";if(this.staticMode){if(a.ci.toLowerCase()=="berlin"){a.id="2239";a.addId="11000000";a.idType="bookno";a.cityState=true;}if(a.ci.toLowerCase()=="hamburg"){a.id="2244";a.addId="02000000";a.idType="bookno";a.cityState=true;}if(a.ci.toLowerCase()=="bremen"){a.id="2240";a.addId="04011000";a.idType="bookno";a.cityState=true;}}this.doJump(a);break;case"communityjump":a.idType="mapcommid";this.doJump(a);break;case"getszmtag":mapTools.getSZMTag();break;case"getwwspxurl":mapTools.getWWSPxURL();
break;}},cityListInterface:function(b,a){switch(b){case 1:this.cityListMap.cityId=a;this.clMouseOver(a);break;case 2:this.clMouseOut(this.cityListMap.cityId);this.cityListMap.cityId=-1;break;case 3:this.clClick(a);break;}},getKGSByName:function(b,a){var f="";try{var e=this.isUndefined(this.regionData[this.subRegionsId])?[]:this.regionData[this.subRegionsId];for(var d=0;d<e.length;d++){regionName=this.isUndefined(e[d].name)?"":e[d].name;if(b==regionName){if(b.toLowerCase()=="bremen"){f="04011000";
}else{f=this.isUndefined(e[d][this.regionId])?"":e[d][this.regionId];}if(f!=""){var a=this.isUndefined(a)?f.length:a;while(f.length<a){f+="0";}}}}}catch(c){}finally{return f;}},initialize:function(a){if(this.kgs==""&&this.buc==""){a=this.getQueryParams();}this.mapServerParams[this.bookId]=this.buc;this.mapServerParams[this.regionId]=this.kgs;this.expand();},expand:function(a){a=this.isUndefined(a)?{}:a;mapTools.extend(this,a);this.getData();},getData:function(){var b=this;var a=this.regionListUrl.indexOf("?")==-1?"?":"&";
$.getJSON(this.regionListUrl+a+this.jsonpId+"=?",this.mapServerParams,function(c){b.onLoadData(c);});},onLoadData:function(a){if(this.doRedirect(a)===false){if(this.isDefined(a[this.subRegionsId])&&a[this.subRegionsId].length<=1){a.mapServerParams=a[this.subRegionsId].length==1?a[this.subRegionsId][0]:{};a.mapServerParams[this.commandId]="redirect";a.mapServerParams[this.regionSelectId]="1";a.mapServerParams[this.cityId]=a[this.cityId];a.mapServerParams[this.amKwField]=this.getKeyword();this.expand(a);
}else{this.regionData=a;this.expandCitySelectionList(this.regionData);this.callCitySelectionListener(this.pageviewEventId,this.regionData);this.expandMapTag(this.getCitySelectionMap(this.regionData));this.createOnScrollEvent();}}},doRedirect:function(a){var c=this.isUndefined(a[this.commandId])?"":a[this.commandId];a[this.cityId]=this.mapServerParams[this.cityId];if(c=="redirect"){if(this.wizardMode==1){this.setWizardFields(a);}else{var b={};if(this.isDefined(a.bn)&&a.bn!=""){b={idType:"bookno",id:a.bn,addId:a.kgs,ci:a.ci};
}else{b={idType:"kgs",id:a.kgs,addId:a.kgs,ci:a.ci};}this.doJump(b);}}else{return false;}},expandCitySelectionList:function(data){try{var regions=this.isUndefined(data[this.subRegionsId])?[]:data[this.subRegionsId];var isNearbyBook=this.isUndefined(data[this.nearbyId])?"":data[this.nearbyId];var region,regionName,regionBookId,regionId,queryParams,contentId;var list=$(this.toJQueryId(this.regionListAreaId));if(!list){return;}list.empty();list.append(this.getBreadCrumbNavigation());var regionListContent=" ";
for(var i=0;i<regions.length;i++){regionName=this.isUndefined(regions[i].name)?"":regions[i].name;regionId=this.isUndefined(regions[i][this.regionId])?"":regions[i][this.regionId];regionBookId=this.isUndefined(regions[i][this.bookId])?"":regions[i][this.bookId];queryParams=this.isUndefined(regions[i][this.urlParamsId])?"":regions[i][this.urlParamsId];if(queryParams==""||regionName==""){continue;}contentId=regionBookId==""||isNearbyBook!="1"?regionId:regionBookId;region={};region[this.bookId]=regionBookId;
region[this.nearbyId]=isNearbyBook;region[this.regionId]=regionId;region[this.cityId]=regionName;var regionStr=this.toFlashSource(region).replace(/"/gi,"'");regionListContent=this.rowTemplate.replace(this.textSpace,this.germanUmlauts2HTML(regionName)).replace(eval("/"+this.regionSpace+"/gi"),regionStr).replace(this.idSpace,this.listIdPrefix+contentId);list.append(regionListContent);}list.append(this.getRegionListFooter());}catch(ex){}},createOnScrollEvent:function(){},callCitySelectionListener:function(c,a){if(c.toLowerCase()==this.pageviewEventId&&!this.initCall){if(this.pageviewListener){for(var b=0;
b<this.pageviewListener.length;b++){var d=this.pageviewListener[b];if(this.isFunction(d)){d(c,this.getCitySelectionListenerParams(a));}}}}},getCitySelectionListenerParams:function(b){var a={};a.type=this.isDefined(b.nearbyBook)&&b.nearbyBook==1?"book":"region";a.id=this.isDefined(b.kgs)?b.kgs:"";if(a.id=="00"){a.id="de";}a.name=this.isDefined(b.name)?b.name:"";return a;},getRegionListFooter:function(){if(this.isUndefined(this.regionData.bn)||this.regionData.nearbyBook=="1"){return" ";}var a="{'"+this.commandId+"':'redirect','kgs':'', 'bn':'"+this.regionData.bn+"','ci':'"+this.getText("allCitiesCiValue")+"'}";
return this.regionListFooter.replace(this.regionSpace,a).replace(this.allCitiesSpace,this.getText("allCities"));},getBreadCrumbNavigation:function(){var c=this.regionData.name;var b=this.regionData.parentKey;var e=this.regionData.parentName;if(this.isUndefined(b)||this.isUndefined(e)){return" ";}var d=this.isUndefined(this.regionData[this.bookId])?this.regionData.kgs:this.regionData.bn;var g=this.isUndefined(this.regionData[this.bookId])?"{'bn' : '', 'kgs' : '"+d+"'}":"{'bn' : '"+d+"'}";var f="";
var a="";if(b!="00"&&b!=""){f=this.breadcrumbLink.replace(this.regionSpace,"{'bn' : '', 'kgs' : '00'}").replace(this.textSpace,"Deutschland");}if(b!=""){a=f==""?"":this.breadcrumbDelimiter;f+=a+this.breadcrumbLink.replace(this.regionSpace,"{'bn' : '', 'kgs' : '"+b+"'}").replace(this.textSpace,e);}a=f==""?"":this.breadcrumbDelimiter;f+=a+this.breadcrumbLink.replace(this.regionSpace,g).replace(this.textSpace,c);return this.breadcrumbBoby.replace(this.textSpace,f);},getKeyword:function(){return this.getContent(this.amKwField);
},isTopKw:function(){var a=this.getContent(this.topkwFieldId);if(!a){a=this.getQueryParam(this.topkwFieldId);}if(a){a=this.getQueryParam(this.amKwField)==this.getKeyword()?1:"";}return a;},getContent:function(a){return mapTools.getContent(document,a,0);},getQueryParam:function(c){var b="";var a=this.getQueryParams();b=this.isDefined(a[c])?a[c]:"";return b;},getQueryParams:function(){var c={};try{var a=window.location.href;if(a.indexOf("?")!=-1){c=this.toQueryParams(a.substring(a.indexOf("?"),a.length));
}}catch(b){}finally{return c;}},onRegionSelect:function(a){if(this.isObject(a)){a.rs=1;if(this.wizardMode==1&&this.isDefined(a[this.cityId])&&a[this.cityId]!=""){}else{if(this.isUndefined(a[this.cityId])&&this.isDefined(a.kgs)&&a.kgs!=""){a[this.cityId]=this.getNameByKGS(a.kgs);}}a[this.amKwField]=this.getKeyword();this.expand({mapServerParams:a});}},onRegionRollOver:function(a){if(this.isObject(a)){this.regionListHighlight(this.listIdPrefix+a.key);}},onRegionRollOut:function(a){if(this.isObject(a)){this.removeRegionListHighlight(this.listIdPrefix+a.key);
}},onZoomOutButtonClick:function(){var a=this.isUndefined(this.regionData.parentKey)?"":this.regionData.parentKey;this.mapServerParams[this.regionId]=a;this.mapServerParams[this.bookId]="";this.expand({mapServerParams:this.mapServerParams});},onRegionListMouseOver:function(b,a){this.regionListHighlight(b);this.setMapVariable(this.highlightFlashVarName,this.toFlashSource(a));},onRegionListMouseOut:function(a){this.removeRegionListHighlight(a);this.setMapVariable(this.highlightFlashVarName,"");},setMapVariable:function(a,b){if(this.isDefined(this.flashMapObject)&&this.flashMapObject!==null){this.flashMapObject.SetVariable(a,b);
}},getNameByKGS:function(a){if(this.regionData!=null){if(this.isDefined(this.regionData.subRegions)){var c=this.regionData.subRegions;for(var b in c){if(this.isDefined(c[b].kgs)&&c[b].kgs==a){return c[b].name;}}}}return"";},regionListHighlight:function(c){try{var b=mapTools.getElement(document,c,"id",0);b.setAttribute(mapTools.ie4up?"className":"class",this.regionListHighlightClass);b.style.cursor="pointer";}catch(a){}},removeRegionListHighlight:function(c){try{var b=mapTools.getElement(document,c,"id",0);
b.setAttribute(mapTools.ie4up?"className":"class","");}catch(a){}},toFlashSource:function(d){var b=",";var e="";var a="";for(var c in d){if(this.isObject(d[c])){e=this.toFlashSource(d[c]);}else{e=mapTools.toJSON(c)+":"+mapTools.toJSON(d[c]);}a+=a==""?e:b+e;}return"{"+a+"}";},createUrl:function(b,e){var d="";try{e=!this.isObject(e)?{}:e;var a={};if(b.indexOf("?")!=-1){d=b.substring(0,b.indexOf("?"));a=this.toQueryParams(b.substring(b.indexOf("?")+1,b.length));}else{d=b;}mapTools.extend(a,e);var f=this.toQueryString(a);
return f?d+"?"+f:d;}catch(c){return"";}},toQueryString:function(g,f){var a=[];var c=escape;for(var e in g){if(!this.isString(e)){continue;}var h=g[e];if(!this.isArray(h)){h=[h];}for(var d=0;d<h.length;d++){var b=h[d];if(this.isFunction(b)||(!f&&this.isObject(b))){continue;}a.push(e+(this.isDefined(b)?"="+c(String(b)):""));}}return a.join("&");},isDefined:function(b){return typeof b!=="undefined";},isUndefined:function(b){return typeof b==="undefined";},isFunction:function(a){return typeof a==="function";
},isObject:function(a){return a&&typeof a==="object";},isString:function(a){return typeof a==="string";},isArray:function(a){return a&&a.constructor===Array;},getFlashMovie:function(a){a=this.isDefined(a)?a:this.mapTagId;return(navigator.appName.indexOf("Microsoft")!=-1)?window[a]:document[a];},replaceHTMLChars:function(b){var a=b.replace(/&auml;/g,"ä");a=a.replace(/&Auml;/g,"Ä");a=a.replace(/&ouml;/g,"ö");a=a.replace(/&Ouml;/g,"Ö");a=a.replace(/&uuml;/g,"ü");a=a.replace(/&Uuml;/g,"Ü");a=a.replace(/&szlig;/g,"ß");
return a;},germanUmlauts2HTML:function(b){var a=b.replace(/ä/g,"&auml;");a=a.replace(/Ä/g,"&Auml;");a=a.replace(/ö/g,"&ouml;");a=a.replace(/Ö/g,"&Ouml;");a=a.replace(/ü/g,"&uuml;");a=a.replace(/Ü/g,"&Uuml;");a=a.replace(/ß/g,"&szlig;");return a;},htmlEntities:function(a){var b=document.createElement("_oeMapHtmlEntities_");b.appendChild(document.createTextNode(a));return b.innerHTML;},setWizardFields:function(c){try{var a=this.isUndefined(c.ci)||c.ci==""?this.replaceHTMLChars(this.getNameByKGS(c.kgs)):c.ci;
a=a==""&&this.isDefined(c[this.nameId])?(c[this.nameId]):a;mapTools.setFieldVal(null,this.ciFieldId,unescape(a));mapTools.setFieldVal(null,this.keyFieldId,c.kgs);mapTools.setFieldStyle(this.amSearchForm,this.ciFieldId,this.ciFieldDefaultColor,this.ciFieldHiliteColor,this.ciFieldHiliteDuration);}catch(b){}},toJQueryId:function(a){return a.substring(0,1)=="#"?a:"#"+a;},getText:function(b){var a=this.language===""?"de":this.language;return this.isDefined(this.text[a][b])?this.text[a][b]:"";},toQueryParams:function(h,e,d){e=this.isDefined(e)?e:"&";
d=this.isDefined(d)?d:"=";var c={};try{var g=h.split(e);for(var b in g){var f=g[b].split(d);c[f[0]]=this.isDefined(f[1])?f[1]:"";}}catch(a){}finally{return c;}},addEventListener:function(a,b){switch(a.toLowerCase()){case this.pageviewEventId:this.pageviewListener.push(b);break;}}};function OEMapInitialize(a){oeMap.init(a,this);}var oeMapLayerStyle={REGION_NOBORDER:"REGION_NOBORDER",REGION_BORDER:"REGION_BORDER",CLEARREGION_NOBORDER:"CLEARREGION_NOBORDER",CLEARREGION_BORDER:"CLEARREGION_BORDER"};var oeMapLayer={debug:(oeMap.getMapServerURL().indexOf("map3")<0)?true:false,logger:null,map:null,config:{projection:"WGS84",bi:null,target:"map",size:{width:246,height:254},style:oeMapLayerStyle.REGION_BORDER,alpha:30},mapContainer:null,internalMapContainerId:"oeMapContainer",eventListener:{click:[]},mapDataUrl:"/scripts/maplayer.asp",jsonpId:"oemaplayercallback",mapServerData:{bi:null,imgsrc:null},overlayProperties:{id:"tsmapoverlay",style:"position:absolute; top:0px; left:0px; width:246px; height:254px; z-index:1000;"},defaultRegionKey:"00",defaultRegionKeyRequest:-1,init:function(a){this.initLogger();
this.setConfig(a);},initLogger:function(){if(this.debug){if(typeof(TSLogger)!="undefined"){this.logger=TSLogger;}}},setConfig:function(a){try{this.config.bi=typeof(a.bi)=="undefined"?this.config.bi:a.bi;this.config.target=typeof(a.target)=="undefined"?this.config.target:a.target;if(this.isObject(a.size)){this.config.size.width=typeof(a.size.width)=="undefined"?this.config.size.width:a.size.width;this.config.size.height=typeof(a.size.height)=="undefined"?this.config.size.height:a.size.height;}this.config.style=typeof(a.style)=="undefined"?this.config.style:a.style;
this.config.alpha=typeof(a.alpha)=="undefined"?this.config.alpha:a.alpha;}catch(b){this.error("setConfig: "+b);}},setStyle:function(b){for(var a in oeMapLayerStyle){if(b.toUpperCase()==oeMapLayerStyle[a]){this.config.style=oeMapLayerStyle[a];return;}}},setMapSize:function(a,b){this.config.size.width=a;this.config.size.height=b;},expand:function(a){try{this.init(a);this.getData();}catch(b){this.error("expand: "+b);}},getMapExtent:function(){var b={};try{b={centerLat:this.mapServerData.center.y,centerLng:this.mapServerData.center.x,p1Lat:this.mapServerData.bounds.maxy,p1Lng:this.mapServerData.bounds.maxx,p2Lat:this.mapServerData.bounds.maxy,p2Lng:this.mapServerData.bounds.minx,p3Lat:this.mapServerData.bounds.miny,p3Lng:this.mapServerData.bounds.minx,p4Lat:this.mapServerData.bounds.miny,p4Lng:this.mapServerData.bounds.maxx};
}catch(a){this.error("getMapExtent: "+a);}finally{return b;}},expandMap:function(){try{this.mapContainer=document.getElementById(this.config.target);$("<div/>",{click:function(){oeMapLayer.onOverlayClick("click",this);}}).prependTo(this.mapContainer);this.map=new SearchableMap(this.mapContainer);IWEventManager.addListener(this.map,"oninitialize",function(){var c=new oeMapOverlay(oeMapLayer.map,oeMapLayer.map.getBounds().getNorthWest());oeMapLayer.map.getOverlayManager().removeLayer(0);oeMapLayer.map.getOverlayManager().getLayer(0).addOverlay(c);
});this.map.getOptions().setSize(new IWSize(this.config.size.width,this.config.size.height));this.map.getOptions().setMouseWheelAction(IWMapOptions.CONTROL_NONE);this.map.getOptions().setRightMouseAction(IWMapOptions.CONTROL_NONE);this.map.getOptions().setLeftMouseAction(IWMapOptions.CONTROL_NONE);this.map.setExtent(this.getMapExtent());var a=new oeMapOverlay(this.map,this.map.getBounds().getNorthWest());this.map.getOverlayManager().getLayer(0).addOverlay(a);}catch(b){this.error("expandMap: "+b);
}},expandOverlay:function(){$("<img/>",{src:this.getImageSource()}).prependTo($("<div/>",{id:this.overlayProperties.id,style:this.overlayProperties.style,click:function(){oeMapLayer.onOverlayClick("click",this);}}).prependTo(this.mapContainer));},addEventListener:function(b,c){try{this.eventListener[b.toLowerCase()].push(c);}catch(a){this.error("addEventListener: "+a);}},onOverlayClick:function(b,a){this.onEvent(b,a);},onEvent:function(e,a){try{var d=e.toLowerCase();if(this.eventListener[d]){for(var c=0;
c<this.eventListener[d].length;c++){var f=this.eventListener[d][c];if(this.isFunction(f)){f(d,a);}}}else{throw"onEvent: Unknown event: "+e;}}catch(b){this.error(b);}},getImageSource:function(){return oeMap.getMapServerURL()+this.mapServerData.imgsrc;},getData:function(b){var d=this;var a=oeMap.getMapServerURL().indexOf("?")==-1?"?":"&";var c={bi:oeMap.isDefined(b)?b:this.config.bi,prj:this.config.projection,alpha:this.config.alpha,style:this.config.style};$.getJSON(oeMap.getMapServerURL()+this.mapDataUrl+a+this.jsonpId+"=?",c,function(e){d.onLoadData(e);
});},onLoadData:function(b){try{if(oeMap.isDefined(b.error)){if(b.error.id==1){this.getDefaultRegionData();}return;}this.mapServerData=b;this.expandMap();}catch(a){this.error(a);}},getDefaultRegionData:function(){try{if(this.defaultRegionKeyRequest!=-1){throw"No default region data available.";}this.defaultRegionKeyRequest=1;this.getData(this.defaultRegionKey);}catch(a){this.error(a);}},getBounds:function(){var d,b,c,a;d=new IWCoordinate(this.mapServerData.bounds.minx,this.mapServerData.bounds.maxy,IWCoordinate.WGS84);
b=new IWCoordinate(this.mapServerData.bounds.maxx,this.mapServerData.bounds.miny,IWCoordinate.WGS84);c=new IWBounds(d,b);a=c.getCenter();a.setProjectionType("WGS84");return c;},onError:function(a){this.error(a);},error:function(a){if(this.debug&&this.logger!=null){this.logger.error(a);}},info:function(a){if(this.debug&&this.logger!=null){this.logger.info(a);}},warn:function(a){if(this.debug&&this.logger!=null){this.logger.warn(a);}},isFunction:function(a){return typeof a==="function";},isObject:function(a){return a instanceof Object;
}};function oeMapOverlay(c,d){IWOverlay.call(this,c,d);var a=this.getContainer();var b=document.createElement("img");a.appendChild(b);b.ondrag=function(){return false;};b.onclick=function(){oeMapLayer.onOverlayClick("click",this);return false;};b.src=oeMapLayer.getImageSource();this.setDraggable(false);}
