<!--
function menu(a){	
	$("#"+a ).css({'background':'#249eff url(/Content/images/bg_menu_a_on.jpg) bottom right no-repeat', 'color':'#fff'});
}
function menuTemas(a){	
	$(".temasMenu a:eq("+a+")" ).css({'background':'url(/Content/images/bg_temas_menu_a.jpg) no-repeat', 'color':'#fff'});
}
function menuComunidad(a){
	mcOld = mc;
	mc = a;
	if(mcOld!=undefined&&mcOld!=mc){
		$("#mc_"+mcOld ).css({'font-weight':'normal', 'color':'#666','background':'none'});		
	}	
	$("#mc_"+mc ).css({'font-weight':'bold', 'color':'#fff','background':'url(/Content/images/mc_'+mc+'.gif) 0px 3px no-repeat'});		
	$('#pf').stop().scrollTo('#mcTxt_'+mc, 600);	
}

function menuForos(a){
	mfOld = mf;
	mf = a;
	if(mfOld!=undefined&&mfOld!=mc){
		$("#mf_"+mcOld ).css({'background':'none'});		
	}	
	$("#mf_"+mf ).css({'background':'#fff'});		
	//$('#pf').stop().scrollTo('#mcTxt_'+mc, 600);	
}

function menuActualidad(a){
	maOld= ma;
	
	ma= a;
	if(maOld!=undefined&&maOld!=ma){
		if(maOld<3){
			$("#ma_"+maOld ).css({'background':'none', 'font-weight':'normal'});		
		}	
		else{
			$("#ma_"+maOld ).css({'background':'url(/Content/images/rss.jpg) 4px 6px no-repeat'});	
		}
	}
	if(ma!=3){
		$("#ma_"+a ).css({'background':'#fff', 'font-weight':'bold'});		
	}
	else{
		$("#ma_"+a ).css({'background':'#fff url(/Content/images/rss.jpg) 4px 6px no-repeat', 'font-weight':'bold'});		
	}
}
var ma;
var maOld;
var mc;
var mcOld;
var mf;
var mfOld;
$(document).ready(function(){
  $.preloadCssImages();
  
   $("a[rel^='prettyPopin']").prettyPopin({
			modal : false, /* true/false */
			width : false, /* false/integer */
			height: false, /* false/integer */
			opacity: 0.7, /* value from 0 to 1 */
			animationSpeed: 'fast', /* slow/medium/fast/integer */
			followScroll: true, /* true/false */
			loader_path: '/Content/images/prettyPopin/loader.gif', /* path to your loading image */
			callback: function(){} /* callback called when closing the popin */
		});
  $(".buscador input:text").click(function () {
      var orden =  $(".buscador input:text").index(this);	
	    $(".buscador input:text:eq("+orden+")").val("");
    });
  $(".registro input:text").click(function () {
      var orden =  $(".registro input:text").index(this);	
	    $(".registro input:text:eq("+orden+")").val("");
    });

	$(".thumbs a").click(function (){
		var orden =$(".thumbs a").index(this);
		$('.foto').stop().scrollTo('#fot_'+orden, 600);	
		$('.texto').stop().scrollTo('#txt_'+orden, 600);
		return false;
   });
	
	$(".menuActualidad a").click(function (){
		var orden =$(".menuActualidad a").index(this);
		if(orden<3){
			$('.txt').stop().scrollTo('#tx_'+orden, 600);	
			menuActualidad(orden);
			return false;
		}		
   });
	$(".menuComunidad a").click(function (){
		var orden =$(".menuComunidad a").index(this);		
		menuComunidad(orden);
		return false;			
   });
	 $(".herramientas a:eq(1)").click(function () {
      $.scrollTo( '#comen_0', 800 );
    });

	$(".herramientas a:eq(2)").click(function () {
      $.scrollTo( '#comen_1', 800 );
    });
	
	$(".herramientas2 a:eq(0)").click(function () {
      $.scrollTo( '#comen_0', 800 );
    });

	$(".herramientas2 a:eq(1)").click(function () {
      $.scrollTo( '#comen_1', 800 );
    });
	
	$(".temas_5 tr").hover(
      function () {		 
		
			  var orden = $(".temas_5 tr").index(this);
			 $(this).css({'color':'#40c100'});
			 $(".temas_5 tr:eq("+orden+") a").css({'color':'#40c100'});
		
      }, 
      function () {
			  var orden = $(".temas_5 tr").index(this);
        	$(this).css({'color':'#666'});
		 	$(".temas_5 tr:eq("+orden+") a").css({'color':'#666'});
      }
    );
	
	$(".temas_8 tr").hover(
      function () {		 
		if($(this).is(".temas_8 tr:has(a)")){
			  var orden = $(".temas_8 tr").index(this);
			 $(this).css({'color':'#40c100'});
			 $(".temas_8 tr:eq("+orden+") a").css({'color':'#40c100'});
		}
		
      }, 
      function () {
		  if($(this).is(".temas_8 tr:has(a)")){
			  var orden = $(".temas_8 tr").index(this);
        	$(this).css({'color':'#666'});
		 	$(".temas_8 tr:eq("+orden+") a").css({'color':'#666'});
		  }
      }
    );
    
    $(".cincoUltimasInt tr").hover(
      function () {		 
		if($(this).is(".cincoUltimasInt tr:has(a)")){
			  var orden = $(".cincoUltimasInt tr").index(this);
			 $(this).css({'color':'#40c100'});
			 $(".cincoUltimasInt tr:eq("+orden+") a").css({'color':'#40c100'});
		}
		
      }, 
      function () {
		  if($(this).is(".cincoUltimasInt tr:has(a)")){
			  var orden = $(".cincoUltimasInt tr").index(this);
        	$(this).css({'color':'#666'});
		 	$(".cincoUltimasInt tr:eq("+orden+") a").css({'color':'#666'});
		  }
      }
    );
}); 
function abrir(a,e,b,c,d){
	if(document.all){var ventanaW=document.body.clientWidth;}
	else{var ventanaW=window.innerWidth}
	if(document.all){var ventanaH=document.body.clientHeight+150;}
	else{var ventanaH=window.innerHeight}
	var w = ventanaW/2;
	w = w-(b/2);
	var h = ventanaH/2;
	h = h-(c/2);
	window.open(a, e, 'width='+b+', height='+c+', top='+h+',left='+w+', scrollbars='+d+', location=0');
}

