function show (str) { document.getElementById("show").innerHTML = document.getElementById(str).innerHTML; } function validEmail(email) { invalidChars = " /:,;"; if (email == "") return false; for (i=0; i-1) return false; } atPos = email.indexOf("@",1); if (atPos == -1) return false; if (email.indexOf("@",atPos+1) != -1) return false; periodPos = email.indexOf(".",atPos); if (periodPos == -1) return false; if (periodPos+3 > email.length) return false; return true; } function checklogin(chkForm) { if (chkForm.email.value == "") { alert("No Email !"); chkForm.email.focus(); return false; } if (chkForm.pwd.value == "") { alert("No Password !"); chkForm.pwd.focus(); return false; } if (!validEmail(chkForm.email.value)) { alert("Invalid email address. Please enter your email address again."); chkForm.email.focus(); return false; } } function checknew(chkForm) { if (chkForm.email.value == "") { alert("No Email !"); chkForm.email.focus(); return false; } if (chkForm.pwd.value == "") { alert("No Password !"); chkForm.pwd.focus(); return false; } if (chkForm.nick.value == "") { alert("No Nickname !"); chkForm.nick.focus(); return false; } if (!validEmail(chkForm.email.value)) { alert("Invalid email address. Please enter your email address again."); chkForm.email.focus(); return false; } } function checkactive(chkForm) { var acode = chkForm.acode.value; var uacode = chkForm.uacode.value; if (acode != uacode) { alert("Activate Code NOT MATACH !"); chkForm.uacode.focus(); return false; } if (chkForm.email.value == "") { alert("No Email !"); chkForm.email.focus(); return false; } if (!validEmail(chkForm.email.value)) { alert("Invalid email address. Please enter your email address again."); chkForm.email.focus(); return false; } } function alert_msg() { var pg = document.getElementById("pg").value; var fos = 'Congratulations, the submission is successful.\n The closing date is 28th Feb 2010.\n Voting starts on 08th March 2010. Good Luck!'; var lda = 'Congratulations, the submission is successful.\n The closing date is 15th Feb 2010.\n Voting starts on 22th March 2010. Good Luck!'; if(pg == 'fos') { alert(fos); } else { alert(lda); } } function vote_msg() { var msg = 'voting starts on 8th March 2010 and finished on 14th March 2010'; alert(msg); } function login(pg) { var r=confirm("Join Our Competition !"); if (r==true) { window.location = 'http://sagami.myroka.com/competitions.php?pg=' + pg + '&fc=co'; } else { alert("Sorry, You cannot vote !!"); } } function checklink(chkForm) { if (chkForm.link.value == "") { alert("Please Paste your linking !"); chkForm.link.focus(); return false; } }