window.tempocerca = 0;

function despertadorCerca() {
	
	if( document.getElementById ){
		
		var cerca = document.getElementById( "cerca_google" );
		var cerca_boto = cerca.getElementsByTagName( "A" );
		
		if( cerca_boto.length > 0 ){
			
			cerca.repos = 0;
			cerca.a = cerca_boto[0];
			cerca.form = document.getElementById( "cerca_form" );
						
			cerca.mostra_cerca = function() {
				this.form.style.visibility = "visible";
			}
			
			cerca.amaga_cerca = function() {
				this.form.style.visibility = "hidden";
			}
			
			cerca.encena = function() {
				this.a.style.color = "#FFFFFF";
			}
			
			cerca.apagaa = function() {
				this.a.style.color = "#000000";
			}
			
			cerca.onmouseover = function() {
				
				if( this.repos ) {
      				clearTimeout( this.repos );
      				this.repos = 0;
				}
				
				window.tempocerca = this;
					
				this.repos = setTimeout( "tempocerca.mostra_cerca()", 20 );
				this.encena();
			}
			
			cerca.onmouseout = function() {
				
				if( this.repos ) {
      				clearTimeout( this.repos );
      				this.repos = 0;
				}
				
				window.tempocerca = this;
					
				this.repos = setTimeout( "tempocerca.amaga_cerca()", 20 );
				this.apagaa();
			}
		}
	}
}
