var aCh="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; var dCh="0123456789-"; var sCh="ÀÂÃÄÅÆÇÈÉÊËÌÍÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿŠŒŽšœžŸ'_`~()^&*+-|=<>,./\{}[] "; var asCh=aCh + dCh + "!\"#$%&'()*+,-./:;<=>?@[\]^_`{}~"; function isAlphaNum(S) { var AlphaNum=aCh + dCh; for (var i=0; i < S.length; i++) { if (AlphaNum.indexOf(S.charAt(i)) == -1) return false; } return true; } function isASCII(S) { for (var i=0; i < S.length; i++) { if (asCh.indexOf(S.charAt(i)) == -1) return false; } return true; } function isName(S) { var cName=aCh + dCh + sCh; for (var i=0; i < S.length; i++) { if (cName.indexOf(S.charAt(i)) == -1) return false; } return true; } function isEmail(S) { var pass=0; if (window.RegExp) { var tempS="a"; var tempReg=new RegExp(tempS); if (tempReg.test(tempS)) pass=1; } if (!pass) return (S.indexOf(".") > 2) && (S.indexOf("@") > 0); var r1=new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)"); var r2=new RegExp("^[a-zA-Z0-9\\.\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\}\\~]*[a-zA-Z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\}\\~]\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$"); return (!r1.test(S) && r2.test(S)); } function checkForm() { if (document.mf.realname.value.length <1) { alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your name."); document.mf.realname.focus(); return false; } if (document.mf.email.value.length <1) { alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your email address."); document.mf.email.focus(); return false; } else { dmn = document.mf.email.value.substr(document.mf.email.value.indexOf("@")+1,document.mf.email.value.length); if((document.mf.email.value.indexOf("@")<1) ||(dmn.indexOf("@")>-1) || (dmn.indexOf(".")<1) || (dmn.indexOf(".")>dmn.length-2)) { alert("Please type a valid email address.\nEx : (email@domainname.com)."); document.mf.email.focus(); return false; } } if (document.mf.comment.value.length <1) { alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your comment."); document.mf.comment.focus(); return false; } document.mf.submit(); } function RequestForm() { // Check Name cNameError = ""; if (document.EntryForm.Name.value.length<1) { cNameError ="Your Name is empty.\n"; } else { if (!isName(document.EntryForm.Name.value)){ cNameError = "Name is invalid. Please use 0-9, A-Z, "+sCh+"\n"; } } // Check the Email cEmailError = ""; if (document.EntryForm.Email.value.length <1) { cEmailError ="Your email address is empty.\n"; } else { if(!isEmail(document.EntryForm.Email.value)) { cEmailError ="Your email address is invalid.\ne.g. : (email@domainname.com).\n"; } } // Check Message cMessageError = ""; if (document.EntryForm.Message.value.length <1) { cMessageError ="Your Message is empty.\n"; } cError = cNameError + cEmailError + cMessageError; if (cError.length>0) { alert("Sorry, but you haven\'t filled out all fields required correctly.\n"+cError); if (cNameError.length>0) { document.EntryForm.Name.focus(); } else { if (cEmailError.length>0) { document.EntryForm.Email.focus(); } else { if (cMessageError.length>0) { document.EntryForm.Message.focus(); } } } return false; } document.EntryForm.submit(); } function OpenWindow(theImage,Width,Height,Caption) { //v2.0 popUp=window.open('', '','width='+Width+',height='+Height); popUp.document.write("Fremantle Computing - Image Gallery - "+Caption+""); popUp.document.write(""); } function checkPass() { if (document.mf.username.value.length <1) { alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your user name."); document.mf.username.focus(); return false; } if (document.mf.password.value.length <1) { alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your password."); document.mf.password.focus(); return false; } if (document.mf.newpass.value.length <1) { alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your new password."); document.mf.newpass.focus(); return false; } document.mf.submit(); } function checkContent() { if (document.mf.username.value.length <1) { alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your user name."); document.mf.username.focus(); return false; } if (document.mf.password.value.length <1) { alert("Sorry, but you haven\'t filled out all fields required.\nPlease enter your password."); document.mf.password.focus(); return false; } document.mf.submit(); }