// JavaScript Document

/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="busca.asp?tipo=toner">CARTUCHOS DE TONER</a>'
menu1[1]='<a href="busca.asp?tipo=tinta">CARTUCHOS DE TINTA</a>'
menu1[2]='<a href="busca.asp?tipo=fax">CINTAS PARA FAX</a>'
menu1[3]='<a href="busca.asp?tipo=copiadora">TONER PARA COPIADORA</a>'
menu1[4]='<a href="busca.asp?tipo=computo">ACCESORIOS DE C&Oacute;MPUTO</a>'
menu1[5]='<a href="busca.asp?tipo=multimedia">ACCESORIOS MULTIMEDIA</a>'
menu1[6]='<a href="busca.asp?tipo=impresora">IMPRESORAS</a>'
menu1[7]='<a href="serviciotecnico.asp">SERVICIO T&Eacute;CNICO</a>'
menu1[8]='<a href="busca.asp?tipo=otros">OTROS</a>'
//menu1[9]='<img src="images/bottommenu.gif" width="150" height="9" />'

//Contents for menu 2, and so on
var menu2=new Array()
menu2[0]='<a href="ofertasypromos.asp?proc=2">OFERTAS</a>'
menu2[1]='<a href="ofertasypromos.asp?proc=1">PROMOCIONES</a>'

//Contents for menu 3, and so on
var menu3=new Array()
menu3[0]='<a href="catdistribuidor.asp?proc=3">CARTUCHOS</a>'
menu3[1]='<a href="catdistribuidor.asp?proc=4">INSUMOS</a>'
menu3[2]='<a href="catdistribuidor.asp?proc=5">OTROS</a>'

//Contents for menu 4, and so on
var menu4=new Array()
menu4[0]='<a href="alcliente.asp">SERVICIO AL CLIENTE</a>'
menu4[1]='<a href="platinum.asp">PROGRAMA PLATINUM</a>'
menu4[2]='<a href="asesoriatec.asp">ASESOR&Iacute;A T&Eacute;CNICA</a>'

var menu5=new Array()
menu5[0]='<a href="historia.asp">HISTORIA</a>'
menu5[1]='<a href="certificaciones.asp">CERTIFICACIONES</a>'
menu5[2]='<a href="ventajas.asp">NUESTRAS VENTAJAS Y  &nbsp;&nbsp;PROCESO</a>'
menu5[4]='<a href="noticias.asp">NOTICIAS Y NOVEDADES</a>'
menu5[5]='<a href="boletines.asp">BOLETINES</a>'
menu5[6]='<a href="testimonios.asp">TESTIMONIOS CLIENTES</a>'

//Contents for menu 2, and so on
var menu6=new Array()
menu6[0]='<a href="contacto.asp">CONTACTO</a>'
menu6[1]='<a href="chat.asp">TLMK EN L&Iacute;NEA</a>'
menu6[2]='<a href="./phpbb3/" target="_blank">FOROS DE DISCUSI&Oacute;N</a>'
menu6[3]='<a href="pregfrec.asp">FAQs - PREG. FRECUENTES</a>'
menu6[4]='<a href="sugerencias.asp">SUGERENCIAS</a>'
menu6[5]='<a href="quejas.asp">QUEJAS</a>'
menu6[6]='<a href="evaluacion.asp">EVALUACI&Oacute;N DE SERVICIO</a>'
menu6[7]='<a href="bolsa.asp">BOLSA DE TRABAJO</a>'
menu6[8]='<a href="terminos.asp">TERMINOS Y CONDICIONES</a>'

var menuwidth='120px' //default menu width
var menubgcolor='no'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)


dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"

}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu

<!-- Script de Galeria POP - Parte 01 -->

<!--

// Example:
// onMouseOver="toolTip('tool tip text here')";
// onMouseOut="toolTip()";
// -or-
// onMouseOver="toolTip('more good stuff', '#FFFF00', 'orange')";
// onMouseOut="toolTip()"; 

var ns4 = document.layers;
var ns6 = document.getElementById && !document.all;
var ie4 = document.all;
offsetX = 15;
offsetY = 5;
var toolTipSTYLE="";
function initToolTips()
{
  if(ns4||ns6||ie4)
  {
    if(ns4) toolTipSTYLE = document.toolTipLayer;
    else if(ns6) toolTipSTYLE = document.getElementById("toolTipLayer").style;
    else if(ie4) toolTipSTYLE = document.all.toolTipLayer.style;
    if(ns4) document.captureEvents(Event.MOUSEMOVE);
    else
    {
      toolTipSTYLE.visibility = "visible";
      toolTipSTYLE.display = "none";
    }
    document.onmousemove = moveToMouseLoc;
  }
}
function toolTip(msg, fg, bg)
{
  if(toolTip.arguments.length < 1) // hide
  {
    if(ns4) toolTipSTYLE.visibility = "hidden";
    else toolTipSTYLE.display = "none";
  }
  else // show
  {
    if(!fg) fg = "#000000";
    if(!bg) bg = "#FFFFFF";
    var content =
    '<table border="0" cellspacing="0" cellpadding="1" bgcolor="' + fg + '"><td>' +
    '<table border="0" cellspacing="0" cellpadding="1" bgcolor="' + bg + 
    '"><td align="left"><font face="sans-serif" color="' + fg +
    '" size="-1">&nbsp\;' + msg +
    '&nbsp\;</font></td></table></td></table>';
    if(ns4)
    {
      toolTipSTYLE.document.write(content);
      toolTipSTYLE.document.close();
      toolTipSTYLE.visibility = "visible";
    }
    if(ns6)
    {
      document.getElementById("toolTipLayer").innerHTML = content;
      toolTipSTYLE.display='block'
    }
    if(ie4)
    {
      document.all("toolTipLayer").innerHTML=content;
      toolTipSTYLE.display='block'
    }
  }
}
function moveToMouseLoc(e)
{
  if(ns4||ns6)
  {
    x = e.pageX;
    y = e.pageY;
  }
  else
  {
    x = event.x + document.body.scrollLeft;
    y = event.y + document.body.scrollTop;
  }
  toolTipSTYLE.left = x + offsetX;
  toolTipSTYLE.top = y + offsetY;
  return true;
}
// -->

<!-- Script de Galeria POP - Parte 02 -->

objetos = new Object();
tiempotrans = new Object();

function transparente(object, destOp, rate, delta){
if (!document.all)
return
if (object != "[object]"){ 
setTimeout("transparente("+object+","+destOp+","+rate+","+delta+")",0);
return;
}

clearTimeout(tiempotrans[object.sourceIndex]);

diff = destOp-object.filters.alpha.opacity;
direction = 1;
if (object.filters.alpha.opacity > destOp){
direction = -1;
}
delta=Math.min(direction*diff,delta);
object.filters.alpha.opacity+=direction*delta;

if (object.filters.alpha.opacity != destOp){
objetos[object.sourceIndex]=object;
tiempotrans[object.sourceIndex]=setTimeout("transparente(objetos["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
}
}

<!-- Script de Galeria POP - Parte 03 -->

function AbreMol(mol){
window.open(''+mol+'','','width=700,height=550,resizable=yes,scrollbars=YES');
}
function AbreAS400(mol,ano,mes){
window.open('./as400select.jsp?mol='+mol+'&ano='+ano+'&mesfin='+mes+'&mesini=01&origen=00&Acum=1','','width=780,height=500,resizable=NO,scrollbars=YES');
}

<!-- Script de Galeria POP - Parte 04 -->

<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
