/* 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 += '| ' + tituloProyecto.toUpperCase() + ' | '; z = rsproyecto.length - 1; s3 = '||
' + rsproyecto[i].proyecto + ' ' + rsproyecto[i].municipio + ' | ';
j++;
}
for(var k=j+1; k<=4; k++){
s3 += ''; } s3 += ' | '; if (inicio < z){ inicio = inicio + PLANOSPORPAGINA; s2 += 'anterior '; } if (i > 0){ s2 += 'siguiente'; } s2 += ' | '; s1 += s2 + s3 + '
| ' + fichero + ' | '; if(j){ j = 0; z = rsproyecto.length - 1; s3 = '||
' + rsproyecto[i].proyecto + ' ' + rsproyecto[i].municipio + ' | ';
k++;
}
}
for(var x=k+1; x<=4; x++){
s3 += ''; } s3 += ' | '; if (inicio < z){ inicio = inicio + PLANOSPORPAGINA; s2 += 'anterior'; } if (i > 0){ s2 += 'siguiente'; } s2 += ' |
| ' + fichero + ' | '; if(j){ j = 0; z = rsproyecto.length - 1; s3 = '||
| ';
s3 += ' ' + rsproyecto[i].proyecto + ' ' + rsproyecto[i].municipio + ' (' + rsvideo[rsproyecto[i].path][0].tamano + STRMB + ') | ';
k++;
}
}
for(var x=k+1; x<=4; x++){
s3 += ''; } s3 += ' | '; if (inicio < z){ inicio = inicio + PLANOSPORPAGINA; s2 += 'anterior'; } if (i > 0){ s2 += 'siguiente'; } s2 += ' |
| ' + rsproyecto[indice].proyecto + '. ' + rsproyecto[indice].municipio + ' | '; s += '||||
| '; if(rsproyecto[indice].des.length > 0){ s += rsproyecto[indice].des; }else{ s += NOHAYINFORMACION.toUpperCase(); } s += ' | ||||
| ' + titulo.toUpperCase() + ' | '; if(titulo==tituloPlano){ if (rsrender[rsproyecto[indice].path]){ 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 += ' | ';
}else{
s += ' ';
}
}
s += '|||
| ';
s += ' ' + rsobj[rsproyecto[indice].path][i].nombre + ' | ';
}
}else
s += '||||
| ' + NOHAYDATOS.toUpperCase(); + ' | ||||
| ' + tituloDestacados.toUpperCase() + ' |
| ';
s += ' '; s += rsproyecto[arguments[i]].proyecto + ' ' + rsproyecto[arguments[i]].municipio + ' |
| ' + tituloEnlace.toUpperCase() + ' | '; s += 'Enlaces de ' + indice[0].toUpperCase() + ' | |
| [ '; s += rsenlace["oficial"][0] + ' ]'; s += '[ '; s += rsenlace["arqueologia"][0] + ' ]'; s += '[ '; s += rsenlace["arquitectura"][0] + ' ] | '; s += '||
| '; s += indice[i].str + ' | ||