function checkname(){
var username=document.getElementById("textfield1").value;
if(username==""){
document.getElementById("p1").innerHTML="User name cannot be empty";
return false;
}else {
document.getElementById("p1").innerHTML="";
}
}
function checkpassword(){
var password=document.getElementById("textfield2").value;
if(password==""){
document.getElementById("p2").innerHTML="Password name cannot be empty";
return false;
}else{
document.getElementById("p2").innerHTML="";
}
}
function checkpassword1(){
var password=document.getElementById("textfield2").value;
var password1=document.getElementById("textfield3").value;
if(password1==""){
document.getElementById("p3").innerHTML="Please enter the password again";
return false;
}else if(password1!=password){
document.getElementById("p3").innerHTML="Two password input is not consistent";
return false;
}else{
document.getElementById("p3").innerHTML="";
}
}
function checkage(){
var age=document.getElementById("textfield4").value;
var reg = new RegExp("^([0-9]|[0-9]{2}|100)$");
if(age==""){
document.getElementById("p4").innerHTML="Please enter the age";
return false;
}else if(!reg.test(age)){
document.getElementById("p4").innerHTML="Age error";
return false;
}
else{
document.getElementById("p4").innerHTML="";
}
}
function checkmobile(){
var mobile=document.getElementById("textfield5").value;
var reg_mobile= new RegExp("^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$");
if(mobile==""){
document.getElementById("p5").innerHTML="Please enter the mobile";
return false;
}else if(!reg_mobile.test(mobile)){
document.getElementById("p5").innerHTML="Mobile error";
return false;
}
else{
document.getElementById("p5").innerHTML="";
}
}
function checkname(){ var username=document.getElementById("textfield1").value; if(username==""){ document.getElementById("p1").innerHTML="User name cannot be empty"; return false; }else { do