<!--

function ValidacaoEmail(emailad){
    var exclude=/[^@\-\.\w]|^[_@\.\-]|[\._\-]{2}|[@\.]{2}|(@)[^@]*\1/;
    var check=/@[\w\-]+\./;
    var checkend=/\.[a-zA-Z]{2,3}$/;
    if(((emailad.search(exclude) != -1)||(emailad.search(check)) == -1)||(emailad.search(checkend) == -1)){
       alert('E-mail incorreto!!');
        aspnetForm.ctl00$DetalheConteudo$DetalheCadastro1$txtEmailCliente.value='';
        return false;
    }
    else {
        
        return true;
    }
}

function ValidacaoDataNascimento(dataNascimento){
    if(dataNascimento.length < 8){
       alert('Data de nascimento incorreta!!');
        aspnetForm.ctl00$DetalheConteudo$DetalheCadastro1$txtDataAniversarioCliente.value='';
        return false;
    }
    else {
        
        return true;
    }
}

function Confirmacao(texto,url)
{
    var answer = confirm(texto)
    if (answer){
		window.location = url;
	}

}

function go(drop) {
var indice = document.getElementById(drop).selectedIndex
if (indice != 0)
if (document.getElementById(drop).options[indice].tex != "") {
document.location = document.getElementById(drop).options[indice].value; }
}

function PrintPage()
{       

		var disp_setting="toolbar=yes,location=no,directories=yes,menubar=yes,"; 
		    disp_setting+="scrollbars=yes,width=650, height=600, left=100, top=25"; 
		var content_vlue = document.getElementById("conteudoImpressao").innerHTML; 
		
		var docprint=window.open("","",disp_setting); 
			docprint.document.open(); 
docprint.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
			docprint.document.write('<html><head><link href="Estilo/sistema.css" type="text/css" rel="stylesheet" /><title>Jornal dos Concursos - O maior portal de informações da área pública</title>')
			docprint.document.write('</head><body onLoad="self.print()">');
			docprint.document.write('<p><img src="imagens/cabecalhoImpressao.gif"></p>');  
			docprint.document.write(content_vlue);          
			docprint.document.write('</body></html>'); 
            docprint.document.write('<script> if(document.getElementById("paginacaoTopo")){document.getElementById("paginacaoTopo").style.visibility = "hidden";}if(document.getElementById("paginacaoRodape")){document.getElementById("paginacaoRodape").style.visibility = "hidden";}</script>');
			docprint.document.close(); 
			docprint.focus(); 
}


function AtualizaPagina(campo,valor)
{
//alert('campo = '+campo+' | valor = '+valor);
document.aspnetForm.submit();
}

function addfav(url,title) {
	if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
		window.external.AddFavorite (url,title);
	} else {
		var msg = "Adicione o Jornal dos Concursos aos seus sites favoritos.";
		if(navigator.appName == "Netscape") msg += "\nPara isto, digite <CTRL+D>.";
		alert(msg);
	}
}




function AtualizaPagina(campo,valor)
{
//alert('campo = '+campo+' | valor = '+valor);
document.aspnetForm.submit();
}

function addfav(url,title) {
	if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
		window.external.AddFavorite (url,title);
	} else {
		var msg = "Adicione o Jornal dos Concursos aos seus sites favoritos.";
		if(navigator.appName == "Netscape") msg += "\nPara isto, digite <CTRL+D>.";
		alert(msg);
	}
}



function SelecionarTodosCbk(nomeFormulario)
{   
    j = 0;
    for(i=0; i < document.aspnetForm.length; i++)
    {
        if(document.aspnetForm.elements[i].type == 'checkbox')
        {
            if(!document.aspnetForm.elements[i].checked)
            {
                document.aspnetForm.elements[i].checked = true;
                j++;
            }
        }
    }
    if(j == 1)
    {
        for(i=0; i < document.aspnetForm.length; i++)
        {
            if(document.aspnetForm.elements[i].type == 'checkbox')
            {
                document.aspnetForm.elements[i].checked = false;
            }
        }    
    }
}

