

ie = (document.all)?true:false
ns = (document.layers)?true:false

var img = new Array() 
var count=0
var lus=0

function showimg(){
	return(true);
} 


function GetTabBGColor(){
	return('#ffeedd');
}

function TekstBoven(){
//	return(true);
}

function GetObjPerPage(){
	// Aantal huizen in 1 overzichtscherm
	return(4);
}
function GetCaptionColor(){
	// Kleur van caption
	return('808080'); //2f8fd2
}
function StartWoningaanbod(){
	
	return(false); 
}

function GetHypo(){
var i=0;	
var cont='';
cont+='<FORM name=formulier onsubmit="return false;">';
cont+='<TABLE align=left border=0 cellPadding=0 cellSpacing=0 width="100%">';
cont+='<TBODY><TR><TD>Percentage </TD>';
cont+='<TD>&nbsp;&nbsp;&nbsp;<SELECT name=procent> ';
for (i=46;i<70;i++){
	cont+='&nbsp;&nbsp;<OPTION value='+(i/10)+'>'+(i/10)+'%</OPTION>'; 
}
cont+='</SELECT> </TD></TR>';
cont+='<TR><TD width=150>Totaal jaarinkomen (incl 8% vak) </TD>';
cont+='  <TD>€&nbsp;<INPUT name=inkomen size=10 value=0> &nbsp;<BR></TD></TR>';
cont+='<TR><TD width=150>Eigen inbreng </TD>';
cont+='  <TD>€&nbsp;<INPUT name=inbreng size=10 value=0> &nbsp;<BR></TD></TR>';
cont+='<TR><TD><A id=a1 href="Javascript:bereken(0)">Kosten huis/bereken maximale hypotheek >></A> </TD>';
cont+='  <TD>€&nbsp;<INPUT name=kosten size=10 value=0> &nbsp; </TD></TR>';
cont+='<TR><TD><A id=a1 href="Javascript:bereken(1)">Bereken hypotheeklasten >></A></TD>';
cont+='  <TD>€&nbsp;<INPUT name=resultaat size=10> &nbsp;bruto per maand </TD></TR>';
cont+='<TR><TD colSpan=2>&nbsp;</TD></TR>';
cont+='<TR><TD align=left colSpan=2>Aan deze berekening kunnen geen rechten worden ontleend.</TD></TR></TBODY></TABLE></FORM>';
return(cont);
}

