function limpaForm(FormName){
	var i;
	var Form = eval(FormName);
	
	for(i = 0;i < Form.length; i++)
		if( Form[i].type == "text" || Form[i].type == "textarea" || Form[i].type == "password" )
			Form[i].value = ""; 		
	
	return; 
}

function popup(url, janela, wd, ht, tp, lf){
	
	var largura = 0, altura = 0, config;
	
	if (wd != 0) largura = wd;
	if (ht != 0) altura = ht;
	
	if (altura == 0 && largura == 0){
		if (document.all){ 
			largura = screen.availWidth;
			altura = screen.availHeight; 
		} 
		else if (document.layers || document.getElementById){ 
			if(top.window.outerHeight < screen.availHeight || top.window.outerWidth < screen.availWidth){ 
				altura = top.screen.availHeight; 
				largura = top.screen.availWidth; 
			}
			else{
				altura = screen.availHeight;
				largura = screen.availWidth; 
			} 
		} 
	}		

	config = "width=" + largura + ", height=" + altura + ",top=" + tp + 
			 ",left=" + lf + ",resizable=yes,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes"	
	
	var win = window.open(url, janela, config );		
	win.resizeTo(largura, altura);
}

function mostra(div){
	var cmd;
	cmd = eval("document.getElementById('" + div + "')");
	cmd.style.display = 'block';
}

function esconde(div, img){
	var cmd;	
	cmd = eval("document.getElementById('" + div + "')");
	cmd.style.display = 'none';
}

function menuaction(menu){
	var cmd;
	cmd = eval("document.getElementById('" + menu + "')");

	if(cmd.style.display == 'block')
		esconde(menu);
	else{
		mostra(menu);
	}
}

