<!-- Vignette V6 Thu Jul 03 13:57:54 2003 -->


//Browsercheck

function lib_bwcheck(){
	this.ver=navigator.appVersion;
	this.agent=navigator.userAgent;
	this.dom=document.getElementById?1:0;
	this.opera5=this.agent.indexOf("Opera 5")>-1;
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
	this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6;
	this.mac=this.agent.indexOf("Mac")>-1;
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5);
	return this;
}

//Definición de variables y constantes globales

var bw = new lib_bwcheck();
var px = bw.ns4||window.opera?"":"px";

nSlidespeed = 20; //in px
nNewsheight = 200; //This is how long down it should start the slide.
nFont = 'ignifuga,verdana,arial'; //The font for the news.
nFontsize = 17; //Font size in pixel.
nFontWeight = 'normal';
nFadespeed = 100; //The speed to fade, in milliseconds.
nSlideTime = 45; //The speed to Slide, in milliseconds. default 50
nBetweendelay = 1000; //The delay before fading out.
nTypespeed = 50; //Set the speed you want it to write in (in milliseconds between each letter) default 150
nHidewait = 3500;   //Set the time you want it to wait before it slide out
nColor=new Array('#00D700','#0FA70F','#167A16','#194D19','#152515','#000000');
nLineHeight=23;
var ImageArray;
ImageArray=new Array();
var nuevosEventos=false;

//Funciones a aplicar en el ticker de las noticias

function makeNewsObj(obj,nest,font,size,color,weight,news,fadespeed,betweendelay,slidespeed,newsheight,typespeed,Hidewait,SlideTime){
    nest=(!nest) ? "":'document.'+nest+'.';
   	this.css=bw.dom? document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+"document.layers." +obj):0;	
   	this.writeref=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+"document.layers." +obj+".document"):0;
	if(font){this.color=new Array(); this.color=eval(color); this.news=new Array(); this.news=eval(news); this.speed=SlideTime;
		this.font=font; this.size=size; this.weight=weight; this.fadespeed=fadespeed; this.typeSpeed=typespeed; this.delay=betweendelay; this.newsheight=newsheight;
		this.fadeOut=b_fadeOut; this.newsWrite=b_newsWrite; this.y=1; this.typeWriter=b_typeWriter;this.hidewait=Hidewait;
		this.slideIn=b_slideIn;	this.slideOut=b_slideOut;  this.slideSpeed=slidespeed; this.decide=b_decide; this.arrancaP=b_arrancaP;
		if(bw.dom || bw.ie4){this.css.fontFamily=this.font; this.css.fontSize=this.size; this.css.fontWeight=this.weight; this.css.color=this.color[0]}
	} else this.y=0;
	this.moveIt=b_moveIt;
	this.writeIt=b_writeIt;	
	this.ocultar=b_ocultar; 
	this.mostrar=b_mostrar;
	this.despItY=b_despItY;
	this.desplegar=b_desplegar;
	this.obj = obj + "Object"; 	eval(this.obj + "=this"); return this
}

function b_moveIt(x,y){this.x=x; this.y=y; this.css.left=this.x+px; this.css.top=this.y+px;}
function b_writeIt(text){ 	
	if (bw.ns4){
		this.writeref.write(text);
		this.writeref.close();
	} else {
		this.writeref.innerHTML=text;	
	}
}

