// Função Popup: <a href="arquivo.ext" onclick="popup(this.href,'360','535','1'); return false;"></a>
function popup(url,w,h,s) {
	var oW=window.open(url,'popup','width='+w+',height='+h+',directories=0,location=0,menubar=0,resizable=1,scrollbars='+s+',status=0,toolbar=0,marginleft=0,margintop=0,left=0,top=0');
}
function EscondeRepeater()
{
    //alert('teste');
    var resultado = document.getElementById("divResultado");
    if(resultado != null)
        resultado.style.display = "none";
}

function popup(url,w,h,s) {
	var oW=window.open(url,'popup','width='+w+',height='+h+',directories=0,location=0,menubar=0,resizable=0,scrollbars='+s+',status=0,toolbar=0,marginleft=0,margintop=0,left='+(((screen.availWidth-w)/2)+-10)+',top='+(((screen.height-h)/2)+-10));
}

function brad_bb()
{window.open('http://www.bradesco.com.br/br/redirect/brad_bb.html', 'compartilhamento', 'width=706,height=550,top=0,left=10,scrollbars=0,menubar=0,toolbar=no,statusbar=no,resizable=no');}

function openCorporate() {
	var oW = window.open('http://www.bradescocorporate.com.br/html/atendimento/onde_estamos.asp','coporate','width=850,height=600,directories=1,location=1,menubar=1,resizable=1,scrollbars=1,status=1,toolbar=1,marginleft=1,margintop=0,left='+(((screen.availWidth-850)/2)+-10)+',top='+(((screen.height-600)/2)+-10));
}



function menu(itens,imgmarca){
		/*if (itens == "agencia" && imgmarca ==1){
			simpleGrp.over(itens, itens, imgmarca);
			JSFX.imgClick(itens, itens, imgmarca);
		}
		else
		{*/
			simpleGrp.over(itens, itens+'_clk', imgmarca);
			JSFX.imgClick(itens, itens+'_clk', imgmarca);
		//}
}


function imprimirApl(){
	popimpressao = window.open('/NetRedeAtendimento/site/content/impressao/DefaultApl.aspx', '_blank', 'width=800,height=600,left=0,top=0,scrollbars=yes,resizable=no,menubar=no,toolbar=no');
}

function imprimir(){
	popimpressao = window.open('/NetRedeAtendimento/site/content/impressao/Default.aspx', '_blank', 'width=800,height=600,left=0,top=0,scrollbars=yes,resizable=no,menubar=no,toolbar=no');
	/*
	var d, s, h, m, me ;
	d = new Date();
	me = d.getMonth() + 1
	if (me < 10){me='0'+me;}
	s =  d.getDate()+ "/";
	s += (me) + "/";
	s += d.getFullYear();
	m = d.getMinutes();
	h = d.getHours();
	if (m < 10){m='0'+m;}
	with (popimpressao.document) {
		write('<html><head><title></title></head>');
		write('<link rel="stylesheet" href="../../css/default.css" type="text/css">');
		write('<link rel="stylesheet" href="../../css/print.css" type="text/css">');
		write('<body>');
		write(document.getElementById("conteudo").innerHTML);
		write('</body></html>');
		close();
		}
		popimpressao.print();
		*/
     }
     
String.prototype.trim = function(){
	return this.replace(/(\s*)|(\s*$)/g, "");

}

function soNumeros(e){
     var key;
     var keychar;

     if (window.event) {
        key = window.event.keyCode;
     } else if (e) {
        key = e.which;
     } else {
        return true;
     }	

     keychar = String.fromCharCode(key);

     // teclas de controle
     if ((key==null) || (key==0) || (key==8) ||
          (key==9) || (key==13) || (key==27) ) {
        return true;
     } else if ((("0123456789").indexOf(keychar) > -1)) {
        return true;     
     } else {
        return false;
     }
}
