function destacar_menu(seccion)
{
	if(document.getElementById('frontpageid'))
	{
		reset_secciones();
		if(seccion=='articulos'){
			document.getElementById('articulos-title').className="home_title fondoarticulo";
			document.getElementById('articulos-borde').className="bordearticulo";
		}
		if(seccion=='eventos'){
			document.getElementById('eventos-title').className="home_title fondoevento";
			document.getElementById('eventos-borde').className="bordeevento";
		}
		if(seccion=='videos'){
			document.getElementById('videos-title').className="home_title fondovideos";
			document.getElementById('videos-borde').className="bordevideos";
		}		
		if(seccion=='fotos'){
			document.getElementById('fotos-title').className="home_title fondofotos";
			document.getElementById('fotos-borde').className="bordefotos";
		}	
		if(seccion=='censo'){
			document.getElementById('censo-title').className="home_title fondocenso";
			document.getElementById('censo-borde').className="bordecenso";
		}
	}
}

function ajax_putRating(rate,id)
{
	var req = new XMLHttpRequest(); 
	if (req) { 
		req.onreadystatechange = function() { 
			if (req.readyState == 4 && (req.status == 200 || req.status == 304)) { 
				ajax_getRating(id);
			} 
		}; 
		req.open('POST', patineta_plugin_url+'/patineta_rating.php'); // many server-side scripts require the Content-Type to be set: 
		req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); 
		req.send('rate='+rate+'&id='+id+'&section=fotos'); 
	}			
	document.getElementById('cal'+id).innerHTML="votando...";
}

function ajax_getRating(id)
{
	var req = new XMLHttpRequest(); 
	if (req) { 
		req.onreadystatechange = function() { 
			if (req.readyState == 4 && (req.status == 200 || req.status == 304)) { 
				document.getElementById('cal'+id).innerHTML=req.responseText;
			} 
		}; 
		req.open('GET', patineta_plugin_url+'/patineta_rating.php?rate=get&id='+id+'&section=fotos'); 
		req.send(null); 
	}
}

function ajax_putRatingVid(rate,id)
{
	var req = new XMLHttpRequest(); 
	if (req) { 
		req.onreadystatechange = function() { 
			if (req.readyState == 4 && (req.status == 200 || req.status == 304)) { 
				ajax_getRating(id);
			} 
		}; 
		req.open('POST', patineta_plugin_url+'/patineta_rating.php'); // many server-side scripts require the Content-Type to be set: 
		req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); 
		req.send('rate='+rate+'&id='+id+'&section=videos'); 
	}			
	document.getElementById('cal'+id).innerHTML="votando...";
}

function ajax_getRatingVid(id)
{
	var req = new XMLHttpRequest(); 
	if (req) { 
		req.onreadystatechange = function() { 
			if (req.readyState == 4 && (req.status == 200 || req.status == 304)) { 
				document.getElementById('cal'+id).innerHTML=req.responseText;
			} 
		}; 
		req.open('GET', patineta_plugin_url+'/patineta_rating.php?rate=get&id='+id+'&section=videos');
		req.send(null); 
	}
}

function change_video(link,title)
{
	document.getElementById('embedvid').innerHTML='<object width="425" height="350" type="application/x-shockwave-flash" data="'+link+'&autoplay=1&showsearch=0"><param name="movie" value="'+link+'&autoplay=1&showsearch=0"></param><param name="allowFullScreen" value="true"></param></object>';
	location.href = "#content";
}


function change_video_small(link,title)
{
	document.getElementById('front_vid_title').innerHTML=title;
	document.getElementById('embedvid_small').innerHTML='<object width="236" height="195" type="application/x-shockwave-flash" data="'+link+'&autoplay=1&showsearch=0"><param name="movie" value="'+link+'&autoplay=1&showsearch=0"></param><param name="allowFullScreen" value="true"></param></object>';
}
