var _OfbIsBrowserMSIE,_OfbIsBrowserNetscape,_OfbMouseX,_OfbMouseY,_strHideDisplayStyle,_strShowDisplayStyle,WIDTH=0,HEIGHT=1,LEFT=0,TOP=1,MIN_OBJECT_HEIGHT=8,OFB_HDN_SELECTED_OBJECT_ID="__hdnOfbSelectedObjectId",OFB_HDN_SELECTED_OBJECT_VALUE="__hdnOfbSelectedItemValue";_strHideDisplayStyle="none";_strShowDisplayStyle="block";_OfbIsBrowserNetscape=_OfbIsBrowserMSIE=false;_OfbMouseX=_OfbMouseY=0;_OfbCurObject=null;
if(navigator.userAgent.indexOf("MSIE")>=0){_OfbIsBrowserMSIE=true;_OfbIsBrowserNetscape=false}else if(navigator.userAgent.indexOf("Mozilla")>=0)_OfbIsBrowserNetscape=true;_OfbIsBrowserNetscape&&document.captureEvents(Event.MOUSEMOVE);document.onmousemove=__ofbTrackMousePos;
function __ofbGetBrowserSize(){var a=document.documentElement.clientWidth,b=document.documentElement.clientHeight;if(self.innerHeight){a=self.innerWidth;b=self.innerHeight}else if(document.documentElement&&document.documentElement.clientHeight){a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}else if(document.body){a=document.body.clientWidth;b=document.body.clientHeight}return[a,b]}
function __getScrollXY(){var a=0,b=0;if(typeof window.pageYOffset=="number"){b=window.pageYOffset;a=window.pageXOffset}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){b=document.body.scrollTop;a=document.body.scrollLeft}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){b=document.documentElement.scrollTop;a=document.documentElement.scrollLeft}return[a,b]}
function __ofbGetClientResolution(a){var b=screen.width,d=screen.height;if(a=document.getElementById(a))a.value=d+", "+b}function __ofbGetScrollWidth(){var a=window.pageXOffset||document.body.scrollLeft||document.documentElement.scrollLeft;return a?a:0}function __ofbGetScrollHeight(){var a=window.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop;return a?a:0}
function __ofbTrackMousePos(a){if(_OfbIsBrowserNetscape){_OfbMouseX=a.pageX;_OfbMouseY=a.pageY}else{_OfbMouseX=event.x;_OfbMouseY=event.y}_OfbMouseX+=__ofbGetScrollWidth();_OfbMouseY+=__ofbGetScrollHeight()}function __ofbGetMouseX(){return _OfbMouseX}function __ofbGetMouseY(){return _OfbMouseY}function __ofbShowHideDiv(a){if(a)if(a=document.getElementById(a))a.style.display=a.style.display==_strHideDisplayStyle?_strShowDisplayStyle:_strHideDisplayStyle}
function __ofbShowDiv(a){if(a)if(a=document.getElementById(a))a.style.display=_strShowDisplayStyle}function __ofbHideDiv(a){if(a)if(a=document.getElementById(a))a.style.display=_strHideDisplayStyle}function __ofbHideDivWithLocationSense(a){if(a)if(a=document.getElementById(a))a.style.display=_strHideDisplayStyle}function __ofbHideDivWithDelay(a,b){a&&setTimeout("__ofbHideDiv( '"+a+"')",b)}
function __ofbEscapeHTML(a){var b=document.createElement("div");a=document.createTextNode(a);b.appendChild(a);return b.innerHTML}function __ofbGetCurrentEvent(a){a||(a=event);return a}function __ofbGetCurrentEventObject(a){if(a=__ofbGetCurrentEvent(a))return a.target||a.srcElement;return null}function __ofbGetPercentHeight(a,b){var d=__ofbGetBrowserSize(),e=0;a=__ofbStringToInt(a);b=__ofbStringToInt(b);e=d[HEIGHT]-b;if(a>0)e=e/100*a;return e}
function __ofbSetHeightByPercent(a,b){var d=document.getElementById(a),e=null;e=0;if(!(!d||d==null)){e=__ofbFindAbsolutePosition(d);e=__ofbGetPercentHeight(b,e[TOP]);if(d&&e>0)d.style.height=e+"px"}}function __ofbSetHeightByBottomOffset(a,b){var d=__ofbGetBrowserSize(),e=document.getElementById(a),f=null;f=0;if(!(!e||e==null)){b=__ofbStringToInt(b);f=__ofbFindAbsolutePosition(e);f=d[HEIGHT]-f[TOP]-b;if(f<=0)f=MIN_OBJECT_HEIGHT;if(e&&f>0)e.style.height=f+"px"}}
function __ofbSetHeightByBottomOffsetControlHeight(a,b){var d=document.getElementById(b),e=0;if(d)e=d.offsetHeight;return __ofbSetHeightByBottomOffset(a,e)}function __ofbGetStyleProperty(a,b){var d="";if(typeof a=="string")a=document.getElementById(a);if(!a)return d;if(a.currentStyle)d=a.currentStyle[b];else if(window.getComputedStyle)d=document.defaultView.getComputedStyle(a,null).getPropertyValue(b);return d}
function __ofbStringToInt(a){var b=0,d=0,e="",f="";if(!a)return b;if(f=a.toString())if(f.length){for(d=0;d<f.length;d++)if(f.charAt(d)>="0"&&f.charAt(d)<="9"||f.charAt(d)=="-"||f.charAt(d)=="+"||f.charAt(d)==".")e=e.concat(f.charAt(d));else break;if(e.length>0)b=parseInt(e,0)}else b=parseInt(e,0);return b}
function __ofbFindAbsolutePosition(a){var b=intCurrTop=0;if(a.offsetParent){b=a.offsetLeft;for(intCurrTop=a.offsetTop;a=a.offsetParent;){b+=a.offsetLeft;intCurrTop+=a.offsetTop}}return[b,intCurrTop]}
function __ofbGetControlCalcuatedPositionSize(a){var b=0,d=0,e=0,f=0,c;if(a){c=__ofbGetStyleProperty(a,"left").toLowerCase();if(c!="auto"&&c.indexOf("%")<0&&__ofbStringToInt(c)>0){b=__ofbStringToInt(__ofbGetStyleProperty(a,"left"));if((c=__ofbGetStyleProperty(a,"padding-Left"))&&c.length>0)b+=__ofbStringToInt(c);if((c=__ofbGetStyleProperty(a,"border-Left-Width"))&&c.length>0)b+=__ofbStringToInt(c)}else b=__ofbStringToInt(a.offsetLeft);c=__ofbGetStyleProperty(a,"top").toLowerCase();if(c!="auto"&&c.indexOf("%")<
0&&__ofbStringToInt(c)>0){d=__ofbStringToInt(c);if((c=__ofbGetStyleProperty(a,"padding-Top"))&&c.length>0)d+=__ofbStringToInt(c);if((c=__ofbGetStyleProperty(a,"border-Top-Width"))&&c.length>0)d+=__ofbStringToInt(c)}else d=__ofbStringToInt(a.offsetTop);c=__ofbGetStyleProperty(a,"width").toLowerCase();if(c!="auto"&&c.indexOf("%")<0&&__ofbStringToInt(c)>0){e=__ofbStringToInt(c);if((c=__ofbGetStyleProperty(a,"padding-Left"))&&c.length>0)e+=__ofbStringToInt(c);if((c=__ofbGetStyleProperty(a,"padding-Right"))&&
c.length>0)e+=__ofbStringToInt(c);if((c=__ofbGetStyleProperty(a,"border-Left-Width"))&&c.length>0)e+=__ofbStringToInt(c);if((c=__ofbGetStyleProperty(a,"border-Right-Width"))&&c.length>0)e+=__ofbStringToInt(c)}else e=__ofbStringToInt(a.offsetWidth);c=__ofbGetStyleProperty(a,"height").toLowerCase();if(c!="auto"&&c.indexOf("%")<0&&__ofbStringToInt(c)>0){f=__ofbStringToInt(c);if((c=__ofbGetStyleProperty(a,"padding-Top"))&&c.length>0)f+=__ofbStringToInt(c);if((c=__ofbGetStyleProperty(a,"padding-Bottom"))&&
c.length>0)f+=__ofbStringToInt(c);if((c=__ofbGetStyleProperty(a,"border-Top-Width"))&&c.length>0)f+=__ofbStringToInt(c);if((c=__ofbGetStyleProperty(a,"border-Bottom-Width"))&&c.length>0)f+=__ofbStringToInt(c)}else f=__ofbStringToInt(a.offsetHeight)}return[__ofbStringToInt(b),__ofbStringToInt(d),__ofbStringToInt(e),__ofbStringToInt(f)]}
function __ofbSetSelectedObjectStyle(a,b,d,e,f){var c=null,n=null,i=c=null;if(c=document.getElementById(OFB_HDN_SELECTED_OBJECT_ID)){if(c.value&&c.value.length>0)if((n=document.getElementById(c.value))&&n.style)n.style.borderWidth=0;if(i=document.getElementById(a)){if(i.style){i.style.borderColor=d;i.style.borderWidth=e;i.style.borderStyle=f}if(i.id)c.value=i.id;if(b)if(c=document.getElementById(OFB_HDN_SELECTED_OBJECT_VALUE))c.value=b}}}
function __ofbGetSelectedObjectValue(){var a=null,b="";if(a=document.getElementById(OFB_HDN_SELECTED_OBJECT_ID)&&a.value)b=a.value;document.getElementById(OFB_HDN_SELECTED_OBJECT_VALUE);return[b,""]}
function __ofbSubmitAjaxForm(a,b){function d(g,h){var j=[];o=0;h?g.find(h).each(function(){var k=[];l=0;$(this).find(y).each(function(){k[l]=new z(l,$(this).attr("name"),$(this).is("input:checkbox")?$(this).is(":checked").toString():$(this).val());l++});v=$(this).attr("id");q=new A(o,v,k);j[o++]=q}):g.find(y).each(function(){var k=[];l=0;k[l]=new z(l,$(this).attr("name"),$(this).is("input:checkbox")?$(this).is(":checked").toString():$(this).val());l++;q=new A(o,v,k);j[o++]=q});return j}function e(g){var h;
if(g.length){h=JSON.parse(g);h.FD&&c(h)}b.OnSuccess&&b.OnSuccess(g)}function f(g,h,j){alert("A System Error occured while processing your request. Please redo your action. If this error persists, please contact technical support.")}function c(g){if(!(!g||!g.FD||!g.FD.FC))for(var h in g.FD.FC)if(!(!h.AR||!h.AR.length||!h.AR.RC||!h.AR.RC.length))for(var j in h.AR.RC)if(!j.RD||!j.RD.length)for(var k in j.RD)k.RA&&n(k)}function n(g){switch(g.RA){case 701:break}}b=$.extend({},{AjaxDataPacketHeader:"PH",
AjaxFormData:"FD",AjaxFormCollection:"FC",FormID:"FI",ActionHeader:"AH",ActionPayload:"AP",ActionResponse:"AR",ActionCode:"AC",MetaSessionID:"MSI",ActionCodeAttr:"data-ofboac",MetaSessionIDAttr:"data-ofbmsi",RowSelectorAttr:"data-ofbfrs",RowDataCollection:"RC",RowID:"RI",RowValue:"RV",RowData:"RD",ColID:"CI",ColName:"CN",ColValue:"CV",QueryStringParamName:"080.DTA",FormSelector:"body",DataSelector:':input[name]:not("#__OFBVSTATE,#__VIEWSTATE")',RowSelector:null,SubmitUrl:false,OnSuccess:function(g){}},
b);if(!b.SubmitUrl)return false;var i=DataTable(b.AjaxDataPacketHeader+","+b.AjaxFormData),B=DataTable(b.FormID+","+b.ActionHeader+","+b.ActionPayload),w=DataTable(b.ActionCode+","+b.MetaSessionID),A=DataTable(b.RowID+","+b.RowValue+","+b.RowData),z=DataTable(b.ColID+","+b.ColName+","+b.ColValue),x=[],r,s=[],m=0,o=0,l=0,y=b.DataSelector,q,v="",t,p="",u="";if(a&&a.length){(p=a.attr(b.ActionCodeAttr))||(p="");(u=a.attr(b.MetaSessionIDAttr))||(u="")}if(b.SubFormSelector)$(b.SubFormSelector).each(function(){s[m]=
d($(this),$(this).attr(b.RowSelectorAttr)?$(this).attr(b.RowSelectorAttr):b.RowSelector);var g={RC:s[m]},h=new w(p,$(this).attr(b.MetaSessionIDAttr));r=new B($(this).attr("id"),h,g);x[m]=r;m++});else{s[m]=d($(b.FormSelector),b.RowSelector);var C={RC:s[m]};t=new w(p,u);r=new B($(b.FormSelector).attr("id"),t,C);x[m]=r;m++}t=new w(p,u);i=new i(t,{FC:x});strPortParam=b.QueryStringParamName+"="+escape(JSON.stringify(i));$.ajax({type:"POST",url:b.SubmitUrl,data:strPortParam,success:e,error:f})}
function DataTable(a){function b(){for(var f=0;f<e;f++)this[d[f]]=arguments[f]}var d=a.split(","),e=d.length;return b}function OfbDialogClose(a){if(parent&&parent.$&&parent.$.nyroModalRemove)parent.$.nyroModalRemove();else $&&$.nyroModalRemove&&$.nyroModalRemove();return false};