/* author: Amazing Mama */
/* Creation date: 15-11-2004 */


// Algemeen 

//----------------------------------------------------------------------------------------

function isBloot(x) /*x is een document.location.pathname*/
{   y=x.substring(x.toLowerCase().indexOf('pagina')+6,x.indexOf('.htm'));
if ( x.toLowerCase().indexOf('pagina')>0)
{top.location='../toon.htm?'+y ;
}
}

function XLoad(file) {
eval("parent.Tekst.location='../HTM/"+file+"'");
eval("parent.Marge.location='../HTM/Marge.htm?"+file+"'");
eval("parent.Logo.location='../HTM/Logo.htm'");
eval("parent.LW.location='../LaatsteWijziging.htm'");
}
function Load(file) {
eval("document.location='../HTM/"+file+"'");
}

function LoadFoto(file) {
eval("parent.Marge.location='../HTM/Marge.htm?"+file+"'");
}

function showF(P){}

function XshowF(P) //P = '21' of Pagina21.htm
{
if (AinB(P,'Pagina')) {P=P.substr(6);}
if (AinB(P,'htm')) 	 {P=P.substr(0,P.length-4);}
eval("parent.Marge.location='../HTM/Marge.htm?Pagina"+P+"'");
}

function dw(x) {document.write(x);}
function decode(a,b,c,d) {if (a==b){return c;}else{return d;}}
function nvl(a,b) {if (!a){return b;}{return a;}}
function mod(a,b) { return a-b*Math.floor(a/b);}
function AinB(a,b)
{if (a.indexOf(b)==-1) {return false;} else {return true;}
}

function showPar(x)
{
for (i=1;i<Parameter.length;i++)
if (Parameter[i][0]==x) {return Parameter[i][3];}
}


//--------------------------------------------------------------------------------


function getLink (x,y,z,c) { /* x is link, y is eventuele tekst, z type, c class */
if (!c) {c='t';}

var over=' onmouseover="Cl=this.style.color;this.style.color=\'#CCCCCC\';" onmouseout ="this.style.color=Cl;" ';

	 if (z.toLowerCase()=='http') 
		{// strip http:// indien y daarmee begint
			if (AinB('//',y)) {y=y.substr(y.indexOf('//')+2);}{}
			return '<a '
				+' href="http://' + y + '" class="'+c+'" target="_blank"'
   				+ over		
                +'>' 
				+ x +'</a>';}
else if (z.toLowerCase()=='page') 
		{return '<a '
				+ over	
				+' href="javascript:Load(\'' + y + '\');" class="'+c+'">' 
				+ x +'</a>';}
else if (z.toLowerCase()=='mail') 
		{return '<a class="'+c+'" '
				+ over	
				+' href="mailto:' 
				+ y + '" class="'+c+'">'  +x +'</a>';}
else if (z.toLowerCase()=='popup') 
		{return '<a '
				+ over	
				+' href="javascript:Popup(\'' + y + '\');" class="'+c+'">' + x +'</a>';}
else if (z.toLowerCase()=='projpopup') 
		{return '<a '
				+ over	
				+' href="javascript:ProjPopup(\'' + y + '\');" class="'+c+'">' + x +'</a>';}
else  if ((z.toLowerCase()=='doc'))
		{return '<a '
				+ over	
				+' href="../Doc/' + y + '"  target="_blank">' 
				+ x +'</a>';}
else if (z.toLowerCase()=='quote') 
		{return '<a '
				+ over
				+' href="javascript:Quotes(\'' + y + '\');" class="'+c+'">' + x +'</a>';}
else	{return  '<span class="'+c+'" '
				+ over	
				+' >'
				+ x + '</span>';}
}


function Quotes(RowId){
window.open('../HTM/Quotes.htm?'+RowId,'Quo',
'toolbar=0, location=0, directories=0, menuBar=0, scrollbars=1, resizable=1, width=600 ,height=400');
}

function Popup(x){
window.open('../HTM/Popup.htm?'+x,'Quo',
'toolbar=0,location=0, directories=0, menuBar=0,scrollbars=1, resizable=1, width=400 ,height=200,left=200,top=400');
}

