//var curRegion;

function init(curRegion){
	//document.getElementById('country').onchange = setRegionMenu;
	document.getElementById('country').onchange		= lookupRegions;
	document.getElementById('cat').onchange			= lookupCountries;
	document.getElementById('jobSearch').onsubmit	= function(){ ClearAll(); return true;};

	// Enable visible helptext for some fields
	EnableHelpText('keyword');
}

/**
* set focus to the specified input-field and select it's content
*
* @param	string	fieldID	the ID of the input-field to select
*/
function selectInputField(fieldID){
	var theInput = document.getElementById(fieldID);
	if(theInput){
		/* if the input is hidden or the form is hidden, don't set focus on the input-field */
		if(theInput.style.display == 'none' || theInput.style.visibility == 'hidden') return false;
		if(theInput.form && (theInput.form.style.display == 'none' || theInput.form.style.visibility == 'hidden')) return false;

		theInput.focus();
		if(theInput.select) theInput.select();
	}
}
