var ajax = new sack();

function getTypesList(sel)
{
	var typeCode = sel.options[sel.selectedIndex].value;
	document.getElementById('ttypes').options.length = 0;	
	if(typeCode.length>0){
		ajax.requestFile = 'apps/Ajax/SelectParamsLoad.php?id='+typeCode;	// Specifying which file to get
		ajax.onCompletion = createTypes;	// Specify function that will be executed after file has been found
		ajax.runAJAX();		// Execute AJAX function
	}
}

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


