var inc=15;
var speed=10;
function move(x,y){var b=document.getElementById('block'); var n=parseInt(b.style.top); //alert(n)
if(n%510!=0 || y){
	if(x=='up' && n>-3570){b.style.top=n-inc+'px'}
	else if(x=='down' && n<510){ b.style.top=n+inc+'px'}
	parseInt(b.style.top)==-3570?document.getElementById('move1').style.visibility='hidden':document.getElementById('move1').style.visibility='visible';
	parseInt(b.style.top)==0?document.getElementById('move2').style.visibility='hidden':document.getElementById('move2').style.visibility='visible';
setTimeout("move('"+x+"')",speed);}
}

var i=-200
var intHide =0
var speed2=20

function toggle()
{
if (i== -200){
showmenu()}
else{
hidemenu()
}
}

function showmenu()
{
clearInterval(intHide)
intShow=setInterval("show()",1)
}

function hidemenu()
{
clearInterval(intShow)
intHide=setInterval("hide()",1)
}

function show()
{
if (i<-0)
{
i=i+speed2
document.getElementById('login').style.right=i+'px';
}
}

function hide()
{
if (i>-200)
{
i=i-speed2
document.getElementById('login').style.right=i+'px';
}
}

//window.onload = function()
//{
	//adding the event listerner for Mozilla
    //if(window.addEventListener) document.addEventListener('DOMMouseScroll', moveObject, false);
	//for IE/OPERA etc
    //document.onmousewheel = moveObject;
//}