var ShowingDir = 1; var intScroll = 0; var showPreview = false; function id_of(valor) { aux = valor.split("_"); return aux[1]; } function getElementById_s(id) { if(document.getElementById){ var obj = document.getElementById(id); }else if(document.all){ var obj = document.all[id]; } return obj; } function HeaderClick(id) { stateChange(ShowingDir); var newId = id_of(id); stateChange(newId); ShowingDir = newId; } function stateChange(id) { var Dir = getElementById_s('Dir_'+id); var contDir = getElementById_s('contDir_'+id); var filesDir = getFilesByDir(id); var thumbsDir = getThumbsByDir(id); if (Dir.getAttribute('state') == 'on'){ Dir.setAttribute('state','off'); contDir.setAttribute('class','Ocult'); contDir.setAttribute('className','Ocult'); for (i=0;i= imgAux.width) { if (imgAux.height > 600 ) { ratio = 600 / imgAux.height ; } } else { if (imgAux.width > 700 ) { ratio = 700 / imgAux.width ; } } var pos = centerDiv([0,posCatalogo[1]],[document.body.clientWidth,divCatalogo.offsetHeight],[imgAux.width*ratio,imgAux.height*ratio]); divFoto.style.cssText = "top:"+pos[1]+"px;left:"+pos[0]+"px; text-align:center"; //Creamos la imagen var imgFoto = document.createElement('IMG'); imgFoto.src=imgAux.src; imgFoto.height = imgFoto.height * ratio; imgFoto.width = imgFoto.width * ratio; var divAspita = document.createElement('DIV'); divAspita.style.cssText = "text-align:right"; divAspita.innerHTML = "Close [X]"; divFoto.appendChild(divAspita); divFoto.appendChild(imgFoto); showPreview=true; } function BuscaPos(obj) { var curleft = curtop = 0; if (obj.offsetParent) { curleft = obj.offsetLeft curtop = obj.offsetTop while (obj = obj.offsetParent) { curleft += obj.offsetLeft curtop += obj.offsetTop } } return [curleft,curtop]; } function setScroll(div){ intScroll = div.scrollTop; } function mouseMove(type,state,obj) { switch(type) { case "filename": var thumb = getElementById_s('browfile_'+id_of(obj.id)); if (state == 'on') { obj.setAttribute('class','FileNameRoll'); obj.setAttribute('className','FileNameRoll'); mouseMove('thumbnail','on',thumb); } else { obj.setAttribute('class','FileName'); obj.setAttribute('className','FileName'); mouseMove('thumbnail','off',thumb); } break; case "thumbnail": if (state == 'on') { obj.setAttribute('class','CajaThumbRoll'); obj.setAttribute('className','CajaThumbRoll'); } else { obj.setAttribute('class','CajaThumb'); obj.setAttribute('className','CajaThumb'); } break; } }