function Show(selPage,psSort,psLand,psPlaats,psType){
// -1=opnieuw zoeken , sortering '1'=prijs/'2'=plaats/'3'=type , land ('0'=alle) , plaatsnaam ('0'=alle), type omschrijving ('0'=alle, 'B'=BOG/kantoor/winkel, 'W'=woonhuis/appartement/grond/garagebox)
	var objperpage=4
	objperpage=GetObjPerPage();
	PAGE=selPage
	var MAX
	var Lowest=0
	var LowestV
	var SORTFLD = new Array()
	var SORTFLDV = new Array()
	var i=0
	var u=0
	var iH=''
	var foregr
	
	if (PAGE==-1){ 
		//opnieuw zoeken

		if (psType.length<4) BofW=psType
		if (psType=='0') psType=BofW
		
		

		PAGE=0 
		sortIndex=0

		sREFL=psLand
		sREFPL=psPlaats
		sREFSW=psType
		sSORT=psSort

		if (window.parent.nav.sREFL==null) window.parent.nav.sREFL=0
		if (window.parent.nav.sREFPL==null) window.parent.nav.sREFPL=0
		if (window.parent.nav.sREFSW==null) window.parent.nav.sREFSW=0
		if (window.parent.nav.sSORT==null) window.parent.nav.sSORT=0


		window.parent.nav.countSort=0
		for (i = 0; i < window.parent.nav.count; i++ ){
			if (window.parent.nav.sSORT==1){
				SORTFLDV[i]=window.parent.nav.PN[i]
				MAX=999999999999999999999999
			}
			if (window.parent.nav.sSORT==2){
				SORTFLDV[i]=window.parent.nav.PL[i]
				MAX='zzzzzzzzzzzzzzzzzzzz'
			}
			if (window.parent.nav.sSORT==3){
				SORTFLDV[i]=window.parent.nav.SW[i]
				MAX='zzzzzzzzzzzzzzzzzzzzzz'
			}
		}	
		for (i = 0; i < window.parent.nav.count  ; i++ ){
			Lowest=i
			for (x = 0; x < window.parent.nav.count; x++ ){
				if (SORTFLDV[x] < SORTFLDV[Lowest]) Lowest=x
			}
			SORTFLDV[Lowest]=MAX
			SORTFLD[i]=Lowest
			
		}

		for (i = 0; i < window.parent.nav.count; i++ ){
			u=SORTFLD[i]
//deze 3 regels is maatwerk voor SUMMA			
			var bIsBOG=false
			var bIsBOG2=false
			
			if  (window.parent.nav.sREFSW=='BOG algemeen' || window.parent.nav.sREFSW=='winkel'  || window.parent.nav.sREFSW=='kantoor' || window.parent.nav.sREFSW=='BOG algemeen (nieuwbouw)' || window.parent.nav.sREFSW=='winkel (nieuwbouw)' || window.parent.nav.sREFSW=='kantoor (nieuwbouw)') {bIsBOG2=true}
			if  (window.parent.nav.SW[u]=='BOG algemeen' || window.parent.nav.SW[u]=='winkel'  || window.parent.nav.SW[u]=='kantoor' || window.parent.nav.SW[u]=='BOG algemeen (nieuwbouw)' || window.parent.nav.SW[u]=='winkel (nieuwbouw)' || window.parent.nav.SW[u]=='kantoor (nieuwbouw)') {bIsBOG=true}
			if ((window.parent.nav.sREFL==0 || window.parent.nav.sREFL==window.parent.nav.L[u]) && (window.parent.nav.sREFPL==0 || window.parent.nav.sREFPL==window.parent.nav.PL[u])&& (((bIsBOG2==false && bIsBOG==false && window.parent.nav.sREFSW==0) || (bIsBOG2==false && window.parent.nav.SW[u]==window.parent.nav.sREFSW)) || (bIsBOG2==true && bIsBOG==true)  )) {  
//			if ((window.parent.nav.sREFL==0 || window.parent.nav.sREFL==window.parent.nav.L[u]) && (window.parent.nav.sREFPL==0 || window.parent.nav.sREFPL==window.parent.nav.PL[u])&& ((window.parent.nav.sREFSW==0 && bIsBOG==false) || (window.parent.nav.sREFSW!=0 && bIsBOG==true)  )) {  
//			if ((window.parent.nav.sREFL==0 || window.parent.nav.sREFL==window.parent.nav.L[u]) && (window.parent.nav.sREFPL==0 || window.parent.nav.sREFPL==window.parent.nav.PL[u])&& (window.parent.nav.sREFSW==0 || window.parent.nav.sREFSW==window.parent.nav.SW[u]  )) {  

//			if ((window.parent.nav.sREFL==0 || window.parent.nav.sREFL==window.parent.nav.L[u]) && (window.parent.nav.sREFPL==0 || window.parent.nav.sREFPL==window.parent.nav.PL[u])&& (window.parent.nav.sREFSW==0 || window.parent.nav.sREFSW==window.parent.nav.SW[u] || window.parent.nav.sREFSW==window.parent.nav.SW3[u] + window.parent.nav.SW4[u]  || window.parent.nav.sREFSW==window.parent.nav.SW3[u]   || window.parent.nav.sREFSW==window.parent.nav.SW4[u] )) {  
				window.parent.nav.SI[window.parent.nav.countSort++] = u
			}
		}

	} 

	for (u = 0; u < window.parent.nav.countSort; u++){

	    if (u>=window.parent.nav.PAGE*objperpage &&  u<(window.parent.nav.PAGE+1)*objperpage){
		foregr='leeg.gif'
		i=window.parent.nav.SI[u]
		if (window.parent.nav.S[i]=='verkocht') foregr='verkocht.gif'
		if (window.parent.nav.S[i]=='verhuurd') foregr='verhuurd.gif'
		if (window.parent.nav.P[i] == '') foregr='empty.gif'
		if (window.parent.nav.S[i]=='nieuw in portefeuille') foregr='nieuw.gif'
		if (window.parent.nav.S[i]=='onder bod') foregr='bod.gif'

		iH+='<TABLE border=0 cellPadding=2 cellSpacing=0 width=605><TBODY>'
		if (u>window.parent.nav.PAGE*objperpage) iH+='<TR><TD width=103></TD><TD width=15>&nbsp; </TD><TD></TD></TR>'
		iH+='<TR><TD vAlign=bottom width=103>'

//		iH+='<TABLE border=0 cellPadding=2 cellSpacing=0 width=605><TBODY><TR><TD width=103></TD><TD width=15>&nbsp; </TD><TD></TD></TR><TR><TD vAlign=bottom width=103>'
		iH+='<TABLE border=0 cellPadding=0 cellSpacing=0 width=110><TBODY><TR><TD background=http://www.summavastgoed.nl/Objecten/lijst/'+window.parent.nav.P[i]+' height=71 width=107>'
		iH+='<A href=Javascript:window.parent.nav.ShowDV("../Detail/'+window.parent.nav.DIR[i]+'/ADV.htm",'+i+')><IMG border=0  src=http://www.summavastgoed.nl/REAL_A/'+foregr+' ></A><BR></TD>'
		iH+='<TD background=http://www.summavastgoed.nl/REAL_A/schaduw-vert.gif height=1 width=3><IMG border=0 height=3 src=blocker.gif width=3><BR></TD></TR><TR>'
		iH+='<TD align=right background=http://www.summavastgoed.nl/REAL_A/schaduw-hor.gif vAlign=top><IMG border=0 height=3 src=blocker.gif width=3><BR></TD>'
		iH+='<TD><P align=center><IMG border=0 height=3 src=http://www.summavastgoed.nl/REAL_A/schaduw-hoekje.gif width=3><BR></P></TD></TR></TBODY></TABLE></TD><TD width=15></TD>'
		iH+='<TD align=left vAlign=top><TABLE border=0 cellPadding=0 cellSpacing=0 width=100% >'
		iH+='<TBODY><TR><TD width=100% ><TABLE bgColor=#000000 border=0 cellPadding=0 cellSpacing=1 width=100% >'
		iH+='<TBODY><TR><TD><TABLE bgColor='+GetTabBGColor()+' border=0 cellPadding=0 cellSpacing=0 width=100% ><TBODY>'
		iH+='<TR><TD background=http://www.summavastgoed.nl/REAL_A/bevelrand.jpg bgColor=#'+GetCaptionColor()+' width=100% ><IMG border=0 height=7 src=blocker.gif width=1><BR></TD></TR>'
		iH+='<TR><TD bgcolor='+GetTabBGColor()+'>&nbsp;<A  id=a1  href=Javascript:window.parent.nav.ShowDV("../Detail/'+window.parent.nav.DIR[i]+'/ADV.htm",'+i+')><b>'+window.parent.nav.KOP[i]+'</b></A></TD></TR>'
		if (TekstBoven())  iH+='<TR><TD bgcolor='+GetTabBGColor()+'>&nbsp;'+window.parent.nav.TK[i]+'</TD></TR>' 
		iH+='<TR><TD bgcolor='+GetTabBGColor()+'>&nbsp;'+window.parent.nav.SW[i]+window.parent.nav.SW2[i]+'</TD></TR>'
		if (!TekstBoven()) iH+='<TR><TD bgcolor='+GetTabBGColor()+'>&nbsp;'+window.parent.nav.TK[i]+'</TD></TR>'
		iH+='<TR><TD bgcolor='+GetTabBGColor()+'><DIV align=right>'+window.parent.nav.PR[i]+'&nbsp;</DIV></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>'
		iH+='</TD><TD background=http://www.summavastgoed.nl/REAL_A/schaduw-vert.gif height=1 width=5><IMG border=0 height=3 src=blocker.gif width=3><BR></TD></TR>'
		iH+='<TR><TD align=right background=http://www.summavastgoed.nl/REAL_A/schaduw-hor.gif vAlign=top width=253><IMG border=0 height=3 width=3 ><BR></TD>'
		iH+='<TD background=http://www.summavastgoed.nl/REAL_A/schaduw-hoekje.gif></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>'
	    }
	}
	iH+='<BR><TABLE><TR><TD width=140></TD><TD>'
	
	if (window.parent.nav.countSort>objperpage) {
		

		if (window.parent.nav.PAGE==0){
			iH+='<FONT color=#808080><B>&#139&#139&#139</B></FONT>&nbsp;&nbsp;&nbsp;'
		} else {
			iH+='<A id=a1 href="Javascript:window.parent.nav.Show('+(window.parent.nav.PAGE-1)+')"><B>&#139&#139&#139</B></A>&nbsp;&nbsp;&nbsp;'
		}

		for (i=1; i<=(((window.parent.nav.countSort-1)/objperpage)+1);i++){
			if ((i-1)==window.parent.nav.PAGE){
				iH+='<B><u>'+i+'</u></B>&nbsp;&nbsp;&nbsp;'
			}else{
				iH+='<A id=a1 href="Javascript:window.parent.nav.Show('+(i-1)+')"><b>'+i+'</b></A>&nbsp;&nbsp;&nbsp;'
			}
			if ((i%20)==0){ iH+='<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'}
		}	

		if (window.parent.nav.PAGE>=i-2){
			
			iH+='<FONT color=#808080><B>&#155&#155&#155</B></FONT>&nbsp;&nbsp;&nbsp;'
		} else {
			iH+='<A id=a1 href="Javascript:window.parent.nav.Show('+(window.parent.nav.PAGE+1)+')"><B>&#155&#155&#155</B></A>&nbsp;&nbsp;&nbsp;'
		}

		
	}
	iH+='</TD></TR><TR><TD></TD><TD>'+window.parent.nav.GetZoek()+'</TD></TR></TABLE>'
	window.parent.woningen.document.open()
	window.parent.woningen.document.write('<HTML><HEAD><link rel=stylesheet href=http://www.summavastgoed.nl/REAL_A/style.css><script src=http://www.summavastgoed.nl/REAL_A/func.js></script></HEAD><BODY><div class=homedivcss id=homedivcss>'+iH+'</div></BODY></HTML>')
	window.parent.woningen.document.close()

}