function ProjPopup(x){
window.open('../HTM/ProjPopup.htm?'+x,'Quo',
'toolbar=0,location=0, directories=0, menuBar=0,scrollbars=1, resizable=1, width=600 ,height=200,left=200,top=400');
}

//----------------------------------------------------------------------------------------
// t.b.v. Nieuws 
//----------------------------------------------------------------------------------------
now = new Date();
midnight = new Date ();
now.setHours(0,0,0,0);
midnight.setHours(24,0,0,0);
Maand=now.getMonth();
Jaar=now.getYear();


function to_date (datum,uur) {
if (!uur){uur=0;}
d=datum.substr(0,2);
m=datum.substr(3,2);
y='20'+ datum.substr(6,2);
d=new Date(y,m-1,d,uur,0,0);
return d;}

function to_char (datum) {
d=datum.substr(0,2);
m=datum.substr(3,2);
y=datum.substr(6,2);
rest = datum.substr(8);
if ((d+m+y=='010101')||(d+m+y=='311299')) {return rest;}
else {
date = d + '·';
 if 	  (m == '01') date += "jan";
  else if (m == '02') date += "feb";
  else if (m == '03') date += "mrt";
  else if (m == '04') date += "apr";
  else if (m == '05') date += "mei";
  else if (m == '06') date += "jun";
  else if (m == '07') date += "jul";
  else if (m == '08') date += "aug";
  else if (m == '09') date += "sep";
  else if (m == '10') date += "okt";
  else if (m == '11') date += "nov";
  else if (m == '12') date += "dec";
date += '·' + y  +rest;
return date;}
}

//---------------------------------------------------------------------------------------
// Now geeft systeemdatum; als n een waarde heeft is dat het aantal uren na middernacht
// interessante gevallen: Now(), Now(0) en Now(24)
//
function Now(v_n)
{nw = new Date(); 
if (!v_n) {} else {nw.setHours(v_n,0,0,0);}
return nw;}
//---------------------------------------------------------------------------------------
// Sorteren
//---------------------------------------------------------------------------------------
function sw (datum) { 
// alert (datum);
d=Number(datum.substr(0,2));
m=Number(datum.substr(3,2));
y=Number(datum.substr(6,2));
return  (d) + (32 * m) + (400 * y);
}

function dateSort0a(a,b) {
if (sw(a[0])<sw(b[0])) return -1;
if (sw(a[0])>sw(b[0])) return  1;
return 0;
}
function dateSort0d(a,b) {
if (sw(a[0])>sw(b[0])) return -1;
if (sw(a[0])<sw(b[0])) return  1;
return 0;
}
function dateSort1a(a,b) {
if (sw(a[1])<sw(b[1])) return -1;
if (sw(a[1])>sw(b[1])) return  1;
return 0;
}
function dateSort1d(a,b) {
if (sw(a[1])>sw(b[1])) return -1;
if (sw(a[1])<sw(b[1])) return  1;
return 0;
}
//---------------------------------------------------------------------------------------

function toonNieuws(){
var TMP=Nieuws[0]; 
	Nieuws.shift();
	Nieuws.sort(dateSort1d); 
	Nieuws.unshift(TMP);
var tel = 0;
for (Q=1; Q < Nieuws.length; Q++)
if ((Now(24)>=to_date(unescape(Nieuws[Q][1])))
	  &&(to_date(unescape(Nieuws[Q][2]))> Now(24)))
{	if (tel==0){dw ('<span class=lt>Nieuws:<br></span>'+lijn(350,1));tel=1;}
  dw(decode( unescape(Nieuws[Q][5])
  		,''
		, unescape(Nieuws[Q][3])
		, getLink (unescape(Nieuws[Q][3])
		, decode(Nieuws[Q][5],'popup',unescape(Nieuws[Q][0]),unescape(Nieuws[Q][4]))
		, unescape(Nieuws[Q][5])
		,'la'))
	 );

	dw(decode(Nieuws[Q][1]
	,'01-01-01'
	,'</a></b><br>'
	,'</a></b><span class=p> &nbsp;&nbsp;[' + Nieuws[Q][1] + ']</span><br>'));}
if (tel==1) {dw (lijn(350,1)+'<br>');}
}

