
function marcarSeccion(seccion){
	
		document.getElementById(seccion).id= "seccion_actual";
}



function enviarAmigo(pagina, nom_pagina) {
		window.open("enviarAmigo.php?dir="+pagina+"&nom="+nom_pagina,"Enviar",'width=510,height=290,resizable=yes');
}


function subscribeNoticias() {
		window.open("suscribeNoticias.php","Noticias",'width=510,height=290,resizable=yes');
}


	function validar_envio(){
	
	  var em =/^[\w\.-]+@([\w-]+\.)+(\w){2,3}$/;
		form = document.envio;


		if (form.mail1.value=="" || form.mail1.value == "Tú dirección de correo electrónico"){
			alert("Debes indicar tu dirección de correo electrónico.");
			return false;
		}	
		else if(form.mail1.value!="" && form.mail1.value!="Tú dirección de correo electrónico"){
					if(em.test(form.mail1.value)==false) {
					alert("Tu dirección de correo electrónico no presenta un formato correcto.\nPor favor introduce un correo válido.");
					return false;
					}				
		}		
		
		if (form.mail2.value=="" || form.mail2.value == "Dirección de correo electrónico de destino"){
					alert("Debes indicar una dirección de correo electrónico del destinatario.");						
					return false;
		}	
		else if(form.mail2.value!="" && form.mail1.value!="Dirección de correo electrónico de destino"){
					if(em.test(form.mail2.value)==false) {
						alert("La dirección de correo electrónico del destinatario no presenta un formato correcto.\nPor favor introduce un correo válido.");							
						return false;
					}				
		}			
		
	
		return true; 
		 
	}


function validar_envio_noticias(){
	  var em =/^[\w\.-]+@([\w-]+\.)+(\w){2,3}$/;
		form = document.envio;


		if (form.mail1.value=="" || form.mail1.value=="Dirección de correo a la que se recibirán los boletines"){
			alert("Debes indicar tu dirección de correo electrónico.");
			return false;
		}	
		else if(form.mail1.value!="" && form.mail1.value!="Dirección de correo a la que se recibirán los boletines"){
					if(em.test(form.mail1.value)==false) {
					alert("Tu dirección de correo electrónico no presenta un formato correcto.\nPor favor introduce un correo válido.");
					return false;
					}				
		}		
		
	
		return true; 	
}

function compruebaEnvioBlog(){
	  var em =/^[\w\.-]+@([\w-]+\.)+(\w){2,3}$/;
		form = document.anyadir_comentario;
		

		if(form.nombre.value=="" || form.nombre.value=="Nombre" ){
				alert("El campo NOMBRE está vacio. Debes completar este campo");
				return false;
		}
		
		if(form.mail.value=="" || form.mail.value=="E-mail"){
				alert("El campo E-MAIL está vacio. Debes completar este campo");
				return false;
		}
		else if(em.test(form.mail.value)==false){
				alert("La dirección de correo electrónico no presenta un formato corrrecto.\nPor favor introduce un correo válido.");
				return false;
		}
		
		if(form.comentario_blog.value=="" || form.comentario_blog.value=="Deja tu comentario"){
				alert("El campo COMENTARIO está vacio. Debes completar este campo");
				return false;			
		}
	}
	
	
function validarDatosContacto(){
	form = document.registro;
  var em  = /^[\w\.-]+@([\w-]+\.)+(\w){2,3}$/;
	var num =	/^(\d)+$/;	
	
	if(form.nombre.value == "" || form.nombre.value == "Introduce tu nombre"){
			alert("El campo NOMBRE está vacio. Debes completar este campo");
			return false;		
	}


	
	if(form.email.value == ""  || form.email.value == "Dirección de correo electrónico"){
			alert("El campo E-MAIL está vacio. Debes completar este campo");
			return false;		
	}else if(em.test(form.email.value)==false){
			alert("La dirección de correo electrónico no presenta un formato corrrecto.\nPor favor introduce un correo válido.");
			return false;
	}			
	
	if(form.comentarios_contacto.value == "" || form.comentarios_contacto.value == "Deja tu comentario" ){
			alert("El campo COMENTARIOS está vacio. Debes completar este campo");
			return false;		
	}	
	

			

 if (form.acepta_legal.checked==false){
	 	alert("Debe leer y aceptar la política de privacidad de la Fundación OVSI, para continuar con el registro.");
		return false;
 }	
 
 
}

function graphicsb_data1()
{
    /*---------------------------------------------
    Scroll Bar Images
    ---------------------------------------------*/
	this.up_button = "img/sample2_up.gif";                                          //image path and name only
	this.up_button_roll = "img/sample2_up_roll.gif";                                //image path and name only
	this.down_button = "img/sample2_down.gif";                                      //image path and name only
	this.down_button_roll = "img/sample2_down_roll.gif";                            //image path and name only

	this.slider_tile_bg_style = "background-image:url(img/sample2_slider_bg.gif);"  //image defined as CSS style

	this.bubble_top_cap = "img/sample2_bubble_topcap.gif,2";                        //image path and name, height - (width is automatically set to scroll bar width)
	this.bubble_bottom_cap = "img/sample2_bubble_bottomcap.gif,2";                  //image path and name, height - ""
	this.bubble_center = "img/sample2_bubble_center.gif,7";                         //image path and name, height - ""
	this.bubble_tile_bg_style = "img/sample2_bubble_bg.gif";                        //image path and name only

    /*---------------------------------------------
    Scroll Bar Container and Content
    ---------------------------------------------*/

	this.container_width = 450
	this.container_height = 100

	this.container_bg_color = "";

	this.content_padding = 7;
	this.content_styles = "font-family:Arial;font-weight:normal;font-size:0.9em; line-height:18px; color:##5F5D5C; ";
	this.content_class_name = "";

    /*---------------------------------------------
    Scroll Bar Behaviour and Width
    ---------------------------------------------*/

	this.scroll_bar_width = 9                     //The width of the bar in pixels.
	this.scroll_increment = 10                     //The distance to scroll when clicking the up or down buttons.


	this.allow_hover_scroll = true;                //Auto scroll while hovering over top and bottom buttons.
	this.hover_scroll_delay = 70;                   //Milliseconds (1/1000 second)


	this.use_hand_cursor = true;

}
