i_core_nVersion=0.942;function FunCaller(a,b,c){var d,e="";if(!ICore.m_bIsServer&&!oIGZ.m_bIE)return e;var f=arguments;if(!b)f=f.caller;a||(a=-1);for(f=f.caller;f!=null;f=f.caller){d=f.callee.toString().match(/function (.*\))/);if(d!=null&&d.length!=0)if(c)e+="\n < "+d[1];else e="\n > "+d[1]+e;if(f.caller==f||!a)break;else--a}return e+"\n"}function funcname(a){a=a.toString().match(/function (\w*)/)[1];if(a==null||a.length==0)return"anonymous";return a}
function stacktrace(){for(var a="",b=arguments.caller;b!=null;b=b.caller){a+="->"+funcname(b.callee)+"\n";if(b.caller==b){a+="*";break}}return a}function IsNull(a,b){return a==null&&!(b&&IsUndefined(a))?1:0}function IsUndefined(a){return typeof a=="undefined"?1:0}function IsMArrays(a){return IsMArray(a)||IsMArrayOld(a)}function IsMArray(a){return a&&a.m_sObj&&a.m_sObj.indexOf("[NotAnObject] MArray_instance_")!=-1?1:0}
function IsMArrayOld(a){var b=false;if(IsArray(a)&&a.length==2&&IsArray(a[0])&&IsArray(a[1]))b=true;return b}function Random(a){return Math.ceil(Math.random()*a)}
function DebugObj(a,b,c,d,e){var f,g,i,h;if(IsNull(a))return"null";c||(c="");b||(b=50);ICore.m_bIsServer&&Response.write("<B>- - - - - - DebugObj - "+ICore.f_getVersion()+"</B><BR />");var j=[];if(IsArray(a))for(f=0;f<a.length;f++)j.push(f+".["+a[f]+"] ("+typeof a[f]+")");else{for(f in a){if(!d&&f){g=a[f];i=g+" ("+typeof g+")";if(typeof g=="function"){h=g.toString();g=h.indexOf("{");if(g!=-1)i=h.substring(0,g)}}f.indexOf(c)!=-1&&j.push(f+" = "+i);i=""}j.sort()}i="";if(a.m_sKeyName)i+=a.m_sKeyName;
else if(a.m_sObj)i+=a.m_sObj;if(a.m_nVersion)i+=" [v"+a.m_nVersion+"]";i+=" ("+j.length+" propiedades)\n";for(f=a=0;f<j.length;f++){a++;if(a>=b){a=0;if(ICore.m_bIsServer)Response.write(i+"<BR />");else if(e)i+="\n";else{alert(i);i=""}}i+=j[f]+"";i+=ICore.m_bIsServer?"<BR />":"\t"}ICore.m_bIsServer&&Response.write("<HR><BR /><BR />");return i}OBJECT=new function(){this.f_indexOf=function(a,b){var c=-1,d=-1;for(obj_param in a){d++;if(obj_param==b){c=d;break}}return c}};
Number.prototype.f_formatNumber=function(a){var b="",c,d="",e="";if(IsNull(a))a=ICore.m_sNumberFormat;c=a.toLowerCase().lastIndexOf("i");if(c!=-1&&c+2<a.length)e=a.charAt(c+1);if(e=="")c=Math.floor(Math.round(this));else{c=Math.floor(Math.abs(this));var f=this.toString(),g=a.f_countMatches("D"),i=0,h=f.indexOf(".");if(h!=-1)i=f.length-(h+1);if(g||i){h=a.f_countMatches("d",1);if(i>h){f=this*Math.pow(10,h);f=(Math.round(f)*Math.pow(0.1,h)).toString();i=f.indexOf(".");c=f.substr(0,Math.max(1,i));if(i==
-1)f="";else{f=f.substr(1+i,h);f=f.replace(RegExp("0*$","g"),"")}i=f.length}else f=f.substring(f.length-i);if(i<g)f+="0000000000".substring(0,g-i);if(f)b=e+f}}e=c.toString();if(a.f_indexOf("i",0,1)==1)d=a.charAt(0);if(d!=""){for(a="";e.length>3;){a=d+e.substring(e.length-3,e.length)+a;e=e.substring(0,e.length-3)}e+=a}if(this<0&&c>0)e="-"+e;return e+b};Number.prototype.f_toNumber=function(){return this};Number.prototype.m_a_vNumberFormats=["IMPORTE",".I,DD","EUR",".I,ddd","USA",",I.ddd"];
Number.prototype.f_parse2Format=function(a){var b=Number(this);a=this.m_a_vNumberFormats.f_indexOf(a);return b=this.f_formatNumber(a!=-1?this.m_a_vNumberFormats[a+1]:"")};Number.prototype.f_range=function(a,b){var c=1;if(a){if(typeof a=="string")a=a.f_toNumber();if(this<a)c=0}if(c&&b){if(typeof b=="string")b=b.f_toNumber();if(this>b)c=0}return c};
String.prototype.f_addLinks=function(a,b,c){a||(a=["http://"]);c||(c="");b||(b="<A href='$1' "+c+">$1</A>");c=this;for(var d=0;d<a.length;d++)c=c.replace(RegExp("(\\b"+a[d]+"[^ <]+\\b)","g"),b);return c};String.prototype.f_formatNumber=function(a,b,c){b=this.f_toNumber(b,"-");if(isNaN(b)&&!IsUndefined(c))sNum=c;else{if(isNaN(b))b=0;sNum=b.f_formatNumber(a)}return sNum};
String.prototype.f_toNumber=function(a,b){var c=this;if(this.length==0)c=b?b:"0";var d="",e="";if(IsNull(a)||!a)a=this.f_findFormat();if(a.f_indexOf("i",0,1)==1)d=a.charAt(0);var f=a.toLowerCase().lastIndexOf("i");if(f!=-1&&f+1!=a.length)e=a.charAt(f+1);if(d!="")c=c.f_replace(d,"");if(e==",")c=c.f_replace(e,".");return parseFloat(c)};
String.prototype.f_findFormat=function(){var a=RegExp(".*\\..*,.*","gi");if(a.exec(this))return".I,";a=RegExp(".*,.*\\..*","gi");if(a.exec(this))return",I.";a=RegExp(",","gi");if(a=this.match(a))return a.length>1?",I.":"I,";a=RegExp("\\.","gi");if((a=this.match(a))&&a.length>1)return".I,";return"I."};String.prototype.f_getMaxString=function(a,b,c,d){return this.f_maxLength(a,b,c,d)};
String.prototype.f_maxLength=function(a,b,c,d){var e=this;if(d)e=e.replace(/<(?:.*?\s*)?>/g,"");if(e.length>=a){e=e.substring(0,a);if(c)if(a=RegExp(".*[^a-z0-9_áéíóúñ]","gi").exec(e))e=a;IsNull(b)||(e+=b)}return e};String.prototype.f_removeHtmlTags=function(a){if(a){b=this.replace(RegExp("<"+a+"[^>]*>","gi"),"");b=b.replace(RegExp("</"+a+">","gi"),"")}else var b=this.replace(/<(?:.*?\s*)?>/g,"");return b};
String.prototype.f_countMatches=function(a,b,c){var d=this,e=0,f="g";if(b)f+="i";if(c)d=d.substr(c);if(a.indexOf(".")!=-1)a=a.replace(".","\\.");if(a=d.match(RegExp(a,f)))e=a.length;return e};String.prototype.f_indexOf=function(a,b,c,d,e){var f=-1,g=this,i="g";if(c)i+="i";if(b)g=g.substr(b);else b=0;d||(d=1);if(e)g=g.f_removeAcentos();for(c=RegExp(a,i);(a=c.exec(g))!=null&&--d;);if(a)f=a.index+b;return f};
String.prototype.m_a_vTextFormats=["TEXT",[String.fromCharCode(92),"\r","\n","'",'"',"/","",""],"HTML",["&#92;","","<BR />","'",'"',"/","<",">"],"JS",[String.fromCharCode(92,92),"\\r","\\n","\\'",'\\"',"\\/","",""],"JSHTML",[String.fromCharCode(92,92),"","<BR />","\\'",'\\"',"\\/","",""],"SQL",[String.fromCharCode(92),"\r","\n","''",'"',"/","",""],"HTMLTEXT",["&#92;","","\n","'",'"',"/","&lt;","&gt;"]];
String.prototype.f_parse2Format=function(a,b){var c=String(this),d=this.m_a_vTextFormats.f_indexOf(a),e=this.m_a_vTextFormats.f_indexOf(b);d=this.m_a_vTextFormats[d+1];e=this.m_a_vTextFormats[e+1];for(var f=0;f<d.length;f++)if(d[f])c=c.f_replace(d[f],e[f]);return c};
String.prototype.f_removeAcentos=function(){for(var a=this,b=["/[á]/g","/[é]/g","/[í]/g","/[ó]/g","/[úü]/g","/[Á]/g","/[É]/g","/[Í]/g","/[Ó]/g","/[ÚÜ]/g"],c=["a","e","i","o","u","A","E","I","O","U"],d=0;d<b.length;d++)a=a.replace(eval(b[d]),c[d]);return a};
String.prototype.f_replace=function(a,b,c,d,e,f){if(c==3){c=0;f=1}a||(d=1);d||(d=0);c||(c=0);var g,i=this;if(b==null)b="";var h="",j=a.length,l=b.length;if(f){a=a.toUpperCase();e=i.toUpperCase().indexOf(a,e)}else e=this.indexOf(a,e);for(var k=0;e!=-1&&++k<1E3;){g=e;if(c==0)g+=j;if(c==2){e+=j;g+=j}if(f){h=b.f_replace("<SEARCH />",i.substring(e,e+j));l=h.length;i=i.substr(0,e)+h+i.substr(g)}else i=i.substr(0,e)+b+i.substr(g);if(d)e=-1;else{e+=l;if(c==1)e+=j;e=f?i.toUpperCase().indexOf(a,e):i.indexOf(a,
e)}}return i};String.prototype.f_compare=function(a,b,c){var d=new String(this);if(!c){d=d.f_removeAcentos();a=a.f_removeAcentos()}if(!b){d=d.toLowerCase();a=a.toLowerCase()}return d==a?0:d<a?-1:1};String.prototype.f_trim=function(a,b){var c,d;a||(c="\\s");b||(d="\\s");return this.f_trimString(c,d,null,"g")};
String.prototype.f_trimString=function(a,b,c,d){var e=this;if(IsNull(d))d="g";if(a){a=RegExp("^"+a+"*",d);e=e.replace(a,"")}if(b){a=RegExp(b+"*$",d);e=e.replace(a,"")}if(c){a=RegExp(c+"*",d);e=e.replace(a,"")}return e};String.prototype.f_getHexCode=function(){for(var a="",b,c=0,d=this.length;c<d;c++){b=this.charCodeAt(c);b=b.toString(16);a+=b}return a};Array.prototype.f_replace=function(a,b,c,d,e,f){for(var g=[],i=0,h=this.length;i<h;i++)g.push(String(this[i]).f_replace(a,b,c,d,e,f));return g};
Array.prototype.f_add=function(a,b){var c;c=this.length;IsArray(a)||(a=[a]);var d=a.length;if(b>=0)for(c=c;c>b;c--)this[c+d]=this[c];else b=c;for(c=0;c<d;c++)this[b+c]=a[c]};Array.prototype.f_move=function(a,b){if(a!=null){var c=this[a],d=this.f_delete(a,1);return d=d.f_insert(c,b)}};Array.prototype.f_addArguments=function(){for(var a=0;a<arguments.length;a++)this[this.length]=arguments[a]};
Array.prototype.f_avg=function(){for(var a=0,b=0,c=0;c<this.length;c++){a+=Number(this[c]);this[c]!=""&&b++}if(b!=0)b=a/b;return b};Array.prototype.f_copy=function(){if(IsArray(this))return this.concat()};Array.prototype.f_countMatches=function(a,b,c,d,e){var f,g=this.length;if(c)a=a.toLowerCase();var i=0;e||(e=0);for(e=e;e<g;e++){if(b)eval("vValueC=this[f]."+b);else f=this[e];if(c)f=f.toLowerCase();if(d)f.indexOf(a)!=-1&&i++;else f==a&&i++}return i};
Array.prototype.f_delete=function(a,b){if(IsArray(this)){b||(b=this.length-a);var c=this.slice(0,a),d=this.slice(a+b);return c.concat(d)}};Array.prototype.f_getMax=function(){return[].concat(this).sort(OrdenNumerico).reverse()[0]};Array.prototype.f_getMin=function(){return[].concat(this).sort(OrdenNumerico)[0]};Array.prototype.f_getVal=function(a){var b="";if(!isNaN(a)&&a<this.length)b=this[a];return b};
Array.prototype.f_getVals=function(a){IsArray(a)||(a=[a]);for(var b,c=[],d=0;d<a.length;d++){b=a[d];!isNaN(b)&&b<this.length&&c.push(this[b])}return c};
Array.prototype.f_indexOf=function(a,b,c,d,e,f,g){var i,h=-1;if(a==null)return h;a=a.toString();e||(e=0);e=e;var j=this.length;if(c)a=a.toLowerCase();if(g)a=a.f_removeAcentos();for(;e<j&&h<0;){if(b)eval("vValueC=this[f]."+b);else{if(String(this[e])=="undefined")break;i=this[e]}i=i.toString();if(d){if(i.f_indexOf(a,f,c,0,g)!=-1)h=e}else{if(c)i=i.toLowerCase();if(f)i=i.substr(f);if(g)i=i.f_removeAcentos();if(i==a)h=e}e++}return h};
Array.prototype.f_indexOfVal=function(a,b,c){c=c==0||c?c:"";a=this.f_indexOf(a);if(a!=-1)c=this[a+b];return c};Array.prototype.f_insert=function(a,b){if(IsArray(this)){var c,d=[];if(b==null)c=this;else{c=this.slice(0,b);d=this.slice(b)}return c.concat(a,d)}};Array.prototype.f_setVals=function(a,b){for(var c=a,d=0;d<this.length;d++){if(b==1)c=a+this[d];if(b==2)c=this[d]+a;this[d]=c}};
Array.prototype.f_sort=function(a,b,c,d){if(IsArray(this)){var e=0,f,g;g=0;var i=this.length;if(i==0)return this;var h=[];h=h.concat(this);var j=i.toString().length;if(c==null||c==""){for(c=0;c==0&&e<i;){f=h[e++];if(!IsNull(f)&&isNaN(f)&&f!=""){f=f.toString().replace(/[,]/g,".");if(f!=parseFloat(f))c=1}else g=1}if(!IsNull(f)&&isNaN(f)){var l="D/M/Y h:m",k="nYYYYnMMnDDnHH24nMMN";if(f.length<=10){l="D/M/Y";k="nYYYYnMMnDD";if(f.indexOf("/")==4)l="Y/M/D"}else if(f.f_countMatches(":")==2)l="D/M/Y h:m:s";
e=f.f_toDate(l);if(GetType(e)==Date){for(e=0;e<i;e++)h[e]=h[e].toString().f_toDateDraw(l,k);c=2}}}if(isNaN(c)||c==0&&g)for(e=0;e<i;){f=h[e++];if(f!=0&&(f==""||IsNull(f)))h[e-1]=-999999999}for(e=0;e<i;e++){f=e.toString();g=f.length;h[e]=h[e]+""+"000000".substring(0,j-g)+f}switch(c){case 1:for(e=0;e<i;e++){d||(h[e]=h[e].toLowerCase());h[e]=h[e].f_removeAcentos()}h.sort();break;case 2:h.sort();break;default:h.sort(OrdenNumerico)}c=[];if(a)for(e=0;e<i;e++){f=h[e];c[e]=parseInt(f.substr(f.length-j),10)}else for(e=
0;e<i;e++){f=h[e];c[e]=this[parseInt(f.substr(f.length-j),10)]}b&&c.reverse();return c}};function OrdenNumerico(a,b){if(parseFloat(a)==parseFloat(b))return 0;if(parseFloat(a)<parseFloat(b))return-1;return 1}
Array.prototype.f_subCompare=function(a,b,c,d,e){for(var f=0,g=[],i=[],h=0;h<this.length;h++)if(a.f_indexOf(this[h],0,d)==-1){if(!b){g[f]=this[h];i[f++]=h}}else if(b){g[f]=this[h];i[f++]=h}if(!b&&e)for(h=0;h<a.length;h++)if(this.f_indexOf(a[h],0,d)==-1){g[f]=a[h];i[f++]=h}if(g.length>1)g=g.f_sort();if(c)g=i;return g};Array.prototype.f_subDelete=function(a){return this.f_subIndexOf(a,0,0,0,0,0,0,1)};
Array.prototype.f_subDistinct=function(a,b,c,d){for(var e=0,f=0,g=[],i=[],h=[],j=[],l=0;l<this.length;l++)if(g.f_indexOf(this[l],0,b)==-1){g[e]=this[l];i[e++]=l}else{h[f]=this[l];j[f++]=l}if(c){g=h;if(a)g=j}else if(a)g=i;if(!d&&!a)g=g.f_sort();return g};
Array.prototype.f_subIndexOf=function(a,b,c,d,e,f,g,i){var h,j,l,k=[],m=0;a=String(a);f||(f=0);for(f=f;f<this.length;f++){h=String(this[f]);if(d)l=h.f_indexOf(a,g,!c);else{j=h;if(!c){a=a.toUpperCase();j=j.toUpperCase()}if(!e){a=a.f_removeAcentos();j=j.f_removeAcentos()}l=-1;if(j==a)l=1}if(l!=-1^i){if(b)h=f;k[m++]=h}}return k};Array.prototype.f_suma=function(){for(var a,b=0,c=0;c<this.length;c++){a=Number(this[c]);isNaN(a)||(b+=a)}return b};
Array.prototype.f_addElements=function(){for(var a=IsArray(arguments[0])?arguments[0]:arguments,b=0;b<a.length;b++)this[this.length]=a[b]};Array.prototype.f_cmpElements=function(a,b,c,d){return this.f_subCompare(a,b,c,d)};Array.prototype.f_delOfArray=function(a,b){return this.f_delete(a,b)};Array.prototype.f_getColIf=function(a,b,c,d,e){return this.f_subIndexOf(a,1,!b,c,0,d,e)};Array.prototype.f_getDistinct=function(a,b){return this.f_subDistinct(a,b)};Array.prototype.f_getValFromIndex=function(a){return this.f_getVals(a)};
Array.prototype.f_subVal=function(a){return this.f_getVals(a)};Array.prototype.f_addColEXML=function(a,b){IsMArrays(this)&&oIEXML.f_addColEXML(this,a,b)};Array.prototype.f_modColEXML=function(a,b){IsMArrays(this)&&oIEXML.f_modColEXML(this,a,b)};Array.prototype.f_maAddCol=function(a,b){if(IsMArrays(this)){var c=this[0].length,d=this[1].length-1,e=this.f_maGetRegs();this[0].f_addElements(a);var f=d+e;for(e=e;e>0;e--){this[1][f--]=b;if(e>1)for(var g=0;g<c;g++)this[1][f--]=this[1][d--]}}};
Array.prototype.f_maCopyCols=function(a,b,c,d){if(IsMArrays(this)){var e,f,g,i=b,h=b;if(IsArray(b)){i=b[0];h=b[1]}IsArray(c)||(c=[c]);IsArray(d)||(d=[d]);for(b=0;b<c.length;b++){e=d[b];if(!e){e=c[b];d[b]=c[b]}this[0].f_indexOf(e)==-1&&this.f_maAddCol(e,"")}for(e=0;e<this.f_maGetRegs();e++){b=this.f_maGetVal(h,e);f=a.f_maGetReg(i,b);for(b=0;b<c.length;b++){g=a.f_maGetVal(c[b],f);this.f_maSetVal(d[b],g,e)}}}};
String.prototype.f_maCopyCols=function(a,b,c,d){this.f_maBArray2MArray().f_maCopyCols(a,b,c,d)};Array.prototype.f_maCountMatches=function(a,b,c,d,e,f){for(var g=[],i=0;i<this.f_maGetRegs();i++)g.f_addElements(this.f_maGetVal(a,i));return g.f_countMatches(b,c,d,e,f)};String.prototype.f_maCountMatches=function(a,b,c,d,e,f){return this.f_maBArray2MArray().f_maCountMatches(a,b,c,d,e,f)};
Array.prototype.f_maDeleteCol=function(a){if(IsMArrays(this)){IsArray(a)||(a=[a]);a=this[0].f_subCompare(a,1,1,0);a.reverse();for(var b=this[0].length,c=this.f_maGetRegs(),d=b*(c-1),e=0;e<c;e++){for(var f=0;f<a.length;f++){e==0&&this[0].splice(a[f],1);this[1].splice(d+a[f],1)}d-=b}}};Array.prototype.f_maDeleteRow=function(a,b){if(IsMArrays(this)){var c=this[1];if(a!=0&&!a)a=this.f_maGetRegs()-1;b||(b=1);var d=this[0].length,e=(a+b)*d;this[1]=c.slice(0,a*d);this[1]=this[1].concat(c.slice(e))}};
Array.prototype.f_maDeleteRows=function(a){if(IsMArrays(this)){a=a.f_sort(0,1,0);for(var b=0;b<a.length;b++)this.f_maDeleteRow(a[b],1)}};Array.prototype.f_maGetCol=function(a){var b=[];if(this.f_maGetRegs()&&a&&this[0].length!=0){var c=this[0].f_indexOf(a,"",1);if(c!=-1){a=this[0].length;for(var d=0;d<this.f_maGetRegs();d++)b[d]=this[1][d*a+c]}else ErrorJS(ICore.m_sKeyName+".f_maGetCol: no esta definido el campo ["+a+"]\n"+this[0]+FunCaller(),"",1)}return b};String.prototype.f_maGetCol=function(a){return this.f_maBArray2MArray().f_maGetCol(a)};
Array.prototype.f_maGetColName=function(a){if(IsMArrays(this))return this[0][a]};Array.prototype.f_maGetColPos=function(a){if(IsMArrays(this))return this[0].f_indexOf(a)};String.prototype.f_maGetColPos=function(a){return this.f_maBArray2MArray().f_maGetColPos(a)};Array.prototype.f_maGetCols=function(){if(IsMArrays(this))return this[0].length};
Array.prototype.f_maGetReg=function(a,b){if(IsMArrays(this)){var c=this[0],d=this[1],e=-1,f=-1,g=0;if(c.length!=0&&this.f_maGetRegs()){if(a)g=c.f_indexOf(a);g=g;for(b=String(b);g<d.length&&e==-1;){if(d[g]==b)e=g;g+=c.length}if(e!=-1)f=Math.floor(e/c.length)}return f}};String.prototype.f_maGetReg=function(a,b){return this.f_maBArray2MArray().f_maGetReg(a,b)};Array.prototype.f_maGetRegIf=function(a,b){return this.f_maGetCol(a).f_indexOf(b)};
Array.prototype.f_maGetRegs=function(){var a=0;if(this.length==2&&IsArray(this[0])&&IsArray(this[1]))a=this[1].length/this[0].length;if(a>0&&a!=Math.ceil(a)){alert(13);ErrorJS(ICore.m_sKeyName+"El numero de campos del MArray ["+this[0].length+"] no es proporcional al numero de elementos ["+this[1].length+"]\n\n"+this.f_maDebug(),"",1)}return a};String.prototype.f_maGetRegs=function(){return this.f_maBArray2MArray().f_maGetRegs()};
Array.prototype.f_maGetRegsIf=function(a,b){if(IsMArrays(this)){var c=0,d,e;for(d=this.f_maSubIndexOf(a[c],b[c],1);d.length&&++c<a.length;){e=this.f_maSubIndexOf(a[c],b[c],1);if(e.length)d=d.f_subCompare(e,1,0);else{d=[];break}}return d}};
Array.prototype.f_maGetVal=function(a,b,c){if(IsMArrays(this)){var d="",e=1;if(!IsUndefined(c)){d=c;e=0}c=this[0].f_indexOf(a,"",1);if(c!=-1)if(IsArray(b)){d=[];for(a=0;a<b.length;a++)d[a]=this[1][c+this[0].length*b[a]]}else{if(IsUndefined(b))b=0;if(b>=this.f_maGetRegs())e&&ErrorJS(ICore.m_sKeyName+".f_maGetVal: campo '"+a+"' del registro "+b+" y este MArray solo tiene "+this.f_maGetRegs()+" registros."+FunCaller(),this,1);else d=this[1][c+this[0].length*b]}else e&&ErrorJS(ICore.m_sKeyName+".f_maGetVal: no esta definido el campo ["+
a+"]\n"+this[0]+FunCaller(),"",1);return d}};String.prototype.f_maGetVal=function(a,b,c){return this.f_maBArray2MArray().f_maGetVal(a,b,c)};Array.prototype.f_maGetValIf=function(a,b,c,d){if(IsUndefined(d))d="";b=this.f_maGetReg(b,c);if(b!=-1)d=this.f_maGetVal(a,b);return d};Array.prototype.f_maJoin=function(a){if(IsMArrays(this))for(var b=0;b<a[0].length;b++)this.f_maAddCol(a[0][b],a.f_maGetCol(a[0][b]))};
Array.prototype.f_maNewRow=function(a,b,c){if(IsMArrays(this)){var d=this[0],e=this[1];if(typeof a=="string"){a=[];for(var f=0;f<d.length;f++)a[f]=""}if(a.length%d.length!=0){alert(14);ErrorJS(ICore.m_sKeyName+".f_maNewRow(): a_vValues tiene tamaño "+a.length+" y deberia ser "+d.length+"\nValores: "+a+"\n"+this.f_maDebug(),"",1)}else{b=!b&&b!=0?e.length:b*d.length;this[1]=e.slice(0,b);if(IsArray(a))a=ArrayObject2Array(a);else if(a.length){d=[];for(f=0;f<a.length;f++)d[f]=a[f];a=d}this[1]=this[1].concat(a);
this[1]=c?this[1].concat(e.slice(b+a.length)):this[1].concat(e.slice(b))}}};Array.prototype.f_maGetRows=function(a){if(IsMArrays(this)){IsArray(a)||(a=[a]);for(var b,c=[],d=0;d<a.length;d++){b=Number(a[d]*this[0].length);c=c.concat(this[1].slice(b,b+this[0].length))}return c}};Array.prototype.f_maSetVal=function(a,b,c){if(IsMArrays(this))this[1][c*this[0].length+this[0].f_indexOf(a,"",1)]=b};String.prototype.f_maSetVal=function(a,b,c){return this.f_maBArray2MArray().f_maSetVal(a,b,c)};
Array.prototype.f_maSetValIf=function(a,b,c,d,e){var f=this.f_maGetReg(a,b);if(f!=-1)this.f_maSetVal(c,d,f);else if(e){this.f_maNewRow(Array(this[0].length));f=this.f_maGetRegs()-1;this.f_maSetVal(a,b,f)}};Array.prototype.f_maSort=function(a,b,c,d,e){var f=[];a=this.f_maGetCol(a);if(a.length)f=a.f_sort(b,c,d,e);return f};String.prototype.f_maSort=function(a,b,c,d,e){return this.f_maBArray2MArray().f_maSort(a,b,c,d,e)};
Array.prototype.f_maSubDistinct=function(a,b,c,d,e){var f=[];a=this.f_maGetCol(a);if(a.length)f=a.f_subDistinct(b,!c,d,!e);return f};String.prototype.f_maSubDistinct=function(a,b,c,d,e){return this.f_maBArray2MArray().f_maSubDistinct(a,b,c,d,e)};
Array.prototype.f_maSubIndexOf=function(a,b,c,d,e,f,g,i,h){var j,l,k,m,n,o=[];i||(i=0);if(IsArray(a))h||(h=["AND"]);else{a=[a];b=[b];h||(h=["OR"])}IsArray(h)||(h=[h]);a.length!=b.length&&ErrorJS(ICore.m_sKeyName+".f_maSubIndexOf: Los parámetros vCampo y vValor tienen distinta dimensión:\n["+a.length+"] "+a+"\n["+b.length+"] "+b+"\n","",1);n="OR";for(j=0;j<a.length;j++){k=this.f_maGetCol(a[j]);a_vVal=b[j];IsArray(a_vVal)||(a_vVal=[a_vVal]);m=[];for(l=0;l<a_vVal.length;l++)m=m.concat(k.f_subIndexOf(a_vVal[l],
c,d,e,f,0,0,i));switch(n){case "OR":o=o.concat(m);break;case "AND":o=o.f_subCompare(m,1);break;case "NOT":o=o.f_subCompare(m,1).f_subCompare(o,0,0,0,1);break;case "XOR":o=o.f_subCompare(m,0,0,0,1)}if(j<h.length)n=h[j]}g||(o=o.f_subDistinct(0,!d,g,1));return o};String.prototype.f_maSubIndexOf=function(a,b,c,d,e,f){return this.f_maBArray2MArray().f_maSubIndexOf(a,b,c,d,e,f)};
Array.prototype.f_maSubSort=function(a,b,c,d,e,f){if(IsMArrays(this)){var g=[];b=this.f_maGetVal(b,a);if(b.length)g=b.f_sort(c,d,e,f);if(c)g=a.f_getVals(g);return g}};String.prototype.f_maSubSort=function(a,b,c,d,e,f){return this.f_maBArray2MArray().f_maSubSort(a,b,c,d,e,f)};
Array.prototype.f_maSubValIf=function(a,b,c,d,e,f,g,i){var h=[];if(!this.f_maGetRegs())return h;if(c&&!IsArray(c))c=[c];if(!c||c.length==0)c=this[0];a=this.f_maSubIndexOf(a,b,1,d,e,g,i,f);for(b=0;b<a.length;b++)for(d=0;d<c.length;d++)h[h.length]=this.f_maGetVal(c[d],a[b]);return h};
Array.prototype.f_maSubValByRegs=function(a,b){if(IsMArrays(this)){var c=[];if(a&&!IsArray(a))a=[a];if(!a||a.length==0)a=this[0];for(var d=0;d<b.length;d++)for(var e=0;e<a.length;e++)c[c.length]=this.f_maGetVal(a[e],b[d]);return c}};Array.prototype.f_maSuma=function(a,b){var c=[];c=b?this.f_maGetVal(a,b):this.f_maGetCol(a);return c.f_suma()};
Array.prototype.f_maSumaCampos=function(a,b){if(IsMArrays(this)){IsArray(b)||(b=[b]);for(var c=this.f_maSubValByRegs(a,b),d=[],e=0;e<b.length;e++)d=d.concat(c[e]);return d.f_suma()}};Array.prototype.f_maSumaColIf=function(a,b,c,d){var e=[];e=b?this.f_maSubValIf(b,c,a,0,0,d):this.f_maGetCol(a);return e.f_suma()};String.prototype.f_maSumaColIf=function(a,b,c,d){return this.f_maBArray2MArray().f_maSumaColIf(a,b,c,d)};String.prototype.f_maBArray2MArray=function(){return[eval("a_s"+this),eval("a_v"+this)]};
Array.prototype.f_addCol=function(a,b){this.f_maAddCol(a,b)};Array.prototype.f_addRegVal=function(a,b,c){this.f_maNewRow(a,b,c)};Array.prototype.f_copyCol=function(a,b,c){this.f_maCopyCols(a,b,c)};Array.prototype.f_maDelRow=function(a,b){a&&a--;this.f_maDeleteRow(a,b)};Array.prototype.f_getRegNumOfVal=function(a,b){return this.f_maGetReg(a,b)};Array.prototype.f_getRegsNum=function(){return this.f_maGetRegs()};String.prototype.f_getRegsNum=function(){return this.f_maBArray2MArray().f_maGetRegs()};
Array.prototype.f_getRegVal=function(a,b){return this.f_maGetVal(a,b)};String.prototype.f_getRegVal=function(a,b){return this.f_maBArray2MArray().f_maGetVal(a,b)};Array.prototype.f_maBuscaValor=function(a,b){return this.f_maGetReg(a,b)};String.prototype.f_maBuscaValor=function(a,b){return this.f_maBArray2MArray().f_maGetReg(a,b)};Array.prototype.f_maDelReg=function(a,b){this.f_maDelRow(a,b)};Array.prototype.f_maGetColIf=function(a,b,c,d,e){return this.f_maSubValIf(a,b,c,d,e)};
Array.prototype.f_maGetDistinct=function(a,b,c){return this.f_maSubDistinct(a,b,c)};String.prototype.f_maGetDistinct=function(a,b,c){return this.f_maBArray2MArray().f_maSubDistinct(a,b,c)};Array.prototype.f_maGetValFromCol=function(a,b,c){return this.f_maGetValIf(a,b,c)};Array.prototype.f_setRegVal=function(a,b,c){return this.f_maSetVal(a,b,c)};String.prototype.f_setRegVal=function(a,b,c){return this.f_maBArray2MArray().f_maSetVal(a,b,c)};
Array.prototype.f_delElements=function(){for(var a,b,c=this,d=0;d<arguments.length;d+=2){a=arguments[d];b=arguments[d+1];a=this.f_indexOf(a,b);if(a!=-1)c=this.f_delOfArray(a,1)}return c};protected_sArrayProperty="";Array.prototype.f_sortBy=function(){IsMArrays(this)&&this.sort(function(){return eval("p_vValue1."+protected_sArrayProperty)-eval("p_vValue2."+protected_sArrayProperty)})};
oITraceFlags=new function(){this.m_sObj="oITraceFlags";this.m_a_Flags=[["sName","nTime"],[]];this.f_newFlag=function(a){var b=this.m_a_Flags.f_getRegNumOfVal("sName",a);if(b==-1)b=this.m_a_Flags.f_getRegsNum();this.m_a_Flags.f_addRegVal([a,(new Date).getTime()/1E3],b)};this.f_getFlag=function(a){a=this.m_a_Flags.f_getRegVal("nTime",this.m_a_Flags.f_getRegNumOfVal("sName",a));return(new Date).getTime()/1E3-a}};
ICrono=new function(){this.m_sObj="ICrono";this.f_reset=function(){this.m_Last=this.m_Start=new Date};this.f_reset();this.f_get=function(a){var b=new Date-this.m_Last;this.m_Last=new Date;if(a)b=" ["+b+"/"+(this.m_Last-this.m_Start)+"]";return b}};IDate=new function(){this.m_a_sDateNames=[["Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Domingo"],["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],["L","M","X","J","V","S","D"]]};
Date.prototype.m_a_sDateNames=IDate.m_a_sDateNames;Date.prototype.m_a_sDateChars=["nHH24","nH24","nHH12","nH12","sH12","nMMN","nMN","nSS","nS","nMIL","sDD","sD","nDD","nD","sMM","sM","nMM","nM","nYYYY","nYY"];
Date.prototype.f_drawFormat=function(a,b,c){if(this=="undefined"||this=="NaN"||typeof this!="object")return"";var d=this.getDay()>0?this.getDay()-1:6;if(IsNull(b))b=this.m_a_sDateNames[0];if(IsNull(c))c=this.m_a_sDateNames[1];b=b[d];d=b.substring(0,3)+".";var e=this.getDate(),f=e<10?"0"+e:e,g=this.getMonth()+1;c=c[g-1];var i=c.substring(0,3)+".",h=g<10?"0"+g:g,j=this.getFullYear(),l=String(j).substring(2,String(j).length),k=this.getHours(),m=k<10?"0"+k:k,n=this.getHours()%12==0?12:this.getHours()%
12,o=n<10?"0"+n:n,r=k>12?"pm":"am",p=this.getMinutes(),s=p<10?"0"+p:p,q=this.getSeconds(),t=q<10?"0"+q:q,u=this.getMilliseconds();d=[m,k,o,n,r,s,p,t,q,u,b,d,f,e,c,i,h,g,j,l];if(IsNull(a))a="nDD/nMM/nYYYY";e=a;for(f=0;f<this.m_a_sDateChars.length;f++){b=this.m_a_sDateChars[f];if(a.indexOf(b)!=-1)e=e.f_replace(b,d[f])}return e};Date.prototype.f_printFormat=function(a){document.write(this.f_drawFormat(a))};
String.prototype.f_swapDateFormat=function(){ErrorJS(ICore.m_sKeyName+".f_swapDateFormat deprecated: usa f_toDate","",5)};Date.prototype.f_range=function(a,b){var c=1;if(a){if(typeof a=="string")a=a.f_toDate();if(this<a)c=0}if(c&&b){if(typeof b=="string")b=b.f_toDate();if(this>b)c=0}return c};Date.prototype.f_timer=function(a){a==1&&this.setTime((new Date).getTime());a=a==2?new Date-ICore.m_nTimerLap:new Date-this;ICore.m_nTimerLap=new Date;return a};
String.prototype.f_toDate=function(a,b){if(!a&&IsDate(this))l=new Date(this.toString());else{var c,d,e,f,g,i=["Y","M","D","h","m","s","i"],h=[0,1,1,0,0,0,0],j=[0,0,0,0,0,0,0],l=null;if(IsNull(a))a="D/M/Y";var k=a,m=0;d=RegExp("nYYYY|nYY|YYYY|YY|Y","gi");k=k.replace(d,"Y");d=RegExp("nMIL","g");k=k.replace(d,"i");d=RegExp("nMMN|nMN","g");k=k.replace(d,"m");d=RegExp("sMM|sM|nMM|nM|MM","g");k=k.replace(d,"M");d=RegExp("sDD|sD|nDD|nD|DD","g");k=k.replace(d,"D");d=RegExp("nHH24|nH24|nHH12|nH12|sH12","g");
k=k.replace(d,"h");d=RegExp("nSS|nS","g");k=k.replace(d,"s");if(b)for(d=0;d<k.length;d++)i.f_indexOf(k.charAt(d),"",0,0)!=-1&&m++;for(var n=this.f_trim();k.length;){d=c=1;e=k.charAt(0);f=i.f_indexOf(e,"",0,0);if(f!=-1){m--;g=k.charAt(1);c=i.f_indexOf(g,"",0,0);if(c!=-1){c=2;if(e=="Y")c=4}else{c=n.indexOf(g);if(g!=""&&c!=-1)d=k.indexOf(g);else{c=n.length;d=k.length}}h[f]=Number(n.substr(0,c));j[f]=c}k=k.substr(d);n=n.substr(c)}if(b==2||b==1&&!m){i=a.f_countMatches("Y");m=i>1&&i!=j[0]?1:0}if(!b||!m){if(h[0]<
ICore.m_nY2K)h[0]=2E3+Number(h[0]);if(h[0]&&h[1]&&h[2])l=new Date(h[0],h[1]-1,h[2],h[3],h[4],h[5],h[6]);if(!IsNull(l))if(h[1]!=1+l.getMonth()||h[2]!=l.getDate())l=null}}return l};String.prototype.f_toDateDraw=function(a,b,c,d,e){var f="";if(this!=""){a=this.f_toDate(a,e);IsNull(a)||(f=a.f_drawFormat(b,c,d))}return f};String.prototype.m_a_sDateNames=[(new Date).m_a_sDateNames[1],(new Date).m_a_sDateNames[0]];
String.prototype.f_parse2Date=function(a){ErrorJS(ICore.m_sKeyName+".f_parse2Date deprecated: usa f_drawFormat","",5);var b="";b=this.f_toDate("D/M/Y");switch(a){case 1:b=b.f_drawFormat("nDD/nMM/nYY");break;case 2:b=b.f_drawFormat("nD de sMM de nYYYY");break;case 3:b=b.f_drawFormat("sDD, nD de sMM de nYYYY");break;case 4:b=b.f_drawFormat("sD, nDD/nMM/nYY");break;case 5:b=b.f_drawFormat("nYYYY/nMM/nDD");break;default:b=b.f_drawFormat("nDD/nMM/nYYYY")}return b};
function ArrayObject2Array(a){if(typeof a.join!="function"){for(var b=[],c=0;c<a.length;c++)b[c]=a[c];a=b}return a}function CompareValues(a,b,c){var d=0;if(c||typeof a==typeof b)if(IsArray(a)&&a.length==b.length){d=1;for(c=0;c<a.length;c++){d=1;if(IsArray(a[c])){if(!CompareValues(a[c],b[c])){d=0;break}}else if(a[c]!=b[c]){d=0;break}}}else{if(a==b)d=1}else ErrorJS(ICore.m_sKeyName+".CompareValues: comparando tipos distintos:\n["+a+"]("+typeof a+")\n["+b+"]("+typeof b+")");return d}
function GetType(a,b){var c=0;if(b)if(typeof a=="string"){c=eval("typeof("+a+")");if(c=="undefined"||c=="unknown")c=0;else if(c=="object"){c=eval(a+".constructor");if(typeof c=="undefined")c=eval(a)}}else ErrorJS(ICore.m_sKeyName+".GetType: pasa 'vObj' entre comillas si quieres saber si la variable ha sido definida.");else if(a!=null){c=a.constructor;if(typeof c=="undefined")c=a}if(typeof c=="undefined"||c=="undefined")c=0;return c}
function IsArray(a){var b=0;if(a){var c=a.push;a=String(GetType(a)).substring(0,20).toUpperCase();if(!IsUndefined(c)&&a.indexOf("FUNCTION")!=-1)b=1}return b}function IsDate(a){var b=0;if(GetType(a)==String&&(a.indexOf("UTC+")!=-1||a.indexOf("GMT+")!=-1))a=new Date(a.toString());if(GetType(a)==Date)b=1;return b}
Array.prototype.f_maShowDebug=function(a,b,c,d){if(IsMArrays(this)){var e;if(a!=null){e=DebugMArrayReg(this,c,a,b,d);e+="\n\n Pulsa [Cancelar] para ver el siguiente registro";if(a++>=this.f_maGetRegs()-1)a=0;(e=confirm(e))||this.f_maShowDebug(a,b,c,d)}else(e=this.f_maDebug(c,b))&&ErrorJS("[i_core.f_maShowDebug]\n"+e)}};
Array.prototype.f_maDebug=function(a,b){var c="";if(IsMArrays(this)){var d,e,f,g,i=3,h=i+2,j=Math.ceil(this[1].length/this[0].length);if(j<=h)i=h=j;c+="\tETIQUETAS ("+this[0].length+" etiquetas)\n["+this[0]+"]\n";c+="\tVALORES ("+this[1].length+" valores / "+this[1].length/this[0].length+" registros)\n";if(b){for(d=0;d<i;d++)c+=DebugMArrayReg(this,a,d,b);if(h<j){c+="\t...\n\t...\n\t...\n";for(d=j-2;d<j;d++)c+=DebugMArrayReg(this,a,d,b)}}else{a||(a=this[0]);for(d=0;d<a.length;d++){c+=a[d]+":\t";f=
this[0].f_indexOf(a[d],0,1);if(f==-1)c+="este campo no existe";else{g=this[0].length;for(e=0;e<i;e++)c+=this[1][e*g+f]+"\t,";if(h<j){c+="\t.....\t,";for(e=j-2;e<j;e++)c+=this[1][e*g+f]+"\t,"}c=c.substring(0,c.length-2)}c+="\n"}}}return c};String.prototype.f_maDebug=function(a){alert(111);return this.f_maBArray2MArray().f_maDebug(a)};
function DebugMArrayReg(a,b,c,d,e){var f,g="";b||(b=a[0]);var i=b.length;e&&b.sort();for(var h=0;h<i;h++){e="No existe!!!";f=a[0].f_indexOf(b[h],0,1);if(f!=-1)e=a[1][a[0].length*c+f];if(d){if(h)g+=","}else g+="\n"+b[h]+":\t ";g+=e}return g=d?"["+g+"]\t(Reg."+c+")\n":"[Registro "+c+" / "+a.f_maGetRegs()+" ]\n"+g}function Porcentaje(a,b,c){var d=0;a=a.f_toNumber();b=b.f_toNumber();d=a*100/b;isNaN(d)||(d=d.f_formatNumber(c));return d}
function ErrorEx(a){return a+" "+a.name+": "+a.description+" ["+(a.number>>16&8191)+" "+(a.number&65535)+"/"+a.number+"]"}function ErrorJSLibs(){ErrorJS(null,null,null,null,1)}
function ErrorJS(a,b,c,d,e){if(IsUndefined(a)){a="";if(e)a+=this.m_sErroresLibs;a+=ICore.m_sErrores;if(IsUndefined(c))c=4;if(!ICore.m_nShowErrores)ICore.m_nShowErrores=1}else{if(c!=2&&!ICore.m_bIsServer&&!d){e="*";if(c==5)e="-";try{window.top.document.title+=e}catch(f){}}ICore.m_sErrores+="[Error: "+ ++ICore.m_nErrores+"["+(new Date).f_drawFormat("nD/nM/nYY nH24:nMMN")+"]"+a+"\n\n"}e=a;var g="";if(c==5)c=2;if(!d){if(!ICore.m_nShowErrores)return;if(!c||ICore.m_nHTMLErrores--<ICore.m_nShowErrores)--ICore.m_nShowErrores}d=
ICore.m_bIsServer?"http://"+Request.ServerVariables("HTTP_HOST")+Request.ServerVariables("URL"):document.location.href;if(b&&!IsNull(b)&&typeof b=="object")a=b;if(IsMArrays(a)){alert(11);g=a.f_maDebug()}else if(typeof a=="object")g="ErrorJS"+DebugObj(a,10,null,null,1);a="";a+="<TABLE cellpadding='1' cellspacing='0' border='1' width='100%'>";a+="<TR bgcolor='#666666'>";a+="<TD><FONT face='Arial' size='1'  style='color:#F00'><NOBR><B>ErrorJS "+(ICore.m_bIsServer?"Servidor":"Cliente")+":</B></NOBR></FONT></TD>";
a+="<TD><FONT face='Arial' size='1'  style='color:#88F''>"+d+"</FONT></TD>";a+="<TD align='right'><A href='javascript:document.location.reload()'><FONT face='Arial' size='1'  style='color:#0F0'><B>[ RELOAD PAGE ]</B></FONT></A></TD>";a+="</TR>";a+="<TR bgcolor='#000'>";a+="<TD colspan='3'>";a+="<FONT face='Arial' size='2' style='color:#F88'>"+e.toString().f_replace("\n","<BR>")+"</FONT>";if(g)a+="<FONT size=3><PRE>"+g+"</PRE></FONT>";a+="</TD>";a+="</TR>";a+="</TABLE>";b="Mensaje de error ["+(new Date).f_drawFormat("nD/nM/nYY nH24:nMMN")+
"]";g=d+"\n\n"+e+"\n"+g;switch(c){case 1:if(ICore.m_bIsServer)Response.write(a);else if(ICore.m_sServer=="DEV")if(oIGZ.m_bInitialized)document.body.innerHTML=a+document.body.innerHTML;else{ICore.m_sErrorJS||(oIGZ.m_a_sPostStartUps[oIGZ.m_a_sPostStartUps.length]='document["body"].innerHTML=ICore.m_sErrorJS+document["body"].innerHTML');ICore.m_sErrorJS+=a}else window.status=e;break;case 2:if(ICore.m_bIsServer)Response.write("/*"+a+"*/\n");else if(ICore.m_sServer=="DEV")window.status=e;break;case 3:a=
e;break;case 4:a="";ICore.f_showError(b,g);break;default:if(ICore.m_sServer=="DEV")if(ICore.m_bIsServer){Response.write(a);Response.end()}else ICore.f_showError(b,g);else if(ICore.m_bIsServer){Debug(e);protected_bDebugMode&&Response.end()}else window.status=e}if(a)return a}
ICore=new function(){this.m_sObj="ICore";this.m_bIsServer=typeof Server!="undefined"?1:0;this.DEV=0;this.m_sIGZsign="© "+(new Date).getYear()+" Intelygenz - www.intelygenz.com";this.m_sAuthor="";this.m_nVersion=i_core_nVersion;this.m_sKeyName="[ICore v"+this.m_nVersion+"] ";this.f_getVersion=function(){return this.m_sKeyName+"\n"+this.m_sIGZsign};this.m_nShowErrores=3;this.m_nHTMLErrores=5;this.m_nY2K=20;try{this.m_oOnErrorEvent=!this.m_bIsServer?window.onerror:null}catch(a){}if(this.m_bIsServer)this.m_sUrl=
("http://"+Request.ServerVariables("SERVER_NAME")+Request.ServerVariables("URL")).toLowerCase();else if(document)this.m_sUrl=String(document.location.href);this.m_a_sDevIgz=["aspnet1","aspnet2","dev","formacion","intranet"];this.m_a_sDevHosts=["://almax","://192.168.0.9","://debi","://192.168.0.15","://cafetera","://192.168.0.7","://localhost","://127.0.0.1"];this.f_checkDevHosts=function(){var b="PRO",c=this.m_a_sDevHosts;if(this.m_sUrl.indexOf("intelygenz.com")!=-1)c=this.m_a_sDevIgz;for(var d=
-1,e=c.length;++d<e&&this.m_sUrl.indexOf(c[d])==-1;);if(d<e){b="DEV";this.DEV=1}this.m_sServer=b};this.f_checkDevHosts();this.f_parseUrl=function(b,c,d,e){var f="?",g=b.indexOf("#");if(!d&&g!=-1){d=b.substring(g);b=b.substring(0,g);g=d.indexOf("?");if(g!=-1){if(c)c+="&";c+=d.substring(g+1);d=d.substring(0,g)}}if(b.indexOf("?")!=-1)f="&";if(c){b+=f+c;f="&"}if(e)b+=f+(new Date).f_drawFormat("nYYYYnMMnDDnHH24nMMNnSSnMIL");if(d)b+=d;return b};this.m_sErrorJS=this.m_oErrorJS="";this.m_nErrores=0;this.m_sErrores=
"";this.m_sLibsPath="/libs/js";this.m_sNumberFormat=".I,DD";this.m_nTimerLap=0;this.m_sErroresLibs=this.m_sDebugLoad="";this.f_debugLoad=function(b,c){this.m_sErroresLibs+=g_oICrono.f_get(1)+"\n"+b;this.m_sErroresLibs+="\t\t\t\t".substring(0,4-b.length/9);if(!this.m_bIsServer&&!IsNull(document.location.search)&&document.location.search.indexOf("igzdebug")!=-1){if(!this.m_sDebugLoad)this.m_sDebugLoad="["+document.location.pathname+"]\n";this.m_sDebugLoad+=b+"\n";c==1&&oIGZ.m_a_sStartUps.push("ICore.f_debugLoad (oIGZ.f_checkLoadedLibs ())");
alert(this.m_sDebugLoad)}};this.f_showError=function(b,c){var d=true;if(!b){c=b;b="Mensaje de error ["+(new Date).f_drawFormat("nD/nM/nYY nH24:nMMN")+"]"}if(GetType("iAlert",1)&&iAlert.ACTIVA){c=c.f_parse2Format("TEXT","HTML");if(ICore.DEV)c=c.f_addLinks(null,null," target='showError'");iAlert.f_show(b,c)}else d=confirm(b+"\n\n"+c+"\n\nPulsa 'Cancelar' o ESC para copiar el error al portapapeles");if(oIGZ.m_bIE)if(!d&&document.body){d=document.createElement("<FORM name='FCopy' style='display:none'>");
var e=document.createElement("<TEXTAREA NAME='zzCopy'>");e.value=c;document.body.appendChild(d);d.appendChild(e);e.createTextRange().execCommand("Copy");document.body.removeChild(d)}};this.f_getValue=function(b,c,d){return IsNull(b,d)?c:b};this.m_sLang="es";this.m_sParams="";this.f_loadPath=function(){var b=null;navigator.userAgent.toLowerCase();var c=this.m_sLang;if(document.getElementById?1:0){for(var d,e=document.getElementsByTagName("SCRIPT"),f=0,g=e.length;f<g&&e[f]&&(!e[f].getAttribute("src")||
e[f].getAttribute("src")&&e[f].getAttribute("src").indexOf("i_core.js")==-1);)f++;if(f<g){b=e[f].getAttribute("src");d=e[f].getAttribute("lang")}if(d)c=d}else{ErrorJS(ICore.m_sKeyName+".f_loadPath: navegador sin DOM","",5);b=document.all.Ncore.src}this.m_sLang=c;if(b){if(b.indexOf("?")!=-1)this.m_sParams=b.substring(b.indexOf("?")-1);b=b.substring(0,b.lastIndexOf("/")+1)}this.m_sLibsPath=b;if(IsNull(this.m_sLibsPath))this.m_sLibsPath="/libs/js/";return this.m_sLibsPath};oXJS=oXBD=new function(){this.f_load=
function(){ErrorJS("Falta el objeto oXBD.\nComprueba que la librería '"+sPath+"i_xbd.js' existe.")}}};var LIBS_PATH=ICore.f_loadPath();g_oICrono=ICrono;ICore.f_debugLoad("i_core");oCore=ICore;var g_nShowErrores=ICore.m_nShowErrores,g_nHTMLErrores=ICore.m_nHTMLErrores,g_nY2K=ICore.m_nY2K,g_sLang=ICore.m_sLang;ICore.f_debugLoad("i_core END");
if(typeof OpenHiddenIFrame=="undefined"){document.write("<SCRIPT type='text/javascript' charset='iso-8859-1' src='"+LIBS_PATH+"i_igz.js"+ICore.m_sParams+"'><\/SCRIPT>\n");ICore.f_debugLoad("i_core igz");document.write("<SCRIPT type='text/javascript' charset='iso-8859-1' src='"+LIBS_PATH+"i_lang_"+ICore.m_sLang+".js"+ICore.m_sParams+"'><\/SCRIPT>\n");document.write("<SCRIPT type='text/javascript' charset='iso-8859-1' src='"+LIBS_PATH+"i_marray.js"+ICore.m_sParams+"'><\/SCRIPT>\n");document.write("<SCRIPT type='text/javascript' charset='iso-8859-1' src='"+
LIBS_PATH+"i_xbd.js"+ICore.m_sParams+"'><\/SCRIPT>\n")}else ICore.m_sLang!="es"&&document.write("<SCRIPT type='text/javascript' charset='iso-8859-1' src='"+LIBS_PATH+"i_lang_"+ICore.m_sLang+".js"+ICore.m_sParams+"'><\/SCRIPT>\n");
i_igz_nVersion=0.828;oCore.f_debugLoad("i_igz");GetType("oIGZ",1)&&ErrorJS("ERROR: se está cargando más de una vez 'i_igz.js'","",4,1);
oIGZ=new function(){this.m_sObj="oIGZ";this.checkLoadedLibs=false;this.f_addEventListener=function(a,b,d,e){if(a.addEventListener)a.addEventListener(b,d,e);else if(a.attachEvent)a.attachEvent("on"+b,d);else a["on"+b]=d};this.f_removeEventListener=function(a,b,d,e){if(a.removeEventListener)a.removeEventListener(b,d,e);else if(a.detachEvent)a.detachEvent("on"+b,d);else a["on"+b]=null};this.f_addEventListener(window,"load",function(){oIGZ.f_init()},false);window.onresize=function(){oIGZ.f_resize()};
window.onscroll=function(){oIGZ.f_scroll()};document.onreadystatechange=function(){this.readyState=="complete"&&oIGZ.m_nPrint&&oIGZ.f_init()};this.m_nVersion=i_igz_nVersion;this.m_sKeyName="i_igz.js v"+this.m_nVersion;var c=window.navigator.userAgent.toLowerCase();this.m_bNS=this.m_bGecko=c.indexOf("gecko")!=-1;if(this.m_bMozilla=c.indexOf("mozilla")!=-1)this.m_bNS=0;this.m_bNS4=this.m_bGecko?c.indexOf("netscape")!=-1:c.indexOf("mozilla")!=-1&&c.indexOf("spoofer")==-1&&c.indexOf("compatible")==-1&&
c.indexOf("opera")==-1&&c.indexOf("webtv")==-1&&c.indexOf("hotjava")==-1;this.m_bIE=c.indexOf("msie")!=-1&&c.indexOf("opera")==-1&&c.indexOf("webtv")==-1;this.m_bIE4=0;this.m_bOpera=c.indexOf("opera")!=-1;this.m_bKonqueror=c.indexOf("konqueror")!=-1;this.m_bIcab=c.indexOf("icab")!=-1;this.m_bAol=c.indexOf("aol")!=-1;this.m_bWebtv=c.indexOf("webtv")!=-1;this.m_nFF=(this.m_bFF=c.indexOf("firefox")!=-1)?c.substring(c.indexOf("firefox")+8,c.length):null;this.m_bSafari=c.indexOf("applewebkit")!=-1;this.m_bIECompatible=
c.indexOf("msie")!=-1&&!this.m_bIE;this.m_bNSCompatible=c.indexOf("mozilla")!=-1&&!this.m_bNS4&&!this.m_bMozilla;this.m_nVersionMinor=parseFloat(navigator.appVersion);if(this.m_bIE&&!document.getElementById)this.m_bIE4=1;if(this.m_bNS4&&this.m_bGecko)this.m_nVersionMinor=parseFloat(c.substring(c.lastIndexOf("/")+1));else if(this.m_bIE&&this.m_nVersionMinor>=4)this.m_nVersionMinor=parseFloat(c.substring(c.indexOf("msie ")+5));else if(this.m_bSafari)this.m_nVersionMinor=c.indexOf("version/")<0?parseFloat(c.substring(c.indexOf("safari/")+
7)):parseFloat(c.substring(c.indexOf("version/")+8));else if(this.m_bKonqueror)this.m_nVersionMinor=parseFloat(c.substring(c.indexOf("konqueror/")+10));else if(this.m_bMozilla)this.m_nVersionMinor=parseFloat(c.substring(c.indexOf("rv:")+3));else if(this.m_bOpera)this.m_nVersionMinor=c.indexOf("opera/")!=-1?parseFloat(c.substring(c.indexOf("opera/")+6)):parseFloat(c.substring(c.indexOf("opera ")+6));else if(this.m_bIcab)this.m_nVersionMinor=c.indexOf("icab/")!=-1?parseFloat(c.substring(c.indexOf("icab/")+
6)):parseFloat(c.substring(c.indexOf("icab ")+6));else if(this.m_bWebtv)this.m_nVersionMinor=parseFloat(c.substring(c.indexOf("webtv/")+6));this.m_nVersionMajor=parseInt(this.m_nVersionMinor);this.m_nVersionMinor-=this.m_nVersionMajor;this.m_nGeckoVersion=this.m_bGecko?c.substring(c.lastIndexOf("gecko/")+6,c.lastIndexOf("gecko/")+14):-1;this.m_bDOM=document.getElementById?1:0;this.m_bDOM2=document.addEventListener&&document.removeEventListener;this.m_sCssMode=document.compatMode?document.compatMode:
"BackCompat";this.m_bCookies=navigator.cookieEnabled?1:0;this.m_bWin32=(this.m_bWin=c.indexOf("win")!=-1)&&(c.indexOf("95")!=-1||c.indexOf("98")!=-1||c.indexOf("nt")!=-1||c.indexOf("win32")!=-1||c.indexOf("32bit")!=-1||c.indexOf("xp")!=-1);this.m_bMac=c.indexOf("mac")!=-1;this.m_bUnix=c.indexOf("unix")!=-1||c.indexOf("linux")!=-1||c.indexOf("sunos")!=-1||c.indexOf("bsd")!=-1||c.indexOf("x11")!=-1;if(this.m_bMac&&this.m_bIE)this.m_bIE4=1;this.f_getAppPath=function(){var a,b,d="";b=0;for(var e=document.location.protocol+
"//"+document.location.host,f=document.getElementsByTagName("SCRIPT");b<f.length;)if((a=f[b++].getAttribute("src"))&&a.indexOf("i_core.js")!=-1){b=a.indexOf("libs/js/i_core.js");d=b!=-1?a.substring(0,b):a.substring(0,a.indexOf("i_core.js"));break}f=0;if(d!="")f=this.m_bMac&&this.m_bIE4?ieMac_f_countMatches(d,"[.][.]/"):d.f_countMatches("[.][.]/");if(f!=0||d.indexOf("/")!=0){e+=document.location.pathname;e=e.substring(0,e.lastIndexOf("/")+1);for(a=0;a<f;a++){b=e.lastIndexOf("/");e=e.substring(0,e.lastIndexOf("/",
b-1)+1);d=d.substring(d.indexOf("/")+1)}e+=d;b=e.indexOf("libs/js/");if(b!=-1)e=e.substring(0,b)}else e+=d;return e};this.m_sRootPath=this.f_getAppPath();this.f_getFullPath=function(a){var b=document.location.href.toLowerCase();return this.m_sFullPath=b.substring(0,b.lastIndexOf(a)+a.length)+"/"};this.f_getAbsPath=function(a){return this.f_getFullPath(a)};this.f_drawMagic=function(a,b,d){d||(d="");if(this.m_sFullPath)d=this.m_sFullPath;return"<IMG src='"+d+"pix/magic.gif' width='"+a+"' height='"+
b+"' border='0' />"};this.f_printMagic=function(a,b,d){document.write(this.f_drawMagic(a,b,d))};this.m_maItems=[["nType","sTagName","sSrcOrValue","sClassName","nSizeX","nSizeY","sXtraAbs"],[]];this.f_printItem=function(a,b,d){document.write(this.f_drawItem(a,b,d))};this.f_drawItem=function(a,b,d){var e="",f=this.m_maItems.f_maGetReg("sTagName",a);if(f!=-1){var g=this.m_maItems.f_maGetVal("nType",f);a=this.m_maItems.f_maGetVal("sSrcOrValue",f);var i=this.m_maItems.f_maGetVal("sClassName",f);i=i?"class='"+
i+"'":"";var h=this.m_maItems.f_maGetVal("sXtraAbs",f);h||(h="");b||(b="");switch(g){case 1:d=(d=this.m_maItems.f_maGetVal("nSizeX",f))?" width='"+d+"' ":"";f=(f=this.m_maItems.f_maGetVal("nSizeY",f))?" height='"+f+"' ":"";e="<IMG src='"+oIGZ.m_sRootPath+a+"' "+d+" "+f+" "+i+" "+h+" "+b+" border='0' />";break;case 2:if(d)a=d;e="<INPUT type='button' value='"+a+"' "+b+" "+i+" "+h+" />";break;case 3:e="<SPAN "+b+" "+i+" "+h+">"+d+"</SPAN>"}}else ErrorJS(this.m_sKeyName+" - f_drawItem : No se ha encontrado el Item ["+
a+"] en el MArray\n\n"+this.m_maItems.f_maDebug());return e};this.f_loadSpritePanels=function(a){document.write(this.f_innerSpritePanels(a))};this.f_innerSpritePanels=function(a){var b=[];IsArray(a)||(a=[a]);for(var d=0,e=a.length;d<e;d++)b.push("<SPAN style='display: none;' class='"+a[d]+"'></SPAN>");return b.join("")};this.f_drawSpriteMagic=function(a,b){return this.f_drawSprite("IcoMagic"," style=' width: "+a+"px; height: "+b+"px; font-size: "+a+"px; line-height: "+b+"px;'","NONE")};this.f_printSpriteMagic=
function(a,b){document.write(this.f_drawSpriteMagic(a,b))};this.f_drawSprite=function(a,b,d,e){var f="";if(IsNull(e))e="IcoSize";if(IsNull(b))b="";if(IsArray(a)&&a.length>1){sClassNameIco=a[0];f="oIGZ.f_spriteMouseOver(this)";var g="oIGZ.f_spriteMouseOut(this)";if(d){f+=";FHON(this)";g+=";FHOFF()"}f=" _classOver='"+a[1]+" "+e+"' _classOut='"+sClassNameIco+" "+e+"'  _active='0' onmouseover='"+f+"' onmouseout='"+g+"' "+(d?" fh_tit='"+d+"' ":"")+" ";if(a.length>2)f+=" onclick='oIGZ.f_spriteState(this)' "}else sClassNameIco=
a;return"<SPAN class='"+sClassNameIco+" "+e+"' "+f+" "+b+">&#160;</SPAN>"};this.f_printSprite=function(a,b,d){document.write(this.f_drawSprite(a,b,d))};this.f_spriteMouseOver=function(a){a.className=a.getAttribute("_classOver")+" "+a.getAttribute("_classSize")};this.f_spriteMouseOut=function(a){if(a.getAttribute("_active")=="0")a.className=a.getAttribute("_classOut")+" "+a.getAttribute("_classSize")};this.f_spriteState=function(a){a.getAttribute("_active")=="0"?a.setAttribute("_active",1):a.setAttribute("_active",
0)};this.f_drawOpcion=function(a,b,d,e,f){IsArray(a)||(a=[a,a]);f||(f="");var g=a[0];a=a[1];b=IsNull(b)?"":this.f_drawIco(a,b,null,"style='cursor: pointer;'");if(IsNull(e))d="<TABLE cellpadding=2 cellspacing=0 border=0 style='cursor: pointer;' onmouseover='FHON(this)' onmouseout='FHOFF()' fh_tit='"+a+"' onclick='"+d+"'><TR><TD nowrap='nowrap'>"+b+"</TD><TD style='cursor: pointer;' onmouseover='FHON(this)' onmouseout='FHOFF()' fh_tit='"+a+"' nowrap='nowrap'>"+g+"</TD></TR></TABLE>";else{var i=e[0];
d="<TABLE cellpadding=0 cellspacing=0 border=0 style='cursor: pointer;' onmouseover='FHON(this)' onmouseout='FHOFF()' fh_tit='"+a+"' onclick='"+d+"'><TR><TD class='"+e[1]+"'>&#160;</TD><TD class='"+e[2]+"' colspan=2>&#160;</TD><TD class='"+e[3]+"'>&#160;</TD></TR><TR><TD class='"+e[8]+"'>&#160;</TD><TD class='"+i+" "+i+"Icon' nowrap='nowrap'>"+b+"</TD><TD class='"+i+" "+i+"Text' style='cursor: pointer;' "+f+" onmouseover='FHON(this)' onmouseout='FHOFF()' fh_tit='"+a+"' nowrap='nowrap'>"+g+"</TD><TD class='"+
e[4]+"'>&#160;</TD></TR><TR><TD class='"+e[7]+"'>&#160;</TD><TD class='"+e[6]+"' colspan=2>&#160;</TD><TD class='"+e[5]+"'>&#160;</TD></TR></TABLE>"}return d};this.f_printOpcion=function(a,b,d,e,f){document.write(this.f_drawOpcion(a,b,d,e,f))};this.f_drawIco=function(a,b,d,e){e||(e="");if(a)e+=" onmouseover='FHON(this)' onmouseout='FHOFF()' fh_tit='"+a+"'";if(d){d=d.f_replace("'",'"');e+=" onclick='"+d+"' style='cursor: pointer;'"}return this.f_drawSprite(b,e)};this.f_printIco=function(a,b,d,e){document.write(this.f_drawIco(a,
b,d,e))};this.m_a_sStartDraws=[];this.m_bNoContextMenu=this.m_bStartDraw=0;this.f_draw=function(a){var b="";if(!this.m_bStartDraw){this.m_bStartDraw=1;if(this.m_bNoContextMenu)document.oncontextmenu=function(){return false};for(var d=0;d<this.m_a_sStartDraws.length;d++)if(this.m_a_sStartDraws[d].substring(0,5).toUpperCase()=="<FUN>")eval(this.m_a_sStartDraws[d].substring(5,this.m_a_sStartDraws[d].length));else b+=eval(this.m_a_sStartDraws[d]);b+=this.f_innerSpritePanels(["IcoAdd","Datos0","Datos1",
"Activo"]);if(typeof StartDraws!="undefined")b+=StartDraws()}a&&alert(b);return b};this.m_nPrint=0;this.f_print=function(a,b){if(a){oILoading.f_showLoading(a);this.m_a_sPostStartUps[this.m_a_sPostStartUps.length]="oILoading.f_hideLoading();"}this.m_nPrint=1;document.write(this.f_draw(b))};this.m_a_sStartUps=[];this.m_a_sPostStartUps=[];this.m_bMac&&this.m_bIE4?ieMac_f_addElements(this.m_a_sStartUps,"oIGZ.f_checkLoadedLibs()"):this.m_a_sStartUps.f_addElements("oIGZ.f_checkLoadedLibs()");this.m_bMac&&
this.m_bIE4?ieMac_f_addElements(this.m_a_sStartDraws,"<FUN>oIGZ.f_checkLoadedLibs()"):this.m_a_sStartDraws.f_addElements("<FUN>oIGZ.f_checkLoadedLibs()");this.m_bInitialized=0;this.f_init=function(){if(this.m_bInitialized==0){this.m_bInitialized=1;switch(this.m_nPrint){case 0:ErrorJS("[i_igz] Detras del <BODY> falta o está mal escrita la línea:\n<SCRIPT>oIGZ.f_print()<\/SCRIPT>\n ");break;case 2:break;default:document.getElementsByTagName("BODY")[0].innerHTML.f_indexOf("oIGZ.f_print()")==-1&&ErrorJS("FALTA: <SCRIPT>oIGZ.f_print()<\/SCRIPT>",
"",3);for(var a=0;a<this.m_a_sStartUps.length;a++){oCore.f_debugLoad(this.m_a_sStartUps[a]);eval(this.m_a_sStartUps[a])}this.m_a_sStartUps=[];oCore.f_debugLoad("Init()");typeof Init!="undefined"&&Init();for(a=0;a<this.m_a_sPostStartUps.length;a++){oCore.f_debugLoad(this.m_a_sPostStartUps[a]);eval(this.m_a_sPostStartUps[a])}this.m_a_sPostStartUps=[];oCore.f_debugLoad("")}}};this.m_a_sOnResize=[];this.f_resize=function(){for(var a=0;a<this.m_a_sOnResize.length;a++)eval(this.m_a_sOnResize[a]);typeof Resize!=
"undefined"&&Resize()};this.m_a_sOnScroll=[];this.f_scroll=function(){for(var a=0;a<this.m_a_sOnScroll.length;a++)eval(this.m_a_sOnScroll[a]);typeof Scroll!="undefined"&&Scroll()};this.m_a_sLibsListed=[];this.m_a_sLibsLoaded=[];this.f_loadLib=function(a,b){oCore.f_debugLoad(a+" v"+b);this.m_maLibsLoaded.f_maNewRow([a,b])};this.f_include=function(a,b){ErrorJS("[igz.js] oIGZ.f_include("+a+","+b+") Deprecated. Usar this.f_require");var d;d=this.m_bIE4?document.all.Ncore.src.substring(0,document.all.Ncore.src.lastIndexOf("/")+
1):document.getElementById("Ncore").src.substring(0,document.getElementById("Ncore").src.lastIndexOf("/")+1);for(var e=0;e<arguments.length;e+=2)if(this.m_a_sLibsListed.f_indexOf(arguments[e])==-1){this.m_maLibsListed.f_maNewRow([arguments[e],arguments[e+1],0]);this.m_a_sLibsLoaded.f_indexOf(arguments[e])==-1&&document.write("<SCRIPT type='text/javascript' src='"+d+arguments[e]+".js'><\/SCRIPT>\n")}else if(arguments[e+1]>this.m_a_sLibsListed[e+1])this.m_a_sLibsListed[e+1]=arguments[e+1]};this.m_maLibsListed=
[["sLibName","nLibVersion","bRequired"],[]];this.m_maLibsLoaded=[["sLibName","nLibVersion"],[]];this.f_notRequire=function(a,b){this.m_maLibsListed.f_maNewRow([a,b,1])};this.f_require=function(a,b){var d=this.m_maLibsListed.f_maGetReg("sLibName",a);if(d==-1)this.m_maLibsListed.f_maNewRow([a,b,0]);else{var e=this.m_maLibsListed.f_maGetVal("nLibVersion",d);b>e&&this.m_maLibsListed.f_maSetVal("nLibVersion",b,d)}};this.f_checkLoadedLibs=function(a,b){if(!this.checkLoadedLibs){this.checkLoadedLibs=true;
for(var d,e,f=a?1:0,g=0,i="",h=0;h<this.m_maLibsListed.f_maGetRegs();h++){sLibName=this.m_maLibsListed.f_maGetVal("sLibName",h);e=this.m_maLibsListed.f_maGetVal("nLibVersion",h);if(this.m_maLibsListed.f_maGetReg("sLibName",sLibName)!=-1){d=this.m_maLibsLoaded.f_maGetValIf("nLibVersion","sLibName",sLibName);if(!e||d>=e)i+="OK - "+sLibName+" v"+e+" ["+d+"]\n";else{f=1;i+=d?"Error - "+sLibName+" v"+d+" [se necesita la version: "+e+"]\n":"Error - no se ha cargado la libreria :"+sLibName+" v"+e+"\n"}if(this.m_a_sLibsLoaded.f_maCountMatches("sLibName",
sLibName)>1){d=sLibName+" v"+d+" cargada "+this.m_a_sLibsLoaded.f_countMatches(sLibName)+" veces";if(!g){g++;ErrorJS(" ["+this.m_sKeyName+"] - 'WARNING' en la carga de librerías \n\n"+d,"",2)}i+="Warning - "+d+"\n"}}else if(!b){f=1;i+="Error - no se ha cargado la libreria :"+sLibName+" v"+e+"\n"}}f&&ErrorJS("["+this.m_sKeyName+"] 'ERROR' en la carga de librerías \n\n"+i,"",4,1);return i}};this.f_checkLibs=function(a,b){ErrorJS("[igz.js] oIGZ.f_checkLibs("+a+","+b+") Deprecated. Usar oIGZ.f_checkLib");
return this.f_checkLib(a,b)};this.f_checkLib=function(a,b){var d=0;if(this.m_maLibsLoaded.f_maGetValIf("nLibVersion","sLibName",a,0)>=b)d=1;return d};this.m_oMouseDOMTarget=null;this.m_a_oMouseDOMTarget=[];this.f_mouseEventsOn=function(a){var b=-1;if(a){b=this.m_a_oMouseDOMTarget.length;this.m_a_oMouseDOMTarget[b]=a;this.f_mouseMoveOn(a)}if(this.m_bIE){document.ondragstart=function(){event.returnValue=false};document.onmousedown=this.f_eventMouseDown;document.onmouseup=this.f_eventMouseUp;document.onmousewheel=
this.f_eventMouseWheel;if(a){this.m_a_oMouseDOMTarget[b].ondragstart=function(){event.returnValue=false};this.m_a_oMouseDOMTarget[b].onmousedown=this.f_objEventMouseDown;this.m_a_oMouseDOMTarget[b].onmouseup=this.f_objEventMouseUp}}else{document.addEventListener("mousedown",this.f_eventMouseDown,true);document.addEventListener("mouseup",this.f_eventMouseUp,true);document.addEventListener("DOMMouseScroll",this.f_eventMouseWheel,false);if(a){this.m_a_oMouseDOMTarget[b].addEventListener("mousedown",
this.f_objEventMouseDown,true);this.m_a_oMouseDOMTarget[b].addEventListener("mouseup",this.f_objEventMouseUp,true)}}return b};this.f_mouseEventsOff=function(){this.f_mouseMoveOff();if(this.m_bIE){document.onmousedown="";document.onmouseup="";for(var a=0;a<this.m_a_oMouseDOMTarget.length;a++){this.m_a_oMouseDOMTarget[a].onmousedown="";this.m_a_oMouseDOMTarget[a].onmouseup=""}}else{document.addEventListener("mousedown","",true);document.addEventListener("mouseup","",true);for(a=0;a<this.m_a_oMouseDOMTarget.length;a++){this.m_a_oMouseDOMTarget[a].addEventListener("mousedown",
"",true);this.m_a_oMouseDOMTarget[a].addEventListener("mouseup","",true)}}};this.f_eventMouseDown=function(){oIGZ.f_onMouseDown()};this.f_objEventMouseDown=function(){this.f_onMouseDown&&this.f_onMouseDown()};this.f_onMouseDown=function(){};this.f_eventMouseUp=function(){oIGZ.f_onMouseUp()};this.f_objEventMouseUp=function(){this.f_onMouseUp&&this.f_onMouseUp()};this.f_onMouseUp=function(){};this.f_eventMouseWheel=function(){oIGZ.f_onMouseWheel()};this.f_onMouseWheel=function(){};this.f_mouseMoveOn=
function(){if(this.m_bIE)document.onmousemove=this.f_eventMouseMove;else document.addEventListener("mousemove",this.f_eventMouseMove,true)};this.f_mouseMoveOff=function(){document.onmousemove="";this.m_bNS&&document.captureEvents("")};this.m_nMouseRelY=this.m_nMouseRelX=this.m_nMouseY=this.m_nMouseX=null;this.f_eventMouseMove=function(a){try{oIGZ.m_nMouseX=oIGZ.m_bIE?Number(event.clientX+document.documentElement.scrollLeft):Number(a.pageX);oIGZ.m_nMouseY=oIGZ.m_bIE?Number(event.clientY+document.documentElement.scrollTop):
Number(a.pageY);oIGZ.m_nMouseRelX=oIGZ.m_bIE?Number(event.clientX):Number(a.pageX-document.body.scrollLeft);oIGZ.m_nMouseRelY=oIGZ.m_bIE?Number(event.clientY):Number(a.pageY-document.body.scrollTop);oIGZ.f_onMouseMove()}catch(b){}};this.f_onMouseMove=function(){};this.m_nDebugPIX=0;this.f_debugPIX=function(a,b,d,e,f){d||(d=1);e||(e=1);f||(f="#00FF00");var g=document.createElement("SPAN");g.id="IGZ_DEBUG_PIX_"+this.m_nDebugPIX++;g.style.position="absolute";g.style.left=a;g.style.top=b;g.style.visibility=
"visible";g.style.backgroundColor=f;g.innerHTML="<IMG src='"+this.m_sRootPath+"pix/magic.gif' width="+d+" height="+e+" border=0 />";document.getElementsByTagName("BODY")[0].appendChild(g)};this.f_newIFrame=function(a,b,d,e,f,g,i){var h={};h.m_sObj="o"+a;h.m_sId=a;h.m_sName="N"+a;h.m_oIFrame=null;h.f_checkObjIFrame=function(){if(this.m_oIFrame==null)this.m_oIFrame=document.frames?document.frames[this.m_sName]:document.getElementById(this.m_sId)};h.f_load=function(j){this.f_checkObjIFrame();this.m_oIFrame.src=
j};h.f_onLoad=i;h.f_show=function(){this.f_checkObjIFrame();this.m_oFrameOn.style.display=""};h.f_hide=function(){this.f_checkObjIFrame();this.m_oFrameOn.style.display="none"};b="<IFRAME name='N"+a+"' id='"+a+"' src='"+b+"' width='"+d+"' height='"+e+"' style='visibility: "+(f?"visible":"hidden")+";' frameborder=0></IFRAME>";a=document.createElement("SPAN");a.innerHTML=b;b=document.getElementsByTagName("BODY")[0];if(g&&document.getElementById(g))b=document.getElementById(g);b.appendChild(a);h.f_checkObjIFrame();
return h};this.m_a_oKeysEvents=[];this.m_a_vKeysNames=["A",65,-1,"B",66,-1,"C",67,-1,"D",68,-1,"E",69,-1,"F",70,-1,"G",71,-1,"H",72,-1,"I",73,-1,"J",74,-1,"K",75,-1,"L",76,-1,"M",77,-1,"N",78,-1,"O",79,-1,"P",80,-1,"Q",81,-1,"R",82,-1,"S",83,-1,"T",84,-1,"U",85,-1,"V",86,-1,"W",87,-1,"X",88,-1,"Y",89,-1,"Z",90,-1,"0",48,-1,"1",49,-1,"2",50,-1,"3",51,-1,"4",52,-1,"5",53,-1,"6",54,-1,"7",55,-1,"8",56,-1,"9",57,-1,"N0",96,-1,"N1",97,-1,"N2",98,-1,"N3",99,-1,"N4",100,-1,"N5",101,-1,"N6",102,-1,"N7",103,
-1,"N8",104,-1,"N9",105,-1,"SHIFT",16,-1,"CTRL",17,-1,"ALT",18,-1,"TAB",9,-1,"SPACE",32,-1,"ENTER",13,-1,"LARROW",37,-1,"UARROW",38,-1,"RARROW",39,-1,"DARROW",40,-1,"F1",112,-1,"F2",113,-1,"F3",114,-1,"F4",115,-1,"F5",116,-1,"F6",117,-1,"F7",118,-1,"F8",119,-1,"F9",120,-1,"F10",121,-1,"F11",122,-1,"F12",123,-1,"ESC",27,-1,"INS",45,-1,"SUP",46,-1,"INI",36,-1,"FIN",35,-1,"REPAG",33,-1,"AVPAG",34,-1];this.m_a_nKeysDown=[];this.f_keysOn=function(){this.m_bActive=1;document.onkeydown=this.f_eventKeyDown;
document.onkeyup=this.f_eventKeyUp;this.m_bNS&&document.captureEvents(this.f_eventKeyDown|this.f_eventKeyUp)};this.f_keyOff=function(){this.m_bActive=0;document.onkeydown="";document.onkeyup="";this.m_bNS&&document.captureEvents("")};this.f_eventKeyDown=function(a){var b=0,d=oIGZ.m_bIE?event.keyCode:a.keyCode;for(oIGZ.m_a_nKeysDown.f_indexOf(d)==-1&&oIGZ.m_a_nKeysDown.f_addElements(d);b<oIGZ.m_a_oKeysEvents.length;)oIGZ.m_a_oKeysEvents[b++].f_keyDown(a,d)};this.f_eventKeyUp=function(a){for(var b=
0;b<oIGZ.m_a_oKeysEvents.length;)oIGZ.m_a_oKeysEvents[b++].f_keyUp(a)};this.f_keyEventRemove=function(a){oIGZ.m_a_oKeysEvents=oIGZ.m_a_oKeysEvents.f_delete(a,1)};this.f_keyEvent=function(a,b,d){this.m_nNav=oIGZ.m_bIE?1:2;if(oIGZ.m_bMozilla)this.m_nNav=1;this.m_a_nListenKeys=[];for(var e=0;e<a.length;e++)this.m_a_nListenKeys.f_addElements(oIGZ.m_a_vKeysNames[oIGZ.m_a_vKeysNames.f_indexOf(a[e])+this.m_nNav]);this.f_onKeyDown=b;this.f_onKeyUp=d;this.m_bActive=0;this.f_keyDown=function(f,g){var i=0,h=
0;for(i=0;i<oIGZ.m_a_nKeysDown.length;i++)this.m_a_nListenKeys.f_indexOf(oIGZ.m_a_nKeysDown[i])!=-1&&h++;if(h==this.m_a_nListenKeys.length&&this.f_onKeyDown){this.f_onKeyDown(f,g,oIGZ.m_a_nKeysDown);oIGZ.m_a_nKeysDown=[]}};this.f_keyUp=function(f,g){if(IsNull(g))g=oIGZ.m_bIE?event.keyCode:f.keyCode;oIGZ.m_a_nKeysDown=oIGZ.m_a_nKeysDown.f_delElements(g);this.f_onKeyUp&&this.f_onKeyUp()};this.f_isDown=function(f){var g=0;if(this.m_a_nKeys.f_indexOf(oIGZ.m_a_vKeysNames.f_indexOf(f)+this.m_nNav)!=-1)g=
1;return g};a=oIGZ.m_a_oKeysEvents.length;oIGZ.m_a_oKeysEvents[a]=this;oIGZ.m_a_sStartUps[oIGZ.m_a_sStartUps.length]="oIGZ.f_keysOn()";return a};this.f_getTopFrame=function(a){for(var b=parent;b.location.href!=top.location.href&&!b.document.getElementById(a);)b=b.parent;b.document.getElementById(a)||ErrorJS("No se encontro el FrameSet '"+a+"'","",3);return b};this.f_checkFrame=function(a){var b=null;if(typeof document.frames[a].document=="object")b=document.frames[a];return b};this.f_checkWin=function(a){if(typeof a.document!=
"object")a=null;return a};this.f_loadLang=function(a,b){this.f_loadLib("i_lang_"+a,b)};this.f_langText=function(a,b){if(GetType("igz_maLanguage",1))var d=this.f_langTextLib(igz_maLanguage,a,b);else ErrorJS(this.m_sKeyName+" [.f_langText] Falta 'i_lang_XX.js'");return d};this.f_langTextLib=function(a,b,d){if(GetType(a)){var e=a.f_maGetValIf("sEXMLText","sTAGName",b,null);if(e==null)ErrorJS(this.m_sKeyName+" [.f_langTextLib] no se ha encontrado ningún valor para '"+b+"' en "+a+"\n"+a.f_maDebug());else if(IsArray(e))e=
this.f_langFun(b,e,d);else if(d){a=0;for(b=d.length;a<b;a++)e=e.f_replace("<PARAM_"+a+" />",d[a])}}else ErrorJS(this.m_sKeyName+" [.f_langTextLib] Falta lib de textos:'"+a+"'");return e};this.f_langFun=function(a,b,d){var e=b[0];switch(a){case "FechaLimite":case "NumeroLimite":a=d[0];d=d[1];if(a){e+=b[1]+a;if(d)e+=b[2]}if(d)e+=b[3]+d;break;case "NumeroFormato":if(d[0])e+=b[1];if(d[1])e+=b[2]}return e};this.f_showMsg=function(a){alert(a)};this.f_drawMSG=function(a,b,d){var e="";if(a){e="<DIV id='DIV_IGZMSG' ";
if(IsNull(d))switch(b){case 0:d="msgError";break;case 1:d="msgOk";break;case 2:d="msgAviso";break;default:d="msgMensaje"}e+=" class='"+d+"'>"+a+"</DIV>"}return e};this.f_closeMSG=function(a){for(;a.parentNode&&a.id!="DIV_IGZMSG";)a=a.parentNode;if(a.id=="DIV_IGZMSG")a.style.display="none"}};oIGZ.f_loadLib("i_core",i_core_nVersion);
oIWin=new function(){this.m_sObj="oIWin";this.f_new=function(c,a,b,d,e,f,g,i,h,j,p,m,n,k,o,l){c.f_indexOf(" ")!=-1&&ErrorJS("[ oIWin.f_new] no se pueden utilizar espacios en sWin '"+c+"'");if(IsNull(b))b=640;if(IsNull(d))d=400;if(IsNull(e))e=screen.availWidth/2-b/2;if(IsNull(f))f=screen.availHeight/2-d/2;if(IsNull(g))g="yes";if(IsNull(i))i=1;if(IsNull(k))k=1;if(h==1){f=e=0;b=screen.availWidth;d=screen.availHeight}e="width="+b+",height="+d+",left="+e+",top="+f+",scrollbars="+g;if(k)e+=",resizable";
e+=",status="+(i?"yes":"no");e+=",toolbar="+(j?"yes":"no");e+=",menubar="+(n?"yes":"no");e+=",location="+(m?"yes":"no");e+=",hotkeys="+(o?"yes":"no");if(l)e+=",fullscreen="+(l?"yes":"no");if(oIGZ.m_bIE){if(c=window.open("",c,e)){c.location.href=a;if(b)try{c.resizeTo(b,d)}catch(q){}}}else c=window.open(a,c,e);return c};this.f_resize=function(c,a,b){if(b)if(oIGZ.m_bFF){window.resizeTo(c+100,a+300);window.innerWidth=c;window.innerHeight=a}else{b=oIGZ.m_bIE?document.body.clientHeight:window.innerHeight;
c-=oIGZ.m_bIE?document.body.clientWidth:window.innerWidth;a-=b;window.resizeBy(c,a)}else window.resizeTo(c,a)}};
oIFRAME=new function(){this.m_sObj="oIFRAME";this.f_parse2ObjIFRAME=function(c,a){oIFrame=GetElement(c);IsNull(oIFrame)&&ErrorJS("["+oIGZ.m_sKeyName+"] oIFRAME.f_parse2ObjIFRAME:"+c+"["+oIFrame+"]");oIFrame.m_sId=c;oIFrame.m_oParent=this;oIFrame.m_oIFrame=eval(c);oIFrame.f_load=function(b,d){var e=this;setTimeout(function(){if(d)e.f_onload=d;if(b)e.src=b},1)};oIFrame.f_onload=a;oIFrame.f_show=function(){this.style.display="inline";this.style.visibility="visible"};oIFrame.f_hide=function(){this.style.display=
"none";this.style.visibility="hidden"};oIFrame.m_vSizeX=String(oIFrame.getAttribute("m_vSizeX"));oIFrame.m_vSizeY=String(oIFrame.getAttribute("m_vSizeY"));if(oIFrame.m_vSizeX.toUpperCase()=="AUTO")oIFrame.m_vSizeX=oIFrame.m_vSizeX.toUpperCase();else if(!isNaN(oIFrame.m_vSizeX))oIFrame.m_vSizeX=Number(oIFrame.m_vSizeX);if(oIFrame.m_vSizeY.toUpperCase()=="AUTO")oIFrame.m_vSizeY=oIFrame.m_vSizeY.toUpperCase();else if(!isNaN(oIFrame.m_vSizeY))oIFrame.m_vSizeY=Number(oIFrame.m_vSizeY);oIFrame.f_getHREF=
function(){var b;b=oIGZ.m_bIE?this.contentWindow.document.location.href:this.contentDocument.location.href;if(b.toLowerCase()=="about:blank")b="";return b};if(oIFrame.m_vSizeY<0||oIFrame.m_vSizeX<0)oIGZ.m_a_sOnResize.push(this.m_sObj+".fillIFrame('"+c+"')");if(oIGZ.m_bIE)oIFrame.onreadystatechange=function(){if(this.readyState=="complete"){if(oIFrame.m_vSizeY<0||oIFrame.m_vSizeX<0)oIFrame.m_oParent.fillIFrame(c);if(oIFrame.m_vSizeX=="AUTO"||oIFrame.m_vSizeY=="AUTO"){oIFrame.m_stOnChangeSize&&clearInterval(oIFrame.m_stOnChangeSize);
oIFrame.m_stOnChangeSize=setInterval(function(){if(oIFrame&&oIFrame.contentWindow&&oIFrame.contentWindow.document&&oIFrame.contentWindow.document.body){if(oIFrame.m_vSizeX=="AUTO")oIFrame.width=oIFrame.contentWindow.document.body.scrollWidth;if(oIFrame.m_vSizeY=="AUTO")oIFrame.height=oIFrame.contentWindow.document.body.scrollHeight}},200)}oIFrame.f_onload&&oIFrame.f_onload()}};else oIFrame.onload=function(){oIFrame=this;if(oIFrame.m_vSizeX<0||oIFrame.m_vSizeY<0){if(oIFrame.m_vSizeX<0)this.width=1;
if(oIFrame.m_vSizeY<0)this.height=1;oIFrame.m_oParent.fillIFrame(c)}if(oIFrame.m_vSizeX=="AUTO"||oIFrame.m_vSizeY=="AUTO"){if(oIFrame.m_vSizeX=="AUTO")this.width=1;if(oIFrame.m_vSizeY=="AUTO")this.height=1;oIFrame.m_stOnChangeSize&&clearInterval(oIFrame.m_stOnChangeSize);oIFrame.m_stOnChangeSize=setInterval(function(){try{if(oIFrame&&oIFrame.contentDocument&&oIFrame.contentDocument.body){oIFrame.m_vSizeX=="AUTO"&&oIFrame.contentDocument.body.clientWidth&&oIFrame.contentDocument.body.clientWidth!=
oIFrame.contentDocument.body.scrollWidth&&oIFrame.setAttribute("width",oIFrame.contentDocument.body.scrollWidth+16);oIFrame.m_vSizeY=="AUTO"&&oIFrame.contentDocument.body.clientHeight&&oIFrame.setAttribute("height",oIFrame.contentDocument.body.scrollHeight)}}catch(b){}},200)}oIFrame.f_onload&&oIFrame.f_onload()};this.m_maIFramesInit.f_maSetValIf("sId",c,"oIFrame",oIFrame);return oIFrame};this.f_autoIFrame=function(c){if(c&&c.contentWindow&&c.contentWindow.document&&c.contentWindow.document.body){if(c.m_vSizeX==
"AUTO")c.width=c.contentWindow.document.body.scrollWidth;if(c.m_vSizeY=="AUTO")c.height=c.contentWindow.document.body.scrollHeight}};this.fillIFrame=function(c){if(GetType("oGFX",1)){c=GetElement(c);if(c.m_vSizeY<0){var a=oIGZ.m_bIE?document.body.clientHeight:parent.innerHeight;if(a<document.body.scrollHeight&&Number(c.height)+Number(oGFX.f_getPosY(c))-Number(c.m_vSizeY)<document.body.scrollHeight)a=document.body.scrollHeight;c.height=Number(c.m_vSizeY)+a-Number(oGFX.f_getPosY(c))}if(c.m_vSizeX<0){a=
oIGZ.m_bIE?document.body.clientWidth:parent.innerWidth;if(a<document.body.scrollWidth&&Number(c.width)+Number(oGFX.f_getPosX(c))-Number(c.m_vSizeX)<document.body.scrollWidth)a=document.body.scrollWidth;c.width=Number(c.m_vSizeX)+a-Number(oGFX.f_getPosX(c))}}else ErrorJS("[i_gfx.js] requerido por oIFRAME")};this.m_maIFramesInit=null;this.m_sServerLang="html";this.f_draw=function(c,a,b,d,e,f,g,i){if(this.m_maIFramesInit==null)this.m_maIFramesInit=[["sId","f_onload","oIFRame"],[]];this.m_maIFramesInit.f_maNewRow([c,
i,""]);e=e==0?"no":"auto";if(!IsNull(b)&&b.toString().toUpperCase()=="AUTO"||!IsNull(d)&&d.toString().toUpperCase()=="AUTO")e="auto";if(IsNull(f))f=0;if(IsNull(g))g="";if(!IsNull(b)&&String(b).toUpperCase()!="AUTO"||!isNaN(b)&&b>=0)g+=" width ='"+b+"'";if(!IsNull(d)&&String(d).toUpperCase()!="AUTO"||!isNaN(d)&&d>=0)g+=" height='"+d+"'";if(i=a){if(oIGZ.m_a_sStartUps.f_indexOf("oIFRAME.f_init()")!=-1)a=""}else a=oIGZ.m_sRootPath+"cargando."+this.m_sServerLang;return"<IFRAME id='"+c+"' src='"+a+"' m_sSrc='"+
i+"' name='"+c+"' m_vSizeX='"+b+"' m_vSizeY='"+d+"' scrolling='"+e+"' frameborder='"+f+"' "+g+"></IFRAME>"};this.f_print=function(c,a,b,d,e,f,g,i){document.write(this.f_draw(c,a,b,d,e,f,g,i))};this.f_create=function(c,a,b,d,e,f,g,i,h){if(GetType(c)==String)c=GetElement(c);if(IsNull(c))c=document.getElementsByTagName("BODY")[0];var j=document.createElement("SPAN");j.innerHTML=this.f_draw(a,b,d,e,f,g,i,h);c.appendChild(j.childNodes[0]);c=this.f_parse2ObjIFRAME(a,h);c.f_load(c.getAttribute("m_sSrc"));
return c};this.f_init=function(){if(this.m_maIFramesInit!=null)for(var c,a=0,b=this.m_maIFramesInit.f_maGetRegs();a<b;a++){c=this.f_parse2ObjIFRAME(this.m_maIFramesInit.f_maGetVal("sId",a),function(){});c.f_load(c.getAttribute("m_sSrc"),this.m_maIFramesInit.f_maGetVal("f_onload",a))}};oIGZ.m_a_sStartUps.push(this.m_sObj+".f_init()")};
oIntelyweb=new function(){this.m_sObj="oIntelyweb";this.m_nVersion=1;this.m_sProyectoID="";this.m_bOnErrorHide=false;this.m_bOnErrorINT=this.m_bOnErrorPRO=this.m_bOnlyFirstError=1;this.m_bOnErrorDEV=0;this.m_sUserID="js1.000";this.m_sTipo="Prog. Cliente";this.m_sLenguaje="JavaScript";this.m_nImportancia=5;this.m_sOnErrorPage="http://pub.intelygenz.com/ig_intelygenz/ig04_intelyweb/bug_report.asp";this.m_sEntorno=oCore.m_sServer;this.m_bOnError=this.m_bOnErrorPRO;this.f_errorLog=function(c,a,b,d,e,
f,g,i){if(this.m_sProyectoID){var h;if(this.m_bOnError){if(!d)d=this.m_sUserID;if(e==null)e=document.location.href;if(!f)f=this.m_sTipo;if(g==null)g=this.m_sLenguaje;if(!i)i=this.m_nImportancia;h="id="+escape(this.m_sProyectoID);h+="&tipo="+escape(f);h+="&so="+escape(navigator.platform);h+="&nav="+escape(navigator.appName);h+="&nav_ver="+escape(navigator.appVersion);h+="&page="+escape(e);h+="&line="+escape(b);h+="&error="+escape(c);h+="&file="+escape(a);h+="&entorno="+this.m_sEntorno.toUpperCase();
h+="&user="+escape(d);h+="&leng="+escape(g);h+="&imp="+escape(i);c=this.m_sOnErrorPage+"?"+h;if(oIGZ.m_bDOM&&document.getElementsByTagName("BODY").length>0)oIntelywebIFrame=new oIGZ.f_newIFrame("IntelywebIFrame",c,500,100);else wOnError=window.open(c,"wOnError","width=1,height=1,scrollbars=no,toolbar=no,location=no,menu=no,resizable=no,left=0,top=0")}if(this.m_bOnlyFirstError)this.m_bOnError=0}else ErrorJS("[i_core.js] f_errorLog() La variable 'this.m_sProyectoID' está vacía.",this);return this.m_bOnErrorHide};
this.m_bActive=0;this.f_on=function(){if(this.m_sEntorno=="DEV"){this.m_sOnErrorPage="http://aspirina/ig_intelygenz/ig04_intelyweb/bug_report.asp";this.m_bOnError=this.m_bOnErrorDEV}else if(this.m_sEntorno=="INT")this.m_bOnError=this.m_bOnErrorINT;if(!this.m_bActive){this.m_bActive=1;this.f_onError=window.onerror;window.onerror=function(c,a,b,d,e,f,g,i){return oIntelyweb.f_errorLog(c,a,b,d,e,f,g,i)}}};this.f_off=function(){if(this.m_bActive){this.m_bActive=0;window.onerror=this.f_onError}}};
oILoading=new function(){this.m_sObj="oILoading";this.f_showLoading=function(c){this.m_oSPAN=document.createElement("SPAN");this.m_oSPAN.style.position="absolute";this.m_oSPAN.style.top=0;this.m_oSPAN.style.left=0;this.m_oSPAN.style.zIndex=9999;this.m_oSPAN.innerHTML="<IFRAME id='NILoading' width=1 height=1 src='"+c+"' frameborder=0 />";document.body.appendChild(this.m_oSPAN);this.m_oSPAN.m_oIFrame=document.getElementById("NILoading");this.m_oSPAN.m_oIFrame.m_nResizeIndex=oIGZ.m_a_sOnResize.length;
this.f_resizeIFrame();oIGZ.m_a_sOnResize[this.m_oSPAN.m_oIFrame.m_nResizeIndex]=this.m_sObj+".f_resizeIFrame()"};this.f_resizeIFrame=function(){this.m_oSPAN.m_oIFrame.width=document.body.clientWidth;this.m_oSPAN.m_oIFrame.height=oIGZ.m_bIE?document.body.clientHeight:parent.innerHeight};this.f_hideLoading=function(){oIGZ.m_a_sOnResize.f_delete(this.m_oSPAN.m_oIFrame.m_nResizeIndex);this.m_oSPAN.parentNode.removeChild(this.m_oSPAN)}};
function WinDebug(c){if(top.window.i_igz_wWinDebug==null||!top.window.i_igz_wWinDebug){top.window.i_igz_wWinDebug=NewWin("wIGZWinDebug","",200,screen.availHeight,0,0,1,0,0,0,0,0,0,1);top.window.i_igz_wWinDebug_nLine=0;top.window.i_igz_wWinDebug.document.write("<HTML><HEAD><TITLE>iWinDebug v0.12 BETA</TITLE></HEAD><BODY style='background-color: #EEEEEE; font-family: Arial; font-size: 11px; color: #000000;'></BODY></HTML>");top.window.i_igz_wWinDebug.m_oBODY=top.window.i_igz_wWinDebug.document.body}var a=
"Undefined";if(oIGZ.m_bIE)a=FunCaller();top.window.i_igz_wWinDebug_nLine++;top.window.i_igz_wWinDebug.m_oBODY.m_sCleaner="[<A href='javascript:opener.top.window.i_igz_wWinDebug.m_oBODY.innerHTML=document.body.m_sCleaner;'>CLEAN</A>]<BR />";top.window.i_igz_wWinDebug.m_oBODY.innerHTML=top.window.i_igz_wWinDebug.m_oBODY.m_sCleaner+"(<B>"+top.window.i_igz_wWinDebug_nLine+"</B>) [<A href='javascript://' title='"+a+"'>Caller</A>] -> "+c+"<BR /><BR />"+top.window.i_igz_wWinDebug.m_oBODY.innerHTML}
function SetImg(c,a){c.src=a}function Opacity(c,a){if(oIGZ.m_bIE)c.style.filter="progid:DXImageTransform.Microsoft.Alpha(Opacity:"+a+")";else c.style.opacity=a/100}
function OpenHiddenIFrame(c,a,b){if(b)NewWin("wOpenHiddenIFrameDebug",a);else if(document.getElementById(c)!=null)document.getElementById(c).src=a;else{c="<IFRAME name='"+c+"' id='"+c+"' src='"+a+"' width=0 height=0 style='visibility: hidden;' frameborder=0></IFRAME>";a=document.createElement("SPAN");a.innerHTML=c;document.getElementsByTagName("BODY")[0].appendChild(a)}}
function NewWin(c,a,b,d,e,f,g,i,h,j,p,m,n,k,o,l){ErrorJS("[igz.js] NewWin() deprecated. Usar oIWin.f_new()");return oIWin.f_new(c,a,b,d,e,f,g,i,h,j,p,m,n,k,o,l)}
function RequestParam(c,a){var b=null;if(location.search!=null&&location.search!=""){var d=unescape(location.search.substring(1,location.search.length)),e=d.indexOf(c+"=");if(e!=-1){e+=c.length+1;b=d.substring(e,d.length);d=b.indexOf("&");if(d!=-1)b=b.substring(0,d);if(IsNull(b)||b=="null"||b=="undefined")b=null}}if(IsNull(b)&&!IsUndefined(a))b=a;return b}function Debug(c){ErrorJS(c)}function IsVisible(c){var a=1;if(c&&(c.style.visibility=="hidden"||c.style.display=="none"))a=0;return a}
function GetElement(c,a){var b=document.getElementById(c);if(b==null&&a)b={};return b}function GetElementsByName(c){for(var a=[],b=0,d=document.getElementsByName(c).length;b<d;b++)a.push(document.getElementsByName(c)[b]);return a}function GetElementsByTag(c){for(var a=[],b=0,d=document.getElementsByTagName(c).length;b<d;b++)a.push(document.getElementsByTagName(c)[b]);return a}
function GetParentNode(c,a,b,d){for(c=c.parentNode;c!=null&&(c.tagName!=a||c.tagName==a&&b&&c.getAttribute(b)==null||c.tagName==a&&b&&d&&c.getAttribute(b).indexOf(d)==-1);)c=c.parentNode;return c}function ieMac_f_countMatches(c,a,b,d){var e=c;c=0;var f="g";if(b)f+="i";if(d)e=e.substr(d);if(a=e.match(RegExp(a,f)))c=a.length;return c}function ieMac_f_addElements(c){for(var a=IsArray(arguments[1])?arguments[1]:arguments,b=1;b<a.length;b++)c[c.length]=a[b]}oIGZ.f_loadLib("i_igz",i_igz_nVersion);
function FHON(){ErrorJS("No has cargado i_gfx.js")}function FHOFF(){ErrorJS("No has cargado i_gfx.js")}oCore.f_debugLoad("i_igz END",1);
i_lang_es_nVersion=1.032;if(typeof oIGZ!="undefined"){oIGZ.f_require("i_igz",0.747);oIGZ.f_loadLang("es",i_lang_es_nVersion)}else window.status=location.pathname+"[i_lang_es "+i_lang_es_nVersion+"] No se pudo encontrar oIGZ.";Date.prototype.m_a_sDateNames=[["Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Domingo"],["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],["L","M","X","J","V","S","D"]];
igz_maLanguage=[["sLib","sTAGName","sEXMLText"],["i_core","Date","nD/sMM/nYYYY","i_core","DateShort","nD de sMM de nYYYY","i_core","DateLong","sD nD de sMM, de nYYYY","i_core","Number","I.DDd","i_core","NumberInt","I","i_core","NumberTxt",".I,DDd","i_core","NumberIntTxt",".I","i_core","Dinero",".I,DD","i_core","Moneda","&euro;","i_form","CheckExtension","sin extensión","i_form","CorregirCampo","Por favor, corrija el campo donde está el cursor","i_form","CorregirCP","Por favor, introduce el código postal correctamente",
"i_form","CorregirEMail","Por favor, escribe una dirección de correo electrónico válida","i_form","CorregirMultiplo1000","Por favor, introduce un número multiplo de 1000","i_form","CorregirNumeroN","Por favor, el campo donde esta el cursor debe ser un número positivo y usar punto si lleva decimales","i_form","CorregirNumeroO","Por favor, introduce un número entero mayor o igual a cero, sin decimales","i_form","CorregirNumeroQ","Por favor, el campo donde esta el cursor debe ser un número y usar punto si lleva decimales",
"i_form","CorregirPass","Las contraseñas no coinciden","i_form","CorregirTF","Por favor, corrija el número de teléfono","i_form","CorregirDNICIFNIF","Por favor, este campo debe ser un DNI, NIE, CIF correcto con la letra al principio [Axxxxxxx] o un NIF correcto con la letra al final [xxxxxxxY]","i_form","CorregirNIF","Por favor, este campo debe ser un NIF correcto con la letra al final [xxxxxxxY]","i_form","CorregirTarjetaCredito","Por favor, el numero de tarjeta de credito no es valido","i_form",
"CorregirFechaDD","Por favor, corrija el día","i_form","CorregirFechaMM","Por favor, corrija el mes","i_form","CorregirFechaYY","Por favor, corrija el año","i_form","CorregirLongitud","Por favor, el campo donde está el cursor debe tener una longitud de al menos <PARAM_0 /> caracteres.","i_form","CorregirLongitudMaxima","Por favor, el texto es demasiado largo. Sobran <PARAM_0 /> caracteres.","i_form","CorregirValor","Por favor, el campo donde está el cursor no admite el valor <PARAM_0 />","i_form",
"CorregirCaracter","Por favor, este campo no admite el caracter: ' <PARAM_0 /> '","i_form","CorregirFecha","Por favor, introduce una fecha válida en formato: <PARAM_0 />\nFecha: <PARAM_1 />","i_form","CorregirHora","Por favor, introduce una hora válida en formato: HH:mm\nValor actual: <PARAM_0 />","i_form","RellenarCampo","Por favor, rellene este campo <PARAM_0 />","i_form","RellenarPass","Por favor, rellene la contraseña","i_form","RellenarRadio","Por favor, marque alguno de los botones de selección <PARAM_0 />",
"i_form","RellenarSelect","Por favor, selecciona una opción <PARAM_0 />","i_form","RellenarSelectMultiple","Por favor, selecciona al menos una opción <PARAM_0 />","i_form","SalirSinGuardar","Ha efectuado <PARAM_0 /> cambio<PARAM_1 />.\n¿Está seguro de que quiere continuar sin grabar los cambios?","i_form","FechaLimite",["Por favor, la fecha no puede ser"," menor del "," ni"," mayor del "],"i_form","NumeroLimite",["Por favor, este campo no puede ser"," menor de "," ni"," mayor de "],"i_form","NumeroFormato",
["Por favor, el campo donde esta el cursor debe ser un número ","entero","sin puntos de miles"],"i_form","TextoShield","Procesando datos","i_form","ValidarExtension","No se aceptan ficheros de tipo: <PARAM_0 />\nLos tipos de ficheros aceptados son:\n<PARAM_1 />","i_tablas","Pagina","Página","i_tablas","Resultados","resultados","i_tablas","Primera","Primera","i_tablas","Ultima","Última","i_tablas","Anterior","anterior","i_tablas","Siguiente","siguiente","i_xbd","CargarDatos","Cargando datos...","i_xbd",
"CargarCorrecta","Datos cargados correctamente","i_xbd","CargarError","Ocurrió un error al intentar cargar los datos!!!","i_xbd","GuardarDatos","Guardando datos...","i_xbd","GuardarCorrecto","Datos guardados correctamente","i_xbd","GuardarError","Ocurrió un error al intentar guardar los datos!!!","i_marray","ResultadoParcial","Solo se muestran <B><PARAM_0 /></B> resultados de un total de <B><PARAM_1 /></B> ","i_xbd","CargandoDatos","cargando datos...","i_xbd","DatosGuardados","datos guardados correctamente",
"i_xbd","OcurrioError","ocurrió un error al intentar guardar los datos!!!","i_xbd","EnvioCancelado","envío cancelado"]];
i_marray_nVersion=0.3;GetType("i_marray_nInstances",1)&&ErrorJS("[i_marray"+i_marray_nVersion+"] Esta página ha cargado i_marray más de una vez","",2);oCore.m_bIsServer||oIGZ.f_loadLib("i_marray",i_marray_nVersion);var i_marray_nInstances=0;
function MArray(s,r,t,u){i_marray_nInstances++;this.m_sObj="[NotAnObject] MArray_instance_"+i_marray_nInstances;this.m_nVersion=i_marray_nVersion;this.m_sKeyName="[MArray v"+this.m_nVersion+"]";this.m_private_bBdTruncated=t;this.m_private_nBdCount=u;this.f_isTruncated=function(){return IsNull(this.m_private_bBdTruncated)||this.m_private_bBdTruncated==0?0:1};this.f_getBdTotalCount=function(){var a=0;return a=this.f_isTruncated()?this.m_private_nBdCount:this.f_length()};this.f_getTruncatedMsg=function(){var a=
"";if(this.f_isTruncated())a=oIGZ.f_langText("ResultadoParcial",[this.f_length(),this.f_getBdTotalCount()]);return a};var o="";if(arguments.length!=0){if(arguments.length>4)o+=" tiene ["+arguments.length+"] parámetros.\n";if(!o&&(!s||!IsArray(s)||!s.length))o+="El Array de COLUMNAS no es correcto";if(arguments.length==2&&!IsNull(r)&&!IsArray(r))o+="El Array de VALORES no es correcto";if(!o){this.m_a_sCOLs=s.f_copy();r||(r=[]);this.m_a_aROWs=r}if(!o&&this.m_a_aROWs.length>0&&this.m_a_aROWs[0]&&this.m_a_sCOLs.length!=
this.m_a_aROWs[0].length&&!(this.m_a_aROWs.length==1&&this.m_a_aROWs[0]&&this.m_a_aROWs[0].length==0))o+="número de campos ("+this.m_a_sCOLs.length+") distinto del número de valores de cada campo ("+this.m_a_aROWs[0].length+")\n";o&&ErrorJS("MArray invalido:"+o+"\na_sCOLs: ["+s+"]\na_sROWs: ["+r+"]")}else{this.m_a_sCOLs=[];this.m_a_aROWs=[]}this.f_fillFromOldMArray=function(a,b){if(b)this.m_a_aROWs=[];this.m_a_sCOLs=a[0];for(var c=this.m_a_sCOLs.length,d=-1,e=a.f_maGetRegs();++d<e;)this.f_addRow(a[1].slice(d*
c,d*c+c))};this.f_debug=function(a,b){var c="COLs.\n ["+this.m_a_sCOLs+"]\nROWs.\n";if(b||this.f_length()<6)var d=0;else{for(d=0;d<3;d++)c+="("+d+") ["+this.m_a_aROWs[d]+"]\n";c+=". . .\n";d=this.f_length()-3}for(;d<this.f_length();d++)c+="("+d+") ["+this.m_a_aROWs[d]+"]\n";c+="Total Reg. "+this.f_length();c=this.m_sKeyName+" - DEBUG\n"+c;if(a)c=c.f_replace("\n","<BR />");return c};this.f_getColPos=function(a){return this.m_a_sCOLs.f_indexOf(a)};this.f_getColName=function(a){return this.m_a_sCOLs[a]};
this.f_getCols=function(){return this.m_a_sCOLs.length};this.f_subCols=function(){return[].concat(this.m_a_sCOLs)};this.f_clean=function(){this.m_a_aROWs=[]};this.f_subColsPos=function(a){for(var b,c=[],d=0;d<a.length;d++){b=this.f_getColPos(a[d]);b!=-1&&c.push(b)}return c};this.f_addColEXML=function(a,b){oIEXML.f_addColEXML(this,a,b)};this.f_modColEXML=function(a,b){oIEXML.f_modColEXML(this,a,b)};this.f_concat=function(a){this.m_a_aROWs=this.m_a_aROWs.concat(a.m_a_aROWs)};this.f_boolean=function(a,
b,c,d){if(IsMArrayOld(a)){maOtherDataTmp=new MArray;maOtherDataTmp.f_fillFromOldMArray(a);a=maOtherDataTmp}if(IsNull(d)||IsArray(d)&&d.length==0)d=this.f_subCols();var e=[],f;switch(b){case -1:b=0;for(f=a.f_length();b<f;b++)e=e.concat(this.f_subIndexOf(d,a.f_getRow(b)));this.f_delRows(e);break;case 1:c=3;b=0;for(f=a.f_length();b<f;b++)this.f_subIndexOf(d,a.f_subVal(d,b)).length!=0&&e.push(b);break;case 2:c=3;b=0;for(f=a.f_length();b<f;b++)this.f_subIndexOf(d,a.f_subVal(d,b)).length==0&&e.push(b)}d=
null;switch(c){case 1:d=this.f_subRows(e);break;case 2:d=this.f_subRows(e,1);break;case 3:d=a.f_subRows(e,1)}return d};this.f_addRow=function(a,b,c,d){if(IsNull(a)||a==""){a=[];for(var e=0,f=this.f_getCols();e<f;e++)a.push("")}if(c)if(!d&&this.f_getCols()&&a.length!=this.f_getCols())ErrorJS(this.m_sKeyName+".f_addRow: Número incorrecto de columnas. Registro:["+a.length+"]. MArray ["+this.f_getCols()+"]\nRegistro: {"+a+"}\n"+FunCaller(),2);else this.m_a_aROWs[b]=a;else this.f_addRows([a],b,d)};this.f_addRows=
function(a,b,c){if(!c)for(c=0;c<a.length;c++)this.f_getCols()&&a[c].length!=this.f_getCols()&&ErrorJS(this.m_sKeyName+".f_addRows: número incorrecto de columnas. Registro:["+a[c].length+"]. MArray ["+this.f_getCols()+"]\nRegistro: {"+a[c]+"}\n"+FunCaller(),2);if(!b&&b!=0||b>=this.f_length())this.m_a_aROWs=this.m_a_aROWs.concat(a);else{c=this.m_a_aROWs.slice(0,b);c=c.concat(a);this.m_a_aROWs=c=c.concat(this.m_a_aROWs.slice(b,this.f_length()))}};this.f_addCol=function(a,b){if(IsArray(b))b.length!=this.f_length()&&
ErrorJS("["+this.m_sKeyName+".f_addCol] Número incorrecto de valores. ["+b+"]("+b.length+") -> ("+this.f_length+")");else if(IsNull(b))b=Array(this.f_length());else{var c=b;b=[];for(var d=0;d<this.f_length();d++)b.push(c)}this.m_a_sCOLs[this.m_a_sCOLs.length]=a;for(d=0;d<this.f_length();d++)this.m_a_aROWs[d].push(b[d])};this.f_countMatches=function(a,b,c,d,e){var f=0;if(c)a=a.toLowerCase();e||(e=0);for(var j=e;j<this.f_length();j++){e=this.f_getVal(b,j);if(c)e=e.toLowerCase();if(d)e.indexOf(a)!=-1&&
f++;else e==a&&f++}return f};this.f_setVal=function(a,b,c){var d=this.f_getColPos(a);if(d!=-1)this.m_a_aROWs[c][d]=b;else ErrorJS(FunCaller()+"["+this.m_sKeyName+".f_setVal] no existe el campo ["+a+"] en el MArray ["+this.m_a_sCOLs+"]")};this.f_setValIf=function(a,b,c,d,e,f){if(!IsArray(a)){a=[a];b=[b]}a=this.f_subIndexOf(a,b);if(a.length){b=-1;if(e)this.f_setVal(c,d,a[0]);else if(f)this.f_setVal(c,d,a[a.length-1]);else for(;++b<a.length;)this.f_setVal(c,d,a[b])}};this.f_length=function(){return this.m_a_aROWs.length};
this.f_getCol=function(a){var b=this.f_getColPos(a),c=[];b==-1&&ErrorJS(FunCaller()+"["+this.m_sKeyName+".f_getCol] no existe el campo ["+a+"] en el MArray ["+this.m_a_sCOLs+"]");for(a=this.f_length();--a>=0;)c.push(this.m_a_aROWs[a][b]);return c.reverse()};this.f_getVal=function(a,b,c){if(isNaN(b)||b<0||b>=this.f_length())IsUndefined(c)&&ErrorJS(FunCaller()+"["+this.m_sKeyName+".f_getVal] no existe el registro "+b+".El MArray tiene "+this.f_length()+". Campo: ("+this.m_a_sCOLs+")");else{var d=this.f_getColPos(a);
if(d!=-1)c=this.m_a_aROWs[b][d];else IsUndefined(c)&&ErrorJS("["+this.m_sKeyName+".f_getVal] no existe la columna '"+a+"' en el MArray ("+this.m_a_sCOLs+")")}return c};this.f_getValIf=function(a,b,c,d,e){a=this.f_getReg(a,b,e);if(a!=-1)d=this.f_getVal(c,a);return d};this.f_subDistinctSub=function(a,b,c){b=this.f_subVals(b,a);var d=b.f_subDistinct(1);return d=c?a.f_getVals(d):b.f_getVals(d)};this.f_subDistinct=function(a,b,c,d,e){var f=[];a=this.f_getCol(a);if(a.length)f=a.f_subDistinct(b,!c,d,!e);
return f};this.f_subVal=function(a,b,c){return this.f_subVals(a,[b],c)};this.f_subVals=function(a,b,c){if(c)a=this.m_a_sCOLs;else IsArray(a)||(a=[a]);if(b)IsArray(b)||(b=[b]);else b=[0];var d=[],e=[];a=this.f_subColsPos(a);for(var f=b.length,j=a.length,l=0;l<f;l++){e=[];for(var m=0;m<j;m++)e.push(this.m_a_aROWs[b[l]][a[m]]);d.push(e)}if(c)d=d.length?new MArray(this.m_a_sCOLs,d):new MArray(this.m_a_sCOLs);return d};this.f_subValsIf=function(a,b,c,d,e,f,j){a=this.f_subRegs(a,b,d);if(e){e=c;if(IsArray(c))e=
c[0];a=this.f_subDistinctSub(a,e,1)}j||(a=this.f_subVals(c,a,f));return a};this.f_subRegs=function(a,b,c){var d=[];a=this.f_getColPos(a);if(c)for(c=0;c<this.f_length();c++)this.m_a_aROWs[c][a].toUpperCase()==b.toUpperCase()&&d.push(c);else for(c=0;c<this.f_length();c++)this.m_a_aROWs[c][a]==b&&d.push(c);return d};this.f_getReg=function(a,b,c){var d=-1;a=this.f_getColPos(a);if(a!=-1){var e=0;if(c)for(e=this.f_length()-1;e>-1&&d==-1;){if(this.m_a_aROWs[e][a]==b)d=e;e--}else for(;e<this.f_length()&&
d==-1;){if(this.m_a_aROWs[e][a]==b)d=e;e++}}return d};this.f_subRows=function(a,b){for(var c=[],d=0;d<a.length;d++)c[c.length]=this.m_a_aROWs[a[d]];if(b)c=new MArray(this.m_a_sCOLs,c);return c};this.f_getRow=function(a,b){var c=this.m_a_aROWs[a];if(b)c=new MArray(this.m_a_sCOLs,[c]);return c};this.f_subRowsIf=function(a,b,c,d,e){return this.f_subRows(this.f_subIndexOf(a,b,c,d),e)};this.f_subIndexOf=function(a,b,c,d,e,f,j,l,m,q){if(IsNull(f))f=1;if(IsNull(e))e=1;if((IsArray(a)||arguments.length<7)&&
f==1){if(!IsArray(a)){a=[a];b=[b]}var n=0,i=b[n],g=[],k=this.f_getCol(a[n]),h=k.length;if(c)if(e)for(;--h>=0;)k[h]!=i&&g.push(h);else for(;--h>=0;)k[h].toString().toUpperCase()!=i.toString().toUpperCase()&&g.push(h);else if(d)if(e)for(;--h>=0;)k[h].indexOf(i)!=-1&&g.push(h);else for(;--h>=0;)k[h].toString().toUpperCase().indexOf(i.toString().toUpperCase())!=-1&&g.push(h);else if(e)for(;--h>=0;)k[h]==i&&g.push(h);else for(;--h>=0;)k[h].toString().toUpperCase()==i.toString().toUpperCase()&&g.push(h);
if(a.length>1)for(var p;++n<a.length;){k=this.f_getCol(a[n]);i=b[n];h=g.length;p=[];if(c)if(e)for(;--h>=0;)k[g[h]]!=i&&p.push(g[h]);else for(;--h>=0;)k[g[h]].toUpperCase()!=i.toUpperCase()&&p.push(g[h]);else if(d)if(e)for(;--h>=0;)k[g[h]].indexOf(i)!=-1&&p.push(g[h]);else for(;--h>=0;)k[g[h]].toUpperCase().indexOf(i.toUpperCase())!=-1&&p.push(g[h]);else if(e)for(;--h>=0;)k[g[h]]==i&&p.push(g[h]);else for(;--h>=0;)k[g[h]].toUpperCase()==i.toUpperCase()&&p.push(g[h]);g=p}if(g.length&&a.length&1)g=g.reverse();
return g}else{n=[];k=this.f_getCol(a);if(k.length){i=f;g=e;IsArray(b)||(b=[b]);for(h=0;h<b.length;h++)n=n.concat(k.f_subIndexOf(b[h],g,i,j,l,0,0,q));if(b.length>1&&!m)n=n.f_subDistinct(0,!i,m,1)}return n}};this.f_getClone=function(a){if(a){a.m_a_sCOLs.f_delete(0);a.m_a_aROWs.f_delete(0)}else a=new MArray;for(var b=0,c=this.m_a_aROWs.length;b<c;b++)a.f_addRow(this.m_a_aROWs[b]);a.m_a_sCOLs=a.m_a_sCOLs.concat(this.m_a_sCOLs);return a};this.f_sumaCampos=function(a,b){IsArray(b)||(b=[b]);for(var c=this.f_subValByRegs(a,
b),d=[],e=0;e<b.length;e++)d=d.concat(c[e]);return d.f_suma()};this.f_sumaCol=function(a){return this.f_sumaColIf(a)};this.f_sumaColIf=function(a,b,c,d){var e=[];e=b?this.f_subValsIf(b,c,a,null,d):this.f_getCol(a);return e.f_suma()};this.f_search=function(){};this.f_subValByRegs=function(a,b){var c=[];if(a&&!IsArray(a))a=[a];if(!a||a.length==0)a=this.m_a_sCOLs;for(var d=0;d<b.length;d++){c[d]=[];for(var e=0;e<a.length;e++)c[d][e]=this.f_getVal(a[e],b[d])}return c};this.f_sort=function(a,b,c,d,e,f){var j=
[];a=this.f_getCol(a);if(a.length)j=a.f_sort(b,c,e,f);d&&this.f_addCol(d,j);return j};this.f_multiSortBETA=function(a,b,c,d){var e,f,j,l,m,q,n,i="",g=a[0],k=0;f=g.toUpperCase().indexOf("<DESC>");if(f!=-1){k=1;g=g.substring(f)}g=g.f_trim();a_vValores=this.f_sort(g,0,k);l=this.f_sort(g,1,k);i+="Odenado por: "+g+(k?" DESC":" ASC")+"\n";i+="--a_vValores["+a_vValores+"]\n";i+="--a_nIndices["+l+"]\n";i+="\n";for(e=1;e<a.length;e++){g=a[e];k=0;f=g.toUpperCase().indexOf("<DESC>");if(f!=-1){k=1;g=g.substring(f)}g=
g.f_trim();f=0;for(i+="Odenando por: "+g+(k?" DESC":" ASC")+"\n";f<l.length;){m=a_vValores.f_subIndexOf(a_vValores[f],1);if(m.length>1){a_sSub=this.f_subValByRegs(g,m);m=a_sSub.f_sort(1,k);i+="---ordenando subarrays de elementos repetidos: "+a_vValores[f]+"\n";i+="-----a_nSub["+m+"]\n";q=l.slice(f,f+m.length);i+="-----creando subarray de indices a_nIndices de ("+f+" a "+(m.length+1)+"\n";n=Array(q.length);i+="---aplicando suborden de a_nSub["+m+"] a a_nSubInd["+q+"]\n";for(j=0;j<q.length;j++)n[m[j]]=
q[j];i+="---borrando indices: a_nIndices["+l+"]\n";l=l.f_delete(f,m.length);i+="-----de "+f+" hasta "+m.length;i+="-----borrados -> a_nIndices["+l+"]\n";i+="---insertando indices nuevos:\n";i+="-----a_nSubNew["+n+"]\n";l=l.f_insert(n,f);i+="-----a_nIndices["+l+"]\n"}j=m.length;if(j==0)j=1;f+=j}a_vValores=this.f_subValByRegs(g,l);i+="--a_vValores["+a_vValores+"]\n";i+="--a_nIndices["+l+"]\n";i+="-------------------------------------------------\n"}i+="--a_vValores["+a_vValores+"]\n";i+="--a_nIndices["+
l+"]\n";d&&ErrorJS("["+this.m_sKeyName+".f_maMultiSort] [TRACE] (Esto NO es un ERROR):\n"+i);c&&this.f_addCol(c,l);return b?l:[]};this.f_delRows=function(a,b){if(IsArray(a)){a=a.sort(OrdenNumerico).reverse();for(var c=0,d=a.length;c<d;c++)this.m_a_aROWs=this.m_a_aROWs.f_delete(a[c],1)}else{c=a;if(c!=0&&!c)c=this.f_length()-1;if(!b||c+b>this.f_length())b=1;this.m_a_aROWs=this.m_a_aROWs.f_delete(c,b)}};this.f_delRow=function(a){this.f_delRows(a,1)};this.f_delRowIf=function(a,b){var c=this.f_getReg(a,
b);c!=-1&&this.f_delRow(c)};this.f_delRowsIf=function(a,b,c,d){this.f_delRows(this.f_subIndexOf(a,b,c,d))};this.f_toMArrayOld=function(){for(var a=[this.m_a_sCOLs,[]],b=0;b<this.f_length();b++)a[1]=a[1].concat(this.m_a_aROWs[b]);return a};this.f_maAddCol=function(a,b){this.f_addCol(a,b)};this.f_maDeleteRow=function(a,b){this.f_delRow(a,b)};this.f_maCountMatches=function(a,b,c,d,e){return this.f_countMatches(a,b,c,d,e)};this.f_maDebug=function(a,b){return this.f_debug(0,b)};this.f_maGetColPos=function(a){return this.f_getColPos(a)};
this.f_maSetValIf=function(a,b,c,d){this.f_setValIf(a,b,c,d)};this.f_maGetRegs=function(){return this.f_length()};this.f_maGetCol=function(a){return this.f_getCol(a)};this.f_maGetColName=function(a){return this.f_getColName(a)};this.f_maGetCols=function(){return this.f_getCols()};this.f_maGetVal=function(a,b,c){return IsArray(b)?this.f_subVals(a,b):this.f_getVal(a,b,c)};this.f_maGetValIf=function(a,b,c,d){return this.f_getValIf(b,c,a,d,0)};this.f_maGetReg=function(a,b){return this.f_getReg(a,b,0)};
this.f_maGetRegIf=function(a,b){return this.f_getReg(a,b,0)};this.f_maGetRows=function(a){return IsArray(a)?this.f_subRows(a,0):this.f_getRow(a)};this.f_maNewRow=function(a,b){this.f_addRow(a,b)};this.f_maSetVal=function(a,b,c){this.f_setVal(a,b,c)};this.f_maSubDistinct=function(a,b,c,d,e){return this.f_subDistinct(a,b,c,d,e)};this.f_maSubIndexOf=function(a,b,c,d,e,f,j,l,m){return this.f_subIndexOf(a,b,0,e,d,c,e,f,j,l,m)};this.f_maSort=function(a,b,c,d,e,f){return this.f_sort(a,b,c,d,e,f)};this.f_maSumaCampos=
function(a,b){return this.f_sumaCampos(a,b)};this.f_maSubValByRegs=function(a,b){return this.f_subValByRegs(a,b)};this.f_maSumaColIf=function(a,b,c,d){return this.f_sumaColIf(a,b,c,d)};this.f_maSubSort=function(a,b,c,d,e,f){var j=[];b=this.f_maGetVal(b,a);if(b.length)j=b.f_sort(c,d,e,f);if(c)j=a.f_subVal(j);return j}};
i_xbd_nVersion=0.284;oIGZ.f_loadLib("i_xbd",i_xbd_nVersion);oIGZ.f_require("i_igz",0.756);oIGZ.f_require("i_lang_"+ICore.m_sLang,1.018);
oXBD=new function(){this.m_sObj="oXBD";this.m_nVersion=i_xbd_nVersion;this.m_sKeyName="[i_xbd v"+i_xbd_nVersion+"]";this.ResponseTypes={OK:200,FORBBIDEN:403,NOT_FOUND:404,RESOURCE_NOT_ALLOWED:405,GET_TOO_LONG:414,INTERNAL_SERVER_ERROR:500,RESPONSE_JS_ERROR:665,UNEXPECTED_CONNECTION_CLOSURE:666,RESPONSE_IFRAME_ERROR:667,IFRAME_ERROR_BODY_NOT_FOUND:668};this.m_bAutoShield=1;this.m_nSendType=0;this.m_nTimeoutMSG=1E3;this.m_a_sDefaultMSG=[oIGZ.f_langText("CargarDatos"),oIGZ.f_langText("CargarCorrecta"),
oIGZ.f_langText("CargarError"),oIGZ.f_langText("EnvioCancelado")];this.m_a_sClassNameMSG=["msgMensaje","msgOk","msgError","msgAviso","msgIco"];this.m_a_sXMLHttpIE=["Microsoft.XMLHTTP"];this.f_getXMLHttpIE=function(){for(var a=null,d=0,b=this.m_a_sXMLHttpIE.length;a==null&&d<b;d++)try{a=new ActiveXObject(this.m_a_sXMLHttpIE[d])}catch(c){a=null}return a};this.m_a_sCallsLog=[];this.f_saveLog=function(a){oXBD.m_a_sCallsLog.push((new Date).f_drawFormat("nYYYYnMMnDD nHH24:nMMN:nSS")+" "+a)};this.m_nUniqueId=
0;this.m_maStreams=[["nUniqueId","vId","oXMLHttpRequestOrIFrame","nType","bUsed","bNoRemove"],[]];this.f_openStream=function(a,d,b,c){var e=0,f=b==0?"XMLHttp":"IFrame",g="",h=null,i=this.m_maStreams.f_maGetReg("vId",a);if(i==-1){var k=this.m_maStreams.f_maSubIndexOf(["nType","bUsed","bNoRemove"],[b,0,0],1);if(k.length>0){i=k[0];g="USO STREAM DEL POOL "}}else g="REUTILIZO STREAM ";if(i!=-1){h=this.m_maStreams.f_maGetVal("oXMLHttpRequestOrIFrame",i);if(!IsNull(a)&&a!=this.m_maStreams.f_maGetVal("vId",
i)){this.m_maStreams.f_maSetVal("vId",a,i);this.m_maStreams.f_maSetVal("bNoRemove",1,i);h.m_vId=a;h.m_bNoRemove=1;d=this.m_maStreams.f_maGetVal("nUniqueId",i);oXBD.f_saveLog("CONVIERTE STREAM UNIQUE("+this.m_maStreams.f_maGetVal("nUniqueId",i)+") EN ESTATIC ID ("+this.m_maStreams.f_maGetVal("vId",i)+")")}a=this.m_maStreams.f_maGetVal("vId",i);b=this.m_maStreams.f_maGetVal("nType",i);e=this.m_maStreams.f_maGetVal("bUsed",i);c=this.m_maStreams.f_maGetVal("bNoRemove",i);this.m_maStreams.f_maSetVal("nUniqueId",
d,i)}else if(this.m_maStreams.f_maGetRegs()<this.m_nPoolSize){h={};if(b==0)h.m_oXMLReq=window.XMLHttpRequest?new XMLHttpRequest:this.f_getXMLHttpIE();if(b==1)h.m_oIFrame=oIFRAME.f_create(document.getElementsByTagName("BODY")[0],"IFRAME_XBD_Multipart_"+d,"",0,0,0,0,"style='display: none;'",function(){});g="NUEVO STREAM ";h.m_vId=a==null?"ID_"+d:a;h.m_bNoRemove=c;this.m_maStreams.f_maNewRow([d,a,h,b,0,c]);i=this.m_maStreams.f_maGetRegs()-1}h.m_nUniqueId=d;a="[nUniqueID("+d+"), vId("+a+"), oXMLHttpRequestOrIFrame("+
h+"), nType("+b+"), bUsed(1), bNoRemove("+c+")]";if(e==1){oXBD.f_saveLog("FORCE CLOSE STREAM "+a);this.f_closeStream(d,0)}oXBD.f_saveLog(g+" "+f+" "+a);oXBD.f_saveLog("STREAMs EN EL POOL IDs("+this.m_maStreams.f_maGetCol("nUniqueId")+") USED("+this.m_maStreams.f_maGetCol("bUsed")+")");this.m_maStreams.f_maSetVal("bUsed",1,i);return h};this.f_closeStream=function(a,d){var b=this.m_maStreams.f_maGetValIf("nType","nUniqueId",a,null);oXBD.f_saveLog("CLOSE STREAM Unique("+a+") de ("+this.m_maStreams.f_maGetCol("nUniqueId")+
") bForceDestruction("+d+") Type("+b+")");if(b!=null){var c=this.m_maStreams.f_maGetValIf("oXMLHttpRequestOrIFrame","nUniqueId",a);if(b==0){b=c.m_oXMLReq;b.onreadystatechange=function(){};b.abort()}else b==1&&c.m_oIFrame.f_load(oIGZ.m_sRootPath+"cargando.html",function(){});oXBD.f_saveLog("LIBERA STREAM "+c.m_vId+" bNoRemove("+c.m_bNoRemove+")");this.f_delStream(a)}};this.f_delStream=function(a){this.m_maStreams.f_maSetVal("bUsed",0,this.m_maStreams.f_maGetReg("nUniqueId",a))};this.f_abort=function(a,
d){xbd_warning=IsNull(d)?this.m_a_sDefaultMSG[3]:d;oXBD.f_warning(this.m_oMSG,xbd_warning,0);this.f_closeStream(a,1)};this.f_finish=function(a){oXBD.f_saveLog("CANCEL STREAM CALL UNIQUE("+a+")");var d=this.m_maStreams.f_maGetReg("vId",a);if(d==-1)d=this.m_maStreams.f_maGetReg("nUniqueId",a);if(d==-1)ErrorJS(this.m_sKeyName+" - No existe ningún Stream con la ID "+a);else{nUniqueId=this.m_maStreams.f_maGetVal("nUniqueId",d);oXBD.f_saveLog("CANCEL STREAM CONFIRM UNIQUE("+nUniqueId+")");this.f_closeStream(nUniqueId,
1)}};this.m_nPoolSize=10;this.f_checkPool=function(a){var d=0;if(this.m_maStreams.f_maSubIndexOf(["nType","bUsed","bNoRemove"],[a,0,0]).length<this.m_nPoolSize)d=1;return d};this.f_openInNewWin=function(){};this.f_reloadXJS=function(a,d,b){this.f_load(a,d,b)};this.f_load=function(a,d,b,c,e,f,g,h,i,k){if(!IsNull(b)&&GetType(b)!=String){b=b;if(a!=b)b.action=a;a=b;b=c;var l=e;c=f;e=b;b=l}this.m_a_sDefaultMSG=[oIGZ.f_langText("CargarDatos"),oIGZ.f_langText("CargarCorrecta"),oIGZ.f_langText("CargarError"),
oIGZ.f_langText("EnvioCancelado")];this.f_submit(a,d,b,c,e,f,g,h,i,k)};this.f_loadSync=function(a,d,b,c,e,f,g,h){this.f_load(a,d,b,c,e,f,g,h,true)};this.f_loadType=function(a,d,b,c,e,f,g,h,i){a=this.m_maTypes.f_maGetValIf("nSendType","sSendType",a.toUpperCase(),0);this.f_submit(d,b,c,e,f,a,g,h,i)};this.f_save=function(a,d,b,c,e,f,g,h,i){this.m_a_sDefaultMSG=[oIGZ.f_langText("GuardarDatos"),oIGZ.f_langText("GuardarCorrecto"),oIGZ.f_langText("GuardarError"),oIGZ.f_langText("EnvioCancelado")];this.f_submit(a,
d,b,c,e,f,g,h,i)};this.f_saveSync=function(a,d,b,c,e,f,g,h){this.f_save(a,d,b,c,e,f,g,h,true)};this.f_saveType=function(a,d,b,c,e,f,g,h,i){a=this.m_maTypes.f_maGetValIf("nSendType","sSendType",a.toUpperCase(),0);this.f_submit(d,b,c,e,f,a,g,h,i)};this.m_maTypes=[["sSendType","nSendType"],["DEFAULT",0,"SHOWERRORS",1,"NOMSGS",2,"USERMSGS",3]];this.f_submitType=function(a,d,b,c,e,f,g,h,i){a=this.m_maTypes.f_maGetValIf("nSendType","sSendType",a.toUpperCase(),0);return this.f_submit(d,b,c,e,f,a,g,h,i)};
this.f_submitID=function(a,d,b,c,e,f,g){return this.f_submit(d,b,c,e,f,g,a)};this.f_submitTypeID=function(a,d,b,c,e,f,g){return this.f_submitType(d,b,c,e,f,g,a)};this.f_submitSync=function(a,d,b,c,e,f,g,h){this.f_submit(a,d,b,c,e,f,g,h,true)};this.m_oXml=null;this.f_loadXml=function(a,d,b,c,e,f,g,h,i){this.f_load(a,d,b,c,e,f,g,h,i,1)};this.f_submit=function(a,d,b,c,e,f,g,h,i,k){var l=this;if(IsNull(h))h=this.m_nUniqueId++;this.f_checkPool(this.f_getSubmitType(a))||!IsNull(g)?this.f_privateSubmit(a,
d,b,c,e,f,g,h,i,k):setTimeout(function(){l.f_submit(a,d,b,c,e,f,g,h,i,k)},500);return h};this.f_getSubmitType=function(a){var d=0;if(GetType(a)!=String&&!IsNull(a)&&a.enctype.toUpperCase().indexOf("MULTIPART")!=-1)d=1;return d};this.f_privateSubmit=function(a,d,b,c,e,f,g,h,i,k){if(!f)f=this.m_nSendType;var l=null,j=a,m=null,o=0;if(GetType(a)!=String)if(a.action){m=a;j=m.action}else ErrorJS(this.m_sKeyName+" El <FORM> '"+a.name+"' no tiene action");if(IsNull(j)||j=="")ErrorJS(this.m_sKeyName+" No has especificado una URL o <FORM> ");
if(j){j=j.f_replace("xjs=1","xjs=0");if(e==2)this.f_openInNewWin(j,m);else{if(b){l=GetElement(b);l==null&&ErrorJS(this.m_sKeyName+" No existe el elemento '"+b+"' en la página '"+document.location.href+"'","",1)}else if(f!=2){this.f_createElementMSG();l=this.m_oMSG;l.id==this.m_sIdMSG&&this.f_rePositionAutoMSG()}if(!c||IsNull(c)||!IsArray(c))c=this.m_a_sDefaultMSG;else{a=0;for(var q=this.m_a_sDefaultMSG.length;a<q;a++)if(a>=c.length||IsNull(c[a]))c[a]=this.m_a_sDefaultMSG[a]}a=new Date;if(j.indexOf("?")==
-1)j+="?";j+="&xbd_nocache="+a.getTime();if(!IsNull(m)&&m.length>0)(o=oIGZ.f_checkLib("i_form",1.366))&&FixAtSubmit(m);g_bSubmitOn=1;if(!k&&(this.f_getSubmitType(m)==1||e==3)){m.method="POST";GetType("oGFX",1)&&this.m_bAutoShield&&f==0&&!b&&oShield.f_on(c[0]);this.f_submitIFrame(j,m,d,l,c,f,g,h)}else{GetType("oGFX",1)&&this.m_bAutoShield&&f==0&&!b&&oShield.f_on(c[0]);this.f_submitXMLHttpRequest(j,m,d,l,c,f,g,h,i,k);if(o){IForm.f_resetFixAtSubmit(m);IForm.f_resetColor(m)}}}}};this.f_submitXMLHttpRequest=
function(a,d,b,c,e,f,g,h,i,k){var l=this.f_openStream(g,h,0,IsNull(g)?0:1);h=l.m_nUniqueId;l.f_call=b;var j=l.m_oXMLReq,m=this,o={};o.checkResponse=function(){if(j.readyState==1)oXBD.f_saveLog("ESPERANDO RESPUESTA ("+a+") - readyState("+j.readyState+")");else if(j.readyState==2)oXBD.f_saveLog("CARGADO: PROCESANDO RESPUESTA ("+a+") - readyState("+j.readyState+")");else if(j.readyState==3)oXBD.f_saveLog("CARGADO: RESPUESTA CARGADA ("+a+") - readyState("+j.readyState+")");else if(j.readyState==4){if(r)j.onreadystatechange=
function(){};oXBD.f_saveLog("CARGADO: FIN DE CARGA ("+a+") - readyState("+j.readyState+") ");var s=0;try{var n=j.status}catch(v){oXBD.f_saveLog("****** ERROR FATAL ********** Se ha perdido el estado de Request, no se puede seguir. Petición abortada. El servidor devolvió la conexión.");n=666}var p=String(j.responseText);if(n==200){try{oIGZ.f_checkLib("i_form",1.459)&&d&&IFile.f_clearAll(d);if(!(GetType("xbd_noresponse",1)&&xbd_noresponse>=1))if(k){this.m_oXml=j.responseXml;m.m_oXml=j.responseXml;m.m_sResponse=
p}else eval(p)}catch(t){if(String(p).toUpperCase().indexOf("[[XBD@REDIRECT]]")!=-1)if(confirm("Su sesión ha caducado y los últimos datos puedes que no se hayan grabado.\n\nSi quiere conservar los datos pulse [Aceptar] para logarse en una nueva ventana del navegador o [Cancelar] para usar esta misma ventana"))oIWin.f_new("wXBD",a);else top.document.location.href=a;else{oCore.m_sServer=="DEV"&&oXBD.f_openInNewWin(a,d);oXBD.f_error("\nERROR EN EL JAVASCRIPT DEVUELTO\n\n"+ErrorEx(t)+"\n\n"+p,a,"JS",c,
e[2],f);s=1}}finally{GetType("oGFX",1)&&oXBD.m_bAutoShield&&setTimeout(function(){oShield.f_off()},500);g_bSubmitOn=0}if(s==1){GetType("xbd_error",1)&&xbd_error!=""&&xbd_error!=0&&oXBD.f_error("",a,"XBD",c,xbd_error,f);IsArray(b)&&b.length>2&&b[2]!=null&&b[2](n)}else if(GetType("xjs_error",1)&&xjs_error!=""&&xjs_error!=0){oXBD.f_error("",a,"XJS",c,xjs_error,f);IsArray(b)&&b.length>2&&b[2]!=null&&b[2](n)}else if(GetType("xbd_warning",1)&&xbd_warning!=""&&xbd_warning!=0){oXBD.f_warning(c,xbd_warning,
f);IsArray(b)&&b.length>1&&b[1]!=null&&b[1](n)}else if(!s)try{oXBD.f_saveLog("EJECUCION DE RETORNO DE ("+a+") - ID("+g+") - Unique("+h+"\n\t\t"+b);if(!(GetType("xbd_noresponse",1)&&xbd_noresponse==2))if(b)IsArray(b)&&b.length>0&&b[0]!=null?b[0](n):b(n);IsNull(c)||oXBD.f_message(c,e[1],"OK",oXBD.m_nTimeoutMSG,f)}catch(u){oXBD.f_error("\nERROR EN LA FUNCIÓN DE RETORNO.\n\n"+b+"\n\n"+ErrorEx(u),a,"JS",c,e[2],f)}}else if(n==500){oCore.m_sServer=="DEV"&&oXBD.f_openInNewWin(a,d);oXBD.f_error("\nERROR EN LA RESPUESTA DEL SERVIDOR\n\n"+
p,a,n,c,e[2],f);IsArray(b)&&b.length>2&&b[2]!=null&&b[2](n)}else if(n==404){oXBD.f_error("\nNO SE HA ENCONTRADO LA PÁGINA\n",a,n,c,e[2],f);IsArray(b)&&b.length>2&&b[2]!=null&&b[2](n)}else if(n==503)top.document.location.href=a;else{if(n==666){oCore.m_sServer=="DEV"&&oXBD.f_openInNewWin(a,d);oXBD.f_error("\nERROR FATAL\n\nEl servidor devolvió la conexión.\n\nComprueba que no exiten XBD en ejecución antes de abandonar la página, en caso de que sea necesario controlarlo puedes usar un método síncrono.\n\nTambién puedes ocultar este mensaje de error usando un envio con TYPE 'NOMSG'(2) o 'USERMSG'(3) pero puede suponer un error en la lógica."+
p,a,n,c,e[2],f)}else oXBD.f_error("\nERROR NO CONTROLADO EN EL RETORNO DEL FICHERO "+a+"\n\n"+j.getAllResponseHeaders()+"\n\nCONTENT:\n"+p,a,"ERROR!",c,e[2],f);IsArray(b)&&b.length>2&&b[2]!=null&&b[2](n)}oXBD.f_closeStream(h,0)}};var q="GET";IsNull(d)||(q="POST");IsNull(c)||oXBD.f_message(c,e[0],"MSG",0,f);var r=true;if(i==1)r=false;if(r)j.onreadystatechange=o.checkResponse;a=this.f_cleanURL(a);j.open(q,a,r);j.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");i=oXBD.f_form2String(d);
i=this.f_cleanURL(i);oXBD.f_saveLog("XMLHTTP SEND UNIQUE("+l.m_nUniqueId+") ID("+l.m_vId+") URL("+a+i+")");j.send(i);r||o.checkResponse()};this.f_cleanURL=function(a){a=a.f_replace("?&","?");if(a.lastIndexOf("&")==a.length-1)a=a.substring(0,a.length-1);return a};this.f_submitIFrame=function(a,d,b,c,e,f,g,h){c!=null&&oXBD.f_message(c,e[0],"MSG",0,f);var i=this.f_openStream(g,h,1,IsNull(g)?0:1);h=i.m_nUniqueId;i.f_call=b;oIFrame=i.m_oIFrame;oIFrame.f_load(oIGZ.m_sRootPath+"cargando.html",function(){oIFrame.f_onload=
function(){if(!(GetType("xbd_noresponse",1)&&xbd_noresponse==2)){var k=-1,l=0,j="";if(oIFrame.contentWindow.document.body){oIFrame.contentWindow.document.body.innerHTML="/*<TEXTAREA>*/"+oIFrame.contentWindow.document.body.innerHTML+"/*</TEXTAREA>*/";j=oIGZ.m_bIE?String(oIFrame.contentWindow.document.body.innerText):String(oIFrame.contentWindow.document.body.textContent)}else k=oXBD.ResponseTypes.IFRAME_ERROR_BODY_NOT_FOUND;oXBD.f_closeStream(h,0);try{if(!(GetType("xbd_noresponse",1)&&xbd_noresponse==
1)){var m="/**/";if(oIGZ.m_bIE)m="/*<TEXTAREA>*/";j.indexOf(m)==-1&&ErrorJS(oXBD.m_sKeyName+": [AVISO 1] el XBD '"+a+"' parece MULTIPART y los contenidos JS no estan dentro de un /*<TEXTAREA>*/ y podrían dar error si contienen HTML\n\n"+j);eval(j);k=oXBD.ResponseTypes.OK}GetType("oGFX",1)&&oXBD.m_bAutoShield&&setTimeout(function(){oShield.f_off()},500);oIGZ.f_checkLib("i_form",1.459)&&d&&IFile.f_clearAll(d)}catch(o){k=oXBD.ResponseTypes.RESPONSE_IFRAME_ERROR;oCore.m_sServer=="DEV"&&oXBD.f_openInNewWin(a,
d);oXBD.f_error("\nERROR EN EL JAVASCRIPT DEVUELTO AL ENVIAR MULTIPART.\nRecuerda que el contenido JS devuelto debe estar entre /*<TEXTAREA>*/ y /*</TEXTAREA>*/\n\n"+ErrorEx(o)+"\nVerifique si la ruta es correcta: "+a+"\nVerifique si la respuesta es código JavaScript correcto "+j,a,"MULTIPART",c,e[2],f);l=1}finally{g_bSubmitOn=0}if(l==1){GetType("xbd_error",1)&&xbd_error!=""&&xbd_error!=0&&oXBD.f_error("",a,"XBD",c,xbd_error,f);IsArray(b)&&b.length>2&&b[2]!=null&&b[2](k)}else if(GetType("xjs_error",
1)&&xjs_error!=""&&xjs_error!=0)oXBD.f_error("",a,"XJS",c,xjs_error,f);else if(GetType("xbd_warning",1)&&xbd_warning!=""&&xbd_warning!=0){oXBD.f_warning(c,xbd_warning,f);IsArray(b)&&b.length>1&&b[1]!=null&&b[1](k)}else if(!l)try{if(b)IsArray(b)&&b.length>0&&b[0]!=null?b[0](k):b(k);IsNull(c)||oXBD.f_message(c,e[1],"OK",oXBD.m_nTimeoutMSG,f)}catch(q){oXBD.f_error("\nERROR EN LA FUNCIÓN DE RETORNO.\n\n"+b+"\n\n"+ErrorEx(q),a,"JS",c,e[2],f)}}};oXBD.f_saveLog("IFRAME SEND UNIQUE ("+i.m_nUniqueId+") ID("+
i.m_vId+") URL("+a+oXBD.f_form2String(d)+")\nRETURN:\n\t\t"+i.f_call);d.target=oIFrame.name;d.submit();IForm.f_resetFixAtSubmit(d);IForm.f_resetColor(d)})};this.f_form2String=function(a){var d=[];if(!IsNull(a)&&a.length>0){var b=oIGZ.f_checkLib("i_form",1.366);b||ErrorJS("ATENCION! Si utilizas XBD sin i_form algunos campos podrían no enviarse en el formato correcto");for(var c,e,f,g=[],h,i=-1,k=a.length;++i<k;){c=a[i];if((f=c.name)&&!c.disabled){e=String(c.type).toUpperCase();sIFormType=f.substring(0,
1);if(e.indexOf("SELECT")!=-1)if(e.indexOf("MULTIPLE")!=-1)if(sIFormType.toUpperCase()=="Y"){e=0;for(h=c.options.length;e<h;e++)g.push(c.options[e].value)}else{e=0;for(h=c.options.length;e<h;e++)c.options[e].selected&&g.push(c.options[e].value)}else c.selectedIndex!=-1&&g.push(c[c.selectedIndex].value);else if(e=="CHECKBOX"&&sIFormType=="K")c.checked?g.push(c.value):g.push(0);else if(e!="CHECKBOX"&&e!="RADIO"||c.checked)g.push(c.value);if(g.length>0){e=0;for(h=g.length;e<h;e++){vValue=b?encodeURIComponent(g[e]):
encodeURIComponent(this.f_fixValue(f,g[e]));vValue=vValue.f_replace("u20AC",encodeURIComponent("80"));d.push(encodeURIComponent(f)+"="+vValue+"&")}g=[]}}}}return d.join("")};this.f_fixValue=function(a,d){if(g_a_vFixAtSubmit){var b=g_a_vFixAtSubmit.f_indexOf(a);if(b!=-1&&g_a_vFixAtSubmit[b+1]!="Tipo_Y")d=g_a_vFixAtSubmit[b+1]}return d};this.f_error=function(a,d,b,c,e,f){GetType("oGFX",1)&&oXBD.m_bAutoShield&&setTimeout(function(){oShield.f_off()},500);g_bSubmitOn=0;oXBD.f_saveLog("ERROR ("+a+") - URL("+
d+") - ErrorMSG("+e+")");var g=4;if(c!=null){sColor="ERROR";e=a?"<DIV onclick='ErrorJS();oIGZ.f_closeMSG(this)' class='msgError' style='filter:Alpha(Opacity=80)' title='Pulsa para ver la descripción del error y cerrar'><B><U>[ERROR "+b+"]</U></B> "+e+"</DIV>":"<DIV onclick='oIGZ.f_closeMSG(this)' class='msgError' title='Ocultar aviso'>"+e+"</DIV>";oXBD.f_message(c,e,sColor,0,f);GetType("oGFX",1)&&oGFX.f_opacity(c,75);if(oCore.m_sServer!="DEV")g=0}a&&ErrorJS(oXBD.m_sKeyName+" ("+d+")\n"+a,"",g);xbd_error=
""};this.f_warning=function(a,d,b){GetType("oGFX",1)&&oXBD.m_bAutoShield&&setTimeout(function(){oShield.f_off()},500);g_bSubmitOn=0;if(a!=null){sColor="WARNING";d="<DIV onclick='oIGZ.f_closeMSG(this)' style='cursor:pointer' title='Ocultar aviso'>"+d+"</DIV>";oXBD.f_message(a,d,sColor,0,b)}xbd_warning=""};this.f_message=function(a,d,b,c,e){var f=this.m_bAutoShield,g,h=this.m_a_sClassNameMSG[0];switch(b){case "OK":g=1;h=this.m_a_sClassNameMSG[1];break;case "ERROR":c=g=0;h=this.m_a_sClassNameMSG[2];
f=0;break;case "WARNING":g=2;c=0;h=this.m_a_sClassNameMSG[3];f=0}if(d.toUpperCase().indexOf("<IMG ")!=-1)h+=" "+this.m_a_sClassNameMSG[4];if(e==1&&g!=0)e=2;if(!f&&e!=2){a.innerHTML=oIGZ.f_drawMSG(d,g,h);if(c>0)if(GetType("oGFX",1)&&b!="ERROR")oGFX.f_fade(a,100,0,c/10,10,function(){if(b!="ERROR")a.innerHTML=""});else a.stMessage=setTimeout(function(){if(b!="ERROR")a.innerHTML=""},c);else{a.stMessage&&clearTimeout(a.stMessage);if(GetType("oGFX",1)){oGFX.f_fadeStop(a);oGFX.f_opacity(a,100)}}}};this.m_sIdMSG=
"DIV_XBD_AutoMSG";this.m_oMSG=null;this.f_createElementMSG=function(){if(IsNull(this.m_oMSG)){this.m_oMSG=document.createElement("DIV");this.m_oMSG.setAttribute("id",this.m_sIdMSG);this.m_oMSG.style.position="absolute";this.m_oMSG.style.left=0;this.m_oMSG.style.top=0;document.getElementsByTagName("BODY")[0].appendChild(this.m_oMSG)}};this.f_rePositionAutoMSG=function(){if(GetType("i_gfx_nVersion",1)){var a=this,d=oGFX.f_getFrameSizeX()+oGFX.f_getScrollX()-oGFX.f_getSizeX(this.m_oMSG)-10,b=oGFX.f_getScrollY()+
5;this.m_oMSG.style.left=d;this.m_oMSG.style.top=b;this.m_stRePositionMSG=setTimeout(function(){a.f_rePositionAutoMSG()},100)}else{this.m_oMSG.style.left=oIGZ.m_nMouseX?oIGZ.m_nMouseX:0;this.m_oMSG.style.top=oIGZ.m_nMouseY?oIGZ.m_nMouseY:0}};new oIGZ.f_keyEvent(["CTRL","F6"],function(){oIGZ.m_bIE?prompt(oXBD.m_sKeyName+" - Log de llamadas \n("+document.location.href+")",oXBD.m_a_sCallsLog.join("\n")):alert(oXBD.m_a_sCallsLog.join("\n"));return false})};oIGZ.f_mouseMoveOn();oXJS=oXBD;oIGZ.m_a_sStartDraws.push("<FUN>oXJS=oXBD;");
