function ULSiIp(){var o=new Object;o.ULSTeamName="Microsoft SharePoint Foundation";o.ULSFileName="inplview.js";return o;}
function SwapNode(a,b){ULSiIp:;return a.parentNode.replaceChild(b,a)}function GetAncestor(a,b){ULSiIp:;while(a!=null&&a.tagName!=b)a=a.parentNode;return a}function CountDictionary(b){ULSiIp:;var a=0,c;for(c in b)a++;return a}function EncodeQueryStringAsHash(a){ULSiIp:;return a.replace(/-/g,"--").replace(/&/g,"-")}function DecodeHashAsQueryString(a){ULSiIp:;return a.replace(/-/g,"&").replace(/&&/g,"-")}function SetUrlHash(a){ULSiIp:;window.location.hash=a}function CLVP(a){ULSiIp:;this.ctx=a;this.tab=null;this.pagingTab=null;this.tBody=null;this.wpq=null;this.inplUrl=null;this.trEmpty=null;this.rootFolder=null;this.rootFolderGuid=null;this.rgpag=null;this.wpid=null;this.isEditing=false;this.dsrc=null;this.isInserting=false;this.strGroupName=null;this.strGroupCache=null;this.bRequestOutstanding=false;this.isEcbInfo=false;this.queueEcbInfo=[];this.fnEcbCallback=null;a.clvp=this}CLVP.prototype.Init=CLVPInit;function CLVPInit(){ULSiIp:;var f=this.ctx.listBaseType==1,c;if(this.ctx.listTemplate=="109"){this.ctx.clvp=null;return}c=this.ctx.listName+"-"+this.ctx.view;var b=GetElementsByName(c);if(b.length==0&&f){c="onetidDoclibViewTbl0";b=GetElementsByName(c)}var a=null;if(b.length==0&&!f)b=GetElementsByName("onetidDoclibViewTbl0");if(b.length==0)b=GetElementsByName("onetidDoclibViewTbl"+this.ctx.ctxId);if(b.length==1){this.tab=b[0];a=this.FindWebPartDiv(this.tab)}else for(var e=0;e<b.length;e++){var g=b[e];a=g;var d=null;while(a!=null&&(a.tagName!="DIV"||(d=a.getAttribute("WebPartID"))==null)&&a.parentNode!=null)a=a.parentNode;if(a!=null)if(d!=null&&this.ctx.view.indexOf(d.toUpperCase())==1){this.tab=g;break}}if(a==null||this.tab==null)return;this.wpq=a.id;this.pagingTab=document.getElementById("bottomPagingCell"+this.wpq.substr(7));this.tab.clvp=this;if(this.tab.className=="ms-emptyView"){var h=GetAncestor(this.tab,"TR");this.trEmpty=h.nextSibling}if(typeof this.ctx.isJsGrid!="undefined"&&this.ctx.isJsGrid){this.isEditing=true;this.SwitchToEdit()}this.rootFolder=GetUrlKeyValue("RootFolder");if(this.rootFolder.length==0)this.rootFolder=null}CLVP.prototype.RestoreNavigation=CLVPRestoreNavigation;function CLVPRestoreNavigation(){ULSiIp:;var a=window.location.hash,c=this.InplViewUrl(),b=this.RefreshCurrent(true);b=b.substr(c.length+1);if(a.indexOf("InplviewHash=")==1){a=DecodeHashAsQueryString(a);var d=a.substr(14,38);if(d!=this.ctx.view)return;a=a.substr(52);var e="?"+a;SubmitFormPost(e)}}CLVP.prototype.FindWebPartDiv=CLVPFindWebPartDiv;function CLVPFindWebPartDiv(b){ULSiIp:;var a=b;while(a!=null&&a.tagName!="DIV")a=a.parentNode;return a}CLVP.prototype.SyncPagingTables=CLVPSyncPagingTables;function CLVPSyncPagingTables(){ULSiIp:;var b=this.pagingTab,a=document.getElementById("topPagingCell"+this.wpq.substr(7));if(b==null){if(a!=null)a.style.display="none";return}if(a!=null){a.style.display="";if(GetInnerText(a)!=GetInnerText(b))a.innerHTML=b.innerHTML;for(var e=a.getElementsByTagName("A"),d=b.getElementsByTagName("A"),c=0,c=0;c<d.length;c++)e[c].onclick=d[c].onclick}}CLVP.prototype.RehookPaging=CLVPRehookPaging;function CLVPRehookPaging(){ULSiIp:;if(typeof this.ctx.noAJAX!="undefined"&&this.ctx.noAJAX)return;var tab=this.pagingTab;if(tab==null){this.SyncPagingTables();return}for(var lnks=tab.getElementsByTagName("A"),i=0;i<lnks.length;i++){var lnk=lnks[i],str=""+lnk.onclick;str=str.substr(str.indexOf('"')+1);str=str.substr(0,str.indexOf('"'));if(this.tBody!=null)str+="&IsGroupRender=TRUE";var clvp=this;if(this.tBody!=null)eval('var tBodyId="'+this.tBody.id+'";');else eval("var tBodyId=null");eval('var strHref="'+str+'";');UpdateOnClick(lnk,clvp,strHref,tBodyId)}this.tBody==null&&this.SyncPagingTables();function UpdateOnClick(d,c,b,a){ULSiIp:;d.onclick=function(){ULSiIp:;c.RefreshPaging(b,a);return false}}}CLVP.prototype.FilterString=CLVPFilterString;function CLVPFilterString(){ULSiIp:;if(this.rgpaging==null)return null;var a,d,b=[],c=true;for(a in this.rgpaging)if(a.indexOf("Filter")==0||a.indexOf("Sort")==0){if(c)c=false;else b.push("&");b.push(a);b.push("=");b.push(this.rgpaging[a])}return b.join("")}CLVP.prototype.RefreshPaging=CLVPRefreshPaging;function CLVPRefreshPaging(c,a,b){ULSiIp:;if(a!=null)this.tBody=document.getElementById(a);var d=this.isEditing?"JsGrid":null;return this.RefreshPagingEx(c,true,d,b)}CLVP.prototype.RefreshPagingEx=CLVPRefreshPagingEx;function CLVPRefreshPagingEx(e,q,p,t){ULSiIp:;var s=GetUrlKeyValue("PageFirstRow",false,e)=="1";if(s)e=RemoveOnlyPagingArgs(e);var v=new CUrl(e),h=v.query;if(h.length>0)h=h.substr(1);var i=h.split("&"),f,a=[];if(p!=null)a.push("&Cmd="+p);else this.isEditing&&a.push("&Cmd=JsGrid");this.ctx.HasRelatedCascadeLists==1&&this.ctx.CascadeDeleteWarningMessage==null&&a.push("&CascDelWarnMessage=1");if(q||this.rgpaging=="undefined"||this.rgpaging==null){this.rgpaging=[];for(f=0;f<i.length;f++){var c=i[f].split("=");if(c[0]=="List"||c[0]=="View"||c[0]=="JsGrid"||c[0]=="ID"){delete c;continue}if(c.length>1)this.rgpaging[c[0]]=c[1];delete c;a.push("&");a.push(i[f])}}else{var d;for(d in this.rgpaging){if(d=="List"||d=="View"||d=="ID")continue;a.push("&");a.push(d);a.push("=");a.push(this.rgpaging[d])}}var n=document.getElementById("GroupByWebPartID"+this.ctx.ctxId);n!=null&&a.push("&WebPartID="+n.getAttribute("webPartID"));if(this.strGroupName!=null){var j=GroupStringFromGroupName(this.strGroupName);j!=null&&a.push("&IsGroupRender=TRUE&DrillDown=1&GroupString="+j)}var k=new CUrl(this.InplViewUrl()),u=k.path,g=k.query;if(g.length>0)g=g.substr(1);var r=a.join("");delete a;var b=u+"?"+ReconcileQstringFilters(g,r);if(GetUrlKeyValue("SortField",true,b).length==0){var l=GetUrlKeyValue("SortField",true,window.location.href);if(l.length>0)b=SetUrlKeyValue("SortField",l,false,b);var m=GetUrlKeyValue("SortDir",true,window.location.href);if(m.length>0)b=SetUrlKeyValue("SortDir",m,false,b)}var o=GetUrlKeyValue("RootFolder",true,e);if(o.length>0&&GetUrlKeyValue("RootFolder",true,b).length==0)b=SetUrlKeyValue("RootFolder",o,false,b);if(t)return b;this.RefreshCore(b)}CLVP.prototype.ResetSelection=CLVPResetSelection;function CLVPResetSelection(){ULSiIp:;var a=this.ctx,f=true;this.CUIItemInfo=null;if(CountSelectedItems(a)>0){var h=a.dictSel;a.dictSel=[];a.CurrentSelectedItems=0;var g=window.location.href;if(g.indexOf("Filter")==-1&&g.indexOf("Sort")==-1){var d=this.tab;if(d){var c=d.rows,k=function(b){ULSiIp:;var a=b.getAttribute("iid");return a&&h[a]!=null},b=GetLastSelectableRowIdx(d,k);if(c&&b>0){for(var e=0;e<b;e++){var j=c[e],i=j.getAttribute("iid");i&&h[i]!=null&&ToggleItemRowSelection2(a,j,true,false)}f=false;ToggleItemRowSelection2(a,c[b],true,true)}}}}UpdateSelectAllCbx(a,true);f&&RefreshCommandUI()}CLVP.prototype.WebPartId=CLVPWebPartId;function CLVPWebPartId(){ULSiIp:;if(this.wpid==null){if(this.tab!=null){var a=this.tab;a=GetAncestor(a,"DIV");if(a!=null){if(a.getAttribute("WebPartID2")!=null){this.wpid=a.getAttribute("WebPartID2");return this.wpid}if(a.getAttribute("WebPartID")!=null){this.wpid=a.getAttribute("WebPartID");return this.wpid}}}this.wpid=this.ctx.view.toLowerCase().substring(1,this.ctx.view.length-2)}return this.wpid}CLVP.prototype.RefreshCore=CLVPRefreshCore;function CLVPRefreshCore(strUrl){ULSiIp:;MenuHtc_hide();var req;if(window.XMLHttpRequest)req=new XMLHttpRequest;else req=new ActiveXObject("Microsoft.XMLHTTP");var additionalPostData="";if(typeof this.ctx.overrideSelectCommand!="undefined"){additionalPostData="&OverrideSelectCommand="+this.ctx.overrideSelectCommand;strUrl=SetUrlKeyValue("IgnoreQString","TRUE",false,strUrl)}var strRootFolder=GetUrlKeyValue("RootFolder",true,strUrl);if(strRootFolder.length>0){additionalPostData=additionalPostData+"&InplRootFolder="+strRootFolder;strUrl=RemoveUrlKeyValue("RootFolder",strUrl)}if(additionalPostData!=""){req.open("POST",strUrl,true);req.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}else{req.open("GET",strUrl,true);additionalPostData=null}var clvp=this;clvp.focusInfo=null;clvp.bRequestOutstanding=true;if(focusAcc!=null&&focusAcc.focusInCLVPTab!=null)clvp.focusInfo=focusAcc;var strHash="InplviewHash="+this.ctx.view+this.InplViewUrlTrim(strUrl);strHash=EncodeQueryStringAsHash(strHash);if(strHash.indexOf("?")>=0)debugger;req.onreadystatechange=function(){ULSiIp:;if(req.readyState==4){try{req.onreadystatechange=null}catch(e){}clvp.bRequestOutstanding=false;var strInner=req.responseText;if(req.status==601){alert(req.responseText);return}if(clvp.isEcbInfo){clvp.CacheEcbInfo(strInner);clvp.isEcbInfo=false;clvp.strGroupName=null;if(clvp.queueEcbInfo.length>0)while(clvp.EnsureEcbInfo(null,null,clvp.queueEcbInfo.shift())!=null&&clvp.queueEcbInfo.length>0);return}var div=document.createElement("DIV"),tid=clvp.tab.id;if(clvp.tab.tagName=="DIV")tid=clvp.tab.tabid;var pid=clvp.pagingTab!=null?clvp.pagingTab.id:null;div.style.visibility="hidden";div.innerHTML=strInner;for(var oldFilterIfrm=document.getElementById("FilterIframe"+clvp.ctx.ctxId),newIfrms=div.getElementsByTagName("IFRAME"),newFilterIfrm=null,idx=0;idx<newIfrms.length;idx++)if(newIfrms[idx].id=="FilterIframe"+clvp.ctx.ctxId){newFilterIfrm=newIfrms[idx];break}if(oldFilterIfrm!=null&&newFilterIfrm!=null){var td=oldFilterIfrm.parentNode;td.removeChild(oldFilterIfrm);td.appendChild(newFilterIfrm)}document.body.appendChild(div);eval("ctx"+clvp.ctx.ctxId+".clvp=clvp;");var rgscripts=ExpColGroupScripts(strInner),ppid="previewpanetable"+clvp.ctx.ctxId,ppold=document.getElementById(ppid);if(ppold!=null)ppold.id="";clvp.tab.id="";var hid=document.getElementById("hidRootFolder");if(hid!=null){clvp.rootFolder=hid.value;if(hid.value.indexOf("?")>=0)debugger}var hidFolderGuid=document.getElementById("hidRootFolderGuid");if(hidFolderGuid!=null)clvp.rootFolderGuid=hidFolderGuid.value;var tabs=GetElementsByName(tid);if(tabs.length==0)if(tid=="onetidDoclibViewTbl0")tabs=GetElementsByName(clvp.ctx.listName+"-"+clvp.ctx.view);else tabs=GetElementsByName("onetidDoclibViewTbl0");var tabNew=null,pagNew=document.getElementById("bottomPagingCell"),trNew=null;if(tabs.length==1)tabNew=tabs[0];else{for(var i=0;i<tabs.length;i++){tabNew=tabs[i];var divNew=clvp.FindWebPartDiv(tabNew);if(divNew==div)break}if(i==tabs.length)tabNew=null}if(tabNew==null){SwapNode(clvp.tab,div);div.style.visibility="visible";return}if(tabNew.className=="ms-emptyView"){trNew=GetAncestor(tabNew,"TR");trNew=trNew.nextSibling}var groupRender=false;if(clvp.tBody!=null){groupRender=true;if(clvp.tBody.getAttribute("isLoaded")!=null){clvp.tBody.setAttribute("isLoaded","true");clvp.tab.id=tid;if(!clvp.tab.onmouseover)clvp.tab.onmouseover=clvp.ctx.TableMouseoverHandler;if(clvp.ctx.SelectAllCbx&&!clvp.ctx.SelectAllCbx.onfocus)clvp.ctx.SelectAllCbx.onfocus=clvp.ctx.TableCbxFocusHandler;!clvp.ctx.StateInitDone&&ctxInitItemState(clvp.ctx);for(var objChildren=clvp.tBody.childNodes,i=objChildren.length-1;i>=0;i--){var objToRemove=objChildren.item(i);if(objToRemove.tagName=="TR"&&ItemIsSelectable(objToRemove))clvp.ctx.TotalListItems--;clvp.tBody.removeChild(objToRemove)}var selectableNodes=0,tBodyArray=tabNew.getElementsByTagName("TBODY");if(tBodyArray.length>=1){objChildren=tBodyArray[0].childNodes;for(var node=null,i=objChildren.length-1;i>=1;i--){var objToInsert=objChildren.item(i);if(objToInsert.tagName=="TR"&&ItemIsSelectable(objToInsert)){selectableNodes++;clvp.ctx.TotalListItems++}node=clvp.tBody.insertBefore(objToInsert,node)}if(pagNew!=null){var pagingTable=GetAncestor(pagNew,"TABLE"),curPagTab=clvp.tBody.nextSibling;if(curPagTab==null||curPagTab.tagName!="TBODY"||curPagTab.id!=clvp.tBody.id+"page"||curPagTab.firstChild==null||curPagTab.firstChild.tagName!="TR"){curPagTab=document.createElement("TBODY");curPagTab.id=clvp.tBody.id+"page";curPagTab=clvp.tBody.parentNode.insertBefore(curPagTab,clvp.tBody.nextSibling);var tr=document.createElement("TR");tr=curPagTab.appendChild(tr)}var trNode=curPagTab.firstChild;trNode.firstChild!=null&&trNode.removeChild(trNode.firstChild);pagNew.colSpan=100;pagNew.id=pagNew.id+clvp.wpq.substr(7)+clvp.tBody.id;pagNew=trNode.appendChild(pagNew)}clvp.tBody.setAttribute("selectableRows",selectableNodes);UpdateCtxLastSelectableRow(clvp.ctx,clvp.tab)}clvp.InvalidateEcbInfo();clvp.ResetSelection()}}document.body.removeChild(div);if(pagNew!=null){var tab=clvp.pagingTab;clvp.pagingTab=pagNew;clvp.RehookPaging();clvp.pagingTab=tab}if(typeof ProcessImn!="undefined"){imnCount=0;bIMNOnloadAttached=false;ProcessImn()}if(groupRender){clvp.tBody=null;g_ExpGroupInProgress=false;g_ExpInitializing=false;g_ExpGroupQueue.length>0&&ExpGroupFetchData(g_ExpGroupQueue.shift(),typeof clvp.ctx.isXslView!="undefined"&&clvp.ctx.isXslView?"true":null)}!g_ExpGroupInProgress&&clvp.queueEcbInfo.length>0&&clvp.EnsureEcbInfo(null,null,clvp.queueEcbInfo.shift());if(clvp!=null&&clvp.focusInfo!=null)if(clvp.focusInfo.focusInCLVPTab!=null&&clvp.focusInfo.focusInCLVPTab==true){var focusTabl=clvp.tab,focusBack=null;if(focusTabl!=null&&clvp.focusInfo.tagName!=null&&clvp.focusInfo.id!=null)for(var focusArray=focusTabl.getElementsByTagName(clvp.focusInfo.tagName),i=0;i<focusArray.length;i++)if(focusArray[i].id==clvp.focusInfo.id){focusBack=focusArray[i];break}if(focusBack!=null&&focusBack.tagName!="A"){var anchorList=focusBack.getElementsByTagName("A"),anchorListLen=anchorList.length;if(anchorListLen>0)focusBack=anchorList[anchorListLen-1]}if(focusBack!=null)if(focusBack.setActive!=null)focusBack.setActive();else focusBack.focus!=null&&focusBack.focus();focusAcc=null}}};req.send(additionalPostData)}CLVP.prototype.RefreshCurrent=CLVPRefreshCurrent;function CLVPRefreshCurrent(){ULSiIp:;var a=document.URL;STSNavigate(a)}CLVP.prototype.GetQueryString=CLVPGetQueryString;function CLVPGetQueryString(){ULSiIp:;if(this.tab!=null&&this.tab.getAttribute("FilterLink")!=null)return this.tab.getAttribute("FilterLink");else return document.URL}CLVP.prototype.RefreshEcbInfo=CLVPRefreshEcbInfo;function CLVPRefreshEcbInfo(b){ULSiIp:;var a=this.GetQueryString();a=FixUrlFromClvp2(this,a,false);this.isEcbInfo=true;this.strGroupName=b;var c=this;this.RefreshPagingEx(a,false,"EcbView")}CLVP.prototype.CacheEcbInfo=CLVPCacheEcbInfo;function CLVPCacheEcbInfo(b){ULSiIp:;if(this.ctx.HasRelatedCascadeLists==1&&this.ctx.CascadeDeleteWarningMessage==null){var j="<CascadeDeleteWarningMessage>",k="</CascadeDeleteWarningMessage>";if(b.startsWith(j)){var g=b.indexOf(k);if(g!==-1){this.ctx.CascadeDeleteWarningMessage=b.substring(j.length,g);b=b.substring(g+k.length)}}}var f=document.createElement("DIV");f.innerHTML=b;f.style.display="none";var l=f.getElementsByTagName("TABLE"),a,e,c=null;if(this.strGroupName!=null)var n="ecbtab_ctx"+this.ctx.ctxId,c=document.getElementById(n);for(e=0;e<l.length;e++){a=l[e];if(this.tab!=null&&a.id==this.tab.id){if(c==null)a.id="ecbtab_ctx"+this.ctx.ctxId;else a.id="ecbtab_ctx"+this.ctx.ctxId+"_"+this.strGroupName;a.rows.length>0&&!a.rows[0].className.indexOf("ms-viewheadertr")&&a.deleteRow(0);a.style.display="none";this.tab.appendChild(a);var d;if(c==null)d=[];else d=c.dict;for(var m=a.getElementsByTagName("DIV"),i=0;i<m.length;i++){var h=m[i];if(h.id!="")d[h.id]=h}if(c==null)a.dict=d;this.strGroupName!=null&&this.CacheGroupName(this.strGroupName);break}}if(this.fnEcbCallback!=null&&this.queueEcbInfo.length==0){this.fnEcbCallback(a);this.fnEcbCallback=null}}CLVP.prototype.EnsureEcbInfo=CLVPEnsureEcbInfo;function CLVPEnsureEcbInfo(c,f,a){ULSiIp:;var g="ecbtab_ctx"+this.ctx.ctxId,b=document.getElementById(g);if(b==null&&this.tab!=null&&this.tab.parentNode==null)for(var d=0;d<this.tab.childNodes.length;d++){var e=this.tab.childNodes[d];if(e.id==g)b=e}if(b&&a!=null)if(!this.IsInGroupCache(a))b=null;if(b!=null){c&&this.NoOutstandingECBRequests()&&c(f);return b}if(c!=null&&this.fnEcbCallback==null)this.fnEcbCallback=function(){ULSiIp:;c(f)};if(this.isEcbInfo||this.bRequestOutstanding){(!this.isEcbInfo||a!=null&&a!=this.strGroupName)&&this.EnqueueEcbInfoRequest(a);return null}this.RefreshEcbInfo(a);return null}CLVP.prototype.InvalidateEcbInfo=CLVPInvalidateEcbInfo;function CLVPInvalidateEcbInfo(){ULSiIp:;var b="ecbtab_ctx"+this.ctx.ctxId,a=document.getElementById(b);if(a!=null){this.tab.removeChild(a);this.DeleteGroupNameCache()}}CLVP.prototype.GetEcbInfo=CLVPGetEcbInfo;function CLVPGetEcbInfo(b){ULSiIp:;var a=this.EnsureEcbInfo();if(a!=null)if(a.dict!=null)return a.dict[b];return null}CLVP.prototype.SwitchToEdit=CLVPSwitchToEdit;function CLVPSwitchToEdit(){ULSiIp:;var a=document.URL;a=FixUrlFromClvp2(this,a,false);this.RefreshPagingEx(a,false,"JsGrid")}CLVP.prototype.EnsureChangeContext=CLVPEnsureChangeContext;function CLVPEnsureChangeContext(){ULSiIp:;if(this.cctx==null)this.cctx=new SP.ClientContext(null)}CLVP.prototype.DeleteItemCore=CLVPDeleteItemCore;function CLVPDeleteItemCore(c,f){ULSiIp:;var h=this.ctx.listBaseType==1;this.EnsureChangeContext();var a=null;if(typeof this.rgehs=="undefined")this.rgehs=[];var b,e;b=new SP.ExceptionHandlingScope(this.cctx);this.rgehs.push(b);e=b.startScope();this.cctx.get_pendingRequest().set_navigateWhenServerRedirect(true);var d=this.cctx.get_web().get_lists().getById(this.ctx.listName);if(this.ctx.ExternalDataList)a=d.getItemById(c.toString());else if(f==1)a=d.getItemById(parseInt(c));else a=d.getItemById(parseInt(c));if(h){a.retrieve("FileLeafRef");b.itmContext=a}var g=this.ctx.RecycleBinEnabled&&!this.ctx.ExternalDataList;if(g)a.recycle();else a.deleteObject();this.changePending=true;e.dispose()}CLVP.prototype.CheckoutItem=CLVPCheckoutItem;function CLVPCheckoutItem(f,d){ULSiIp:;this.EnsureChangeContext();if(typeof this.rgehs=="undefined")this.rgehs=[];var a,c,b=null;if(d!=0)return;a=new SP.ExceptionHandlingScope(this.cctx);this.rgehs.push(a);c=a.startScope();b=this.cctx.get_web().get_lists().getById(this.ctx.listName).getItemById(f);b.retrieve("FileLeafRef");a.itmContext=b;var e=b.get_file();e.checkOut();c.dispose();this.changePending=true}CLVP.prototype.DiscardCheckoutItem=CLVPDiscardCheckoutItem;function CLVPDiscardCheckoutItem(e,g){ULSiIp:;this.EnsureChangeContext();if(typeof this.rgehs=="undefined")this.rgehs=[];var b=null,a,f;if(g!=0)return;a=new SP.ExceptionHandlingScope(this.cctx);this.rgehs.push(a);f=a.startScope();b=this.cctx.get_web().get_lists().getById(this.ctx.listName).getItemById(e);b.retrieve("FileLeafRef");a.itmContext=b;var h=b.get_file(),c=this.GetEcbInfo(e);if(c!=null&&c.getAttribute("COut")=="1")try{var i=this.ctx.HttpRoot+c.getAttribute("Url"),d=StsOpenEnsureEx("SharePoint.OpenDocuments.3");d!=null&&d.DiscardLocalCheckout(i)}catch(j){}else h.undoCheckOut();this.changePending=true;f.dispose()}CLVP.prototype.CheckinItem=CLVPCheckinItem;function CLVPCheckinItem(g,j,a){ULSiIp:;this.EnsureChangeContext();if(typeof this.rgehs=="undefined")this.rgehs=[];var c=null,b,h;if(j!=0)return;b=new SP.ExceptionHandlingScope(this.cctx);this.rgehs.push(b);h=b.startScope();c=this.cctx.get_web().get_lists().getById(this.ctx.listName).getItemById(g);c.retrieve("FileLeafRef");b.itmContext=c;var f=c.get_file(),e=this.GetEcbInfo(g);if(e!=null&&e.getAttribute("COut")=="1")try{var i=this.ctx.HttpRoot+e.getAttribute("Url"),d=StsOpenEnsureEx("SharePoint.OpenDocuments.3");if(d!=null)if(a.kco)d.CheckinDocument(i,a.cit,a.cmt,true);else d.CheckinDocument(i,a.cit,a.cmt)}catch(k){}else{f.checkIn(a.cmt,a.cit);a.kco&&f.checkOut();this.changePending=true}h.dispose()}CLVP.prototype.ManageCopies=CLVPManageCopies;function CLVPManageCopies(f,e){ULSiIp:;if(e!=0)return;var b=this.GetEcbInfo(f);if(b!=null&&b.getAttribute("Url")!=null){var d=this.ctx.HttpRoot+"/_layouts/managecopies.aspx?ItemUrl="+b.getAttribute("Url")+"&Source="+GetSource(),a=window["ctx"+this.ctx.ctxId];if(a!=null&&a.clvp!=null){var c=a.clvp,g=FixUrlFromClvp(c,d);if(FV4UI()){c.ShowPopup(g);return}}STSNavigate(d)}}CLVP.prototype.ShowErrorDialog=CLVPShowErrorDialog;function CLVPShowErrorDialog(g){ULSiIp:;var i,a=[],d=null,c=false;for(i in this.rgehs){var b=this.rgehs[i];if(b.get_hasException()){var f="s4-dlg-err-itm";if(!c){f="s4-dlg-err-firstitm";c=true;a.push(SP.Res.dlgTitleError)}var k=b.get_errorMessage();a.push('<div class="'+f+'">');if(typeof b.itmContext!="undefined")try{a.push('<div class="s4-dlg-err-itmName">');a.push(b.itmContext.get_item("FileLeafRef"));a.push("</div>")}catch(l){a.push("</div>")}a.push('<div class="s4-dlg-err-itmMsg">');a.push(k);a.push("</div>");a.push("</div>")}}if(c){a.push("<div id='dlgDivButton'><button id='ms-OKBtnDismissDlg' class='ms-ButtonHeightWidth' onclick='DismissErrDlg(this)'>");a.push(SP.Res.okButtonCaption);a.push("</button></div>")}var h=a.join("");if(h.length>0){var e=document.createElement("DIV");e.className="s4-dlg-err";e.innerHTML=h;var j={html:e,title:SP.Res.errorDialogTitleText,dialogReturnValueCallback:g},m=new SP.UI.ModalDialog.showModalDialog(j);d=document.getElementById("ms-OKBtnDismissDlg");d&&d.focus()}else g();this.rgehs=[]}CLVP.prototype.InplViewUrl=CLVPInplViewUrl;function CLVPInplViewUrl(){ULSiIp:;if(this.inplUrl!=null)return this.inplUrl;var a=[],b=escapeUrlForCallback(this.ctx.HttpRoot);a.push(b);b[b.length-1]!="/"&&a.push("/");a.push("_layouts/inplview.aspx?List=");a.push(this.ctx.listName);if(this.ctx.view!=null){a.push("&View=");a.push(this.ctx.view)}a.push("&ViewCount=");a.push(this.ctx.ctxId);a.push("&ListViewPageUrl=");var d=new CUrl(document.URL);a.push(escapeProperlyCore(d.path,true));typeof this.ctx.isXslView!="undefined"&&this.ctx.isXslView&&a.push("&IsXslView=TRUE");typeof this.ctx.overrideSelectCommand!="undefined"&&a.push("&HasOverrideSelectCommand=TRUE");var c=null;if(typeof this.ctx.overrideFilterQstring!="undefined")c=this.ctx.overrideFilterQstring.match("OverrideScope=[^&]*");typeof this.ctx.overrideScope!="undefined"&&c==null&&a.push("&OverrideScope="+this.ctx.overrideScope);if(typeof this.ctx.overrideFilterQstring!="undefined"){a.push("&");a.push(this.ctx.overrideFilterQstring)}this.inplUrl=a.join("");delete a;return this.inplUrl}CLVP.prototype.InplViewUrlTrim=CLVPInplViewUrlTrim;function CLVPInplViewUrlTrim(a){ULSiIp:;var b="";if(a)if(typeof this.ctx.overrideFilterQstring!="undefined")b=a.substr(this.InplViewUrl().length-this.ctx.overrideFilterQstring.length);else b=a.substr(this.InplViewUrl().length+1);return b}CLVP.prototype.ShowPopup=CLVPShowPopup;function CLVPShowPopup(a){ULSiIp:;MenuHtc_hide();if(typeof this.fnOnCommitPopup!="undefined"&&this.fnOnCommitPopup!=null)OpenPopUpPage(a,this.fnOnCommitPopup);else OpenPopUpPage(a,RefreshPage);return false}CLVP.prototype.ValidateField=CLVPValidateField;function CLVPValidateField(e,d,a,b){ULSiIp:;var c=this.FieldCommand("FldValidate",e,d,a,b),f={callback:a,newval:b,strCmd:c};if(this.qvalidate==null)this.qvalidate=[];this.qvalidate.push(f);if(!this.isValidating){this.isValidating=true;this.RefreshCore(c)}}CLVP.prototype.FieldCommand=CLVPFieldCommand;function CLVPFieldCommand(j,h,d,m,f){ULSiIp:;var a=[];a.push(this.InplViewUrl());a.push("&Cmd=");a.push(j);a.push("&Field=");a.push(d);a.push("&FieldValue=");var b=h.GetProp(d),c,n=this.gridParam.tableViewParams.columns.GetColumnByKey(d),k=jsGridParams.tableViewParams.gridFieldMap[d],l=b==null?k.GetPropType():b.propType;if(f!=null)if(l.ID=="SPUser")for(var g=f.split(";"),e=0;e<g.length;e++){e>0&&a.push(";%23");a.push("-1;%23");a.push(g[e])}else a.push(f);else if(b!=null&&b.HasDataValue()){c=b.GetData();if(b.propType.ID=="SPUser")c=c.substr(0,c.indexOf(";#"));a.push(c)}else if(b!=null&&b.HasLocalizedValue()){b.propType.ID=="SPUser"&&a.push("-1;%23");a.push(b.GetLocalized())}var i=a.join("");return i}CLVP.prototype.IsInGroupCache=CLVPIsInGroupCache;function CLVPIsInGroupCache(a){ULSiIp:;if(this.strGroupCache==null)return false;return this.strGroupCache.indexOf(a+"$")!=-1}CLVP.prototype.CacheGroupName=CLVPCacheGroupName;function CLVPCacheGroupName(a){ULSiIp:;if(this.strGroupCache==null)this.strGroupCache=a+"$";else this.strGroupCache=this.strGroupCache+a+"$"}CLVP.prototype.DeleteGroupNameCache=CLVPDeleteGroupNameCache;function CLVPDeleteGroupNameCache(){ULSiIp:;if(this.strGroupCache==null)return;var b=0,a;a=this.strGroupCache.indexOf("$",b);while(a!=-1){var d=this.strGroupCache.substring(b,a),e="ecbtab_ctx"+this.ctx.ctxId+"_"+d,c=document.getElementById(e);c&&this.tab.removeChild(c);b=a+1;a=this.strGroupCache.indexOf("$",b)}this.strGroupCache=null}CLVP.prototype.EnqueueEcbInfoRequest=CLVPEnqueueEcbInfoRequest;function CLVPEnqueueEcbInfoRequest(b){ULSiIp:;for(var a=0;a<this.queueEcbInfo.length;a++)if(this.queueEcbInfo[a]==b)return;this.queueEcbInfo.push(b)}CLVP.prototype.NoOutstandingECBRequests=CLVPNoOutstandingECBRequests;function CLVPNoOutstandingECBRequests(){ULSiIp:;if(this.isEcbInfo)return false;if(this.queueEcbInfo.length>0)return false;return true}function SetFocusBack(d){ULSiIp:;if(d==0||focusAcc!=null&&focusAcc.focusInCLVPTab!=null&&focusAcc.focusInCLVPTab!=true){var a=null;if(focusAcc!=null&&focusAcc.elem!=null)a=focusAcc.elem;if(a!=null&&a.tagName!="A"){var c=a.getElementsByTagName("A"),b=c.length;if(b>0)a=c[b-1]}if(a!=null)if(a.setActive!=null)a.setActive();else a.focus!=null&&a.focus();else typeof SP.Ribbon!="undefined"&&SP.Ribbon&&SP.Ribbon.PageManager&&focusAcc!=null&&focusAcc.fromRibbon&&SP.Ribbon.PageManager.get_instance().restoreFocusToRibbon();focusAcc=null}}SPBoolean=function(){};SPBoolean.prototype={ID:"SPBoolean",BeginValidateNormalizeConvert:function(d,e,a){ULSiIp:;return {isValid:true,dataValue:null,normalizedLocValue:a,hasLocValue:true,hasDataValue:false}},FromDynamicUpdate:function(a){ULSiIp:;return {dataValue:!!a,locValue:!!a}},GetBool:function(a){ULSiIp:;var b=a.HasLocalizedValue()?a.GetLocalized():a.HasDataValue()?a.GetData():null;return !!(1*b)}};SPNumber=function(){};SPNumber.prototype={ID:"SPNumber",BeginValidateNormalizeConvert:function(d,e,a){ULSiIp:;return {isValid:true,dataValue:null,normalizedLocValue:a,hasLocValue:true,hasDataValue:false}},FromDynamicUpdate:function(a){ULSiIp:;return {dataValue:a,locValue:a}}};SPChoice=function(){};SPChoice.prototype={ID:"SPChoice",BeginValidateNormalizeConvert:function(d,e,a){ULSiIp:;return {isValid:true,dataValue:null,normalizedLocValue:a,hasLocValue:true,hasDataValue:false}},FromDynamicUpdate:function(a){ULSiIp:;return {dataValue:a,locValue:a}},GetItems:function(){ULSiIp:;debugger;return null}};SPIcon=function(){};SPIcon.prototype={ID:"SPIcon",BeginValidateNormalizeConvert:function(d,e,a){ULSiIp:;return {isValid:true,dataValue:null,normalizedLocValue:a,hasLocValue:true,hasDataValue:false}},FromDynamicUpdate:function(a){ULSiIp:;return {dataValue:a,locValue:a}},GetImageSource:function(c,b){ULSiIp:;var a=b;if(a==null)return "";a=a.substr(0,a.indexOf("|"));if(a.length<=1)return "";return "/_layouts/images/"+a}};SPUrl=function(){};SPUrl.prototype={ID:"SPUrl",BeginValidateNormalizeConvert:function(d,e,a,b){ULSiIp:;if(b)return {isValid:true,dataValue:null,normalizedLocValue:a,hasLocValue:true,hasDataValue:false};else return {isValid:true,dataValue:a,normalizedLocValue:a,hasLocValue:true,hasDataValue:true}},FromDynamicUpdate:function(a){ULSiIp:;return {dataValue:a,locValue:a}}};SPUser=function(){};SPUser.prototype={ID:"SPUser",BeginValidateNormalizeConvert:function(e,f,a,c,d){ULSiIp:;if(c){var b=this.clvp,g=b.tc.GetCachedRecord(e);b.ValidateField(g,f,d,a);return null}else return {isValid:true,dataValue:a,normalizedLocValue:a,hasLocValue:true,hasDataValue:true}},FromDynamicUpdate:function(a){ULSiIp:;return {dataValue:a,locValue:a}}};function ExpColGroupScripts(c){ULSiIp:;var d=[],e=/<script type="text\/javascript">ExpCollGroup\('[^']*',\s*'[^']*'\);<\/script>/g,b=e.exec(c);while(b!=null){var a=b[0],g=a.indexOf("ExpCollGroup"),f=a.indexOf(";");d.push(a.substring(g,f+1));b=e.exec(c)}return d}function InitCLVPs(){ULSiIp:;if(typeof g_ViewIdToViewCounterMap!="undefined"){var b;for(b in g_ViewIdToViewCounterMap){var a=window["ctx"+g_ViewIdToViewCounterMap[b]];if(a){var c=new CLVP(a);c.Init()}}}}function CLVPFromCtx(a){ULSiIp:;if(typeof a.clvp!="undefined")return a.clvp;return null}function CLVPFromEventReal(b){ULSiIp:;if(b==null)return null;if(b.fromRibbon&&b.currentCtx)return CLVPFromCtx(b.currentCtx);var j=GetEventSrcElement(b),a=null,d=null,f=null,h=GetEventPopup(b);if(h!=null){if(typeof b.currentCtx!="undefined"&&b.currentCtx!=null){var i=window["ctx"+b.currentCtx.ctxId];return CLVPFromCtx(i)}if(typeof currentCtx!="undefined"&&currentCtx!=null)return CLVPFromCtx(currentCtx);if(typeof ctxFilter!="undefined"&&ctxFilter!=null)return CLVPFromCtx(ctxFilter);var e=h.master;if(e==null)return null;if(e.id!=null&&e.id.indexOf("onetViewSelector_menu")>0){var k=e.id.substr(0,e.id.indexOf("onetViewSelector_menu")+16);a=GetAncestor(document.getElementById(k),"TABLE")}else a=GetAncestor(e,"TABLE")}else a=GetAncestor(j,"TABLE");while(a!=null){if(a.className=="ms-menutoolbar")break;if(a.className=="ms-listviewtable"){d=a;a=null;break}a=a.parentNode;if(a!=null)a=GetAncestor(a,"TABLE")}if(a==null&&d==null)return null;if(d==null){var c=a.nextSibling;while(c!=null&&(c.nodeType!=1||c.tagName!="TABLE"))c=c.nextSibling;if(c==null)return null;var f=c.getElementsByTagName("TABLE");if(f.length==0)return null;d=f[0]}var g=CLVPFromCtx(d);if(g==null){f=c.getElementsByTagName("DIV");if(f.length==0)return null;d=f[0];g=CLVPFromCtx(d)}return g}function SetUrlKeyValue(b,e,f,a){ULSiIp:;if(a==null)a=window.location.href+"";var c=e,d=new CUrl(a);a=d.query;if(f)c=escapeProperly(c);if(a.indexOf(b+"=")<0){if(a.length>1)a+="&";else if(a.length==0)a+="?";a+=b+"="+c}else{var g=new RegExp(b+"=[^&]*");a=a.replace(g,b+"="+c)}d.query=a;return d.ToString()}function FixUrlFromClvp(a,b){ULSiIp:;return FixUrlFromClvp2(a,b,true)}function FixUrlFromClvp2(c,a,d){ULSiIp:;var b=c.rootFolder;if((b==null||b.length==0)&&c.rgpaging==null&&!c.isEditing)return a;if(b!=null&&b.length>0)if(a.toUpperCase().indexOf("LISTEDIT.ASPX")==-1)a=SetUrlKeyValue("RootFolder",b,true,a);if(d){var e=GetSource2(null,c);a=SetUrlKeyValue("Source",e,true,a)}return a}function STSNavigateToViewReal(b,a){ULSiIp:;STSNavigate(a);return true}function STSNavigate2Real(b,a){ULSiIp:;STSNavigate(a);return true}function GetSource2(c,b){ULSiIp:;var a=GetUrlKeyValue("Source");if(a=="")if(c!=null&&c!="")a=c;else a=window.location.href;if(a.length>0){var e=new CUrl(a);e.hash="";a=e.ToString()}if(b==null&&typeof currentCtx!="undefined")b=currentCtx!=null?currentCtx.clvp:null;if(b!=null&&(b.rootFolder!=null||b.rgpaging!=null))if(a!=""){if(b.rootFolder!=null&&b.rootFolder!="")a=SetUrlKeyValue("RootFolder",b.rootFolder,true,a);if(b.rgpaging!=null){var d;for(d in b.rgpaging)a=SetUrlKeyValue(d,b.rgpaging[d],false,a);if(b.rgpaging["PagedPrev"]==null){a=RemoveUrlKeyValue("PagedPrev",a);a=RemoveUrlKeyValue("PageLastRow",a)}if(b.rgpaging["PageFirstRow"]==null)a=RemoveUrlKeyValue("PageFirstRow",a)}}if(b!=null&&b.isEditing&&a!="")a=SetUrlKeyValue("JsGrid","1",false,a);return STSPageUrlValidation(a)}function OnClickFilterV4(d){ULSiIp:;var c=FindSTSMenuTable(d,"CTXNum");if(c!=null&&c.getAttribute("SortFields")!=null){var b=c.getAttribute("SortFields");if(b.indexOf("?")>0)b=b.substr(b.indexOf("?")+1);var a=GetUrlWithNoSortParameters(b);a=RemovePagingArgs(a);if(a.indexOf("?")<0)a+="?";else a+="&";a=a+b;SubmitFormPost(a)}return false}function HandleFilterReal(b,a){ULSiIp:;SubmitFormPost(a);return false}function InitAllClvps(){ULSiIp:;(FV4UI()||GroupCollapse())&&InitCLVPs()}function FixDroppedOrPastedClvps(){ULSiIp:;if(typeof g_ViewIdToViewCounterMap!="undefined"){var c;for(c in g_ViewIdToViewCounterMap){var b=window["ctx"+g_ViewIdToViewCounterMap[c]];if(b){var a=b.clvp;if(a&&(!a.tab||!a.tab.parentNode||1!=a.tab.parentNode.nodeType)){var a=new CLVP(b);a.Init()}}}}}var focusAcc=null;function GetFocusInfo(c,j){ULSiIp:;var b={};b.elem=null;b.id=null;b.tagName=null;b.focusInCLVPTab=null;b.fromRibbon=c.fromRibbon;var a=null;if(c.target)a=c.target;else if(c.srcElement)a=c.srcElement;if(typeof c.fakeEvent!="undefined"&&c.fakeEvent){if(a.master!=null)a=a.master._oParent;if(a!=null&&a.tagName!="A")a=a.getElementsByTagName("A")[0]}else if(c.fromRibbon!=true)while(a.tagName!="A"&&a.tagName!="BODY")a=a.parentNode;var e=null;if(a!=null){while(a.id.length==0&&a.tagName!="BODY")a=a.parentNode;e=a.id}var d=null;if(a!=null)d=a.tagName;var h=false,f=null;if(j!=null)f=j.tab;if(f!=null&&d!=null&&e!=null)for(var i=f.getElementsByTagName(d),g=0;g<i.length;g++)if(i[g].id==e){h=true;break}b.elem=a;b.id=e;b.tagName=d;b.focusInCLVPTab=h;focusAcc=b}function ExpGroup(e,b){ULSiIp:;tabBody=document.getElementById("tbod"+b+"_");if(tabBody!=null)tabTb=GetAncestor(tabBody,"TABLE");if(tabBody==null||tabBody.tagName!="TBODY"||tabTb==null||tabTb.clvp==null||tabBody.getAttribute("isLoaded")==null)return;var d=b.substring(0,b.indexOf("-")),c=document.getElementById("GroupByCol"+d),a="?";if(c!=null){a=c.getAttribute("queryString");if(a.substring(a.length-1)=="&")a=a.substr(0,a.length-1)}a=RemoveOnlyPagingArgs(a);a+="&GroupString=";a+=titlTbody.getAttribute("groupString");a+="&IsGroupRender=TRUE";tabTb.clvp.tBody=tabBody;tabTb.clvp.RefreshPaging(a,null)}function DeleteSelectedItems(b){ULSiIp:;b=FixupCtx(b);var a=b.clvp,d=GetSelectedItemsDict(b),g=CountDictionary(d);if(g>0){if(ContainsRecurrenceItem(d))return;var c=L_STSRecycleConfirm_Text;if(!b.RecycleBinEnabled||b.ExternalDataList)c=L_STSDelConfirm_Text;if(b.HasRelatedCascadeLists&&b.CascadeDeleteWarningMessage!=null)c=b.CascadeDeleteWarningMessage+c;if(!confirm(c))return}var h;for(h in d){var e=d[h];a.DeleteItemCore(e.id,e.fsObjType,false)}a.pendingItems=[];if(g>0){var i=L_Notification_Delete,f=addNotification(i,true);a.cctx.executeQueryAsync(function(){ULSiIp:;if(typeof a.rgehs!="undefined"){if(a.rgehs.length==1&&a.rgehs[0].get_serverErrorCode()==SP.ClientErrorCodes.redirect){GoToPage(a.rgehs[0].get_serverErrorValue());return}removeNotification(f);a.ShowErrorDialog(RefreshOnDialogClose)}else RefreshPage(SP.UI.DialogResult.OK)},function(){ULSiIp:;removeNotification(f);typeof a.rgehs!="undefined"&&a.ShowErrorDialog()})}}function ContainsRecurrenceItem(b){ULSiIp:;for(var c in b){var a=b[c];if(a&&a.id&&(a.id.indexOf(".0.")!=-1||a.id.indexOf(".1.")!=-1||a.id.indexOf(".2.")!=-1))return true}return false}function CheckOutSingleItem(b,c){ULSiIp:;b=FixupCtx(b);var f=GetAttributeFromItemTable(c,"Url","ServerUrl"),d=GetAttributeFromItemTable(c,"Icon","DocIcon").split("|"),a=null;if(d.length>=3)a=d[2];if(a=="SharePoint.OpenDocuments")a="SharePoint.OpenDocuments.3";var g=addNotification(L_Notification_CheckOut,true,null,null,true),e=CheckoutDocument(b.HttpRoot,f,a);!e&&removeNotification(g,true)}function FixupCtx(a){ULSiIp:;if(a&&typeof a.clvp=="undefined"&&typeof a.ctxId!="undefined"){var b=window["ctx"+a.ctxId];if(b)return b}return a}function CheckInSingleItemFromECB(c,a,d){ULSiIp:;a=FixupCtx(a);var b=a.clvp;GetFocusInfo(c,b);CheckInSingleItem(a,d)}function CheckInSingleItem(b,d){ULSiIp:;var a=GetAttributeFromItemTable(d,"Url","ServerUrl");if(a!=null)a=escapeProperly(unescapeProperly(a));var c=b.HttpRoot+"/_layouts/checkin.aspx?List="+b.listName+"&FileName="+a;OpenPopUpPage(c,CheckInNotifyAndRefreshPage)}function CheckInNotifyAndRefreshPage(a){ULSiIp:;if(a==SP.UI.DialogResult.OK){var b=L_Notification_CheckIn;addNotification(b,true)}RefreshPage(a)}function AttachFile(a){ULSiIp:;var g=a.clvp,b=GetSelectedItemsDict(a),f=CountDictionary(b),c,e;if(f==1)for(e in b){var c=b[e];if(c.fsObjType==0){var d=a.HttpRoot+"/_layouts/AttachFile.aspx?ListId="+a.listName+"&ItemId="+c.id+"&Source="+GetSource();if(FV4UI())OpenPopUpPage(d,RefreshPage);else GoToPage(d)}}}function ManageCopies(b){ULSiIp:;var e=b.clvp,a=GetSelectedItemsDict(b),f=CountDictionary(a),c,d;if(f==1)for(d in a){var c=a[d];e.ManageCopies(c.id,c.fsObjType)}}function CheckoutSelectedItems(d){ULSiIp:;var a=d.clvp,b=GetSelectedItemsDict(d),h=CountDictionary(b),c,e;if(h==1)for(e in b){c=b[e];var f=a.GetEcbInfo(c.id);if(f==null)FetchEcbInfo(d,c.id,"DIV",CheckOutSingleItem);else CheckOutSingleItem(d,f);return}if(!confirm(L_CheckoutConfirm))return;for(e in b){var c=b[e];a.CheckoutItem(c.id,c.fsObjType)}if(h>0){var i=L_Notification_CheckOut,g=addNotification(i,true);a.cctx.executeQueryAsync(function(){ULSiIp:;if(typeof a.rgehs!="undefined"){removeNotification(g);a.ShowErrorDialog(RefreshOnDialogClose)}else RefreshPage(SP.UI.DialogResult.OK)},function(){ULSiIp:;removeNotification(g);typeof a.rgehs!="undefined"&&a.ShowErrorDialog()})}}function DiscardCheckoutSelectedItems(b){ULSiIp:;b=FixupCtx(b);var a=b.clvp,c=GetSelectedItemsDict(b),h=CountDictionary(c),d,f;if(!confirm(L_DiscardCheckoutConfirm))return;for(f in c){var d=c[f];a.DiscardCheckoutItem(d.id,d.fsObjType)}if(h>0){var g=L_Notification_DiscardCheckOut,e=addNotification(g,true);a.cctx.executeQueryAsync(function(){ULSiIp:;if(typeof a.rgehs!="undefined"){removeNotification(e);a.ShowErrorDialog(RefreshOnDialogClose)}else RefreshPage(SP.UI.DialogResult.OK)},function(){ULSiIp:;removeNotification(e);typeof a.rgehs!="undefined"&&a.ShowErrorDialog()})}}function CheckinSelectedItems(d){ULSiIp:;var a=d.clvp,b=[],c=GetSelectedItemsDict(d),k=CountDictionary(c),e,h;if(k==1)for(h in c){e=c[h];var g=a.GetEcbInfo(e.id);if(g==null)FetchEcbInfo(d,e.id,"DIV",CheckInSingleItem);else CheckInSingleItem(d,g);return}var f=a.ctx.HttpRoot;b.push(f);f[f.length-1]!="/"&&b.push("/");b.push("_layouts/checkin.aspx?List=");b.push(a.ctx.listName);b.push("&IsBulk=1");var i=function(g){ULSiIp:;var f,e=0;for(f in c){var b=c[f];a.CheckinItem(b.id,b.fsObjType,g);e++}if(e>0){var h=L_Notification_CheckIn,d=addNotification(h,true);a.cctx.executeQueryAsync(function(){ULSiIp:;if(typeof a.rgehs!="undefined"){removeNotification(d);a.ShowErrorDialog(RefreshOnDialogClose)}else RefreshPage(SP.UI.DialogResult.OK)},function(){ULSiIp:;removeNotification(d);typeof a.rgehs!="undefined"&&a.ShowErrorDialog()})}},j=function(b,c){ULSiIp:;if(b==SP.UI.DialogResult.OK)a.EnsureEcbInfo(i,c,null);else RefreshPage(b)};OpenPopUpPage(b.join(""),j)}function DismissErrDlg(){ULSiIp:;var a=window.top.g_childDialog;a&&a.close(0)}function CanNavigateUp(a){ULSiIp:;if(a==null||a.clvp==null)return false;var b=unescapeProperly(GetRootFolder2(a));if(b==null||b==unescapeProperly(a.listUrlDir))return false;return true}function NavigateUp(d){ULSiIp:;if(!CanNavigateUp(d))return;var b=unescapeProperly(GetRootFolder2(d));if(b==null)return;var e=b.lastIndexOf("/"),c="";if(e>0)c=b.substr(0,e);else return;var a=document.URL;a=RemoveParametersFromUrl(a);a=a+"?RootFolder="+escapeProperly(c);STSNavigate(a)}InitAllClvps();var inplview={CheckOutSingleItem:CheckOutSingleItem,InitAllClvps:InitAllClvps,HandleFilterReal:HandleFilterReal,OnClickFilterV4:OnClickFilterV4,STSNavigate2Real:STSNavigate2Real,DeleteSelectedItems:DeleteSelectedItems,ExpGroup:ExpGroup,STSNavigateToViewReal:STSNavigateToViewReal,CheckInSingleItemFromECB:CheckInSingleItemFromECB};typeof Sys!="undefined"&&Sys&&Sys.Application&&Sys.Application.notifyScriptLoaded();NotifyScriptLoadedAndExecuteWaitingJobs("inplview.js")