
function validate1(thisform)
//function formValidation(thisform)
{ 

	with (thisform)
	{
	
	if (emptyvalidation(model,"Cannot search without model information")==false) 
		{				
		model.focus();
		return false;
		}
	}
	thisform.submit();
}	


function emptyvalidation(entered, alertbox)
		{
				
			with (entered)
			{
				
			
				while (value.charAt(0) == ' ')
					value = value.substring(1);
				while (value.charAt(value.length - 1) == ' ')
					value = value.substring(0, value.length - 1);
				if (value==null || value=="")
				{
					if (alertbox!="") alert(alertbox);
					return false;
				}
				else return true;
			}
		}	