var ajax = new sack();
function getStateList(arg1)
{
	var countryCode = arg1;
	document.getElementById('state').options.length = 0;	// Empty city select box
	document.getElementById('city').options.length = 0;
	if(countryCode.length>0){
		ajax.requestFile = 'getState.php?countryCode='+countryCode;	// Specifying which file to get
		ajax.onCompletion = createState;	// Specify function that will be executed after file has been found
		ajax.runAJAX();		// Execute AJAX function
	}
	
	
}
function getCityList(arg1)
{
	
	var stateCode = arg1;
	document.getElementById('city').options.length = 0;	// Empty city select box
	if(stateCode.length>0){
		ajax.requestFile = 'getCities.php?StateCode='+stateCode;	// Specifying which file to get	
		ajax.onCompletion = createCities;	// Specify function that will be executed after file has been found
		ajax.runAJAX();		// Execute AJAX function
	}

	
}
function createState()
{
	var obj = document.getElementById('state');
	eval(ajax.response);	// Executing the response from Ajax as Javascript code	
}

function createCities()
{
	var obj = document.getElementById('city');
	eval(ajax.response);	// Executing the response from Ajax as Javascript code	
}