function agregarPonente1(){
	texto = document.forms.frmInscripcion.author1.value;
	opcion = new Option(texto,texto,"defaultSelected");
	if(texto != "")
		document.forms.frmInscripcion.ponent1.options[0] = opcion;
	
	texto = document.forms.frmInscripcion.author2.value;
	opcion = new Option(texto,texto);
	if(texto != "")
		document.forms.frmInscripcion.ponent1.options[1] = opcion;
	
	texto = document.forms.frmInscripcion.author3.value;
	opcion = new Option(texto,texto);
	if(texto != "")
		document.forms.frmInscripcion.ponent1.options[2] = opcion;
	
	texto = document.forms.frmInscripcion.author4.value;
	opcion = new Option(texto,texto);
	if(texto != "")
		document.forms.frmInscripcion.ponent1.options[3] = opcion;
}

function agregarPonente2(){
	texto = document.forms.frmInscripcion.author1.value;
	opcion = new Option(texto,texto,"defaultSelected");
	if(texto != "")
		document.forms.frmInscripcion.ponent2.options[0] = opcion;
	
	texto = document.forms.frmInscripcion.author2.value;
	opcion = new Option(texto,texto);
	if(texto != "")
		document.forms.frmInscripcion.ponent2.options[1] = opcion;
	
	texto = document.forms.frmInscripcion.author3.value;
	opcion = new Option(texto,texto);
	if(texto != "")
		document.forms.frmInscripcion.ponent2.options[2] = opcion;
	
	texto = document.forms.frmInscripcion.author4.value;
	opcion = new Option(texto,texto);
	if(texto != "")
		document.forms.frmInscripcion.ponent2.options[3] = opcion;
}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

/*Secciones no disponibles*/
function errorjava() { 
alert('Enlace aún no disponible, lo sentimos...')
}

function ventana(src,nom,ancho,alto){
	TopPosition=(screen.height)?(screen.height-alto)/2:100;LeftPosition=(screen.width)?(screen.width-ancho)/2:100
	window.open(src, nom,'scrollbars=0,resizable=no,width='+ancho+',height='+alto+',status=0,menubar=0,left='+LeftPosition+',top='+TopPosition+'');
}

function MM_preloadImages() { //v3.0
	var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
	var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
	if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

var ie4 = false; if(document.all) { ie4 = true; }

function getObject(id) { if (ie4) { return document.all[id]; } else { return document.getElementById(id); } }

function cambiarfons(calipo,colore){
	var pop1 = calipo + 'a';
	var pop2 = calipo + 'b';
	var popeye1 = getObject(pop1);
	var popeye2 = getObject(pop2);
	popeye1.style.cursor = 'hand';
	popeye2.style.cursor = 'hand';
	popeye1.bgColor = colore;
	popeye2.bgColor = colore;
}

function cambiarfonsf(calipo,colore){
	var popeye1 = getObject(calipo);
	popeye1.style.cursor = 'hand';
	popeye1.bgColor = colore;
}

function cambiarback(calipo2,colore2){
	var popeye12 = getObject(calipo2);
	popeye12.src = colore2;
}

function mostrarcapa(g){
	var popeye2 = getObject(g);
	popeye2.style.display='';
	//MOURE POSTS FORO NOMES VA BE AMB IE
	//popeye2.style.left=document.body.scrollLeft + event.clientX - 77;
	//popeye2.style.top=document.body.scrollTop + event.clientY + 9;
}

function ocultarcapa(g){
	var popeye2 = getObject(g);
	popeye2.style.display='none';
}

/*Menu Ampliar Texto*/
function aumentarfont(){
	var texte = getObject('texto');
	if (texte.style.fontSize == '9pt') {
		texte.style.fontSize = '10pt'
	}
	if (texte.style.fontSize == '8pt') {
		texte.style.fontSize = '9pt'
	}
	if (texte.style.fontSize == '') {
		texte.style.fontSize = '8pt'
	}
}

function reducirfont(){
	var texte = getObject('texto');
	if (texte.style.fontSize == '8pt') {
		texte.style.fontSize = ''
	}
	if (texte.style.fontSize == '9pt') {
		texte.style.fontSize = '8pt'
	}
	if (texte.style.fontSize == '10pt') {
		texte.style.fontSize = '9pt'
	}
}

function mClk(src) {
	if(event.srcElement.tagName=='TD'){
		src.children.tags('A')[0].click();
	}
}

/*No error javascript*/
function stoperror(){
	return true
}
window.onerror=stoperror
/*Proteccion de las paginas*/
/*Deshabilitar boton derecho del raton y teclado*/
var messagen="";
function clickIE() {if (document.all) {(messagen);return false}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(messagen);return false}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE}

function AddToFavorites() {
	if( document.all ){
		window.external.AddFavorite(location.href, document.title);
	}else{
		alert( 'Lo sentimos, tu navegador no soporta esta función, añade la página de forma manual (usualmente Ctrl + D)' );
	}
}

/*Efecto pim i pam*/
function doBlink(){
	var blink = document.all.tags("BLINK")
	for (var i=0; i<blink.length; i++)
	blink[i].style.visibility = blink[i].style.visibility == "" ? "hidden" : ""
}

function startBlink(){
	if (document.all)
		setInterval("doBlink()",500)
}

window.onload = startBlink;
var numero = 0;
var payo = 0;

function cambiarcasilla(feo){
	var cas = getObject(feo);
	var imata = 'themes/Generation/images/check1.gif';
	var imatb = 'themes/Generation/images/check2.gif';
	if (payo==0){
		if (cas.src == imata){
			numero = 0; //casilla desactivada
		}else{
			numero = 1; //casilla activada
		}
		payo=1;
	}
	if (numero == 0) {
		cas.src=imatb;
		numero = 1; //activar casilla
		window.open("modules.php?name=pag_inicio&op=guardar&valor=1", "show_window",'scrollbars=1,resizable=no,width=1,height=1,status=0,menubar=0,left=9000000,top=9000000');
	}else{
		cas.src=imata;
		numero = 0; //desactivar casilla
		window.open("modules.php?name=pag_inicio&op=guardar&valor=0", "show_window",'scrollbars=1,resizable=no,width=1,height=1,status=0,menubar=0,left=9000000,top=9000000');
	}
}

function cerrarsms(fe,ra){
	var ce = getObject(fe);
	var ca = getObject(ra);
	ce.style.visibility = 'hidden';
	ca.style.visibility = 'visible';
}

function cambiar_img(nom,dire){
	var pic = getObject(nom);
	pic.src=dire;
}

function mourecapa(desti,desti2){
	var capa = getObject(desti);
	var capa2 = getObject(desti2);
	if (ie4) {
		var rightedge=(screen.width/2)-334;
	} else {
		var rightedge=(document.body.clientWidth/2)-324;
	}
	capa.style.left=rightedge;
	capa2.style.left=rightedge;
}

function cerrarsms(fe,ra){
	var ce = getObject(fe);
	var ca = getObject(ra);
	ce.style.visibility = 'hidden';
	ca.style.visibility = 'visible';
}