var report;jQuery.extend({createUploadIframe:function(D,B){var A="jUploadFrame"+D;if(window.ActiveXObject){var C=document.createElement('<iframe id="'+A+'" name="'+A+'" />');if(typeof B=="boolean"){C.src="javascript:false"}else{if(typeof B=="string"){C.src=B}}}else{var C=document.createElement("iframe");C.id=A;C.name=A}C.style.position="absolute";C.style.top="-1000px";C.style.left="-1000px";document.body.appendChild(C);return C},createUploadForm:function(G,B){var E="jUploadForm"+G;var A="jUploadFile"+G;var D=$('<form  action="" method="POST" name="'+E+'" id="'+E+'" enctype="multipart/form-data"></form>');var C=$("#"+B);var F=$(C).clone();$(C).attr("id",A);$(C).before(F);$(C).appendTo(D);$(D).css("position","absolute");$(D).css("top","-1200px");$(D).css("left","-1200px");$(D).appendTo("body");return D},ajaxFileUpload:function(J){J=jQuery.extend({},jQuery.ajaxSettings,J);var A=new Date().getTime();var B=jQuery.createUploadForm(A,J.fileElementId);var H=jQuery.createUploadIframe(A,J.secureuri);var G="jUploadFrame"+A;var I="jUploadForm"+A;if(J.global&&!jQuery.active++){jQuery.event.trigger("ajaxStart")}var C=false;var E={};if(J.global){jQuery.event.trigger("ajaxSend",[E,J])}var D=function(K){var O=document.getElementById(G);try{if(O.contentWindow){E.responseText=O.contentWindow.document.body?O.contentWindow.document.body.innerHTML:null;E.responseXML=O.contentWindow.document.XMLDocument?O.contentWindow.document.XMLDocument:O.contentWindow.document}else{if(O.contentDocument){E.responseText=O.contentDocument.document.body?O.contentDocument.document.body.innerHTML:null;E.responseXML=O.contentDocument.document.XMLDocument?O.contentDocument.document.XMLDocument:O.contentDocument.document}}}catch(N){jQuery.handleError(J,E,null,N)}if(E||K=="timeout"){C=true;var L;try{L=K!="timeout"?"success":"error";if(L!="error"){var M=jQuery.uploadHttpData(E,J.dataType);if(J.success){J.success(M,L)}if(J.global){jQuery.event.trigger("ajaxSuccess",[E,J])}}else{jQuery.handleError(J,E,L)}}catch(N){L="error";jQuery.handleError(J,E,L,N)}if(J.global){jQuery.event.trigger("ajaxComplete",[E,J])}if(J.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop")}if(J.complete){J.complete(E,L)}jQuery(O).unbind();setTimeout(function(){try{$(O).remove();$(B).remove()}catch(P){jQuery.handleError(J,E,null,P)}},100);E=null}};if(J.timeout>0){setTimeout(function(){if(!C){D("timeout")}},J.timeout)}try{var B=$("#"+I);$(B).attr("action",J.url);$(B).attr("method","POST");$(B).attr("target",G);if(B.encoding){B.encoding="multipart/form-data"}else{B.enctype="multipart/form-data"}$(B).submit()}catch(F){jQuery.handleError(J,E,null,F)}if(window.attachEvent){document.getElementById(G).attachEvent("onload",D)}else{document.getElementById(G).addEventListener("load",D,false)}return{abort:function(){}}},uploadHttpData:function(r,type){var data=!type;data=type=="xml"||data?r.responseXML:r.responseText;if(type=="script"){jQuery.globalEval(data)}if(type=="json"){eval("data = "+data)}if(type=="html"){jQuery("<div>").html(data).evalScripts()}return data}});jQuery.fn.cssCheckbox=function(){jQuery("input[@type='checkbox'] + label",this).each(function(){if(jQuery(this).prev()[0].checked){jQuery(this).addClass("checked")}else{jQuery(this).addClass("unchecked")}}).hover(function(){jQuery(this).addClass("over")},function(){jQuery(this).removeClass("over")}).click(function(){if(jQuery(this).prev().attr("name")!="op4"){jQuery(this).toggleClass("checked").prev()[0].checked=!jQuery(this).prev()[0].checked;jQuery(this).toggleClass("unchecked").prev()[0].checked==jQuery(this).prev()[0].checked}}).prev().hide()};$.fn.checks=function(A){jQuery("input[@id='criteriosinput'] + label",this).each(function(){jQuery(this).toggleClass("checked").prev()[0].checked=!jQuery(this).prev()[0].checked;jQuery(this).toggleClass("unchecked").prev()[0].checked==jQuery(this).prev()[0].checked}).prev().hide()};function DataGeneration(A){$("#adsense_chart").html(A)}function Informe(extra,callback){var data="informe="+report;if(extra){data+=extra}$.ajax({url:"googleadsense.php",data:data,success:function(msg){eval(callback+"(msg)")}})}function ajaxFileUpload(A){ShowLoading($("#cargando"));$("#cargando").slideDown();$("#upload").slideUp("slow");$.ajaxFileUpload({url:"doajaxfileupload.php",secureuri:false,fileElementId:"fileToUpload",dataType:"json",success:function(C,B){if(typeof (C.error)!="undefined"){if(C.error!=""){$("#cargando").slideUp();$("#status").show();$("#status").html(C.error);$("#upload").slideDown("slow")}else{report=C.msg;Informe("&c=1","FormCreator")}}},error:function(C,B,D){$("#status").html(A);$("#cargando").slideUp();$("#upload").slideDown("slow")}});return false}jQuery(function(A){A.datepicker.regional.es={clearText:"Borrar",clearStatus:"Borrar fecha actual",closeText:"Cerrar",closeStatus:"Cerrar sin cambios",prevText:"&#x3c;Ant.",prevStatus:"Muestra el mes anterior",nextText:"Sig.&#x3e;",nextStatus:"Muestra el mes siguiente",currentText:"Hoy",currentStatus:"Muestra el mes actual",monthNames:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Augosto","Septiembre","Octubre","Noviembre","Diciembre"],monthNamesShort:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],monthStatus:"Muestra un mes diferente",yearStatus:"Muestra un año diferente",weekHeader:"Sem",weekStatus:"Semana del a&ntilde;o",dayNames:["Lunes","Martes","Miercoles","Jueves","Viernes","Sabado","Domingo"],dayNamesShort:["Dom","Lun","Mar","Mie","Jue","Vie","Sab"],dayNamesMin:["D","L","M","X","J","V","S"],dayStatus:"Set DD as first week day",dateStatus:"Select DD, M d",dateFormat:"dd/mm/yy",firstDay:1,initStatus:"Selecciona Fecha",isRTL:false};A.datepicker.regional.en={clearText:"Clear",clearStatus:"Erase the current date",closeText:"Close",closeStatus:"Close without change",prevText:"&#x3c;Prev",prevStatus:"Show the previous month",nextText:"Next&#x3e;",nextStatus:"Show the next month",currentText:"Today",currentStatus:"Show the current month",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],monthStatus:"Show a different month",yearStatus:"Show a different year",weekHeader:"Wk",weekStatus:"Week of the year",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],dayStatus:"Set DD as first week day",dateStatus:"Select DD, M d",dateFormat:"mm/dd/yy",firstDay:0,initStatus:"Select a date",isRTL:false}});