function trim(as_data)
{
	return as_data.replace( /^\s+/g, '' ).replace( /\s+$/g, '' );
}

function isSearchTermValid(aobj_form)
{
	var lobj_searchTerm = aobj_form.searchTerm;
	var ls_searchTermValue = lobj_searchTerm.value;

	//Blank
	if (!/\S/.test(ls_searchTermValue))
	{
		alert(	'Nothing to search for:\n' +
				'Please enter some text to search for, it must be more than 2 characters long.' );
		lobj_searchTerm.focus();
		return false;
	}

	//Bad Character
	if (/[^a-z0-9_\" ]/i.test(ls_searchTermValue))
	{
		alert(	'Invalid characters:\n' +
				'Only letters, numbers and underscore "_" can be searched for.' );
		lobj_searchTerm.focus();
		return false;
	}

	//Too Short
	if (trim(ls_searchTermValue).length < 2)
	{
		alert(	'Search term is too short:\n' +
				'Please enter a search term longer than 2 characters.' );
		lobj_searchTerm.focus();
		return false;
	}

	return true;
}

var search_default_s = 'Uw zoekterm';
var search_english_default_s = 'Your searchterm';

function setFlashObject(name_s, path_s, width_s, height_s)
{
	document.write('<object id="'+ name_s +'" type="application/x-shockwave-flash" data="'+ path_s +'" style="width: '+ width_s +'px; height: '+ height_s +'px;">\n');
	document.write('<param name="movie" value="'+ path_s +'" />\n');
	document.write('<param name="wmode" value="transparent" />\n');
	document.write('<param name="menu" value="false" />\n');
	document.write('</object>\n');
}