var distance=50;
var e=new Object();
var objs=new Object();
var timer1 = new Object();
var timer2 = new Object();
var showDV=function(theid,startpos)
{
   var thedv=document.getElementById("menulist"+theid);
   clearInterval(timer1[theid]);
   clearInterval(timer2[theid]);
   thedv.style.display="";
   document.getElementById("mainlink"+theid).className="mainmenu2";
   timer1[theid]=setInterval(function(){copen(thedv,theid,startpos)},1);
}
var copen=function(thedv,theid,startpos)
{
   var cw=parseInt(thedv.style.marginTop);
   if(cw-startpos>0)
   {
        thedv.style.marginTop=(cw-10) +"px";
   }
   else
   {
        clearInterval(timer1[theid]);
   }
}

var closeDV=function(theid,endpos)
{
   var thedv=document.getElementById("menulist"+theid);
   clearInterval(timer1[theid]);
   clearInterval(timer2[theid]);
   document.getElementById("mainlink"+theid).className="mainmenu1";
   timer2[theid]=setInterval(function(){cclose(thedv,theid,endpos)},1);
}
var cclose=function(thedv,theid,endpos)
{
   var cw=parseInt(thedv.style.marginTop);
   if(endpos-cw>0)
   {
        thedv.style.marginTop=(cw+10) +"px";
   }
   else
   {
		thedv.style.display="none";
		clearInterval(timer2[theid]);
   }
}

