// survey function FRMSurveyStep1Submit() { if (FRMSurveyStep1.Fname.value == '') { alert("Please enter your first name."); FRMSurveyStep1.Fname.focus(); return false; } if (FRMSurveyStep1.Sname.value == '') { alert("Please enter your surname."); FRMSurveyStep1.Sname.focus(); return false; } if (FRMSurveyStep1.email.value.indexOf("@") < 0) { alert("Sorry that email format is incorrect, please check and re-enter.") FRMSurveyStep1.email.focus(); return false; } if (FRMSurveyStep1.email.value.indexOf(".") < 0) { alert("Sorry that email format is incorrect, please check and re-enter.") FRMSurveyStep1.email.focus(); return false; } if (FRMSurveyStep1.email.value.length < 7) { alert("Sorry that email format is incorrect, please check and re-enter.") FRMSurveyStep1.email.focus(); return false; } return true; } // forums function ReallyDeleteMessage(MessageID,ForumID,TopicID,PageID) { if (confirm("Are you sure you want to delete this message?")) { window.location.href = '/index.cfm/pageID/'+PageID+'/ViewReplys/'+TopicID+'/ForumID/'+ForumID+'/TopicID/'+TopicID+'/editmessageid/' + MessageID + '/Moderate/3/deletemessage/yes'; } } function ForumMoveMessage() { if (FRMForumMoveMessage.newforumid.value == '') { alert("Please select a topic to move this message to."); FRMForumMoveMessage.newforumid.focus(); return false; } if (FRMForumMoveMessage.existingforumid.value == FRMForumMoveMessage.newforumid.value) { alert("Please select a topic to move this message to."); FRMForumMoveMessage.newforumid.focus(); return false; } return true; } function ForumMoveTopic() { if (FRMForumMoveTopic.newtopicid.value == '') { alert("Please select a topic to move this message to."); FRMForumMoveTopic.newtopicid.focus(); return false; } if (FRMForumMoveTopic.existingtopicid.value == FRMForumMoveTopic.newtopicid.value) { alert("Please select a topic to move this message to."); FRMForumMoveTopic.newtopicid.focus(); return false; } return true; } // Contact Form Validation function contactsubmit() { if (FRMContact.contact_name.value == '') { alert("Please enter your name."); FRMContact.contact_name.focus(); return false; } if (FRMContact.contact_Email.value == '') { alert("Please enter your email address."); FRMContact.contact_Email.focus(); return false; } if (FRMContact.contact_Email.value.indexOf("@") < 0) { alert("Sorry that email format is incorrect, please check and re-enter.") FRMContact.contact_Email.focus(); return false; } if (FRMContact.contact_Email.value.indexOf(".") < 0) { alert("Sorry that email format is incorrect, please check and re-enter.") FRMContact.contact_Email.focus(); return false; } if (FRMContact.contact_Email.value.length < 7) { alert("Sorry that email format is incorrect, please check and re-enter.") FRMContact.contact_Email.focus(); return false; } if (FRMContact.contact_subject.value == '') { alert("Please enter a subject."); FRMContact.contact_subject.focus(); return false; } if (FRMContact.contact_comments.value == '') { alert("Please enter your comments."); FRMContact.contact_comments.focus(); return false; } return true; } // Extranet Login Form Validation function extranetloginsubmit() { if (FRMLogin.user_email.value == '') { alert("Please enter your email address"); FRMLogin.user_email.focus(); return false; } if (FRMLogin.user_password.value == '') { alert("Please enter your password"); FRMLogin.user_password.focus(); return false; } return true; } // Extranet Registration Form Validation function extranetregistrationsubmit() { if (FRMRegister.Fname.value == '') { alert("Please enter your first name"); FRMRegister.Fname.focus(); return false; } if (FRMRegister.Sname.value == '') { alert("Please enter your surname"); FRMRegister.Sname.focus(); return false; } if (FRMRegister.email.value == '') { alert("Please enter your email address"); FRMRegister.email.focus(); return false; } if (FRMRegister.email.value.indexOf("@") < 0) { alert("Sorry that email format is incorrect, please check and re-enter.") FRMRegister.email.focus(); return false; } if (FRMRegister.email.value.indexOf(".") < 0) { alert("Sorry that email format is incorrect, please check and re-enter.") FRMRegister.email.focus(); return false; } if (FRMRegister.email.value.length < 7) { alert("Sorry that email format is incorrect, please check and re-enter.") FRMRegister.email.focus(); return false; } if (FRMRegister.address1.value == '') { alert("Please enter your address"); FRMRegister.address1.focus(); return false; } if (FRMRegister.city.value == '') { alert("Please enter your city"); FRMRegister.city.focus(); return false; } if (FRMRegister.user_password.value == '') { alert("Please enter your password"); FRMRegister.user_password.focus(); return false; } if (FRMRegister.user_password.value.length < 3) { alert("Please enter a password that is more than 3 characters long.") FRMRegister.user_password.focus(); return false; } if (FRMRegister.user_password_confirm.value == '') { alert("Please enter your password confirmation"); FRMRegister.user_password_confirm.focus(); return false; } if (FRMRegister.user_password.value != FRMRegister.user_password_confirm.value ) { alert("Your password and password confirmation do not match.\nPlease make sure your password and password confirmation are the same"); FRMRegister.user_password_confirm.focus(); return false; } return true; } // Extranet Registration Form Validation function extranetregistrationupdate() { if (FRMRegister.Fname.value == '') { alert("Please enter your first name"); FRMRegister.Fname.focus(); return false; } if (FRMRegister.Sname.value == '') { alert("Please enter your surname"); FRMRegister.Sname.focus(); return false; } //basic email address syntax validation if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(FRMRegister.email.value) == false) { alert("Invalid E-mail Address! Please re-enter."); return false; } /* if (FRMRegister.companyname.value == '') { alert("Please enter your Practice name"); FRMRegister.companyname.focus(); return false; } */ if (FRMRegister.address1.value == '') { alert("Please enter your address"); FRMRegister.address1.focus(); return false; } if (FRMRegister.city.value == '') { alert("Please enter your city"); FRMRegister.city.focus(); return false; } if (FRMRegister.user_password.value == '') { alert("Please enter your password") FRMRegister.user_password.focus(); return false; } if (FRMRegister.user_password.value.length < 3) { alert("Please enter a password that is more than 3 characters long.") FRMRegister.user_password.focus(); return false; } if (FRMRegister.user_password.value != FRMRegister.user_password_confirm.value ) { alert("Your password and password confirmation do not match.\nPlease make sure your password and password confirmation are the same"); FRMRegister.user_password_confirm.value=''; FRMRegister.user_password_confirm.focus(); return false; } if (FRMRegister.disclaimer.checked == false) { alert("You must accpet the site Terms & Conditions to proceed."); FRMRegister.disclaimer.focus(); return false; } return true; } //Standard Functions function open_new(url) { new_win = window.open(url,"new_win",'toolbar=0,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=1'); } function open_email(url) { new_email = window.open(url,"new_email",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0, width=450, height=500'); } function open_print(url) { new_print = window.open(url,"new_print",'toolbar=1,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0, width=630, height=600'); } //Activeedit JS to handle custome links function aeapi_custom_DynHyperlink(aeNum) { ae_hot=aeNum; DHTMLSafe=aeObjects[aeNum]; DHTMLSafe.focus(); DHTMLSafe.DOM.body.focus(); if(DHTMLSafe.DOM.selection.type=="Control") { var el=DHTMLSafe.DOM.selection.createRange().commonParentElement(); var tr = DHTMLSafe.DOM.body.createTextRange(); tr.moveToElementText(el); tr.select(); } if (typeof(ae_linkwin) == "undefined" || ae_linkwin.closed) { //short circuit eval var szURL=inc + "hyperlink.cfm"; ae_linkwin = window.open(szURL ,"ae_linkwin","scrollbars=auto,width=360,height=220, resizable=yes",true); } ae_linkwin.focus(); } function aeapi_custom_insertFile(aeNum) { //if the focus never touched the control, you get an error, so lets touch the control DHTMLSafe=aeObjects[aeNum]; DHTMLSafe.focus(); if (typeof(ae_filewin) == "undefined" || ae_filewin.closed) { //short circuit eval //spawn image window var szURL; szURL=inc + "file.cfm?instance=" + aeNum; szURL+="&filedata="; szURL+=ae_filedata[aeNum]; szURL+="&fileurl="; szURL+=ae_fileurl[aeNum]; ae_filewin = window.open(szURL ,"ae_filewin","scrollbars=yes,status=yes,width=650,height=400, resizable=yes"); } ae_filewin.focus(); } //insert the image function onFile(u, base_url, y, itext, num) { DHTMLSafe=aeObjects[num]; var img = "" + itext + ""; DHTMLSafe.DOM.selection.createRange().pasteHTML(img); ae_filewin.close(); } function ae_fileProperties(aeNum) { DHTMLSafe=aeObjects[aeNum]; DHTMLSafe.focus(); if (typeof(ae_filepropwin) == "undefined" || ae_filepropwin.closed) { //short circuit eval //spawn image properties window var szURL=inc + "fileProperties.htm?instance=" + num; ae_filepropwin = window.open(szURL ,"ae_filepropwin","scrollbars=no,width=370,height=305, resizable=no"); } ae_filepropwin.focus(); } // // navigation function sendToPage(toLocation) { if (toLocation != "") top.location.href=toLocation; } // open view photo window function viewphoto (photoid,winwidth,winheight,viewthumb) { var TheUrl = siteurl; var newwinwidth = winwidth + 30; var newwinheight = winheight + 30; //alert (viewthumb); if (viewthumb == 1) { window.open(TheUrl + 'pop_viewphoto.cfm?photoid=' + photoid+'&viewthumb=yes', "ViewPhoto", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=1,width=" +newwinwidth+",height=" +newwinheight+",top=0,left=0"); } else { window.open(TheUrl + 'pop_viewphoto.cfm?photoid=' + photoid, "ViewPhoto", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=1,width=" +newwinwidth+",height=" +newwinheight+",top=0,left=0"); } } // open view photo window function viewslideshow (photoid,winwidth,winheight,categoryid,viewthumb) { var TheUrl = siteurl; var newwinwidth = winwidth + 50; var newwinheight = winheight + 50; //alert (TheUrl); if (viewthumb == 1) { window.open(TheUrl + 'pop_viewslideshow.cfm?photoid=' + photoid+'&categoryid='+categoryid+'&viewthumb=yes', "ViewPhoto", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=1,width=" +newwinwidth+",height=" +newwinheight+",top=0,left=0"); } else { window.open(TheUrl + 'pop_viewslideshow.cfm?photoid=' + photoid+'&categoryid='+categoryid, "ViewPhoto", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=1,width=" +newwinwidth+",height=" +newwinheight+",top=0,left=0"); } } var slidespeed=5000 var slideimages=new Array(siteurl+"images/slide01.gif",siteurl+"images/slide02.gif",siteurl+"images/slide03.gif",siteurl+"images/slide04.gif",siteurl+"images/slide05.gif",siteurl+"images/slide06.gif",siteurl+"images/slide07.gif",siteurl+"images/slide08.gif",siteurl+"images/slide09.gif",siteurl+"images/slide10.gif",siteurl+"images/slide11.gif") var slidelinks=new Array("go.asp?pageid=2") var newwindow=0 var imageholder=new Array() var ie=document.all for (i=0;i