function chksearch(){with (document.all.searchform){if (keyword.value == ''){
alert('Please input a keyword !');keyword.focus();return false;}}}
function chkLogin(){with (document.getElementById('loginform')){
if (email.value == '' || !email.value.match(/^[\w\.\-]+@([\w\-]+\.)+[a-z]{2,4}$/ig)){
alert('Please input your email !');email.focus();return false;}
if (password.value == ''){alert('Please input your password !');password.focus();return false;}}}
function checkorder(){with (document.PostForm){
if (firstname.value.length < 2 || !firstname.value.match(/^[a-zA-Z]+$/g)){
alert('Please input your first name ! \n Name can contain only letters');firstname.focus();return false;}
if (lastname.value.length < 2 || !lastname.value.match(/^[a-zA-Z]+$/g)){alert('Please input your last name ! \n Name can contain only letters');
lastname.focus();return false;}
if (email.value == '' || !email.value.match(/^[\w\.\-]+@([\w\-]+\.)+[a-z]{2,4}$/ig)){
alert('Please input your email address !');email.focus();return false;}
if (usaphone1.value != ''){if (usaphone1.value.length != 3 || isNaN(usaphone1.value)){
alert('Phone can contain only numbers! \n This field must contain three numbers !');
usaphone1.focus();return false;}
if (usaphone2.value.length != 3 || isNaN(usaphone2.value)){
alert('Phone can contain only numbers! \n This field must contain three numbers !');
usaphone2.focus();return false;}
if (usaphone3.value.length != 4 || isNaN(usaphone3.value)){
alert('Phone can contain only numbers! \n This field must contain four numbers !');
usaphone3.focus();return false;}}
if (etcphone.value != ''){if (etcphone.value.length <5 || etcphone.value.length >20 || isNaN(etcphone.value) ){
alert('Please input your phone number !');etcphone.focus();return false;}}
if (usaphone1.value=='' && etcphone.value==''){alert('Please input your phone number !');usaphone1.focus();return false;}
if (charname.value == '' || charname.value.length>20){alert('Please input your character name !');charname.focus();return false;}}}
function switchdic(i,obja) {document.getElementById("gamelist").style.display=(i==0)?"block":"none";document.getElementById("plist").style.display=(i==0)?"none":"block";obja.style.className = "switchfocus";}