function b_newsWrite(num,i){
	var texto="";
	var num_al=0;
	if (num < 0) {
		num_al=-(num+1);
		texto=this.news[num_al]['titulo']+"<BR><BR>"+this.news[num_al]['texto'];
		if (bw.ns4){
			this.writeref.write("<a href=\""+this.news[num_al]['url']+"\" style=\"text-decoration:none; font-size:8pt\">"
			+"<font face=\""+this.font+"\" color=\""+this.color[this.color.length-1]+"\">"+texto+"</font></a>");
			this.writeref.close()
		} else {
			this.writeref.innerHTML = '<a style="line-height:'+nLineHeight+'px;text-decoration:none; font-size:8pt; color:'+this.color[this.color.length-1]+'" href="'+this.news[num_al]['url']+'">'+texto+'</a>';
		}
	} else {
		if (this.news[num]['text']['hour']=="") 
			texto=this.news[num]['text']['date']
		else
			if (this.news[num]['text']['hour']=="")
				texto=this.news[num]['text']['date']+"<BR>"+this.news[num]['text']['place']+"<BR>"+this.news[num]['text']['what']+"<BR>"+this.news[num]['text']['who'];		
			else
				texto=this.news[num]['text']['date']+"<BR>"+this.news[num]['text']['hour']+"<BR>"+this.news[num]['text']['place']+"<BR>"+this.news[num]['text']['what']+"<BR>"+this.news[num]['text']['who'];		
		if (bw.ns4){
			if (this.news[num]['link']!="") {	
				this.writeref.write("<a href=\""+this.news[num]['link']+"\" style=\"text-decoration:none; font-size:"+this.news[num]['size']+"pt\">"
				+"<font face=\""+this.font+"\" color=\""+this.color[i]+"\">"+texto+"</font></a>")
				this.writeref.close()
			} else {
				this.writeref.write("<font face=\""+this.font+"\" color=\""+this.color[i]+"\" style=\"text-decoration:none; font-size:"+this.news[num]['size']+"pt\">"+texto+"</font>")
				this.writeref.close()
			}
		} else {
			if (this.news[num]['link']!="")	
				 this.writeref.innerHTML = '<a id="'+this.obj+'link' +'"  style="text-decoration:none; font-size:'+this.news[num]['size']+'pt; color:'+this.color[i]+'" href="'+this.news[num]['link']+'">'+texto+'</a>'
			else {
				 //this.writeref.innerHTML = '<font style="text-decoration:none; font-size:'+this.news[num]['size']+'pt; color:'+this.color[i]+'">'+texto+'</font>'
				 this.writeref.innerHTML = '<font style="position:relative;top:-'+((this.news[num]['size']/2)-(this.news[num]['size']/8))+'px;left:-'+(this.news[num]['size']/10)+'px;text-decoration:none; font-size:'+this.news[num]['size']+'pt; color:'+this.color[i]+'">'+texto+'</font>'
				}
		}
	}
}

function b_slideIn(num,i,type){ //Slide in
	if (this.y>0){
		if (i==0){this.moveIt(0,this.newsheight); this.newsWrite(num,this.color.length-1)}
		this.moveIt(this.x,this.y-this.slideSpeed)
		i ++
		setTimeout(this.obj+".slideIn("+num+","+i+","+type+");",this.speed)
	} else {
		if (type==0) setTimeout(this.obj+".fadeOut("+num+","+(this.color.length-1)+")",this.delay);
		else setTimeout(this.obj+".slideOut("+num+")",this.hidewait);
	}
}

function b_fadeOut(num,i){
	if (i>=0){
		if (i==0 || bw.ns4) this.newsWrite(num,i)	
		else{
			obj = bw.ie4?eval(this.obj+"link"):document.getElementById(this.obj+"link")
			obj.style.color = this.color[i]
		}
		i --
		setTimeout(this.obj+".fadeOut("+num+","+i+")",this.fadespeed)
	}else{
		num ++;
		if(num==this.news.length) num=0;
		this.y=1; setTimeout(this.obj+".decide("+num+")",500);
	}
}

function b_slideOut(num){ //Slide Out
	if (this.y>-nNewsheight){
		this.moveIt(this.x,this.y-this.slideSpeed);
		setTimeout(this.obj+".slideOut("+num+");",this.speed);
	}else{
		if (num < 0) {
			num --;
			var num_al=-(num+1);
			if(num_al==this.news.length) num=-1
		} else {
			num ++;
			if(num==this.news.length) num=0
		}
		this.ocultar(num);
	}
}

