
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


	function openWin(url, x, y, winname) {
 var mainWin = window.open(url, winname, 'width='+x+',height='+y+',resizable=12,scrollbars=yes');
}


function setOptions_degree() {	

        var stateValue = document.form1.st.value;	
        
	var degree = document.form1.degree;	
	var program = document.form1.program;	
	 
	
	 degree.options.length = 0;
         program.options.length = 0;	
	
	 
	
	if (stateValue == "0")  {
	     degree.options[degree.options.length] = new Option('Please select state first','');	     
        }else {
	    degree.options[degree.options.length] = new Option('- Select a degree -','0');
		degree.options[degree.options.length] = new Option('Bachelor of Science','2');
		degree.options[degree.options.length] = new Option('Associate in Arts','3');
		degree.options[degree.options.length] = new Option('Bachelor of Business Administration','1');
        if(stateValue !="NC" && stateValue !="SC"){
         degree.options[degree.options.length] = new Option('Diploma','4');
        }     
        if(stateValue !="NC" ){	
		degree.options[degree.options.length] = new Option('Undergraduate Certificate','5');
        }		
		degree.options[degree.options.length] = new Option('Master\'s','6');
		degree.options[degree.options.length] = new Option('Executive Graduate Certificates','7');
	}		
	program.options[program.options.length] = new Option('Please select degree first',' ');
	
}
                               
