function ProcessText(navText)
{
	smallText=navText.toLowerCase();
	var flag = 0; var compiled = ""; var checker = ""; var badCommand = ""; var flag1=0;
	var i; var len = smallText.length; var pageSource = window.parent.document.getElementById("MainContent").src;
	for (i = 0; i < len; ++i) {
                                checker = checker + smallText.charAt(i);
                                if (flag == 1) { compiled = compiled + smallText.charAt(i); }
                                if (checker.toLowerCase() == "echo") { flag = 1; }
                                if (smallText.charAt(i) == " ") {if (flag1==0) {badCommand=checker; flag1=1;}}
                                }
   if (flag==1){smallText="echo";}
   if (flag1==0){badCommand=smallText;}
	
   if (smallText=="man") 
	{window.parent.document.getElementById("MainContent").src="/Manual.asp";
	}
   else if (smallText=="get basicinfo" || smallText=="cd basicinfo")
	{window.parent.location="/BasicInfo/BasicInfo.asp";
	}
   else if (smallText=="get basicinfo/aboutuat" || smallText=="cd aboutuat")
	{window.parent.location="/BasicInfo/AboutUAT/AboutUAT.asp";
	}
   else if (smallText=="get basicinfo/aboutuat/history")
	{window.parent.location="/BasicInfo/AboutUAT/History.asp";
	}
   else if (smallText=="get basicinfo/aboutuat/accredidation")
	{window.parent.location="/BasicInfo/AboutUAT/Accredidation.asp";
	}
   else if (smallText=="get basicinfo/aboutuat/whoarewe")
	{window.parent.location="/BasicInfo/AboutUAT/WhoAreWe.asp";
	}
   else if (smallText=="get programinfo" || smallText=="cd programinfo")
	{window.parent.location="/ProgramInfo/ProgramInfo.asp";
	}
   else if (smallText=="get programinfo/degreereq")
	{window.parent.location="/ProgramInfo/ProgramDegree.asp";
	}
   else if (smallText=="get programinfo/oncampus")
	{window.parent.location="/ProgramInfo/ProgramOnCampus.asp";
	}
   else if (smallText=="get programinfo/online")
	{window.parent.location="/ProgramInfo/ProgramOnline.asp";
	}
   else if (smallText=="get programinfo/graduate")
	{window.parent.location="/ProgramInfo/ProgramGraduate.asp";
	}
   else if (smallText=="get admissions" || smallText=="cd admissions")
	{window.parent.location="/Admissions/Admissions.asp";
	}
   else if (smallText=="get admissions/scholarships")
	{window.parent.location="/Admissions/AdmissionsScholarships.asp";
	}
   else if (smallText=="get admissions/reqinfo" || smallText=="reqinfo" || smallText=="request" || smallText=="info")
	{promo_hide();PopUp('request');
	}
   else if (smallText=="get admissions/apply" || smallText=="apply")
	{promo_hide();PopUp('apply');
	}
   else if (smallText=="get careers" || smallText=="cd careers")
	{window.parent.location="/Careers/Careers.asp";
	}
   else if (smallText=="get careers/cyber")
	{window.parent.location="/Careers/CareersCyber.asp";
	}
   else if (smallText=="get careers/security")
	{window.parent.location="/Careers/CareersSecurity.asp";
	}
   else if (smallText=="get resources")
	{window.parent.location="/Resources/Resources.asp";
	}
   else if (smallText=="get resources/articles" || smallText=="get articles")
	{window.parent.location="/Resources/ResourcesArticles.asp";
	}
   else if (smallText=="get resources/utilities" || smallText=="get utilities")
	{window.parent.location="/Resources/ResourcesUtilities.asp";
	}
   else if (smallText=="get uat")
	{window.parent.location="http://www.uat.edu";
	}
   else if (smallText=="boot" || smallText=="home" || smallText=="reset")
	{window.parent.location="/Default.asp";
	}
   else if (smallText=="clear")
	{window.parent.document.getElementById("MainContent").src="/Blank.asp";
	window.parent.document.getElementById("SubNav").src="/Blank.asp";
	}
   else if (smallText=="finger" || smallText=="who")
	{window.parent.document.getElementById("MainContent").src="/Finger.asp";
	}
   else if (smallText=="whoami")
	{window.parent.document.getElementById("MainContent").src="/whoami.asp";
	}
   else if (smallText=="date")
	{window.parent.document.getElementById("MainContent").src="/Date.asp";
	}
   else if (smallText=="echo")
	{
	window.parent.document.getElementById("MainContent").src="/Echo.asp?echo="+compiled+"";
	}
   else if (smallText=="elite")
	{promo_hide();PopUp('elite');
	}
   else if (smallText=="contact" || smallText=="get basicinfo/aboutuat/contactus")
	{promo_hide();PopUp('contact');
	}
   else if (smallText == "games")
    {arcade_show();
    }
   else if (smallText == "webmaster")
    {window.parent.document.getElementById("MainContent").src="/webbers.asp";
    }
   else if (smallText == "joe")
    {window.parent.document.getElementById("MainContent").src="/webbers.asp";
    }
   else if (smallText == "ben")
    {window.parent.document.getElementById("MainContent").src="/webbers.asp";
    }
   else if (smallText == "author")
    {window.parent.document.getElementById("MainContent").src="/webbers.asp";
    }
   else if (smallText == "ls" || smallText == "list")
	{pageString=pageSource.toString();
		window.parent.document.getElementById("MainContent").src="/List.asp?page="+pageString+"";
	}
   else
	{
	    if(checkCharacters(smallText))
	    {
	        window.parent.document.getElementById("MainContent").src="/Error.asp?echo=Invalid characters entered";
	    }
	    else
	    {
	        window.parent.document.getElementById("MainContent").src="/Error.asp?echo="+badCommand+"";
	    }
	}
}

function submitenter(myfield,event)
{
var keycode;
if (window.event) keycode = window.event.keyCode;
else if (event) keycode = event.which;
else return true;

if (keycode == 13)
   {
   ProcessText(text_nav.value);
   text_nav.value="";
   return false;
   }
else
   return true;
}

function checkCharacters(input)
{
    var regExpression;
    regExpression = /[\(\)\<\>\;\:\"\[\]]/;
    //checks for invalid characters using a regular expression
    if(regExpression.test(input))
    {
        return true;
    }    
    return false;
}