function b_typeWriter(num,desp) {
	if (this.news[num]['text']['hour']=="")
		wtext=this.news[num]['text']['date']+this.news[num]['text']['place']+this.news[num]['text']['what']+this.news[num]['text']['who'];		
	else
		wtext=this.news[num]['text']['date']+this.news[num]['text']['hour']+this.news[num]['text']['place']+this.news[num]['text']['what']+this.news[num]['text']['who'];		
	if (desp<=wtext.length){
		tam=wtext.length;
		wtext = wtext.substr(0,desp);
		if (this.news[num]['text']['hour']=="") {
			textA = this.news[num]['text']['date']+this.news[num]['text']['place']+this.news[num]['text']['what'];		
			textB = this.news[num]['text']['date']+this.news[num]['text']['place'];		
			textC = this.news[num]['text']['date'];		
			if (wtext.length>=textA.length) 
				wtext=wtext.substr(0,textA.length)+"<BR>"+wtext.substr(textA.length,wtext.length)
			if (wtext.length>=textB.length) 
				wtext=wtext.substr(0,textB.length)+"<BR>"+wtext.substr(textB.length,wtext.length)
			if (wtext.length>=textC.length)
				wtext=wtext.substr(0,textC.length)+"<BR>"+wtext.substr(textC.length,wtext.length)
		} else {
			textA = this.news[num]['text']['date']+this.news[num]['text']['hour']+this.news[num]['text']['place']+this.news[num]['text']['what'];		
			textB = this.news[num]['text']['date']+this.news[num]['text']['hour']+this.news[num]['text']['place'];		
			textC = this.news[num]['text']['date']+this.news[num]['text']['hour'];		
			textD = this.news[num]['text']['date'];		
			if (wtext.length>=textA.length) 
				wtext=wtext.substr(0,textA.length)+"<BR>"+wtext.substr(textA.length,wtext.length)
			if (wtext.length>=textB.length) 
				wtext=wtext.substr(0,textB.length)+"<BR>"+wtext.substr(textB.length,wtext.length)
			if (wtext.length>=textC.length)
				wtext=wtext.substr(0,textC.length)+"<BR>"+wtext.substr(textC.length,wtext.length)
			if (wtext.length>=textD.length)
				wtext=wtext.substr(0,textD.length)+"<BR>"+wtext.substr(textD.length,wtext.length)
		}
		desp ++;
		if (bw.ns4){
			if ((this.news[num]['link']=="")||(desp<=tam)) {
				this.writeref.write("<font face=\""+this.font+"\" color=\""+this.color[this.color.length-1]+"\" style=\"text-decoration:none; font-size:"+this.news[num]['size']+"pt\">"+wtext+"</font>")
			} else {
				texto="<a href=\""+this.news[num]['link']+"\" style=\"text-decoration:none; font-size:"+this.news[num]['size']+"pt\">"
				+"<font face=\""+this.font+"\" color=\""+this.color[this.color.length-1]+"\">"+wtext+"</font></a>";
				this.writeref.write(texto)
			}
				this.writeref.close()
		} else {
			if ((this.news[num]['link']=="")||(desp<=tam))
				this.writeref.innerHTML = '<font style="line-height:'+nLineHeight+'px;text-decoration:none; font-size:'+this.news[num]['size']+'pt; color:'+this.color[this.color.length-1]+'">'+wtext+'</font>'
			else {
				texto='<a id="'+this.obj+'link' +'"  style="line-height:'+nLineHeight+'px;text-decoration:none; font-size:'+this.news[num]['size']+'pt; color:'+this.color[this.color.length-1]+'" href="'+this.news[num]['link']+'">'+wtext+'</a>';
				this.writeref.innerHTML = texto;
			}
		}

		if (nuevosEventos) setTimeout(this.obj+".slideOut("+num+")",0);
		else setTimeout(this.obj+".typeWriter("+num+","+desp+")",this.typeSpeed);
	}
	else setTimeout(this.obj+".slideOut("+num+")",this.hidewait);
}

