function compartir1(){
	document.getElementById('compartir1').style.display = "block"
}
function compartir2(){
	document.getElementById('compartir2').style.display = "block"
}

function compartirNota(id){
	document.getElementById('compartir'+id).style.display = "block"
}


function publicar(){
	document.getElementById('publicarsitio').style.display = "block";
	document.getElementById('publicarsitio').style.top = Scroll() + 250 + "px";
}
function cerrarCaja(caja)
{
		document.getElementById(caja).style.display = "none";
}
function link(){
	document.getElementById('linkpermanente').style.display = "block";
	document.getElementById('linkpermanente').style.top = Scroll() + 450 + "px";
}



function opinar(nota_id,nroVotos)
{
	var cook, votaciones,nroVotos;
	cook = readCookie("valorar").replace(/%7C/g,"|");
	if (cook.indexOf(nota_id) == -1)
	{
		nroVotos = parseInt(nroVotos)+1;
		document.valorar.src="/scripts/valorar.asp?nota_id="+nota_id;
		document.getElementById("votarHabilitado2").style.display="none";
		document.getElementById("votarDeshabilitado2").style.display="block";
		document.getElementById("votarDeshabilitado2").title = "Ya votaste ("+ nroVotos + ")"; 
		document.getElementById("votarDeshabilitado2").innerHTML = "Ya votaste ("+ nroVotos + ")"; 
		
		document.getElementById("votarHabilitado").style.display="none";
		document.getElementById("votarDeshabilitado").style.display="block";
		document.getElementById("votarDeshabilitado").innerHTML="Ya votaste ("+ nroVotos + ")";
	}
	else
	{
	
		document.getElementById("votarHabilitado2").style.display="none";
		document.getElementById("votarDeshabilitado2").style.display="block";
	}
}

function readCookie(name)
{
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)
	{
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return '';
}

