/***************Rotativo Vertical *******************/
var LayerHeight = new Number(0);
var Stop = new Number(0);
var Speed = new Number(1);
var Pixeles = new Number(7);

function initLayersV(LayerName)
{
	Layer = document.getElementById(LayerName);
	
	if (Layer)
	{
		LayerHeight = Layer.offsetHeight - 90;
		
		Inicio = 1;
		Layer.style.top = Inicio;
	}
}

function ChangePosition(LayerName,Top)
{
	Layer  = document.getElementById(LayerName);
	Px = new String(Layer.style.top);
	Px = Px.replace('px','');
	Px = new Number(Px);
	
	//alert(BottomPx);
	if(Top==1)
		Layer.style.top = Px + Pixeles;
	else
		Layer.style.top = Px - Pixeles;
}

function MoveContinuousDown(LayerName,Init)
{
	Layer  = document.getElementById(LayerName);
	BottomPx = new String(Layer.style.top);
	BottomPx = BottomPx.replace('px','');
	BottomPx = new Number(BottomPx);
	
	if(Init)
		Stop=0;
	
	if(Stop!=1 && BottomPx > - (LayerHeight-210))
	{
		ChangePosition(LayerName);
		movedown = setTimeout("MoveContinuousDown('"+LayerName+"')",Speed);
	}
}

function MoveContinuousUp(LayerName,Init)
{
	Layer  = document.getElementById(LayerName);
	TopPx = new String(Layer.style.top);
	TopPx = TopPx.replace('px','');
	TopPx = new Number(TopPx);
	
	if(Init)
		Stop=0;
	
	if(Stop!=1 && TopPx <0)
	{
		ChangePosition(LayerName,1);
		moveup = setTimeout("MoveContinuousUp('"+LayerName+"')",Speed);
	}
}

function StopDiv()
{
	Stop=1;		
}

function ShowDiv(DivId)
{
	DivObj = document.getElementById(DivId);
	DivObj.style.display = "inline";
}

function HideDiv(DivId)
{
	DivObj = document.getElementById(DivId);
	DivObj.style.display = "none";
}