function b_ocultar(num) {
	this.css.visibility = "hidden";
	
	if (num!=null) {
		this.y=1;
		if (num < 0) {
			this.css.visibility='visible';
			this.slideIn(num,0,1);
		}
		else this.decide(num);
	}
}

function b_mostrar() {this.css.visibility = "visible"}

function recolocar() {
	capa = new makeNewsObj('divNewsCont');
	desplazamiento=((bw.ie)?document.body.clientWidth:window.innerWidth)>780?(((bw.ie)?document.body.clientWidth:window.innerWidth)/2)+88:480;
	capa.css.left=desplazamiento+px;
}

function recolocarS() {
	desplazamiento=((bw.ie)?document.body.clientWidth:window.innerWidth)>750?((bw.ie)?((document.body.clientWidth)/2)-220:120):150;	
	desplazamiento=((bw.ie)?document.body.clientWidth:window.innerWidth)>800?((bw.ie)?((document.body.clientWidth/2)-145):0):245;
	desplazamiento=((bw.ie)?document.body.clientWidth:window.innerWidth)>800?(((bw.ie)?document.body.clientWidth:window.innerWidth)/2)+235:625;
}

function b_decide(num) {
	this.css.visibility='visible';
	if (nuevosEventos) {
		nuevosEventos=false;
		this.news=eval("nNews");
		num=0;
		//alert(this.news.length);
	}
	if (this.news[num]['type']==0) 	this.slideIn(num,0,0);
	else {
		if (this.news[num]['type']==1) {
			this.moveIt(this.x,0);
			this.typeWriter(num,0);
		} else {
			if (this.news[num]['type']==2) 	this.slideIn(num,0,1);
		}
	}
}

function b_arrancaP() {
	this.css.visibility='visible';
	if(this.news.length==1) {
		var wtext=this.news[0]['titulo']+"<BR><BR>"+this.news[0]['texto'];
		if (bw.ns4){
			texto="<a href=\""+this.news[0]['url']+"\" style=\"text-decoration:none; font-size:8pt\">"
			+"<font face=\""+this.font+"\" color=\""+this.color[this.color.length-1]+"\">"+wtext+"</font></a>";
			this.writeref.write(texto);
			this.writeref.close();
		} else {
			texto='<a style="line-height:'+nLineHeight+'px;text-decoration:none; font-size:8pt; color:'+this.color[this.color.length-1]+'" href="'+this.news[0]['url']+'">'+wtext+'</a>';
			this.writeref.innerHTML = texto;
		}
	} else {
		this.slideIn(-1,0,1);
	}
}

function fadeInit(){
	oNews = new makeNewsObj('divNews','divNewsCont',nFont,nFontsize,"nColor",nFontWeight,"nNews",nFadespeed,nBetweendelay,nSlidespeed,nNewsheight,nTypespeed,nHidewait,nSlideTime);
	oNewsCont = new makeNewsObj('divNewsCont');
	recolocar();
	oNews.decide(0);
	oNewsCont.mostrar;
}

