<!--
function select_contents(field)
{
        field.focus();
        field.select();
}
function setGoogleSearchLanguage(select)
{
	/*hide all*/
	document.getElementById('search_EN').style.display='none';
	document.getElementById('search_NL').style.display='none';
	
	/*show correct*/
	document.getElementById('search_'+select.value).style.display='inline';
}

function PromptInput(action,original_value,id)
{
action = action.toUpperCase();
switch(action)
{
	case 'SET_CATNAME':
	{
		var text=prompt("Enter the text to be formatted bold.",original_value);
		if(text)
		{
			setData('/AJAX.php?do=set_catname&cat_id='+id+'&name='+text);
		}
		break;	
	}

}

}


function pwdstrength(pwd)
{
	var points = 0;

	if ((points = pwd.length) > 1)
	{
		// mix
		var mix = 0;
		if (/[a-z]/.test(pwd))
			mix++;
		if (/[A-Z]/.test(pwd))
			mix++;
		if (/\d/.test(pwd))
			mix++;
		if (/[^a-zA-Z0-9]/.test(pwd))
			mix++;

		points += (mix - 1) * 8;

		// different characters
		var a = {}, i = pwd.length;
		while (i--)
		{
			if (!a[pwd.charAt(i)])
			{
				points++;
				a[pwd.charAt(i)] = 1;
			}
		}
		points--;
	}

	var strength = 'Very weak';
	var color = 'Gray';
	if(points > 0)
	{
		var color = 'Red';
		
		if (points > 10)
		{
			strength = 'Weak';
			var color = 'Red';
			if (points > 15)
			{
				strength = 'Moderate';
				color = 'Yellow';
				if (points > 20)
				{
					strength = 'Reasonably strong';
					color = 'Lime';
					{
						if (points > 25)
						{
							strength = 'Strong'
							color = 'Green';
							if (points > 30)
							{
								strength = 'Very strong';
								color = 'Green';
								if (points > 40)
									points = 40;
							}
						}
					}
				}
			}
		}
	}
	
	var width = 300;
	var widthRuler = Math.round((width / 40) * points);
	width = width - widthRuler;
	
	document.getElementById('pwdstrength_text').firstChild.nodeValue = strength;
	var ruler = document.getElementById('pwdstrength_ruler');
	ruler.className = 'scoreBar score' + color;
	ruler.style.width = widthRuler + 'px';
	
	var rulerUnfilled = document.getElementById('pwdstrengthruler_Unfilled');
	rulerUnfilled.style.width = width + 'px';
}


function TimedRedirect(newurl,miliseconds)
{
	setTimeout("window.location.href='" + newurl + "';",miliseconds);
}

<!--
httpReqArray=new Array();

function RequestObject(status)
{
	this.available=status;
	this.httpRequest=null;
	if (window.XMLHttpRequest)
	{ // Mozilla, Safari, ...
		this.httpRequest = new XMLHttpRequest();
		if (this.httpRequest.overrideMimeType)
		{
                	//this.httpRequest.overrideMimeType('text/xml');
		}
	}
	else if (window.ActiveXObject)
	{ // IE
		try
		{
                	this.httpRequest = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			try
			{
				this.httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} 
			catch (e)
			{
			}
		}
	}

	if (!this.httpRequest)
	{
		alert('Problem creating XMLHttpRequest Object: some features of this site will NOT work.');
	}

}

