var LIST_LENGTH,seite=1,Zeile1,Zeile2,Zeile3,ccounter=0,id1=0,Prev,Next,picString="<img src='"+picPfad+"' height='"+logoHeight+"' alt='"+maklerName+"' width='"+logoWidth+"'>";if(picPfad==""){picString=""}
function newWin(i){var s="source/wfriend.htm?id="+i;var Fenster = window.open(s,"Friend","width=400,height=314");Fenster.moveTo(10,10);Fenster.focus()}
function zeigeLogo1(){if(list==1&&showlogo){document.write(picString+"<br>")}}
function zeigeLogo2(){if(list!=1&&showlogo){document.write("<br><br><br><center>"+picString+"</center>")}}
function writeDetailPriceBegr(lang,price,begr){var s="<tr valign=top><td class=detailtitel>"+lang+":</td><td class=detail valign=bottom>"+formatNumber(price);if(price.search(",")!=-1){s+=" "+l.curr}else{s+=l.zahlKomma+"- "+l.curr}if(begr!=""){s+="<br>("+begr+")"}s+="</td></tr>";return s}
function writeDetailPrice(lang,price){var s="<tr valign=top><td class=detailtitel>"+lang+":</td><td class=detail valign=bottom>"+formatNumber(price);if(price.search(",")!=-1){s+=" "+l.curr}else{s+=l.zahlKomma+"- "+l.curr}s+="</td></tr>";return s;}
function writeDetail(lang,data){var s="<tr valign=top><td class=detailtitel>"+lang+":</td><td class=detail valign=bottom>"+data+"</td></tr>";return s}
function writeTexte(text,bez){var s="<table cellspacing=0 cellpadding=0 class=Tab1><tr><td class=CAPSMALL>"+bez+"</td></tr></table>";
s+="<table cellspacing=0 cellpadding=1 class=Tab2><tr><td class=detail height=5></td></tr><tr><td class=detail><div class=blockExpo>"+text+"</div></td></tr><tr><td class=detail height=5></td></tr></table>";return s}
function writeTexteLB1(text,bez){var s="<table cellspacing=0 cellpadding=0 class=Tab1><tr><td class=CAPSMALL>"+bez+"</td></tr></table>";
s+="<table cellspacing=0 cellpadding=1 class=Tab2><tr><td class=detail height=5></td></tr><tr><td class=detail><div class=blockExpoLB1>"+text+"</div></td></tr><tr><td class=detail height=5></td></tr></table>";return s}
function writeTexteLB2(text,bez){var s="<table cellspacing=0 cellpadding=0 class=Tab1><tr><td class=CAPSMALL>"+bez+"</td></tr></table>";
s+="<table cellspacing=0 cellpadding=1 class=Tab2><tr><td class=detail height=5></td></tr><tr><td class=detail><div class=blockExpoLB2>"+text+"</div></td></tr><tr><td class=detail height=5></td></tr></table>";return s}
function anime(p){with(this){if(showtopobjekt){if(!showlogo){if(list[id1].Pto){if(ccounter<=4){if(list[id1].Pto[ccounter]){document.getElementById('topobjbild').style.backgroundImage="url(Pictures/"+list[id1].Pto[ccounter]+")";
ccounter++;setTimeout("objects.anime()",picTime)}else{ccounter=0;setTimeout("objects.anime()",0)}}else{ccounter=0;setTimeout("objects.anime()",0)}}}}}}
function PObject(id){this.id=id;this.type=null;this.rentBuy=null;this.zip=null;this.region=null;this.location=null;this.text=null;this.rooms=null;this.size=null;this.price=null;this.descr=null;this.P1=null;this.P1Tb=null;this.printListing=printListing;
this.printTableListing=printTableListing;this.matchQuery=matchQuery;this.printPicture=printPicture;this.printExpo=printExpo;this.printPictureList=printPictureList;this.printButtons=printButtons}
function MyObject(id){this.id=id;this.printDetails=printDetails;this.printPictureList=printPictureList; this.printButtonsObj=printButtonsObj}
function Objects(total){this.list=new Array(total);this.single= new Array(1);this.addSingle=addSingle;this.total=total;this.next=0;this.add=add;this.matchNeighboursOf=matchNeighboursOf;this.printList=printList;this.printTableList=printTableList;this.objsuche=objsuche;
this.printButtonsObjOf=printButtonsObjOf;this.printPictureOf=printPictureOf;this.printExpoOf=printExpoOf;this.printPictureListOf=printPictureListOf;this.printButtonsOf=printButtonsOf;this.anime=anime;this.printAngebot=printAngebot;this.printSingleDetailsOf=printSingleDetailsOf}
function addSingle(pObject){this.single[0]=pObject}
function objsuche(value){var found=false,i=0;if(value!=''){for(x=0;x<this.next;x++){if(this.list[x].id==value){found=true;break}i++}
if(found){self.location.replace(offername+"?oa=&ot=&mk="+p.rentBuy+"&plz=&rg=&gv=&zv=&pr=&skip=0&pskip=0&run=1&pg="+p.pg+"&newe=&nr=&id="+i+"&ln="+p.language+"&page="+p.page)}else{alert(l.nichtvorhanden)}}}
function printButtonsObjOf(index,c){this.single[0].printButtonsObj(c)}
function add(pObject){if(this.next<this.total){this.list[this.next]=pObject;this.next++}}
function printAngebot(p){if((list!=1)&&(!showlogo)){if(showtopobjekt){for(z=0;z<this.next;z++){if(this.list[z].topangebot){id1=z;break}}
document.write("<table cellspacing=0 cellpadding=0 border=0 width=100% align=left><tr><td align="+topalign +" class=misc><span class=h3suche>"+l.topangebot+"</span></td></tr>")
document.write("<tr><td height=4 class=misc></td></tr>");if(this.list[id1].Pto){document.write("<tr><td valign=top align=center class=misc><span class=glow><table border=0 cellpadding=0 cellspacing=0 width=240 height=180 align=center><tr><td align=center background='Pictures/"+this.list[id1].Pto[0]+"' class=misc id=topobjbild>")
document.write("<a class=csl "+stat+" href='"+location.pathname+"?oa=&ot=&mk="+this.list[id1].rentBuy+"&plz=&rg=&gv=&zv=&pr=&skip=0&pskip=0&run=1&pg="+p.pg+"&newe=&nr=&id="+id1+"&ln="+p.language+"&page="+p.page+"'><img src='source/empty.gif' border=0 width=240 height=180></a></td></tr></table></span></td></tr>")}
document.write("<tr><td align=center valign=top class=misc>");if(this.list[id1].rentBuy=="ko"){document.write("<b>"+l.kaufobjektSing+"</b>:<br>")}else{document.write("<b>"+l.mietobjektSing+"</b>:<br>")}
document.write("<a class=csl "+stat+" href='"+location.pathname+"?oa=&ot=&mk="+this.list[id1].rentBuy+"&plz=&rg=&gv=&zv=&pr=&skip=0&pskip=0&run=1&pg="+p.pg+"&newe=&nr=&id="+id1+"&ln="+p.language+"&page="+p.page+"'>");
if(this.list[id1].et&&showTopTitel){document.write(this.list[id1].et);document.write("</a><br>")}else{document.write(this.list[id1].oN);document.write("</a><br>");if(this.list[id1].shortdescr){document.write(this.list[id1].shortdescr)}else{if(this.list[id1].rooms){if((this.list[id1].rooms!="0")&&(this.list[id1].rooms!="")){
switch(this.list[id1].type){case 'bp':;case 'gb':;case 'lm':;case 'lf':;case 'pl':document.write(this.list[id1].rooms+" "+l.raeume+", ");break;case 'zr':document.write(this.list[id1].rooms+" "+l.einheiten+", ");break;default:document.write(this.list[id1].rooms+" "+l.zimmer+", ");break}}}
if(this.list[id1].size!=""){if(this.list[id1].size!="0"){document.write(l.ca+"&nbsp;"+formatNumber(this.list[id1].size)+" m&sup2;, ")}}
if(this.list[id1].type!="gs"){if(this.list[id1].grf){if(this.list[id1].grf!=""){if(this.list[id1].grf!="0"){document.write(l.grundstueck+"&nbsp;"+l.ca+"&nbsp;"+formatNumber(this.list[id1].grf)+"&nbsp;m&sup2;, ")}}}}
if(showzip){document.write(this.list[id1].zip+" ")}document.write(this.list[id1].region+"<br>")}if((this.list[id1].price!="")&&(this.list[id1].price!="0")){if(this.list[id1].rentBuy=="ko"){document.write(l.kaufpreis)}else{if(this.list[id1].type=="gs"){document.write(l.pacht)}else{document.write(l.miete)}}
if(this.list[id1].pricetxt){document.write(this.list[id1].pricetxt)}else{if(this.list[id1].price.search(",")!=-1 ){document.write(" "+formatNumber(this.list[id1].price)+ " "+l.curr)}else{document.write(" "+formatNumber(this.list[id1].price)+l.zahlKomma+"- "+l.curr)}}}}
document.write("</td></tr></table>")}if(changePics){objects.anime(p)}}else{document.write("")}}
function printButtons(){var btnT="<a class=elbox ";var qS1="oa="+p.type+"&ot="+p.oT+"&mk="+p.rentBuy+"&plz="+p.zip+"&rg="+p.region+"&gv="+p.size+"&zv="+p.rooms+"&pr="+p.price+"&skip="+p.skip+"&pskip="+p.pskip+"&run=1&pg="+p.pg+"&newe=&nr="+p.nr+"&id="+p.id+"&ln="+p.language+"&page="+p.page;
var qS2="oa="+p.type+"&ot="+p.oT+"&mk="+p.rentBuy+"&plz="+p.zip+"&rg="+p.region+"&gv="+p.size+"&zv="+p.rooms+"&pr="+p.price+"&skip="+p.skip+"&pskip="+p.pskip+"&run=1&pg="+p.pg+"&newe=&nr=&id=&ln="+p.language+"&page="+p.page;
document.write("<table border=0 cellspacing=0 cellpadding=3 valign=top align=center><tr><td height=6 class=miscexpo width=100% colspan=4></td></tr><tr><td class=miscexpo>"+btnT+stat+" href='"+originpage+"?"+qS2+"'>"+fill+l.zurueck+fill+"</A>");
if(showkontakt){document.write(btnT+stat+" href='"+kontaktname+"?"+qS1+"'>"+fill+l.kontakt+fill+"</A>")}
if(showsearchform){document.write(btnT+stat+" href='javascript:self.location.replace(\""+offername+"?oa=&ot=&mk="+p.rentBuy+"&plz=&rg=&gv=&zv=&pr=&skip=0&pskip=0&run=1&pg="+p.pg+"&newe=&nr=&id=&ln="+p.language+"&page=offer\");'>"+fill+l.neu+fill+"</A>")}
if(showstatistik){document.write(btnT+stat+" href='"+statname+"?oa=&ot=&mk=&plz=&rg=&gv=&zv=&pr=&skip=0&pskip=0&run=1&pg="+p.pg+"&newe=&nr=&id=&ln="+p.language+"&page="+p.page+"'>"+fill+l.bestand+fill+"</A>")}document.write("</td></tr></table>")}
function matchNeighboursOf(p){Prev=-1;Next=-1;var num=parseInt(p.id);if(num>0){for(i=(num-1);i>-1;i--){if(this.list[i].matchQuery(p)){Prev=i;break}}}if(num<(this.total-1)){for(i=(num+1);i<this.next;i++){if(this.list[i].matchQuery(p)){Next=i;break}}}}

