var sUploaddir='../upload/';
var wdth=0;
var kantoren='';
var idkantoor='';
var srow='';

var submap='';
var params='';
var colcount=0;
var rowcount=0;
var objnr=0;
var aprs = new Array() 
var akop = new Array() 
var aoms = new Array() 
var ca1='';
var ca2='';
var sBanner=''
var sGetportaldv2='getportaldv2.asp?';
var allids='';

var fullwdth=widthset //575;
if (fullwdth<550 ) fullwdth=550
fullwdthnew=widthset;fullwdth=widthset;

ie = (document.all)?true:false
ns = (document.layers)?true:false


function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_changeProp(objName,x,theProp,theValue) { //v6.0

  while(theValue.indexOf("'", 1) > -1)
  {
	theValue = theValue.replace("'","´");
  }

  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  }
}


function settext22(prijs,naam){
		 MM_changeProp('lay','','<a href=""><big><b>'+naam+'</b></big></a><BR><big>'+prijs+'</big><br>','DIV')

} 

function settext(prijs,naam){

	if( ie ) {
		lay.innerHTML = '<a href=""><big><b>'+naam+'</b></big></a><BR><big><b>'+prijs+'</b></big><br>'		
	} else {
		MM_changeProp('lay','','innerHTML','<a href=""><big><b>'+naam+'</b></big></a><BR><big>'+prijs+'</big><br>','DIV')		

	}

} 

function highlightit(cur2){
if (ie) {
  if (cur2.filters.alpha){
	if (cur2.style.MozOpacity<1)
		cur2.style.MozOpacity=parseFloat(cur2.style.MozOpacity)+0.1
	else if (cur2.filters&&cur2.filters.alpha.opacity<100)
		cur2.filters.alpha.opacity+=10
	else if (window.highlighting)
		clearInterval(highlighting)
    }
  }
}

function high(which2,index){

	settext(aprs[index],akop[index])
	theobject=which2
	highlighting=setInterval("highlightit(theobject)",60)
}
function low(which2){

	settext('','')
	clearInterval(highlighting)
	if (ie) {
	  if (which2.style.MozOpacity)
		which2.style.MozOpacity=0.6
	  else if (which2.filters.alpha)
		which2.filters.alpha.opacity=60
		}
}

function StartRows(){

		 colcount=0
		 objnr=0
	if (vsettings110!=''){
		sBanner='<table width=100%><tr><td align=center>'
		if (vsettings111!='') sBanner+='<a target=' + vsettings100 + ' href="'+(vsettings111.indexOf('www.')==-1 || vsettings111.indexOf('//')!=-1?vsettings111:'http://'+vsettings111)+'">'
		sBanner+='<img src="'+(vsettings110.indexOf('//')!=-1?vsettings110:'http://'+vsettings110)+'" border=0>'	
		if (vsettings111!='') sBanner+='</a>'
		sBanner=''+sBanner+'</td></tr></table><br>'


	}
	if (vsettings105=='boven') srow+=sBanner
}

function EndRows(){
	if (colcount>0) {srow+="</td></tr><tr height=4></tr></table>"}	
	if (vsettings105=='onder') srow+=sBanner
}

function ShowEmptyRow(){
srow+='<BR><table width=575 border=0 cellspacing=0 cellpadding=0 ><tr><td>';
srow+='<table border=0 vspace=0 cellpadding=0 cellspacing=0 width=100%><tr><td align=left>Er zijn geen panden gevonden die voldoen aan het zoekcriterium</b></td><td align=right></td></tr>';
srow+='</table></td><td width=10></td> </tr></table><br>';
}

var picfile=''
var pictxt=''
var statoms=''
var lMeth=0;