function getData(dataSource, divID)
{
	var pos = -1;
	for (var i=0; i<httpReqArray.length; i++)
	{
		if (httpReqArray[i].available == 1 && httpReqArray[i].httpRequest.readyState==4)
		{
			httpReqArray[i].available=0;
			//document.write("Available found > "+i+"<br>");
			pos = i;
			i=httpReqArray.length;
			break;
		}

	}
	if (pos == -1)
	{
		pos = httpReqArray.length; 
		httpReqArray[pos] = new RequestObject(0);
		//document.write("None found, creating new > "+pos+"<br>");
		httpReqArray[pos].available=0;
	}
//document.getElementById('testDIV1').innerHTML=pos;

	if(httpReqArray[pos].httpRequest)
	{
		var obj = document.getElementById(divID);
		httpReqArray[pos].httpRequest.open("GET", dataSource);
		httpReqArray[pos].httpRequest.onreadystatechange = function()
		{
			if (httpReqArray[pos].httpRequest.readyState == 4 && httpReqArray[pos].httpRequest.status == 200)
			{
				obj.innerHTML = httpReqArray[pos].httpRequest.responseText;
				httpReqArray[pos].available=1;
			}
			else
			{
				//obj.innerHTML = "Informatie wordt ingeladen..";
				//document.write("oh noes!");

			}
		}
		if (window.XMLHttpRequest)
		{
			httpReqArray[pos].httpRequest.send(null);
		}
		else if (window.ActiveXObject)
		{
			httpReqArray[pos].httpRequest.send();
		}
		return false;
	}
}

function setData(dataSource)
{
//Stamp = new Date();
//Time=Stamp.getHours()+':'+Stamp.getMinutes()+':'+Stamp.getSeconds();
	var pos = -1;
	for (var i=0; i<httpReqArray.length; i++)
	{
		if (httpReqArray[i].available == 1 && httpReqArray[i].httpRequest.readyState==4)
		{
			httpReqArray[i].available=0;
			pos = i;
			i=httpReqArray.length;
			break;
		}

	}
	if (pos == -1)
	{
		pos = httpReqArray.length; 
		httpReqArray[pos] = new RequestObject(0);
		httpReqArray[pos].available=0;
	}
	if(httpReqArray[pos].httpRequest)
	{
		httpReqArray[pos].httpRequest.open("GET", dataSource);
		httpReqArray[pos].httpRequest.onreadystatechange = function()
		{

		}
		if (window.XMLHttpRequest)
		{
			httpReqArray[pos].httpRequest.send(null);
		}
		else if (window.ActiveXObject)
		{
			httpReqArray[pos].httpRequest.send();
		}
		httpReqArray[pos].available=1;
		return false;
	}
}

function checkUsername(username)
{
	if(username.length>0 && username.length<3)
	{
		document.getElementById('username_info').innerHTML="Username too short.";
	}
	else
	{
		getData('AJAX.php?do=checkUsername&u='+username,'username_info');
	}
}

function startSearch(q)
{
	if(q.length==0)
	{
		document.getElementById('bookmark_search_results').style.display='none';
		document.getElementById('bookmark_search_close_img').style.display='none';
	}
	else
	{
		document.getElementById('bookmark_search_results').style.display='inline';
		document.getElementById('bookmark_search_close_img').style.display='inline';
		document.getElementById('bookmark_search_results').innerHTML='Searching..';
		getData('AJAX.php?do=search_bookmark&q='+q,'bookmark_search_results');
	}
	return 0;
}
function stopSearch()
{
	document.getElementById('bookmark_search_results').style.display='none';
	document.getElementById('bookmark_search_close_img').style.display='none';
	document.getElementById('bookmark_search_results').innerHTML='';
	document.getElementById('bookmark_search').value='';
	return 0;
}

function minimize_menu(catID)
{
	document.getElementById('cat'+catID).style.display='none';
	document.getElementById('minmax_cat'+catID).innerHTML='<img src="/shared/images/maximize.gif" alt="Maximize" title="Maximize" onClick="maximize_menu(\''+ catID +'\');setData(\'/AJAX.php?do=sm_set_size&cat_id='+ catID +'&value=0\');">';
}

function maximize_menu(catID)
{
	document.getElementById('cat'+catID).style.display='block';
	document.getElementById('minmax_cat'+catID).innerHTML='<img src="/shared/images/minimize.gif" alt="Minimize" title="Minimize" onClick="minimize_menu(\''+ catID +'\');setData(\'/AJAX.php?do=sm_set_size&cat_id='+ catID +'&value=1\');">';
}
//-->


