function validateForm()
{
	var c=document.forms["registration"]["password"].value;
    	if (c==null || c=="")
    	{
    		alert("please Enter Password");
      		return false;
    	}
    	var d=document.forms["registration"]["confpass"].value;
    	if (d==null || d=="")
    	{
      		alert("please Enter Confirm password");
      		return false;
    	}
      	if(c!=d)
	{
        	alert("PassWord Doesn't match..");
       		return false;
      	}
	var e=document.forms["registration"]["email"].value;
    	if (e==null || e=="")
    	{
    	 	alert("please Enter Email");
    	  	return false;
    	}
    	else
   	{
   		var mailformat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
        	if(e.match(mailformat))
        	{
        		document.RForm.Email.focus();
       		}
        	else
        	{
        		alert("You have entered an invalid email address!");
        		document.RForm.Email.focus();
        		return false;
        	}
	}
	var f=document.forms["registration"]["age"].value;
    	if(isNaN(f)|| f.indexOf(" ")!=-1)
       	{
                alert("Enter numeric value");
                return false;
       	}
	if(isNaN(i)|| i.indexOf(" ")!=-1)
       	{
                alert("Enter numeric value");
                return false;
       	}           
}
var xmlHttp;  
var xmlHttp;
function showState(str)
{
    
      if (typeof XMLHttpRequest != "undefined")
      {
        xmlHttp= new XMLHttpRequest();
      }
      else if (window.ActiveXObject)
      {
        xmlHttp= new ActiveXObject("Microsoft.XMLHTTP");
      }
      if (xmlHttp==null)
      {
        alert("Browser does not support XMLHTTP Request");
        return;
      } 
      var url="state.jsp";
      url +="?count=" +str;
      xmlHttp.onreadystatechange = stateChange;
      xmlHttp.open("GET", url, true);
      xmlHttp.send(null);
  }
function stateChange()
{   
      if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
      {   
        document.getElementById("state").innerHTML=xmlHttp.responseText;   
      }   
}