﻿function showrelogio(){

  //if(!document.layers&&!document.all){return;}	
  var Digital=new Date()
  var horas=Digital.getHours()
  var minutos=Digital.getMinutes()
  var segundos=Digital.getSeconds()
  if(minutos<=9){minutos="0"+minutos;}
  if(segundos<=9){segundos="0"+segundos;}
  if(horas<=9){horas="0"+horas;}
  mrelogio="&nbsp;"+horas+"."+minutos+"'."+segundos+"''";

  if (document.getElementById) {
    var obj = document.getElementById("relogio");
    //mrelogio="<A style="+'color:black'+">"+mrelogio+"</A>";    
    obj.innerHTML=mrelogio;    
  } else if (document.layers) {
    //mrelogio="<A style="+'color:black'+">"+mrelogio+"</A>"; 
    document.layers.relogio.document.write(mrelogio);
    document.layers.relogio.document.close(); 
  } else if (document.all) { 
    relogio.innerHTML=mrelogio;
  }
	
  setTimeout("showrelogio()",1000)		
}
		
function newWin(url) { 
  link = window.open(url,"Link","personalbar=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=800,height=600,left="+(screen.width-800)/2+",top="+(screen.height-628)/2+""); 
  link.focus();
} 

function clickIE() {if (document.all) {return false;}} 
function clickNS(e) {if (document.layers||(document.getElementById&&!document.all)) {if (e.which==2||e.which==3) {return false;}}} 
if (document.layers) {
  document.captureEvents(Event.MOUSEDOWN);
  document.onmousedown=clickNS;
} else{
  document.onmouseup=clickNS;
  document.oncontextmenu=clickIE;
} 

//powered by google
k=document;
v=Date;
x=false;
z=Array;
af=Math.floor;
ag=RegExp;
b=new z(10); /*12*/
s=new z("null","web","images","gmail","news","dns","maps","blogger","moodle","gato"); //,"labs","gmail");
aa=new z(9); /*11*/
t=0;
u=0;
n=0;
o=new v();
h=5;
m=280; /*385*/
c=0;
w=x;
var title;
var firstHoverOccurred=x;
//m=385;
p=0;
function d(ac){c=ac;o=new v();setTimeout("gidle()",20);}

function e(ac){c=0;w=x;o=new v();setTimeout("gidle()",20);}

function ae(){
	for(var j=1;j<b.length;j++){b[j]=35}
	title=k.getElementById('imageTitle');
	for(i=0;i<b.length;i++){aa[i]=new Image();aa[i].src="../imgs/google/"+s[i+1]+".gif"}
	setTimeout("gidle()",20);
}

function gidle(){
	var l=0;
	for(var i=1;i<b.length;i++){
		var imagename="image"+i;
		var imageElem=k.getElementById(imagename);
		if(c!=i){
			if(b[i]>35){
				b[i]-=h;
				if(b[i]<=35){
					b[i]=35;
					imageElem.src="../imgs/google/"+s[i]+"-sm.gif"
				}
				imageElem.width=b[i];
				imageElem.height=b[i];
				if(c==0){
					//var g=af(255-255*(b[i]-35)/35);
					var g=255;							 /*meu*/
					title.style.color="rgb("+g+","+g+","+g+")"
				}
				p=1
			}
			l+=b[i]
		}
	}
	if(c!=0&&b[c]<70){
		imagename="image"+c;
		imageElem=k.getElementById(imagename);
		if(w==x){
		    w=true;
		    var y=18+(c-1)*(35+4);
		    //var yy=375-60-5-y; ***importante***
		    var yy=410-60-5-y;
		    //title.innerHTML='<img src="../imgs/google/cleardot.gif" width="'+y+'px" height="1"/><b>'+k.getElementById(imagename).alt+'</b>'
		    title.innerHTML='<b>'+k.getElementById(imagename).alt+'</b>'
		    title.style.padding="0 "+yy+"px 0 "+y+"px";
		    //title.style.padding="0 0 0 "+y+"px";
		    
		}		
		/*
		if(w==x){
		    w=true;
		    if(c<5){        //if(w==x){w=true;if(c<6){
			    var y=275-(c-1)*35; //var y=360-(c-1)*70;
			    title.innerHTML=k.getElementById(imagename).alt+y+":"+c+'<img src="../imgs/google/cleardot.gif" width="'+y+'" height="1"/>'
		    }else{
			var y=(c-6)*70+70; //var y=(c-7)*70+70;
			title.innerHTML='<img src="../imgs/google/cleardot.gif" width="'+y+'" height="1"/>'+k.getElementById(imagename).alt
		    }
	    }*/
	b[c]+=h;
	p=1;
	if(b[c]>70){b[c]=70}
	l+=b[c];
	if(l<m){
		b[c]+=m-l;
		if(b[c]>70){b[c]=70}l=m}
		//var g=af(255-255*(b[c]-35)/35);
		var g=180;
		//if(g==0){g=180}									 /*meu*/
		title.style.color="rgb("+g+","+g+","+g+")";
		imageElem.width=b[c];
		imageElem.height=b[c];
		k.getElementById(imagename).src="../imgs/google/"+s[c]+".gif"
	}
	m=l;
	var ad=new v();
	ab=ad.getTime()-o.getTime();
	o=ad;
	t+=ab;
	u++;
	n=t/u;
	h=5;
	if(u>4){
		if(n>30){h=10}
		if(n>60){h=15}
		if(n>90){h=20}
	}
	if(p){setTimeout("gidle()",20);p=0}
}
//end