function bereken(meth)
{	var inbreng = new String(document.forms.formulier.inbreng.value);
	var inkomen = new String(document.forms.formulier.inkomen.value);
	var kosten = new String(document.forms.formulier.kosten.value);
	var rente = new String(document.forms.formulier.procent.options[document.forms.formulier.procent.selectedIndex].value);	
	if (meth==0){
		document.forms.formulier.kosten.value = (Math.round(inbreng*100+ inkomen*420))/100;
		kosten = document.forms.formulier.kosten.value;
	}
	var periode = 30;
	var schuld=kosten-inbreng;
	var groeifactor = (rente/100)+1;	
	var extra = ((schuld*(rente/100))/12)*0.7;
	var betaal = (schuld*((groeifactor-1)/(groeifactor*(Math.pow(groeifactor,periode)-1))))/12;
	document.forms.formulier.resultaat.value= (Math.round((betaal+extra)*100))/100;
}

function ShowFoto(fotonr){
		
	document.foto.src=img[fotonr]

}
function goto_woningen_overzicht() {
    	if (ie){
		history.go(-1)
	}else{
		location.href='../../lijst/Awoningaanbod.htm'
	}
}



function ShowCaption(sKop){
	document.write('<TABLE border=0 cellPadding=0 cellSpacing=0 width=605>');
	document.write('  <TBODY>');
	document.write('  <TR>');
	document.write('    <TD align=right height=1 vAlign=bottom width=20>');
	document.write('      <TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">');
	document.write('        <TBODY>');
	document.write('        <TR>');
	document.write('          <TD align=right vAlign=bottom width="100%"><A ');
	document.write('            href="javascript:goto_woningen_overzicht()"><IMG border=0 height=19 ');
	document.write('            src="../../../REAL_A/terug.gif" width=19></A><BR></TD>');
	document.write('          <TD background=../../../REAL_A/schaduw-vert.gif height=1 ');
	document.write('            width=1><IMG border=0 height=3 src="../../../REAL_A/blocker.gif" ');
	document.write('            width=3><BR></TD></TR>');
	document.write('        <TR>');
	document.write('          <TD align=right background=../../../REAL_A/schaduw-hor.gif height=1 ');
	document.write('          vAlign=top width="100%"><IMG border=0 height=3 ');
	document.write('            src="../../../REAL_A/blocker.gif" width=3><BR></TD>');
	document.write('          <TD background=../../../REAL_A/schaduw-hoekje.gif height=1 ');
	document.write('            width=1><IMG border=0 height=3 src="../../../REAL_A/blocker.gif" ');
	document.write('            width=3><BR></TD></TR></TBODY></TABLE></TD>');
	document.write('    <TD align=right height=1 vAlign=bottom width="1%"></TD>');
	document.write('    <TD align=right vAlign=bottom width="95%">');
	document.write('      <TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">');
	document.write('        <TBODY>');
	document.write('        <TR>');
	document.write('          <TD width="100%">');
	document.write('            <TABLE bgColor=#000000 border=0 cellPadding=0 cellSpacing=1 ');
	document.write('            width="100%">');
	document.write('              <TBODY>');
	document.write('              <TR>');
	document.write('                <TD width="100%">');
	document.write('                  <DIV align=left>');
	document.write('                  <TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">');
	document.write('                    <TBODY>');
	document.write('                    <TR>');
	document.write('                      <TD align=middle background=../../../REAL_A/bevel.jpg ');
	document.write('                      bgColor=#'+GetCaptionColor()+' ><B><FONT ');
	document.write('                        color=#ffffff>'+sKop+'</FONT><B></B></B></TD>');
	document.write('                      <TD background=../../../REAL_A/bevel.jpg bgColor=#'+GetCaptionColor()+' ');
	document.write('                      width="1%"><IMG border=0 height=17 ');
	document.write('                        src="../../../REAL_A/blocker.gif" ');
	document.write('                  width=1></TD></TR></TBODY></TABLE></DIV></TD></TR></TBODY></TABLE></TD>');
	document.write('          <TD background=../../../REAL_A/schaduw-vert.gif height=1 ');
	document.write('            width=1><IMG border=0 height=3 src="../../../REAL_A/blocker.gif" ');
	document.write('            width=3><BR></TD></TR>');
	document.write('        <TR>');
	document.write('          <TD align=right background=../../../REAL_A/schaduw-hor.gif height=1 ');
	document.write('          vAlign=top width="100%"><IMG border=0 height=3 ');
	document.write('            src="../../../REAL_A/blocker.gif" width=3><BR></TD>');
	document.write('          <TD background=../../../REAL_A/schaduw-hoekje.gif height=1 ');
	document.write('            width=1><IMG border=0 height=3 src="../../../REAL_A/blocker.gif" ');
	document.write('            width=3><BR></TD></TR></TBODY></TABLE></TD></TR>');
	document.write('  <TR>');
	document.write('    <TD align=right colSpan=3 height=5 vAlign=bottom ');
	document.write('width=20></TD></TR></TBODY></TABLE>');

}
function ShowKader(sCont,dW,dH,sAlign){
	
	if (sAlign!='') sAlign=' align='+sAlign;
	document.write('<TABLE border=0 cellPadding=0 cellSpacing=0');
	if (dW!=0) document.write(' width='+dW);
	if (dH!=0) document.write(' height='+dH);
	document.write('  ><TBODY>');
	document.write('  <TR>');
	document.write('    <TD width="100%" height="100%">');
	document.write('      <TABLE bgColor=#808080 border=0 cellPadding=0 cellSpacing=1 ');
	document.write('        width="100%" height="100%"><TBODY>');
	document.write('        <TR>');
	document.write('          <TD width="100%" height="100%">');
	document.write('            <DIV align=left>');
	document.write('            <TABLE border=0 cellPadding=0 cellSpacing=0 width="100%" height="100%">');
	document.write('              <TBODY>');
	document.write('              <TR>');
	document.write('                <TD bgColor='+GetTabBGColor()+' colSpan=3 height=5 width=10><IMG border=0 ');
	document.write('                  height=5 src="../../../REAL_A/blocker.gif" width=5> </TD></TR>');
	document.write('              <TR>');
	document.write('                <TD bgColor='+GetTabBGColor()+' width=5><IMG border=0 height=1 ');
	document.write('                  src="../../../REAL_A/blocker.gif" width=10></TD>');
	document.write('                <TD bgColor='+GetTabBGColor()+' width="100%"'+sAlign+'> ');
	document.write(sCont);
	document.write('		</TD>');
	document.write('                <TD bgColor='+GetTabBGColor()+' width=5><IMG border=0 height=1 ');
	document.write('                  src="../../../REAL_A/blocker.gif" width=10></TD></TR>');
	document.write('              <TR>');
	document.write('                <TD bgColor='+GetTabBGColor()+' colSpan=3 height=5 width=10><IMG border=0 ');
	document.write('                  height=5 src="../../../REAL_A/blocker.gif" width=5> ');
	document.write('              </TD></TR></TBODY></TABLE></DIV></TD></TR></TBODY></TABLE></TD>');
	document.write('    <TD width=3><IMG border=0 height=3 src="../../../REAL_A/blocker.gif" ');
	document.write('      width=3></TD></TR>');
	document.write('  <TR>');
	document.write('    <TD colSpan=2 height=11 width="3%"></TD></TR></TBODY></TABLE>');
}
