/*
 * Scripting by:
 * Edwin Mooijaart
 * www.Mooijaart.com
 */

function get_stats(guid,site_id)
	{
	referrer = escape(document.referrer); 

	if((referrer == "") || (referrer == "undefined"))
		{
		referrer = ""; 
	} 
	pagina = escape(document.location.href); 
	screens = screen.width + "x" + screen.height; 
	screenc = (navigator.appName.indexOf("Microsoft") > -1) ? screen.colorDepth : screen.pixelDepth; 
	img = "/admin/stats/stats.php?guid=" + guid + "&pagina=" + pagina + "&site_id=" + site_id + "&referrer=" + referrer + "&screensize=" + screens + "&screencolors=" + screenc; 
	img = "<img src=\"" + img + "\"/>"; 
	document.write(img);
}

function CheckSearchForm()
{
	var error = 0;
	var trefwoord=document.searchform.q.value;
	if (trefwoord.length  < 3) 
	{
		var vraag = window.alert('Het trefwoord moet uit minimaal 3 tekens bestaan.');
		document.searchform.q.focus();
		return false;
		error = 1;
	}
	
	if (document.searchform.q.value =="Zoeken") 
	{
		if (error == 0)
		{
			window.alert('Vul een Trefwoord in.');
			document.searchform.q.focus();
			return false;
			error = 1;
		}
	}
	
	if (error == 0)
	{
		trefwoord = trefwoord.replace(' ', "+")
		trefwoord = trefwoord.replace('/', "|")
		window.location.href="/?q="+trefwoord;	
	}
}