function validar(formu) {
    var texto = '';
    if (formu.nombre.value == '')
        texto += "- El campo nombre es obligatorio.\n";
    if (formu.Mail.value == '')
        texto += "- El campo email es obligatorio.\n";
    else if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(formu.Mail.value))) {
        texto += "- Formato de email incorrecto.\n";
    }
    if (formu.Comentario.value == '')
        texto += "- El campo comentario es obligatorio.\n";
    if (!formu.acepto[0].checked)
        texto += "- Debe aceptar la pol\u00EDtica de privacidad.\n";
    if (texto != '') {
        alert(texto);
        return false;
    }
    return true;
};

function validarRegistro(formu) {
    var texto = '';
    if (formu.Mail.value == '')
        texto += "- El E-Mail es obligatorio.\n";        
    else if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(formu.Mail.value))) {
        texto += "- Formato de E-Mail incorrecto.\n";
    }
    if (formu.Mail2.value == '')
        texto += "- Debe repetir su E-Mail\n";
    else if (formu.Mail.value != formu.Mail2.value) {
        texto += "- El E-Mail repetido no coincide.\n";
    }
    if (formu.Nombre.value == '')
        texto += "- El campo nombre de usuario es obligatorio.\n";
    if (formu.Contr.value == '')
        texto += "- El campo contrase\xF1a es obligatorio.\n";    
    if (formu.Repetir.value == '')
        texto += "- Debe repetir la contrase\xF1a.\n";   
    else if (formu.Contr.value != formu.Repetir.value)
        texto += "- La contrase\xF1a repetida no coincide.\n";     
    if (formu.Nombre2.value == '')
        texto += "- El campo nombre es obligatorio.\n";     
    if (formu.selectedFecha.value == '' || formu.selectedFecha2.value == '' || formu.Fecha3.value == '')
        texto += "- Debe introducir su fecha de nacimiento.\n";
    if (formu.selectedSexo.value == '')
        texto += "- Seleccione su sexo.\n";
    if (formu.selectedPais.value == '')
        texto += "- Seleccione un pa\u00EDs.\n";
    if (!formu.acepto[0].checked)
        texto += "- Debe aceptar la pol\u00EDtica de privacidad.\n";
    if (texto != '') {
        alert(texto);
        return false;
    }
    return true;
};

