// Cool CSS Menu- By JavaScriptKit.com (http://www.javascriptkit.com)
// For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/
// Fading routine based on Dynamic Drive script: http://www.dynamicdrive.com/dynamicindex4/highlightgrad.htm
// This notice must stay intact for use

var baseopacity=0

function showtext(thetext){
if (!document.getElementById)
return
textcontainerobj=document.getElementById("tabledescription")
browserdetect=textcontainerobj.filters? "ie" : typeof textcontainerobj.style.MozOpacity=="string"? "mozilla" : ""
instantset(baseopacity)
document.getElementById("tabledescription").innerHTML=thetext
highlighting=setInterval("gradualfade(textcontainerobj)",50)
}

function hidetext(){
cleartimer()
instantset(baseopacity)
}

function instantset(degree){
if (browserdetect=="mozilla")
textcontainerobj.style.MozOpacity=degree/100
else if (browserdetect=="ie")
textcontainerobj.filters.alpha.opacity=degree
else if (document.getElementById && baseopacity==0)
document.getElementById("tabledescription").innerHTML=""
}

function cleartimer(){
if (window.highlighting) clearInterval(highlighting)
}

function gradualfade(cur2){
if (browserdetect=="mozilla" && cur2.style.MozOpacity<1)
cur2.style.MozOpacity=Math.min(parseFloat(cur2.style.MozOpacity)+0.2, 0.99)
else if (browserdetect=="ie" && cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=20
else if (window.highlighting)
clearInterval(highlighting)
}

/* *************** parte do css *****
#coolmenu{
border: 1px solid black;
width: 170px;
background-color: #E6E6E6;
}

#coolmenu a{
font: bold 13px Verdana;
padding: 2px;
padding-left: 4px;
display: block;
width: 100%;
color: black;
text-decoration: none;
border-bottom: 1px solid black;
}

html>body #coolmenu a{
width: auto;
}

#coolmenu a:hover{
background-color: black;
color: white;
}

#tabledescription{
width: 100%;
height: 3em;
padding: 2px;
filter:alpha(opacity=0);
-moz-opacity:0;
}
 *************** parte do css ***** */
//
// <span onMouseover="showtext('Texto explicativo aqui.')" onMouseout="hidetext()"> 
//
// <div id="tabledescription" >Texto aparecerá aqui </div>
//
//
/////////////////

///////////////// get mouse x y pos functions ////////////////////////////
// Detect if the browser is IE or not.
// If it is not IE, we assume that the browser is NS.
var IE = document.all?true:false


// If NS -- that is, !IE -- then set up for mouse capture
if (!IE) document.captureEvents(Event.MOUSEMOVE)

// Set-up to use getMouseXY function onMouseMove
//document.onmousemove = getMouseXY;

// Temporary variables to hold mouse x-y pos.s
var tempX = 0
var tempY = 0

// Main function to retrieve mouse x-y pos.s

function getMouseXY(e) {
  if (IE) { // grab the x-y pos.s if browser is IE
    tempX = event.clientX + document.body.scrollLeft
    tempY = event.clientY + document.body.scrollTop
  } else {  // grab the x-y pos.s if browser is NS
    tempX = e.pageX
    tempY = e.pageY
  }  
  // catch possible negative values in NS4
  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0}
  // show the position values in the form named Show
  // in the text fields named MouseX and MouseY
  //document.Show.MouseX.value = tempX
  //document.Show.MouseY.value = tempY

  //window.alert("Mouse x:"+tempX+" y:"+tempY);

  pos = new Array();
  pos[0] = tempX;
  pos[1] = tempY;
  return pos;
}
///////////////// get mouse x y pos functions ////////////////////////////
function showBigTip(i,e)
{
var pos = getMouseXY(e);
var x = pos[0]+10;
var y = pos[1]-2;
var TipStyle="position: absolute; top: "+y+"px; left: "+x+"px;";
document.getElementById("tip"+i).style.position = "absolute";
document.getElementById("tip"+i).style.top = y+"px";
document.getElementById("tip"+i).style.left = x+"px";
document.getElementById("tip"+i).style.display = "";
document.getElementById("tip"+i).style.visibility = "visible";
}

function showTipXY(i,e,x_rel,y_rel)
{
var pos = getMouseXY(e);
var x = pos[0]+x_rel;
var y = pos[1]-y_rel;
var TipStyle="position: absolute; top: "+y+"px; left: "+x+"px;";
document.getElementById("tip"+i).style.position = "absolute";
document.getElementById("tip"+i).style.top = y+"px";
document.getElementById("tip"+i).style.left = x+"px";
document.getElementById("tip"+i).style.display = "";
document.getElementById("tip"+i).style.visibility = "visible";
//window.alert("pos x:"+x+" pos y:"+y);
}

function showTip(i,e)
{
var pos = getMouseXY(e);
var x = pos[0]+10;
var y = pos[1]-55;
var TipStyle="position: absolute; top: "+y+"px; left: "+x+"px;";
document.getElementById("tip"+i).style.position = "absolute";
document.getElementById("tip"+i).style.top = y+"px";
document.getElementById("tip"+i).style.left = x+"px";
document.getElementById("tip"+i).style.display = "";
document.getElementById("tip"+i).style.visibility = "visible";
//window.alert("pos x:"+x+" pos y:"+y);
}

function hideTip(i)
{
document.getElementById("tip"+i).style.display = "none";
document.getElementById("tip"+i).style.visibility = "hidden";
}



/////////////////////////////////
//
// <span onMouseover="showTip(1,event)" onMouseout="hideTip(1)">
//
/////////////////////////////////

/*********************************** CSS for opaq text - trasparent background ***************/
//#container {
//
//   position: absolute;
//   top: 100px; left: 400px;         /* place it where you want     */
// }
//
//#translucentbkg {
//   width: 646px; height: 56px;      /* to match DIVs size          */
//   background-color: #9999ff;       /* the background              */
//   filter:alpha(opacity=50);
//   -moz-opacity:0.5;
//   opacity: 0.5;
// }
//
//#opaquetext {
//   width: 646px; height: 56px;     /* to match DIVs size          */
//   background-color: transparent;   /* transparent background      */
//   position: absolute;              /* absolute positioning        */
//   z-index: 2;                      /* place it over the other DIV */
//   padding:2px;
// }
/*********************************** CSS for opaq text - trasparent background ***************/