var block_left,block_right;
var texto_menu, cerrar_menu;
var stickie_registro,stickie_contacto,stickie_texto,sticky_clic,stickie_form;
//var texto_email="<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"118\" height=\"83\" valign=\"top\"><tr><td valign=\"top\" height=\"15\" class=\"text_stiky\"> enviar <font face=verdana>&lt;</font>E a un amigo</td></tr><tr><td valign=\"middle\" height=\"10\"><img src=\"/LCE/images/lineaactividad.gif\" width=\"118\" height=\"3\" border=\"0\"></td></tr><tr><td valign=\"top\" class=\"text_stiky\">Si esta p&aacute;gina est&aacute; hecha para ti, ¿por qu&eacute; no para tus amigos? ¡Mandasela!</td></tr><tr><td valign=\"bottom\" align=\"right\"><a href=\"javascript:CerrarStickie('registro')\" CLASS=\"text_stiky\">X</a></td></tr></table>";
var text_actividad="";
var form_contacto="<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"118\" height=\"83\" valign=\"top\"><tr><td valign=\"top\"><input type=\"text\" class=\"contactar\" value=\"tu correo electr&oacute;nico\" onClick=\"vaciar(this)\" name=\"email\"></td></tr><tr><td valign=\"top\"><textarea name=\"consulta\" style=\"height:50px\" onClick=\"vaciar(this)\">mensaje</textarea></td></tr><tr><td align=\"right\" valign=\"bottom\"><a href=\"javascript:checkContacta();\" CLASS=\"text_stiky\">_enviar</a></td></tr></table>";
var form_registro="<table border =0 cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"118\" height=\"83\" valign=\"top\"><tr><td valign=\"top\"><input type=\"text\" class=\"contactar\" value=\"tu correo electr&oacute;nico\" onClick=\"vaciar(this)\" name=\"email\"></td></tr><tr><td><input type=\"radio\" class=\"radio\" name=\"newsletter\" value=\"1\" CHECKED> <font style=\"font-family:Ignifuga,Verdana,Arial; font-size:8pt; color:#000000;\">s&iacute;, quiero</font></td></tr><tr><td><input type=\"radio\" class=\"radio\" name=\"newsletter\" value=\"0\"> <font style=\"font-family:Ignifuga,Verdana,Arial; font-size:8pt; color:#000000;\"> no, gracias</font><br></td></tr><tr><td align=\"right\" valign=\"bottom\"><a href=\"javascript:checkRegistro();\" CLASS=\"text_stiky\">_enviar</a></td></tr></table>";
var form_registro0="<table border =0 cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"118\" height=\"83\" valign=\"top\"><tr><td valign=\"top\"><input type=\"text\" class=\"contactar\" value=\"tu correo electr&oacute;nico\" onClick=\"vaciar(this)\" name=\"email\"></td></tr><tr><td><input type=\"radio\" class=\"radio\" name=\"newsletter\" value=\"1\"> <font style=\"font-family:Ignifuga,Verdana,Arial; font-size:8pt; color:#000000;\">s&iacute;, quiero</font></td></tr><tr><td><input type=\"radio\" class=\"radio\" name=\"newsletter\" value=\"0\" CHECKED> <font style=\"font-family:Ignifuga,Verdana,Arial; font-size:8pt; color:#000000;\"> no, gracias</font><br></td></tr><tr><td align=\"right\" valign=\"bottom\"><a href=\"javascript:checkRegistro();\" CLASS=\"text_stiky\">_enviar</a></td></tr></table>";
var form_registro1="<table border =0 cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"118\" height=\"83\" valign=\"top\"><tr><td valign=\"top\"><input type=\"text\" class=\"contactar\" value=\"tu correo electr&oacute;nico\" onClick=\"vaciar(this)\" name=\"email\"></td></tr><tr><td><input type=\"radio\" class=\"radio\" name=\"newsletter\" value=\"1\" CHECKED> <font style=\"font-family:Ignifuga,Verdana,Arial; font-size:8pt; color:#000000;\">s&iacute;, quiero</font></td></tr><tr><td><input type=\"radio\" class=\"radio\" name=\"newsletter\" value=\"0\"> <font style=\"font-family:Ignifuga,Verdana,Arial; font-size:8pt; color:#000000;\"> no, gracias</font><br></td></tr><tr><td align=\"right\" valign=\"bottom\"><a href=\"javascript:checkRegistro();\" CLASS=\"text_stiky\">_enviar</a></td></tr></table>";
var form_email="<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"118\" height=\"83\" valign=\"top\"><tr><td valign=\"top\"><input type=\"text\" name=\"remitente\" class=\"contactar\" value=\"tu correo\" onClick=\"vaciar(this)\"><input type=\"hidden\" name=\"url\" value=\"\"></td></tr><tr><td><input type=\"text\" name=\"email\" class=\"contactar\" value=\"el correo de tu amigo\" onClick=\"vaciar(this)\"></td></tr><tr><td align=\"right\" valign=\"bottom\"><a href=\"javascript:checkEmail();\" CLASS=\"text_stiky\">_enviar</a></td></tr></table>";
var form_actividad="";
var noticias_scroll;
var proyectos_scroll;

