 
            function Validate()
            {
                var lbError = false;
                var lsAlert = '';
                var loFocusControl;

                var loListcampus_Maric_College = document.getElementById('_tdmcontrolcampus_Maric_College');
if(loListcampus_Maric_College.selectedIndex == 0 || loListcampus_Maric_College.selectedIndex == -1)
{
lsAlert += fnValidateAlert(lbError, 'Please select a value for Campus.');
loFocusControl = fnValidateFocus(loFocusControl, loListcampus_Maric_College);
lbError = true;
}
var loListprograminterest_Maric_College = document.getElementById('_tdmcontrolprograminterest_Maric_College');
if (loListprograminterest_Maric_College.selectedIndex == -1 || loListprograminterest_Maric_College[loListprograminterest_Maric_College.selectedIndex].value == '')
{
lsAlert += fnValidateAlert(lbError, 'Please select a value for Program.');
loFocusControl = fnValidateFocus(loFocusControl, loListprograminterest_Maric_College);
lbError = true;
}
var loTxtFirstName = document.getElementById('_tdmcontrolfirstname_First_Name_30');
if(jsTrim(loTxtFirstName.value) != '')
{
if (!fnValidateSpecialChar(loTxtFirstName.value))
{
lsAlert += fnValidateAlert(lbError, 'Special charaters not allowed in first name.');
loFocusControl = fnValidateFocus(loFocusControl, loTxtFirstName);
lbError = true;
}
}
var loTxtfirstname_First_Name_30 = document.getElementById('_tdmcontrolfirstname_First_Name_30');
if(jsTrim(loTxtfirstname_First_Name_30.value) == '')
{
lsAlert += fnValidateAlert(lbError, 'Please, enter a value into First Name.');
loFocusControl = fnValidateFocus(loFocusControl, loTxtfirstname_First_Name_30);
lbError = true;
}
var loTxtLastName = document.getElementById('_tdmcontrollastname_Last_Name_30');
if(jsTrim(loTxtLastName.value) != '')
{
if (!fnValidateSpecialChar(loTxtLastName.value))
{
lsAlert += fnValidateAlert(lbError, 'Special charaters not allowed in last name.');
loFocusControl = fnValidateFocus(loFocusControl, loTxtLastName);
lbError = true;
}
}
var loTxtlastname_Last_Name_30 = document.getElementById('_tdmcontrollastname_Last_Name_30');
if(jsTrim(loTxtlastname_Last_Name_30.value) == '')
{
lsAlert += fnValidateAlert(lbError, 'Please, enter a value into Last Name.');
loFocusControl = fnValidateFocus(loFocusControl, loTxtlastname_Last_Name_30);
lbError = true;
}
var loTxtstreet1_Address_Line_1_40 = document.getElementById('_tdmcontrolstreet1_Address_Line_1_40');
if(jsTrim(loTxtstreet1_Address_Line_1_40.value) == '')
{
lsAlert += fnValidateAlert(lbError, 'Please, enter a value into Address Line 1.');
loFocusControl = fnValidateFocus(loFocusControl, loTxtstreet1_Address_Line_1_40);
lbError = true;
}
var loTxtcity_City_30 = document.getElementById('_tdmcontrolcity_City_30');
if(jsTrim(loTxtcity_City_30.value) == '')
{
lsAlert += fnValidateAlert(lbError, 'Please, enter a value into City.');
loFocusControl = fnValidateFocus(loFocusControl, loTxtcity_City_30);
lbError = true;
}
var loListstate_list_kaplan = document.getElementById('_tdmcontrolstate_list_kaplan');
if(loListstate_list_kaplan.selectedIndex == 0 || loListstate_list_kaplan.selectedIndex == -1)
{
lsAlert += fnValidateAlert(lbError, 'Please select a value for State.');
loFocusControl = fnValidateFocus(loFocusControl, loListstate_list_kaplan);
lbError = true;
}
var loTxtzip_Zip_Code_10 = document.getElementById('_tdmcontrolzip_Zip_Code_10');
if(jsTrim(loTxtzip_Zip_Code_10.value) == '')
{
lsAlert += fnValidateAlert(lbError, 'Please, enter a value into Zip Code.');
loFocusControl = fnValidateFocus(loFocusControl, loTxtzip_Zip_Code_10);
lbError = true;
}
var loListcountry_kaplan = document.getElementById('_tdmcontrolcountry_kaplan');
if(loListcountry_kaplan.selectedIndex == 0 || loListcountry_kaplan.selectedIndex == -1)
{
lsAlert += fnValidateAlert(lbError, 'Please select a value for Country.');
loFocusControl = fnValidateFocus(loFocusControl, loListcountry_kaplan);
lbError = true;
}
var loTxtemail_address_50 = document.getElementById('_tdmcontrolemail_address_50');
if(jsTrim(loTxtemail_address_50.value) == '')
{
lsAlert += fnValidateAlert(lbError, 'Please, enter a value into E-mail Address.');
loFocusControl = fnValidateFocus(loFocusControl, loTxtemail_address_50);
lbError = true;
}
var loTxtphone1_Daytime_Phone_20 = document.getElementById('_tdmcontrolphone1_Daytime_Phone_20');
if(jsTrim(loTxtphone1_Daytime_Phone_20.value) == '')
{
lsAlert += fnValidateAlert(lbError, 'Please, enter a value into Daytime Phone (ie 123-456-7890).');
loFocusControl = fnValidateFocus(loFocusControl, loTxtphone1_Daytime_Phone_20);
lbError = true;
}
var loListhighest_education_level_kaplan = document.getElementById('_tdmcontrolhighest_education_level_kaplan');
if(loListhighest_education_level_kaplan.selectedIndex == 0 || loListhighest_education_level_kaplan.selectedIndex == -1)
{
lsAlert += fnValidateAlert(lbError, 'Please select a value for Which is the highest level of education that you possess?.');
loFocusControl = fnValidateFocus(loFocusControl, loListhighest_education_level_kaplan);
lbError = true;
}
var loTxths_grad_kaplan_mmyyy = document.getElementById('_tdmcontrolhs_grad_kaplan_mmyyy');
if(jsTrim(loTxths_grad_kaplan_mmyyy.value) == '')
{
lsAlert += fnValidateAlert(lbError, 'Please, enter a value into What is your High School graduation date? (MM/YYYY).');
loFocusControl = fnValidateFocus(loFocusControl, loTxths_grad_kaplan_mmyyy);
lbError = true;
}


                if(lbError)
                {
                    if (typeof loFocusControl != 'undefined')
                    {
                        loFocusControl.focus();
                    }
                    if (jsTrim(lsAlert) != '')
                    {
                        window.alert(lsAlert);
                    }
                    return(false);
                }
                else
                {
                	document.getElementById('btnSubmit').disabled = true;
                	document.getElementById('btnSubmit').value = "Processing...";
                	document.frmContactForm.submit();
                    return(true);
                }

            }

            function fnValidateAlert(pbError, psMessage)
            {
              if (pbError)
              {
                return("\n" + psMessage);
              }
              else
              {
                return("" + psMessage);
              }
            }

            function fnValidateFocus(poControlFocus, poControl)
            {
              if (typeof poControlFocus == "undefined")
              {
                return(poControl);
              }
              else
              {
                return(poControlFocus);
              }
            }

            function jsTrim(sf_string)
            {
              sf_string = sf_string.replace(/ +/g, " ");
              sf_string = sf_string.replace(/^ /, "");
              sf_string = sf_string.replace(/ $/, "");
              return(sf_string);
            }

            function fnValidateMail(psValue)
            {
                var reEmail = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
                if (reEmail.test(psValue))
                {
                    return (true);
                }
                else
                {
                    return (false);
                }
            }

            function fnValidatePhone(psValue)
            {
                //var rePhone = /^(\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}$/;
                var rePhone = /^(?:\([2-9]\d{2}\)\ ?|[2-9]\d{2}(?:\-?|\ ?))[2-9]\d{2}[- ]?\d{4}$/
                if (rePhone.test(psValue))
                {
                    return (true);
                }
                else
                {
                    return (false);
                }
            }

            function fnValidateZipCode(psValue)
            {
                var reZipCode = /^\d{5}((-|\s)?\d{4})?$/;
                if (reZipCode.test(psValue))
                {
                    return (true);
                }
                else
                {
                    return (false);
                }
            }

            function fnChangeList (strChildID, elParent) {

            	var elChild = document.getElementById(strChildID);

				var arrListValue = new Array();

				//arrListValue[0] = new Array("A", "B", "C");
				//arrListValue[1] = new Array("E", "F", "G");

				arrListValue[0] = new Array("","Criminal Justice","Dental Assistant","Medical Assistant","Medical Office Specialist");
arrListValue[1] = new Array("","Criminal Justice","Dental Assistant","Medical Assistant","Medical Office Specialist","Respiratory Therapy","Therapeutic Health Technician");
arrListValue[2] = new Array("","Back Office Medical Assistant","Diagnostic Cardiac Sonography","Diagnostic Medical Sonography/Ultrasound","Diagnostic Vascular Sonography","Medical Assistant","Radiologic Technology","Vocational Nursing","X-Ray Technician/Medical Assistant Back Office");
arrListValue[3] = new Array("","Criminal Justice","Healthcare and Rehab Therapy Technician","Holistic Health Practitioner","Massage Therapy","Medical Administrative and Insurance Specialist","Medical Assistant","Medical Insurance Coder","Nursing Assistant","Pharmacy Technician","Vocational Nursing","X- Ray Technician/Back Office Medical Assistant");
arrListValue[4] = new Array("","Massage Therapy","Medical Administrative and Insurance Specialist","Paralegal Studies","Pharmacy Technician");
arrListValue[5] = new Array("","Legal Administrative Assistant","Medical Assistant","Medical Coding and Billing","Paralegal/Legal Assistant");
arrListValue[6] = new Array("","Computer Support Technician","Criminal Justice","Dental Assistant","Medical Assistant","Medical Office Specialist");
arrListValue[7] = new Array("","Computer Support Technician","Criminal Justice","Medical Assistant","Medical Insurance Technician","Nurse Assistant Training Program","Nursing","Patient Care Assistant/Technician","Vocational Nursing");
arrListValue[8] = new Array("","Criminal Justice","Dental Assistant","Medical Assistant","Medical Office Specialist");


				var intParentIndex = elParent.selectedIndex;

				elChild.options.length = 0;

				if (intParentIndex > 0) {

					if (arrSelectedValue = arrListValue[intParentIndex-1] ) {
					    
					    //For initial Please Select
					    optionItem = new Option( "Please Select", "",  false, false);
						elChild.options[elChild.length] = optionItem;
						
						for (var i=1; i < arrSelectedValue.length; i++) {
							optionItem = new Option( arrSelectedValue[i], arrSelectedValue[i],  false, false);
							elChild.options[elChild.length] = optionItem;
						}

					}

				}

            }

			function getCookieValue (cookieName) {
			  var exp = new RegExp (escape(cookieName) + "=([^;]+)");
			  if (exp.test (document.cookie + ";")) {
				exp.exec (document.cookie + ";");
				return unescape(RegExp.$1);
			  }
			  else return "";
			}

			function writeCookie(cookieName,cookieValue,days) {
				if (days) {
					var date = new Date();
					date.setTime(date.getTime()+(days*24*60*60*1000));
					var expires = "; expires="+date.toGMTString();
				}
				else var expires = "";
				document.cookie = cookieName+"="+cookieValue+expires+"; path=/";
			}

		function fnValidateSpecialChar(psValue)
		{
			var iChars = "!@#$%^&*()+=-[]\\\';,./{}|\":<>?";
			var strCheck = "0";
    		for (var i = 0; i < psValue.length; i++)
				{
					if (iChars.indexOf(psValue.charAt(i)) != -1) 
						{
  							//return false;
							strCheck = "1";
	  					}
				 }
				 if (strCheck == "1")
					return false;
				 else
					 return true;

		}



