function CheckFields(theform)
{	
	//if IE 4+ or NS 6+
	if (document.all||document.getElementById)
		{
		//screen thru every element in the form, and hunt down "submit" and "reset"
		for (i=0;i<theform.length;i++)
			{
			var tempobj=theform.elements[i]
			if(tempobj.type=='text' && tempobj.value=="")
				{
				alert("You Did Not Fill Out the " + tempobj.name + " Field");
				tempobj.focus();
				return false;
			}
			if(tempobj.type=='password' && tempobj.value=="")
				{
				alert("You Did Not Fill Out the " + tempobj.name + " Field");
				tempobj.focus();
				return false;
			}
		}
	}
}