function checkRegistro(){
		if (!chequeaemail(document.formSticky.email.value)){
			alert("email no valido");		
			document.formSticky.email.focus();	
		}else{
			document.formSticky.action="/LCE/lce_registro";
			CerrarStickie('registro');
			document.formSticky.submit();
		}
}

function setOpcion(maid){
	document.formSticky.maid.value=maid;
}

function checkEmail(){
		if (!chequeaemail(document.formSticky.remitente.value)){
			alert("email no valido");		
			document.formSticky.remitente.focus();	
		}else if (!chequeaemail(document.formSticky.email.value)){
			alert("email no valido");		
			document.formSticky.email.focus();	
		}else {
			document.formSticky.action="/LCE/lce_email_amigo";
			document.formSticky.url.value=document.location.href;
			CerrarStickie('email');
			document.formSticky.submit();
		}	
}

function checkContacta(){
		if (!chequeaemail(document.formSticky.email.value)){
			alert("email no valido");		
			document.formSticky.email.focus();	
		}else if (document.formSticky.consulta.value.length==0){
			alert("Debes insertar un texto");
		}else {
			document.formSticky.action="/LCE/lce_contactar";
			CerrarStickie('contacta');
			document.formSticky.submit();
		}	
}

function ExisteCapa (obj,nest) {
    nest=(!nest) ? "":'document.'+nest+'.';
   	objCapa=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+"document.layers." +obj):0;	
	if (eval(objCapa)==null) return false;
	else return true;
}

function MenuInit(){
	WebLoaded=true;
	nLineHeight=14;
	block_left=new makeNewsObj('blockMenuLeft');

	if ((ExisteCapa('blockMenuRight'))&&(InitSpace=="")) 	block_right=new makeNewsObj('blockMenuRight');
	if (ExisteCapa('divNewsCont'))	noticias_scroll=new makeNewsObj('divNewsCont');
	if (ExisteCapa('divNewsContEsp'))	noticias_scroll=new makeNewsObj('divNewsContEsp');
	if (ExisteCapa('divProyectsCont'))	proyectos_scroll=new makeNewsObj('divProyectsCont');
	

	
	recolocarS();
	

	if ((ExisteCapa('divNews','blockMenuRight.document.divNewsCont'))||(ExisteCapa('divNews','blockMenuRight.document.divNewsContEsp'))) {
		if (ExisteCapa('divNewsCont'))	{
			oNews = new makeNewsObj('divNews','blockMenuRight.document.divNewsCont',nFont,7,"nColor",nFontWeight,"nNews",nFadespeed,nBetweendelay,nSlidespeed,nNewsheight,nTypespeed,nHidewait,nSlideTime);
			oNewsCont = new makeNewsObj('divNewsCont');
		} else {
			oNews = new makeNewsObj('divNews','blockMenuRight.document.divNewsContEsp',nFont,7,"nColor",nFontWeight,"nNews",nFadespeed,nBetweendelay,nSlidespeed,nNewsheight,nTypespeed,nHidewait,nSlideTime);
			oNewsCont = new makeNewsObj('divNewsContEsp');
		}
		oNews.decide(0);
		oNewsCont.mostrar;
	}

	if (ExisteCapa('divProyects','blockMenuRight.document.divProyectsCont')) {
		oProyects = new makeNewsObj('divProyects','blockMenuRight.document.divProyectsCont',nFont,7,"nColor",nFontWeight,"nProyects",nFadespeed,nBetweendelay,nSlidespeed,nNewsheight,nTypespeed,nHidewait,nSlideTime);
		oProyectsCont = new makeNewsObj('divProyectsCont');
		oProyects.arrancaP();
		oProyectsCont.mostrar;
	}
	
	scrollMenu();

	if (InitSpace!="") cargarDatos(InitSpace);
	if (ExisteCapa('sticky_clic')){
		initClic();
	}	

}


var iNews=0;

