d = document;
var Banner1=0;
var strTemp="";
var defstrTemp="";
var iMinim=1;

function blaatje()
{	blaat = window.open('wijziglinks.html','Wijziglinks','WIDTH=775,HEIGHT=350,SCROLLBARS=yes,RESIZABLE=NO');
}

function persLinks()
{	
	SchrijfKop('Persoonlijke links','donkergeel','40');
	if (q[40]!="Y") 
	{	var tel = 0;
		if(GetCookie("links1") != null)
    		{	UrlGegevens = GetCookie('links1').split("¶¶");
       			for (tel=0; tel < UrlGegevens.length; tel++)
       			{	if ((tel == 5) || (tel ==10))
       				{		SchrijfVoet("donkergeel");
       						SchrijfKop('Persoonlijke links','donkergeel','40');
       				}       		
       				pr = UrlGegevens[tel].split("  ");
				if (pr[0].substring(0,4)=="http")
				{	document.write('<A HREF="', pr[0], '" TARGET="blank">', pr[1], '</A><BR>');		
				}
				else 
				{	document.write('<A HREF="http://', pr[0], '" TARGET="blank">', pr[1], '</A><BR>');
				}
			}
		}
		if ((tel%5==0) && (tel > 0))
		{	SchrijfVoet("donkergeel");
       			SchrijfKop('Persoonlijke links','donkergeel','40');
		}		
		document.write('<A HREF="javascript: blaatje();">Wijzig persoonlijke links</A><BR>');
		while (tel%4!= Math.floor((tel)/4)-1) 
		{	document.write("<BR>");
			tel++;
		}
		SchrijfVoet("donkergeel");
	}
}


function Reclame(welke)
{	Tijd = Math.round(Math.random() * 99999999);
	Banner1=Tijd;
	
	if(welke==2)
	{	document.write('<TABLE WIDTH=180 HEIGHT=113 CELLSPACING=0 CELLPADDING=0><TR><TD VALIGN=middle><A HREF="http://sales.algemeen.nl/click.asp?banner=2&date=' +Tijd+ '" TARGET="_top"><IMG SRC="http://sales.algemeen.nl/banner.asp?banner=2&size=180x60&site=' + site + '&soort=' + soort + '&date=' +Tijd+'&Plaats=klein2" WIDTH=180 HEIGHT=60 BORDER=0></A></TD></TR></TABLE>');
	}
	else
	{	document.write('<TABLE WIDTH=180 HEIGHT=94 CELLSPACING=0 CELLPADDING=0><TR><TD VALIGN=MIDDLE><A HREF="http://sales.algemeen.nl/click.asp?banner=1&date=' +Tijd+'" TARGET="_top"><IMG SRC="http://sales.algemeen.nl/banner.asp?banner=1&size=180x60&site=' + site + '&soort=' + soort + '&date=' +Tijd+'&Plaats=klein1" WIDTH=180 HEIGHT=60 NAME=ban2 BORDER=0></A></TD></TR></TABLE>');
	}			
}

function GetCookie(name)
{	arg=name+"=";
 	alen=arg.length;
 	clen=d.cookie.length;
 	count=0;
 	while(count<clen)
 	{	j=count+alen;
    		if(d.cookie.substring(count,j)==arg)
    		{	endstr=d.cookie.indexOf(";",j);
			if(endstr==-1)
		 	{	endstr=d.cookie.length;
		 	}
			return unescape(d.cookie.substring(j,endstr));
    		}
    		count=d.cookie.indexOf(" ", count)+1;
    		if(count==0)break;
  	}
	return null;
}

function setCookie(name,value)
{	if(value !=null && value !="")
	{	d.cookie=name+"="+escape(value)+"; expires=Mon, 03-Jan-2005 00:00:00 GMT";
	}
}



function wijzig(nummer,waarde)
{	if(navigator.appName!="Microsoft Internet Explorer"||parseInt(navigator.appVersion) >= 4)
	{	q[nummer]=waarde;
		r=q.join(";");
		if(waarde=="Y")
		{	window.alert("Dit window wordt gesloten en naar het onderste gedeelte van de pagina verplaatst !");
		}
		setCookie('tabellen',r);
		top.location="index.html"
	}
	else 
	{	window.alert("Het sluiten van vensters is niet mogelijk met de versie van uw browser (3.0)");
	}
}

