Cufon.replace('.module h3', { fontFamily: 'Swis721 Cn BT' });
Cufon.replace('.module_text h3', { fontFamily: 'Swis721 Cn BT' });
Cufon.replace('.module_menu h3', { fontFamily: 'Swis721 Cn BT' });
Cufon.replace('.module-login h3 span', { fontFamily: 'Swis721 Cn BT' });
Cufon.replace('.componentheading', { fontFamily: 'Swis721 Cn BT' });
Cufon.replace('td.contentheading .title-article', { fontFamily: 'Swis721 Cn BT' });

// mostrar y ocultar capas
function HideContent(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "none";
}
function ShowContent(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "block";
}
function cambiarcapa(lenguaje){
  document.getElementById('webinarmenos').style.display= (lenguaje=='webinarmenos')? 'block' : 'none';
  document.getElementById('webinarmas').style.display= (lenguaje=='webinarmas')? 'block' : 'none';
}
function cambiarcapa2(lenguaje){
  document.getElementById('webinar2menos').style.display= (lenguaje=='webinar2menos')? 'block' : 'none';
  document.getElementById('webinar2mas').style.display= (lenguaje=='webinar2mas')? 'block' : 'none';
}
function cambiarcapa3(lenguaje){
  document.getElementById('webinar3menos').style.display= (lenguaje=='webinar3menos')? 'block' : 'none';
  document.getElementById('webinar3mas').style.display= (lenguaje=='webinar3mas')? 'block' : 'none';
}
function cambiarcapa4(lenguaje){
  document.getElementById('webinar4menos').style.display= (lenguaje=='webinar4menos')? 'block' : 'none';
  document.getElementById('webinar4mas').style.display= (lenguaje=='webinar4mas')? 'block' : 'none';
}
function mostrarocultar(lenguaje){
  document.getElementById('ocultar').style.display= (lenguaje=='ocultar')? 'block' : 'none';
  document.getElementById('mostrar').style.display= (lenguaje=='mostrar')? 'block' : 'none';
}

// validacion del formulario de registro al newsletter

function ValidarEmail(email){
	var arrobas=0;
	var i;
	var pos_arroba=0;
	var pos_punto=0;
	var TienePunto=false;

	for (i=0;i<email.length;i++){
		
		if (email.charAt(i) == "@"){
			 arrobas+=1;
			 pos_arroba=i;
		}
		if (email.charAt(i) == "."){
			TienePunto=true; 
			pos_punto=i;
		}
		
	}
	
	if (TienePunto && arrobas == 1 && (pos_arroba < pos_punto - 1 )) return true;//email valido
	
	return false;
}

function validanewsletteres()
{
	errorChequeo = false;
	
	if (document.loginpq.name.value == ""){
		errorChequeo = true;
		window.alert("Por favor rellena la casilla del nombre");
		document.loginpq.name.focus();
	}
	if (document.loginpq.username.value == ""){
		errorChequeo = true;
		window.alert("Por favor rellena la casilla del eMail");
		document.loginpq.username.focus();
	}
	if (errorChequeo == false && ! ValidarEmail(document.loginpq.username.value)) {
		errorChequeo = true;
		window.alert("Por favor, utiliza una cuenta de eMail v\xe1lida");
		document.loginpq.username.focus();
	}
		if (errorChequeo)
		return(false);
	else
		return(true);
}


function validanewsletteren()
{
	errorChequeo = false;
	
	if (document.loginpq.name.value == ""){
		errorChequeo = true;
		window.alert("Please fill in the name field");
		document.loginpq.name.focus();
	}
	if (document.loginpq.username.value == ""){
		errorChequeo = true;
		window.alert("Please fill in the eMail field");
		document.loginpq.username.focus();
	}
	if (errorChequeo == false && ! ValidarEmail(document.loginpq.username.value)) {
		errorChequeo = true;
		window.alert("Please, fill in with a valid eMail");
		document.loginpq.username.focus();
	}
		if (errorChequeo)
		return(false);
	else
		return(true);
}

// validacion del formulario de registro al primer webinar 

function validate_form ( )
{
	valid = true;

        if ( document.solicitudderegistro.name.value == "" )
        {
                alert ( "Por favor rellena el campo de nombre" );
				solicitudderegistro.name.focus();
                valid = false;
        }
        if ( document.solicitudderegistro.apellidos.value == "" )
        {
                alert ( "Por favor rellena el campo de apellidos" );
				solicitudderegistro.name.focus();
                valid = false;
        }
		        if ( document.solicitudderegistro.email.value == "" )
        {
                alert ( "Por favor rellena campo del email" );
				solicitudderegistro.email.focus();
                valid = false;
        }
		        if ( document.solicitudderegistro.telefono.value == "" )
        {
                alert ( "Por favor rellena el numero de telefono" );
				solicitudderegistro.telefono.focus();
                valid = false;
        }
		        if ( document.solicitudderegistro.empresa.value == "" )
        {
                alert ( "Por favor rellena el nombre de la empresa a la que representas" );
				solicitudderegistro.empresa.focus();
                valid = false;
        }
		        if ( document.solicitudderegistro.cargo.value == "" )
        {
                alert ( "Por favor rellena el cargo que ocupas en tu empresa" );
				solicitudderegistro.cargo.focus();
                valid = false;
        }
		        if ( document.solicitudderegistro.sector.value == "" )
        {
                alert ( "Por favor selecciones el sector" );
				solicitudderegistro.sector.focus();
                valid = false;
        }if ( document.solicitudderegistro.pais.value == "" )
        {
                alert ( "Por favor selecciones el pais" );
				solicitudderegistro.pais.focus();
                valid = false;
        }
        return valid;
}

