function OpenPics(id, iwidth, iheight, salt){
//	window.open ('/image.asp?id='+ id +'&alt='+ salt, 'pics', 'height='+iheight+', width='+ iwidth +', left=125,top=100')
	newWindow = window.open("","newWindow","width="+iwidth+",height="+iheight+",left=125,top=100");
	newWindow.document.open();
	newWindow.document.write('<html><title>'+salt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">'); 
	newWindow.document.write('<img src="/image.asp?id='+id+'" alt="'+salt+'">');
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}

// ZOEKEN GEDEELTE

function FillBox()
{
	document.zoek_eenvoudig_2.zoek1.value = document.zoek_eenvoudig_1.zoek.value
}

function Mail_Validator(theForm)
{
  if (theForm.value == "")
  {
    alert("U moet een naam invullen.");
    theForm.focus();
    return (false);
  }

  if (theForm.value != "") 
     {if (theForm.value.length < 2)
       {
        alert("U moet minstens 2 tekens in het \"naam\" veld invullen.");
        theForm.focus();
        return (false);
        }}
  return (true);
}

function zoek_mail(theForm)
{
 if (Mail_Validator(theForm))
 {
	var naam = theForm.value
	location.href="http://um0023.unimaas.nl/telefoongids/EMail/UMofAZM.asp?invnaam=" + naam;
	//location.href="http://dotnet.unimaas.nl/ldapexchange/webform1.aspx?txtsurname=" + naam;
 }
}


zm= new Array('ilse','vindex','track','in alle zoekmachines','ask jeeves',
'altavista (engels)','yahoo (engels)','hotbot','scoot vindservice','teletekst (paginanr)','plaatjes (altavista)',
'nieuwsgroep (google)','google','astalavista','excite','northernlight','alltheweb','startpagina dochters',
'vinden.nl','dogpile','altavista','encyclopedie britannica','persberichten','lycos','zoek','metacrawler')
zmu= new Array(
"co.ilse.nl/?url=http://www.ilse.nl/searchresults.dbl?search_for=",
"www.webwereld.nl/cgi-bin/zoek/nph-go.cgi?resume=on&aantal=on&newwindow=YES&maxshow=20&in=",
"sitestat2.nedstat.nl/cgi-bin/track/clickin.pl?name=qr.startpagina&url=http://zoeken.track.nl/Raven?sm=1&st=1&pl=10&qr=",
"ixquick.com/do/metasearch.pl?&rl=STARTPAGINA&dyn=1&cat=web&language=english&query=",
"www.askjeeves.com/main/askJeeves.asp?origin=&qSource=0&ask=",
"altavista.com/cgi-bin/query?pg=q&what=web&fmt=&q=",
"search.yahoo.com/bin/search?p=",
"hotbot.lycos.com/?SM=MC&DV=0&LG=any&DC=10&DE=2&BT=H&MT=",
"www.scoot.nl/scootnl/scootnl/nl-NL/enter_searchselect?type=keyword&partnerId=startpagina.nl&what=",
"teletekst.nos.nl/cgi-bin/tt/nos/page/t/o/m/i/s3/h372/",
"nl.altavista.com/image/results?pg=q&stype=simage&imgset=2&q=",
"groups.google.com/groups?hl=en&lr=&safe=off&site=groups&q=",
"www.google.com/search?q=",
"astalavista3.box.sk/cgi-bin/robot/robot/?project=robot&gfx=robot&srch=",
"search.excite.com/search.gw?search=",
"www.northernlight.com/nlquery.fcg?cb=0&orl=&search.x=41&search.y=12&qr=",
"www.alltheweb.com/search?cat=web&lang=any&query=",
"spsearch.ilse.nl/?in=",
"zoek.vinden.nl/?where=web&refer=startpagina&query=",
"www.dogpile.com/texis/search?geo=no&fs=web&q=",
"nl.altavista.com/cgi-bin/query?pg=q&what=web&fmt=&q=",
"search.britannica.com/search?query=",
"www.nieuwsbank.nl/zoek?index=%5Cindex%2Fpb%2Fpb&trefwoord=",
"www.lycos.nl/cgi-bin/pursuit?matchmode=and&mtemp=main.sites&cat=lycos&query=",
"www.zoek.nl/cgi-bin/zoek/texis/sunlun3?www=www&x=28&y=16&query=",
"search.metacrawler.com/texis/search?brand=metacrawler&q=")
zmdv=new Array(0,17,5,18,2,1,3,12,6,8,10)
zmv=new Array();zmv=zmdv;zmv.length=10
d=document;
tel=0;
wi=0;
y='toolbar=yes,location=yes,resizable=yes,status=yes,scrollbars=yes,menubar=yes,width='
zoek2=0;

function doSearch()
{
//	zoek2=1;
	wo=d.searchforit.query.value
	searchitems=""
	for(t=1;t<=wo.length;t++)
	{
		if(wo.substring(t-1,t)==" ")searchitems+="+"
		
		else {
			if(wo.substring(t-1,t)=="+")searchitems+="%2B";
			else searchitems+=wo.substring(t-1,t)
		}
	}
	
	index=d.searchforit.service.selectedIndex
	site=d.searchforit.service.options[index].value
	site+=searchitems
	
	if(searchitems==""||searchitems==null)
	{
		alert("\nOm iets te kunnen vinden dient u minimaal een keyword in te typen ...")
		d.searchforit.query.focus()
	}
	else {
		WinOpen(telt(),site,d.searchforit.service.options[index].text,d.searchforit.service.options[index].text)
	}
}
function telt()
{
	tel++;
	return tel
}
function WinOpen(target,naam,stat,comm)
{
	target=window.open("",target,y+"600,height=480")
	target.location=site;
}

function Validate(fm)
{
  var err = "";

  if (fm.alle.value == "") {
  	if (fm.eenof.value == "") { 
		err += "- al deze woorden.\n";
		err += "- een of meer van deze woorden.\n";
	}
  }

  if (err != "") { 
    window.alert("U moet een van de volgende velden invullen \n \n" + err); 
    return false;


  }
  return true;
}

function checksearchnl(fm){
	if (fm.alle.value == '') 
	{
		alert('Vul minimaal één trefwoord in.');
		return false;
	}
	else return true;
}

function checksearchen(fm){
	//if (fm.alle.value == '') 
	//{
	//	alert('Please fill in at least one keyword.');
		return false;
	//}
	//else return true;
}