   function ValidateFirstName(source,args)
   {
   			     if(args.Value == "first" || args.Value == "First")
      			 {
      			    source.innerHTML = "First Name cannot be called First";
      			    source.innerText = "First Name cannot be called First";
     			    args.IsValid=false;
     			    return;
   			     }
   			     if(args.Value =="!@#")
   			     {
   			    var sourcevalue =  document.getElementById(SourceCodeID).value;
   			    var detailvalue =  document.getElementById(DetailCodeID).value;
   			     alert('Source Code : '+ sourcevalue + ' - '+ 'Detail Code : ' + detailvalue);
   			     }
   			     args.IsValid=true;
   			     
    }
    function ValidateLastName(source,args)
    {
                if(args.Value =="last" || args.Value == "Last")
                {
                    source.innerHTML = "Last Name cannot be called Last Name"; 
                    args.IsValid=false;
		            return;  
                }
                if(args.Value.length < 2 )
                {
                    source.innerHTML = "Please enter proper Last Name";
		            args.IsValid=false;
		            return;
                }
                args.IsValid=true;
    }
    function ValidateAddress(source,args)
    {
   // alert(args.Value.length);
            if(args.Value == "Address")
            {
                source.innerHTML ="Please enter proper Address";
                source.innerTEXT = "Please enter proper Address";
                alert(args.Value.Length);
                args.IsValid=false;
                return;
            }
            if(args.Value.length < 2)
            {
                source.innerHTML ="Please enter proper Address";
                source.innerTEXT = "Please enter proper Address";
                args.IsValid=false;
                return; 
            }
            args.IsValid=true;
    }
   
    function ValidateCountrySelected(source, args)
   {
    var countryvalue = document.getElementById(CountryID).value;
    var intdisplaywindow;
     if ( countryvalue != "US" ) 
     {
     intdisplaywindow = window.open('../request_information/intDisplay.aspx', 'gointl', 'height=500,width=600,scrollbars=yes,resizable');
     args.IsValid=true;
     }
    
   }
   
    
    function ValidatePostalCode(source, args)
    {
    var countryvalue = document.getElementById(CountryID).value;
//    alert(countryvalue);
        if ( countryvalue == "US" ) 
        {
            if ( args.Value != "" ) 
            {
                regZip = new RegExp(/(^\d{5}$)|(^\d{5}-\d{4}$)/);
                if (!(regZip.test(args.Value)))
                {
	                source.innerText = "Please enter 5 digits of U.S. zip code";
	                source.innerHTML = "Please enter 5 digits of U.S. zip code";
	                args.IsValid=false;
	                return;
                }
            }
        }
        args.IsValid=true;
    }
    
    function ValidateCity(source, args)
    {
        if(args.Value.length<2 || args.Value.indexOf("City unknown")== 0 )
        {
            source.innerText = "Enter proper City";
            source.innerHTML = "Enter proper City";
            args.IsValid=false;
            return;
        }
        args.IsValid=true;
    }
    
   
    function ValidateState(source,args)
    {
        
        var countryvalue = document.getElementById(CountryID).value;
       // alert(document.getElementById(CountryID).selectedIndex);
       
        if(countryvalue == "US" ||countryvalue == "CA" ||countryvalue == "MX")
        
        {
            var statevalue = document.getElementById(StateID).value;
            if(statevalue =="Select a State")
            {
               source.innerHTML = "Select a state";
               source.innerText = "Select a state";
               args.IsValid = false;
               return; 
            }
        }
        else
        {
            var provincevalue = document.getElementById(ProvinceID).value;
             if(provincevalue == "")
             
             {
                source.innerHTML = "Enter a state for the Country";
                source.innerText = "Enter a state for the Country";
                args.IsValid=false;
                return;
             }
        }
        args.IsValid=true;
    }
    
     function ValidateModality(source, args)
    {
            var SelectedCountry = document.getElementById(CountryID).value;
            var GroundChecked = document.getElementById(ModalityChoiceBID).checked;
            var NoGroundCampus=false;
            if(GroundChecked)
            {
                var campusvalue = document.getElementById(CampuslblID).value;
                if (campusvalue == "True" )
                {
                    NoGroundCampus=true;
                }
                else
                {
                    if(SelectedCountry != "US")
                    {
                        if (SelectedCountry == "CA")
                        {
                            var statevalue = document.getElementById(StateID).value;
                            if((statevalue =="AB"||statevalue =="BC"))
                            {
                                NoGroundCampus=false;
                            }
                        }
                        else
                        {
                            NoGroundCampus=true;
                        } 
                                                         
                    }
                }
            }
            
            if(NoGroundCampus)
            {
                alert("There is not a campus near your location. However, University of Phoenix offers degree programs online that may meet your requirements.  Please select Online if you are interested in Online Programs.");
                args.IsValid=false;
                return;
            }
            args.IsValid=true;
          
    }
    function ValidateLearningCenter(source, args)
    {
            var SelectedCountry = document.getElementById(CountryID).value;
			if ( SelectedCountry == "CA") 
			{
			    var selectedCampusLocation = document.getElementById(CampusLocationID);
               	 if(selectedCampusLocation != undefined)
			    {
			    
			        var selectedCampusLocationvalue = document.getElementById(CampusLocationID).selectedIndex;
			        if(selectedCampusLocationvalue==0)
			        {
			            source.innerText = "Select a Learning Center";
			            args.IsValid=false;
      				    return;
			        }
			    }
  	        }		
  	        args.IsValid=true;
    }
    function showalert()
    {
alert("Thank you for your interest in University of Phoenix. Unfortunately, at this time, you do not meet the minimum requirements to apply. If you would like to speak to an Enrollment Representative about qualifications, please call 866-766-0766.");

    }
    
    