document.write ("<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN'  ><META HTTP-EQUIV='Expires' CONTENT='0'>");
document.write ("<style type=text/css>body {MARGIN:0px;}</style>");


function createCookie(name,value)
{
	days=365;
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name)
{
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name)
{
	createCookie(name,"",-1);
}

//auto suggest
var positiey=50;
var y1 = 0;
(document.getElementById) ? dom = true : dom = false;

function placeIt()
 {
  if (dom && !document.all) {document.getElementById("pdknollayer1").style.top = window.pageYOffset + (window.innerHeight - (window.innerHeight-y1)) + "px"; document.getElementById("pdknollayer1").style.width =document.documentElement.clientWidth + "px";}
  if (document.all) {document.all["pdknollayer1"].style.top = document.documentElement.scrollTop + (document.documentElement.clientHeight - (document.documentElement.clientHeight-y1)) + "px"; document.all["pdknollayer1"].style.width = document.documentElement.clientWidth + "px";}
  positie=document.documentElement.scrollTop + (document.documentElement.clientHeight - (document.documentElement.clientHeight-y1));
  //document.f.q.value=document.documentElement.clientWidth;
  window.setTimeout("placeIt()", 10);
 }

function fkeus(form)
{
	  //alert(form.q.value);
    bewaarCookie=form.q.value;
    bewaarCookie=bewaarCookie.replace(/;/gi,"%3B"); //vervang ; door %3B anders wordt het niet goed bewaar en gelezen
    createCookie('qzoek', bewaarCookie); // set cookie "name"
    leesCookie = readCookie('qzoek'); // get cookie 'name'
    leesCookie=leesCookie.replace(/%3B/gi,";");
    //alert(leesCookie);
    
for (var i=0; i < document.f.zoekcatogorie.length; i++)
   {
   if (document.f.zoekcatogorie[i].checked)
      {
      pdknolkeus = document.f.zoekcatogorie[i].value;
      //alert("The radio button you chose has the value: " + pdknolkeus);
      }
   }

    
    //pdknolkeus=form.zoekcatogorie.radioObj;
    //alert(pdknolkeus);
    if(pdknolkeus=='google') window.open('zoeken.html','_self')
//		if(pdknolkeus=='encyclopedie') window.open('http://nl.wikipedia.org/wiki/Speciaal:Search?search='+form.q.value,'main')
		if(pdknolkeus=='encyclopedie') window.open('encyclopedie.html','_self')
		if(pdknolkeus=='nieuwsgroep') window.open('http://www.yabsearch.nl/search/?query='+form.q.value+'&perpage=250','main')
		if(pdknolkeus=='afbeelding') window.open('afbeelding.html','_self')
//		if(pdknolkeus=='afbeelding') window.open('http://images.google.nl/images?hl=nl&source=hp&q='+form.q.value+'&btnG=Afbeeldingen+zoeken&gbv=2&aq=f&aqi=&aql=&oq=&gs_rfai=&newwindow=1','main')
		if(pdknolkeus=='teletekst') window.open('http://www.pdknol.net/zoekteletekst.php?q='+form.q.value,'main')
//		if(pdknolkeus=='goedkoopst') window.open('http://clk.tradedoubler.com/click?p=21453&a=1111198&g=875062&pool=102834&cpool=102834&url=http://nl.kelkoo.com/ctl/do/search?siteSearchQuery='+form.q.value,'main')
		if(pdknolkeus=='goedkoopst') window.open('goedkoopst.html','_self')
		if(pdknolkeus=='vertaal') window.open('http://translate.google.com/translate?hl=nl&sl=auto&tl=nl&u='+form.q.value,'main','location=no,toolbar=yes,status=yes,scrollbars=yes,resizable=yes')
		if(pdknolkeus=='muziekofvideo') window.open('muziekenvideo.html','_self')
//		if(pdknolkeus=='muziekofvideo') window.open('http://www.youtube.com/results?search_query='+form.q.value+'&search_type=&aq=f','main')
    return(false);
}

document.write ("<a name='beginpagina'></a>");
document.write ("<body>");
document.write ("<center>");
document.write ("<div id='pdknollayer1' style='z-index:1; position:absolute; left:0px; top:100px; width:10px; height:110; visibility:visible'>");