function ShowRow(sid,spic,skop,sprijs,sobjoms,ssrtobj,sstatus,swoonopp,sinhoud,sperceel,sbouwjaar,smak,sextra,sppicfile,sppictxt,spimginf,spparmeth,landcode,sfoto1,sfoto2){

sstatus=sstatus.replace("2d.gif",".gif").replace("df1.gif","df.gif").replace("df2.gif","df.gif").replace("df3.gif","df.gif").replace("df4.gif","df.gif").replace(".gif","_XL.gif")
var sstatusalign=' align=right valign=bottom '
if (sstatus.indexOf('df_')!=-1) sstatusalign=' align=center valign=middle ';
else if (sstatus.indexOf('lb_')!=-1) sstatusalign=' align=left valign=top ';
else if (sstatus.indexOf('b_')!=-1) sstatusalign=' align=center valign=top ';


if (vsettings26.indexOf('G8')!=-1) skop='';
if (vsettings26.indexOf('S7')!=-1) sobjoms='';
if (vsettings26.indexOf('Z8')!=-1) ssrtobj='';
if (vsettings26.indexOf('S0')!=-1) {var tmp=ssrtobj;ssrtobj=sobjoms;sobjoms=tmp}

var sExtraStyle=''
var objnr2=objnr


if (vsettings103!='' && vsettings104=='') { 
	if (vsettings27%100==2) objnr2+=(Math.round((objnr-1)/2));
	if (objnr2%2==1) sExtraStyle=' style="background-color:'+vsettings103+'" ' 
}
if (vsettings103!='' && vsettings104!='') { 
	if (vsettings27%100==3) objnr2+=(Math.round((objnr-1)/3));
	if (objnr2%3==1) sExtraStyle=' style="background-color:'+vsettings103+'" ' ;
	if (objnr2%3==2) sExtraStyle=' style="background-color:'+vsettings104+'" ' ;
}
if (sExtraStyle=='' && vsettings106!='') {sExtraStyle=' style="background-color:'+vsettings106+'" '}

picfile=sppicfile
pictxt=sppictxt
var sPijlimg=''

if (vsettings96!='') {
	
	sPijlimg='<img border=0 src="'+vsettings96 + '">'
}

var slandoms=''   //land
var splaatsoms='' //plaats
var swijkoms=''   //wijk
var sadresoms=''  //adres
var stmpkop1=''
var stmpkop2=''
var extrapicw=(sfoto1!='' || sfoto2!=''?120:0)

if (skop.indexOf(' - ')!=-1){
stmpkop1=skop.substring(0,skop.indexOf(' - '))
if (spparmeth.indexOf('BL')==-1) {splaatsoms=stmpkop1} else {slandoms=stmpkop1}
stmpkop2=skop.substring(skop.indexOf(' - ')+3)
}else{
	splaatsoms=skop
}

if (stmpkop2.indexOf(' - ')>0) {
	sadresoms=stmpkop2.substring(stmpkop2.lastIndexOf(' - ')+3)
	stmpkop2=stmpkop2.substring(0,stmpkop2.indexOf(' - '))
	if (spparmeth.indexOf('BL')==-1) {swijkoms=stmpkop2} else {splaatsoms=stmpkop2}
} else {
	if (spparmeth.indexOf('BL')==-1) {sadresoms=stmpkop2} else {splaatsoms=stmpkop2}
}
var skopoms=skop  //omschrijving van de kop zonder afbeeldingen
skop=sPijlimg+spimginf+skop //omschrijving met afbeeldingen

var lMaxLenExtra=0 
if (vsettings27==802) {
	lMaxLenExtra=7 
} else if (vsettings27==2 || vsettings27==202 || vsettings27==402 || vsettings27==602 || vsettings27==102 || vsettings27==302 || vsettings27==502 || vsettings27==702 ) {
	lMaxLenExtra=-5+Math.round((fullwdth-extrapicw-750)/17)
} else if (vsettings27==3 || vsettings27==103  || vsettings27==203 || vsettings27==303) {
	lMaxLenExtra=2
} else if (vsettings27==5 || vsettings27==105 || vsettings27==205) {
	lMaxLenExtra=0
} else {
	if (lMaxLenExtra<0 || vsettings27==203 || vsettings27==303) lMaxLenExtra=0
}
if (vsettings26.indexOf('H1')!=-1) lMaxLenExtra=100
var lMaxLenExtraM=Math.round(lMaxLenExtra*1.3)
var lMaxLenExtraS=Math.round(lMaxLenExtra*1.5)
var skopsmall2=sPijlimg+(splaatsoms.length>24+lMaxLenExtraM?splaatsoms.substring(0,23+lMaxLenExtraM)+'..':splaatsoms)+ (landcode==''?'':' ('+landcode+')') + '<br>' + (sadresoms.length>24+lMaxLenExtraM?sadresoms.substring(0,23+lMaxLenExtraM)+'..':sadresoms)
var skopsmall3=sPijlimg+(splaatsoms.length>18+lMaxLenExtra?splaatsoms.substring(0,17+lMaxLenExtra)+'..':splaatsoms)+ (landcode==''?'':' ('+landcode+')') + '<br>' + (sadresoms.length>18+lMaxLenExtra?sadresoms.substring(0,17+lMaxLenExtra)+'..':sadresoms)


var shref=sGetportaldv2+'params='+params+'&submap='+submap+'&key='+sid+allids

shref=' '+(ie?'style="cursor:pointer"':'')+' onClick="javascript:document.location=\''+shref+'\'"'

var shref2=shref

if (vsettings26.indexOf('H2')!=-1) spimginf=""
if (vsettings26.indexOf('H3')==-1) shref=""

var skop2=sPijlimg+(splaatsoms.length>26+lMaxLenExtra?splaatsoms.substring(0,25+lMaxLenExtra)+'..':splaatsoms)+ (landcode==''?'':' ('+landcode+')') + (fullwdth-extrapicw<700?'<br>':' &#149 ') + (sadresoms.length>26+lMaxLenExtra?sadresoms.substring(0,27+lMaxLenExtra)+'..':sadresoms)

skop=sPijlimg+splaatsoms+ (landcode==''?'':' ('+landcode+')') + (fullwdth-extrapicw<650?'<br>':' &#149 ') + sadresoms

if (vsettings26.indexOf('G8')!=-1) {skop='';skop2='';skopmed='';skopsmall2='';skopsmall3=''}


if (vsettings26.indexOf('S8')!=-1) {
	var tmpkop=skop
	skop=sPijlimg+spimginf+sobjoms
	skopmed=sPijlimg+sobjoms
	skopsmall2=sPijlimg+sobjoms
	skopsmall3=sPijlimg+sobjoms
	skop2=sPijlimg+sobjoms
	if (skopoms.replace(/ - /g,'')!='') {
		sobjoms=skopoms.replace(/ - /g,' &#149 ')
	} else {sobjoms=''}
}
if (vsettings26.indexOf('F19')==-1) {

} else {
	skopsmall2='<big>'+skopsmall3+'</big>'
	skop='<big>'+skop2+'</big>'
}

var tmpaddc=''
var tmpaddc2=''
if (vsettings26.indexOf('Z9')!=-1  || (!ie && vsettings212!='' )) {
//statoms=sstatus
   if (sstatus=='img/leeg_XL.gif' || sstatus=='img/leeg2d_XL.gif') statoms=''
   tmpaddc='<table cellPadding=0 cellSpacing=0 border=0 width=100%><tr><td align=center id=imgdv2 ><b>&nbsp;'+statoms+'&nbsp;</b></td></tr></table>';
   tmpaddc2='<table cellPadding=0 cellSpacing=0 border=0 width=100%><tr><td align=center id=imgdv2 ><b>&nbsp;'+statoms+'&nbsp;</b></td></tr></table>';
   statoms=''
}


if (sstatus=='img/leeg_XL.gif' || sstatus=='img/leeg2d_XL.gif') statoms='';


var spicfile=''
if (picfile!='') spicfile=sUploaddir+picfile 

   
objnr++;


var sStatus='';
if (ie && statoms!='') sStatus='<table width=100% height=100% cellpadding=0 cellspacing=0 '+shref2+'><tr><td '+sstatusalign+'><img src='+sstatus+' border=0 style="FILTER: alpha(opacity=70)"></td></tr></table>'
if (ie) statoms=''  


if (vsettings27==1 || vsettings27==101 || vsettings27==201 || vsettings27==301 || vsettings27==401 || vsettings27==501 || vsettings27==601 || vsettings27==701 || vsettings27==801 || vsettings27==901) {

if (sStatus!='') sStatus='<div style="position:relative;z-index:2;left=0px;top=-180px;width:'+(240+extrapicw-2*vsettings39)+'px;height:'+(180-2*vsettings39)+'px;">'+sStatus+'</div>'

var spicfileline='<table height=180 width=240 '+shref2+'><tr><td align=center>Geen foto aanwezig</td></tr></table>'+sStatus;
if (spicfile!='') {
	if (extrapicw==0){
		spicfileline='<a href='+sGetportaldv2+'params='+params+'&submap='+submap+'&key='+sid+allids+'><img border=0 src='+spicfile+' height=180 >'+sStatus+'</a>'
	} else {
		if (sfoto1!='' && sfoto1!=' ') sfoto1='<img border=0 src=/upload/'+sfoto1+' height=89 style="margin-left:1px" >'
		if (sfoto2!='' && sfoto2!=' ') sfoto2='<img border=0 src=/upload/'+sfoto2+' height=89 style="margin-left:1px;margin-top:1px" >'
		spicfileline='<a href='+sGetportaldv2+'params='+params+'&submap='+submap+'&key='+sid+allids+'><table cellpadding=0 cellspacing=0 '+shref2+'><tr><td width=240 align=center><img border=0 src='+spicfile+' height=180 ></td><td width=120 valign=top align=center>'+sfoto1+'<br>'+sfoto2+'</td></tr></table>'+sStatus+'</a>'
	}
}

if (submap==idkantoor) { 
  wdth='455'
} else {
  wdth='385'
}
spic=sstatus



if (vsettings27==1 || vsettings27==501 || vsettings27==601 || vsettings27==701 || vsettings27==801 || vsettings27==901 ){
   if (vsettings27==501) lMeth=1
   srow+='<table id=caption cellPadding=0 cellSpacing=0 border=0><tr><td width=100%></td></tr></table>'
   srow+='<table '+shref+' width=575 border=0 cellspacing=0 cellpadding=0 id=t1 '+sExtraStyle+'>'
} 

if (vsettings27==101 || vsettings27==201 || vsettings27==301 || vsettings27==401){
   if (vsettings27==301) lMeth=1-lMeth
   if (vsettings27==401) lMeth=1

   srow+='<table '+shref+' width='+fullwdth+' border=0 cellspacing=0 cellpadding=0 '
   srow+=' id=t1 '+sExtraStyle+''

   srow+='>'
}

srow+='<tr>'

if (lMeth==0) {
   srow+='<td id=tempty valign=top ><table border=0 vspace=0 cellpadding=8 cellspacing=0  ><tr ><td '+shref2+'>'
   srow+='<div align=center id=imgdv style="width:'+(240+extrapicw)+'px;height:180px;overflow:hidden">'+spicfileline+'</div>'
   srow+='</div>'+tmpaddc+'</td></tr></table></td><td width=0></td>';
}else{
   srow+=''
}
var sWdth=fullwdth-258-extrapicw

if (vsettings27==1 || vsettings27==501 || vsettings27==601 || vsettings27==701 || vsettings27==801 || vsettings27==901){
	srow+='<td height=100% valign=top><table border=0 vspace=0 cellpadding=0 cellspacing=0 width=100% height=100%><tr valign=top height=100%><td align=left width='+sWdth+' valign=top><table border=0 vspace=0 cellpadding=0 cellspacing=0 width=100%  ><tr><td width=6></td><td height=40><b>' + skop +'</b></td><td align=right valign=bottom><a href='+sGetportaldv2+'params='+params+'&submap='+submap+'&key='+sid+allids+'><img border=0 src=img/pijlmeer.gif></a>&nbsp;&nbsp;<br>&nbsp;'+spimginf+'</td></tr></table>'; 
}else{
	srow+='<td height=100% valign=top><table border=0 vspace=0 cellpadding=0 cellspacing=0 width=100% height=100%><tr valign=top height=100%><td align=left width='+sWdth+' valign=top><table border=0 vspace=0 cellpadding=0 cellspacing=0 width=100%  id=captionextra ><tr><td width=6></td><td height=40><b>' + skop +'</b></td><td align=right valign=bottom><a href='+sGetportaldv2+'params='+params+'&submap='+submap+'&key='+sid+allids+'><img border=0 src=img/pijlmeer.gif></a>&nbsp;&nbsp;<br>&nbsp;'+spimginf+'</td></tr></table>'; 
}
if (vsettings27==201 || vsettings27==601 || vsettings27==701 || vsettings27==801 || vsettings27==901) {

	srow+='<table id=t1 style="background:#ffffff url(\'\');border-right-width:0px ;border-bottom-width:0px ;width:'+sWdth+'px" height=82% ><tr><td valign=top height=100% >'
}else{
	if (lMeth==1){
		srow+='<table id=t1 '+sExtraStyle+' style="border-left-width:0px ;border-bottom-width:0px ;width:'+sWdth+'px" height=82% ><tr><td valign=top height=100% >'
	}else{
		srow+='<table id=t1 '+sExtraStyle+' style="border-right-width:0px ;border-bottom-width:0px ;width:'+sWdth+'px" height=82% ><tr><td valign=top height=100% >'
	}
}
if (statoms!='') srow+='<b>'+statoms+'</b><br>';
if (sextra!='' && sextra!=undefined) {
	srow+=sextra+'<br>';
}

if (sobjoms!='') { srow+='<b>'+sobjoms+'</b><br>'; } 
if (pictxt.length<120) {srow+='<br>'}
if (fullwdth-extrapicw<=750 && pictxt!='' && vsettings26.indexOf('X0')==-1  ) {srow+=pictxt;}

if (vsettings26.indexOf('G6')!=-1) {
   if (smak!=''){ 
   	  var smakoms='Makelaar';
  	  if (vsettings54!='') smakoms=vsettings54;
	  if (srow.substring(srow.length-2,srow.length)!='<br>') srow+='<br>'
	  srow+=smakoms+' : '+smak+'<br>';
   } else {srow+='<BR>'}
} else {srow+='<BR>'}

if (fullwdth-extrapicw>750 && pictxt!='' && vsettings26.indexOf('X0')==-1 ) {
	if (sprijs!='') srow+='<b>'+sprijs+'</b>'
	srow+='</td><td width=10></td><td rowspan=2 width=50% valign=middle>'
	srow+=pictxt+'<br>'
	srow+='</td></tr><tr valign=bottom><td align=left width='+sWdth+' valign=bottom ><table border=0 vspace=0 cellpadding=0 cellspacing=0 width=100% ><tr >';
	srow+='<td colspan=2>'
	if (ssrtobj!='') srow+=''+ssrtobj
	srow+='</td></tr>'

	if (swoonopp!='' && swoonopp!='0') srow+='<tr><td  >oppervlakte </td><td>'+ca1+swoonopp+'&nbsp;m&sup2;</td></tr>'
	if (sinhoud!='' && sinhoud!='0') srow+='<tr><td>inhoud </td><td>'+ca1+sinhoud+'&nbsp;m&sup3;</td></tr>';
	if (sperceel!='' && sperceel!='0') srow+='<tr><td>perceel </td><td>'+ca1+sperceel+'&nbsp;m&sup2;</td></tr>'
	if (sbouwjaar!='' && sbouwjaar!='0') srow+='<tr><td>bouwjaar </td><td>'+ca2+sbouwjaar+'</td></tr>';


	srow+='<tr><td height=4 width=50%></td><td width=50%></td></tr></table>';


}else{
	srow+='</td></tr><tr valign=bottom><td align=left width='+sWdth+' valign=bottom ><table border=0 vspace=0 cellpadding=0 cellspacing=0 width=100% ><tr >';
	if (sprijs!='') srow+='<td width=200 valign=top><b>'+sprijs+'</b></td>'; else srow+='<td width=200></td>';
	if (ssrtobj!='') srow+='<td  >'+ssrtobj+'</td>'
	srow+='</tr><tr>';
	if (swoonopp!='' && swoonopp!='0') srow+='<td  >oppervlakte '+ca1+swoonopp+'&nbsp;m&sup2;</td>'; else srow+='<td ></td>';
	if (sinhoud!='' && sinhoud!='0') srow+='<td  >inhoud '+ca1+sinhoud+'&nbsp;m&sup3;</td>';
	srow+='</tr><tr>';
	if (sperceel!='' && sperceel!='0') srow+='<td >perceel '+ca1+sperceel+'&nbsp;m&sup2;</td>'; else srow+='<td ></td>';
	if (sbouwjaar!='' && sbouwjaar!='0') srow+='<td >bouwjaar '+ca2+sbouwjaar+'</td>';
	srow+='</td></tr><tr><td height=4></td></tr></table>';
}

srow+='</td></tr></table>';


srow+='</td></tr></table>'

if (lMeth==1) srow+='<td width=10></td><td width=240  id=tempty valign=top><table border=0 vspace=0 cellpadding=8 cellspacing=0 ><tr><td '+shref2+'> <div align=center id=imgdv style="width:'+(240+extrapicw)+'px;height:180px;overflow:hidden">'+spicfileline+'</div>'+tmpaddc+'</td></tr></table></td>';
  srow+='</td> </tr></table><br>'
   if (vsettings105==((objnr/(colcount+1))+1)) srow+=sBanner
}


if (vsettings27==2 || vsettings27==102 || vsettings27==202 || vsettings27==302 || vsettings27==402 || vsettings27==502 || vsettings27==602 || vsettings27==702) {


if (sStatus!='') sStatus='<div style="position:relative;z-index:2;left=0px;top=-'+(extrapicw==0?150:225)+'px;width:'+(200-2*vsettings39)+'px;height:'+((extrapicw==0?150:225)-2*vsettings39)+'px;">'+sStatus+'</div>'
var spicfileline='<div align=center id=imgdv style="width:'+(extrapicw==0?200:200)+'px;height:'+(extrapicw==0?150:225)+'px;overflow:hidden"><table height='+(extrapicw==0?150:225)+' width=200 '+shref2+'><tr><td align=center >Geen foto aanwezig</td></tr></table>'+sStatus+'</div>';

if (spicfile!='') {
	

	if (extrapicw==0){
		spicfileline='<div align=center id=imgdv style="width:200px;height:150px;overflow:hidden"><a href='+sGetportaldv2+'params='+params+'&submap='+submap+'&key='+sid+allids+'><img border=0 src='+spicfile+' height=150 >'+sStatus+'</a></div>'
	} else {
		if (sfoto1!='' && sfoto1!=' ') sfoto1='<img border=0 src=/upload/'+sfoto1+' height=75 style="margin-top:1px" >'
		if (sfoto2!='' && sfoto2!=' ') sfoto2='<img border=0 src=/upload/'+sfoto2+' height=75 style="margin-left:1px;margin-top:1px" >'
		spicfileline='<div align=center id=imgdv style="width:200px;height:225px;overflow:hidden"><a href='+sGetportaldv2+'params='+params+'&submap='+submap+'&key='+sid+allids+'><table cellpadding=0 cellspacing=0 '+shref2+'><tr><td colspan=2 width=200 align=center><img border=0 src='+spicfile+' height=150 ></td></tr><tr><td width=100 valign=top align=center>'+sfoto1+'</td><td>'+sfoto2+'</td></tr></table>'+sStatus+'</a></div>'	
	}

}


spicfileline+=tmpaddc


if (colcount==0) {
   srow+="<table border=0 cellspacing=0 cellpadding=0><tr><td align=left>"
} else {
   srow+="</td><td>&nbsp;&nbsp;</td><td align=right>"
}
spic=sstatus


if (vsettings27==2 || vsettings27==202 || vsettings27==402 || vsettings27==602 || vsettings27==802){
   
   srow+='<table id=caption cellPadding=0 cellSpacing=0 border=0     ><tr><td width=100%></td></tr></table>'
   srow+='<table '+shref+' width=295 border=0 cellspacing=0 cellpadding=0 id=t1_2  '+sExtraStyle+'  >'
} else {
   	  srow+='<table '+shref+' width=295 border=0 cellspacing=0 cellpadding=0 id=t1_2 '+sExtraStyle+' >'
}
ssrtobj = ssrtobj.replace(" - ","<br>").replace(" - ","<br>");
sprijs = sprijs.replace(" | ","<br>");



srow+='<tr height=100% valign=top>';
if (vsettings27==2 || vsettings27==102 || (vsettings27==202 && colcount==0) || (vsettings27==302 && colcount==0) || (vsettings27==402 && colcount!=0) || (vsettings27==502 && colcount!=0)) srow+='<td width=200 id=tempty valign=top rowspan=2 ><table border=0 cellspacing=0 cellpadding=8><tr><td '+shref2+'> '+spicfileline+'</td></tr></table></td>';

var sstyle2='style="border-left:1px solid"'
if (vsettings27==602 || vsettings27==702 || (colcount!=0 && (vsettings27==202 || vsettings27==302)) || (colcount==0 && (vsettings27==402 || vsettings27==502)) ) {
	sstyle2='style="border-right:1px solid"'
}
if (vsettings27==2 || vsettings27==202 || vsettings27==402 || vsettings27==602 || vsettings27==802){
	srow+='<td colspan=1 '+sstyle2+'><table border=0 vspace=0 cellpadding=0 cellspacing=0 width=100% height=100% ><tr><td valign=top> <table border=0 vspace=0 cellpadding=0 cellspacing=0 width=100%   ><tr><td width=6></td><td height=40><b>' + skopsmall2 +'</b></td><td align=right valign=bottom><a href='+sGetportaldv2+'params='+params+'&submap='+submap+'&key='+sid+allids+'><img border=0 src=img/pijlmeer.gif></a>&nbsp;&nbsp;<br>&nbsp;'+spimginf+'</td></tr></table><table cellpading=0 cellspacing=0 border=0 vspace=0><tr><td width=4></td><td><br>' + ssrtobj + '<br>' + sprijs + '</td></tr></table>'
}else{
	srow+='<td colspan=1 '+sstyle2+' ><table border=0 vspace=0 cellpadding=0 cellspacing=0 width=100%  height=100%  ><tr><td valign=top><table border=0 vspace=0 cellpadding=0 cellspacing=0 width=100%  id=captionextra ><tr><td width=6></td><td height=40><b>' + skopsmall2 +'</b></td><td align=right valign=bottom><a href='+sGetportaldv2+'params='+params+'&submap='+submap+'&key='+sid+allids+'><img border=0 src=img/pijlmeer.gif></a>&nbsp;&nbsp;<br>&nbsp;'+spimginf+'</td></tr></table><table cellpading=0 cellspacing=0 border=0 vspace=0><tr><td width=4></td><td><br>' + ssrtobj + '<br>' + sprijs + '</td></tr></table>'
}



srow+='</tr><tr valign=bottom><td align=left valign=bottom colspan=1><table border=0 vspace=0 cellpadding=0 cellspacing=0><tr><td width=6></td><td>';
if (swoonopp!='' && swoonopp!='0') srow+='oppervlakte '+ca1+swoonopp+'&nbsp;m&sup2;<br>';
if (sinhoud!='' && sinhoud!='0') srow+='inhoud '+ca1+sinhoud+'&nbsp;m&sup3;<br>';
if (sperceel!='' && sperceel!='0') srow+='perceel '+ca1+sperceel+'&nbsp;m&sup2;<br>';
srow+='</td></tr><tr><td height=8></td></tr></table></td></tr></table> ';

if (vsettings27==602 || vsettings27==702 || (vsettings27==202 && colcount!=0) || (vsettings27==302 && colcount!=0) || (vsettings27==402 && colcount==0) || (vsettings27==502 && colcount==0)) srow+='<td width=200 id=tempty valign=top rowspan=2><table border=0 cellspacing=0 cellpadding=8><tr><td '+shref2+'>  '+spicfileline+'</td></tr></table></td>';

srow+='</td></tr></table>';
if (colcount!=0) {
   srow+="  </td></tr><tr height=5><td> </td></tr></table>"
   if (vsettings105==((objnr/(colcount+1))+1)) srow+=sBanner

   colcount=-1
}
colcount++
}

if (vsettings27==3 || vsettings27==103 || vsettings27==203 || vsettings27==303 || vsettings27==802) {

var spicfileline='';
if (vsettings27==802){
	if (sStatus!='') sStatus='<div style="position:relative;z-index:2;left=0px;top=-'+(extrapicw==0?191:127)+'px;width:'+(255-2*vsettings39)+'px;height:'+((extrapicw==0?191:127)-2*vsettings39)+'px;">'+sStatus+'</div>'
	var spicfileline='<div align=center id=imgdv style="width:255px;height:'+(extrapicw==0?191:127)+'px;overflow:hidden"><table height='+(extrapicw==0?191:127)+' width=255 '+shref2+'><tr><td align=center >Geen foto aanwezig</td></tr></table>'+sStatus+'</div>';
	if (spicfile!='') {

	if (extrapicw==0){
		spicfileline='<div align=center id=imgdv style="width:255px;height:191px;overflow:hidden"><a href='+sGetportaldv2+'params='+params+'&submap='+submap+'&key='+sid+allids+'><img border=0 src='+spicfile+' height=191 >'+sStatus+'</a></div>'
	} else {
		if (sfoto1!='' && sfoto1!=' ') sfoto1='<img border=0 src=/upload/'+sfoto1+' height=63 style="margin-left:1px" >'
		if (sfoto2!='' && sfoto2!=' ') sfoto2='<img border=0 src=/upload/'+sfoto2+' height=63 style="margin-left:1px;margin-top:1px" >'
		spicfileline='<div align=center id=imgdv style="width:255px;height:127px;overflow:hidden"><a href='+sGetportaldv2+'params='+params+'&submap='+submap+'&key='+sid+allids+'><table cellpadding=0 cellspacing=0 '+shref2+'><tr><td width=170 align=center><img border=0 src='+spicfile+' height=127 ><br></td><td width=85 valign=top align=center>'+sfoto1+'<br>'+sfoto2+'</td></tr></table>'+sStatus+'</a></div>'	
	}

	}


   if (tmpaddc!='') spicfileline+='<div align=center style="width:255px">'+tmpaddc+'</div>'
} else if (vsettings27==303) {
	if (sStatus!='') sStatus='<div style="position:relative;z-index:2;left=0px;top=-'+(extrapicw==0?150:225)+'px;width:'+(200-2*vsettings39)+'px;height:'+((extrapicw==0?150:225)-2*vsettings39)+'px;">'+sStatus+'</div>'
	var spicfileline='<div align=center id=imgdv style="width:200px;height:'+(extrapicw==0?150:225)+'px;overflow:hidden"><table height='+(extrapicw==0?150:225)+' width=200 '+shref2+'><tr><td align=center >Geen foto aanwezig</td></tr></table>'+sStatus+'</div>';
	if (spicfile!='') {

		if (extrapicw==0){
			spicfileline='<div align=center id=imgdv style="width:200px;height:150px;overflow:hidden"><a href='+sGetportaldv2+'params='+params+'&submap='+submap+'&key='+sid+allids+'><img border=0 src='+spicfile+' height=150 >'+sStatus+'</a></div>'
		} else {
			if (sfoto1!='' && sfoto1!=' ') sfoto1='<img border=0 src=/upload/'+sfoto1+' height=75 style="margin-top:1px" >'
			if (sfoto2!='' && sfoto2!=' ') sfoto2='<img border=0 src=/upload/'+sfoto2+' height=75 style="margin-left:1px;margin-top:1px" >'
			spicfileline='<div align=center id=imgdv style="width:200px;height:225px;overflow:hidden"><a href='+sGetportaldv2+'params='+params+'&submap='+submap+'&key='+sid+allids+'><table cellpadding=0 cellspacing=0 '+shref2+'><tr><td colspan=2 width=200 align=center><img border=0 src='+spicfile+' height=150 ></td></tr><tr><td width=100 valign=top align=center>'+sfoto1+'</td><td>'+sfoto2+'</td></tr></table>'+sStatus+'</a></div>'	
		}



	}
   	if (tmpaddc!='') spicfileline+='<div align=center style="width:200px">'+tmpaddc2+'</div>'
}else {
	if (sStatus!='') sStatus='<div style="position:relative;z-index:2;left=0px;top=-'+(extrapicw==0?150:225)+'px;width:'+(200-2*vsettings39)+'px;height:'+((extrapicw==0?150:225)-2*vsettings39)+'px;">'+sStatus+'</div>'
	var spicfileline='<div align=center id=imgdv style="width:200px;height:'+(extrapicw==0?150:225)+'px;overflow:hidden"><table height='+(extrapicw==0?150:225)+' width=200 '+shref2+'><tr><td align=center >Geen foto aanwezig</td></tr></table>'+sStatus+'</div>';
	if (spicfile!='') {


		if (extrapicw==0){
			spicfileline='<div align=center id=imgdv style="width:200px;height:150px;overflow:hidden"><a href='+sGetportaldv2+'params='+params+'&submap='+submap+'&key='+sid+allids+'><img border=0 src='+spicfile+' height=150 >'+sStatus+'</a></div>'
		} else {
			if (sfoto1!='' && sfoto1!=' ') sfoto1='<img border=0 src=/upload/'+sfoto1+' height=75 style="margin-top:1px" >'
			if (sfoto2!='' && sfoto2!=' ') sfoto2='<img border=0 src=/upload/'+sfoto2+' height=75 style="margin-left:1px;margin-top:1px" >'
			spicfileline='<div align=center id=imgdv style="width:200px;height:225px;overflow:hidden"><a href='+sGetportaldv2+'params='+params+'&submap='+submap+'&key='+sid+allids+'><table cellpadding=0 cellspacing=0 '+shref2+'><tr><td colspan=2 width=200 align=center><img border=0 src='+spicfile+' height=150 ></td></tr><tr><td width=100 valign=top align=center>'+sfoto1+'</td><td>'+sfoto2+'</td></tr></table>'+sStatus+'</a></div>'	
		}
	}
   if (tmpaddc!='') spicfileline+='<div align=center style="width:200px">'+tmpaddc2+'</div>'
}

if (colcount==0) {
   srow+='<table border=0 cellspacing=0 cellpadding='+(vsettings27==303?'0':'5')+'><tr><td align=left>'
} else {
   srow+='</td><td>'
}


spic=sstatus
if (vsettings27==3 || vsettings27==203){
   srow+='<table id=caption cellPadding=0 cellSpacing=0 border=0 style="width:220px" ><tr><td width=6></td><td><b>'+skopsmall2+'</b></td><td align=right valign=bottom><a href='+sGetportaldv2+'params='+params+'&submap='+submap+'&key='+sid+allids+'><img border=0 src=img/pijlmeer.gif></a>&nbsp;<br>&nbsp;'+spimginf+'</td></tr></table>'
   srow+='<table  '+shref+' border=0 cellspacing=0 cellpadding=0 id=t1_2 '+sExtraStyle+' style="width:220px" height=100%  >'
} else if (vsettings27==802){
   srow+='<table id=caption cellPadding=0 cellSpacing=0 border=0 style="width:275px" ><tr><td width=6></td><td ><b>'+skopsmall2+'</b></td><td align=right valign=bottom><a href='+sGetportaldv2+'params='+params+'&submap='+submap+'&key='+sid+allids+'><img border=0 src=img/pijlmeer.gif></a>&nbsp;<br>&nbsp;'+spimginf+'</td></tr></table>'
   srow+='<table  border=0 cellspacing=0 cellpadding=0 id=t1_2  '+sExtraStyle+' style="width:275px" height=100%  >'
} else if (vsettings27==103){ 
   if (objnr % 6==1 || objnr % 6==2 || objnr % 6==3) {
   	  srow+='<table '+shref+' border=0 cellspacing=0 cellpadding=0 id=t1_2 '+sExtraStyle+'  style="width:220px">'
   }else{
   	  srow+='<table '+shref+' border=0 cellspacing=0 cellpadding=0 id=t1_2 style="width:220px;background-color:#ffffff;">'
   }
} else {
  srow+='<table '+shref+' border=0 cellspacing=0 cellpadding=0 id=t1_2 '+sExtraStyle+'  style="width:100% ">'
}
if ((vsettings27==3 || vsettings27==203 || vsettings27==802)){
	srow+='<tr height=10><td align=center colspan=3 valign=middle></td></tr><tr><td  valign=top align=center colspan=3 '+shref2+'> '+spicfileline+'</td></tr> <tr height=80><td width=9></td><td height=95>';
}else if ((vsettings27==303)){
	srow+='<tr height=10><td align=center colspan=2 valign=middle></td>  <td valign=top align=right >'+spimginf+'</td>    </tr><tr><td  valign=top align=center colspan=3 '+shref2+'> '+spicfileline+'</td></tr><tr ><td width=9></td><td height=40 valign=middle ><a href='+sGetportaldv2+'params='+params+'&submap='+submap+'&key='+sid+allids+'>'+skopsmall2+'</a></td></tr><tr><td></td><td height=90>';
}else{
	srow+='<tr height=25><td align=center colspan=2 valign=middle><a href='+sGetportaldv2+'params='+params+'&submap='+submap+'&key='+sid+allids+'>'+skopsmall2+'</a></td>  <td valign=top align=right >'+spimginf+'</td>    </tr><tr><td  valign=top align=center colspan=3 '+shref2+'> '+spicfileline+'</td></tr> <tr height=80><td width=9></td><td height=95>';
}
if (vsettings27==203){

	srow+='<table border=0 cellspacing=0 cellpadding=0 height=100% width=200 style="background-color:ffffff"><tr valign=top><td width=3></td><td valign=top>'
} else if (vsettings27==303){

	srow+='<table border=0 cellspacing=0 cellpadding=0 height=100% width=200 ><tr valign=top><td width=3></td><td valign=top>'
}else{
	srow+='<table border=0 cellspacing=0 cellpadding=0 height=100% ><tr valign=top><td width=0></td><td valign=top>'
}
if (ssrtobj.length>30) ssrtobj = ssrtobj.replace(" - ","<br>");
if (ssrtobj.length>56) ssrtobj = ssrtobj.replace(" - ","<br>");
if (statoms!='') ssrtobj=ssrtobj + "<BR><b>"+statoms +"</b>" 
if (sprijs.length>28) sprijs = sprijs.replace(" | ","<br>");



srow+='' + ssrtobj + (vsettings27==802?'<BR>':'') +'</td></tr><tr><td></td><td valign=middle>'+sobjoms+'</td></tr><tr valign=bottom><td></td><td valign=bottom ><b>' + sprijs + '</b>';
   

srow+='</td></tr><tr height=1><td> </td></tr></table>';
srow+='</td><td width=9></td></tr><tr height=9><td> </td></tr></table>';
if ((colcount>1) || (colcount>0 &&  vsettings27==802)) {
   if (vsettings27==303){
	srow+='</td></tr></table>'
   }else{
	srow+='</td></tr><tr height=5><td> </td></tr></table>'
   }
   if (vsettings105==((objnr/(colcount+1))+1)) srow+=sBanner
   colcount=-1
}
colcount++
}

if ((vsettings27>4 && vsettings27<99) || vsettings27==205 || vsettings27==305) {
	if (sStatus!='') sStatus='<div style="position:relative;z-index:2;left=0px;top=-120px;width:'+(180-2*vsettings39)+'px;height:'+(120-2*vsettings39)+'px;">'+sStatus+'</div>'
	var spicfileline='<div align=center id=imgdv style="width:180px;height:120px;overflow:hidden"><table height=120 width=180 '+shref2+'><tr><td align=center >Geen foto aanwezig</td></tr></table>'+sStatus+'</div>';
	if (spicfile!='') spicfileline='<div align=center id=imgdv style="width:180px;height:120px;overflow:hidden"><a href='+sGetportaldv2+'params='+params+'&submap='+submap+'&key='+sid+allids+'><img border=0 src='+spicfile+' height=120 >'+sStatus+'</a></div>'
if (colcount==0) {
   srow+="<table border=0 cellspacing=0 cellpadding=0><tr><td>"
} else {
   srow+="</td><td width=10> </td><td>"
}


akop[objnr]=skop;
aprs[objnr]=sprijs;

spic=sstatus
if (vsettings27==205){
	srow+='<table '+shref+' border=0 cellspacing=0 cellpadding=5 style="width:180px;height:210px" ><tr><td width=100  valign=top>  <table border=0 cellspacing=0 cellpadding=0 style="width:170px"><tr><td width=100% id=tempty valign=top '+shref2+'> '+spicfileline+tmpaddc;
} else if (vsettings27==305){
	srow+='<table '+shref+' border=0 cellspacing=0 cellpadding=0 style="width:180px;height:210px" ><tr><td width=100  valign=top>  <table border=0 cellspacing=0 cellpadding=0 style="width:180px"><tr><td width=100% id=tempty valign=top '+shref2+'> '+spicfileline.replace(':170px',':180px')+tmpaddc;

}else{
	srow+='<table '+shref+' border=0 cellspacing=0 cellpadding=5 style="width:180px;height:210px" id=t1_2 '+sExtraStyle+'><tr><td width=100  valign=top>  <table border=0 cellspacing=0 cellpadding=0 style="width:170px"><tr><td width=100% id=tempty valign=top '+shref2+'> '+spicfileline+tmpaddc;
}
skop='<a href='+sGetportaldv2+'params='+params+'&submap='+submap+'&key='+sid+allids+'><font color=#ffffff>' + skopsmall2 +'</font></a>'



if (sprijs.indexOf('Vraagpr')>0 && sprijs.indexOf('Huurpr')>0 ){
sprijs=sprijs.replace('Vraagpr','Vr.pr')
sprijs=sprijs.replace('Huurpr','Huur')
sprijs=sprijs.replace(',-','')
sprijs=sprijs.replace(',-','')
sprijs=sprijs.replace(' | ',' ')
}
if (sprijs.indexOf('Kooppr')>0 && sprijs.indexOf('Huurpr')>0 ){
sprijs=sprijs.replace('Kooppr','Koop')
sprijs=sprijs.replace('Huurpr','Huur')
sprijs=sprijs.replace(',-','')
sprijs=sprijs.replace(',-','')
sprijs=sprijs.replace('v.o.n.','von')
sprijs=sprijs.replace(' | ',' ')
}


var skop2=''
if (statoms!='') skop2='<b>'+statoms +'</b>'
var skop3=sprijs;


var stmp12='',stmp13=''; 
if (vsettings27==305) {stmp12=' id=t1_2 '+sExtraStyle+' align=center valign=middle height=75 ';stmp13='<tr><td height=10></td></tr>'}  
srow+='</td></tr></table> </td></tr><tr  ><td '+stmp12+'><b>'+skopsmall2+'</b><BR><small>' + sprijs +'</small>&nbsp;<br><a href='+sGetportaldv2+'params='+params+'&submap='+submap+'&key='+sid+allids+'><small>Meer informatie >></small></a></td></tr>'+stmp13+'</table>';
if (colcount>(Math.round(fullwdth /200)-2)) {
   rowcount++
   srow+='</td></tr><tr height=10><td style="font-size:2pt;">&nbsp;</td></tr></table>'
   if (vsettings105==((objnr/(colcount+1))+1)) srow+=sBanner
   colcount=-1
}
colcount++
}

}
function DrawRows(){
document.write(srow)
}
