function showHCSchedule(){
	window.open ("http://www.apatoday.com/hypnotherapiststraining/hypnosis-courses-schedule.html", "hypnosisClasses", "width=740,height=640,resizable=no,status=no,menubar=no,toolbar=no,location=no,scrollbars=1");
}

function showQSP(){
	window.open ("http://www.apatoday.com/enroll/quickstartpackage.html", "hypnosisClasses", "width=700,height=460,resizable=no,status=no,menubar=no,toolbar=no,location=no,scrollbars=no");
}

function showOptions(){
	window.open ("http://www.apatoday.com/enroll/quickmovers.html", "hypnosisClasses", "width=760,height=640,resizable=no,status=no,menubar=no,toolbar=no,location=no,scrollbars=yes");
}

function showPrivacy(){
	window.open ("http://www.apatoday.com/tou.html#privacy", "privacy", "width=700,height=500,resizable=no,status=no,menubar=no,toolbar=no,location=no,scrollbars=1");
}
function showTOU(){
	window.open ("http://www.apatoday.com/tou.html#terms", "terms", "width=700,height=500,resizable=no,status=no,menubar=no,toolbar=no,location=no,scrollbars=1");
}

function setNext(str)
	{
		nextP = 'http://www.apatoday.com';
		if (str=="gp2")
		{
  			nextP = 'http://knowthetruth.apatoday.com/ttabht_2.html';
  		}
  		else if (str=='H123Info')
  		{
			nextP = 'http://www.apatoday.com/infopack/readitnow.html';
		}
  		else if (str=='htg')
  		{
			nextP = 'http://www.apatoday.com/hypnotherapy-training-tobeawareof-video.html';
		}		
  		else if (str=='HTG-2')
  		{
			nextP = 'http://www.apatoday.com/hypnotherapy-training-curriculum.html';
		}
  		else if (str=='HF')
  		{
			nextP = 'http://www.hypnotherapiststraining.com/hypno-fertility.html';
		}
		else {return nextP;}
		return nextP;
	}


function setAR(frm){
	isAR = false;
	str = frm.Course.value;
	msgQ = '';
	nextP = '';
		
	if (str=='H123'){
		msgQ = '216069';
		nextP = 'http://www.apatoday.com/hypnotherapiststraining/hypnosis-certification.html';
		isAR = true;
	}
	else if (str=='HF'){
		msgQ = '407044';			
		nextP = 'http://www.apatoday.com/hypnotherapiststraining/hypno-fertility.html';
		isAR = true;
	}
	else if (str=='PT'){
		msgQ = '317522';			
		nextP = 'http://www.apatoday.com/hypnotherapiststraining/parts-therapy.html';
		isAR = true;
	}
	else if (str=='PM'){
		msgQ = '317524';			
		nextP = 'http://hypnotism.apaclasses.com.com/pain-management.html';
		isAR = true;
	}
	else if (str=='CH'){
		msgQ = '---';			
		nextP = 'http://hypnotism.apaclasses.com.com/pain-management-certification.html';
		isAR = true;
	}
	else if (str=='BW'){
		msgQ = '317521';			
		nextP = 'http://www.apatoday.com/hypnotherapiststraining/body-wisdom.html';
		isAR = true;
		
	}
	else if (str=='PLR'){
		msgQ = '317525';			
		nextP = 'http://www.apatoday.com/hypnotherapiststraining/regression-therapy-certification.html';
		isAR = true;
	}
	else {
		msgQ = '';
		nextP = '';
		isAR = false;
	}
	
	frm.defaultar.value = msgQ;
	frm.ARThankyouURL.value = nextP;
	return isAR;
}
function validate_required(field,alerttxt){
	with (field){
		if (value==null||value==""){
  			alert(alerttxt);return false;
  		}
		else {return true;}
	}
}
function validateCourse(thisform){
	
	with (thisform){
		if (validate_required(Name,"Please enter your name")==false){
  			Name.focus();
  			return false;
  		}
			
		else if (validateEmail(Email1,"Please provide valid primary email address")==false){
  			Email1.focus();
  			return false;				
  		}
  				
		else if (validate_required(Course,"Please select the course from the drop-down list box")==false){
  			Course.focus();
  			return false;
  		}
				
		else {
				return true;
		}
	}
}
function validateEmail(field,alerttxt){
	
	with (field){
		apos=value.indexOf("@");
		dotpos=value.lastIndexOf(".");
		if (apos<1||dotpos-apos<2) 
  			{alert(alerttxt);
  			value='';
  			return false;}
		else {return true;}
	}
}	
		

function setEnroll(theList){

	with (theList){
		if (value==''){
			alert('Please select the course from the drop-down list box');
			return false;
		}
		else if (value=='SH'){
			document.location='http://www.apatoday.com/enroll/self-hypnosis.html';
			return true;	
		}
		else if (value=='HC'){
			document.location='http://www.apatoday.com/enroll/hypnosis-course-101-103.html';
			return true;
		}
		else {return false;}
	}
}

