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只有这个起作用。。。 obj.style.display=""; obj.style.left=objXY[0]-70+addleft+"px" ; // alert(dv.style.left); obj.style.top=objXY[1]+addtop+18+"px" ; } } } function menuPanelCancel(obj) { if(obj!=null) { obj.style.display = "none"; } } function getUserDomain(){ var Dom = YAHOO.util.Dom; var lang= YAHOO.util.Lang; var domainName=""; domainName=lang.trim(domainName); Dom.get("hometag").style.display=domainName.length>0?"":"none"; Dom.get("zhu").style.display=domainName.length>0?"":"none"; Dom.get("noNewMsg").style.display=domainName.length>0?"":"none"; Dom.get("tourMenu").style.display=domainName.length>0?"none":""; Dom.get("homelink").href = "http://"+domainName+".0-6.com"; if(domainName.length>0){ var checkNewMsgEl=createCheckNewMsg("http://my.0-6.com/Content/Admin/js/MsgTip.js?v=1.0.3"); document.body.appendChild(checkNewMsgEl); } } function createCheckNewMsg(src) { var script = document.createElement("script"); script.type = "text/javascript"; script.src = src; return script; } YAHOO.util.Event.onDOMReady(function(){getUserDomain();});