function setOptions_program() {	

        var degreeValue = document.form1.degree.value;
        var stateValue = document.form1.st.value;	
        	
	var program = document.form1.program;	
	var degree = document.form1.degree;
	

        program.options.length =0;
	//alert (degreeValue);	
             
             if (degreeValue == "0")  {
	       program.options[program.options.length] = new Option('Please select degree first',' ');	     
             } 
             
             if (degreeValue == "3") {
	        program.options[program.options.length] = new Option('- Select a program -','');
			program.options[program.options.length] = new Option('Accounting','17');
			program.options[program.options.length] = new Option('Acquisition & Contract Management','18');
			program.options[program.options.length] = new Option('Business Administration','19');
			program.options[program.options.length] = new Option('Computer Information Systems','2');
			program.options[program.options.length] = new Option('Computer Networking','21');
			program.options[program.options.length] = new Option('Database Technology','22');
			program.options[program.options.length] = new Option('Economics','23');
			program.options[program.options.length] = new Option('General Studies','24');
			program.options[program.options.length] = new Option('Internetworking Technology','25');
			program.options[program.options.length] = new Option('Marketing','26');
      }
			
			
     if (degreeValue == "1") {
			program.options[program.options.length] = new Option('Concentration in Acquisition & Contract Management','1');
			program.options[program.options.length] = new Option('Concentration in Banking','2');
			program.options[program.options.length] = new Option('Concentration in E-Business','3');
			program.options[program.options.length] = new Option('Concentration in Finance','4');
			program.options[program.options.length] = new Option('Concentration in Human Resource Mgmt','5');
			program.options[program.options.length] = new Option('Concentration in Legal Studies','6');
			program.options[program.options.length] = new Option('Concentration in Management','7');
			program.options[program.options.length] = new Option('Concentration in Marketing','8');
	}

   if (degreeValue == "2") {
			program.options[program.options.length] = new Option('Accounting', '9');
			program.options[program.options.length] = new Option('Computer Information Systems', '11');
			program.options[program.options.length] = new Option('Computer Networking', '12');
			program.options[program.options.length] = new Option('Database Technology', '13');
			program.options[program.options.length] = new Option('Economics', '14');
			program.options[program.options.length] = new Option('International Business', '15');
			program.options[program.options.length] = new Option('Internetworking Technology', '16');

     }

       // diploma
   if (degreeValue == "4") {
		if(stateValue !="NC" && stateValue !="SC"){
            program.options[program.options.length] = new Option('Accounting', '27');
			program.options[program.options.length] = new Option('Acquisition & Contract Management', '28');
			program.options[program.options.length] = new Option('CIS: Database - Oracle Database Administrator Emphasis', '29');
			program.options[program.options.length] = new Option('CIS: Database - Oracle Developer Emphasis', '30');
			program.options[program.options.length] = new Option('CIS: Networking', '31');
			program.options[program.options.length] = new Option('CIS: Programming Emphasis', '35');
			program.options[program.options.length] = new Option('Internetworking Technology', '36');
			program.options[program.options.length] = new Option('Network Security', '37');
			program.options[program.options.length] = new Option('Web Development', '38');
         }
    }

//'Executive Graduate Certificates
    if (degreeValue == "7") {
			if(stateValue !="TN" && stateValue !="SC"){
			   program.options[program.options.length] = new Option('Business Administration: Acquisition Emphasis', '61');
            }			
            program.options[program.options.length] = new Option('Business Administration: Human Resource Management Emphasis', '62');
			program.options[program.options.length] = new Option('Business Administration: Management Emphasis', '63');
			program.options[program.options.length] = new Option('Business Administration: Marketing Emphasis', '64');
			if(stateValue !="TN" && stateValue !="SC"){
			   program.options[program.options.length] = new Option('Business Administration: Supply Chain Management Emphasis', '65');
            }
			program.options[program.options.length] = new Option('CIS: Communications Technology Emphasis', '66');
			program.options[program.options.length] = new Option('CIS: Computer Information Systems Emphasis', '67');
			program.options[program.options.length] = new Option('CIS: Management Information Systems Emphasis', '68');
			program.options[program.options.length] = new Option('Professional Accounting: Accounting Emphasis', '69');
			program.options[program.options.length] = new Option('Professional Accounting: Accounting Information Systems Emphasis.', '70');
			program.options[program.options.length] = new Option('Professional Accounting: Controllership Emphasis', '71');
			program.options[program.options.length] = new Option('Professional Accounting: Taxation Emphasis', '72');
    }
//masters
	if (degreeValue == "6") {	
		         program.options[program.options.length] = new Option('-Select a Program-', '');
		        program.options[program.options.length] = new Option('Master of Science:', '');
                        program.options[program.options.length] = new Option('   -Communications Technology', '55');
			program.options[program.options.length] = new Option('   -Information Systems', '56');
			program.options[program.options.length] = new Option('   -Management Information Systems', '57');
			program.options[program.options.length] = new Option('   -Professional Accounting: Concentration in Accounting Info Systems', '58');
			program.options[program.options.length] = new Option('   -Professional Accounting: Concentration in Controllership', '59');
			program.options[program.options.length] = new Option('   -Professional Accounting: Concentration in Taxation', '60');
		
		
		program.options[program.options.length] = new Option('MBA:', '');		
		if(stateValue !="TN" && stateValue !="SC"){
			program.options[program.options.length] = new Option('   -Concentration in Acquisition', '46');
        }		
	                program.options[program.options.length] = new Option('   -Concentration in Human Resource Management', '47');
			program.options[program.options.length] = new Option('   -Concentration in Management ', '48');
			program.options[program.options.length] = new Option('   -Concentration in Marketing ', '49');
       if(stateValue !="TN" && stateValue !="SC"){
			program.options[program.options.length] = new Option('   -Concentration in Supply Chain Management', '50');
		  //if(stateValue !="PA" ){	
                        program.options[program.options.length] = new Option('Master of Education: Concentration in Educational Management ', '51');
			program.options[program.options.length] = new Option('Master of Education: Concentration in Technology in Education ', '52');
		      if(stateValue !="MD" ){	
                        program.options[program.options.length] = new Option('Master of Health Services Administration', '53');
			program.options[program.options.length] = new Option('Master of Public Administration', '54');
	              }
                 //}	
      }                     
			
   }

//undergrad cert
	if (degreeValue == "5") {
		        program.options[program.options.length] = new Option('-Select a Program-', '');
        if(stateValue !="NC" ){	
			program.options[program.options.length] = new Option('Accounting:', '');
			program.options[program.options.length] = new Option('   -Introductory Accounting Emphasis', '39');
			program.options[program.options.length] = new Option('   -Advanced Accounting Emphasis', '40');
			program.options[program.options.length] = new Option('Business Administration:', '');
			program.options[program.options.length] = new Option('   -Acquisition and Contract Mgmt. Emphasis', '41');
			program.options[program.options.length] = new Option('   -E-business Emphasis', '42');         
         if(stateValue !="GA" && stateValue !="TN" && stateValue !="SC" && stateValue !="PA" ){	
			program.options[program.options.length] = new Option('   -Management Emphasis', '43');
          }
			program.options[program.options.length] = new Option('   -Small Business Mgmt. & Entrepreneurship Emphasis.', '44');
			program.options[program.options.length] = new Option('CIS: Office Information Technology Emphasis', '45');
	}
}
	
}