function toonActueel(){
dw('<table>');
for (Q=1; Q < Actueel.length; Q++)
if ((now >= getdate(Actueel[Q][0]))&&(now < getmidnight(Actueel[Q][1])))
{dw('<tr><td class="t">');	
dw('<span style="font: 8pt"> <br>(' + Actueel[Q][0] + ')</span><br>'+ unescape(Actueel[Q][2]) + '</td></tr>');}
dw('</table>');
}

//----------------------------------------------------------------------------------------
// Hoofdmenu
//----------------------------------------------------------------------------------------

function showLayer(L,x){
if (!x){x='';}{}
var str='';
if (MenuData[L].length>2)
{
str+= '<table cellspacing=1 cellpadding=2 border=0>';
for (i=2;i<MenuData[L].length;i++)
{str+= 	'<tr><td width=200 bgcolor=silver '
	+	' onmouseover="this.style.background=\'red\'; this.style.color=\'yellow\'";'
	+	' onmouseout="this.style.background=\'silver\'";>'
    +	'<a color=red onmouseover="this.style.color=\'yellow\';"' 
	+	' onmouseout="this.style.color=\'gray\';" '
    +	' onclick="showF(\''+MenuData[L][i][1]+'\')"'
 	+	' href=' 
	+ 	x
    +	MenuData[L][i][1]
    +'>&nbsp;'
    +MenuData[L][i][0]
    +'</a></td></tr>';}
str+='</table>';
}
if (str!='') {
return overlib(str, STICKY, WIDTH, 200, FIXX, 70, OFFSETY, 0,  /*,CLOSECLICK*/ MOUSEOFF, TIMEOUT, 0);
}

}



//----------------------------------------------------------------------------------------
// Foto's
//----------------------------------------------------------------------------------------

function showFoto(P)
{for (i=1;i<Foto.length;i++)
 { if ((unescape(Foto[i][0]+'.htm')==P)||(unescape(Foto[i][0])==P))
     {dw( '<tr><td align="center" class="t">'+
	 decode(unescape(Foto[i][1])
	 		,''
			,'<img border=0 src="../SysImages/Transparant.gif" width=200 height=250></td></tr><tr><td class="om">'
			,'<img border=1 src="../Images/'+unescape(Foto[i][1])+'"></td></tr><tr><td align="center"  class="om">')
			);
	  dw( nvl(unescape(Foto[i][2]),'<br>'));
	  dw ('</td></tr>');
     } 
}}

function toonSiteMap()
{dw('<table border="0" cellpadding="0" cellspacing="2" >');
for (i=0;i<MenuItem.length;i++)
	{ 	dw ('<tr><td valign="top" align="right" ><b>');
			dw (decode(MenuItem[i][0]
			,''
			,''
			,' <a class="c" ' 
			+' onmouseover="this.style.color=\'black\'"'
			+' onmouseout ="this.style.color=\''+ kl_contr+'\'"' 
			+' href="javascript:LoadPage(\''+i+'-'+0+'\')">'
			+ MenuItem[i][0] + ':&nbsp;</b></td><td class="t">'));
		
		
		for (j=0;j<MenuItem[i][1].length;j++)
		{	dw(decode(MenuItem[i][1][j]
			,''
			,''
			,' <a class="t" ' 
			+' onmouseover="this.style.color=\'black\'"'
			+' onmouseout ="this.style.color=\'gray\'"' 
			+'href="javascript:LoadPage(\''+i+'-'+j+'\')">'
			+ MenuItem[i][1][j]+'</a><br>'));
		}dw ('</td>');
	}dw ('</tr>');
dw('</table>');
}


function getM(file)
{ if (file.indexOf('?')>-1) {file=file.substr(0,file.length-1);}

if ( file.substr(file.length-7,1)=='-') 
	 {return file.substr(file.length-8,1);} 
else {return file.substr(file.length-7,1);} 
}

