/* AJAX - USING GET 				*/
/* Based on 'Chained select boxes' 
   available on http://www.htmlgoodies.com/ (C)
   on  February 2006  by Alf Magne Kalleland */

	var ajax = new sack();
	var PrimObj;
	var SecObj;
	var LoadingObj;
function getComboList(objOr, objDes, objWrite, myoption, getvalue) {
	PrimObj = document.getElementById(objOr.id)
	SecObj = document.getElementById(objDes.id)
	if (objWrite) {
		LoadingObj = document.getElementById(objWrite.id)
		SecObj.style.display='none'
		LoadingObj.style.display=''
		JSWriteOnObject(LoadingObj,'Aguarde . . .',1)
	}
	//alert(objOr.options[objOr.selectedIndex].value)
//	if (!getvalue){
		var DumpCod = objOr.options[objOr.selectedIndex].value
		SecObj.options.length = 0
		if(DumpCod.length>=0){
			ajax.requestFile = '/html/evento/'+myoption+'.php?DumpCod='+DumpCod+'&cod='+getvalue
			ajax.onCompletion = createCities
			ajax.runAJAX()
		}
//	}
//	else {
//		ajax.requestFile = '/html/evento/'+myoption+'.php?DumpCod='+getvalue
//		ajax.onCompletion = createCities
//		ajax.runAJAX()
//	}

	return SecObj
}

function createCities()
{
	if (LoadingObj){
		LoadingObj.style.display='none'
		SecObj.style.display=''
	}
	SecObj.focus()
	eval(ajax.response)
	Sec0bj = null
	PrimObj = null
}
