function show_foros(){
	document.getElementById('channelForums').style.display='block';	
	document.getElementById('channelComments').style.display='none';	
	document.getElementById('menu_foros').className = 'active';
	document.getElementById('menu_comentarios').className = '';
}
function show_comentarios(){
	document.getElementById('channelForums').style.display='none';	
	document.getElementById('channelComments').style.display='block';	
	document.getElementById('menu_foros').className = '';
	document.getElementById('menu_comentarios').className = 'active';
}
var myCarrousel = null;
window.addEvent('domready', function(){
	myCarrousel = new Carrousel({ startColor: 'transparent', endColor: '#E4F5FC', duration: 4000, transition: 1000, startPos: 0, endPos: -80, opacity: 0.8});
	myCarrousel.Start();
});
function show_rss(){
	document.getElementById('Bajalo_rss').style.display='block';	
	document.getElementById('tab_rss').className = 'active First';
	document.getElementById('Bajalo_rss_des').style.display='block';	
}
function popup(pagina,nombre,ancho,alto,parameters) {
	var w=screen.width;
	var h=screen.height;
	var x=Math.round((w-ancho+1)/2);
	var y=Math.round((h-alto+1)/2);
	var wp ='width='+ancho+',height='+alto+',hotkeys=NO,screenX='+x+',screenY='+y+',left='+x+',top='+y+',scrollbars=no';
	var pp = window.open(pagina,nombre,wp);
	pp.focus();
}				
function Popup(pagina,nombre,ancho,alto,parameters) {
	var w=screen.width;
	var h=screen.height;
	var x=Math.round((w-ancho+1)/2);
	var y=Math.round((h-alto+1)/2);
	var wp ='width='+ancho+',height='+alto+',hotkeys=NO,screenX='+x+',screenY='+y+',left='+x+',top='+y+',scrollbars=no';
	var pp = window.open(pagina,nombre,wp);
	pp.focus();
}
function getCookie(name)
{
	var cookie, offset, end;
	cookie  = " "+document.cookie;
	offset  = cookie.indexOf(" "+name+"=");
	if (offset == -1) return undefined;
	offset += name.length+2;
	end     = cookie.indexOf(";", offset)
	if (end    == -1) end = cookie.length;
	return unescape(cookie.substring(offset, end));
}
var user_data=null;
var token=null;
var nickname=null;
var thumbnail=null;
var webname = null;

user_data=getCookie("user_data");

if(user_data!=null) {
	var datos_usuario = user_data.split("|");
	if(datos_usuario[0]!=null) {
		webname = datos_usuario[0]
	}
	if(datos_usuario[3]!=null) {
		nickname = datos_usuario[3]
	}
	if(datos_usuario[4]!=null) {
		thumbnail = datos_usuario[4]
	}
}

if (token==null && nickname==null) { 
	var foto2="http://i.esmas.com/img/univ/portal/headerv3/foto_user.jpg"; 
} 
else { 
	var foto2=thumbnail; 
}
var foto="<img id='HDR_esfoto' src='"+foto2+"'>";

function Fecha() {
	var fecha=new Date();
	var mesfull = new Array ('Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre');
	document.write(mesfull[fecha.getMonth()] + " " + fecha.getDate() + ", " + fecha.getFullYear());
}
