function VerifySteps() {
var txt = "";	

	for(var i = 0; i < document.frmsteps.dev_id.length; i++) {
	if(document.frmsteps.dev_id[i].selected) {
		if(document.frmsteps.dev_id[i].value=="") {
		  txt = txt + "\n * Select Devision";
		}
	}
	}
	
	if (document.frmsteps.ms_id) {
	for(var i = 0; i < document.frmsteps.ms_id.length; i++) {
	if(document.frmsteps.ms_id[i].selected) {
		if(document.frmsteps.ms_id[i].value=="") {
		  txt = txt + "\n * Select Service";
		}
	}
	}
	}
	
	if (document.frmsteps.ss_id) {
	for(var i = 0; i < document.frmsteps.ss_id.length; i++) {
	if(document.frmsteps.ss_id[i].selected) {
		if(document.frmsteps.ss_id[i].value=="") {
		  txt = txt + "\n * Select Sub Category";
		}
	}
	}
	}
	
	if (document.frmsteps.name.value=="") {
	 txt = txt + "\n * Name";
	}
	
	var str=document.frmsteps.email.value
	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i 
	if (!filter.test(str)) {
	 txt = txt + "\n * Email is not Valid";
	}
	
	for(var i = 0; i < document.frmsteps.advmethod_id.length; i++) {
	if(document.frmsteps.advmethod_id[i].selected) {
		if(document.frmsteps.advmethod_id[i].value=="") {
		  txt = txt + "\n * How did you hear about us?";
		}
	}
	}
	
	if (txt) {
		alert ("The folowing fields are required:\n" + txt);
		return false;
	}
	
}

//Change Temrs for the 	Book Forms

function ChangeTerms() {
	var pagesObj = document.getElementById("dev_id"); 
	var str = pagesObj.options[pagesObj.selectedIndex].value; 
	if ((str == 2) || (str == 3) || (str == 4)) {
		document.getElementById("terms_id").style.display = "block";
	} else {
		document.getElementById("terms_id").style.display = "none";
	}
}

//Verify Agents Registration Form

function verify_reg() {
var txt = "";
	

	var str=document.frmregister.email.value
	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i 
	if (!filter.test(str)) {
	 txt = txt + "\n * Email is not Valid";
	}
	if (document.frmregister.password.value=="") {
	 txt = txt + "\n * Password";
	}
	if ((document.frmregister.password.value!="") && (document.frmregister.password.value.length < 7)) {
	 txt = txt + "\n * The Password must be at least 7 symbols";
	}
	if (document.frmregister.repassword.value=="") {
	 txt = txt + "\n * Re-type Password";
	}
	if ((document.frmregister.password.value!="") && (document.frmregister.repassword.value!="") && (document.frmregister.password.value!=document.frmregister.repassword.value)) {
		txt = txt + "\n * Type same password twice";
	}
	if (document.frmregister.name.value=="") {
	 txt = txt + "\n * Name";
	}

	
	if (document.frmregister.telephone.value=="") {
	 txt = txt + "\n * Telephone";
	}
	if (document.frmregister.address.value=="") {
	 txt = txt + "\n * Address";
	}
	
	for(var i = 0; i < document.frmregister.country_id.length; i++) {
	if(document.frmregister.country_id[i].selected) {
		if(document.frmregister.country_id[i].value=="") {
		  txt = txt + "\n * Country";
		}
	}
	}
	
	if (!document.frmregister.terms.checked) {
	 txt = txt + "\n\n * You have to accept our terms and conditions";
	}
	
	if (txt) {
		alert ("The folowing fields are required:\n" + txt);
		return false;
	}	
}