function getP(file)
{
if (file.indexOf('?')>-1) {file=file.substr(0,file.length-1);}
if ( file.substr(file.length-7,1)=='-') 
	 {return file.substr(file.length-6,2);} 
else
return file.substr(file.length-5,1); 
}


function href(x,y)
{ if (!y) {y=x;} 
	dw ('<a class="c" href="http://'+x+'" target="_blank">'+ y +'</a>');}
function mail(x,y)
{ if (!y) {y=x;} 
	dw ('<a class="c" href="mailto:'+x+'">'+ y +'</a>');}

/*
function nextPage(p){
var M = Number(p.substring(0,p.indexOf('-')));
var P = Number(p.substr(p.indexOf('-')+1));
var maxP = MenuItem[M][1].length; 
LoadPage(M + '-' + decode(P+1, maxP,0, P+1));
}

function prevPage(p){
var M = Number(p.substring(0,p.indexOf('-')));
var P = Number(p.substr(p.indexOf('-')+1));
var maxP = MenuItem[M][1].length; 
LoadPage(M + '-' + decode(P, 0, maxP-1, P-1));
}
*/


function Xlijn(x)
{ var hr='<hr size="1" color="#9966cc">';
dw ('<br>&nbsp;<table class="t" width=100% border="0" cellspacing=0; cellpadding=0><tr><td >'+hr+'</td><td >'+hr+'</td><td >'+hr+'</td><td >'+hr+'</td><td >'+hr+'</td><td >'+hr+'</td><td><b>'+x+'</b></td><td width=400>'+hr+'</td></tr></table>');
}

//-------------------------------------------------------------------------------------
// Links
//-------------------------------------------------------------------------------------

function toonLinks()
{ dw('<table border="0" class="t" cellpadding="0" cellspacing="2">'
	//+'<tr><td colspan=2 ><b>Interessante links</b></td></tr>'
	//+'<tr><td><b>Categorie</b></td><td><b>Link</b></td></tr>'
	);
var Groep='Onzin';
for (i=1;i<Links.length;i++)
{	dw  ('<tr><td>' 
		+ decode(Links[i][0],Groep,'',unescape(Links[i][0])) 
		+ '</td><td>' 
		+ getLink(unescape(Links[i][1]),unescape(Links[i][2]),'http','')
		+ '</td></tr>' 
		);
		Groep=Links[i][0];
}
dw('</table>');
}

function file(d)
{
filenr=unescape(d.substring(d.lastIndexOf('Pagina')+6,d.lastIndexOf('.htm'))); 
for (i=1;i<Paginas.length;i++)
//if (Paginas[i][0]==filenr) {return unescape(Paginas[i][1]+' [pg'+filenr+']<br><br><br>');}
if (Paginas[i][0]==filenr) {return unescape(Paginas[i][1]+'<br><br><br>');}
}
//----------------------------------------------------------------------------------------
// Referenties (lovende woorden)
//----------------------------------------------------------------------------------------
function toonReferenties()
{var tel=0;
for (i=1;i<Referenties.length;i++)
{if (tel==0) {dw('<ul>');}
 dw('<li> &nbsp;"'+unescape(Referenties[i][0])+'"</li>');tel++;
}dw('</ul>');
}
//----------------------------------------------------------------------------------------
// Publicaties
//----------------------------------------------------------------------------------------
function toonPublicaties()
{var tel=0;
for (i=1;i<Publicaties.length;i++)
{if (tel==0) {dw('<ul>');}
 dw('<li> &nbsp;"'
 	+getLink(unescape(Publicaties[i][0])
 		    ,unescape(Publicaties[i][1])
		    ,'doc'
		    ,'a'
		    )
	+'"</li>');tel++;
}dw('</ul>');
}
//----------------------------------------------------------------------------------------
// Spreuken
//----------------------------------------------------------------------------------------
function showSpreuk()
{
i= Math.floor(((Spreuken.length -1) * Math.random()) +1);
dw (unescape(Spreuken[i][0]));
dw (decode(Spreuken[i][1],'','','<br><i>'+unescape(Spreuken[i][1])+'</i>'));
}

