<!--
function menu(a){	
	$("#"+a ).css({'color':'#000','background':'url(/Content/images/menu_a.png) 0px 6px no-repeat'});
}
function menu2(a){	
	$("#"+a ).css({'color':'#000','background':'url(/Content/images/bg_menu_on2.jpg) 0px 6px no-repeat'});
}

function subMenu(a){	
	$("#"+a ).css({'color':'#fff','background':'url(/Content/images/flecha_blanca.gif) 0px 2px no-repeat','padding':'0 0 0 21px'});
}

/*$(window).load(function(){
 
	
}); */
$(document).ready(function(){
 	$.preloadCssImages();
	
	$(function() { 
   		$("a[rel]").overlay({ 
			target: '#htmlgallery',
			expose: '#36382b', 
			
	 		onBeforeLoad: function() { 
				// grab wrapper element inside content 
				var wrap = this.getContent().find(".contentWrap"); 
				// load the page specified in the trigger 
				wrap.load(this.getTrigger().attr("href")); 
			} 
 
		}); 
	});
}); 

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 validarContacto(formu) {
    var texto = '';
    if (formu.uxNombre.value == '')
        texto += "- El campo nombre es obligatorio.\n";
    if (formu.uxMail.value == '')
        texto += "- El campo email es obligatorio.\n";
    else if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(formu.uxMail.value))) {
        texto += "- Formato de email incorrecto.\n";
    }
    if (formu.uxTelefono.value == '')
        texto += "- El campo telefono es obligatorio.\n";
    if (formu.uxComentarios.value == '')
        texto += "- El campo comentario es obligatorio.\n";
    if (!formu.uxChkAcepto.checked)
        texto += "- Debe aceptar la pol\u00EDtica de privacidad.\n";
    if (texto != '') {
        alert(texto);
        return false;
    }
    return true;
};

function validarComentarioBlog(formu) {
    var texto = '';
    if (formu.uxComentario.value == '')
        texto += "- Introduzca el comentario que desee realizar.\n";
    if (texto != '') {
        alert(texto);
        return false;
    }
    return true;
}

function validarBusquedaAsoc(formu) {
    var texto = '';
    if (formu.buscar.value == '')
        texto += "- Introduzca el nombre por el que desee buscar.\n";
    if (texto != '') {
        alert(texto);
        return false;
    }
    return true;
}

function validarAcceso(formu) {
    var texto = '';
    if (formu.uxUsuario.value == '' || formu.uxUsuario.value == 'usuario')
        texto += "- Introduzca su usuario.\n";        
    if (formu.uxContrasena.value == '' || formu.uxContrasena.value == 'contrasena')
        texto += "- Introduzca su contrase\xF1a.\n";
    if (texto != '') {
        alert(texto);
        return false;
    }
    return true;
}

function validarNuevoTema(formu) {
    var texto = '';
    if (formu.uxTitulo.value == '')
        texto += "- Introduzca un t\u00EDtulo.\n";        
    if (formu.uxTema.value == '')
        texto += "- Introduzca el texto del tema.\n";
    if (texto != '') {
        alert(texto);
        return false;
    }
    return true;
}

function validarComentarioForo(formu) {
    var texto = '';
    if (formu.uxComentario.value == '')
        texto += "- Introduzca la respuesta que desee realizar.\n";
    if (texto != '') {
        alert(texto);
        return false;
    }
    return true;
}

//-->
