// JavaScript DocumentIE=document.all;function MM_jumpMenu(targ,selObj,restore){ //v3.0  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");  if (restore) selObj.selectedIndex=0;}function MM_preloadImages() { //v3.0  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}}function MM_swapImgRestore() { //v3.0  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;}function MM_findObj(n, d) { //v4.01  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);  if(!x && d.getElementById) x=d.getElementById(n); return x;}function MM_swapImage() { //v3.0  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}}function changeTextSize(DivName,Size,showImage,showImageClass,hideImages,hideImagesClass) {		var arVersion = navigator.appVersion.split("MSIE")	var version = parseFloat(arVersion[1])		document.cookie = "TextSize=Size=" + Size + "&ShowImage=" + showImage + "&showImageClass=" + showImageClass + "&HideImages=" + hideImages + "&hideImagesClass=" + hideImagesClass + "; path=/;";		if(IE){		document.getElementById(showImage).setAttribute("className", showImageClass);	} else {		document.getElementById(showImage).setAttribute("class", showImageClass);		}		var arrHideImages = new Array();	arrHideImages = hideImages.split(",");		var arrhideImagesClass = new Array();	arrhideImagesClass = hideImagesClass.split(",");		for(i=0;i<arrHideImages.length;i++) {	if(IE){		document.getElementById(arrHideImages[i]).setAttribute("className", arrhideImagesClass[i]);	} else {		document.getElementById(arrHideImages[i]).setAttribute("class", arrhideImagesClass[i]);		}	}		if (document.getElementById(DivName)){ 	var DivID = document.getElementById(DivName);	DivID.style.fontSize = Size;		DivID = document.getElementById(DivName).getElementsByTagName('th');		for(i=0;i<DivID.length;i++) {		DivID[i].style.fontSize = Size;		}		DivID = document.getElementById(DivName).getElementsByTagName('td');		for(i=0;i<DivID.length;i++) {		DivID[i].style.fontSize = Size;		}		}}function cleartext(thisfield) {		if (thisfield.defaultValue == thisfield.value){	thisfield.value = "";		if (thisfield.id == 'password_text'){		document.getElementById('p_password').style.display = "";		document.getElementById('password_login').focus();		document.getElementById('t_password').style.display = "none";	}	}}function validate_vacancy_search(){if (document.searchform.keywords.value == "" || document.searchform.keywords.value == "Enter keywords here..."){alert("Please include a least one keyword!");return false;}else{return true;}}function validate_candidate_search(){jobtitle = new String(document.searchform.jobtype.value);var isClientGroups = false;for(i=0;i<document.searchform.clientgroups.length;i++){	if(document.searchform.clientgroups[i].checked == true){		isClientGroups = true;	}}var isTypeService = false;for(i=0;i<document.searchform.typeservice.length;i++){	if(document.searchform.typeservice[i].checked == true){		isTypeService = true;	}}var isDaysTimes = false;for(i=0;i<document.searchform.daystimes.length;i++){	if(document.searchform.daystimes[i].checked == true){		isDaysTimes = true;	}}if (jobtitle != 'Personal Assistant' && (document.searchform.jobtype.options[0].selected == true || document.searchform.job1.options[document.searchform.job1.selectedIndex].value == 0 || document.searchform.yearsexp.options[0].selected == true)){alert("Please complete all required fields!");return false;}else if (jobtitle == 'Personal Assistant' && (document.searchform.gender.options[0].selected == true || document.searchform.ethnicity.options[0].selected == true || document.searchform.age.options[0].selected == true || isClientGroups == false || isTypeService == false || isDaysTimes == false)){alert("Please complete all required fields!");return false;}else{return true;}}function revealPersonal(){jobtitle = new String(document.searchform.jobtype.value);jobtitle = jobtitle.substring(jobtitle.indexOf(":")+1,jobtitle.length);	if (jobtitle == 'Personal Assistant') {		document.getElementById("personal").style.display = "";		document.getElementById("jobs").style.display = "none";		} else {		document.getElementById("personal").style.display = "none";		document.getElementById("jobs").style.display = "";	}}function checkDaysTimes(checkVal){var DaysTimesLength = document.searchform.daystimes.length;var isChecked = true;for(i=0;i<DaysTimesLength;i++){if(document.searchform.daystimes[i].value.indexOf(checkVal) != -1){	if(document.searchform.daystimes[i].checked == false){		isChecked = false;	}}}for(i=0;i<DaysTimesLength;i++){if(document.searchform.daystimes[i].value.indexOf(checkVal) != -1){	if(isChecked == true){		document.searchform.daystimes[i].checked = false;	} else {		document.searchform.daystimes[i].checked = true;	}}}}function validate_login(){if (document.login.email.value == "" || document.login.email.value == "Enter your email address here..." || document.login.password.value == ""){alert("Please include an email address and password!");return false;}else{return true;}}function validate_forgotten_password(){if (document.forgotten_password.email.value == ""){alert("Please include your email address!");return false;}else{return true;}}function validate_employer_registration_1(){var str=document.register.email.valuevar at="@"var dot="."var lat=str.indexOf(at)var lstr=str.lengthvar ldot=str.indexOf(dot)var strongRegex = new RegExp("^(?=.{8,})(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*\\W).*$", "g");var mediumRegex = new RegExp("^(?=.{7,})(((?=.*[A-Z])(?=.*[a-z]))|((?=.*[A-Z])(?=.*[0-9]))|((?=.*[a-z])(?=.*[0-9]))).*$", "g");var enoughRegex = new RegExp("(?=.{6,}).*", "g");var pwd = document.register.MC_password.value;var ReqFields = "";if (document.register.regtype.value == "Employer" && (document.register.MC_company.value == "" || document.register.MC_company.value == "Enter company name")) {ReqFields += "Company Name\n"}if (document.register.name.value == "" || document.register.name.value == "Enter contact name") {ReqFields += "Contact Name\n"}if (document.register.address.value == "" || document.register.address.value == "Enter street address") {ReqFields += "Street Address\n"}if (document.register.MC_town.value == "" || document.register.MC_town.value == "Enter town/city") {ReqFields += "Town or City\n"}if (document.register.county.options[0].selected == true) {ReqFields += "County\n"}if (document.register.MC_postcode.value == "" || document.register.MC_postcode.value == "Enter postcode") {ReqFields += "Postcode\n"}if (document.register.email.value == "" || document.register.email.value == "Enter email address") {ReqFields += "Email\n"}if (document.register.MC_password.value == "" || document.register.MC_password.value == "Enter password") {ReqFields += "Password\n"}if (ReqFields != ""){alert("Please fill in the following fields:-\n\n" + ReqFields);return false;}else if (str.indexOf(at)==-1){alert("Please enter a valid email address!")return false}else if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){alert("Please enter a valid email address!")return false}else if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){alert("Please enter a valid email address!")return false}else  if (str.indexOf(at,(lat+1))!=-1){alert("Please enter a valid email address!")return false}else if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){alert("Please enter a valid email address!")return false}else if (str.indexOf(dot,(lat+2))==-1){alert("Please enter a valid email address!")return false}else if (str.indexOf(" ")!=-1){alert("Please enter a valid email address!")return false}else if (false == enoughRegex.test(pwd)) {alert("For security, please ensure your password is at least 6 characters in length and is preferably alphanumeric!");return false;}else{if (mediumRegex.test(pwd)) {answer = confirm("For security, we recommend your password is made up of letters, numbers and puncutation. The password you have chosen has been classified as medium.\n\nAre you sure you want to continue?")if (answer !=0){return true;} else {return false;}} else if (!mediumRegex.test(pwd) || !strongRegex.test(pwd)) {answer = confirm("For security, we recommend your password is made up of letters, numbers and puncutation.The password you have chosen has been classified as weak.\n\nAre you sure you want to continue?")if (answer !=0){return true;} else {return false;}} else {return true;}}}function validate_employer_registration_2(){var bolService = false;var bolSupported = false;var bolPrinciple = false;if (document.register.regtype.value == "Employer"){for (i=0;i<document.register.service.length;i++) {	if (document.register.service[i].checked == true){		bolService = true;	}}}if (document.register.regtype.value == "Employer"){for (i=0;i<document.register.people_supported.length;i++) {	if (document.register.people_supported[i].checked == true){		bolSupported = true;	}}}for (i=0;i<document.register.princple_needs.length;i++) {	if (document.register.princple_needs[i].checked == true){		bolPrinciple = true;	}}if (document.register.MC_companytype.options[0].selected == true){alert("Please choose Type of Organisation!");return false;}else if (document.register.regtype.value != 'Direct Payments Employer' && bolSupported == false){alert("Please select at least one option from People Supported!");return false;}else if (document.register.regtype.value != 'Direct Payments Employer' && bolService == false){alert("Please select at least one option from Main Types of Service!");return false;}else if (bolPrinciple == false){alert("Please select at least one option from Principle Needs!");return false;}else if (document.register.regtype.value == "Employer" && (document.register.service[8].checked == true && document.register.service_other_value.value == "")){alert("Please complete Other Type of Service field!");return false;}else if (document.register.regtype.value == "Employer" && (isNaN(document.register.total_staff.value) && document.register.total_staff.value != "")){alert("For total staff, please enter numeric values only!");return false;}else {return true;}}function otherService() {		if (document.register.service[8].checked == true){				document.getElementById("Service_Other").style.display = "";			} else {				document.getElementById("Service_Other").style.display = "none";			}}function delConfirm(Alert){answer = confirm(Alert + "\nThis function cannot be undone.")if (answer !=0){return true;} else {return false;}}function validate_vacancy(){var formlength=document.vacancy.description.value;formlength=formlength.split(" ");var count = formlength.length;var suffixl = "";var filel = document.vacancy.jobdesc.value;if (filel != ""){var suffixl = filel.split(".");var i = suffixl.length;var suffixl = suffixl[i - 1];var suffixl = suffixl.toLowerCase();}var suffixs = "";var files = document.vacancy.appform.value;if (files != ""){var suffixs = files.split(".");var i = suffixs.length;var suffixs = suffixs[i - 1];var suffixs = suffixs.toLowerCase();}if (document.vacancy.jobtitle.value == "" || document.vacancy.jobtitle.value == "Enter job title" || document.vacancy.company.value == "" || document.vacancy.contact.value == "" || document.vacancy.location.value == "" || document.vacancy.location.value == "Enter job location" || document.vacancy.email.value == "" || document.vacancy.jobtype.options[0].selected == true || document.vacancy.renumeration.value == "" || document.vacancy.renumeration.value == "Enter salary" || document.vacancy.description.value == "" || document.vacancy.description.value == "Enter the description of the job"){alert("Please fill in all required fields!");return false;}else if ((document.vacancy.day) && (document.vacancy.day.options[0].selected == true || document.vacancy.month.options[0].selected == true || document.vacancy.year.options[0].selected == true)){alert("Please fill in all required fields!");return false;}else if (document.vacancy.expiry && document.vacancy.expiry.value == ""){alert("Please fill in all required fields!");return false;}else if (document.vacancy.job.value == 0){alert("Please choose a job type!");return false;}else if ((suffixl != "" && suffixl != "doc" && suffixl != "pdf") || (suffixs != "" && suffixs != "doc" && suffixs != "pdf")){alert("Please only upload documents in Microsoft Word of PDF format!")return false}else if (count > 2000){alert("Please enter no more than 2000 characters for your job description!");return false;}else{return true;}}function validate_vacancy_work_experience(){if (document.vacancy.job.options[0].selected == true || document.vacancy.yearsexp.options[0].selected == true){alert("Please fill in all required fields!");return false;}else{return true;}}function validate_qualification_experience(){if (document.vacancy.qualification.options[0].selected == true){alert("Please fill in all required fields!");return false;}else{return true;}}function searchDaysTimes(checkVal){var DaysTimesLength = document.searchform.daystimes.length;var isChecked = true;for(i=0;i<DaysTimesLength;i++){if(document.searchform.daystimes[i].value.indexOf(checkVal) != -1){	if(document.searchform.daystimes[i].checked == false){		isChecked = false;	}}}for(i=0;i<DaysTimesLength;i++){if(document.searchform.daystimes[i].value.indexOf(checkVal) != -1){	if(isChecked == true){		document.searchform.daystimes[i].checked = false;	} else {		document.searchform.daystimes[i].checked = true;	}}}}function validate_candidate_registration_1(){var str=document.register.email.valuevar at="@"var dot="."var lat=str.indexOf(at)var lstr=str.lengthvar ldot=str.indexOf(dot)var suffix = "";var file = document.register.cv.value;if (file != ""){var suffix = file.split(".");var i = suffix.length;var suffix = suffix[i - 1];}var suffix1 = "";var file1 = document.register.profile.value;if (file1 != ""){var suffix1 = file1.split(".");var i = suffix1.length;var suffix1 = suffix1[i - 1];}var strongRegex = new RegExp("^(?=.{8,})(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*\\W).*$", "g");var mediumRegex = new RegExp("^(?=.{7,})(((?=.*[A-Z])(?=.*[a-z]))|((?=.*[A-Z])(?=.*[0-9]))|((?=.*[a-z])(?=.*[0-9]))).*$", "g");var enoughRegex = new RegExp("(?=.{6,}).*", "g");if (document.register.password){var pwd = document.register.password.value;}var ReqFields = "";if (document.register.firstname.value == "" || document.register.firstname.value == "Enter first name") {ReqFields += "First Name\n"}if (document.register.surname.value == "" || document.register.surname.value == "Enter surname") {ReqFields += "Surname\n"}if (document.register.address1.value == "" || document.register.address1.value == "Enter street address") {ReqFields += "Street Address\n"}if (document.register.town.value == "" || document.register.town.value == "Enter town/city") {ReqFields += "Town or City\n"}if (document.register.county.options[0].selected == true) {ReqFields += "County\n"}if (document.register.postcode.value == "" || document.register.postcode.value == "Enter postcode") {ReqFields += "Postcode\n"}if (document.register.ethnicity.options[0].selected == true) {ReqFields += "Ethnicity\n"}if (document.register.gender.options[0].selected == true) {ReqFields += "Gender\n"}if (document.register.hearabout){if (document.register.hearabout.options[0].selected == true) {ReqFields += "Heard About Us?\n"}}if (document.register.driver){if (document.register.driver.options[0].selected == true) {ReqFields += "Do you Drive?\n"}}if (document.register.accesscar){if (document.register.accesscar.options[0].selected == true) {ReqFields += "Do you have Access to a Car?\n"}}if ((document.register.telephone.value == "" || document.register.telephone.value == "Enter telephone number") && (document.register.mobile.value == "" || document.register.mobile.value == "Enter mobile number")) {ReqFields += "Telephone or Mobile\n"}if (document.register.email.value == "" || document.register.email.value == "Enter email address") {ReqFields += "Email\n"}if (document.register.password){if (document.register.password.value == "" || document.register.password.value == "Enter password") {ReqFields += "Password\n"}}if (ReqFields != ""){alert("Please fill in the following fields:-\n\n" + ReqFields);return false;}else if (suffix != "" && suffix != "doc" && suffix != "pdf" && suffix != "rtf"){alert("Please only upload CV in MS Word or PDF format!")return false}else if (suffix1 != "" && suffix1 != "jpg"){alert("Please only upload profile picture as a JPG!")return false}else if (str.indexOf(at)==-1){alert("Please enter a valid email address!")return false}else if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){alert("Please enter a valid email address!")return false}else if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){alert("Please enter a valid email address!")return false}else  if (str.indexOf(at,(lat+1))!=-1){alert("Please enter a valid email address!")return false}else if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){alert("Please enter a valid email address!")return false}else if (str.indexOf(dot,(lat+2))==-1){alert("Please enter a valid email address!")return false}else if (str.indexOf(" ")!=-1){alert("Please enter a valid email address!")return false}else if (false == enoughRegex.test(pwd)) {alert("For security, please ensure your password is at least 6 characters in length and is preferably alphanumeric!");return false;}else{if (document.register.password){if (mediumRegex.test(pwd)) {answer = confirm("For security, we recommend your password is made up of letters, numbers and puncutation. The password you have chosen has been classified as medium.\n\nAre you sure you want to continue?")if (answer !=0){return true;} else {return false;}} else if (!mediumRegex.test(pwd) || !strongRegex.test(pwd)) {answer = confirm("For security, we recommend your password is made up of letters, numbers and puncutation.The password you have chosen has been classified as weak.\n\nAre you sure you want to continue?")if (answer !=0){return true;} else {return false;}}} else {return true;}}}function validate_candidate_registration_2(){var isServiceArea = false;var isService = false;var isDaysTimes = false;if (document.personal.typeservicearea){for(i=0;i<document.personal.typeservicearea.length;i++){	if(document.personal.typeservicearea[i].checked == true){		isServiceArea = true;	}}}if (document.personal.typeservice){for(i=0;i<document.personal.typeservice.length;i++){	if(document.personal.typeservice[i].checked == true){		isService = true;	}}}if (document.personal.daystimes){for(i=0;i<document.personal.daystimes.length;i++){	if(document.personal.daystimes[i].checked == true){		isDaysTimes = true;	}}}var ReqFields = "";if (isServiceArea == false && document.personal.typeservicearea) {ReqFields += "Type of Service Area\n"}if (isService == false && document.personal.typeservice) {ReqFields += "Type of Service\n"}if (isDaysTimes == false && document.personal.daystimes) {ReqFields += "Days Available for Work\n"}if (document.personal.distance){if (document.personal.distance.options[0].selected == true) {ReqFields += "Distance Willing to Travel\n"}}if (document.personal.smoker){if (document.personal.smoker.options[0].selected == true) {ReqFields += "Do you Smoke?\n"}}if (document.personal.crbdate){if (document.personal.crbdate.options[0].selected == true) {ReqFields += "Have you had a CRB check in the last 3 years?\n"}}if (ReqFields != ""){alert("Please fill in the following fields:-\n\n" + ReqFields);return false;} else {return true;}}function checkDaysTimes(checkVal){var DaysTimesLength = document.personal.daystimes.length;var isChecked = true;for(i=0;i<DaysTimesLength;i++){if(document.personal.daystimes[i].value.indexOf(checkVal) != -1){	if(document.personal.daystimes[i].checked == false){		isChecked = false;	}}}for(i=0;i<DaysTimesLength;i++){if(document.personal.daystimes[i].value.indexOf(checkVal) != -1){	if(isChecked == true){		document.personal.daystimes[i].checked = false;	} else {		document.personal.daystimes[i].checked = true;	}}}}function validate_candidate_registration_4(){if (document.jobalert.jobsearch1.options[0].selected == true || document.jobalert.jobsearch1Exp.options[0].selected == true){alert("Please choose at least one job from the first menu!");return false;}else{return true;}}function validate_personal_message(){if (document.personal_message.personal_message.value == ""){alert("Please include your embed code!");return false;}else{return true;}}function validate_work_experience(){if (document.work_experience.job.options[0].selected == true || document.work_experience.job.value == 0 || document.work_experience.employer.value == "" || document.work_experience.employer.value == "Enter name" || document.work_experience.monthfrom.options[0].selected == true || document.work_experience.yearfrom.options[0].selected == true || document.work_experience.description.value == "" || document.work_experience.description.value == "Enter a description of the work here."){alert("Please fill in all required fields!");return false;}else if (document.work_experience.monthto.options[0].selected == true && document.work_experience.yearto.options[0].selected == true && document.work_experience.present.checked == false){alert("Please choose either an end date or check the box if you are still in this job!");return false;}else if (document.work_experience.present.checked == false){if (document.work_experience.monthto.options[0].selected == true || document.work_experience.yearto.options[0].selected == true){alert("Please choose an end month and an end year for your last employment!");return false;}}else{return true;}}function validate_qualification(){if (document.education.qualification.options[0].selected == true || document.education.monthfrom.options[0].selected == true || document.education.yearfrom.options[0].selected == true || document.education.monthto.options[0].selected == true || document.education.yearto.options[0].selected == true || document.education.subject.value == "" || document.education.subject.value == "Enter subject" || document.education.grade.value == "" || document.education.grade.value == "Enter grade/level" || document.education.institution.value == "" || document.education.institution.value == "Enter institution name"){alert("Please fill in all required fields!");return false;}else{return true;}}function validate_account_details(){var str=document.account_details.email.valuevar at="@"var dot="."var lat=str.indexOf(at)var lstr=str.lengthvar ldot=str.indexOf(dot)var strongRegex = new RegExp("^(?=.{8,})(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*\\W).*$", "g");var mediumRegex = new RegExp("^(?=.{7,})(((?=.*[A-Z])(?=.*[a-z]))|((?=.*[A-Z])(?=.*[0-9]))|((?=.*[a-z])(?=.*[0-9]))).*$", "g");var enoughRegex = new RegExp("(?=.{6,}).*", "g");var pwd = document.account_details.password.value;var ReqFields = "";if (document.account_details.email.value == "") {ReqFields += "Email\n"}if (document.account_details.password.value == "") {ReqFields += "Password\n"}if (ReqFields != ""){alert("Please fill in the following fields:-\n\n" + ReqFields);return false;}else if (str.indexOf(at)==-1){alert("Please enter a valid email address!")return false}else if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){alert("Please enter a valid email address!")return false}else if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){alert("Please enter a valid email address!")return false}else  if (str.indexOf(at,(lat+1))!=-1){alert("Please enter a valid email address!")return false}else if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){alert("Please enter a valid email address!")return false}else if (str.indexOf(dot,(lat+2))==-1){alert("Please enter a valid email address!")return false}else if (str.indexOf(" ")!=-1){alert("Please enter a valid email address!")return false}else if (false == enoughRegex.test(pwd)) {alert("For security, please ensure your password is at least 6 characters in length and is preferably alphanumeric!");return false;}else if (document.account_details.jobsearch1.options[0].selected == true || document.account_details.jobsearch1Exp.options[0].selected == true){alert("Please choose at least one job from the first menu in Job Alerts!");return false;}else{if (mediumRegex.test(pwd)) {answer = confirm("For security, we recommend your password is made up of letters, numbers and puncutation. The password you have chosen has been classified as medium.\n\nAre you sure you want to continue?")if (answer !=0){return true;} else {return false;}} else if (!mediumRegex.test(pwd) || !strongRegex.test(pwd)) {answer = confirm("For security, we recommend your password is made up of letters, numbers and puncutation.The password you have chosen has been classified as weak.\n\nAre you sure you want to continue?")if (answer !=0){return true;} else {return false;}} else {return true;}}}function validate_match(){var bolFound = falsefor (i=0;i<document.matchform.matchtype.length;i++){	if (document.matchform.matchtype[i].checked == true) {		bolFound = true;	}}if (bolFound == false){alert("Please choose an option from the list!");return false;}else{return true;}}function initialize(Latitude,Longitude,DivID,Zoom) {  var myLatlng = new google.maps.LatLng(Latitude, Longitude);  var myOptions = {    zoom: Zoom,    center: myLatlng,    mapTypeId: google.maps.MapTypeId.ROADMAP  }  var map = new google.maps.Map(document.getElementById(DivID), myOptions);    var marker = new google.maps.Marker({      position: myLatlng,	  map: map  });	marker.setMap(map);}function validate_contact(){var str=document.contact.email.valuevar at="@"var dot="."var lat=str.indexOf(at)var lstr=str.lengthvar ldot=str.indexOf(dot)if (document.contact.name.value == "" || document.contact.enquiry.value == ""){alert("Please complete all required fields!");return false;}else if (document.contact.email.value == "" && document.contact.telephone.value == ""){alert("Please include either an email address or telephone number!");return false;}else if (str != ""){if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){alert("Please enter a valid email address!")return false}else if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){alert("Please enter a valid email address!")return false}else if (str.indexOf(dot,(lat+2))==-1){alert("Please enter a valid email address!")return false}else if (str.indexOf(" ")!=-1){alert("Please enter a valid email address!")return false}}else{return true;}}
