// JavaScript Document
function toUnicode(elmnt,content)
{
	if (content.length==elmnt.maxLength)
	{
		next=elmnt.tabIndex;
		if (next<document.forms[0].elements.length)
		{
			document.forms[0].elements[next].focus();
		}
	}
}

function startForm()
{
	document.forms[0].elements[0].focus();
}

function validate1()
{
	if (document.forms[0].name.value.length==0)
	{
		alert("You must provide your full name.");
	    document.forms[0].name.focus();
	    return false;
	}

	var choice=false;
	for (i=0; i<document.forms[0].apt.length; i++)
	{
		if (document.forms[0].apt[i].checked)
			choice = true; 
	}
	
	if (!choice)
	{
		alert("You must select your apartment complex.")
	    return false;
	}

    if (document.forms[0].aptn.value.length==0)
    {
		alert("You must provide your Unit number.");
	    document.forms[0].aptn.focus();
	    return false;
	}

	var choice=false;
	for (i=0; i<document.forms[0].room.length; i++)
	{
		if (document.forms[0].room[i].checked)
			choice = true; 
	}
	
	if (!choice)
	{
		alert("You must specify the room that requires maintenance.");
	    return false;
	}

    if (document.forms[0].prob.value.length==0)
    {
		alert("You must provide a description of the problem..");
	    document.forms[0].prob.focus();
	    return false;
	}

	return true;
}