// JavaScript Document

/**
 * Registration and Contact Us Form validation prior to server processing with formtoemail.php
 */

function submitform(frm) {			
			if(frm.Name.value== "")  {
				alert("Please enter your Name.");
				frm.Name.focus();	
				return false;
			}
			else if(frm.Email.value== "") {
				alert("Please enter your email.");
				frm.Email.focus();
				return false;  	
		  	}
			else if(!validEmail(frm.Email.value)) {
				alert("Invalid email address; please re-enter your email.");
				frm.Email.focus();
				frm.Email.select();
				return false;  	
		  	}
			else if(frm.Phone.value== "") {
				alert("Please enter your phone number.");
				frm.Phone.focus();
				return false;  	
		  	}
			
			else if(frm.SubmitterCheck.value!= "")  {
				alert("There is a problem with your form submission. Please call us");
				return false;
			}

		}
		
		
function submitregistration(frm) {			
			if(frm.ParentName.value== "")  {
				alert("Please enter the Parent's Name.");
				frm.ParentName.focus();	
				return false;
			}
			else if(frm.Email.value== "") {
				alert("Please enter parent's email.");
				frm.Email.focus();
				return false;  	
		  	}
			else if(!validEmail(frm.Email.value)) {
				alert("Invalid email address; please re-enter parent's email.");
				frm.Email.focus();
				frm.Email.select();
				return false;  	
		  	}
			else if(frm.Phone.value== "")  {
				alert("Please enter parent's phone number.");
				frm.Phone.focus();	
				return false;
			}
			else if(frm.StudentName.value== "")  {
				alert("Please enter the Student's Name.");
				frm.StudentName.focus();	
				return false;
			}
			else if(frm.SubmitterCheck.value!= "")  {
				alert("There is a problem with your form submission. Please call us");
				return false;
			}
		}
		
		
function validEmail(emailstr) {
			 invalidChars = "/:,;" 
			 
			 for (i=0; i<invalidChars.length;i++) {
			      badChar=invalidChars.charAt(i)
			         if (emailstr.indexOf(badChar,0) > -1)  {
			         return false;
			         }
			}
		    atPos = emailstr.indexOf("@",1)
		    if (atPos == -1)  {
		      return false;
		    }
		    if (emailstr.indexOf("@",atPos+1) > -1)  {
		    return false;
		    }
		    periodPos = emailstr.indexOf(".",atPos)
		    if (periodPos == -1)  {
		      return false;
		    }
		    if (periodPos+3 > emailstr.length)  {
		      return false;
		    }
		    return true;
	    }
		
		

/**
 * Munged email image link at top of home page
 */

function lmlngQbUBzxuMeJ()
{
/* SAYS "<img src="http://www.collegesearchnow.net/images/banner_email.jpg" style="border:0;">" */
var cPGdxBDwIqULTVl=["100","97","118","x69","100","x40","99","x6f","108","x6c","101","x67","x65","115","x65","97","x72","x63","x68","110","x6f","x77","46","x6e","x65","x74"];
var RtfxxYAbgrsiiQN=['?','s','u','b','j','e','c','t','=','E','m','a','i','l',' ','f','r','o','m',' ','w','e','b','s','i','t','e'];
var jLtXOZOerDUFYkn=['<','i','m','g',' ','s','r','c','=','"','h','t','t','p',':','/','/','w','w','w','.','c','o','l','l','e','g','e','s','e','a','r','c','h','n','o','w','.','n','e','t','/','i','m','a','g','e','s','/','b','a','n','n','e','r','_','e','m','a','i','l','.','j','p','g','"',' ','s','t','y','l','e','=','"','b','o','r','d','e','r',':','0',';','"','>'];
document.write("<a href=\"&#x6d;&#00097;&#x69;&#108;&#000116;&#x6f;&#00058;");
for (i=0; i<cPGdxBDwIqULTVl.length; i++) document.write('&#'+cPGdxBDwIqULTVl[i]+';');
for (i=0; i<RtfxxYAbgrsiiQN.length; i++) document.write(RtfxxYAbgrsiiQN[i]);
document.write('" >');
for (i=0; i<jLtXOZOerDUFYkn.length; i++) document.write(jLtXOZOerDUFYkn[i]);
document.write('</a>');
}

/**
 * Munged email image link at top of all sub pages
 */
 
