var crossobj;
var movedownvar;
var moveupvar;

function movedownWork(){
contenth=crossobj.offsetHeight;
if (parseInt(crossobj.style.top)>=(contenth*(-1)+150)){
crossobj.style.top=parseInt(crossobj.style.top)-3+"px";
}else{
clearInterval(movedownvar);
}
}

function moveupWork(){
if (parseInt(crossobj.style.top)<0){
crossobj.style.top=parseInt(crossobj.style.top)+3+"px";
}else{
clearInterval(moveupvar);
}
}

function movedown(id, count){
crossobj=document.getElementById(id);
var contentheight=crossobj.offsetHeight;
if (parseInt(crossobj.style.top)>=(contentheight*(-1)+150)){
movedownvar=self.setInterval("movedownWork()",20);
}
}

function moveup(id, count){
crossobj=document.getElementById(id);
var contentheight=crossobj.offsetHeight;
if (parseInt(crossobj.style.top)<0){
moveupvar=self.setInterval("moveupWork()",20);
}
}
