
	// default search-engine 
	var sbutton1 = "AltaVista"
	var sbutton2 = "AdValvas"
	var sbutton3 = "Britannica"
	var sbutton4 = "ABCnews"
	var sbutton5 = "VanDale"
	var sbutton6 = "WeatherChannel"

	function fetch(type)
	{
		var tmp  = "";

		if      (type == 1 )
		{
			tmp     = document.zoekformulier1.Search.value;
			sbutton = sbutton1;
		}
		else if (type == 2 )
		{
			tmp     = document.zoekformulier2.Search.value;
			sbutton = sbutton2;
		}

		else if (type == 3 )
		{
			tmp     = document.zoekformulier3.Search.value;
			sbutton = sbutton3;
		}
		else if (type == 4 )
		{
			tmp     = document.zoekformulier4.Search.value;
			sbutton = sbutton4;
		}
		else if (type == 5 )
		{
			tmp     = document.zoekformulier5.Search.value;
			sbutton = sbutton5;
		}
		else if (type == 6 )
		{
			tmp     = document.zoekformulier6.Search.value;
			sbutton = sbutton6;
		}
		

		search(tmp, sbutton);
	}


	function getbutton(type, tsbutton) 
	{
		if      (type == 1)
			sbutton1 = tsbutton;
		else if (type == 2)
			sbutton2 = tsbutton;
		else if (type == 3)
			sbutton3 = tsbutton;
		else if (type == 4)
			sbutton4 = tsbutton;
		else if (type == 5)
			sbutton5 = tsbutton;
		else if (type == 6)
			sbutton6 = tsbutton;
 	}


	function getUrl(tsbutton)
	{
		var tmpUrl = "http://";

	    	if (tsbutton == 'AltaVista') 
			tmpUrl += "www.altavista.digital.com/cgi-bin/query?pg=q&what=web&fmt=.&q=";
		else if (tsbutton == 'AdValvas') 
			tmpUrl += "yellow.advalvas.be/scripts/YellowSearch.dll?SearchKeyWord?WORD=";
		else if (tsbutton == 'Ilse')
			tmpUrl += "www.ilse.be/?qs=";
		else if (tsbutton == 'WebWatch') 
			tmpUrl += "www.webwatch.be/webwatch.dlp?findindb=";
		else if (tsbutton == 'Yahoo') 
			tmpUrl += "search.yahoo.com/bin/search?p=";
		else if (tsbutton == 'Euroseek') 
			tmpUrl += "www.euroseek.com/query?ilang=nl&width=468&height=60&lang=world&domain=world&query=";
		else if (tsbutton == 'MetaCrawler') 
			tmpUrl += "search.metacrawler.com/crawler?general=";
		else if (tsbutton == 'AskJeeves') 
			tmpUrl += "www.askjeeves.com/main/askjeeves.asp?ask=";
		else if (tsbutton == 'Excite') 
			tmpUrl += "www.excite.com/search.gw?collection=web&display=html2,lb&search=";
		else if (tsbutton == 'HotBot')
			tmpUrl += "hotbot.lycos.com/?MT=";
		else if (tsbutton == 'NLsearch') 
			tmpUrl += "www.northernlight.com/nlquery.fcg?cb=0&qr=";
		else if (tsbutton == 'Go') 
			tmpUrl += "www.goto.com/d/search/p/go/?Partner=go_home&Keywords=";
		else if (tsbutton == 'Lycos') 
			tmpUrl += "www.be.lycos.de/cgi-bin/pursuit?matchmode=and&mtemp=main.sites-nl&etemp=error-nl&query=";
		else if (tsbutton == 'Google') 
			tmpUrl += "www.google.com/search?q=";
		else if (tsbutton == 'ABCnews') 
			tmpUrl += "search.abcnews.go.com/query.html?qm=0&ct=0&rq=1&qt=";
		else if (tsbutton == 'Ixquick') 
			tmpUrl += "ixquick.com/do/metasearch.pl?cat=web&cmd=process_search&language=nederlands&query=";
		else if (tsbutton == 'C4') 
			tmpUrl += "www.c4.com/cgi-bin/c4-search.cgi?SO=FASTER&Partner=&ReturnTo=0&IPageFlag=1&SearchText=";
		else if (tsbutton == 'Britannica') 
			tmpUrl += "www.britannica.com/search?query=";
		else if (tsbutton == 'Columbia') 
			tmpUrl += "www.bartleby.com/cgi-bin/texis/webinator/sitesearch?FILTER=col65&query=";
		else if (tsbutton == 'Encyclopedia') 
			tmpUrl += "www.encyclopedia.com/cgi-bin/search.cgi?search=";
		else if (tsbutton == 'Infoplease') 
			tmpUrl += "www.infoplease.com/search.php3?query=";
		else if (tsbutton == 'Encarta') 
			tmpUrl += "encarta.msn.co.uk/find/search.asp?search=";
		else if (tsbutton == 'StudyWeb') 
			tmpUrl += "www.studyweb.com/search/search.cgi?scope=Main+Index&words=";
		else if (tsbutton == 'xrefer') 
			tmpUrl += "www.xrefer.com/results.jsp?shelf=search+all&term=";
		else if (tsbutton == 'BBCnews') 
			tmpUrl += "newssearch.bbc.co.uk/cgi-bin/KSEnglish.exe?method=mainQuery&ATNMYFIELD_Headline=&db0=English&xoptions=sortboth&numresults=1000&BATCHHITS=25&querythreshold=50&query=";
		else if (tsbutton == 'Boston') 
			tmpUrl += "search.boston.com/globe.vts?Action=FilterSearch&Filter=/searchforms/templates/filter_globe_request.hts&ResultTemplate=/searchforms/templates/view_globe_results.hts&ViewTemplate=/searchforms/templates/view_globe_results.hts&queryMode=Simple&SortField[1]=wire_header&SearchPage=/globe/search&ResultMaxDocs=1000&ResultCount=1000&collection[1]=globehtmlyesterday&QueryText=";
		else if (tsbutton == 'CNN') 
			tmpUrl += "cnn.looksmart.com/r_search?l&izch&pin=010715x49ff406c6382f817ad1&qc=&col=cnni&qm=0&st=1&nh=10&rf=1&venue=all&keyword=&qp=&search=0&key=";
		else if (tsbutton == 'Ananova') 
			tmpUrl += "www.ananova.com/search/index.html?MD=search.run&SAVEDB=ananova&THRESHOLD=60&nav_src=LeftColSearchUsed&ORGANISE_CODEDR:date&DAYSMINUS=30&QUERY00=";
		else if (tsbutton == 'USnews') 
			tmpUrl += "www.usnews.com/utils/search?collection=site&keywords=";
		else if (tsbutton == 'Washington') 
			tmpUrl += "washingtonpost.com/cgi-bin/search99.pl?searchsection=news&searchdatabase=news&searchtext=";
		else if (tsbutton == 'EncartaDic') 
			tmpUrl += "dictionary.msn.co.uk/find/entry.asp?submit2=Go&search=";
		else if (tsbutton == 'Your') 
			tmpUrl += "www.yourdictionary.com/cgi-bin/mw.cgi?dlookup=";
		else if (tsbutton == 'Wordsmyth') 
			tmpUrl += "www.wordsmyth.net/cgi-bin/search.cgi?matchtype=exact&matchent=";
		else if (tsbutton == 'OneLook') 
			tmpUrl += "afen.onelook.com/cgi-bin/cgiwrap/bware/afen.cgi?type=word_en&word=";
		else if (tsbutton == 'VanDale') 
			tmpUrl += "www.vandale.be/cgi-bin/gx.cgi/AppLogic+FTContentServer?pagename=VanDale/ZoekResultaat&zoekwoord=";
		else if (tsbutton == 'WeatherChannel')
			tmpUrl += "www.weather.com/cgi-bin/uncgi/zip_city_search.cgi?destination=";
		else if (tsbutton == 'WeatherUnderground')
			tmpUrl += "www.wunderground.com/cgi-bin/findweather/getForecast?query=";
		else if (tsbutton == 'WorldClimate')
			tmpUrl += "www.worldclimate.com/cgi-bin/place.pl?pla=";

		return tmpUrl;
	}

	function search(tmp, sbutton)
	{
		
		var sURL = "";
		var stmp = "";

		for (i=0 ; i <= tmp.length ; i++) 
		{
			if (tmp.charAt(i) == " ")
				stmp += "+";
			else if (tmp.charAt(i) == "+")
				stmp += "%2B";
			else if (tmp.charAt(i) == '"')
				stmp += "%22";
			else if (tmp.charAt(i) == ':')
				stmp += "%3A";
			else 	stmp += tmp.charAt(i);
		}

		sURL = getUrl(sbutton) + stmp;

		if (sbutton == "WebWatch")
		       sURL += "&MaxRows=10&StartRow=1&MAINCAT=&collection=allww_uk";
		else if (sbutton == "Lycos")
			sURL += "&cat=benelux";
		else if (sbutton == "NetGuide")
			sURL += "&searchwhat=ng";
		else if (sbutton == "NLsearch")
			sURL += "&orl=";
		else if (sbutton == "HotBot")
			sURL += "&SM=MC&DV=0&LG=any&DC=10&DE=2&AM1=MC&x=22&y=7";
		else if (sbutton == 'MetaCrawler') 
			sURL += "&method=0&cat=Web&target=metaworld&redirect=&rpp=20&hpe=10&region=0&timeout=0&sort=0&theme=classic&refer=mc-search&ext_STRING=&ext_TLD=.com&ext_code=P13C214S10N0B2A3D0V1&cid=194394&area=mc.mainpage.banner2&site=mc&shape=banner";
		else if (sbutton == 'C4') 
			sURL += "&SearchWhat=web";
		else if (sbutton == 'Britannica') 
			sURL += "&ct=";
		else if (sbutton == 'Infoplease') 
			sURL += "&in=all&go.x=19&go.y=14";

		window.open(sURL,"Zoekopdracht","toolbar=no,location=no,status=no,menubar=no,resizable=yes,scrollbars=yes,width=640,height=480");  
	}


