// JavaScript Document

var display_url=0

function showmenuie5(){
var rightedge=document.body.clientWidth-event.clientX
var bottomedge=document.body.clientHeight-event.clientY
if (rightedge<ie5menu.offsetWidth)
ie5menu.style.left=document.body.scrollLeft+event.clientX-ie5menu.offsetWidth
else
ie5menu.style.left=document.body.scrollLeft+event.clientX
if (bottomedge<ie5menu.offsetHeight)
ie5menu.style.top=document.body.scrollTop+event.clientY-ie5menu.offsetHeight
else
ie5menu.style.top=document.body.scrollTop+event.clientY
ie5menu.style.visibility="visible"
return false
}

function hidemenuie5(){
ie5menu.style.visibility="hidden"
}

function highlightie5(){
if (event.srcElement.className=="menuitems"){
event.srcElement.style.backgroundColor="highlight"
event.srcElement.style.color="white"
if (display_url==1)
window.status=event.srcElement.url
}
}

function lowlightie5(){
if (event.srcElement.className=="menuitems"){
event.srcElement.style.backgroundColor=""
event.srcElement.style.color="black"
window.status=''
}
}

function jumptoie5(){
if (event.srcElement.className=="menuitems")
window.location=event.srcElement.url
}


var gAutoPrint = true; 

function printar()
{
   if (document.getElementById != null) {
       var html = '<HTML>\n<HEAD>\n';
       
       if (document.getElementsByTagName != null) {
           var headTags = document.getElementsByTagName("head");
           if (headTags.length > 0) {
               html += headTags[0].innerHTML;
           }
       }
       
        html += '\n</HEAD>\n<BODY>\n<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td><img src="http://www.univ-ab.pt/pics/blog/barra_topo.jpg" align="left"></td></tr></table>\n';
       
       var printReadyElem = document.getElementById("printar");
       
       if (printReadyElem != null) {
           html += printReadyElem.innerHTML;
       } else {
           alert("Nao encontrou o elemento para imprimir");
           return;
       }
       
       html += '\n</BODY>\n</HTML>';
       
       var printWin = window.open("","printar");
       printWin.document.open();
       printWin.document.write(html);
       printWin.document.close();
       if (gAutoPrint) {
           printWin.print();
       }
   } else {
       alert("Não funciona com este browser.");
   }
}


