//1.1 var menuPanel ; var PrevShow; var Dom = YAHOO.util.Dom; var msg_cookie_name = "i_close_msg"; function menuPanelShow(obj) { //alert(obj.id); if(obj=='') { menuPanelCancel(PrevShow); return; } var obj1 = Dom.get(obj.id+"Div"); var objXY = Dom.getXY(obj1); if(objXY==false) return; // alert(objXY); if(PrevShow!=obj) menuPanelCancel(PrevShow); PrevShow=obj; var addleft=0; var addtop=0; if (document.all) { //这个是ie的,tnnd不带px单位 obj.style.display=""; obj.style.left=objXY[0]-60+addleft; // event.x+10+document.body.scrollLeft; obj.style.pixelTop=objXY[1]+addtop+15; // event.y+10+document.body.scrollTop; // alert(obj.style.pixelTop); } else { if (document.layers) { obj.display=""; obj.left=posx+"px"; obj.top=posy+10; } else { //firefox只有这个起作用。。。 // alert(0); obj.style.display=""; obj.style.left=objXY[0]-70+addleft+"px" ; obj.style.top=objXY[1]+addtop+10+"px" ; } } } function menuPanelCancel(obj) { if(obj!=null) { obj.style.display = "none"; } } function MessageLayShow() { } function MessageLayHide() { obj.style.display='none'; msg_SetCookie(msg_cookie_name,"1"); } function msg_getCookie(name)//取cookies函数 { var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)")); if(arr != null) return unescape(arr[2]); return ""; } function msg_delCookie(name)//删除cookie { var exp = new Date(); exp.setTime(exp.getTime() - 1); var cval=msg_getCookie(name); if(cval!="") document.cookie= name + "="+cval+";expires="+exp.toGMTString(); } function msg_SetCookie(name,value)//两个参数,一个是cookie的名子,一个是值 { var Days = 30; //此 cookie 将被保存 30 天 var exp = new Date(); //new Date("December 31, 9998"); exp.setTime(exp.getTime() + Days*24*60*60*1000); document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString(); } function msg_show_for_head() { } function hometopmesShow() { } //1.1 var Dom = YAHOO.util.Dom; var Event = YAHOO.util.Event; function showLoginInfo() { var currentUrl = encodeURIComponent(window.location.href); try { Dom.get("newLog1").innerHTML = '登录 '; }catch(e) { } } Event.onDOMReady(function(){showLoginInfo();});