
var URL={}
$(document).ready(function(){$(".info_v").bind('click',function(){URL.ajax="ajax";URL.id=$(this).attr('id');URL.url=$(this).attr('href');$.blockUI('<h2>Procesando...</h2><p><img src="/img/loading_bar.gif" alt="procesando" /></p>');$.post(URL.url,URL,function(data){$.extend($.blockUI.defaults.pageMessageCSS,{width:'auto',position:'fixed',margin:'auto',top:'15%',left:'25%'});$.blockUI(data);$(".cerrar_v").css('cursor','pointer');$(".cerrar_v").bind('click',function(){$("html").css("overflow","auto");$.extend($.blockUI.defaults.pageMessageCSS,{width:'auto',position:'fixed',margin:'auto',top:'30%',left:'45%'});$.unblockUI();});});return false;});$("#listado_errores_cerrar").click(function(){$(this).parent("div").fadeOut();}).css("cursor","pointer");if($("#logo_izda").is("div"))$("#logo_izda");if(($("#tabla_megaocasiones")).is("table")){$("#tabla_megaocasiones tr").css("cursor","pointer").click(function(){});}
$("#megaocasiones div.off_r").css("cursor","pointer").click(function(){}).tooltip({track:true,delay:300,showURL:false,showBody:" - ",extraClass:"megaoc",opacity:0.85});});function sError(o){$(o).css("border","2px solid #ec6e00");return false;try{$(o).Highlight(3000,'#ec6e00');}catch(e){$(o).css("background-color","#ec6e00");}
return false;}
jQuery.fn.numeric=function(c,d){c=c||".";d=typeof d=="function"?d:function(){};this.keypress(function(e){var a=e.charCode?e.charCode:e.keyCode?e.keyCode:0;if(a==13&&this.nodeName.toLowerCase()=="input"){return true}else if(a==13){return false}var b=false;if((e.ctrlKey&&a==97)||(e.ctrlKey&&a==65))return true;if((e.ctrlKey&&a==120)||(e.ctrlKey&&a==88))return true;if((e.ctrlKey&&a==99)||(e.ctrlKey&&a==67))return true;if((e.ctrlKey&&a==122)||(e.ctrlKey&&a==90))return true;if((e.ctrlKey&&a==118)||(e.ctrlKey&&a==86)||(e.shiftKey&&a==45))return true;if(a<48||a>57){if(a==45&&this.value.length==0)return true;if(a==c.charCodeAt(0)&&this.value.indexOf(c)!=-1){b=false}if(a!=8&&a!=9&&a!=13&&a!=35&&a!=36&&a!=37&&a!=39&&a!=46){b=false}else{if(typeof e.charCode!="undefined"){if(e.keyCode==e.which&&e.which!=0){b=true}else if(e.keyCode!=0&&e.charCode==0&&e.which==0){b=true}}}if(a==c.charCodeAt(0)&&this.value.indexOf(c)==-1){b=true}}else{b=true}return b}).blur(function(){var a=jQuery(this).val();if(a!=""){var b=new RegExp("^\\d+$|\\d*"+c+"\\d+");if(!b.exec(a)){d.apply(this)}}});return this}