function resetValues(form, values){
for(var i = 0; i < values.length; i++){
		eval("document.forms."+form+"."+values[i]+".value = ''");
	}
}

function showLoadingPage(){
	document.getElementById('mainTpl').style.display = 'none';
	document.getElementById('iframeLoadCont').style.display = 'block';
	setTimeout("submitSearchPage()",500);
	return false;
}
function submitSearchPage(){
	document.forms['searchForm'].submit();
}

/*
* Checking if the search form is properly filled
*/
function checkSearch(){
	var roomNr = 4;
	var errorMsg = '';
	var focusField = '';
	initFieldID();
	//destination field
	if(document.forms['searchForm'].location_f.value == '' || document.forms['searchForm'].location__f.value == ''){
		errorMsg += searchTranslate[0]+'\n';
		focusField = document.forms['searchForm'].location__f;
	}
	if(errorMsg != ''){
		focusField.focus();
		alert(errorMsg);
		return false;
	}
	return true;
}//end function checkSearch
function initFieldID(){
	document.forms['searchForm'].location_f.value = document.forms['searchFlag'].locationFlag_f.value;
	document.forms['searchForm'].locationNamePathIDs_f.value = document.forms['searchFlag'].locationFlagNamePathIDs_f.value;
}
function checkKey(id, pathIDs){
	document.forms['searchFlag'].locationFlag_f.value = id;
	document.forms['searchFlag'].locationFlagNamePathIDs_f.value = pathIDs;
}

/*
* Checking if the last minute form is properly filled
*/
function checkSearchLM(){
	var errorMsg = '';
	var focusField = '';

	//destination field
	if(document.forms['addLMForm'].locationLM_f.value == '' || document.forms['addLMForm'].locationLM__f.value == ''){
		errorMsg += searchTranslateLM[0]+'\n';
		focusField = document.forms['addLMForm'].locationLM__f;
	}
	if (document.forms['addLMForm'].titleLM_f.value == ''){
		errorMsg += searchTranslateLM[4]+'\n';
		if(focusField == '')
			focusField = document.forms['addLMForm'].titleLM_f;
	}
	if(errorMsg != ''){
		focusField.focus();
		alert(errorMsg);
		return false;
	}
	return true;
}//end function checkSearchLM