CS Friends Club 2009 – Mentor Registration September 5, 2009 adminUncategorized University ID Number: * Name: * (English) (Nickname) Gender: Male Female Telephone Number: * (Mobile) Email: * MSN: Facebook: CS Login: {source} <script>var field=new Array(“UID”, “Eng”, “Email”, “Mobile”, “CSLogin”); function AutoComplete(){ document.getElementById(“Msn”).value = document.getElementById(“Email”).value; document.getElementById(“Facebook”).value = document.getElementById(“Email”).value; } function isNull(fname){ if(document.getElementById(fname).value == “”) return true; else return false; } function validate(){ var error =””; var warn = “The following field cannot be null: “; var i = 0; while(i < 4){ if(isNull(field[i++])){ warn += field[i-1]; alert(warn); return false; } } if(!isFinite(document.getElementById(“UID”).value) || document.getElementById(“UID”).value < 1999000000 || document.getElementById(“UID”).value >= 2010000000){ alert(“Please input valid UID (e.g 2009XXXXXX.)”); return false; } var apos=document.getElementById(“Email”).value.indexOf(“@”); var dotpos=document.getElementById(“Email”).value.lastIndexOf(“.”); if(apos<1||dotpos-apos<2){ alert(“Please input valid Email.”); return false; } if(!isFinite(document.getElementById(“Mobile”).value)){ alert(“Please input valid telephone number”); return false; } setTimeout(“window.location.reload()”,2000); return true; }</script> {/source}