/* aacapas.gsm por Manuel Sauceda / by Manuel Sauceda trabajar con DHTML / working with DHTML properties */ //Variables Globales //de proposito general var PLANOSPORPAGINA = 20; //planos x pagina: siempre multiplo de 4 var DIRPLANO = './planos/'; var DOTJPG = '.jpg'; var DOTAVI = '.wmv'; var DOTGIF = '_th.gif'; var STRMB = 'Mb'; var SLASH = '/'; var NOHAYINFORMACION = "Información no disponible."; var NOHAYDATOS = "No hay datos."; var tituloProyecto = "proyectos"; var tituloPlano = "planos"; var tituloRender = "render"; var tituloVideo = "videos"; var tituloPresupuesto = "presupuestos"; var tituloTrabajo = "¿Buscas trabajo?"; var tituloEnlace = "enlaces"; var tituloDestacados = "Proyectos destacados"; var browser = 0; NS = 0, layerObj = "null", styleObj = "null", visibleVar = "null", hideVar = "null"; var layeractivo = ''; var lyrdatos = 0; var handleReloj; var version = navigator.appVersion; /***************************************************************************************************************/ document.onmousemove = modifEstado; function modifEstado(){ window.status = ".:.Levantamientos AMR.:."; } /***************************************************************************************************************/ function inicio(){ if(document.getElementById){ browser = true; // determina si el navegador es de las ultimas versiones layerObj = "document.getElementById"; styleObj = ".style"; visibleVar = "visible"; hideVar = "hidden"; } else { browser = false; NS = (document.layers) ? true:false; layerObj = (NS) ? "document" : "document.all"; styleObj = (NS) ? "" : ".style"; visibleVar = (NS) ? "show" : "visible"; hideVar = (NS) ? "hide" : "hidden"; } // handleReloj = setTimeout('reloj()', 1000); } /***************************************************************************************************************/ function show(layerId){ if(browser){ eval(layerObj+'("'+layerId+'")'+styleObj+'.visibility = visibleVar'); }else{ eval(layerObj+'["'+layerId+'"]'+styleObj+'.visibility=visibleVar'); } } /***************************************************************************************************************/ function hide(layerId){ if(browser){ eval(layerObj+'("'+layerId+'")'+styleObj+'.visibility = hideVar'); }else{ eval(layerObj+'["'+layerId+'"]'+styleObj+'.visibility=hideVar'); } } /***************************************************************************************************************/ function moveLayerTo(layerId,top,left){ if(browser){ var x = layerObj + '(\'' + layerId + '\')' eval(x + styleObj + '.top = ' + top); eval(x + styleObj + '.left = ' + left); }else{ eval(layerObj+'["'+layerId+'"]'+styleObj+'.top='+top); eval(layerObj+'["'+layerId+'"]'+styleObj+'.left='+left); } } /***************************************************************************************************************/ function actualizaCapa(text,id){ if (browser){ x = document.getElementById(id); x.innerHTML = ''; x.innerHTML = text; }else if(!NS){ x = document.all[id]; x.innerHTML = text; } else { x = document.layers[id]; x.document.open(); x.document.write(text); x.document.close(); } } /***************************************************************************************************************/ function cursorOn(obj){ var on = ""; on = (document.all)? "hand":"pointer"; eval('obj.style.cursor = on'); } /***************************************************************************************************************/ function cursorOff(obj){ var off = "default"; eval('obj.style.cursor = off'); } /***************************************************************************************************************/ function ponMail(){ var s; s = 'amr@levantamientos.com'; document.write(s); } /***************************************************************************************************************/ var iW; function maximizar(){ top.window.moveTo(0,0); top.window.resizeTo(screen.availWidth,screen.availHeight); return(true); } ///////////////////////////// nueva ventana \\\\\\\\\\\\\\\\\\\\\\\\\\ function nuevaW(url){ var s = ''; var constWidth = 400; var constHeight = 300; var yTop,xLeft; yTop = 0; xLeft = 0; if(!iW || iW.closed) { if(url.indexOf(DOTAVI) != -1){ yTop = (screen.height - constHeight) / 2; xLeft = (screen.width - constWidth) / 2; iW = window.open('','video','resizable=no,scrollbars=no,top=' + yTop + ',left=' + xLeft + ',width=' + constWidth + ',height=' + constHeight); }else if(url.indexOf(DOTJPG) != -1){ iW = window.open('','plano','resizable=yes,scrollbars=yes,top=0,left=0'); }else iW = window.open(url,'plano','resizable=yes,scrollbars=yes,top=0,left=0'); } if(url.indexOf(DOTAVI) != -1){ s = ''; s += ''; s += ''; s += ''; s += ''; iW.document.open(); iW.document.write(s); iW.document.close(); } else{ if(url.indexOf(DOTJPG) != -1){ s = ''; s += 'Cerrar ventana'; s += '

