<!--
function menu(a){
	$("#m_"+a).css({'color':'#333','background':'url(images/solapa_menu_on.gif) no-repeat'});	
}
function subMenu(a){
	$("#sm_"+a).css({'color':'#ee314d'});	
}
function subMenu2(a){
	$("#sm_"+a).css({'color':'#fcee21', 'font-weight':'bold', 'padding':'0 7px 0 17px'});	
}
function subSubMenu(a){
	$("#ssm_"+a).css({'color':'#ee314d'});		
}
function abreSubMenu(a){
	$("#sub_"+a).slideDown("slow");	
}
$(document).ready(function(){
  $.preloadCssImages();
  $(document).pngFix(); 
  
   /* $("#sm_0").click(function () {
		$("#sm_0").css({'color':'#fcee21', 'font-weight':'bold', 'padding':'0 7px 0 17px'});	
		$("#sm_1").css({'color':'#fff', 'font-weight':'normal', 'padding':'0 15px 0 17px'});	
		
		
		$("#sub_1").slideUp("slow", function(){
				$("#sub_0").slideDown("slow");							   
		});		
		return false;
	});

	$("#sm_1").click(function () {
		$("#sm_1").css({'color':'#fcee21', 'font-weight':'bold', 'padding':'0 7px 0 17px'});	
		$("#sm_0").css({'color':'#fff', 'font-weight':'normal', 'padding':'0 15px 0 17px'});
		
	
		
		$("#sub_0").slideUp("slow", function(){
				$("#sub_1").slideDown("slow");							   
		});		
		return false;
	}); */
}); 
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 validateEmail(addr,man,db) {
if (addr == '' && man) {
   if (db) alert('Debe rellenar la dirección de e-mail');
   return false;
}
if (addr == '') return true;
var invalidChars = '\/\'\\ ";:?!()[]\{\}^|';
for (i=0; i<invalidChars.length; i++) {
   if (addr.indexOf(invalidChars.charAt(i),0) > -1) {
      if (db) alert('Dirección e-mail no correcta');
      return false;
   }
}
for (i=0; i<addr.length; i++) {
   if (addr.charCodeAt(i)>127) {
      if (db) alert("La dirección de e-mail contiene carácteres no ascii.");
      return false;
   }
}

var atPos = addr.indexOf('@',0);
if (atPos == -1) {
   if (db) alert('email address must contain an @');
   return false;
}
if (atPos == 0) {
   if (db) alert('email address must not start with @');
   return false;
}
if (addr.indexOf('@', atPos + 1) > - 1) {
   if (db) alert('email address must contain only one @');
   return false;
}
if (addr.indexOf('.', atPos) == -1) {
   if (db) alert('email address must contain a period in the domain name');
   return false;
}
if (addr.indexOf('@.',0) != -1) {
   if (db) alert('period must not immediately follow @ in email address');
   return false;
}
if (addr.indexOf('.@',0) != -1){
   if (db) alert('period must not immediately precede @ in email address');
   return false;
}
if (addr.indexOf('..',0) != -1) {
   if (db) alert('two periods must not be adjacent in email address');
   return false;
}
var suffix = addr.substring(addr.lastIndexOf('.')+1);
if (suffix.length != 2 && suffix != 'com' && suffix != 'net' && suffix != 'org' && suffix != 'edu' && suffix != 'int' && suffix != 'mil' && suffix != 'gov' & suffix != 'arpa' && suffix != 'biz' && suffix != 'aero' && suffix != 'name' && suffix != 'coop' && suffix != 'info' && suffix != 'pro' && suffix != 'museum') {
   if (db) alert('invalid primary domain in email address');
   return false;
}
return true;
}
//-->