


var speed=5;
var moveupvar;
var movedownvar;

function movedown(id){ 
crossobj=document.getElementById(id); 



	var h=parseInt(crossobj.offsetHeight)-100;
	h*=-1;



	if (parseInt(crossobj.style.top)>=h){
		newval=parseInt(crossobj.style.top)-speed;
		crossobj.style.top=newval+"px";
	}




	if (parseInt(crossobj.style.top)>=h)
		movedownvar=setTimeout("movedown('"+id+"')",100);
	else
		clearTimeout(movedownvar);


}

function moveup(id){
	
crossobj=document.getElementById(id); 


	if (parseInt(crossobj.style.top)<=0)
		crossobj.style.top=parseInt(crossobj.style.top)+speed+"px";
	else if (crossobj.top<=0)
		crossobj.top+=speed;

	if (parseInt(crossobj.style.top)<=0)
		moveupvar=setTimeout("moveup('"+id+"')",100);
	else
		clearTimeout(moveupvar);



}


function tudodown(id){
crossobj=document.getElementById(id); 

var h=parseInt(crossobj.offsetHeight)-100;
h*=-1;

crossobj.style.top=h+"px";
}


function tudoup(id){
crossobj=document.getElementById(id); 

crossobj.style.top="0px";
}
