function voltar(){
	history.go(-1)
}
activateMenu = function(nav) {
	/* currentStyle restricts the Javascript to IE only */
	if (document.getElementById(nav).currentStyle) {  
		var navroot = document.getElementById(nav);
		
		/* Get all the list items within the menu */
		var lis=navroot.getElementsByTagName("LI");  
		for (i=0; i<lis.length; i++) {
		
		   /* If the LI has another menu level */
			if(lis[i].lastChild.tagName=="UL"){
			
				/* assign the function to the LI */
				lis[i].onmouseover=function() {	
				
				   /* display the inner menu */
				   this.lastChild.style.display="block";
				}
				lis[i].onmouseout=function() {                       
				   this.lastChild.style.display="none";
				}
			}
		}
	}
}
window.onload= function(){
	activateMenu('vertnav'); 
}
window.onMouseDown = function() {
	alert(document.body.clientWidth);
}
function showElement(id) {
if(document.getElementById(id).style.display != 'block'){
		document.getElementById(id).style.display= 'block';
		document.getElementById(id).style.visibility = 'visible';
		document.getElementById(id).style.position = 'static';
	}else {
		document.getElementById(id).style.display= 'none';
		document.getElementById(id).style.visibility = 'hidden';
		document.getElementById(id).style.position = 'static';
	}
}

	window.onload = function() {
//		myFadeSize = new fx.FadeSize('avancada', {duration: 400});
	}
	
	var params = new Array(); 




	function updatePage() {

	   if (xmlHttp.readyState == 1) {}
	   if (xmlHttp.readyState == 2) {}
	   if (xmlHttp.readyState == 3) {}
	   if (xmlHttp.readyState == 4) {

	  	//alert (xmlHttp.responseText);
	  	var response = xmlHttp.responseText;
	  	var brokenstring=response.split(':-:');
	    var elem = brokenstring[1];    
	    var response_content = brokenstring[2];

	    var container = document.getElementById(elem);

	   	container.style.display = "none";
	    container.innerHTML =response_content;   
	    $j(container).slideToggle("slow");    
	    document.getElementById('lnk'+elem.substring(4)).onclick = '';
	    $j('#lnk'+elem.substring(4)).click(function(){
	     								        $j(container).slideToggle("slow"); 
												return false;
	    										} );


	  }
	}

	function callAjaxServer2(params,funcao,div) {

	   var params_array=params.split(':');
	   var params = new Array();
	   var url = "../ajax_serve.php?elem="+div+"&f="+escape(funcao);

	   for (i = 0; i < params_array.length ; i+=2)
			{
		    	    url+='&'+escape(params_array[i])+'=';
					url+=params_array[i+1];

	   		}
	   // for( keyVar in params_array) {		}
	   // alert(url);
	   // Open a connection to the server
	   xmlHttp.open("GET", url, true);
	   // Setup a function for the server to run when it's done
	   xmlHttp.onreadystatechange = updatePage;
	   // Send the request
	   xmlHttp.send(null);
	}

	function callAjaxServer(params,funcao,div) {

	   var params_array=params.split(':');
	   var params = new Array();
	   var url = "../ajax_serve.php?elem="+div+"&f="+escape(funcao);

	   for (i = 0; i < params_array.length ; i+=2)
		   {  	    url+='&'+escape(params_array[i])+'=';
					url+=params_array[i+1];
	   		}
	   //alert(url);
	   // Open a connection to the server
	   xmlHttp.open("GET", url, true);
	   // Setup a function for the server to run when it's done
	   xmlHttp.onreadystatechange = updatePage;
	   // Send the request
	   xmlHttp.send(null);

	}