function MM_reloadPage(init)
{  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->

function mover(src,clrOver) {
  src.style.cursor = 'hand';
  src.bgColor = clrOver;
}

function mout(src,clrIn) {
  src.style.cursor = 'default';
  src.bgColor = clrIn;
}

DEcfg ="site=par&affiliate=parjornaldosconcursos&subchan=capa";
var DEpopcfg ="POPparjornaldosconcursos";
Expble = 1;
DEd=document; function DEshow(ad,pos){
DErand = Math.floor(1000000*Math.random()); DEconn=DEd.body; DEconn.style.behavior='url(#default#clientCaps)'; DEconn = (DEconn.connectionType=='lan')?1:0;
DEd.write('<SCR'+'IPT LANGUAGE="JavaScript1.1" SRC="http://de.uol.com.br/js.ng/'+DEcfg+'&size='+ad+'&page='+pos+'&conntype='+DEconn+'&expble='+Expble+'&ord='+DErand+'?"></SCR'+'IPT>');
}

function ObrigatoriedadeCampo(nomeValidador, valorSelecionado, valorValidante)
{
    if (valorSelecionado == valorValidante) 
    {
    document.getElementById(nomeValidador).enable = !document.getElementById(nomeValidador).enable;
    }
    else
    {
    document.getElementById(nomeValidador).disabled = !document.getElementById(nomeValidador).disable;
    }
}

function Mascara (formato, objeto)
{ 
    campo = document.getElementById(objeto); 

    // DATA COMPLETA - 00/00/0000
    if (formato == 'data')
    { 
        separador = '/'; 
        conjunto1 = 2; 
        conjunto2 = 5; 
        if (campo.value.length == conjunto1)
        { 
            campo.value = campo.value + separador; 
        } 
        
        if (campo.value.length == conjunto2)
        { 
            campo.value = campo.value + separador; 
        } 
    } 
    
    // DATA MÊS ANO - 00/00
    if (formato == 'mes_ano')
    { 
        separador = '/'; 
        conjunto1 = 2; 

        if (campo.value.length == conjunto1)
        { 
            campo.value = campo.value + separador; 
        } 
    } 
    
       // FLOAT 00,000000
    if (formato == 'float')
    { 
        separador = ','; 
        conjunto1 = 2; 
        if (campo.value.length == conjunto1)
        { 
            campo.value = campo.value + separador; 
        } 
   
    } 

    // TELEFONE - (11) 3333-3333
    if (formato == 'telefone')
    { 
        separador1 = '('; 
        separador2 = ') '; 
        separador3 = '-'; 

        conjunto1 = 0; 
        conjunto2 = 3; 
        conjunto3 = 9; 

        if (campo.value.length == conjunto1)
        { 
            campo.value = campo.value + separador1; 
        } 
        if (campo.value.length == conjunto2)
        { 
            campo.value = campo.value + separador2; 
        } 

        if (campo.value.length == conjunto3)
        { 
            campo.value = campo.value + separador3; 
        } 
    } 
}

function letras()
{
    tecla = event.keyCode;
    if ((tecla == 32) || (tecla >= 192 && tecla <= 255) || (tecla >= 65 && tecla <= 90) || (tecla >= 97 && tecla <= 122))
     {
     return true;
     }
    else
     {
     return false;
     }
}

function limita(objeto) 
{ 
    campo = document.getElementById(objeto);

	if (campo.value.length >= 250) 
	{
	campo.value = campo.value.substring(0,campo.value.length-1); 
	
	} 
} 


function texto()
{
    tecla = event.keyCode;
    if ((tecla == 32) || (tecla >= 192 && tecla <= 255) || (tecla >= 65 && tecla <= 90) || (tecla >= 97 && tecla <= 122) || (tecla >= 48 && tecla <= 57))
     {
     return true;
     }
    else
     {
     return false;
     }
}


function numeros()
{
    tecla = event.keyCode;
    if (tecla >= 48 && tecla <= 57)
     {
     return true;
     }
    else
     {
     return false;
     }
}
function moeda(fld, milSep, decSep, e) {
var sep = 0;
var key = '';
var i = j = 0;
var len = len2 = 0;
var strCheck = '0123456789';
var aux = aux2 = '';
var whichCode = (window.Event) ? e.which : e.keyCode;
if (whichCode == 13) return true;  // Enter
key = String.fromCharCode(whichCode);  // Get key value from key code
if (strCheck.indexOf(key) == -1) return false;  // Not a valid key
len = fld.value.length;
for(i = 0; i < len; i++)
if ((fld.value.charAt(i) != '0') && (fld.value.charAt(i) != decSep)) break;
aux = '';
for(; i < len; i++)
if (strCheck.indexOf(fld.value.charAt(i))!=-1) aux += fld.value.charAt(i);
aux += key;
len = aux.length;
if (len == 0) fld.value = '';
if (len == 1) fld.value = '0'+ decSep + '0' + aux;
if (len == 2) fld.value = '0'+ decSep + aux;
if (len > 2) {
aux2 = '';
for (j = 0, i = len - 3; i >= 0; i--) {
if (j == 3) {
aux2 += milSep;
j = 0;
}
aux2 += aux.charAt(i);
j++;
}
fld.value = '';
len2 = aux2.length;
for (i = len2 - 1; i >= 0; i--)
fld.value += aux2.charAt(i);
fld.value += decSep + aux.substr(len - 2, len);
}
return false;
}


var addressOpen = new Array(0);

function showAddress(pos, idCliente) {
		if (addressOpen[pos] == true) {
			if (document.getElementById("imgPromotionA" + pos) != null) {
				document.getElementById("imgPromotionA" + pos).src = "imagens/ico_promotion_close.gif";
				document.getElementById("imgPromotionB" + pos).src = "imagens/ico_promotion_white.gif";
			}
			document.getElementById("imgAddress" + pos).src = "imagens/ico_arrow_down.gif";
			document.getElementById("tableAddress" + pos).style.display = "none";
            //document.getElementById("iframeAddress" + pos).src = "DefaultEndereco.aspx?IdCliente=" + idCliente;

			addressOpen[pos] = false;
		} else {
			if (document.getElementById("imgPromotionA" + pos) != null) {
				document.getElementById("imgPromotionA" + pos).src = "imagens/ico_promotion_a_close.gif";
				document.getElementById("imgPromotionB" + pos).src = "imagens/ico_promotion_b_close.gif";
			}
			document.getElementById("imgAddress" + pos).src = "imagens/ico_arrow_up.gif";
			document.getElementById("tableAddress" + pos).style.display = "";
            document.getElementById("iframeAddress" + pos).src = "DefaultEndereco.aspx?IdCliente=" + idCliente;

			addressOpen[pos] = true;
		}
	}

function conta(objeto,maximoCaracteres,nomeContador){ 
    
	var numCaracteres = objeto.value.length;
    	
	if (numCaracteres == 1 && objeto.value.substring(0,1) == " ")
    	{
		objeto.value = "";
		numCaracteres = numCaracteres - 1;
    	}
    	if (numCaracteres > maximoCaracteres)
	{
			objeto.value = objeto.value.substring(0,maximoCaracteres);
			numCaracteres = numCaracteres - 1;
	}
nomeContador.innerText = numCaracteres 
} 

//-->