Español
<tipo DE ESTILO=texto/css>#barra de menú { ANTECEDENTES: rgb(212,208,200); FUENTE: menú; CURSOR: predeterminado; POSICIÓN: relativa } #barra de menú .root { BORDE DERECHO: rgb(212,208,200) 1px sólido; RELLENO-DERECHA: 2pt; BORDE SUPERIOR: rgb(212,208,200) 1px sólido; RELLENO IZQUIERDO: 2 puntos; FRONTERA IZQUIERDA: rgb(212,208,200) 1px sólido; BORDE INFERIOR: rgb(212,208,200) 1px sólido } #menubar TABLA { BORDE DERECHO: gris 2px sólido; RELLENO-DERECHA: 0pt; BORDE SUPERIOR: #eeeeee 2px sólido; PANTALLA: ninguna; RELLENO IZQUIERDO: 0pt; ANTECEDENTES: rgb(212,208,200); RELLENO INFERIOR: 0pt; MARGEN: 0 puntos; FUENTE: menú; FRONTERA IZQUIERDA: #eeeeee 2px sólido; ACOLCHADO SUPERIOR: 0pt; BORDE INFERIOR: gris sólido de 2px; POSICIÓN: absoluta } #menubar TABLA TD { PADDING-RIGHT: 15pt; RELLENO IZQUIERDO: 12 puntos; ACOLCHADO INFERIOR: 2pt; MARGEN: 0 puntos; PADDING-TOP: 2pt } #menubar .highlight { FONDO: #08246b; COLOR: blanco } #barra de menú .disabledhighlight { FONDO: rgb(212,208,200); COLOR: gris } #menubar #break { COLOR: gris } #menubar .disabled { COLOR: gris } #menubar #break { PADDING-RIGHT: 0pt; RELLENO IZQUIERDO: 0pt; RELLENO INFERIOR: 0pt; MARGEN: 0 puntos; PADDING-TOP: 0pt } #menubar SPAN.más { PADDING-RIGHT: 0pt; RELLENO IZQUIERDO: 0pt; IZQUIERDA: 14 puntos; FLOTADOR: derecha; RELLENO INFERIOR: 0pt; MARGEN: 0 puntos; FUENTE: Webdings de 9 puntos; ANCHO: 0,8em; ACOLCHADO SUPERIOR: 0pt; POSICIÓN: relativa; ARRIBA: -2 puntos; ALTURA: 9 puntos } #barra de menú .TBHandle { BORDE DERECHO: sombra de botón 1px sólido; BORDE SUPERIOR: botón resaltado 1px sólido; TAMAÑO DE FUENTE: 1px; BORDE IZQUIERDO: botón resaltado 1px sólido; ANCHO: 3px; POSICIÓN: absoluta; ARRIBA: 1px; ALTURA: 22px; COLOR DE FONDO: menú } #barra de menú .yToolbar { BORDE DERECHO: sombra de botón 1px sólido; BORDE SUPERIOR: botón resaltado 1px sólido; IZQUIERDA: 0px; BORDE IZQUIERDO: botón resaltado 1px sólido; BORDE INFERIOR: sombra de botón 1px sólida; POSICIÓN: relativa; ARRIBA: 0px; ALTURA: 27px; COLOR DE FONDO: menú } .handbtn { BORDE DERECHO: sombra de botón 1px sólido; BORDE SUPERIOR: botón resaltado 1px sólido; FONDO: cara del botón; BORDE IZQUIERDO: botón resaltado 1px sólido; ANCHO: 3px; BORDE INFERIOR: sombra de botón 1px sólida; ALTURA: 21px } .sepbtn1 { BORDE DERECHO: botón resaltado 1px sólido; BORDE IZQUIERDO: cresta de 1px de sombra de botón; WIDTH: 2px } </STYLE> <SCRIPT language=javascript> //数组名+次序号码 //数组内容第一个值为标题 //"样式名称","字体颜色","名称","连接" ,"目标窗口" OutBarFolder1=new Array( "系统功能", "none","default","新建管理人员","add","_blank", "none","default","浏览管理人员" ,"ninguno","_blank", "ninguno","default","修改管理人员资料","none","_blank", "ninguno","default","更改密码","none"," _blank", "none","default","权限分配","none","none", "break","default","<hr>","none","none", "none", "predeterminado","新建管理人员","add","_blank", "none","default","新建管理人员","add","_blank", "none","default","新建管理人员","add","_blank", "none","default","新建管理人员","add","_blank", "none","default","新建管理人员","add ","_blank", "break","default","<hr>","none","none", "none","default","备份数据","none","_top", " none","default","恢复数据","none","_top", "break","default","<hr>","none","none", "none","default", "更改个人资料","none","_blank", "none","default","更改个人密码","none","_blank", "break","default","<hr>", "ninguno","ninguno", "ninguno","default","退出管理系统","none","_top"); OutBarFolder2=new Array( "系统功能", "none","default","新建管理人员","add","_blank", "none","default","浏览管理人员","none", "_blank", "none","default","修改管理人员资料","none","_blank", "none","default","更改密码","none","_blank", "none ","predeterminado","权限分配","ninguno","ninguno", "descanso","predeterminado","<hr>","ninguno","ninguno", "ninguno","predeterminado","新建管理人员","add","_blank", "none","default","新建管理人员","add","_blank", "none","default","新建管理人员"," add","_blank", "none","default","新建管理人员","add","_blank", "none","default","新建管理人员","add","_blank" , "break","default","<hr>","none","none", "none","default","备份数据","none","_top", "none","default ","恢复数据","none","_top", "break","default","<hr>","none","none", "none","default","更改个人资料" ,"ninguno","_blank", "ninguno","default","更改个人密码","none","_blank", "break","default","<hr>","none"," none", "none","default","退出管理系统","none","_top" ); OutBarFolder3=new Array( "系统功能", "none","default","新建管理人员","add","_blank", "none","default","浏览管理人员","none", "_blank", "none","default","修改管理人员资料","none","_blank", "none","default","更改密码","none","_blank", "none ","predeterminado","权限分配","ninguno","ninguno", "descanso","predeterminado","<hr>","ninguno","ninguno", "ninguno","predeterminado","新建管理人员","add","_blank", "none","default","新建管理人员","add","_blank", "none","default","新建管理人员"," add","_blank", "none","default","新建管理人员","add","_blank", "none","default","新建管理人员","add","_blank" , "break","default","<hr>","none","none", "none","default","备份数据","none","_top", "none","default ","恢复数据","none","_top", "break","default","<hr>","none","none", "none","default","更改个人资料" ,"ninguno","_blank", "ninguno","default","更改个人密码","none","_blank", "break","default","<hr>","none"," none", "none","default","退出管理系统","none","_top" ); var childActive = null var menuActive = null var lastHighlight = null var active = false function getReal(el) { // Encuentra un elemento de celda de tabla en la cadena principal */ temp = el while ((temp!=null) && (temp. tagName!="TABLE") && (temp.className!="root") && (temp.id!="menuBar")) { if (temp.tagName=="TD") el = temp temp = temp.parentElement } return el } function riseMenu(el) { el.style.borderLeft = "1px #08246B sólido" el.style.borderTop = "1px #08246B sólido" el.style.borderRight = "1px #08246B sólido" el.style. borderBottom = "1px #08246B sólido" el.style.background = "#B5BED6" } function clearHighlight(el) { if (el==null) return el.style.borderRight = "1px gris claro sólido" el.style.borderBottom = "1px gris claro sólido" el.style.borderTop = "1px gris claro sólido" el.style.borderLeft = "1px gris claro sólido" el.style.background = "rgb(212,208,200)" } function fregaderoMenu(el) { el.style. borderRight = "1px #EEEEEE sólido" el.style.borderBottom = "1px #EEEEEE sólido" el.style.borderTop = "1px gris sólido" el.style.borderLeft = "1px gris sólido" el.style.background = "rgb (212,208,200)" } function menuHandler(menuItem) { // ¡Escriba controladores de menú genéricos aquí! // Devolver verdadero colapsa el menú. Devolver falso no colapsa el menú return true } function getOffsetPos(what,el,tagName) { var pos = 0 // el["offset" + Which] while (el.tagName!=tagName) { pos+=el["offset " + cual] el = el.offsetParent } return pos } function getRootTable(el) { el = el.offsetParent if (el.tagName=="TR") el = el.offsetParent return el } function getElement(el,tagName) { while ((el!=null) && (el.tagName!=tagName) ) el = el.parentElement return el } function processClick() { var el = getReal(event.srcElement) if ((getRootTable(el).id =="barra de menú") && (activo)) { cleanupMenu(menuActive) clearHighlight(menuActive) active=false lastHighlight=null doHighlight(el) } else { if ((el.className=="root") || (!menuHandler (el))) doMenuDown(el) else { if (el._childItem==null) el._childItem = getChildren(el) if (el._childItem!=null) return; if ((el.id!="break") && (el.className!="disabled") && (el.className!="disabledhighlight") && (el.className!="clear")) { if (menuHandler) (el)) { cleanupMenu(menuActive) clearHighlight(menuActive) active=false lastHighlight=null } } } } } function getChildren(el) { var tList = el.children.tags("TABLE") var i = 0 while (( i<tList.length) && (tList[i].tagName!="TABLE")) i++ if (i==tList.length) devuelve nulo en caso contrario devuelve tList[i] } function doMenuDown(el) { if (el. _childItem==null) el._childItem = getChildren(el) if ((el._childItem!=null) && (el.className!="disabled") && (el.className!="disabledhighlight")) { // Rendimiento Optimización: elemento secundario de caché ch = el._childItem if (ch.style.display=="block") { removeHighlight(ch.active) return } ch.style.display = "block" if (el.className=="root ") { ch.style.pixelTop = el.offsetHeight + el.offsetTop + 2 ch.style.pixelLeft = el.offsetLeft + 1 if (ch.style.pixelWidth==0) ch.style.pixelWidth = ch.rows[ 0].offsetWidth+50 fregaderoMenu(el) active = true menuActive = el } else { childActive = el ch.style.pixelTop = getOffsetPos("Top",el,"TABLE") -3 // el.offsetTop + el. offsetParent.offsetTop - 3 ch.style.pixelLeft = el.offsetLeft + el.offsetWidth if (ch.style.pixelWidth==0) ch.style.pixelWidth = ch.offsetWidth+50 } } } function doHighlight(el) { el = getReal(el) if ("root"==el.className) { if ((menuActive!=null) && (menuActive!=el)) { clearHighlight(menuActive) } if (!active) { riseMenu(el) } else fregaderoMenu(el) if ((active) && (menuActive!=el)) { cleanupMenu(menuActive) doMenuDown(el) } menuActive = el lastHighlight=null } else { if (childActive!=null) if (!childActive.contains (el)) closeMenu(childActive, el) if (("TD"==el.tagName) && ("clear"!=el.className)) { var ch = getRootTable(el) if (ch.active!=null ) { if (ch.active!=el) { if (ch.active.className=="disabledhighlight") ch.active.className="disabled" else ch.active.className="" } } ch.active = el lastHighlight = el if ((el.className=="disabled") || (el.className=="disabledhighlight") || (el.id=="break")) el.className = "disabledhighlight" else { if (el.id!="break") { el.className = "resaltado" if (el._childItem==null) el. _childItem = getChildren(el) if (el._childItem!=null) { doMenuDown(el) } } } } } } función removeHighlight(el) { if (el!=null) if ((el.className=="disabled" ) || (el.className=="disabledhighlight")) el.className="disabled" else el.className="" } function cleanupMenu(el) { if (el==null) return for (var i = 0; i < el.all.length; i++) { var elemento = el.all[i] if (item.tagName=="TABLE") item.style.display = "" removeHighlight(item.active) item.active=null } } function closeMenu(ch, el) { var start = ch while (ch.className!="root") { ch = ch.parentElement if (((!ch.contains(el)) && (ch.className!= "raíz"))) { inicio=ch } } cleanupMenu(inicio) } función checkMenu() { if (document.all.menuBar==null) return if ((!document.all.menuBar.contains(event.srcElement) ) && (menuActive!=null)) { clearHighlight(menuActive) closeMenu(menuActive) active = false menuActive=null ChoiceActive = null } } function doCheckOut() { var el = event.toElement if ((!active) && (menuActive! =null) && (!menuActive.contains(el))) { clearHighlight(menuActive) menuActive=null } } function ProcessKey() { if (active) { switch (event.keyCode) { caso 13: lastHighlight.click(); romper; caso 39: // correcto if ((lastHighlight==null) || (lastHighlight._childItem==null)) { var idx = menuActive.cellIndex // if (idx==menuActive.offsetParent.cells.length-2) if (idx==getElement(menuActive,"TR").cells.length-2) idx = 0 else idx++ newItem = getElement(menuActive,"TR").cells[idx] } else { newItem = lastHighlight._childItem.rows[ 0].cells[0] } doHighlight(newItem) break; caso 37: //left if ((lastHighlight==null) || (getElement(getRootTable(lastHighlight),"TR").id=="menuBar")) { var idx = menuActive.cellIndex if (idx==0 ) idx = getElement(menuActive,"TR").cells.length-2 else idx-- newItem = getElement(menuActive,"TR").cells[idx] } else { newItem = getElement(lastHighlight,"TR") while (newItem.tagName!="TD") newItem = newItem.parentElement } doHighlight(newItem) break; caso 40: // abajo if (lastHighlight==null) { itemCell = menuActive._childItem curCell=0 curRow = 0 } else { itemCell = getRootTable(lastHighlight) if (lastHighlight.cellIndex==getElement(lastHighlight,"TR"). celdas.longitud-1) { curCell = 0 curRow = getElement(lastHighlight,"TR").rowIndex+1 if (getElement(lastHighlight,"TR").rowIndex==itemCell.rows.length-1) curRow = 0 } else { curCell = lastHighlight.cellIndex+1 curRow = getElement(lastHighlight,"TR").rowIndex } } doHighlight(itemCell.rows[curRow].cells[curCell]) break; caso 38: // arriba if (lastHighlight==null) { itemCell = menuActive._childItem curRow = itemCell.rows.length-1 curCell= itemCell.rows[curRow].cells.length-1 } else { itemCell = getRootTable(lastHighlight) ) if (lastHighlight.cellIndex==0) { curRow = getElement(lastHighlight,"TR").rowIndex-1 if (curRow==-1) curRow = itemCell.rows.length-1 curCell= itemCell.rows[curRow] .cells.length-1 } else { curCell = lastHighlight.cellIndex - 1 curRow = getElement(lastHighlight,"TR").rowIndex } } doHighlight(itemCell.rows[curRow].cells[curCell]) break; if (lastHighlight==null) { curCell = menuActive._childItem curRow = curCell.rows.length-1 } else { curCell = getRootTable(lastHighlight) if (getElement(lastHighlight,"TR").rowIndex==0) curRow = curCell .rows.length-1 else curRow = getElement(lastHighlight,"TR").rowIndex-1 } doHighlight(curCell.rows[curRow].cells[0]) break; } } } function make_menu() { document.write("<ancho de tabla='100%' cellpadding='0' cellpacing='0' border='0' style='background=rgb(212,208,200); FONDO: buttonface; BORDE-INFERIOR: botón de sombra 1px sólido; BORDE-IZQUIERDO: botón resaltado 1px sólido;'>"); document.write("<tr><TD><SPAN class=handbtn></SPAN></TD><td>"); document.write("<TABLE ID=menuBar ONSELECTSTART='return false' ONCLICK='processClick()' ONMOUSEOVER='doHighlight(event.toElement)' ONMOUSEOUT='doCheckOut()' ONKEYDOWN='processKey()'><TR >"); j=1; while(eval("ventana.OutBarFolder"+j)) j++; yo=1; while(i<j) { Carpeta=eval("OutBarFolder"+i) document.write("<TD NOWRAP CLASS=root>"+Folder[0]+"<TABLE CELLSPACING=0 CELLPADDING=0>"); CrearArtículos(Carpeta); documento.write("</TABLE>"); yo ++; } document.write("</TD></TR></TABLE>"); document.write("</td><td width=100% ONMOUSEOVER='processClick()'></td></tr></table>"); } función MakeItems(Carpeta) { var items=0; while(Carpeta[elementos+1]) elementos+=5; artículos/=5; for(var i=1;i<items*5;i+=5) { /* if(Folder[i+1]=="BREAK") { document.write("<TD NOWRAP ID=break><HR> </TD>"); } else { document.write("<TR><TD NOWRAP>"+Carpeta[i+1]+"</TD></TR>"); } */ document.write("<TR><TD NOWRAP"+((Carpeta[i+0]=="none")?"":" ID='"+Carpeta[i+0]+"'" )+((Carpeta[i+3]=="ninguna")?":" onclick="go(1,'"+Carpeta[i+3]+"')"")+">" +((Carpeta[i+1]=="predeterminado")?"":"<font color="+Carpeta[i+1]+">")+Carpeta[i+2]+((Carpeta[i +1]=="predeterminado")?"":"</font>")+"</TD></TR>"); //alert("<TR><TD NOWRAP "+((Carpeta[i+0]=="ninguna")?"":"ID='"+Carpeta[i+0]+"'")+( (Carpeta[i+3]=="ninguno")?"":" onclick=go(1,'"+Carpeta[i+3]+"')")+">"+((Carpeta[i+ 1]=="predeterminado")?"":"<font color="+Carpeta[i+1]+">")+Carpeta[i+2]+((Carpeta[i+1]=="predeterminado ")?"":"</font>")+"</TD></TR>"); } } función ir(i,iurl) { cambiar (i) { caso 1: parent.location=iurl;break; //返回首页 caso 2: top.main.location='login.htm';break; //登录 caso 3: top.main.location='shenqing.htm';break; //注册 caso 4: top.main.location='addnew.asp';break; //增加新贴 caso 5: top.main.location='index1.asp';break; //第一页 case 6 : //上一页 var obj=top.main var str=obj.location.href; if(str.indexOf("index1")>0) obj.location="index1.asp@page="+obj.document.all("ppage").value; else obj.ubicación="index1.asp"; romper; caso 7: //下一页 var obj=top.main var str=obj.location.href; if(str.indexOf("index1")>0) obj.location="index1.asp@page="+obj.document.all("npage").value; else obj.ubicación="index1.asp"; romper; caso 8: //最后一页 var obj=top.main var str=obj.location.href; if(str.indexOf("index1")>0) obj.location="index1.asp@page="+obj.document.all("epage").value; else obj.ubicación="index1.asp"; romper; caso 9: top.main.location='editinfo.asp';break; caso 10: top.main.location='quit.asp';break; caso 11: top.main.location='userinfo.asp';break; caso 12: var newwin=top.open("http://www.downcodes.com"); newwin.enfoque(); romper; } } hacer_menú(); </SCRIPT>