var ArregloInicial; var NumeroOpciones; ArregloInicial = "-000--+XXX0000000"; NumeroOpciones = 17; // number of the total options in the menu when completely displayed function GrabarCookie(Nombre, Valor, Caducidad) { document.cookie = Nombre + "=" + escape(Valor) + ((Caducidad==null) ? "" : (";expires=" + Caducidad.toGMTString())) } function LeerCookie(Nombre) { var Buscamos = Nombre + "="; var i, j if (document.cookie.length > 0) { i= document.cookie.indexOf(Buscamos); if (i!=-1) { i+= Buscamos.length; j = document.cookie.indexOf(";", i); if (j==-1) { j=document.cookie.length; } return unescape(document.cookie.substring(i,j)); } else return ""; } } function EstableceArreglo(opcion) { var arreglo; GrabarCookie("Opcion",opcion); arreglo = LeerCookie("Arreglo"); if (arreglo == null || arreglo.length != NumeroOpciones) { GrabarCookie("Arreglo", ArregloInicial); } } function Enlace1(sURL, sOpc) { GrabarCookie("Opcion", sOpc); window.location.href = sURL; } function Enlace3(sURL, sOpc, arreglo) { GrabarCookie("Opcion", sOpc); GrabarCookie("Arreglo", arreglo); window.location.href = sURL; } function OverText(obj) { if (obj.className != "SelText") {obj.className = "OverText"; } } function OutText(obj) { if (obj.className != "SelText") {obj.className = "OutText"; } } function OverText2(obj) { obj.className = "Tipo9"; } function OutText2(obj) { obj.className = "Tipo8"; } function OverText3(opc,txt) { var option = document.getElementById(opc); var text = document.getElementById(txt); if (text.className != "SelText") { text.className = "OverText"; if (option.firstChild.nodeValue == "+" || option.firstChild.nodeValue == "-") option.className = "OverText"; else option.className = "OverText2"; } } function OutText3(opc,txt) { var option = document.getElementById(opc); var text = document.getElementById(txt); if (text.className != "SelText") { text.className = "OutText"; option.className = "OutText"; } } function OverBoton(btn) { btn.className = "BotonOver"; } function OutBoton(btn) { btn.className = "BotonOut"; } function OverBotonLang(btn,language) { DivBoton.src = "images/englishover.gif"; btn.className = "BotonOver"; } function OutBotonLang(btn,language) { DivBoton.src = "images/english.gif"; btn.className = "BotonOut"; } function Mensaje(msg) { if (msg == '') { window.status="Lexus Inversiones SAC"; } else { window.status=msg; } //return true; } function Saltar(destino) { if (destino.indexOf("?") == -1) { switch (destino) { case 'back': history.back(); break; case 'home': window.location.href = "default.aspx"; break; case 'NuevoProyecto': window.location.href = "Proyecto.aspx?projectID=PR100006&thisOption=2112"; break; default: window.location.href = destino + ".aspx" } } else window.location.href = destino; } var ScrollText; function ScrollTextBox(indice,language) { switch (indice) { case '0': if (language == "Spanish") ScrollText = "Una familia, una vivienda "; else ScrollText = "One family, one home "; break; } document.scrollform.scrollbox.value = ScrollText; // ABCDE len = ScrollText.length; // 5 firstletter = ScrollText.charAt(0); // A remainingletters = ScrollText.substring(1,len); // BCDE ScrollText= remainingletters + firstletter; // BCDEA setTimeout("ScrollTextBox('')",200); // wait 1/5 sec } function ltrim(sCadena) { for (var iCount = 0; iCount < sCadena.length && sCadena.charCodeAt(iCount) <= 32 ; iCount++); return sCadena.substring(iCount, sCadena.length); } function rtrim(sCadena) { for (var iCount = sCadena.length - 1; iCount >= 0 && sCadena.charCodeAt(iCount) <= 32 ; iCount--); return sCadena.substring(0, iCount + 1); } function trim(sCadena) { return rtrim(ltrim(sCadena)) } function SeteaClass(opcion,arreglo) { switch (opcion) { case '1': if (arreglo.substring(0,1) != "X") { option = document.getElementById("opc0"); if (arreglo.substring(0,1) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt0"); text.className = "SelText"; } break; case '11': if (arreglo.substring(1,2) != "X") { option = document.getElementById("opc1"); if (arreglo.substring(1,2) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt1"); text.className = "SelText"; } else { option = document.getElementById("opc0"); if (arreglo.substring(0,1) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt0"); text.className = "SelText"; } break; case '12': if (arreglo.substring(2,3) != "X") { option = document.getElementById("opc2"); if (arreglo.substring(2,3) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt2"); text.className = "SelText"; } else { option = document.getElementById("opc0"); if (arreglo.substring(0,1) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt0"); text.className = "SelText"; } break; case '13': if (arreglo.substring(3,4) != "X") { option = document.getElementById("opc3"); if (arreglo.substring(3,4) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt3"); text.className = "SelText"; } else { option = document.getElementById("opc0"); if (arreglo.substring(0,1) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt0"); text.className = "SelText"; } break; case '2': if (arreglo.substring(4,5) != "X") { option = document.getElementById("opc4"); if (arreglo.substring(4,5) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt4"); text.className = "SelText"; } break; case '21': if (arreglo.substring(5,6) != "X") { option = document.getElementById("opc5"); if (arreglo.substring(5,6) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt5"); text.className = "SelText"; } else { option = document.getElementById("opc4"); if (arreglo.substring(4,5) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt4"); text.className = "SelText"; } break; case '211': if (arreglo.substring(6,7) != "X") { option = document.getElementById("opc6"); if (arreglo.substring(6,7) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt6"); text.className = "SelText"; } else { if (arreglo.substring(5,6) != "X") { option = document.getElementById("opc5"); if (arreglo.substring(5,6) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt5"); text.className = "SelText"; } else { option = document.getElementById("opc4"); if (arreglo.substring(4,5) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt4"); text.className = "SelText"; } } break; case '2111': if (arreglo.substring(7,8) != "X") { option = document.getElementById("opc7"); if (arreglo.substring(7,8) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt7"); text.className = "SelText"; } else { if (arreglo.substring(6,7) != "X") { option = document.getElementById("opc6"); if (arreglo.substring(6,7) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt6"); text.className = "SelText"; } else { if (arreglo.substring(5,6) != "X") { option = document.getElementById("opc5"); if (arreglo.substring(5,6) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt5"); text.className = "SelText"; } else { option = document.getElementById("opc4"); if (arreglo.substring(4,5) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt4"); text.className = "SelText"; } } } break; case '2112': if (arreglo.substring(8,9) != "X") { option = document.getElementById("opc8"); if (arreglo.substring(8,9) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt8"); text.className = "SelText"; } else { if (arreglo.substring(6,7) != "X") { option = document.getElementById("opc6"); if (arreglo.substring(6,7) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt6"); text.className = "SelText"; } else { if (arreglo.substring(5,6) != "X") { option = document.getElementById("opc5"); if (arreglo.substring(5,6) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt5"); text.className = "SelText"; } else { option = document.getElementById("opc4"); if (arreglo.substring(4,5) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt4"); text.className = "SelText"; } } } break; case '2113': if (arreglo.substring(9,10) != "X") { option = document.getElementById("opc9"); if (arreglo.substring(9,10) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt9"); text.className = "SelText"; } else { if (arreglo.substring(6,7) != "X") { option = document.getElementById("opc6"); if (arreglo.substring(6,7) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt6"); text.className = "SelText"; } else { if (arreglo.substring(5,6) != "X") { option = document.getElementById("opc5"); if (arreglo.substring(5,6) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt5"); text.className = "SelText"; } else { option = document.getElementById("opc4"); if (arreglo.substring(4,5) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt4"); text.className = "SelText"; } } } break; case '212': if (arreglo.substring(10,11) != "X") { option = document.getElementById("opc10"); if (arreglo.substring(10,11) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt10"); text.className = "SelText"; } else { if (arreglo.substring(5,6) != "X") { option = document.getElementById("opc5"); if (arreglo.substring(5,6) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt5"); text.className = "SelText"; } else { option = document.getElementById("opc4"); if (arreglo.substring(4,5) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt4"); text.className = "SelText"; } } break; case '22': if (arreglo.substring(11,12) != "X") { option = document.getElementById("opc11"); if (arreglo.substring(11,12) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt11"); text.className = "SelText"; } else { option = document.getElementById("opc4"); if (arreglo.substring(4,5) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt4"); text.className = "SelText"; } break; case '3': if (arreglo.substring(12,13) != "X") { option = document.getElementById("opc12"); if (arreglo.substring(12,13) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt12"); text.className = "SelText"; } break; case '4': if (arreglo.substring(13,14) != "X") { option = document.getElementById("opc13"); if (arreglo.substring(13,14) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt13"); text.className = "SelText"; } break; case '5': if (arreglo.substring(14,15) != "X") { option = document.getElementById("opc14"); if (arreglo.substring(14,15) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt14"); text.className = "SelText"; } break; case '6': if (arreglo.substring(15,16) != "X") { option = document.getElementById("opc15"); if (arreglo.substring(15,16) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt15"); text.className = "SelText"; } break; case '7': if (arreglo.substring(16,17) != "X") { option = document.getElementById("opc16"); if (arreglo.substring(16,17) != "0") { option.className = "SelText"; } else { option.className = "SelText2"; } text = document.getElementById("txt16"); text.className = "SelText"; } break; } } function Expande(arreglo,opc) { var opcion; opcion = LeerCookie("Opcion"); switch(opc) { case 0: arreglo = "-000" + arreglo.substring(4,NumeroOpciones); break; case 4: arreglo = arreglo.substring(0,4) + "-+XXXXX0" + arreglo.substring(12,NumeroOpciones); break; case 5: arreglo = arreglo.substring(0,5) + "-+XXX0" + arreglo.substring(11,NumeroOpciones); break; case 6: arreglo = arreglo.substring(0,6) + "-000" + arreglo.substring(10,NumeroOpciones); break; } StringMenu = PreparaMenu(opcion,arreglo); document.getElementById('mainmenu').innerHTML = StringMenu; GrabarCookie("Arreglo",arreglo); SeteaClass(opcion,arreglo); } function Retrae(arreglo,opc) { var opcion; opcion = LeerCookie("Opcion"); switch(opc) { case 0: arreglo = "+XXX" + arreglo.substring(4,NumeroOpciones); break; case 4: arreglo = arreglo.substring(0,4) + "+XXXXXXX" + arreglo.substring(12,NumeroOpciones); break; case 5: arreglo = arreglo.substring(0,5) + "+XXXXX" + arreglo.substring(11,NumeroOpciones); break; case 6: arreglo = arreglo.substring(0,6) + "+XXX" + arreglo.substring(10,NumeroOpciones); break; } StringMenu = PreparaMenu(opcion,arreglo); document.getElementById('mainmenu').innerHTML = StringMenu; GrabarCookie("Arreglo",arreglo); SeteaClass(opcion,arreglo); } function PreparaMenu(opcion,arreglo) { var i; var StringMenu; var Item; var menu = new Array(NumeroOpciones); menu[0] = " Quiénes Somos"; menu[1] = " Presentación"; menu[2] = " Visión"; menu[3] = " Misión"; menu[4] = " Unidades Estratégicas"; menu[5] = " Inmobiliaria"; menu[6] = " Proyectos"; menu[7] = " Realizados"; menu[8] = " Actuales"; menu[9] = " Próximos"; menu[10] = " Dptos. en Venta"; menu[11] = " Tecn. de Información"; menu[12] = " Noticias"; menu[13] = " Oportunidades Laborales"; menu[14] = " Contáctenos"; menu[15] = " Enlaces de Interés"; menu[16] = " Intranet"; StringMenu = "
| + | "; break; case '-': StringMenu = StringMenu + "onclick=Retrae('"+arreglo+"',"+i+") onMouseOver='OverText3("+str1+","+str2+")' onMouseOut='OutText3("+str1+","+str2+")'>-"; break; case '0': StringMenu = StringMenu + "onMouseOver='OverText3("+str1+","+str2+")' onMouseOut='OutText3("+str1+","+str2+")'> "; break; } StringMenu = StringMenu + ""; break; case 1: StringMenu = StringMenu + "onclick=Enlace3('Presentacion.aspx','11','"+arreglo+"')>"; break; case 2: StringMenu = StringMenu + "onclick=Enlace3('Vision.aspx','12','"+arreglo+"')>"; break; case 3: StringMenu = StringMenu + "onclick=Enlace3('Mision.aspx','13','"+arreglo+"')>"; break; case 4: StringMenu = StringMenu + "onclick=Enlace3('UnidadesEstrategicas.aspx','2','"+arreglo+"')>"; break; case 5: StringMenu = StringMenu + "onclick=Enlace3('Inmobiliaria.aspx','21','"+arreglo+"')>"; break; case 6: StringMenu = StringMenu + "onclick=Enlace3('Proyectos.aspx','211','"+arreglo+"')>"; break; case 7: StringMenu = StringMenu + "onclick=Enlace3('ProyectosPorEstado.aspx?status=30','2111','"+arreglo+"')>"; break; case 8: StringMenu = StringMenu + "onclick=Enlace3('ProyectosPorEstado.aspx?status=20','2112','"+arreglo+"')>"; break; case 9: StringMenu = StringMenu + "onclick=Enlace3('ProyectosPorEstado.aspx?status=10','2113','"+arreglo+"')>"; break; case 10: StringMenu = StringMenu + "onclick=Enlace3('EnVenta.aspx','212','"+arreglo+"')>"; break; case 11: StringMenu = StringMenu + "onclick=Enlace3('TecnologiaDeInformacion.aspx','22','"+arreglo+"')>"; break; case 12: StringMenu = StringMenu + "onclick=Enlace3('ListaDeNoticias.aspx','3','"+arreglo+"')>"; break; case 13: StringMenu = StringMenu + "onclick=Enlace3('Empleos.aspx','4','"+arreglo+"')>"; break; case 14: StringMenu = StringMenu + "onclick=Enlace3('Contactenos.aspx','5','"+arreglo+"')>"; break; case 15: StringMenu = StringMenu + "onclick=Enlace3('LinksDeInteres.aspx','6','"+arreglo+"')>"; break; case 16: StringMenu = StringMenu + "onclick=Enlace3('Intranet.aspx','7','"+arreglo+"')>"; break; } StringMenu = StringMenu + menu[i] + " |