var i = 1;
var gid;
var gnumber;

function goTo(id,number)
{
	gid = id;
	gnumber = number;
	setTimeout("move()",100);
}

function move()
{
	document.getElementById(gid).scrollTop = gnumber * 33;
}

var pos = 0;
var stop = 0;

function scrollDown()
{
	if(stop == 0 && pos < document.getElementById('alcaldia_tamites').scrollHeight-200)
	{
		pos = pos + 3;
		var a = document.getElementById('alcaldia_tamites');
		a.scrollTop = pos;
		setTimeout("scrollDown()",10);
	}
}

function scrollUp()
{
	if(stop == 0 && pos > 0)
	{
		pos = pos - 3;
		var a = document.getElementById('alcaldia_tamites');
		a.scrollTop = pos;
		setTimeout("scrollUp()",10);
	}
}

function showLetter(status)
{
	var a = document.getElementById("letter");
	a.style.display = status;
}

function showAnswer(id,elem)
{
	var a = document.getElementById(id);
	
	if(a.style.display == "none")
	{
		elem.innerHTML = "Ocultar";
		a.style.display = "";
	}
	else
	{
		elem.innerHTML = "Ver m&aacute;s";
		a.style.display = "none";
	}
}

function abrir(direccion, pantallacompleta, herramientas, direcciones, estado, barramenu, barrascroll, cambiatamano, ancho, alto, izquierda, arriba, sustituir)
{
	var opciones = 
	"fullscreen=" + pantallacompleta +
	",toolbar=" + herramientas +
	",location=" + direcciones +
	",status=" + estado +
	",menubar=" + barramenu +
	",scrollbars=" + barrascroll +
	",resizable=" + cambiatamano +
	",width=" + ancho +
	",height=" + alto +
	",left=" + ((screen.width - 800)/2) +
	",top=" + arriba;
     var ventana = window.open(direccion,"venta",opciones,sustituir);
}
