// JavaScript Document
function fnStateId()
{
	//alert(id);
	
	xmlHttp=GetXmlHttpObject();
	
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request");
		return
	} 
	
	var ship_state_val = document.getElementById("shipping_state").value;
	
	var url = "state_zone_id.php?state_id="+ship_state_val;
	
//	url = url+"?state_id="+id+"&amt="+amt;
//	url = url+"?state_id="+id;	
	
	//alert(url);
	
	xmlHttp.onreadystatechange=state_freight;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}



function state_freight() 
{ 
	//alert(xmlHttp.responseText);
	if (xmlHttp.readyState==1) /* show bussy for getting result from DB */ 
   	{ 																			
        document.getElementById("show_state_freight_price").innerHTML = '&nbsp;<img src=/images/ajax-loader.gif border=0 />'; 
       // document.getElementById("id_track_detail").innerHTML = ''; 
  
    }
	else
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("show_state_freight_price").innerHTML=xmlHttp.responseText; 
		// eval is used to execute any command that is given to it.
		// Here is serves to redirect the page
		//alert(xmlHttp.responseText);
		//eval(xmlHttp.responseText);
	} 
}