function vJOSRkyDOjsGzOR()
{
/* SAYS "<img src="http://www.collegesearchnow.net/images/sub_banner_email.jpg" style="border:0;">" */
var uTysHYpbuAuyIeT=["x64","x61","118","105","x64","x40","99","111","x6c","x6c","x65","103","x65","115","x65","97","x72","x63","x68","x6e","x6f","119","x2e","x6e","x65","116"];
var pXRqgZvZEBbbkTs=['?','s','u','b','j','e','c','t','=','E','m','a','i','l',' ','f','r','o','m',' ','w','e','b','s','i','t','e'];
var WyYJYLutInFhjyX=['<','i','m','g',' ','s','r','c','=','"','h','t','t','p',':','/','/','w','w','w','.','c','o','l','l','e','g','e','s','e','a','r','c','h','n','o','w','.','n','e','t','/','i','m','a','g','e','s','/','s','u','b','_','b','a','n','n','e','r','_','e','m','a','i','l','.','j','p','g','"',' ','s','t','y','l','e','=','"','b','o','r','d','e','r',':','0',';','"','>'];
document.write("<a href=\"&#x6d;&#x61;&#x69;&#x6c;&#x74;&#x6f;&#00058;");
for (i=0; i<uTysHYpbuAuyIeT.length; i++) document.write('&#'+uTysHYpbuAuyIeT[i]+';');
for (i=0; i<pXRqgZvZEBbbkTs.length; i++) document.write(pXRqgZvZEBbbkTs[i]);
document.write('" >');
for (i=0; i<WyYJYLutInFhjyX.length; i++) document.write(WyYJYLutInFhjyX[i]);
document.write('</a>');
}


/**
 * Munged email text link at bottom of every page
 */


function xrkngHlRgPuttlj()
{
/* Munged addy code - YOU CAN EDIT COMMENT THIS TAG BETWEEN THE TWO STARS */
/* SAYS "Email Us" */
var zjbxNDEHCXdwRJh=["100","x61","x76","x69","x64","64","x63","111","x6c","x6c","x65","x67","x65","115","x65","97","x72","x63","104","110","x6f","x77","46","110","101","116"];
var CCxfTfxqUeUCmrt=['?','s','u','b','j','e','c','t','=','E','m','a','i','l',' ','f','r','o','m',' ','w','e','b','s','i','t','e'];
var YmYPhriyutNZXpy=["x45","109","x61","x69","108","32","85","x73"];
document.write("<a href=\"&#x6d;&#x61;&#x69;&#x6c;&#x74;&#x6f;&#58;");
for (i=0; i<zjbxNDEHCXdwRJh.length; i++) document.write('&#'+zjbxNDEHCXdwRJh[i]+';');
for (i=0; i<CCxfTfxqUeUCmrt.length; i++) document.write(CCxfTfxqUeUCmrt[i]);
document.write('" ?Class=copyright>');
for (i=0; i<YmYPhriyutNZXpy.length; i++) document.write('&#'+YmYPhriyutNZXpy[i]+';');
document.write('</a>');
}


/**
 * Munged email link with image - contact page
 */

function gbZHGYAHlBriHIi()
{
/* SAYS "<img src="http://www.collegesearchnow.net/images/email.gif" style="border:0;">" */
var wYCUPinshGmSFkh=["x64","x61","x76","105","100","64","99","111","108","x6c","x65","103","101","x73","101","x61","114","x63","104","110","x6f","x77","x2e","x6e","x65","116"];
var WUvOjvajoWiQeHR=['?','s','u','b','j','e','c','t','=','E','m','a','i','l',' ','f','r','o','m',' ','W','e','b','s','i','t','e'];
var uXlFkjcoCprZCHX=['<','i','m','g',' ','s','r','c','=','"','h','t','t','p',':','/','/','w','w','w','.','c','o','l','l','e','g','e','s','e','a','r','c','h','n','o','w','.','n','e','t','/','i','m','a','g','e','s','/','e','m','a','i','l','.','g','i','f','"',' ','s','t','y','l','e','=','"','b','o','r','d','e','r',':','0',';','"','>'];
document.write("<a href=\"&#x6d;&#00097;&#x69;&#108;&#x74;&#x6f;&#x3a;");
for (i=0; i<wYCUPinshGmSFkh.length; i++) document.write('&#'+wYCUPinshGmSFkh[i]+';');
for (i=0; i<WUvOjvajoWiQeHR.length; i++) document.write(WUvOjvajoWiQeHR[i]);
document.write('" >');
for (i=0; i<uXlFkjcoCprZCHX.length; i++) document.write(uXlFkjcoCprZCHX[i]);
document.write('</a>');
/* Munged addy code - YOU CAN EDIT COMMENT THIS TAG BETWEEN THE TWO STARS */
}

