var puntos_anterior = 0;
OCULTO="none";
VISIBLE="block";

function setPuntos( puntos )
{

	document.getElementById('puntuacion').value = puntos;
	
	if( puntos < puntos_anterior  )
	{
		for( i=puntos+1; i <= puntos_anterior; i++ )
		{
			var id_estrella = i + 'star';
			document.getElementById(id_estrella).style.background='url(../imagenes/star.gif) left top';
		}
	}
	
	for( i=1; i <= puntos; i++ )
	{
		var id_estrella = i + 'star';
		
		document.getElementById(id_estrella).style.background='url(../imagenes/star.gif) left bottom';
	}
	puntos_anterior = puntos;
	return false;
}
	
function mostrar(blo) 
{

		if (blo==1)
		{
			document.getElementById("descripcion").style.display=VISIBLE;
			document.getElementById('tablaPacks').style.display=OCULTO;
			document.getElementById('productos_relacionados').style.display=OCULTO;
			document.getElementById('opiniones_producto').style.display=OCULTO;
			document.getElementById("op1").className="selected";
			document.getElementById("op2").className="";
			document.getElementById("op3").className="";
			document.getElementById("op4").className="";
		}
		if (blo==2)
		{
			document.getElementById("descripcion").style.display=OCULTO;
			document.getElementById('tablaPacks').style.display=VISIBLE;
			document.getElementById('productos_relacionados').style.display=OCULTO;
			document.getElementById('opiniones_producto').style.display=OCULTO;
			document.getElementById("op1").className="";
			document.getElementById("op2").className="selected";
			document.getElementById("op3").className="";
			document.getElementById("op4").className="";
		}
		if (blo==3)
		{
			document.getElementById("descripcion").style.display=OCULTO;
			document.getElementById('tablaPacks').style.display=OCULTO;
			document.getElementById('productos_relacionados').style.display=VISIBLE;
			document.getElementById('opiniones_producto').style.display=OCULTO;
			document.getElementById("op1").className="";
			document.getElementById("op2").className="";
			document.getElementById("op3").className="selected";
			document.getElementById("op4").className="";
		}
		if (blo==4)
		{
			document.getElementById("descripcion").style.display=OCULTO;
			document.getElementById('tablaPacks').style.display=OCULTO;
			document.getElementById('productos_relacionados').style.display=OCULTO;
			document.getElementById('opiniones_producto').style.display=VISIBLE;
			document.getElementById("op1").className="";
			document.getElementById("op2").className="";
			document.getElementById("op3").className="";
			document.getElementById("op4").className="selected";
		}
} 

function mostrarpack(numero,total_nums) 
{
	for (i=0; i<total_nums; i++)
	{
		if(numero==i)
		{
			document.getElementById('desc_'+i).style.display=VISIBLE;
			document.getElementById("descb_"+i).style.display=OCULTO;
		}
		else
		{
			document.getElementById('desc_'+i).style.display=OCULTO;
		}
	}
} 

function mostrarpack_no(numero) 
{

	document.getElementById('desc_'+numero).style.display=OCULTO;
	document.getElementById("descb_"+numero).style.display=VISIBLE;
} 

function mostrarpack_ninguno(total_nums) 
{
	for (i=0; i<total_nums; i++)
	{
		document.getElementById('desc_'+i).style.display=OCULTO;
	}
} 