var nlsEffectList={
  barn:"progid:DXImageTransform.Microsoft.Barn(Duration=0.5,motion=out,orientation=vertical);",
  blinds:"progid:DXImageTransform.Microsoft.Blinds(Duration=0.5,Bands=8,direction=right);",
  checkerboard:"progid:DXImageTransform.Microsoft.Checkerboard(Duration=0.5,Direction=right,SquaresX=20,SquaresY=20);",
  fade:"progid:DXImageTransform.Microsoft.Fade(Duration=0.5,Overlap=1.00);",
  inset:"progid:DXImageTransform.Microsoft.Inset(Duration=0.5);",
  iris:"progid:DXImageTransform.Microsoft.Iris(Duration=0.5,irisstyle=CIRCLE,motion=in);",
  pixelate:"progid:DXImageTransform.Microsoft.Pixelate(Duration=0.5,MaxSquare=10);",
  radialwipe:"progid:DXImageTransform.Microsoft.RadialWipe(Duration=0.5,wipestyle=WEDGE)",
  randombars:"progid:DXImageTransform.Microsoft.RandomBars(Duration=0.5,Orientation=horizontal);",
  randomdissolve:"progid:DXImageTransform.Microsoft.RandomDissolve(duration=0.5);",
  slide:"progid:DXImageTransform.Microsoft.Slide(Duration=0.5,slidestyle=HIDE,Bands=5);",
  spiral:"progid:DXImageTransform.Microsoft.Spiral(Duration=0.5,GridSizeX=64,GridSizeY=64);",
  stretch:"progid:DXImageTransform.Microsoft.Stretch(Duration=0.5,stretchstyle=HIDE);",
  strips:"progid:DXImageTransform.Microsoft.Strips(Duration=0.5,motion=rightdown);",
  wheel:"progid:DXImageTransform.Microsoft.Wheel(Duration=0.5,spokes=10);",
  gradienwipe:"progid:DXImageTransform.Microsoft.GradientWipe(Duration=0.5,GradientSize=0.75,wipestyle=0,motion=forward);",
  zigzag:"progid:DXImageTransform.Microsoft.Zigzag(Duration=0.5,GridSizeX=8,GridSizeY=8);"
};

function NlsMenuEffect(mId, effName) {
  this.tmId=null;
  this.mId=mId;
  this.opa=0;
  this.elm=null;
  this.effName=effName;
}

NlsMenuEffect.prototype.init=function() {
  if (nls_isIE) {
    if (this.elm==null) this.elm=NlsGetElementById("effwin_"+this.mId); 
    this.elm.style.filter=nlsEffectList[this.effName];
    if (this.elm.filters.length>0) this.elm.filters[0].apply();
  } else {
    if (this.elm==null) this.elm=NlsGetElementById("effwin_"+this.mId).childNodes[0]; 
    this.elm.style.MozOpacity=0;
  }
}

NlsMenuEffect.prototype.start=function() {
  if (nls_isIE) {
    if (this.elm.filters.length>0) this.elm.filters[0].play();
  } else {
    this.opa=0;
    var me=this;
    this.tmId=window.setInterval(function () { effect_run (me); }, 20);
  }
}

function effect_run(eff) {
  eff.elm.style.MozOpacity=eff.opa/100;
  eff.opa+=5; if (eff.opa==100) eff.opa=99;
  if (eff.opa>100) window.clearInterval(eff.tmId);
}

