var szs = new Array( 'x-small','small','medium','large');
var startSz = 1;
function ft(inc) {
	var sz = startSz;
	sz += inc;
	if ( sz < 0 ) sz = 0;
	if ( sz > 3 ) sz = 3;
	startSz = sz;
	$('texto').style.fontSize = szs[ sz ];
	$('resumen').style.fontSize = szs[ sz ];
}
function zoom(sPicURL) { 
	window.open( "zoom.html?"+sPicURL, "foto","resizable=1,height=300,width=400");  
}
function vota(nota,vt){
	var url = 'w2/vota.asp';
	var pars = 'id='+nota+'&vt='+vt;
	var myAjax = new Ajax.Updater(
			'votar', url, 
			{method: 'get', parameters: pars});
}
function apruebo(nota_coment_id,vt){
	var url = 'w2/apruebo.asp';
	var pars = 'nota_coment_id='+nota_coment_id+'&vt='+vt;
	var myAjax = new Ajax.Updater(
			'cmt_vote_'+nota_coment_id, url, 
			{method: 'get', parameters: pars});
}
function vistas(num)
{
	if ( num == 1 ) {
		$('vistas').style.display = "";
		$('comentadas').style.display = "none";
		$('votadas').style.display = "none";
	} else if ( num == 2 ){
		$('vistas').style.display = "none";	
		$('comentadas').style.display = "";
		$('votadas').style.display = "none";
	} else {
		$('vistas').style.display = "none";
		$('comentadas').style.display = "none";
		$('votadas').style.display = "";	
	}
}
function openWindow(sLocation,sName,nWidth,nHeight,tipo)
{
	if (tipo==1) 
		var oWin = window.open(sLocation,sName,"toolbar=1,directories=0,location=0,menubar=1,status=1,scrollbars=1,resizable=1,width=" + nWidth + ",height=" + nHeight);
	else
		var oWin = window.open(sLocation,sName,"status=0,resizable=0,width=" + nWidth + ",height=" + nHeight);

	if (oWin.opener == null)
		oWin.opener = self;
	oWin.focus();
	return;
}
function unpopp(){
	popDiv=$('popDiv');
	if(popDiv){popDiv.parentNode.removeChild(popDiv);popDiv=false;}
}
function popp(area,text){
	unpopp();$(area).innerHTML+='<div id="popDiv" class="aviso-login"><div><p><strong>¡Has valer tu opinion!</strong> Para '+text+', <a href="/login.asp">Conectate</a> o <a href="/registro.asp">Registrate</a> gratis.</p><a href="javascript:unpopp()"><img src="/images/close.gif" class="close" alt="Cerrar" /></a></div></div>';
	return(false);
}
function galeria(num)
{
	var oWin = window.open("galeria_pop.asp?g="+num,"","status=0,resizable=0,scrollbars=0,width=728,height=585");
	if (oWin.opener == null)
		oWin.opener = self;
	oWin.focus();
	return;
}
function radio()
{
	var oWin = window.open("radio/radio.html","radio","status=0,resizable=0,width=300,height=395");
	if (oWin.opener == null)
		oWin.opener = self;
	oWin.focus();
	return;
}