function matchQuery(p){
var match=true;var newentry=0;if(this.neu){newentry=1}
if(p.oT){
	if(this.oT!=oTArray[parseInt(p.oT)-1]){
		match=false
	}
}
else{if(p.type!=""){if(!isNaN(p.type)){if(objArray[parseInt(p.type,10)-1]!=this.type){match=false}}else{if(p.type!=this.type){match=false}}}}

//alert(parseInt(p.oT) + ' - ' + p.oT + ' <> ' + this.oT + '  --- ' + oTArray[parseInt(p.oT)-1] + ' - ' + match)


if(p.rentBuy!=""&&this.rentBuy!=p.rentBuy){match=false}
if(p.zip!=""&&this.zip.substring(0,p.zip.length)!=p.zip){match=false}
if(p.region!=""&&this.region!=p.region){match=false}
if(p.size>0&&parseInt(this.size,10)<p.size){match=false}
if(p.rooms>0&&parseInt(this.rooms,10)<p.rooms){match=false}
if(p.pg>0&&parseInt(this.pg,10)!=p.pg){match=false}
if(p.price>0&&this.price>p.price){match=false}
if(p.nr!=""&&this.id!=p.nr){match=false}
if(parseInt(p.newe,10)>0&&newentry<p.newe){match=false}
return match}
function Parameters(){this.type ="";this.rentBuy=moko;this.zip="";this.region="";this.size="";this.rooms="";this.price="";this.id="";this.skip=0;this.language="de";this.newe=0;this.nr="";this.oT="";this.first=0;this.page="offer";this.pg=0;this.pskip=0;this.getParameters=getParameters}
var l;var p=new Parameters();
function showPicture(file){document.property.src="Pictures/"+file}
function doNothing(){var f}