function gid(A){return document.getElementById(A)}function chColor(A,B){A.style.color=B}function chBgColor(A,B){A.style.backgroundColor=B}$(document).ready(function(){$("a.fancybox").fancybox({overlayShow:true,overlayOpacity:0.6})});var PAIS_ESPANIA=73;var SEXO_MUJER=1;var SEXO_HOMBRE=2;var SEXO_INDIFERENTE=3;var SEXO_HOMOSEXUAL=4;var LibUtil={_WindowIds:null};LibUtil.htmlentities=function(F){var E="";var A=F.length;for(var C=0;C<A;C++){var D=F.charAt(C);var B=F.charCodeAt(C);if((B>47&&B<58)||(B>62&&B<127)){E+=D}else{E+="&#"+B+";"}}return E};LibUtil.TraceObject=function(C){var B="";for(var A in C){B+=A+": "+C[A]+"\n"}return B};LibUtil.OpenWindow=function(B,C){var A=window.open(B,"_blank");if(A){if(A.focus){A.focus()}if(LibUtil._WindowIds===null){LibUtil._WindowIds={}}LibUtil._WindowIds[C]=A;return false}A=null;return true};LibUtil.OpenWindowText=function(A,C){LibUtil.OpenWindow("",C);var B=LibUtil._WindowIds[C];B.document.write("<pre style='font-family:courier new; font-size: 8.25pt;'>"+LibUtil.htmlentities(A)+"</pre>");B.document.close()};function AlternarDisplay(A){if(gid(A).style.display!="none"){gid(A).style.display="none"}else{gid(A).style.display="block"}}String.prototype.format=function(){var D=this;var C=arguments.length;for(var A=0;A<C;A++){var B=new RegExp("\\{"+(A)+"\\}","gm");D=D.replace(B,arguments[A])}return D};String.prototype.trim=function(){return(this.replace(new RegExp("^([\\s]+)|([\\s]+)$","gm"),""))};String.prototype.leftTrim=function(){return(this.replace(new RegExp("^[\\s]+","gm"),""))};String.prototype.rightTrim=function(){return(this.replace(new RegExp("[\\s]+$","gm"),""))};function isValidEmail(A){var B=/^[_a-z0-9-]+([_a-z0-9-\.]+)*@[a-z0-9-]+([_a-z0-9-\.]+)*(\.[a-z]{2,3})$/;return B.test(A)}function hasInvalidChars(A){var B=/[^a-zA-Z0-9\-\_\]\[\!\|\¡\¿\?\#]/;return B.test(A)}function daysInMonth(B,A){return 32-new Date(A,B-1,32).getDate()}function Now(){var A=new Date();var B=new Object();B.day=A.getDate();B.month=A.getMonth()+1;B.year=takeYear(A);B.hours=A.getHours();B.minutes=A.getMinutes();B.seconds=A.getSeconds();return B}function EsMayorDeEdad(G,C,E){var D=Now();var F=parseInt(E);var A=parseInt(C);var B=parseInt(G);if(F+18<D.year){return true}if(F+18>D.year){return false}if(A<D.month){return true}if(A>D.month){return false}if(B<=D.day){return true}else{return false}}function disableSelection(A){if(typeof A.onselectstart!="undefined"){A.onselectstart=function(){return false}}else{if(typeof A.style.MozUserSelect!="undefined"){A.style.MozUserSelect="none"}}A.style.cursor="default"}function takeYear(A){x=A.getYear();var B=x%100;B+=(B<38)?2000:1900;return B}function MaskSoloNumeros(A){var C;var B;var D;if(window.event){C=A.keyCode}else{if(A.which){C=A.which}}B=String.fromCharCode(C);D=/[^\d\b]/;return !D.test(B)}function MaskSoloLetras(A){var C;var B;var D;if(window.event){C=A.keyCode}else{if(A.which){C=A.which}}B=String.fromCharCode(C);D=/[\d]/;return !D.test(B)}function cbg(B,A){var C=A;document.getElementById(B)?id=document.getElementById(B):id=B;id.style.backgroundImage="url('"+C+"')"};