function RemoveString(TargetElement) { if (TargetElement.value != '') { TargetElement.value = ''; } TargetElement.select(); } function popUpImage(){ window.showModalDialog('http://www.wiseworldseminars.com/formprocessor/imageverification.php',window,'dialogWidth:500px;dialogHeight:400px;edge:Raised;center:Yes;help:No;status:No;scroll:1;'); } function cancelsubmit(msg,element){ alert(msg); document.getElementById(element).focus(); return false } function isNumeric(what){ if (what.search(/^[-+]?\d+(\.\d+)?$/) != -1) return true; else return false; } function isInteger(what){ if (what.search(/^[-+]?[1-9]\d*.?[0]*$/) != -1) return true; else return false; } function isEmail(what) { // Works if (what.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1) return true; else return false; } function isAlphanumeric(what){ // ANY alphanumeric string with spaces, commas, dashes. if (what.search(/^[a-zA-Z0-9\s.\-]+$/) != -1) return true; else return false; } function isAlphabetic(what){ if (what.search(/^[a-zA-Z\s]+$/) != -1) return true; else return false; } function noSpaces(what){ if (what.search(/\s/) != -1) return false; else return true; } function isCC(what){ if (what.search(/^((4\d{3})|(5[1-5]\d{2})|(6011))-?\d{4}-?\d{4}-?\d{4}|3[4,7]\d{13}$/) != -1) return true; else return false; } function wwsAFPvalidate(wwsAFPform){ if (wwsAFPexists('Teleclass')){ if (wwsAFPget('Teleclass').value==''){return cancelsubmit('Field \'Teleclass\' is required','Teleclass')} } if (wwsAFPexists('Email')){ if (!isEmail(wwsAFPget('Email').value)){return cancelsubmit('Field \'Email\' does not contain a valid e-mail address.','Email')} } if (wwsAFPexists('Email 2')){ if (!isEmail(wwsAFPget('Email 2').value)){return cancelsubmit('Field \'Email 2\' does not contain a valid e-mail address.','Email 2')} } } function wwsAFPget(what){ return(document.getElementById(what)); } function wwsAFPexists(what){ if (document.getElementById(what)) return true; else return false; } function toggleInstructions() { if(oBw.ie5||oBw.ns6){ //Disable function in unsupported browsers Istate = document.getElementById('instructions').style.display; if (Istate=='none') { Istate='block'; } else { Istate='none'; } document.getElementById('instructions').style.display=Istate; } } function toggleInstructionsOn() { if(oBw.ie5||oBw.ns6){ //Disable function in unsupported browsers Istate = document.getElementById('instructions').style.display; if (Istate=='none') { Istate='block'; } else { Istate='block'; } document.getElementById('instructions').style.display=Istate; } } //Toggle Alt Email Mandatory notation //switch layers for different browsers var ie4 = (document.all) ? true : false; var ns4 = (document.layers) ? true : false; var ns6 = (document.getElementById && !document.all) ? true : false; function hidelayer(lay) { if (ie4) {document.all[lay].style.visibility = 'hidden';} if (ns4) {document.layers[lay].visibility = 'hide';} if (ns6) {document.getElementById([lay]).style.display = 'none';} } function showlayer(lay) { if (ie4) {document.all[lay].style.visibility = 'visible';} if (ns4) {document.layers[lay].visibility = 'show';} if (ns6) {document.getElementById([lay]).style.display = 'block';} } function rollover_popup1(){ if(oBw.ie5||oBw.ns6){ document.write(""); document.write("  This is the text message for the rollover popup test. It should be need little decription for working the site."); } hidelayer('ini1_help'); }