function newNews(tipo){
	iNews=0;
	nNews=new Array();
	nNews[0]=new Array();
	nNews[0]["type"]=2;
	nNews[0]["text"]=new Array();
	nNews[0]["text"]["date"]=tipo;
	nNews[0]["text"]["hour"]="";
	nNews[0]["text"]["place"]="";
	nNews[0]["text"]["what"]="";
	nNews[0]["text"]["who"]="";
	nNews[0]["link"]="";
	nNews[0]["size"]=20;
}

function addNews(date,hour,place,what,who,link){
	iNews=iNews+1;
	nNews[iNews]=new Array();
	nNews[iNews]["type"]=1;
	nNews[iNews]["text"]=new Array();
	nNews[iNews]["text"]["date"]=date;
	nNews[iNews]["text"]["hour"]=hour;
	nNews[iNews]["text"]["place"]=place;
	nNews[iNews]["text"]["what"]=what;
	nNews[iNews]["text"]["who"]=who;
	nNews[iNews]["link"]=link;
	nNews[iNews]["size"]=8;
}

function newsInit(){
	nuevosEventos=true;
}


function b_desplegar(num) {
	num=num+5;
	if (num<=75) {
		this.css.clip='rect(0px 130px '+num+'px 0px)';
		setTimeout(this.obj+".desplegar("+num+")",this.speed);
	}
}

var sobre=0;
var sobreDIV=false;
var sobreTABLE=false;

function CambioMenuD(opt) {
	if (stickie_actividad.css.visibility!="visible") {
		if (opt==0) {
			sobreTABLE=true;
			if (opciones_menu.css.visibility!="visible") {
				opciones_menu.css.clip='rect(0px 130px 0px 0px)';
	
				sobre++;
			}
		} else {
			sobreTABLE=false;
			if (opciones_menu.css.visibility=="visible") setTimeout("plegar()",500);
		}
	}
}

function plegar() {
	if ((!sobreDIV)&&(!sobreTABLE))	sobre--;
	if (sobre<=0) {
		sobre=0;
		
		texto_menu.mostrar();
	}
}





function b_despItY(y){this.y=y; this.css.top=this.y+px;}

function scrollMenu() {
	var offset=bw.ie?document.body.scrollTop:window.pageYOffset;	
	if (offset < 70) offset=0;
	else offset=offset-65;

	if (block_left.y < offset) {
		block_left.moveIt(0,block_left.y+5);
		block_left.y=block_left.y+5;
		if (block_right!=null) {
			block_right.moveIt(0,block_right.y+5);
			block_right.y=block_right.y+5;
		}
	}
	if (block_left.y > offset) {
		block_left.moveIt(0,block_left.y-5);
		block_left.y=block_left.y-5;
		if (block_right!=null) {
			block_right.moveIt(0,block_right.y-5);
			block_right.y=block_right.y-5;
		}
	}
	if (block_left.y < 5) {
		block_left.moveIt(0,0);
		block_left.y=0;
	}
	if (block_right!=null) {
		if (block_right.y < 5) {
			block_right.moveIt(0,0);
			block_right.y=0;
		}
	}
	setTimeout("scrollMenu()",40);
}

var Adisciplina;

function sobreDISC(obj) {
	if (stickie_actividad.css.visibility=="visible") obj.style.color="#ffffff";
	Adisciplina=obj;
}

