	function MM_openBrWindow(theURL,winName,features) { //v2.0
  	
		window.open(theURL,winName,features);
	
	}

	function overm(opcao) {

		for (x=1; x < 4; x++) {

			if (document.getElementById('m'+x) != null) {
				document.getElementById('m'+x).style.display = 'none';
			}

		}

		document.getElementById('m'+opcao).style.display = '';

		return false;

	}

	function marcaTodos(p_frm, p_check) {

		formulario	= document.getElementById(p_frm);
		check		= document.getElementById(p_check);

		tamanhoForm	= formulario.getAttribute("length");
		checkNome	= check.getAttribute("name");

		if (tamanhoForm > 0) {

			for (i=0; i<tamanhoForm;i++) {

				if (formulario[i].getAttribute("name") == checkNome) {
					
					if (formulario[i].checked == true) {
						formulario[i].checked = false;
					} else {
						formulario[i].checked=true;
					}
				}

			}
		}
	
	}
	
	function flash(width,height,transparente,align,version,caminho,variaveis) {  
		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+version+'" width="'+width+'" height="'+height+'" align="'+align+'">');
		document.write('<param name="movie" value="'+caminho+'">');
		document.write('<param name="allowScriptAccess" value="sameDomain" />');
		document.write('<param name="quality" value="high">');
		document.write('<param name="menu" value="false">');
		document.write('<param name="wmode" value="'+transparente+'">');
		document.write('<param name="flashVars" value="'+variaveis+'">');
		document.write('<embed src="'+caminho+'" width="'+width+'" height="'+height+'" align="'+align+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" wmode="'+transparente+'" flashVars="'+variaveis+'"></embed>');
		document.write('</object>');
	}
	
	function mostraAlertaPopup() {
		document.getElementById("popup").style.display = '';
	}
	
	function fechaAlertaPopup() {
		document.getElementById("popup").style.display = 'none';
	}
	
	function findPos(obj,param) {
		
		var curleft = curtop = 0;
	
		if (obj.offsetParent) {
			curleft = obj.offsetLeft
			curtop = obj.offsetTop
			while (obj = obj.offsetParent) {
				curleft += obj.offsetLeft
				curtop += obj.offsetTop
			}
		} 
		
		if (param == "L") {
			document.getElementById("popup").style.left = curleft + 'px';
			document.getElementById("popup").style.top = (curtop-45) + 'px';
			document.getElementById("popup").style.display = '';
		} else {
			document.getElementById("popup2").style.left = curleft + 'px';
			document.getElementById("popup2").style.top = (curtop-45) + 'px';
			document.getElementById("popup2").style.display = '';
		}
		
		//return [curleft,curtop];
	}
	
	function findPos2(obj,param) {
		var curleft = curtop = 0;
	
		if (obj.offsetParent) {
			curleft = obj.offsetLeft
			curtop = obj.offsetTop
			while (obj = obj.offsetParent) {
				curleft += obj.offsetLeft
				curtop += obj.offsetTop
			}
		} 
		
		if (param == "L") {
			document.getElementById("popup").style.left = (curleft-180) + 'px';
			document.getElementById("popup").style.top = (curtop-45) + 'px';
			document.getElementById("popup").style.display = '';
		} else {
			document.getElementById("popup2").style.left = (curleft-180) + 'px';
			document.getElementById("popup2").style.top = (curtop-45) + 'px';
			document.getElementById("popup2").style.display = '';
		}
		
		//return [curleft,curtop];
	}
	
	function escondePopup(param) {
		if (param == "L") {
			document.getElementById("popup").style.display = 'none';
		} else {
			document.getElementById("popup2").style.display = 'none';
		}
	}