//cell changer
function mOvr(src,id,R) { if (!src.contains(event.fromElement)) { var cellID = id + 'Cell';document.all.toolbar.rows(R).cells(cellID).bgColor = '#562F2F'; }}
function mOut(src,id,R) {if (!src.contains(event.toElement)) { var cellID = id + 'Cell'; document.all.toolbar.rows(R).cells(cellID).bgColor = '#422121';}}

function mOvrU(src,id,R) { if (!src.contains(event.fromElement)) { var cellID = id + 'Cell';document.all.barusuario.rows(R).cells(cellID).bgColor = '#562F2F'; }}
function mOutU(src,id,R) {if (!src.contains(event.toElement)) { var cellID = id + 'Cell'; document.all.barusuario.rows(R).cells(cellID).bgColor = '#422121';}}

function mOvrR(src,id,R) { if (!src.contains(event.fromElement)) { var cellID = id + 'Cell';document.all.barreg.rows(R).cells(cellID).bgColor = '#562F2F'; }}
function mOutR(src,id,R) {if (!src.contains(event.toElement)) { var cellID = id + 'Cell'; document.all.barreg.rows(R).cells(cellID).bgColor = '#422121';}}

//random image
var imagenumber = 2 ;
var randomnumber = Math.random() ;
var rand1 = Math.round( (imagenumber-1) * randomnumber) + 1 ;
images = new Array
images[1] = "images/principal/encuentros_01.jpg"
images[2] = "images/principal/encuentros_02.jpg"
var image = images[rand1]

//opacidad
function high(which2){
theobject=which2
highlighting=setInterval("highlightit(theobject)",50)
}
function low(which2){
clearInterval(highlighting)
which2.filters.alpha.opacity=65
}



function highlightit(cur2){
if (cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=5
else if (window.highlighting)
clearInterval(highlighting)
}

// menu derecho
var menuskin = "skin1"; // skin0, or skin1
var display_url = 0; // Show URLs in status bar?
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)
window.status = event.srcElement.url;
  }
}
function lowlightie5() {
if (event.srcElement.className == "menuitems") {
event.srcElement.style.backgroundColor = "";
event.srcElement.style.color = "#ffffff";
window.status = "";
  }
}
function jumptoie5() {
if (event.srcElement.className == "menuitems") {
if (event.srcElement.getAttribute("target") != null)
window.open(event.srcElement.url, event.srcElement.getAttribute("target"));
else
window.location = event.srcElement.url;
  }
}
//Menu
function Toggle(item) {
   obj=document.getElementById(item);
   visible=(obj.style.display!="none")
   key=document.getElementById("x" + item);
   if (visible) {
     obj.style.display="none";
     key.innerHTML="<img src='../images/panel/tree_menu/close.gif' width='16' height='14' hspace='0' vspace='0' border='0'>";
   } else {
      obj.style.display="block";
      key.innerHTML="<img src='../images/panel/tree_menu/open.gif' width='16' height='14' hspace='0' vspace='0' border='0'>";
   }
}

function Ayuda(item) {
   obj=document.getElementById(item);
   visible=(obj.style.display!="none")
   key=document.getElementById("x" + item);
   if (visible) {
     obj.style.display="none";
	    } else {
     obj.style.display="block";
	    }
}

function Expand() {
   divs=document.getElementsByTagName("DIV");
   for (i=0;i<divs.length;i++) {
     divs[i].style.display="block";
     key=document.getElementById("x" + divs[i].id);
     key.innerHTML="<img src='../images/panel/tree_menu/open.gif' width='16' height='14' hspace='0' vspace='0' border='0'>";
   }
}

function Collapse() {
   divs=document.getElementsByTagName("DIV");
   for (i=0;i<divs.length;i++) {
     divs[i].style.display="none";
     key=document.getElementById("x" + divs[i].id);
     key.innerHTML="<img src='../images/panel/tree_menu/close.gif' width='16' height='14' hspace='0' vspace='0' border='0'>";
   }
}
