function qty()
{
if(document.member.indPost.value=='' && document.member.indAca.value=='' && document.member.indCorp.value=='' )
{
alert('Enter the Quantity');
return false;
}

 

if(isNaN(document.member.indPost.value))

		{
			alert("Enter the Numeric value");
			document.member.indPost.focus();
			return false;

		}
		
if(isNaN(document.member.indAca.value))
{
	alert("Enter the Numeric value");
	document.member.indAca.focus();	
			return false;

}

if(isNaN(document.member.indCorp.value))
{

alert("Enter the Numeric value");
document.member.indCorp.focus();
return false;

}
	 
} 

function login()
{
 

if(document.login_form.usernamelogin.value=='')	
{
alert('Enter Your User Name');
document.login_form.usernamelogin.focus();
return false;
}

if(document.login_form.pass.value=='')	
{
alert('Enter Your Password');
document.login_form.pass.focus();
return false;
}

document.login_form.submit();	
}





function getState(id){
	
	//alert("hi"+id);
		xmlHttp=GetXmlHttpObject();
	
if (xmlHttp==null)
  {
  alert("Your browser does not support AJAX!");
  return;
  } 
		var url="ajax_common.php";
		url=url+"?con_id="+id;		
		
		xmlHttp.onreadystatechange=showState;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		
}


function getState1(id){
	
	//alert("hi"+id);
		xmlHttp=GetXmlHttpObject();
	
if (xmlHttp==null)
  {
  alert("Your browser does not support AJAX!");
  return;
  } 
		var url="ajax_common.php";
		url=url+"?con_id1="+id;		
		
		xmlHttp.onreadystatechange=showState;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		
}



function getcity(id){
	
	 //alert("hi"+id);
		xmlHttp=GetXmlHttpObject();
	
if (xmlHttp==null)
  {
  alert("Your browser does not support AJAX!");
  return;
  } 
		var url="ajax_common.php";
		url=url+"?city_id="+id;		
		
		xmlHttp.onreadystatechange=showcity;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		
}



function showState(){
	
	if (xmlHttp.readyState==4){ 
	
		document.getElementById("statediv").innerHTML=xmlHttp.responseText;
	}
	
}

function showcity(){
	
	if (xmlHttp.readyState==4){ 
	
		document.getElementById("citydiv").innerHTML=xmlHttp.responseText;
	}
	
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}