function ZoekMachine(color)
{	if ((color=="") || (color=="default"))
	{	color = kleur;
	}
	SchrijfKop('Zoekmachines', color,-1);
	document.write('<TABLE BORDER=0 WIDTH=100% HEIGHT=130><TR><TD>');
	document.write('<BR><FORM NAME="zoeken" ACTION="javascript:doSearch();void(0)//" method="GET">');
	document.write('&nbsp;<SELECT NAME="zoekmachine">');
	document.write('<option selected value="http://www.nl.lycos.de/cgi-bin/pursuit?adv=0&query=">lycos (nl)</option>');
	document.write('<option value="http://altavista.com/cgi-bin/query?pg=q&what=web&fmt=&q=">altavista</option>');
	document.write('<option value="http://beast.track.nl/Sancho?summary=1&alt-nr=-1&alt-urls=1&chunk-size=10&query=">track (nl)</option>');
	document.write('<option value="http://www.scoot.nl/start.asp?ce=">scoot bedrijvengids (nl)</option>');
	document.write('<option value="http://www.ilse.nl/?COMMAND=search_for&LANGUAGE=NL&PROFILE=st&FAMILY=no&SEARCH_FOR=">ilse (nl)</option>');
	document.write('<option value="http://www.webwereld.nl/cgi-bin/zoek/nph-go.cgi?resume=on&aantal=on&newwindow=YES&maxshow=20&in=">vindex (nl)</option>');
	document.write('<option value="http://www.metacrawler.com/cgi-bin/nph-metaquery.p?general=">metacrawler</option>');
	document.write('<option value="http://www.askjeeves.com/main/askJeeves.asp?origin=&qSource=0&ask=">ask jeeves</option>');
	document.write('<option value="http://search.yahoo.com/bin/search?p=">yahoo</option>');
	document.write('</SELECT><BR>');
	document.write('&nbsp;<input name="query" VALUE="" size=15><BR>');
	document.write('&nbsp;<INPUT TYPE="button" VALUE="Zoek" onClick="doSearch()"></FORM>');
	document.write('</TD></TR></TABLE>');
	SchrijfVoet(color);

}


function SchrijfKop(titel,color,nummer)
{  	if ((color=="") || (color=="default"))
	{	color = kleur;
	}
	
	switch(color)
	{	case 'lichtblauw':	color2="#0000CC";
					color3="#CCCCFF";
					barfontcolor="#FFFFFF";
					break;
		
		case 'donkergeel':	color2="#CCCC00";
					color3="#FFFFCC";
					barfontcolor="#000000";
					break;
					
		case 'lichtgeel':	color2="#00CCCC";
					color3="#CCFFFF";
					barfontcolor="#000000";
					break;
		
		case 'lichtpaars':	color2="#00CC00";
					color3="#CCFFCC";
					barfontcolor="#000000";
					break;	


		case 'lichtgroen':	color2="#CC00CC";
					color3="#FFCCFF";
					barfontcolor="#FFFFFF";
					break;
							
		case 'lichtbruin':	color2="#A06020";
					color3="#E1B464";
					barfontcolor="#FFFFFF";
					break;

		case 'lichtrood':	color2="#CC0000";
					color3="#FFCCCC";
					barfontcolor="#FFFFFF";
					break;					
					
		default:	color2="#CC0000";
				color3="#FFCCCC";
				barfontcolor="#FFFFFF";
				break;
	}
	

	
	if ((q[nummer]=="Y") && (nummer!=-1))
	{	strTemp = strTemp + '<table width=100% border=0 cellspacing=0 cellpadding=0><tr>';
		strTemp = strTemp + '<tr><td bgcolor='+color2+' height=2 valign=top colspan=3><IMG SRC="http://www.jijook.nl/images/bottitle.jpg" height=2 width=180></td></tr>';
		strTemp = strTemp + '<tr><td width=5 bgcolor='+color2+'>&nbsp;</td><td bgcolor=' + color2 + ' height=26 width=157 valign=MIDDLE><FONT face=' + letter + ' SIZE=-1 COLOR=' + barfontcolor + '><B>' + titel + '</B></FONT></TD><td bgcolor=' + color2 + ' height="26" width=18 valign=MIDDLE ALIGN=RIGHT><a href=javascript:wijzig(' + nummer + '+"")><IMG SRC="gif/max.gif" border="0" ALT="Maximaliseren"  width=21 height=18></A></td>';
		strTemp = strTemp + '<tr><td bgcolor='+color2+' height=2 valign=top colspan=3><IMG SRC="http://www.jijook.nl/images/bottitle.jpg" height=2></td></tr>';
		strTemp = strTemp + '</table>';
		if (iMinim%3==0)
		{	strTemp = strTemp + '<BR>';
		}
		else
		{	strTemp = strTemp + '<IMG SRC="gif/leeg.gif" HEIGHT=10>';
		}		
	}
	else
	{	document.write('<table width=100% border=0 cellspacing=0 cellpadding=0><tr>');
		document.write('<tr><td bgcolor=',color2,' height=2 valign=top colspan=3><IMG SRC="http://www.jijook.nl/images/bottitle.jpg" height=2 width=180></td></tr>');
		if (nummer!=-1)
		{	document.write('<tr><td width=5 bgcolor=',color2,'>&nbsp;</td><td bgcolor=',color2,' height="26" width=157 valign=MIDDLE><FONT face=' + letter + ' SIZE=-1 COLOR=' + barfontcolor + '><B>',titel, '</B></FONT></TD><td bgcolor=',color2,' height="26" width=18 valign=MIDDLE ALIGN=RIGHT><a href=javascript:wijzig(' + nummer + ',"Y")><IMG SRC="gif/min.gif" border="0" ALT="Minimaliseren" width=21 height=18></A></td></tr>');
		}
		else
		{	document.write('<tr><td width=5 bgcolor=',color2,'>&nbsp;</td><td bgcolor=',color2,' height="26" width=157 valign=MIDDLE><FONT face=' + letter + ' SIZE=-1 COLOR=' + barfontcolor + '><B>',titel, '</B></FONT></TD><td bgcolor=',color2,' height="26" width=18 valign=MIDDLE ALIGN=RIGHT>&nbsp;</td></tr>');
		}			
		document.write('<tr><td bgcolor=',color2,' height=2 valign=top colspan=3><IMG SRC="http://www.jijook.nl/images/bottitle.jpg" height=2></td></tr>');
		document.write('<tr><td width=5 bgcolor=',color3,'>&nbsp;</td><td width="' + (kolombreedte-5) + '" bgcolor=',color3,' colspan=2>');
		document.write('<FONT face=' + letter + ' SIZE=2>');
	}					
}