function checkdropdown(){

	document.form1.st.options[0].selected = true;
	document.form1.degree.options[0].selected = true;
	document.form1.program.options[0].selected = true;
}



function formCheck(theForm){
errstr = "";
if(Trim(theForm.fname.value) == ""){
	if(errstr =="")
	theForm.fname.focus();	
errstr += "You need to enter your first name.\n";
}
if(Trim(theForm.lname.value) == ""){
	if(errstr =="")
	theForm.lname.focus();	
errstr += "You need to enter your last name.\n";
}
if(Trim(theForm.address1.value) == ""){
	if(errstr =="")
	theForm.address1.focus();	
errstr += "You need to enter your address.\n";
}
if(Trim(theForm.city.value) == ""){
	if(errstr =="")
	theForm.city.focus();	
errstr += "You need to enter your city name.\n";
}
if(Trim(theForm.st.value) == ""){
	if(errstr =="")
	theForm.st.focus();	
errstr += "You need to enter your state name.\n";
}
if(Trim(theForm.zip.value) == ""){
	if(errstr =="")
	theForm.zip.focus();	
errstr += "You need to enter your zip code.\n";
}else if(isNaN(theForm.zip.value) || theForm.zip.value.length != 5){
	if(errstr =="")
	theForm.zip.focus();	
errstr += "Your zip code must be made of only numbers and 5 digits long.\n";
}

//if(Trim(theForm.country.value) == ""){
	//if(errstr =="")
	//theForm.country.focus();	
//errstr += "You need to enter your Country.\n";
//}


if(theForm.email.value != ""){
mailRE = /^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z0-9\-]+\.)+([a-zA-Z]{2,4})))$/;
if(!mailRE.exec(theForm.email.value)){
	if(errstr =="")
	theForm.email.focus();	
errstr += "Your email address must be entered in the correct format.\n";
}
}else{
if(errstr =="")
theForm.email.focus();	
errstr += "You need to enter your email address.\n";
}

phoneCheck = mailRE = /^[0-9]{10}$/;
if(Trim(theForm.day_fullPhone.value) == ""){
	if(errstr ==""){
		theForm.day_fullPhone.focus();
	}		
	errstr += "You need to enter your phone number.\n";
}else if(!phoneCheck.exec(theForm.day_fullPhone.value)){
	if(errstr ==""){
		theForm.day_fullPhone.focus();
	}				
	errstr += "Your phone number must be made of only numbers and 10 digits long.\n";
}



if(Trim(theForm.education.value) =="" || theForm.education.value =="0"){
    if(errstr =="")
	theForm.education.focus();	
errstr += "Please select Highest Level of Education Completed?\n";
}

if(Trim(theForm.degree.value) =="" || theForm.degree.value=="0"){
    if(errstr =="")
	theForm.degree.focus();	
errstr += "Please select Degree  you are interested in?\n";
}


if(Trim(theForm.program.value) =="" || theForm.program.value=="0"){
    if(errstr =="")
	theForm.program.focus();	
errstr += "Please select Program  you are interested in?\n";
}


rad = 1;
for(i = 0; i < theForm.military.length; i++){
if (theForm.military[i].checked){
rad = 0;
}
}
if(rad == 1){
errstr += "Are you an active duty member of any branch of the armed forces?\n";
}



if(errstr != ""){
alert(errstr);
return false;
}
}
function Trim(strValue)
{
return LTrim(RTrim(strValue));
}
function LTrim(strValue)
{
var LTRIMrgExp = /^\s */;
return strValue.replace(LTRIMrgExp, "");
}
function RTrim(strValue)
{
var RTRIMrgExp = /\s *$/;
return strValue.replace(RTRIMrgExp, "");
}

