﻿function SetupGridPager(a){if(window.Sys){var c=Sys.WebForms.PageRequestManager.getInstance();c&&c.add_pageLoaded(function(){var e=$("#"+a);if(e.length>0){var b=e.find("input.SortablePagableGridViewCurrentPage").get(0);if(b){var f=$(b),h=a.replace(/_/gim,"$"),g=e.find(".SortablePagableGridViewPageCount");b.iPageCount=parseInt(g.text());b.iCurrentPage=parseInt(b.value);f.change(function(){this.iTimeoutID&&window.clearTimeout(this.iTimeoutID);var d=parseInt(this.value);if(!isNaN(d)&&d>=1&&d<=this.iPageCount)__doPostBack(a.replace(/_/gim, "$"),"Page$"+d);else this.value=this.iCurrentPage});f.keypress(function(){this.iTimeoutID&&window.clearTimeout(this.iTimeoutID);this.iTimeoutID=window.setTimeout("var elPage = $('#"+a+" input.SortablePagableGridViewCurrentPage').get(0);var iNewPage = parseInt(elPage.value);if (!isNaN(iNewPage) && iNewPage >= 1 && iNewPage <= elPage.iPageCount){ __doPostBack('"+h+"', 'Page$' + iNewPage);}else{ elPage.value = elPage.iCurrentPage;}",750)})}$("#"+a+"_ExportToCsv").click(function(){var d=document.createElement("INPUT"); d.type="hidden";d.name="SortablePagableGridViewExportToCSV";d.value=a.replace(/_/gim,"$");e.parent().append(d);__doPostBack();$(d).remove();return false})}})}}(function(a){a.extend(a,{ZeroIfNaN:function(c){return isNaN(c)?0:c}})})(jQuery); (function(a){a.extend(a,{resizableRoundedCorners:function(c){c=a.extend({sSelector:".resizableRoundedCorners",iImageHeight:4,iImageWidth:5,sCornerTopLeftImagePath:"corner-topleft.gif",sCornerTopRightImagePath:"corner-topright.gif"},c);a(c.sSelector).each(function(){var b=a(this);this._iBorderWidth=Math.round(a.ZeroIfNaN(parseFloat(b.css("border-left-width"))));var f=b.css("border-left-style"),h=b.css("border-left-color"),g;b.css({"border-top":"none","padding-top":"0px"});this.elRoundedTop&&this.elRoundedTop.remove(); var d=a(document.createElement("DIV"));d.addClass("resizableRoundedCornersTop");d._iImageWidth=c.iImageWidth;if(b.is("table")){var i=a(b.find("th, td")[0]);g=i.css("background-color");i.siblings().andSelf().each(function(){a(this).css({"border-top":"none","margin-top":"0px"})});d.css({width:b.width()+this._iBorderWidth*2-c.iImageWidth*2+"px","padding-left":c.iImageWidth+"px","padding-right":c.iImageWidth+"px",top:"-"+c.iImageHeight+"px","margin-left":b.css("margin-left"),"margin-right":b.css("margin-right"), "float":b.css("float"),clear:b.css("clear"),position:"relative"});b.css("margin-top","0px");b.before(d)}else{b.css("position","relative");g=b.css("background-color");this._iPadding=Math.round(a.ZeroIfNaN(parseFloat(b.css("padding-left"))));d.css({position:"absolute",width:b.width()+this._iPadding*2-c.iImageWidth*2+this._iBorderWidth*2+"px","padding-left":c.iImageWidth+"px","padding-right":c.iImageWidth+"px",top:"-"+c.iImageHeight+"px",left:"-"+this._iBorderWidth+"px"});b.append(d)}this.elRoundedTop= d;b=a('<img src="'+c.sCornerTopLeftImagePath+'" border="0" alt="" style="position:absolute; top:0; left:0; z-index: 1;" />');d.append(b);b=a('<img src="'+c.sCornerTopRightImagePath+'" border="0" alt="" style="position:absolute; top:0; right:0; z-index: 1;" />');d.append(b);b=a(document.createElement("DIV"));b.css({position:"absolute",width:d.width()+"px",height:c.iImageHeight+"px","background-color":g,"border-top":this._iBorderWidth+"px "+f+" "+h});d.append(b);d.elTopBorder=b});if(!window._fnResizableRoundedCorners){window._fnResizableRoundedCorners= a(window).resize(function(){a(document.body).find("[elRoundedTop]").each(function(){var b=a(this);b=b.is("table")?b.width()+this._iBorderWidth*2-this.elRoundedTop._iImageWidth*2:b.width()+this._iPadding*2-this.elRoundedTop._iImageWidth*2+this._iBorderWidth*2;if(Math.round(this.elRoundedTop.width())!=b){this.elRoundedTop.width(b);this.elRoundedTop.elTopBorder.width(b)}})});if(window.Sys){var e=Sys.WebForms.PageRequestManager.getInstance();e&&e.add_endRequest(function(){a.resizableRoundedCorners(c)})}}}})})(jQuery); function ToolTipMouseMove(a,c){a=a||window.event;var e=a.target||a.srcElement;if(!e.bShowUntilClicked){var b,f;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else{b=a.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)-document.documentElement.clientLeft;f=a.clientY+(document.documentElement.scrollTop||document.body.scrollTop)-document.documentElement.clientTop}if(e.ToolTipMouseMoveTimeout){window.clearTimeout(e.ToolTipMouseMoveTimeout);e.ToolTipMouseMoveTimeout=null}e.ToolTipMouseMoveTimeout= window.setTimeout(function(){ToolTipShow(e,b+1,f-1,c)},750)}}function ToolTipMouseOut(a){if(!a.bShowUntilClicked){if(a.ToolTipMouseMoveTimeout){window.clearTimeout(a.ToolTipMouseMoveTimeout);a.ToolTipMouseMoveTimeout=null}a.$elToolTip&&a.$elToolTip.fadeOut("fast")}} function ToolTipClick(a,c){a=a||window.event;var e,b;if(a.pageX||a.pageY){e=a.pageX;b=a.pageY}else{e=a.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)-document.documentElement.clientLeft;b=a.clientY+(document.documentElement.scrollTop||document.body.scrollTop)-document.documentElement.clientTop}var f=a.target||a.srcElement;if(f.ToolTipMouseMoveTimeout){window.clearTimeout(f.ToolTipMouseMoveTimeout);f.ToolTipMouseMoveTimeout=null}if(f.bShowUntilClicked){f.bShowUntilClicked= false;f.$elToolTip.fadeOut("fast")}else{f.bShowUntilClicked=true;ToolTipShow(f,e,b,c)}} function ToolTipShow(a,c,e,b){b="."+(b||"ToolTip");a.$elToolTip=$(a).parent().find(b);if(a.$elToolTip.size()==0)a.$elToolTip=$(b);if(!a.fTargetOpacity)a.fTargetOpacity=a.$elToolTip.css("opacity")||parseInt("0"+a.$elToolTip.css("filter").replace(/[^0-9]/,""))/100;a.$elToolTip=a.$elToolTip.eq(0);a.$elToolTip.css({left:c,top:e-a.$elToolTip.height()}).unbind("click").click(function(){a.bShowUntilClicked=false;$(this).fadeOut("fast")}).fadeTo("fast",a.fTargetOpacity)} (function(a){a.fn.extend({DimmableTextBox:function(){return this.focus(function(){a(this).addClass("DimmableTextBoxPopulated")}).blur(function(){var c=a.trim(this.value);if(c==""||c=="0")a(this).removeClass("DimmableTextBoxPopulated")}).each(function(){var c=a.trim(this.value);c==""||c=="0"||a(this).addClass("DimmableTextBoxPopulated")})}})})(jQuery);