//----------------------------------------------------------------------------------------
// Berichten
// a_o = {A,O} A=actueel O=Oud
//----------------------------------------------------------------------------------------

function toonBerichten()
{var TMP=Berichten[0]; 
	Berichten.shift();
	Berichten.sort(dateSort1a); 
	Berichten.unshift(TMP);
    dw('<table class=c>');
for (i=Berichten.length-1;i>0;i--)
	if (	(Now(24)>=to_date(unescape(Berichten[i][1])))
	    &&	(to_date(unescape(Berichten[i][2]))> Now(24))
	   )
    {dw 
    (	'<tr><td><a href="#"  onmouseover="toonBericht(\''+i+'\')" ><b>'
	+ 	unescape(Berichten[i][4])
    +	'</b></td></tr><tr><td height=2 onmouseover="return wit();"></td></tr>'
    );
    }
    dw('</table>');
}

function toonBericht(Rid)
{
str= '<b>'
	+ unescape(Berichten[Rid][4])
    +'</b><br>'
    +decode	(Berichten[Rid][9]
    		,''
            ,''
            ,'<img src="../Images/'+Berichten[Rid][9]+'" border="1" align=top hspace=10 vspace=3><br>')
			+unescape(Berichten[Rid][5])
    +decode(Berichten[Rid][6]
				,''
				,''
				,'<br>' 
					+ getLink(unescape(Berichten[Rid][7])
							 ,unescape(Berichten[Rid][6])
							 ,unescape(Berichten[Rid][8])
							 ,'la') 
				)
		+'<br>'
;

//return overlib(str, STICKY, WIDTH, 500, BGCOLOR, '#DA0036', FIXX, 40, FIXY, 300,  BORDER, 1, TEXTSIZE, 2, CELLPAD, 10, MOUSEOFF);
return overlib(str, STICKY, WIDTH, 220, BGCOLOR, '#DA0036', FIXX, 330, FIXY, 60,  BORDER, 1, TEXTSIZE, 2, CELLPAD, 10, MOUSEOFF);
}

