window.onload = function(){
	
	
	inputs = document.getElementsByTagName("input");
	
	for( i = 0 ; i < inputs.length ; i++){
		atual = inputs[i];
		
		if(atual.id != "newsletter" && atual.id != "aceito" && atual.id != "botao"){
			
			atual.onfocus = function(){
				this.style.backgroundColor="rgb(255,252,223)";
				this.style.borderColor="rgb(0,0,0)";
			}
			atual.onblur = function(){
				this.style.backgroundColor="#FFF";
				this.style.borderColor="#CCC";
			}
			
		}
		
	}
	
	selects = document.getElementsByTagName("select");
	
	for( i = 0 ; i < selects.length ; i++){
		atual = selects[i];
		
		atual.onfocus = function(){
			this.style.backgroundColor="rgb(255,252,223)";
			this.style.borderColor="rgb(0,0,0)";
		}
		atual.onblur = function(){
			this.style.backgroundColor="#FFF";
			this.style.borderColor="#CCC";
		}
		
	}
	
	parent.RedimensionaIframe();
	
}

function $(id){ return document.getElementById(id); }

function detalhes (minha_pagina, meu_nome, larg, alt, scroll){
	var nova_janela = null;
	posicao_esq = (screen.width) ? (screen.width-larg)/2 : 0;
	posicao_sup = (screen.height) ? (screen.height-alt)/2 - 50 : 0;
	param_janela = 'height='+alt+',width='+larg+',top='+posicao_sup+',left='+posicao_esq+',scrollbars= yes'
	nova_janela = window.open(minha_pagina,meu_nome,param_janela)
	if (nova_janela.window.focus) {nova_janela.window.focus();}
}
