  function getX(o)
  {
    var x=o.offsetLeft;var po=o.offsetParent;
    while(!("BODY"==po.tagName)){x+=po.offsetLeft;po=po.offsetParent;}return x;
  }
  function getY(o)
  {
    var y=o.offsetTop+parseInt(o.height);var po=o.offsetParent;
    while(!("BODY"==po.tagName)){y+=po.offsetTop;po=po.offsetParent;}return y;
  }

  var g_menuid="";
  function hm_3(imgo){if(g_menuid.length>0){with($(g_menuid)){style.visibility="hidden";style.display="none";}g_menuid="";}}//移动到别的图片上隐藏菜单
  function hm_2(o)//在菜单上，如果离开菜单隐藏菜单
  {
    var stag=sid="";
    with(window.event.toElement){stag=tagName;sid=id;}
    if(!sid || sid.indexOf("m_")<0){with($(g_menuid)){style.visibility="hidden";style.display="none";}}
  }
  function hm_1(imgo)//离开图片隐藏菜单
  {
    var stag=sid="";var cal_mid=imgo.id.replace("_m","");
    with(window.event.toElement){stag=tagName;sid=id;}
    if(!sid || sid.indexOf("m_")<0){with($(g_menuid)){style.visibility="hidden";style.display="none";}g_menuid="";}
  }
  function sm_1(imgo)//移动到图片上显示菜单
  {
    if(g_menuid.length>0){with($(g_menuid)){style.visibility="hidden";style.display="none";}g_menuid="";}
    var x=getX(imgo);var y=getY(imgo);
    g_menuid=imgo.id.replace("_m","");
    with($(g_menuid)){style.visibility="visible";style.display="block";style.left=x;style.top=y;}
  }

  function swi(imgo,f)
  {
    if(imgo.ttl && imgo.ttl.length>2)return false;
    var src=imgo.src;src=src.replace(/^(http:\/\/[^\/]+\/)/,"");imgo.src=src.replace(/\d+/,1==f?"1":"2");
  }