window.google={ml:function(){},kHL:"nl",time:function(){return(new Date).getTime()},lc:[],li:0,j:{en:1,l:function(){},e:function(){},b:location.hash&&location.hash!="#",pl:[],mc:0,sc:0.5},Toolbelt:{}};(function(){for(var d=0,c;c=["ad","bc","p","pa","zd","ac","pc","pah","ph","sa","xx","zc","zz"][d++];)(function(a){google.j[a]=function(){google.j.pl.push([a,arguments])}})(c)})();
window.google.sn="webhp";window.google.timers={load:{t:{start:(new Date).getTime()}}};try{window.google.pt=window.external&&window.external.pageT;}catch(u){}window.google.jsrt_kill=1;

document.write ("<table BORDER=1 WIDTH=980 BGCOLOR='#0099ff'>");
document.write ("<tr>");
document.write ("<td>");
document.write ("<center>");
document.write ("<a href='#beginpagina'><img src='http://www.pdknol.net/home1.jpg' HEIGHT=30></a>");
document.write ("</center>");
document.write ("</td>");

document.write ("<td>");
document.write ("<center>");
document.write ("<form action='pagina2.html' name=f target=_self ONSUBMIT='return fkeus(f)'>");
//alert (window.location);
//locatieurl=window.location.href;
//keuscheck=window.location.href.match("afbeelding");
//keuscheck=window.location.href.match("muziekenvideo");
//alert (keuscheck);
document.write ("<font FACE='Arial, Helvetica, Geneva' size=2 color=blue><b>Zoek in: </b></font>");
document.write ("<font FACE='Arial, Helvetica, Geneva' size=2 color=white>");

document.write ("<INPUT TYPE=RADIO NAME=zoekcatogorie VALUE=google CHECKED>Google");
if (window.location.href.match("afbeelding")=='afbeelding') {document.write ("<INPUT TYPE=RADIO NAME=zoekcatogorie VALUE=afbeelding CHECKED>Afbeelding");}
else 
   {document.write ("<INPUT TYPE=RADIO NAME=zoekcatogorie VALUE=afbeelding>Afbeelding");}
if (window.location.href.match("muziekenvideo")=='muziekenvideo') {document.write ("<INPUT TYPE=RADIO NAME=zoekcatogorie VALUE=muziekofvideo CHECKED>Muziek en video");}
else
	{document.write ("<INPUT TYPE=RADIO NAME=zoekcatogorie VALUE=muziekofvideo>Muziek en video");}
if (window.location.href.match("encyclopedie")=='encyclopedie') {document.write ("<INPUT TYPE=RADIO NAME=zoekcatogorie VALUE=encyclopedie CHECKED>Encyclopedie");}
else
	{document.write ("<INPUT TYPE=RADIO NAME=zoekcatogorie VALUE=encyclopedie>Encyclopedie");}
if (window.location.href.match("goedkoopst")=='goedkoopst') {document.write ("<INPUT TYPE=RADIO NAME=zoekcatogorie VALUE=goedkoopst CHECKED>Goedkoopste prijs");}
else
	{document.write ("<INPUT TYPE=RADIO NAME=zoekcatogorie VALUE=goedkoopst>Goedkoopste prijs");}
document.write ("<INPUT TYPE=RADIO NAME=zoekcatogorie VALUE=vertaal>Site vertalen");
document.write ("<INPUT TYPE=RADIO NAME=zoekcatogorie VALUE=nieuwsgroep>Nieuwsgroep");
document.write ("<INPUT TYPE=RADIO NAME=zoekcatogorie VALUE=teletekst>Teletekst");
document.write ("<br>");
document.write ("<input name=hl type=hidden value=nl>");
document.write ("<input name=source type=hidden value=hp>");
document.write ("<font FACE='Arial, Helvetica, Geneva' size=2 color=white><b>Typ onderwerp:</b></font>&nbsp;");
document.write ("<input autocomplete='off' maxlength=2048 name=q size=100 value='' style='background:#ffffcc;' >");
document.write ("&nbsp;<input name=btnG type=submit value='Zoeken'  style='border-width: 1px; background:#99ccff;'>");


document.write ("<font color=black>");

document.write ("<br clear='all' /> <!-- forces form closed -->");
document.write ("</form>");
document.write ("</center>");
document.write ("</td>");

document.write ("<td>");
document.write ("<center>");
document.write ("<a href='#beginpagina'><img src='http://www.pdknol.net/home1.jpg' HEIGHT=30></a>");
document.write ("</center>");
document.write ("</td>");

document.write ("</tr>");
document.write ("</table>");
document.write ("</div>");
document.write ("</center>");
document.write ("</body>");

    leesCookie = readCookie('qzoek'); // get cookie 'name'
    leesCookie=leesCookie.replace(/%3B/gi,";");
    document.f.q.value=leesCookie;
    //alert(leesCookie);
    //document.f.q.value="wie";