'; s += ''; iW.document.open(); iW.document.write(s); iW.document.close(); } maximizar(); } iW.focus(); } /***************************************************************************************************************/ function reloj () { var mihora,hh,mm,ss,cadena; clearTimeout (handleReloj); mihora = new Date (); hh = mihora.getHours (); mm = mihora.getMinutes (); ss = mihora.getSeconds (); cadena = ' ' + hh + ':'; cadena += (mm < 10) ? '0' + mm : mm; cadena += ':'; cadena += (ss < 10) ? '0' + ss : ss; cadena += ' '; actualizaCapa(cadena,'reloj'); handleReloj = setTimeout('reloj()', 1000); } /***************************************************************************************************************/ function paginarProyecto(capa,inicio){ var s1 = '', s2 = '', s3 = ''; var z = 0; j = 0; var fichero = ''; s1 = '

Cerrar ventana
'; s1 += ''; z = rsproyecto.length - 1; s3 = ''; for(var i=inicio; i>=0 && i>inicio-PLANOSPORPAGINA; i--){ if (j%4==0){ j = 0; s3 += ''; } fichero = DIRPLANO + rsproyecto[i].path + SLASH + rsplanos[rsproyecto[i].path][0].fichero; s3 += ''; j++; } for(var k=j+1; k<=4; k++){ s3 += ''; } s3 += ''; s2 = ''; s1 += s2 + s3 + '
' + tituloProyecto.toUpperCase() + '
'; s3 += '
' + rsproyecto[i].proyecto + '
' + rsproyecto[i].municipio + '
 
'; if (inicio < z){ inicio = inicio + PLANOSPORPAGINA; s2 += 'anterior   '; } if (i > 0){ s2 += 'siguiente'; } s2 += '
'; actualizaCapa(s1,capa); } /***************************************************************************************************************/ function paginarRender(capa,inicio){ var s1 = '', s2 = '', s3 = ''; var fichero = ''; var z = 0, j = 0, k = 0; var rsaux; rsaux = new Array() fichero = tituloRender.toUpperCase(); for(var i=inicio; i>=0; i--){ if(rsrender[rsproyecto[i].path]){ rsaux[j] = new Array() rsaux[j] = rsrender[rsproyecto[i].path]; j++; } } s1 = ''; s1 += ''; if(j){ j = 0; z = rsproyecto.length - 1; s3 = ''; for(var i=inicio; i>=0 && j'; } fichero = DIRPLANO + rsproyecto[i].path + rsrender[rsproyecto[i].path][0].ruta + SLASH + rsrender[rsproyecto[i].path][0].fichero; s3 += ''; k++; } } for(var x=k+1; x<=4; x++){ s3 += ''; } s3 += ''; s2 += ''; s1 += s2 + s3 + '
' + fichero + '
'; s3 += '
' + rsproyecto[i].proyecto + '
' + rsproyecto[i].municipio + '
 
