var immo={flash_ad_second_tracker:function(kategorie,aktion,label){var retval=secondTracker._trackEvent(kategorie,aktion,label);},fensterprint:function(x){var winprint;winprint=window.open(x,'print','width=460,height=450,scrollbars=no,left=100,top=50');},fensterhelp:function(x){var winhelp;winhelp=window.open(x,'help','width=350,height=630,scrollbars=yes,left=230,top=50');},windowhelp:function(x){var winhelp;winhelp=window.open(x,'help','width=375,he ight=355,scrollbars=yes,left=200,top=50');},fensterschmal:function(x){var winschmal;winhelp=window.open(x,'help','width=280,height=500,scrollbars=yes,left=230,top=50');},fenstermedium:function(x){var winmedium;winhelp=window.open(x,'help','width=400,height=600,scrollbars=yes,left=230,top=50');},fensterhigh:function(x){var winhigh;winhelp=window.open(x,'help','width=400,height=750,scrollbars=yes,left=230,top=50');},fensterimprint:function(x){var winimprint;winimprint=window.open(x,'imprint','width=580,height=520,scrollbars=yes,left=230,top=50');},fensterfloor:function(x){var winfloor;winfloor=window.open(x,'floor','width=800,height=620,scrollbars=yes,left=230,top=50');},fensterpoke:function(x){var winpoke;winpoke=window.open(x,'help','width=490,height=650,scrollbars=no,left=50,top=50');},fensterpokeschmal:function(x){var winpoke;winpoke=window.open(x,'help','width=330,height=615,scrollbars=no,left=50,top=50');},popupAreamap:function(url){immo.newscrollwinflex(url,'Kartenansicht',790,690);},popupAreamapPrint:function(url){immo.newscrollwinflex(url,'Karten Druckansicht',790,690)},popupsmall:function(x){var winfloor;winfloor=window.open(x,'popup','width=580,height=565,scrollbars=yes,left=230,top=50');},popuplarge:function(x){var sh=screen.height;var sw=screen.width;if(sh<=900){var sh=(sh-100);}
if(sh>900){var sh=840;}
var winfloor;winfloor=window.open(x+'&h='+sh,'popup','width=850,height='+sh+',scrollbars=yes,left=0,top=0');},popupreview:function(url){var wwidth=670;var browserName=navigator.appName;var browserVer=parseInt(navigator.appVersion);if(browserName=="Netscape"){if(browserVer>4){wwidth=wwidth-25;}}
immo.newscrollwinflex(url,'Bewertung',790,wwidth,true);},newscrollwinflex:function(url,wname,wheight,wwidth,showScrollbars){if((screen.height-wheight)<100){wheight=screen.height-100;}
var browserName=navigator.appName;var browserVer=parseInt(navigator.appVersion);if(browserName=="Netscape"){if(browserVer>4){wwidth=wwidth+15;wheight=wheight+5;}}
if(navigator.appName=="Microsoft Internet Explorer"){wheight+=15;wwidth+=15;}
var windowtop=((screen.height-wheight)/2)-20;if(windowtop<0){windowtop=0;}
var windowleft=(screen.width-wwidth)/2;if(typeof showScrollbars=='undefined'||(showScrollbars==null)||showScrollbars){showScrollbars="yes";}
else{showScrollbars="no";}
var whdl=window.open(url,wname,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars="+showScrollbars+",resizable=yes,copyhistory=no"+",width="+wwidth+",height="+wheight+",left="+windowleft+",top="+windowtop);whdl.focus();},newscrollwin:function(url,wname,wheight,wwidth){var windowtop=((screen.height-wheight)/2)-20;var windowleft=(screen.width-wwidth)/2;var browserName=navigator.appName;var browserVer=parseInt(navigator.appVersion);if(browserName=="Netscape"){if(browserVer>4){wwidth=wwidth+15;wheight=wheight+5;}}
wname=window.open(url,wname,"toolbar=0,width="+wwidth+",height="+wheight+",location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,copyhistory=0,left="+windowleft+",top="+windowtop);wname.focus();},SubmitForm:function(form,selectTag,selected){SelectOption(document.forms[form].elements[selectTag],selected);document.forms[form].submit();},load_popup:function(param){popup=window.open(param,"immonet",'scrollbars=no,left=85,top=20,width=650,height=470');if(typeof(popup)=='object'){popup.blur();}
window.focus();},load_impopup:function(param){sapop=window.open(param,"sapop",'scrollbars=no,left=85,top=20,width=650,height=470');if(typeof(sapop)=='object'){sapop.blur();}
window.focus();},load_back:function(param){if(window.opener&&!window.opener.closed){opener.location.href="/searchagent.do?"+param;self.close();}
else{win3=window.open("/searchagent.do?"+param,'zurueck','scrollbars=yes,resizable=yes,toolbar=yes,menubar=yes,status=yes,location=yes,left=85,top=20,height=768,width=1024');win3.focus();self.close();}},load_webde:function(param){if(window.opener&&!window.opener.closed){window.open(location.href="http://web.immonet.de/searchagent.do?"+param);self.close()}
else{win3=window.open("/searchagent.do?"+param,'zurueck','scrollbars=yes,resizable=yes,toolbar=yes,menubar=yes,status=yes,location=yes,left=85,top=20,height=768,width=1024');win3.focus();self.close()}},load_focus:function(param){if(window.opener&&!window.opener.closed){opener.location.href="/searchagent.do?navi=false&"+param;self.close()}
else{win3=window.open("/searchagent.do?navi=false&"+param,'zurueck','scrollbars=yes,resizable=yes,toolbar=yes,menubar=yes,status=yes,location=yes,left=85,top=20,height=768,width=1024');win3.focus();self.close()}},changeLink:function(x){for(i=0;i<document.links.length;i++){var y=document.links[i].href.toString();if(y.indexOf(x,0)>=0){var lnk=document.links[i].href.toString();var value=document.form1.objectType.options[document.form1.objecttype.selectedIndex].value;document.links[i].href=lnk+"&objecttype="+value;}}},changeObjectType:function(){var value=document.form1.objectTypeList.options[document.form1.objectTypeList.selectedIndex].value;var x=1;var y=1;if(value=="112"||value=="11"||value==12){x=1;}
else if(value==21){x=2;}
else if(value==31||value==323||value==30){x=3;}
if(value==12||value==323){y=2;}
else if(value==11||value==21||value==31){y=1;}
else if(value==112||value==30){y=0;}
if(document.form1!=null&&document.form1.objecttype!=null){document.form1.objecttype.value=x;document.form1.marketingtype.value=y;}
if(document.form2!=null&&document.form2.objecttype!=null){document.form2.objecttype.value=x;document.form2.marketingtype.value=y;}
if(document.form3!=null&&document.form3.objecttype!=null){document.form3.objecttype.value=x;document.form3.marketingtype.value=y;}
if(document.form4!=null&&document.form4.objecttype!=null){document.form4.objecttype.value=x;document.form4.marketingtype.value=y}
if(document.NewSearch!=null&&document.NewSearch.objecttype!=null){document.NewSearch.objecttype.value=x;document.NewSearch.marketingtype.value=y}},changeNewSearchObjectType:function(){var value=document.NewSearch.objectTypeList.options[document.NewSearch.objectTypeList.selectedIndex].value;var x=1;var y=1;if(value=="112"||value=="11"||value==12){x=1;}
else if(value==21){x=2;}
else if(value==31||value==323||value==30){x=3;}
if(value==12||value==323){y=2;}
else if(value==11||value==21||value==31){y=1;}
else if(value==112||value==30){y=0;}
if(document.NewSearch!=null&&document.NewSearch.objecttype!=null){document.NewSearch.objecttype.value=x;document.NewSearch.marketingtype.value=y;}},showKeywords:function(pagename,id){f=window.open("about:blank","Fenster1","width=400,height=400,left=50,top=50,status=yes");var y=pagename.split('/');f.document.open();f.document.writeln('<html><body>');f.document.writeln('<table align=\"center\"><tr><td align=\"center\" colspan=\"2\"><b>Immonet Keywords</b></td></tr><tr><td colspan=\"2\"><form name=\"addtag\">');f.document.writeln('<textarea rows=\"15\" cols=\"35\" name=\"tags\" onBlur=\"self.close()\">');for(i=1;i<y.length;i++){f.document.writeln(y[i].replace('%20',' ').replace('%20',' ').replace('%20',' ').replace('%20',' '));}
f.document.writeln('</textarea></form></td></tr>');if(y.length>2){f.document.writeln('<tr><td><b>Webseite:</td><td>'+y[1]+'</b></td></tr>');f.document.writeln('<tr><td><b>Werbeplatz:</td><td>'+y[2]+'</b></td></tr>');f.document.writeln('<tr><td><b>WerbeplatzId:</td><td>'+id+'</b></td></tr>');}
f.document.writeln('</table></body></html>');f.document.close();f.addtag.tags.focus();},submitBrokerForm:function(form,method,target){document.userManagerForm.method.value=method;document.userManagerForm.target.value=target;document.userManagerForm.submit();},SelectOption:function(selectTag,selected){for(i=0;i<selectTag.length;++i){if(selectTag.options[i].value==selected){selectTag.options[i].selected=true;}
else{selectTag.options[i].selected=false;}}},SubmitForm:function(form,selectTag,selected){immo.SelectOption(document.forms[form].elements[selectTag],selected);document.forms[form].submit();},pressEnter:function(index,ev){var keycode;if(window.event){keycode=window.event.keyCode;}
else if(e){keycode=e.which;}
else{return true;}
if(keycode==13){document.forms[index].submit();return false;}
else{return true;}},loginUrl:"/login/user",getXmlHttpRequest:function(){var xhr=null;if(typeof XMLHttpRequest!='undefined'){xhr=new XMLHttpRequest();}
if(!xhr){try{xhr=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e){try{xhr=new ActiveXObject("Microsoft.XMLHTTP");}
catch(e){xhr=null;}}}
return xhr;},sendXmlHttpRequest:function(url,onSuccess,onFailure){var xhr=immo.getXmlHttpRequest();if(!immo.isEmpty(xhr)){xhr.open("GET",url,true);xhr.onreadystatechange=function(){if(xhr.readyState==4){if(xhr.status==200){if(!immo.isEmpty(onSuccess)){onSuccess(xhr.responseText);}}
else{if(!immo.isEmpty(onFailure)){onFailure(xhr.responseText);}}}};xhr.send(null);}},updateXmlHttpRequest:function(url,elementId){function onSuccess(responseText){element=document.getElementById(elementId);element.innerHTML=responseText;}
immo.sendXmlHttpRequest(url,onSuccess);},counterTextArea:function(textAreaId,counterId,count,helpText,isCounterFormField){isCounterFormField=immo.isEmpty(isCounterFormField)?false:true;var counter=document.getElementById(counterId);setCountText(count);var textarea=document.getElementById(textAreaId);immo.addEvent(textarea,"keyup",countAfterContentChange);immo.addEvent(textarea,"blur",countAfterContentChange);immo.addEvent(textarea,"reset",countAfterContentChange);if(textarea.value){countAfterContentChange();}
else{immo.setFormElementHelpText(textAreaId,helpText);}
function countAfterContentChange(){var charsEntered=textarea.value.length;if(charsEntered>count){textarea.value=textarea.value.substring(0,count);textarea.selectionStart=count;textarea.selectionEnd=count;}
var charsLeft=count-charsEntered;if(charsLeft<0){charsLeft=0;}
setCountText(charsLeft);}
function setCountText(currentCounter){if(!isCounterFormField){var text=currentCounter;if(navigator.appName=="Microsoft Internet Explorer"){text+="&nbsp;";}
counter.innerHTML=text;}
else{counter.value=currentCounter;}}},setFormElementHelpText:function(formElementId,helpText){var formElement=document.getElementById(formElementId);var originalColor=formElement.style.color;if(!immo.isEmpty(helpText)){formElement.value=helpText;formElement.style.color="#aaa";}
formElement.onfocus=formElementOnFocus;function formElementOnFocus(){if(formElement.value==helpText){formElement.value="";formElement.style.color=originalColor;}}},keepAlive:function(){function keepAliveDelegate(){function onKeepAliveSuccess(resultText){immo.keepAlive();}
function onKeepAliveFailure(resultText){location.href=immo.loginUrl;}
immo.sendXmlHttpRequest("/keepalive.do?"+immo.generateRandomParameter(),onKeepAliveSuccess,onKeepAliveFailure);}
window.setTimeout(keepAliveDelegate,50000);},addEvent:function(obj,type,func){if(window.attachEvent){obj.attachEvent("on"+type,func);}
else{obj.addEventListener(type,func,false);}},removeEvent:function(obj,type,func){if(obj.detachEvent){obj.detachEvent("on"+type,func);}
else{obj.removeEventListener(type,func,false);}},onloadAfterBody:function(func){if(window.attachEvent){window.attachEvent("onload",func);}
else{window.addEventListener("load",func,false);}},submitForm:function(formName){document.forms[formName].submit();},decodeUmlaut:function(s){s=s.replace(/ß/g,"ss");s=s.replace(/ä/g,"ae");s=s.replace(/Ä/g,"Ae");s=s.replace(/ö/g,"oe");s=s.replace(/Ö/g,"Oe");s=s.replace(/ü/g,"ue");s=s.replace(/Ü/g,"Ue");s=s.replace(/à/g,"a");s=s.replace(/À/g,"A");s=s.replace(/á/g,"a");s=s.replace(/Á/g,"A");s=s.replace(/â/g,"a");s=s.replace(/Â/g,"A");s=s.replace(/ã/g,"a");s=s.replace(/Ã/g,"A");s=s.replace(/å/g,"a");s=s.replace(/Å/g,"A");s=s.replace(/è/g,"e");s=s.replace(/È/g,"E");s=s.replace(/é/g,"e");s=s.replace(/É/g,"E");s=s.replace(/ê/g,"e");s=s.replace(/Ê/g,"E");s=s.replace(/ë/g,"e");s=s.replace(/Ë/g,"E");s=s.replace(/ì/g,"i");s=s.replace(/Ì/g,"I");s=s.replace(/í/g,"i");s=s.replace(/Í/g,"I");s=s.replace(/î/g,"i");s=s.replace(/Î/g,"I");s=s.replace(/ï/g,"i");s=s.replace(/Ï/g,"I");s=s.replace(/ñ/g,"n");s=s.replace(/Ñ/g,"N");s=s.replace(/ò/g,"o");s=s.replace(/Ò/g,"O");s=s.replace(/ó/g,"o");s=s.replace(/Ó/g,"O");s=s.replace(/ô/g,"o");s=s.replace(/Ô/g,"O");s=s.replace(/õ/g,"o");s=s.replace(/Õ/g,"O");s=s.replace(/ù/g,"u");s=s.replace(/Ù/g,"U");s=s.replace(/ú/g,"u");s=s.replace(/Ú/g,"U");s=s.replace(/û/g,"u");s=s.replace(/Û/g,"U");s=s.replace(/ý/g,"y");s=s.replace(/Ý/g,"Y");s=s.replace(/ç/g,"c");s=s.replace(/Ç/g,"C");return(s);},trim:function(value){return value.replace(/(^ +| +$)/,"");},ltrim:function(value){return value.replace(/^\s+/,"");},isEmpty:function(value){return(typeof value=="undefined")||(value==null);},isStringEmpty:function(value){return immo.isEmpty(value)||(value.length==0);},getUserAgent:function(){var agent=false;if(navigator.userAgent.toLowerCase().indexOf('msie 6.0')>-1){agent='IE6';}
else if(navigator.userAgent.toLowerCase().indexOf('msie 7.0')>-1){agent='IE7';}
else if(navigator.userAgent.toLowerCase().indexOf('msie 8.0')>-1){agent='IE8';}
else if(navigator.userAgent.toLowerCase().indexOf('firefox')>-1){agent='FF';}
return agent;},isIExplorer:function(){var returner=false;if(this.getUserAgent()=='IE6'||this.getUserAgent()=='IE7')returner=true;return returner;},isCookieSupportEnabled:function(){if(navigator.userAgent.toLowerCase().indexOf('msie')>-1){document.cookie="CookieTest=OK";if(immo.isEmpty(immo.getCookie("CookieTest"))){return false;}
else{immo.removeCookie("CookieTest");return true;}}
else{return navigator.cookieEnabled;}},getCookie:function(name){var i=0;var suche=name+"=";while(i<document.cookie.length){if(document.cookie.substring(i,i+suche.length)==suche){var ende=document.cookie.indexOf(";",i+suche.length);ende=(ende>-1)?ende:document.cookie.length;var cook=document.cookie.substring(i+suche.length,ende);return unescape(cook);}
i++;}
return null;},removeCookie:function(name,domain,path){var cook=name+"=; expires=Thu, 01-Jan-70 00:00:01 GMT";cook+=(domain)?";domain="+domain:"";cook+=(path)?";path="+path:"";document.cookie=cook;},setSessionCookie:function(name,value,domain,path){var cook=name+"="+escape(value);cook+=(domain)?";domain="+domain:"";cook+=(path)?";path="+path:"";document.cookie=cook;},showSpinnerOverlay:function(elementId,backgroundPositionStyle){var element=document.getElementById(elementId);new Insertion.Before(element.firstChild,"<div id=\"spinnerOverlay\" class=\"spinnerOverlay\"></div>");var width=element.offsetWidth;var height=element.offsetHeight;var spinnerOverlay=document.getElementById("spinnerOverlay");spinnerOverlay.style.width=width+"px";spinnerOverlay.style.height=height+"px";spinnerOverlay.style.display="inline";if(!immo.isEmpty(backgroundPositionStyle)){spinnerOverlay.style.backgroundPosition=backgroundPositionStyle;}},generateRandomParameter:function(parameterName){var parameter="q"+new Date().getTime();if(immo.isStringEmpty(parameterName)){parameterName="p";}
return parameterName+"="+parameter;},togglePanel:function(elementName,objControlImg,imgName,displayStyle){var myElement=document.getElementById(elementName);var imgSuff="";if(myElement){var myStatus=myElement.style.display;myElement.style.display=(myStatus==''||myStatus=='block'||myStatus=='inline')?'none':displayStyle;imgSuff=(myElement.style.display=='none')?'0.gif':'1.gif';if(imgName!='')
objControlImg.src="/img/icons/"+imgName+imgSuff;}},reloadJavascript:function(src){var scrElement=document.createElement("script");scrElement.type="text/javascript";scrElement.src=src;document.getElementsByTagName("head")[0].appendChild(scrElement);return true;},toggleCheckbox:function(id){var e=document.getElementById(id);e.checked=(e.checked)?false:true;return false;},performCheck:function(checkboxAll,checkBoxContainer){var checkBoxList=document.getElementById(checkBoxContainer).getElementsByTagName('input');if(document.getElementById(checkboxAll).checked){immo.checkAll(checkBoxList);}
if(!document.getElementById(checkboxAll).checked){immo.unCheckAll(checkBoxList);}},checkAll:function(checkBoxList){for(i=0;i<checkBoxList.length;i++){checkBoxList[i].checked=true;}},unCheckAll:function(checkBoxList){for(i=0;i<checkBoxList.length;i++){checkBoxList[i].checked=false;}},uncheckListener:function(checkboxAll){if(document.getElementById(checkboxAll).checked){document.getElementById(checkboxAll).checked=false;}},genOneChecked:function(checkBoxContainer,checkboxAll){var checkBoxList=document.getElementById(checkBoxContainer).getElementsByTagName('input');if(checkBoxList.length>0){var checkedCount=0;for(i=0;i<checkBoxList.length;i++){if(checkBoxList[i].checked){checkedCount++;}}
if(checkedCount==0){document.getElementById(checkboxAll).checked=true;}}},unCheckSelected:function(checkBoxContainer,except){var checkBoxList=document.getElementById(checkBoxContainer).getElementsByTagName('input');if(checkBoxList.length>0){for(i=0;i<checkBoxList.length;i++){if(checkBoxList[i].id!=except){checkBoxList[i].checked=false;}}}},HIGHLIGHTELEMENTS:new Array(),HIGHLIGHTINTERVAL:new Array(),HIGHLIGHTCOLORS:new Array(),COLORCOUNTER:new Array(),highlightElements:function(){if(immo.HIGHLIGHTELEMENTS.length==0)return;if(immo.HIGHLIGHTCOLORS.length==0)immo.HIGHLIGHTCOLORS.push("#D2E3F3","#E7F0F7","#EAF1F7","#F0F5FB","#F4F7FC","transparent");for(var i=0;i<immo.HIGHLIGHTELEMENTS.length;i++){immo.COLORCOUNTER[immo.HIGHLIGHTELEMENTS[i]]=0;immo.HIGHLIGHTINTERVAL[immo.HIGHLIGHTELEMENTS[i]]=window.setInterval("immo.highlightElement('"+immo.HIGHLIGHTELEMENTS[i]+"',"+i+")",250);}},highlightElement:function(elementid,i){var element=document.getElementById(elementid);element.style.backgroundColor=immo.HIGHLIGHTCOLORS[immo.COLORCOUNTER[elementid]];immo.COLORCOUNTER[elementid]++;if(immo.COLORCOUNTER[elementid]>immo.HIGHLIGHTCOLORS.length){window.clearInterval(immo.HIGHLIGHTINTERVAL[elementid]);immo.COLORCOUNTER[elementid]=0;}}}
var memoRemote={action:"/merkzettel.do",addObjectRemote:function(objectId,source,mandant){if(immo.isCookieSupportEnabled()){document.getElementById("memoAddLink"+objectId).style.display="none";document.getElementById("memoLoader"+objectId).style.display="inline";function onAddRemoteSuccess(response){var result=eval("("+response+")");if(result.status=="ok"){document.getElementById("memoLoader"+objectId).style.display="none";document.getElementById("memoRemoveLink"+objectId).style.display="inline";var prominentObjectElement=document.getElementById("prominentObjects");if(!immo.isEmpty(prominentObjectElement)){immo.updateXmlHttpRequest("/prominentObjects.do?"+immo.generateRandomParameter(),"prominentObjects");}
memoRemote.incrementEtracker("merken/"+source,mandant);}
else{document.getElementById("memoLoader"+objectId).style.display="none";document.getElementById("memoAddLink"+objectId).style.display="inline";}}
var url=memoRemote.action+"?action=addObjectRemote&objectId="+objectId+"&"+immo.generateRandomParameter();immo.sendXmlHttpRequest(url,onAddRemoteSuccess);}},removeObjectRemote:function(objectId,source,mandant){document.getElementById("memoRemoveLink"+objectId).style.display="none";document.getElementById("memoLoader"+objectId).style.display="inline";function onRemoveRemoteSuccess(response){document.getElementById("memoLoader"+objectId).style.display="none";document.getElementById("memoAddLink"+objectId).style.display="inline";var prominentObjectElement=document.getElementById("prominentObjects");if(!immo.isEmpty(prominentObjectElement)){immo.updateXmlHttpRequest("/prominentObjects.do?"+immo.generateRandomParameter(),"prominentObjects");}
memoRemote.incrementEtracker("merken/"+source,mandant);}
var url=memoRemote.action+"?action=removeObjectRemote&objectId="+objectId+"&"+immo.generateRandomParameter();immo.sendXmlHttpRequest(url,onRemoveRemoteSuccess);},incrementEtracker:function(subsystem,mandant){var path="/mein_immonet/merkzettel";var mandantIntern=mandant;if(!immo.isStringEmpty(subsystem)){path+="/"+subsystem;}
if(immo.isStringEmpty(mandantIntern)){mandantIntern="immonet";}
etracker.incrementEtrackerSimple(mandantIntern,path);}}