function validarVoto(formu) {
    var texto = '';
    marcado=false; 
    var nombre; 
    for(a=0;a<formu.elements.length;a++){ 
        if(formu[a].type=="radio"){ 
            if(nombre!=formu[a].name){ 
                nombre=formu[a].name; 
                for(aa=0;formu[a+aa].name==formu[a].name;aa++){ 
                    if(formu[a+aa].checked){marcado=true}; 
                } 
                if(marcado==false){texto += "- Elija la opci\xF3n que desea votar.\n";} 
         
            } 
        marcado=false; 
        } 
 
    } 
    if (texto != '') {
        alert(texto);
        return false;
    }
    return true;
};

function validarVoto2(formu) {
    var texto = '';
    marcado=false; 
    var nombre; 
    for(a=0;a<formu.elements.length;a++){ 
        if(formu[a].type=="radio"){ 
            if(nombre!=formu[a].name){ 
                nombre=formu[a].name; 
                for(aa=0;formu[a+aa].name==formu[a].name;aa++){ 
                    if(formu[a+aa].checked){marcado=true}; 
                } 
                if(marcado==false){texto += "- Elija la opci\xF3n que desea votar.\n";} 
         
            } 
        marcado=false; 
        } 
 
    } 
    if (texto != '') {
        alert(texto);
        return false;
    }
    return true;
};

function validarCambios(formu) {
    var texto = '';
    if (formu.Mail.value == '')
        texto += "- El E-Mail es obligatorio.\n";        
    else if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(formu.Mail.value))) {
        texto += "- Formato de E-Mail incorrecto.\n";
    }
    if (formu.Mail2.value == '')
        texto += "- Debe repetir su E-Mail\n";
    else if (formu.Mail.value != formu.Mail2.value) {
        texto += "- El E-Mail repetido no coincide.\n";
    }
    if (formu.Nombre.value == '')
        texto += "- El campo nombre de usuario es obligatorio.\n";
    if (formu.Contr.value == '')
        texto += "- El campo contrase\xF1a es obligatorio.\n";    
    if (formu.Repetir.value == '')
        texto += "- Debe repetir la contrase\xF1a.\n";   
    else if (formu.Contr.value != formu.Repetir.value)
        texto += "- La contrase\xF1a repetida no coincide.\n";     
    if (formu.Nombre2.value == '')
        texto += "- El campo nombre es obligatorio.\n";     
    if (formu.selectedFecha.value == '' || formu.selectedFecha2.value == '' || formu.Fecha3.value == '')
        texto += "- Debe introducir su fecha de nacimiento.\n";
    if (formu.selectedSexo.value == '')
        texto += "- Seleccione su sexo.\n";
    if (formu.selectedPais.value == '')
        texto += "- Seleccione un pa\u00EDs.\n";
    if (texto != '') {
        alert(texto);
        return false;
    }
    return true;
};

function validarRecuperar(formu)
{
    var texto = '';
    if (formu.Nick.value == '')
        texto += "- Introduzca su nombre de usuario.\n";
    if (texto != '') {
        alert(texto);
        return false;
    }
    return true;
}

function validarBaja(formu)
{
    var texto = '';
    if (formu.Email.value == '')
        texto += "- Introduzca su e-mail.\n";
    if (formu.Pass.value == '')
        texto += "- Introduzca su contrase\xF1a.\n";
    if (texto != '') {
        alert(texto);
        return false;
    }
    return true;
}

//-->