'; if (inicio < z){ inicio = inicio + PLANOSPORPAGINA; s2 += 'anterior'; } if (i > 0){ s2 += 'siguiente'; } s2 += '
'; } actualizaCapa(s1,capa); } /***************************************************************************************************************/ function paginarVideo(capa,inicio){ var s1 = '', s2 = '', s3 = ''; var fichero = ''; var z = 0, j = 0, k = 0; var rsaux; rsaux = new Array() fichero = tituloVideo.toUpperCase(); for(var i=inicio; i>=0; i--){ if(rsvideo[rsproyecto[i].path]){ rsaux[j] = new Array() rsaux[j] = rsvideo[rsproyecto[i].path]; j++; } } s1 = ''; s1 += ''; if(j){ j = 0; z = rsproyecto.length - 1; s3 = ''; for(var i=inicio; i>=0 && j'; } fichero = DIRPLANO + rsproyecto[i].path + rsrender[rsproyecto[i].path][0].ruta + SLASH + rsrender[rsproyecto[i].path][0].fichero; mivideo = DIRPLANO + rsproyecto[i].path + rsvideo[rsproyecto[i].path][0].ruta + SLASH + rsvideo[rsproyecto[i].path][0].fichero; s3 += ''; k++; } } for(var x=k+1; x<=4; x++){ s3 += ''; } s3 += ''; s2 += '' s1 += s2 + s3 + '
' + fichero + '
'; s3 += ''; s3 += '
' + rsproyecto[i].proyecto + '
' + rsproyecto[i].municipio + '
(' + rsvideo[rsproyecto[i].path][0].tamano + STRMB + ')
 
'; if (inicio < z){ inicio = inicio + PLANOSPORPAGINA; s2 += 'anterior'; } if (i > 0){ s2 += 'siguiente'; } s2 += '
'; } actualizaCapa(s1,capa); } /***************************************************************************************************************/ function mostrarDatos(indice,rsobj,titulo){ var s = '', fichero=''; var z = 0; s = ''; s += ''; s += ''; s += ''; s += ''; s += ''; if(titulo==tituloPlano){ if (rsrender[rsproyecto[indice].path]){ s += ''; }else{ s += ' '; } } s += ''; s += '
' + rsproyecto[indice].proyecto + '. ' + rsproyecto[indice].municipio + 'Cerrar ventana
 
'; if(rsproyecto[indice].des.length > 0){ s += rsproyecto[indice].des; }else{ s += NOHAYINFORMACION.toUpperCase(); } s += '
 
' + titulo.toUpperCase() + ''; }else{ s += ' '; } if (rsvideo[rsproyecto[indice].path]){ fichero = DIRPLANO + rsproyecto[indice].path + rsvideo[rsproyecto[indice].path][0].ruta + SLASH + rsvideo[rsproyecto[indice].path][0].fichero; s += ''; s += '
'; s += ''; if(rsobj[rsproyecto[indice].path]){ z = rsobj[rsproyecto[indice].path].length; s += ''; var mivideo=''; for(var i=0; i<=z-1; i++){ if(i % 4==0){ s += ''; } if(titulo==tituloPlano) fichero = DIRPLANO + rsproyecto[indice].path + SLASH + rsplanos[rsproyecto[indice].path][i].fichero; else fichero = DIRPLANO + rsproyecto[indice].path + rsrender[rsproyecto[indice].path][i].ruta + SLASH + rsrender[rsproyecto[indice].path][i].fichero; mivideo = (titulo==tituloVideo) ? DIRPLANO + rsproyecto[indice].path + rsvideo[rsproyecto[indice].path][i].ruta + SLASH + rsvideo[rsproyecto[indice].path][i].fichero : ''; s += ''; } }else s += ''; s += '
     
'; s += '
' + rsobj[rsproyecto[indice].path][i].nombre + '
' + NOHAYDATOS.toUpperCase(); + '
'; actualizaCapa(s,'datosproyecto'); } /***************************************************************************************************************/ function mostrarDestacados(){ var s = ''; if (arguments.length > 0){ s = ''; s += ''; for(var i=0; i<=arguments.length-1;i++){ s += ''; } s += '
' + tituloDestacados.toUpperCase() + '
'; s += '
'; s += rsproyecto[arguments[i]].proyecto + '
' + rsproyecto[arguments[i]].municipio + '
'; actualizaCapa(s,'destacados'); } } /***************************************************************************************************************/ function mostrarenlace(indice){ var s = ''; var up = 0; s = ''; s += ''; s += ''; s += ''; s += ''; s += ''; up = indice.length; up--; for(var i=1; i<=up; i++){ if (i%2) s += ''; else s += ''; s += ''; } s += '
' + tituloEnlace.toUpperCase() + 'Enlaces de ' + indice[0].toUpperCase() + '
[ '; s += rsenlace["oficial"][0] + ' ]'; s += '[ '; s += rsenlace["arqueologia"][0] + ' ]'; s += '[ '; s += rsenlace["arquitectura"][0] + ' ]
'; s += indice[i].str + '
'; actualizaCapa(s,'enlaces'); }