	var fontSize = "2";
	function tamanoFuente(tamano){
			switch (tamano){
				case "1": 
					cambiaTamano ('tamfont1', '22', '24');
					cambiaTamano ('tamfont2', '12', '16');
					cambiaTamano ('tamfont3', '10', '16');
					fontSize = "1";
				break;
					case "2": 
					cambiaTamano ('tamfont1', '24', '30');
					cambiaTamano ('tamfont2', '14', '22');
					cambiaTamano ('tamfont3', '12', '20');
					fontSize = "2";
				break;
					case "3": 
					cambiaTamano ('tamfont1', '26', '32');
					cambiaTamano ('tamfont2', '18', '30');
					cambiaTamano ('tamfont3', '16', '30');
					fontSize = "3";
				break;
				default : alert("error 10.1");
			}
	}
	
	function cambiaTamano (elemento, fuente, linea) {
		var obj=document.getElementsByName(elemento);
		for(var i=0;i<obj.length;i++){
			obj[i].style.fontSize=fuente+"px";
			obj[i].style.lineHeight=linea+"px";
		}
	}

	function MuestraTexto(texto) {
		if (document.layers){
			document.layers.textoIconos.document.write(texto);
			document.layers.textoIconos.document.close();
		}else if (document.all) {
			textoIconos.innerHTML=texto;
		}else if (document.getElementById) {
			document.getElementById("textoIconos").innerHTML=texto;
		} 
	}
	
	function MuestraTextoIdiomas(texto) {
		if (document.layers){
			document.layers.textoIdiomas.document.write(texto);
			document.layers.textoIdiomas.document.close();
		}else if (document.all) {
			textoIdiomas.innerHTML=texto;
		}else if (document.getElementById) {
			document.getElementById("textoIdiomas").innerHTML=texto;
		} 
	}
	
	function imprimeDocumento(documento) {
		window.open(documento+'?fz='+fontSize);
	}
	
	function abrePdf(documento) {
		window.open("pdf/generarPDF.aspx?url="+documento+'?fz='+fontSize);
	}
	
	function comprobaCampo(campo) { 
		 if(campo.value=="") { 
		  campo.value=campo.defaultValue; 
		 }
	}
	
	function borraCampo(campo) { 
		if (campo.value==campo.defaultValue) { 
		  campo.value=""; 
		} 
	}
function ValidaDatos(){
     var Nombre       = document.formContactar.Nombre.value;
     var lNombre      = Nombre.length;
     var Email        = document.formContactar.EMail.value;
     var lEmail       = Email.length;    
	 var Consulta     = document.formContactar.Comentarios.value;
     var lConsulta    = Consulta.length;
     var ok = true;
     var cnt = 0;

     if (lNombre==0){
		alert ("Debe introducir el nombre");
      	document.getElementById('Nombre').style.backgroundColor = '#ffff00';
		return false;
	 } else {
		 	document.getElementById('Nombre').style.backgroundColor = '';
     }
     if (lEmail==0){
		alert ("Debe introducir un correo electr\ónico");
		document.getElementById('EMail').style.backgroundColor = '#ffff00';
		return false;
     }

    for (var i=0; i<lEmail; i++){
       var oneChar = Email.charAt(i);
       if (oneChar == '@'){
			if (cnt == 0){
				cnt++;
				document.getElementById('EMail').style.backgroundColor = '';
			} else{
				alert ("¡Direcci\ón de correo electr\ónico Inv\álida!");
				document.getElementById('EMail').style.backgroundColor = '#ffff00';
				return false;
			}
		} 
	}

    if (!cnt){
       alert ("¡Direcci\ón de correo electr\ónico Inv\álida!");
	   document.getElementById('EMail').style.backgroundColor = '#ffff00';
       return false;
    } else {
		document.getElementById('EMail').style.backgroundColor = '';
	}
	 
	 
	if (lConsulta==0){
		alert ("Debe introducir una consulta v\álida.");
		document.getElementById('Comentarios').style.backgroundColor = '#ffff00';
		return false;
	}

	return true;
}

function ValidaCurriculum() {
     var Nombre       = document.formContactar.Nombre.value;
     var lNombre      = Nombre.length;
     var Email        = document.formContactar.EMail.value;
     var lEmail       = Email.length;    
	 var Telefono     = document.formContactar.Telefono.value;
	 var Curriculum     = document.formContactar.Curriculum.value;
     var ok = true;
     var cnt = 0;
	document.getElementById('Nombre').style.backgroundColor = '';
	document.getElementById('EMail').style.backgroundColor = '';
	document.getElementById('Telefono').style.backgroundColor = '';
	document.getElementById('Curriculum').style.backgroundColor = '';


     if (lNombre==0){
		alert ("Debe introducir el nombre");
      	document.getElementById('Nombre').style.backgroundColor = '#ffff00';
		return false;
	 }
     if (lEmail==0){
		alert ("Debe introducir un correo electr\ónico");
		document.getElementById('EMail').style.backgroundColor = '#ffff00';
		return false;
     }

    for (var i=0; i<lEmail; i++){
       var oneChar = Email.charAt(i);
       if (oneChar == '@'){
			if (cnt == 0){
				cnt++;
				document.getElementById('EMail').style.backgroundColor = '';
			} else{
				alert ("¡Direcci\ón de correo electr\ónico Inv\álida!");
				document.getElementById('EMail').style.backgroundColor = '#ffff00';
				return false;
			}
		} 
	}

    if (!cnt){
       alert ("¡Direcci\ón de correo electr\ónico Inv\álida!");
	   document.getElementById('EMail').style.backgroundColor = '#ffff00';
       return false;
    } else {
		document.getElementById('EMail').style.backgroundColor = '';
	}
	 
	 
	if (Telefono.length < 9){
		alert ("El tel\éfono es necesario y debe ir con su prefijo");
		document.getElementById('Telefono').style.backgroundColor = '#ffff00';
		return false;
	}
		if (Curriculum.length < 4){
		alert ("El curr\ículum es imprescindible");
		document.getElementById('Curriculum').style.backgroundColor = '#ffff00';
		return false;
	}
	var lista_extensions = ".txt,.doc,.pdf,.zip,.rar" ;
	var aux = lista_extensions.split (",") ;
	var control = 0 ;
	for (i in aux) {
		if ((control = Curriculum.lastIndexOf (aux[i])) > 0) {
			if (Curriculum.length == (control + 4)) {
				control = 1;
				break ;
			} else {
				control = 0 ;
			}
		}
	}
	if (control != 1) {
		alert ("S\ólo se pueden subir archivos con las siguientes extensiones: txt, doc, pdf, zip y rar") ;		
		return false;
	}
	return true;
}