 function init_formxmedia()
 {
   var div      = document.getElementById('formxmedia');
   if(div)
   {
   var subdiv   = div.childNodes[0];
   var tw  = new Tween(div.style, 'width', Tween.regularEaseInOut, 0, 580, .5, 'px');
   var tw2 = new Tween(div.style, 'left', Tween.regularEaseInOut, 581, 1, .5, 'px');
   var tw3 = new Tween(subdiv.style, 'left', Tween.regularEaseInOut, -580, 0, .5, 'px');
   div.startf = function ()
  	        {
                   div.style.width = '0px';
                   div.style.left='581px';
                   div.style.overflow = 'hidden';
                   div.style.display = 'block';
                   subdiv.style.left = '-580px';
                   tw.onMotionFinished = function(){ div.style.overflow = 'visible'; tw.onMotionFinished = undefined; }
                   tw.continueTo(580, .5);
                   tw2.continueTo(1, .5);
                   tw3.continueTo(0, .5);
  	        }
   div.endf  = function ()
  	       { 
                   div.style.overflow = 'hidden';
                   tw.onMotionFinished = function(){ div.style.display = 'none'; tw.onMotionFinished = undefined; }
                   tw.continueTo(0, .5);
                   tw2.continueTo(581, .5);
                   tw3.continueTo(-580, .5);
  	       }
   }
}
 function init_closewindowtab()
 {
   var div      = document.getElementById('closewindowtab');
   if(div)
   {
   var subdiv   = div.childNodes[0];
   var tw  = new Tween(div.style, 'width', Tween.regularEaseInOut, 0, 326, .5, 'px');
   var tw2 = new Tween(div.style, 'left', Tween.regularEaseInOut, 564, 238, .5, 'px');
   var tw3 = new Tween(subdiv.style, 'left', Tween.regularEaseInOut, -326, 0, .5, 'px');
   div.startf = function ()
  	        {
                   div.style.width = '0px';
                   div.style.left='564px';
                   div.style.overflow = 'hidden';
                   div.style.display = 'block';
                   subdiv.style.left = '-326px';
                   tw.onMotionFinished = function(){ div.style.overflow = 'visible'; tw.onMotionFinished = undefined; }
                   tw.continueTo(326, .5);
                   tw2.continueTo(238, .5);
                   tw3.continueTo(0, .5);
  	        }
   div.endf  = function ()
  	       { 
                   div.style.overflow = 'hidden';
                   tw.onMotionFinished = function(){ div.style.display = 'none'; tw.onMotionFinished = undefined; }
                   tw.continueTo(0, .5);
                   tw2.continueTo(564, .5);
                   tw3.continueTo(-326, .5);
  	       }
   }
}

function init_tweens()
{
 init_closewindowtab();
 init_formxmedia();
}