function SchrijfVoet(color)
{  	if ((color=="") || (color=="default"))
	{	color = kleur;
	}
	document.write('</td></tr><tr><td bgcolor=',color3,' height=2 valign=top colspan=3><IMG SRC="http://www.jijook.nl/images/bottitle.jpg" height=2 width=180></FONT></td>');
	document.write('</tr></table>');
	document.write('<BR>');			
}




function Schrijven()
{ 	document.write('<center>');
	document.write('<table width=',breedte,' border="0" cellspacing="0" cellpadding="0" topmargin="0" bgcolor=#FFFFFF><tr>');0
	document.write('<td width=765 valign="top" colspan="7" bgcolor=#FFFFFF><BR></TD></TR>');
	document.write('<tr><td width="',kolombreedte,'" valign="top" bgcolor=#FFFFFF>');


	for (i=0; i < lijst.length; i++)
	{	record=lijst[i].split("¶");
	
		switch(record[0])
		{
		case 'Kolom':	if (strTemp != defstrTemp)
				{	document.write(strTemp);
				}
				strTemp = "";
				iMinim = 1;
				document.write('</TD><TD width=15>&nbsp;</TD>');
    				document.write('<td width="',kolombreedte,'" valign="top">');
				break;
		
		case 'Kop':	SchrijfKop(record[1],record[2],record[3]);
				if (q[record[3]]=="Y") 
				{	iMinim++;
					while (record[0] != 'Voet') 
					{	i++;
						record=lijst[i].split("¶");						
					}		
				}				
				break;
		
		case 'Voet':	SchrijfVoet(record[1]);
				break;
				
		case 'Pers':	persLinks();
				break;
		
		case 'Zoek':	ZoekMachine(record[1]);
				break;
				
		case 'Meer':	document.write('<B>Meer <A HREF="', record[1], '">', record[2], '</B></A>');
				if (record[3] !="")
				{	document.write(', <B><A HREF="', record[3], '"><B>', record[4], '</B></A><BR>');
				}
				else
				{	document.write('<BR>');
				}
				break;
		
		case 'Reclame1':Reclame(1);
				document.write('<BR><BR>');
				break;
		
		case 'Reclame2':Reclame(2);
				document.write('<BR>');
				break;
		
		
		default: 	document.write('<A HREF="http://', record[0], '" TARGET="_blank">', record[1], '</A><BR>');		
				break;
		}
	}	
	document.write(strTemp);
	document.write('</td></tr></table>');
	document.write('<script LANGUAGE="JAVASCRIPT" src="inc/footer.js"></script>');	
}


q=new Array(120);
if(GetCookie("tabellen")!= null)
{	r=unescape(GetCookie("tabellen"));
}
else 
{	r="";
}

if(navigator.appName!="Microsoft Internet Explorer"||parseInt(navigator.appVersion) >= 4)
{	q=r.split(";");
}

Schrijven();