function cargarDatos(espacio){
	var d1,d2;
	oEspacio = new makeNewsObj('blockMenuRight','divDescription');
	oEspacioCont = new makeNewsObj('divDescription');
	oEspacioImg = new makeNewsObj('blockMenuRight','divImagen');
	oEspacioContImg = new makeNewsObj('divImagen');

	if (espacio==null) d1=(document.LCE)? document.LCE.GetVariable("nom_espacio"):document.embeds[0].GetVariable("nom_espacio");
	else d1=espacio;
	for (i=0;i < nEspacio.length;i++) {
		if (d1==nEspacio[i]['name']) {
			d2=i;
			break;
		}
	}
	texto="<font class='Fdestacado'>"+nEspacio[d2]['title']+"</font><font style='font-size:6pt'><br><br></font><font class='texto'>"+nEspacio[d2]['desc']+"</font>";
	textoImagen="<img src='"+nEspacio[d2]['image']+"' width='140' height='52' border='0'>";
	
	if (bw.ns4){
		oEspacioCont.writeref.write(texto);
		oEspacioCont.writeref.close();
		oEspacioContImg.writeref.write(textoImagen);
		oEspacioContImg.writeref.close();
	} else {
		oEspacioCont.writeref.innerHTML = texto;
		oEspacioContImg.writeref.innerHTML = textoImagen;
	}
	
	eval("document.formAgendaSala.salaAnt.value=" + nEspacio[d2]["id"]);
	top.frames.opciones.location.href=nEspacio[d2]["url"];
}

function vaciar(obj) {if ((obj.value=='tu correo electrónico')||(obj.value=='mensaje')||(obj.value=='el correo de tu amigo')||(obj.value=='tu correo')) obj.value='';}

function chco(objeto,color) {
	if (bw.ie) {
   	obj=objeto+"a";
   	estilo=bw.dom? document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+"document.layers." +obj):0;
	estilo.color=color;
   	obj=objeto+"b";
   	estilo=bw.dom? document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+"document.layers." +obj):0;
	estilo.color=color;
	}
}

function chequeaemail(email) {
 var sal,i,j,k,h,m,n,a,p,CEspecial;
 CEspecial = new Array("ñ",":","´","`","¨",";","'");
 n = 0;
 p = 0;
 a = (email.length);
 
 for (i=0; i < CEspecial.length; i++) { 
   if (!(email.indexOf(CEspecial[i],0) == -1))   return false;
 }
 
	if (!(email.indexOf(' ',0) == -1))   return false;
	else { 
	 	j=(email.indexOf('@',0))
		if (j == -1)   return false;
		else {
			if (!(email.indexOf('@',j+1) == -1))  return false;
			else {
				if ((j == 0)|(j == (email.length-1)))   return false;
				else {
					k=email.indexOf('.',0);
					h=email.indexOf('.',j);
					if (h == -1)   return false;
					else { 
						if ( ((email.substring(j+1,j+2) == ".")) | ((email.substring(j-1,j) == ".")) | ((email.substring(a-1,a) == ".")) | (k == 0))   return false;
						else {  
							for (m=0; m < email.length; m++) { 
								if (((email.substring(m,m+1) == ".")) && ((email.substring(m+1,m+2) == "."))) { 
									p++;
									if (p == 1)   return false;
								}
							}
							return true;
						} 
					}
				}
			}
		}
	}
}

function ViewImage(ifile,ititle) { 
	var win;
	var sWidth;
	var sHeight;
	var NS = (document.layers) ? 1 : 0;
   	var w=390;
	var h=330;
	var izq=(screen.width - w) / 2;
	var top=(screen.height - h) / 2;
	var parametros="resizable=yes,scrollbars=no,width=" + w + ",height=" + h + ",left=" + izq + ",top=" + top + ",status=no";
	win = window.open("","imageviewer",parametros);
	win.document.open();
	win.document.write("<html><head><SCRIPT>");
	win.document.write("function redimWindow()	{");
	win.document.write("var alto=imagen.height+36;");
	win.document.write("var ancho=imagen.width;");
	win.document.write("window.resizeTo(ancho,alto);");
	win.document.write("var izq=(screen.width - ancho) / 2;");
	win.document.write("var top=(screen.height - alto) / 2;");
	win.document.write("window.moveTo(izq,top);}");
	win.document.write("</script><title>"+ititle+"</title>");
	win.document.write("</head><BODY BGCOLOR=WHITE onLoad='redimWindow()' topmargin=0 leftmargin=0>");
	win.document.write("<IMG SRC='"+ifile+"' NAME='imagen'>");
	win.document.write("</BODY></HTML>");
	win.document.close();
}