
var h;
var w;
var l;
var t;
var topMar = 5;
var leftMar = -2;
var space = 1;
var isvisible;
var MENU_SHADOW_COLOR='#3C9D00';//定义下拉菜单阴影色
var global = window.document
global.fo_currentMenu = null
global.fo_shadows = new Array

document.writeln("<div id=menuDiv style='Z-INDEX: 1000; VISIBILITY: hidden; WIDTH: 1px; POSITION: absolute; HEIGHT: 1px; BACKGROUND-COLOR: #FFFFFF'></div>");
//document.writeln("<OBJECT id=menuDivO style='Z-INDEX: 1000; VISIBILITY: hidden;' type=\"text/x-scriptlet\" data='about:<div id=menuDiv style='Z-INDEX: 1000; VISIBILITY: hidden; WIDTH: 1px; POSITION: absolute; HEIGHT: 1px; BACKGROUND-COLOR: #FFFFFF'></div>></OBJECT>");

function HideMenu() 
{
var mX;
var mY;
var vDiv;
var mDiv;
  if (isvisible == true)
{
    vDiv = document.all("menuDiv");
    mX = window.event.clientX + document.body.scrollLeft;
    mY = window.event.clientY + document.body.scrollTop;
    if ((mX < parseInt(vDiv.style.left)) || (mX > parseInt(vDiv.style.left)+vDiv.offsetWidth) || (mY < parseInt(vDiv.style.top)-h) || (mY > parseInt(vDiv.style.top)+vDiv.offsetHeight)){
      vDiv.style.visibility = "hidden";
      isvisible = false;
    }
}
}

function ShowMenu(vMnuCode,tWidth,bgcolor) {
  vSrc = window.event.srcElement;
  vMnuCode = "<table id='submenu' cellspacing=0 cellpadding=0 style='border:1 solid #FFFFFF;width:"+tWidth+"' onmouseout='HideMenu()' bgcolor='"+bgcolor+"'><tr height=23><td width=10 bgcolor=#CD1717 >  </td><td nowrap align=left>" + vMnuCode + "</td></tr></table>";
  h = vSrc.offsetHeight-0;
  w = vSrc.offsetWidth;
  l = vSrc.offsetLeft + leftMar-10;
  t = vSrc.offsetTop + topMar + h + space-2;
  vParent = vSrc.offsetParent;
  while (vParent.tagName.toUpperCase() != "BODY")
  {
    l += vParent.offsetLeft;
    t += vParent.offsetTop;
    vParent = vParent.offsetParent;
  }

  menuDiv.innerHTML = vMnuCode;
  menuDiv.style.top = t;
  menuDiv.style.left = l;
  menuDiv.style.visibility = "visible";
  isvisible = true;
makeRectangulardropShadow(submenu, MENU_SHADOW_COLOR, 4)

}

function makeRectangulardropShadow(el, color, size)
{
  var i;
  for (i=size; i>0; i--)
  {
    var rect = document.createElement('div');
    var rs = rect.style
    rs.position = 'absolute';
    rs.left = (el.style.posLeft + i) + 'px';
    rs.top = (el.style.posTop + i) + 'px';
    rs.width = el.offsetWidth + 'px';
    rs.height = el.offsetHeight + 'px';
    rs.zIndex = el.style.zIndex - i;
    rs.backgroundColor = color;
    var opacity = 1 - i / (i + 1);
    rs.filter = 'alpha(opacity=' + (100 * opacity) + ')';
    el.insertAdjacentElement('afterEnd', rect);
    global.fo_shadows[global.fo_shadows.length] = rect;
  }
}

var m1= '<table width=80px border=0 cellspacing=0 cellpadding=0><tr><td nowrap height=20 align=center><A href="/class.asp?ClassID=H6K2JFAKJJD3433" style="color:black">家畜类</A></td> </tr>  <tr> <td nowrap height=20 align=center><A href="/class.asp?ClassID=H6G4JH2GH8KD1DC" style="color:black">家禽类</A></td> </tr> </table>'

var m2= '<table width=80px border=0 cellspacing=0 cellpadding=0><tr><td nowrap height=20 align=center><A href="/intro.asp" style="color:black">公司简介</A></td> </tr>  <tr> <td nowrap height=20 align=center><A href="/wenhua.asp" style="color:black">企业文化</A></td> </tr> </table>'

var m3= '<table width=80px border=0 cellspacing=0 cellpadding=0><tr><td nowrap height=20 align=center><A href="/class.asp?ClassID=FB3AF7F6I12EB33" style="color:black">禽用产品</A></td> </tr>  <tr> <td nowrap height=20 align=center><A href="/class.asp?ClassID=085499B809EJFH5" style="color:black">畜用产品</A></td> </tr><tr> <td nowrap height=20 align=center><A href="/class.asp?ClassID=D1J3IEB6AA3A4H0" style="color:black">营养保健类</A></td> </tr><tr> <td nowrap height=20 align=center><A href="/class.asp?ClassID=7A0J7EGD6C4A2EF" style="color:black">消毒类</A></td> </tr></table>'




