//**** DEFINICIÓN DE LA CLASE DIV MOSTRADOS ***** function divMostradoClass(d) { this.div = d; this.setDiv = function (d) { this.div = d; } this.getDiv = function getDiv() { return this.div; } } //*********************************************** function findPestanaAct(pestanas3) { for (i = 0; i < pestanas3.length; i++) { if (pestanas3[i].status == 1) return pestanas3[i]; } } function findPestanaDest(id, pestanas2) { for (f = 0; f < pestanas2.length; f++) { if (pestanas2[f].id == id) return pestanas2[f]; } } function mostrarPestana(divMostrado11, divParaMostrar, pestana, pestanas11) { if (divMostrado11.getDiv() != divParaMostrar) { var pestanaAct = findPestanaAct(pestanas11); var pestanaDest = findPestanaDest(pestana.id, pestanas11); divParaMostrar.style.visibility = "visible"; divParaMostrar.style.display = "block"; divParaMostrar.style.zIndex = "25"; pestana.src = pestanaDest.img+"_on"+pestanaDest.ext; var pestAct = document.getElementById(pestanaAct.id); pestAct.src = pestanaAct.img+"_off"+pestanaAct.ext; pestanaDest.status = 1; pestanaAct.status = 0; divMostrado11.getDiv().style.visibility = "hidden"; divMostrado11.getDiv().style.display = "none"; divMostrado11.getDiv().style.zIndex = "20"; divMostrado11.setDiv(divParaMostrar); return pestanaDest.id; } } //*** function buscarDivDefaultInactivo(idActivo, divs, pestana) { for (r = 0; r < divs.length; r++) { if ((divs[r].defecto == 1) && (divs[r].id != idActivo.id) && (divs[r].pestana == pestana)) return divs[r]; } } //*** function marcarRecall(idActivo, divs1) { for (h = 0; h < divs1.length; h++) { if (divs1[h].id == idActivo) { divs1[h].recall = 1; h = divs1.length; } } } //*** function buscarDivRecall(divs001, p) { var d = null; for (x = 0; x < divs001.length; x++) { if ((divs001[x].recall == 1) && (divs001[x].pestana == p)) { d = divs001[x]; d.recall = 0; x = divs001.length; } } return d; } //*** function buscaNumeroPestanaPorId(pestanas001, id) { for (u = 0; u < pestanas001.length; u++) { if (pestanas001[u].id == id) { return (u+1); } } } //*** function mostrarPestanaSubDivs(divMostrado22, divParaMostrar, pestana0, pestanas01) { if (divMostrado22.getDiv() != divParaMostrar) { var idPestanaParaMostrar = mostrarPestana(divMostrado22, divParaMostrar, pestana0, pestanas01); var numPestana = buscaNumeroPestanaPorId(pestanas01, idPestanaParaMostrar); } } //*** function cambiarImagen(idImg, imgNueva){ document.getElementById(idImg).src=imgNueva; } //*** function initializeGlideToggler(gliderID, togglerID) { if (!gliders[gliderID]) { featuredcontentglider.init({ gliderid: gliderID, //ID of main glider container contentclass: "glidecontent", //Shared CSS class name of each glider content togglerid: togglerID, //ID of toggler container remotecontent: "", //Get gliding contents from external file on server? "filename" or "" to disable selected: 0, //Default selected content index (0=1st) persiststate: false, //Remember last content shown within browser session (true/false)? speed: 500, //Glide animation duration (in milliseconds) direction: "updown", //set direction of glide: "updown", "downup", "leftright", or "rightleft" autorotate: false, //Auto rotate contents (true/false)? autorotateconfig: [3000, 2] //if auto rotate enabled, set [milliseconds_btw_rotations, cycles_before_stopping] }); gliders[gliderID] = true; } } //*** function showBeltCarousel() { //alert("showBeltCarousel"); document.getElementById("beltPanel2").style.visibility = 'visible'; document.getElementById("beltPanel3").style.visibility = 'visible'; }