function getMenuType()
{
	option=document.forms[0].MenuTitleCombo.options[document.forms[0].MenuTitleCombo.selectedIndex].text;
	document.forms[0].MenuTitleCombo.value = option;
	document.forms[0].action="editMenus?MenuTitleCombo=" + option;
	document.forms[0].submit();
}
/*function getSubMenu()
{
	option=document.forms[2].SubSectionTitle.options[document.forms[2].SubSectionTitle.selectedIndex].text;
	document.forms[2].action="editMenus?menuChoice=subs&subsOption=" + option;document.forms[2].submit();
}
function getSubDesc()
{
	option=document.forms[3].SubSectionDescription.text;
	return option;
}
function getMenuDesc()
{
	option=document.forms[1].MenuDescription.text;
	return option;
}*/

function emailvalidation(obj)
{
	with (obj)
	{
		apos=value.lastIndexOf("@"); 
		dotpos=value.lastIndexOf(".");
		lastpos=value.length-1;
		if (apos<1 || dotpos-apos<2 || lastpos-dotpos>3 || lastpos-dotpos<2) 
		{
			alert("Your email address dosen't look like a real email address to me. Try again.");
			obj.focus();
			return false;
		}
		else
		{
			return true;
		}
	}
} 

function emptyvalidation(obj, minLength)
{
	with (obj)
	{
		if (value==null || value.length < minLength)
		{
			alert("You have to enter at least " + minLength + " characters for your name.");
			obj.focus();
			return false;
		}
		else
		{
			return true;
		}
	}
}  

function validateComment(obj, minLength)
{
	with (obj)
	{
		if (value==null || value.length < minLength)
		{
			alert("You have to enter at least " + minLength + " characters for a comment.");
			obj.focus();
			return false;
		}
		else
		{
			return true;
		}
	}
} 

function validateForm(formToValidate)
{
	if (emptyvalidation(formToValidate.commentName,3))
	{
		if (emailvalidation(formToValidate.commentEmail))
		{
			if (validateComment(formToValidate.commentText,10))
			{
				return true;
			}
		}
	}
	return false;
}