

function retiraAcento(obj)
 {
   palavra = String.fromCharCode(event.keyCode);
  
  var caracteresInvalidos = 'áàãâäéèêëíìîïóòõôöúùûüçÁÀÃÂÄÉÈÊËÍÌÎÏÓÒÕÖÔÚÙÛÜÇ';
  var caracteresValidos =   'aaaaaeeeeiiiiooooouuuucAAAAAEEEEIIIIOOOOOUUUUC';
  var acento = "´`^¨~";
  if(acento.indexOf(palavra)!= -1)
  {
    window.event.keyCode = 0;
  }
 
 if (caracteresInvalidos.indexOf(palavra) == -1) 
  {
       if (caracteresValidos.indexOf(palavra) != -1) {
         window.event.keyCode = 0;
         obj.value = obj.value + palavra;
       }
  } 
  else 
  {
           window.event.keyCode = 0;
           nova = caracteresValidos.charAt(caracteresInvalidos.indexOf(palavra));
           obj.value =  obj.value + nova;
  }
  
 }







//javascript para as fotos do site
function Foto(imagem,largura,altura,nome) {
 argumento = "width=" + largura + ",height=" + altura + ",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no";
 janela = window.open("",nome,argumento);
 if (janela !=null) {
	html = "<html><head><title>APLUB Previdência</title></head></html><body bgcolor=\"\#FFFFFF\" marginwidth=0 marginheight=0 leftmargin=0 topmargin=0><img src=\""
		+ imagem
		+ "\"></body>";
	janela.document.write(html);
	janela.document.close();
 }
}




// begin absolutely positioned scrollable area object scripts 
/*
Extension developed by David G. Miles (www.z3roadster.net/dreamweaver)
Original Scrollable Area code developed by Thomas Brattli 
To add more shock to your site, visit www.DHTML Shock.com
*/

function verifyCompatibleBrowser(){ 
    this.ver=navigator.appVersion 
    this.dom=document.getElementById?1:0 
    this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; 
    this.ie4=(document.all && !this.dom)?1:0; 
    this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
 
    this.ns4=(document.layers && !this.dom)?1:0; 
    this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5) 
    return this 
} 
bw=new verifyCompatibleBrowser() 
 
 
var speed=35 
 
var loop, timer 
 
function ConstructObject(obj,nest){ 
    nest=(!nest) ? '':'document.'+nest+'.' 
    this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0; 
    this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0; 
    this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight 
    this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight 
    this.up=MoveAreaUp;this.down=MoveAreaDown; 
    this.MoveArea=MoveArea; this.x; this.y; 
    this.obj = obj + "Object" 
    eval(this.obj + "=this") 
    return this 
} 
function MoveArea(x,y){ 
    this.x=x;this.y=y 
    this.css.center=this.x 
    this.css.top=this.y 
} 
 
function MoveAreaDown(move){ 
	if(this.y>-this.scrollHeight+objContainer.clipHeight){ 
    this.MoveArea(0,this.y-move) 
    if(loop) setTimeout(this.obj+".down("+move+")",speed) 
	} 
} 
function MoveAreaUp(move){ 
	if(this.y<0){ 
    this.MoveArea(0,this.y-move) 
    if(loop) setTimeout(this.obj+".up("+move+")",speed) 
	} 
} 
 
function PerformScroll(speed){ 
	if(initialised){ 
		loop=true; 
		if(speed>0) objScroller.down(speed) 
		else objScroller.up(speed) 
	} 
} 
 
function CeaseScroll(){ 
    loop=false 
    if(timer) clearTimeout(timer) 
} 
var initialised; 
function InitialiseScrollableArea(){ 
    objContainer=new ConstructObject('divContainer') 
    objScroller=new ConstructObject('divContent','divContainer') 
    objScroller.MoveArea(0,0) 
    objContainer.css.visibility='visible' 
    initialised=true; 
} 

// end absolutely positioned scrollable area object scripts 
//
// Valida ou Limpa formulário
//
function confirma(){
ok = window.confirm ("Deseja mesmo apagar os dados do formulario?");
if (ok) 
return true;
else 
return false;
}
function valida(){
var i,x,erro="Os seguintes campos devem ser preenchidos: ";
var ok=1;
string = new Array(); /* criando vetor para armazenar objetos do formulario */
string[0] = document.forms[0].nome; /* forms[0] indica o formulario atual, pois eh o primeiro e unico. Poderia ser substituido pelo nome do formulario, que eh avaliacao. */
string[1] = document.forms[0].associado;
string[2] = document.forms[0].email;
string[3] = document.forms[0].ddd;
for(i=0;i<4;i++){
if(string[i].value.charAt(0)==""){/* Lembrando que string.charAt(n) retorna o enesimo caractere de string. Se for nulo, nada foi digitado no campo. .value retorna o valor do campo e .name o nome.*/
ok = 0; /* ok=0 indica a existencia de erro */
erro+="- " + string[i].name + " " /* Adiciona o campo que nao foi preenchido. pula uma linha. */
}
}
if(!ok)
window.alert(erro); 
else
window.alert("Voce preencheu corretamente todos os dados. Obrigado!"); }
//
//****
//