function over(id)
{
	document.getElementById(id).className="opcionOver";
}

function out(id)
{
	document.getElementById(id).className="opcion";
}

function overDest(id)
{
	document.getElementById(id).className="opcionOverDest";
}

function outDest(id)
{
	document.getElementById(id).className="opcionDest";
}

function mensajeBarra(mensaje)
{
	window.status = mensaje;
}

function cambioFoto(direccion, url, numFotos)
{
	var foto = document.getElementById("imagen");
	var enlace = document.getElementById("aimagen");
	
	var numFoto = foto.src.substring(eval(foto.src.lastIndexOf("/",foto.src.length)+1), eval(foto.src.length-4));
	
	if(direccion == "anterior")
	{
		if(numFoto > 1)
		{
			numFoto = parseInt(numFoto) -1;
			foto.src = url + numFoto + ".jpg";
			enlace.href = url + numFoto + ".jpg";	
		}
	}
	else
	{
		if(numFoto < numFotos)
		{
			numFoto = parseInt(numFoto) +1;
			foto.src = url + numFoto + ".jpg";
			enlace.href = url + numFoto + ".jpg";	
		}
	}
}

function cambioFotoyTexto(direccion, url, numFotos)
{
	var foto = document.getElementById("imagen");
	var enlace = document.getElementById("aimagen");
	var texto = document.getElementById("contFoto");

	var numFoto = foto.src.substring(eval(foto.src.lastIndexOf("/",foto.src.length)+1), eval(foto.src.length-4));

	if(direccion == "anterior")
	{
		if(numFoto > 1)
		{
			numFoto = parseInt(numFoto) -1;
			foto.src = url + numFoto + ".jpg";
			enlace.href = url + numFoto + ".jpg";	
			contFoto.value = "Foto " + numFoto + " de " + numFotos;
		}
	}
	else
	{
		if(numFoto < numFotos)
		{
			numFoto = parseInt(numFoto) +1;
			foto.src = url + numFoto + ".jpg";
			enlace.href = url + numFoto + ".jpg";	
			contFoto.value = "Foto " + numFoto + " de " + numFotos;
		}
	}
}
