menu_type = new Array(); menu_type[1] = ""; menu_type[2] = ""; menu_type[3] = ""; menu_type[4] = ""; menu_type[5] = ""; menu_type[6] = ""; menu_type[7] = ""; menu_type[8] = ""; menu_type[9] = ""; menu_type[10] = ""; menu_type[11] = ""; menu_type[12] = ""; menu_type[13] = ""; menu_type[14] = ""; menu_type[15] = ""; var agent = navigator.userAgent; String.prototype.trim = function() { return this.replace(/(^[\s]*)|([\s]*$)/g, ""); }; String.prototype.inc = function(k1, k2) { return k2 == null ? this.indexOf(k1) > -1 ? true : false : (k2 + this + k2) .indexOf(k2 + k1 + k2) > -1 ? true : false; }; String.prototype.toArray=function(key) { var l = this, v; if(key == null) key = "|"; v = key; if(key == "n") { l = l.replace(/\r/g,""); v = "\n"; } l = l.replace(new RegExp("(\\"+key+")+","g"), v).replace(new RegExp("^[\\" + key + "]*|[\\" + key + "]+$","g"), ""); return l == "" ? new Array() : l.split(v); }; Array.prototype.add = function(key) { this[this.length] = key; }; var is_Opr = agent.inc("Opera"); var is_IE = agent.inc("IE") && !is_Opr; var is_IE4 = agent.inc("IE 4"); var is_IE5 = agent.inc("IE 5") || agent.inc("IE 4"); var is_IE5_5 = agent.inc("IE 5.5"); var is_IE6 = is_IE && !is_IE5; var is_Moz = agent.inc("Mozilla") && !is_Opr && !is_IE; function oo(obj) { return typeof(obj) != "string" ? obj : (is_IE5 ? document.all(obj) : document.getElementById(obj)); } function menu_getPos(el,sProp) { var iPos = 0; while (el != null) ¡¡¡¡{ iPos += el["offset" + sProp]; el = el.offsetParent; } return iPos; } var cur_idx = 0; var menu_cmlayer_allow = true; var menu_type_div = "menu_type_div"; document.onclick = new Function("dclick()"); function dclick() { menu_showLayer(0, null, null, '', false, false) if(typeof lst_showLayer != 'undefined') { lst_showLayer(null, null, ''); } } function menu_showLayer(idx, el, m, mname, w , h ) { if(m) { if((m.style.visibility == "visible") && (cur_idx == idx)) { m.style.visibility = "hidden"; menu_cmlayer_allow = true; cur_idx = 0; return; } var l = menu_getPos(el,"Left"); var t = menu_getPos(el,"Top") ; if(w) { l += el.offsetWidth; } if(h) { // t += el.offsetHeight; t += 16; } if (document.layers) { oo(mname).left = l; oo(mname).top = t; } else if (document.all) { oo(mname).style.left=l; oo(mname).style.top=t; } else if (document.getElementById) { document.getElementById(mname).style.left=l + "px"; document.getElementById(mname).style.top=t + "px"; } m.style.visibility = "visible"; menu_cmlayer_allow = false; window.setTimeout("menu_allow_show()", 100); } if(cur_idx) { if(! menu_cmlayer_allow) return; oo(menu_type_div).style.visibility = "hidden"; menu_cmlayer_allow = true; } cur_idx = idx; } function menu_allow_show() { menu_cmlayer_allow = true; } function show_menu(idx, el, m, mname, w , h ) { oo(mname).innerHTML = menu_type[idx]; menu_showLayer(idx, el, m, mname, w, h); }