<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

//-->
//SCRIPT PARA A ENQUETE
function ProcessaEnquete(form, Width, Height){
	var opcao = 0;
	var flag=0;
	for(var i=0; i < form.opcao.length; i++){
		if (form.opcao[i].checked){
			opcao = form.opcao[i].value;
			flag++;
		}
	}
	if (flag==0){
		alert("Por favor, selecione uma opção.");
	}else{
		var Url = "/GolNovo/popup/processa_enquete.php?resp_ip=" + form.resp_ip.value + "&opcao=" + opcao + "&enqueteid=" + form.enqueteid.value;
		window.open(Url, 'Enquete', 'width='+Width+', height='+Height+', scrollbars=yes, top='+((screen.availHeight/2)-(Height/2))+', left='+((screen.availWidth/2)-(Width/2)))
	}
}

function VazioEnquete(){
}

//SCRIPT PARA ABRIR POPUP
function Popup(Url, Titulo, Width, Height, scrollbar) 
{
    window.open(Url, Titulo, 'width='+Width+', height='+Height+', scrollbars='+ scrollbar +', top='+((screen.availHeight/2)-(Height/2))+', left='+((screen.availWidth/2)-(Width/2)))
}

function popupi(url,largura,altura) {
var a = window.screen.availWidth - largura ; 
var b = window.screen.availHeight - altura ; 
var leftdist = a/2;
var topdist = b/2;
var newpage = window.open("","_blank","left=" + leftdist + ",top=" + topdist + ",width=" + largura + ",height=" + altura + ",scrollbars=no");
newpage.document.write("<head><title>IE-Intercâmbio</title></head>");
newpage.document.write("<body topmargin=0 leftmargin=0 marginheight=0 marginhwidth=0 scroll=no>");
newpage.document.write("<img src=\"" + url + "\" border=0>");
newpage.document.write("</body>");
}
//SCRIPT PARA VALIDAR O CAMPO DE EMAIL
function checaEmail(Form) {
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(Form.email.value)){
return (true)
}
alert("Email é inválido!")
return (false)
}
function save() {
	document.execCommand("SaveAs");
}

// SCRIPT PARA VALIDAR O PREENCHIMENTO TOTAL DO FORMULÁRIO
function ValidaFormTotal(form){
	for (var i=0; i < form.length; i++)
		if (form[i].value == ""){
			alert ("É necessário preencher os campos.");
			return false;
		}
	return true;
}

//	SCRIPT PARA VALIDAR O CAMPO DO CLASSIFICADOS
function classificados(busca){
	if (busca.pesq.value == ''){
		window.alert('Digite a palavra-chave!')
		return false;
	}
	return true;
}
function destaca(a,cor)
{
	a.style.background=cor;
}

function ListBox(form)
{
	var result=(form.Alvo.options[form.Alvo.selectedIndex].value);
	parent.conteudo.location.href=result;
}

function ChecaPreenchimento(form){
	for (var i=0; i < form.length; i++)
		if (form[i].value == ""){
			alert ("Campo em branco");
			return false;
		}
	return true;
}

function ChecaUsuario(form){
	for (var i=0; i < form.length; i++)
		if (form[i].value == ""){
			alert ("Campo em branco");
			return false;
		}
	if (form["ds_usuin_senha_confirma"].value != form["ds_usuin_senha_nova"].value){
		alert ("A senha nova não confere com a senha de confirmação");
		return false;
	}		
	return true;
}

function LinkOpener(url){
	if (url != "#") {
		window.opener.top.location.href=url;
		top.close();
	}
}
function popup(Url, Titulo, Width, Height, Scrollbar) 
{
    window.open(Url, Titulo, 'width='+Width+', height='+Height+', scrollbars='+Scrollbar+', status=no, resizable, top='+((screen.availHeight/2)-(Height/2))+', left='+((screen.availWidth/2)-(Width/2)))
}

function popup2() 
{
	Url = "http://www.ie-intercambio.com.br/hotsite/htmls/";
	Titulo = "";
	Width = 700;
	Height = 500;
	Scrollbar = "";
    window.open(Url, Titulo, 'width='+Width+', height='+Height+', scrollbars='+Scrollbar+', status=no, resizable, top='+((screen.availHeight/2)-(Height/2))+', left='+((screen.availWidth/2)-(Width/2)))
}

function FormataData(campo,teclapres) {
	var tecla = teclapres.keyCode;
	vr = document.frmSalvar[campo].value;
	vr = vr.replace( ".", "" );
	vr = vr.replace( "/", "" );
	vr = vr.replace( "/", "" );
	tam = vr.length + 1;

	if ( tecla != 9 && tecla != 8 ){
		if ( tam > 2 && tam < 5 )
			document.frmSalvar[campo].value = vr.substr( 0, tam - 2  ) + '/' + vr.substr( tam - 2, tam );
		if ( tam >= 5 && tam <= 10 )
			document.frmSalvar[campo].value = vr.substr( 0, 2 ) + '/' + vr.substr( 2, 2 ) + '/' + vr.substr( 4, 4 ); 
	}
}

function AbreMenu(id){
	
	status = document.getElementById(id).style.display;
	
	if(status == "none"){
		document.getElementById(id).style.display = "";
	}else{
		document.getElementById(id).style.display = "none";
	}
}

function formatar(src, mask) {
	var i = src.value.length;
	var saida = mask.substring(0,1);
	var texto = mask.substring(i)

	if (texto.substring(0,1) != saida) {
		src.value += texto.substring(0,1);
	}

}

function Abreaba(id){
	if(window.document.getElementById(id).style.display == "")
		window.document.getElementById(id).style.display = "none";
	else
	    window.document.getElementById(id).style.display = "";
}

function get_flash(arquivo, largura, altura, bgcolor, id, qualidade, alinhamento, transparente, pgphp) {
	obj = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+largura+'" height="'+altura+'" id="'+id+'" align="'+alinhamento+'">';
	obj+= '<param name="allowScriptAccess" value="sameDomain" />';
	obj+= '<param name="movie" value="'+arquivo+'" />';
	obj+= '<param name="quality" value="'+qualidade+'" />';
	if(transparente == true) {
		obj+= '<param name="wmode" value="transparent" />';
	}
	obj+= '<param name="bgcolor" value="'+bgcolor+'" />';
	obj+= '<param name="FlashVars" value="pais='+pgphp+'" />';
	obj+= '<embed src="'+arquivo+'" '+((transparente==true)?'wmode="transparent"':'')+'" quality="'+qualidade+'" bgcolor="'+bgcolor+'" FlashVars="pais='+pgphp+'" width="'+largura+'" height="'+altura+'" name="'+id+'" align="'+alinhamento+'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	obj+= '</object>';
	document.write(obj);
}

function url(url){
	window.document.location.href=url;
}


function Comentarios(id) {

	if(id == 'menu01'){
	
			if(window.document.getElementById(id).style.display == "")
				window.document.getElementById(id).style.display = "none";
			else{
				window.document.getElementById(id).style.display = "";

			}
	}
}