function XtoonBerichten(a_o){
var TMP=Berichten[0]; 
	Berichten.shift();
	Berichten.sort(dateSort1a); 
	Berichten.unshift(TMP);

if (a_o=='Actueel')
{
dw  ('<table cellspacing=1 cellpadding=2><tr>'
	);
	for (i=Berichten.length-1;i>0;i--)
	if ((Now(24)>=to_date(unescape(Berichten[i][1])))
	    &&(to_date(unescape(Berichten[i][2]))> Now(24))
	   )
	{dw ('<tr><td td class="lt" valign="top"><b>'
		+ unescape(Berichten[i][4])
		+'</b><br>'
		+decode(Berichten[i][9],'','','<img src="../Images/'+Berichten[i][9]+'" border="1" align=left hspace=10 vspace=3>')
		+ unescape(Berichten[i][5])
		+ decode(Berichten[i][6]
				,''
				,''
				,'<br>' 
					+ getLink(unescape(Berichten[i][7])
							 ,unescape(Berichten[i][6])
							 ,unescape(Berichten[i][8])
							 ,'la') 
				)
		+'<br><span class="ak">—&nbsp;'
		+ to_char(unescape(Berichten[i][1]))
		+'</td></tr>'
		
		);
	}
	dw ('</table>');
}
else if (a_o=='Oud') 
{	
dw  ('<table cellspacing=1 cellpadding=2 class=th><tr>'
	+'<td><b class=lt>Geplaatst</b></td>'
	+'<td></td>'
	+'</tr>');
	for (i=Berichten.length-1;i>0;i--)
	if ((Now(24) >= to_date(unescape(Berichten[i][2])))
	  &&(to_date(unescape(Berichten[i][3]))>= Now(24))
	   )
	{dw ('<tr><td td class=lt valign="top">'
		+ to_char(unescape(Berichten[i][1]))
		+ '</td><td td valign="top">'
		+ getLink(unescape(Berichten[i][4])
				 		  ,i			  
				 	      ,'quote'
						  ,'la')
		+''
	    +'</td></tr>'
		);
	}
	dw ('</table>');
}
}
//---------------------------------------------------------------------------------------
// Colofon
//----------------------------------------------------------------------------------------
function showColofon()
{	dw ('<table cellspacing=1 cellpadding=2 ><tr>'
		+'<td class=lc><b>Bijdrage</b></td>'
		+'<td class=lc><b>Door</b></td>'
		+'</tr>'
		);
	for (i=1;i<Colofon.length;i++)
	{dw	('<tr><td valign=top class="lt">'
		+ unescape(Colofon[i][0])
		+'</td><td valign=top class="lt">'
		+ decode( Colofon[i][2]
				, ''
				, unescape(Colofon[i][1])
				, getLink(unescape(Colofon[i][1]),unescape(Colofon[i][2]),'http','la')
				)
		+'</td></tr>');
	}
dw('</table>');
}
//---------------------------------------------------------------------------------------
// Opdrachtgevers
//----------------------------------------------------------------------------------------
function toonOpdrachtgevers(t)
{var tel=0;
for (i=1;i<Opdrachtgevers.length;i++)
if (unescape(Opdrachtgevers[i][0])==unescape(t))
	{   if (tel==0) {dw('<ul>');}
		dw ('<li> ' + getLink(unescape(Opdrachtgevers[i][1])
						   ,unescape(Opdrachtgevers[i][2])
						   ,decode(unescape(Opdrachtgevers[i][2])
						   		  ,''
								  ,'tekst'
								  ,'http'
						   		  )
						   ,'a'
						   )
		 );tel++;
	}{dw('</ul>');}
}
//---------------------------------------------------------------------------------------
// Diashow
//----------------------------------------------------------------------------------------
function getDias(x)
{ var j=0; for (i=1;i<Foto.length;i++)
	if (unescape(Foto[i][0])==unescape(x)) {DiaTMP[j]=Foto[i];j++;}
}

function chgImg() {
ImgNum++; if (ImgNum > DiaTMP.length-1) {ImgNum = 0;}
document.Diashow.src = ImDir+ DiaTMP[ImgNum][1];
document.DS.ST.value = unescape(DiaTMP[ImgNum][2]);
}

function showbegindia(){
/* random start*/
ImgNum=Math.floor(Math.random()*(DiaTMP.length-1)+1);
document.Diashow.src = ImDir + DiaTMP[ImgNum][1];
document.DS.ST.value = unescape(DiaTMP[ImgNum][2]);
}


function auto() {
run = setInterval("chgImg()", tussentijd);
}

function dias(x)
{getDias(x); showbegindia();auto();}

//---------------------------------------------------------------------------------------
// Projecten
//---------------------------------------------------------------------------------------

function toonProjectenActueel(){
var TMP=Projecten[0]; 
	Projecten.shift();
	Projecten.sort(dateSort1d); 
	Projecten.unshift(TMP);
var tel=0;
	if (tel==0) {dw ('<table border=0 cellpadding=0 bgcolor=white cellspacing=0>'); tel++;}
	for (i=1;i<Projecten.length;i++)
		if ((Now(24)>=to_date(unescape(Projecten[i][1])))
	   	&&(to_date(unescape(Projecten[i][2]))> Now(24)))
	{	dw	(	'<tr><td onmouseover="toonProject('+i+');">'
    		+	'<a href="#">'
            +	'<img src="../SysImages/Uitroep.gif" border="0" width="16" height="16" alt="">'
    		+	unescape(Projecten[i][4])
            +	'</a></td></tr><tr><td onmouseover="wit();" height=2></td></tr>'
    		);
    }
    dw('</table>');
}

function wit(){return overlib('', WIDTH, 1, MOUSEOFF);}

