var id = new Array();
var name = new Array();
var combos = new Array('','id_cidade');
function ajax_update_combo(id, combo)
{
	elOptNew = document.createElement('option');
	elOptNew.text = 'Carregando...';
	elOptNew.value = 0;
	var elSel = get(combo);
	try {
		elSel.add(elOptNew, null);
	}
	catch(ex) {
		elSel.add(elOptNew);
	}
	elSel.value = 0;
	elSel.disabled = true;
	url = 'inc/php/ajax_update.inc.php?v='+id+'&c=1';
	ajax(url);
}
function ajax_set_resolucao()
{
	src_width  = screen.width;
	src_height = screen.height;
	url = "inc/php/resolucao.inc.php?w="+src_width+"&h="+src_height;
	ajax(url);
}
//===================================== AJAX FUNCTIONS =====================================//
var req;
function ajax(url)
{
	try { req = new ActiveXObject("Msxml2.XMLHTTP"); }
	catch(e) {
		try { req = new ActiveXObject("Microsoft.XMLHTTP"); }
		catch(oc) { req = null; }
	}
	if (!req && typeof XMLHttpRequest != "undefined") { req = new XMLHttpRequest(); }
	if (req != null) {
		req.onreadystatechange = ajax_receive;
		req.open("GET", url, true);
		req.send(null);
	}
}
function ajax_receive()
{
	if (req) {
		if (req.readyState == 4 && req.status == 200) {
	        window.eval(req.responseText);
	    }
    }
}
//================================== END OF AJAX FUNCTIONS ==================================//
function get(obj)
{
	return document.getElementById(obj);
}
//-------------------------------------------------------------------------------------------------------------------------------------------------------//

