// ------------------------------------------------------------- // © 2000 - 2006, Niche Mania - All Rights Reserved Worldwide... // ------------------------------------------------------------- var strGuid = ''; for(intCtr = 0; intCtr < 8; intCtr++) { intToss = rndGenerator(1, 0); if(intToss == 0) { intChr = rndGenerator(25, 65); strChr = chrConverter(intChr); } else { strChr = rndGenerator(8, 1); } strGuid += strChr; } function rndGenerator(intLow, intHgh) { intRnd = Math.round(Math.random() * intLow + intHgh); return intRnd; } function chrConverter(intChr) { var strChr = intChr.toString(16); strChr = unescape ('%'+strChr); return strChr; } function isUrl(strWebsite) { var regExp = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/ return regExp.test(strWebsite); } function isEmail(strEmail) { var regExp = /^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/ return regExp.test(strEmail); } function Validate() { var oForm = document.frmData; var boolReturn = false; if (oForm.txtName.value == '') { alert("Please enter your Name or a nickname to continue..."); oForm.txtName.focus(); return false; } if (oForm.txtWebsite.value != '') { if(!isUrl(oForm.txtWebsite.value)) { alert("If you are entering a URL to link to your website, it must be in a valid format..."); oForm.txtWebsite.focus(); return false; } } if(!isEmail(oForm.txtEmail.value)) { alert("Please enter a valid Email Address to continue..."); oForm.txtEmail.focus(); return false; } if (oForm.txtComments.value == '') { alert("Please enter your Comments to continue..."); oForm.txtComments.focus(); return false; } if (oForm.txtVerification.value != strGuid) { alert("The Verification Code you entered did not match the one displayed..."); oForm.txtVerification.focus(); return false; } if (oForm.chkTermsOfService.checked != true) { alert("You must Agree to the Terms Of Service in order to continue..."); oForm.chkTermsOfService.focus(); return false; } return true; } document.write(""+strGuid+"");