function toonProject(Rid)
{
str= decode	(Projecten[Rid][6]
    		,''
            ,''
            ,'<img src="../Images/'+Projecten[Rid][6]+'" border="1" hspace=10 vspace=3><br>')
    + '<b>'
	+ unescape(Projecten[Rid][4])
    +'</b><br>'
    +unescape(Projecten[Rid][5])
    +decode(Projecten[Rid][7]
				,''
				,''
				,'<br>' 
					+ getLink('Meer info'
                    		  ,unescape(Projecten[Rid][7])
							  ,unescape(Projecten[Rid][8])
							  ,'la') 
				)
		+'<br>'
;

return overlib(str, STICKY, WIDTH, 200, HEIGHT, 500, BGCOLOR, '#DA0036', FIXX, 330, FIXY, 60,  BORDER, 1, TEXTSIZE, 2, CELLPAD, 10, MOUSEOFF);
}


function toonProjectenArchief(AP){
var TMP=Projecten[0]; 
	Projecten.shift();
	Projecten.sort(dateSort1d); 
	Projecten.unshift(TMP);
var tel=0; rijteller=0;
	if (tel==0) {dw ('<table border=0 bgcolor=white cellpadding=0 cellspacing=0>'); tel++;}
	for (i=1;i<Projecten.length;i++)
	if ((Now(24) >= to_date(unescape(Projecten[i][2])))
	  	&&(to_date(unescape(Projecten[i][3]))>= Now(24)))
	{	if (rijteller <AP) {
		dw	(	'<tr><td onmouseover="toonProject('+i+');">'
    		+	'<a href="#">'
            +	'<img src="../SysImages/Uitroep.gif" border="0" width="16" height="16" alt="">'
    		+	unescape(Projecten[i][4])
            +	'</a></td></tr><tr><td onmouseover="wit();" height=2></td></tr>'
    		);rijteller++;} else {dw ('<i>Een greep uit onze projecten:</i>'); break;}
    }
    dw('</table>');
}

function showProjData(y)
{document.F.Details.value=unescape(getProj(y,5));
 document.Img.src=decode(unescape(getProj(y,6))
 						,''
						,'../SysImages/Transparant.gif'
						,'../Images/'+unescape(getProj(y,6)));
 document.F.Link.value= decode(getProj(y,7),'','','Meer...');
 document.F.Link.id=unescape(getProj(y,7));
 document.F.Link.title=unescape(getProj(y,8));
}

function getProj (Id,Col)
{ for (t=0;t<Projecten.length;t++)
	if (Projecten[t][0]==Id) {return Projecten[t][Col];break;}
}
function showProj(x,y)
{if (y=='http') {window.open('http://'+x,'Proj');}
 else if (y=='doc') {window.open('../Doc/'+x,'Proj');}
 else {return true;}
}

function lijn(w,h)
{return '<img src="../SysImages/rood.gif" width='+w+' height='+h+'><br>';
}

//--------------------------
// email afhandeling
//--------------------------
function VFcheckAll()
{if (VFcheckAllesIngevuld()) 
	{if (checkEmail(document.VF.Email.value)) 
  		{document.VF.submit();}
   	}
}

function checkEmail(x)
{var emailadrescorrect=false; // alert (x);
if (x=='') {emailadrescorrect=true;}
else {if (	(x.indexOf('@')>0)	//@ moet voorkomen en niet vooraan
    		&&(x.lastIndexOf('.')>2) // . moet voorkomen
            &&(x.indexOf('@')+1 <x.lastIndexOf('.')) // laatste . na @
            &&(x.lastIndexOf('.')<x.length-2)) // na laatste . nog 2 chars
			{emailadrescorrect=true;} else {alert('format van emailadres: naam@abc.xxx');}}
return emailadrescorrect;
}

function VFcheckAllesIngevuld()
{ var allesingevuld = true;
for (i=0;i<document.VF.elements.length;i++)
{if ((document.VF.elements[i].id.substr(0,2)=='V_')&&(document.VF.elements[i].value==''))
	{ alert (document.VF.elements[i].name + ' is niet ingevuld.'); allesingevuld=false; break;}
}
return allesingevuld;
} 

