// Extend Searchapa JavaScript Document
var ajax = new sack();

function getPHOList(sel)
{
	var countryCode = sel.options[sel.selectedIndex].value;
	document.getElementById('phospecregion').options.length = 0;	// Empty city select box
	if(countryCode.length>0){
		ajax.requestFile = 'ajaxcombophospecmsa.php?countryCode='+countryCode;	// Specifying which file to get
		ajax.onCompletion = createPhoSpec;	// Specify function that will be executed after file has been found
		ajax.runAJAX();		// Execute AJAX function
	}
}

function createPhoSpec()
{
	var obj = document.getElementById('phospecregion');
	eval(ajax.response);	// Executing the response from Ajax as Javascript code	
}


function getAFFList(sel)
{
	var countryCode = sel.options[sel.selectedIndex].value;
	document.getElementById('affspecregion').options.length = 0;	// Empty city select box
	if(countryCode.length>0){
		ajax.requestFile = 'ajaxcomboaffspecmsa.php?countryCode='+countryCode;	// Specifying which file to get
		ajax.onCompletion = createAffSpec;	// Specify function that will be executed after file has been found
		ajax.runAJAX();		// Execute AJAX function
	}
}

function createAffSpec()
{
	var obj = document.getElementById('affspecregion');
	eval(ajax.response);	// Executing the response from Ajax as Javascript code	
}


function getASTList(sel)
{
	var countryCode = sel.options[sel.selectedIndex].value;
	document.getElementById('astspecregion').options.length = 0;	// Empty city select box
	if(countryCode.length>0){
		ajax.requestFile = 'ajaxcomboastspecmsa.php?countryCode='+countryCode;	// Specifying which file to get
		ajax.onCompletion = createAstSpec;	// Specify function that will be executed after file has been found
		ajax.runAJAX();		// Execute AJAX function
	}
}

function createAstSpec()
{
	var obj = document.getElementById('astspecregion');
	eval(ajax.response);	// Executing the response from Ajax as Javascript code	
}


