function pleaseWait(){ pwaitwindow=dhtmlmodal.open('TPWaitHome', 'iframe', '\/regpleasewait.htm', 'Warning: Please Wait', 'width=500px,height=400px,center=1,resize=0,scrolling=0') } function ranID() { var raid = Math.round(Math.random()*9000000000); return (raid); } function sndMsg(tms) { var iwin; if(navigator.userAgent.indexOf("Safari")!=-1) { iwin=frames["proffi"]; } else { iwin=document.getElementById("proffi").contentWindow; } iwin.location='http://forum.teledos.gr/profset/proffields.htm#'+tms; } var srch=''; function chGen() { if (location.hash!=srch) { srch=location.hash; var pr1='='+document.getElementById("NewUserPass2").value.replace(/[^\w*!.]/g,'_'); var pr2=encodeURIComponent(pr1); var pr3='='+document.getElementById("Email").value.replace(/=/g,'%3D'); var pr4=encodeURIComponent(pr3); var pr5='='+document.getElementById("Avatar").value.replace(/=/g,'%3D'); var pr6=encodeURIComponent(pr5); var pr7='='+document.getElementById("avatarURL").value.replace(/=/g,'%3D'); var pr8=encodeURIComponent(pr7); if (srch.indexOf('start')!=-1) { sndMsg('tDnps'+pr2); } else if (srch.indexOf('npsok')!=-1) { sndMsg('tDeml'+pr4); } else if (srch.indexOf('emlok')!=-1) { sndMsg('tDava'+pr6); } else if (srch.indexOf('avaok')!=-1) { sndMsg('tDUav'+pr8); } else if (srch.indexOf('avuok')!=-1) { sndMsg('tDsub'); } else if (srch.indexOf('submited')!=-1) { document.getElementById("chfrm").submit(); } else { srch=location.hash; } } } function yah() { var em=document.getElementById("UEml").value; var lc=em.toLowerCase(); var nok="yahoo"; var euc="allok"; if (lc.match(/yahoo/i)=="yahoo"||lc.match(/ymail./i)=="ymail."||lc.match(/rocketmail./i)=="rocketmail.") { return (nok); } else { return (euc); } } function tdosm() { var emt=document.getElementById("UEml").value; var lct=emt.toLowerCase(); return (lct.match(/teledos/i)) } function pf() { var emp=document.getElementById("UEml").value; var lcp=emp.toLowerCase(); return (lcp.match(/pathfinder/i)) } function input(ok) { var re=/<\S[^><]*>/gi; var ev=/on[a-f,k-m,r,s,u][b,e,h,l,n,o,r,u]|script|usemap/gi; var M1=ok.UsrID.value; if (M1=="") { alert("User ID is empty! Please login in to change your profile's info!"); window.top.location.href='http://forum.teledos.gr:2006/loginfirst.htm'; return false; } M1=ok.UsrP.value; if (M1=="") { ok.UsrP.focus(); alert("User Password is empty!"); return false; } M1=ok.NUsrP.value; if (M1.length>0&&M1.length<6) { ok.NUsrP.focus(); alert("New Password must have at least 6 characters!"); return false; } if (ok.NUsrP.value!=ok.NUsrP2.value) { ok.NUsrP2.select(); alert("The two new passwords that you typed do not match!"); return false; } if (ok.preEmail.value=="") { ok.preEmail.focus(); alert("Email is empty!"); return false; } if (ok.UEml.value=="") { ok.UEml.focus(); alert('Please re-type your email at the "Confirm email address" field!'); return false; } if (ok.preEmail.value!=ok.UEml.value) { ok.UEml.select(); alert("The two emails that you typed do not match!"); return false; } if (yah()=="yahoo") { ok.preEmail.select(); alert(" We only accept accounts with valid emails except yahoo mails!\n Please do not use your yahoo mail in your registration data \n (teleDOS Forum Site is compatible with all the other email providers)."); return false; } if (tdosm()=="teledos"&&ok.UsrID.value!="CRSMARAM") { ok.preEmail.select(); alert(" We only accept accounts with valid emails except teledos mails!\n Please do not use your teledos mail in your registration data \n (teleDOS Forum Site is compatible with all the other email providers)."); return false; } if (pf()=="pathfinder") { ok.preEmail.select(); alert(" We only accept accounts with valid emails except pathfinder.gr mails!\n Please do not use your pathfinder mail in your registration data \n (teleDOS Forum Site is compatible with all the other email providers)."); return false; } isEmail1=/^\w+([\.\-]\w+)*\@\w+([\.\-]\w+)*\.\w+$/; isEmail2=/^.*@[^_]*$/; if(isEmail1.test(ok.UEml.value)&&isEmail2.test(ok.UEml.value)) { } else { ok.preEmail.select(); alert("Email address is Invalid!"); return false; } if (ok.pidcode.value!=pidnumcle()) { ok.pidcode.select(); alert(" The PID Code that you typed do not match with this one in the email you\n received from us! Please check your email again to find the right PID Code."); return false; } ava1=ok.UAva.selectedIndex; ava2=ok.UAvaURL.value; if (ava1>0&&ava2.length>0) { ok.UAva.selectedIndex=0; ok.UAvaURL.select(); alert(" Please select only one avatar: either one avatar from gallery\n or one off-site avatar (URL), not the two of them together."); return false; } var avaddrss=ok.UAvaURL.value.replace(re,""); avaddrss=avaddrss.replace(ev,'illeg'); if (navigator.userAgent.toLowerCase().indexOf('opera')==-1) { pleaseWait(); } document.getElementById("pidcode").disabled=true; document.getElementById("frmUserID").value=ok.UsrID.value; document.getElementById("frmUserPass").value=ok.UsrP.value; document.getElementById("NewUserPass").value=ok.NUsrP.value; document.getElementById("NewUserPass2").value=ok.NUsrP2.value; document.getElementById("Email").value=ok.UEml.value; document.getElementById("Avatar").value=ok.UAva.options[ok.UAva.selectedIndex].text; document.getElementById("avatarURL").value=avaddrss; document.getElementById("prcha").disabled=true; location.hash='#start'; setInterval('chGen()',450); return false; } function onpreview() { window.open("/preload.htm"); } function logfir() { var conf=confirm("To change your profile's info: please press the 'OK' button to login in!"); if (conf==true) { window.top.location.href='http://forum.teledos.gr:2006/loginfirst.htm'; } } function emvalid() { var emval1=document.getElementById("preEmail").value; var emval2=document.getElementById("UEml").value; if (emval1=="") { document.getElementById("preEmail").focus(); alert("Email is empty!"); return false; } if (emval2=="") { document.getElementById("UEml").focus(); alert('Please re-type your email at the "Confirm email address" field!'); return false; } if (emval1!=emval2) { document.getElementById("UEml").select(); alert("The two emails that you typed do not match!"); return false; } if (yah()=="yahoo") { document.getElementById("preEmail").select(); alert(" We only accept accounts with valid emails except yahoo mails!\n Please do not use your yahoo mail in your registration data \n (teleDOS Forum Site is compatible with all the other email providers)."); return false; } if (tdosm()=="teledos"&&document.getElementById("UsrID").value!="CRSMARAM") { document.getElementById("preEmail").select(); alert(" We only accept accounts with valid emails except teledos mails!\n Please do not use your teledos mail in your registration data \n (teleDOS Forum Site is compatible with all the other email providers)."); return false; } if (pf()=="pathfinder") { document.getElementById("preEmail").select(); alert(" We only accept accounts with valid emails except pathfinder.gr mails!\n Please do not use your pathfinder mail in your registration data \n (teleDOS Forum Site is compatible with all the other email providers)."); return false; } isEmail1=/^\w+([\.\-]\w+)*\@\w+([\.\-]\w+)*\.\w+$/; isEmail2=/^.*@[^_]*$/; if(isEmail1.test(emval2)&&isEmail2.test(emval2)) { } else { document.getElementById("preEmail").select(); alert("Email address is Invalid!"); return false; } document.getElementById("validateb").disabled=true; document.getElementById("prcha").disabled=false; document.getElementById("preEmail").disabled=true; document.getElementById("UEml").disabled=true; pidfield(); return true; } function dal() { if (navigator.userAgent.toLowerCase().indexOf('opera')!=-1) { alert(" teleDOS Site is fully compatible with Microsoft Internet Explorer and FireFox! \n For full functionality, please use one of the aforesaid browsers!"); } } function cont() { var ptexta='Email validation: *'; var ptextb='http://forum.teledos.gr/SeMl/pcac.htm'; document.getElementById("perida").innerHTML=ptexta; document.getElementById("peridb").src=ptextb; } function contue() { var jun=document.getElementById("UsrID").value; var jcapid=pidnum(); var juem=document.getElementById("UEml").value; var pfietxtb='http://forum.teledos.gr/SeMl/pcacem.htm?un='+jun+'&capid='+jcapid+'&uem='+juem; var pfietxta='PID Code: *'; document.getElementById("perida").innerHTML=pfietxta; document.getElementById("peridb").src=pfietxtb; } function sererr() { var pfietxtberr='/pcemerr.htm'; var ptextaerr='Email validation: *'; var ptextcerr='  '; document.getElementById("perida").innerHTML=ptextaerr; document.getElementById("peridc").innerHTML=ptextcerr; document.getElementById("peridb").src=pfietxtberr; } function prepid() { var ran1=Math.round(Math.random()*900000); var ptextc='  '; document.getElementById("peridc").innerHTML=ptextc; } function pidfield() { var ran2=Math.round(Math.random()*900000); var pfietxtc='  '; document.getElementById("peridc").innerHTML=pfietxtc; } function breakout() { if (window.top!=window.self) { window.top.location.href=window.self.location.href; } } breakout(); function passwordChanged() { var strength = document.getElementById('strength'); 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.getElementById("NUsrP"); if (pwd.value.length==0) { strength.innerHTML = '   Type New Password Above'; } else if (false == enoughRegex.test(pwd.value)) { strength.innerHTML = '           More Characters'; } else if (strongRegex.test(pwd.value)) { strength.innerHTML = '                   Strong!'; } else if (mediumRegex.test(pwd.value)) { strength.innerHTML = '                   Medium!'; } else { strength.innerHTML = '                    Weak!'; } } function frares() { var uatlc=navigator.userAgent.toLowerCase(); if (uatlc.indexOf('firefox')!=-1) { document.getElementById('proffi').height='477'; } else if (uatlc.indexOf('opera')!=-1) { document.getElementById('proffi').height='480'; } else if (uatlc.indexOf('chrome')!=-1) { document.getElementById('proffi').height='484'; } else if (uatlc.indexOf('safari')!=-1) { document.getElementById('proffi').height='515'; } else { document.getElementById('proffi').height='486'; } } function CleRefr() { document.getElementById('chfrm').reset(); document.getElementById('temfrm').reset(); sndMsg('tDres'+ranID()); document.getElementById('UsrP').focus(); document.getElementById('validateb').disabled=false; document.getElementById('prcha').disabled=true; document.getElementById('preEmail').disabled=false; document.getElementById('UEml').disabled=false; passwordChanged(); document.getElementById('UAva').selectedIndex=document.getElementById('avstor').value; prelava(); } function ClearV1() { pdnm(); store(); prepid(); CleRefr(); } function avaout(aso,awi,ahi) { document.getElementById("storava").innerHTML=''; var nhi=(ahi/awi)*200; if (awi>200) { document.getElementById("avaimg").width="200"; document.getElementById("avaimg").height=nhi; document.getElementById("avaimg").src=aso; document.getElementById("avaimg").width="200"; } else { document.getElementById("avaimg").width=awi; document.getElementById("avaimg").height=ahi; document.getElementById("avaimg").src=aso; document.getElementById("avaimg").width=awi; } } function prelava() { var selava=document.getElementById("UAva").options[document.getElementById("UAva").selectedIndex].text; var wriava=document.getElementById("UAvaURL").value; if (wriava!=""&&selava==""||wriava!=""&&selava!="") { document.getElementById("storava").innerHTML=''; } else if (wriava==""&&selava!="") { document.getElementById("storava").innerHTML=''; } else { document.getElementById("storava").innerHTML=''; } }