var ajax = new Array();

function getNewsList(sel)
{
	var newsCode = sel.options[sel.selectedIndex].value;
	document.getElementById('subtype').options.length = 0;	// Empty news_subtitle select box
	if(newsCode.length>0){
		var index = ajax.length;
		ajax[index] = new sack();
		
		ajax[index].requestFile = 'getPro.php?newsCode='+newsCode;	// Specifying which file to get
		ajax[index].onCompletion = function(){ createPro(index) };	// Specify function that will be executed after file has been found
		ajax[index].runAJAX();		// Execute AJAX function
	}
}

function createPro(index)
{
	var obj = document.getElementById('subtype');
	eval(ajax[index].response);	// Executing the response from Ajax as Javascript code	
}