function Muda(d,a){
	if (a == 0){
		d.style.textdecoration = 'underline'
		d.style.borderColor = '#006633'
	}
	else {
		d.style.textdecoration = 'none'
		d.style.borderColor = '#E3E1E3'	
	}
}
function Tree(p,s,l){
	if (document.getElementById(s).innerHTML == '-'){
		document.getElementById(s).style.padding = '0px 2px'
		document.getElementById(p).style.display = 'none'
		document.getElementById(s).innerHTML = '+'
	}
	else {
		document.getElementById(p).style.display = ''
		//if (document.getElementById(p).innerHTML != '')PegaProjetos(p)
		document.getElementById(s).innerHTML = '-'
		document.getElementById(s).style.padding = '0px 4px'		
	}
	//top.location = '#'+l
}
function CriaAjax(){ //instancia um novo xmlhttprequest
	//baseado na getXMLHttpObj que possui muitas cópias na net e eu nao sei quem é o autor original
	if(typeof(XMLHttpRequest)!='undefined'){return new XMLHttpRequest();}
	var axO=['Microsoft.XMLHTTP','Msxml2.XMLHTTP','Msxml2.XMLHTTP.6.0','Msxml2.XMLHTTP.4.0','Msxml2.XMLHTTP.3.0'];
	for(var i=0;i<axO.length;i++){ try{ return new ActiveXObject(axO[i]);}catch(e){} }
	return false;
}
function Mais(i){
	ajax = CriaAjax()
	if (ajax){
		ajax.open("GET", "projetos_info.php?i=" + i, true)
		ajax.onreadystatechange	= function(){
			if (ajax.readyState == 1){
				document.getElementById('espera').style.display = ''
			}
			else if (ajax.readyState == 4){
				if (ajax.status == 200){
					var resultado = ajax.responseText;
					resultado = resultado.replace(/\+/g," ");
					resultado = unescape(resultado);
					document.getElementById('link'+i).style.display = 'none'
					document.getElementById('projeto'+i).innerHTML += resultado
					document.getElementById('espera').style.display = 'none'
				}
				else {					
					window.location.href='index.php?page=projetos&i=' + i
				}
			}
		}
		ajax.send(null)
	}
	else {
		window.location.href='index.php?page=projetos&i=' + i
	}
}
