var IEbrs=0;

function InitVars() {
  var r;
  var lc=document.location;
  lc = String(lc).replace(/^.*\/\//,'');
  lc = String(lc).replace(/\/.*$/,'');
  lc=lc.toUpperCase();
  r=0;
  if (lc=='DOCTORGETWELL.ORG') { r=1; }
  if (lc=='DOCTORGETWELL.NET') { r=1; }
  if (lc=='WWW.DOCTORGETWELL.ORG') { r=1; }
  if (lc=='WWW.DOCTORGETWELL.NET') { r=1; }
  IEbrs = (document.all);
  if (IEbrs) {
    setTimeout('MoveLeftMenu()',50);
  }
}

function InitVarsHome() {
  IEbrs = (document.all);
  if (IEbrs) {
    if (window.top == window.self) 
    {
      window.top.location="/index.asp";
    }
  }
}



function MoveLeftMenu() {
  var   LrMenu = 0;
  if (IEbrs) {
    var wy1 = document.body.scrollTop;
    var wy2 = wy1 + document.body.clientHeight; 
    var wY = document.body.scrollHeight; 
    var dvY=document.all['MainMenuDiv'].clientHeight;
    var step = 0;
    var rY=wy1+100; 
    if (wy1>100) { rY=wy1+10; } else { rY=100; }

    var cY = document.all['MainMenuDiv'].style.pixelTop;
    if ((wy1>100)&&(cY+dvY<wy1)) { cY=wy1-dvY; }
    else if (cY>wy2) { cY=wy2-10; }

    if ((rY+dvY)>(wY-60)) {
      rY=wy2-60-dvY;
      if (rY<100) { rY=100;}
    }

    var dY=rY;
    if (rY!=cY) {
      if (rY>cY) { if (rY-cY<=10) { dY=rY;} else { dY=cY+10; } }
      else if (rY<cY) { if (cY-rY<=10) { dY=rY;} else { dY=cY-10; } }
      document.all['MainMenuDiv'].style.pixelTop = dY;
    }
    setTimeout('MoveLeftMenu()',50);
  }
}

  var NullImg=new Image();
  NullImg.src="/acuwell/images/null_1025.gif";
  var DotImg=new Image();
  DotImg.src="/acuwell/images/dot.gif";

  var curSubMenu=0, subMenuOver=0;

  function AttentionOn(CurId) {
   var x,y,yy;
   if  (document.all) {
     document["mImg"+CurId].src=DotImg.src;
     document.all["mTxt"+CurId].style.color="#0060a0";
     document.all["mTxt"+CurId].style.fontWeight="bold";
//     window.alert(event.clientX+','+event.clientY);
     if ( (eval("document.all.SubMenuDiv"+CurId))&& (curSubMenu!=CurId) ) { 
       y=event.clientY;
       yy = document.body.scrollTop;
       document.all["SubMenuDiv"+CurId].style.pixelTop = y-5+yy;
       document.all["SubMenuDiv"+CurId].style.visibility = "visible";
       curSubMenu=CurId;
     }
   }
  } //AttentionOn

  function SubmenuOver(n) {
   subMenuOver=n;
  } //SubmenuOver

  function SubmenuLeft(n) {
    subMenuOver=0;
    setTimeout('CheckMenuLeft('+n+')',100);
  } //SubmenuLeft


  function SubmenuClose(n) {
    document.all["SubMenuDiv"+n].style.visibility = "hidden";     
    curSubMenu=0;
    subMenuOver=0;
  } //SubmenuClose


  function CheckMenuLeft(n) {
    if (subMenuOver!=n) {SubmenuClose(n);}
  } //SubmenuOver


  function AttentionOff(CurId) {
   if  (document.all) {
     document["mImg"+CurId].src=NullImg.src;
     document.all["mTxt"+CurId].style.color="#000000";
     document.all["mTxt"+CurId].style.fontWeight="normal";
     if (eval("document.all.SubMenuDiv"+CurId)) { 
       setTimeout('CheckMenuLeft('+CurId+')',300);
     }
   }
  } //AttentionOff

  function AttentionImgOn(CurId) {
   if  (document.all) {
     document["mImg"+CurId].src=DotImg.src;
   }
  } //AttentionImgOn

  function AttentionImgOff(CurId) {
   if  (document.all) {
     document["mImg"+CurId].src=NullImg.src;
   }
  } //AttentionImgOff

  function SubAttentionOn(CurId,CurSubId) {
   if  (document.all) {
     document.all["smTxt"+CurId+CurSubId].style.color="#0060a0";
   }
  } //SubAttentionOn

  function SubAttentionOff(CurId,CurSubId) {
   if  (document.all) {
     document.all["smTxt"+CurId+CurSubId].style.color="#000000";
   }
  } //SubAttentionOff
