﻿var IsMenuShown=false,itemTableDeferred=null,itemTable=null,imageCell=null,onKeyPress=false,downArrowText=null,currentCtx=null,currentEditMenu=null,currentItemID=null,currentItemAppName=null,currentItemProgId=null,currentItemIcon=null,currentItemOpenControl=null,currentItemFileUrl=null,currentItemFSObjType=null,currentItemCheckedOutUserId=null,currentItemCheckoutExpires=null,currentItemModerationStatus=null,currentItemUIString=null,currentItemCheckedoutToLocal=null,bIsCheckout=0,currentItemCanModify=null,currentItemPermMaskH=null,currentItemPermMaskL=null,currentItemIsEventsExcp=null,currentItemIsEventsDeletedExcp=null,UTF8_1ST_OF_2=192,UTF8_1ST_OF_3=224,UTF8_1ST_OF_4=240,UTF8_TRAIL=128,HIGH_SURROGATE_BITS=55296,LOW_SURROGATE_BITS=56320,SURROGATE_6_BIT=64512,SURROGATE_ID_BITS=63488,SURROGATE_OFFSET=65536;function escapeProperlyCoreCore(f,g,h,i){var c="",b="",d=0,k=" \"%<>'&";if(typeof f=="undefined")return "";for(d=0;d<f.length;d++){var a=f.charCodeAt(d),e=f.charAt(d);if(g&&(e=="#"||e=="?")){c+=f.substr(d);break}if(h&&e=="&"){c+=e;continue}if(a<=127){if(i)c+=e;else if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||g&&(a>=32&&a<=95)&&k.indexOf(e)<0)c+=e;else if(a<=15)c+="%0"+a.toString(16).toUpperCase();else if(a<=127)c+="%"+a.toString(16).toUpperCase()}else if(a<=2047){b=UTF8_1ST_OF_2|a>>6;c+="%"+b.toString(16).toUpperCase();b=UTF8_TRAIL|a&63;c+="%"+b.toString(16).toUpperCase()}else if((a&SURROGATE_6_BIT)!=HIGH_SURROGATE_BITS){b=UTF8_1ST_OF_3|a>>12;c+="%"+b.toString(16).toUpperCase();b=UTF8_TRAIL|(a&4032)>>6;c+="%"+b.toString(16).toUpperCase();b=UTF8_TRAIL|a&63;c+="%"+b.toString(16).toUpperCase()}else if(d<f.length-1){var a=(a&1023)<<10;d++;var j=f.charCodeAt(d);a|=j&1023;a+=SURROGATE_OFFSET;b=UTF8_1ST_OF_4|a>>18;c+="%"+b.toString(16).toUpperCase();b=UTF8_TRAIL|(a&258048)>>12;c+="%"+b.toString(16).toUpperCase();b=UTF8_TRAIL|(a&4032)>>6;c+="%"+b.toString(16).toUpperCase();b=UTF8_TRAIL|a&63;c+="%"+b.toString(16).toUpperCase()}}return c}function escapeProperly(a){return escapeProperlyCoreCore(a,false,false,false)}function escapeProperlyCore(b,a){return escapeProperlyCoreCore(b,a,false,false)}function escapeUrlForCallback(a){var c=a.indexOf("#"),b=a.indexOf("?");if(c>0&&(b==-1||c<b)){var d=a.substr(0,c);if(b>0)d+=a.substr(b);a=d}return escapeProperlyCoreCore(a,true,false,true)}function PageUrlValidation(a){if(a.substr(0,4)!="http"&&a.substr(0,1)!="/"){var b="Invalid page URL: ";alert(b);return ""}else return a}var g_ExpGroupWPState=new LRUCache;function makeAbsUrl(a){if(a.length>0&&"/"==a.substr(0,1))a=window.location.protocol+"//"+window.location.host+a;return a}function FilterNoteField(b,d,e,j){if(j!=13)return;event.returnValue=false;var a=window.location.href;pagedPart=/&Paged=TRUE&p_[^&]*&PageFirstRow=[^&]*/gi;a=a.replace(pagedPart,"");viewGuid=GetUrlKeyValue("View",true);if(viewGuid==""){a=StURLSetVar2(a,"View",b);viewGuid=b}if(b.toUpperCase()!=viewGuid.toUpperCase()){var g=escapeProperly(b);if(g.toUpperCase()!=viewGuid.toUpperCase()){var k=/\?[^?]*/i,f=a.indexOf("?");if(f!=-1)a=a.replace(k,"?View="+b);else a=a+"?View="+b}}var c=a.match("FilterField([0-9]+)="+d);if(!c){var f=a.indexOf("?");if(f!=-1)a=a+"&";else a=a+"?";i=0;do{i++;FilterArray=a.match("FilterField"+i+"=[^&]*"+"&FilterValue"+i+"=[^&]*")}while(FilterArray);a=a+"FilterField"+i+"="+d+"&FilterValue"+i+"="+escapeProperly(e);a=a.replace("Filter=1&","")}else{filterNo=parseInt(c[1]);var h=a.match("&FilterValue"+filterNo+"=[^&]*");strTemp="&"+c[0]+h[0];strNewFilter="&FilterField"+c[1]+"="+d+"&FilterValue"+c[1]+"="+escapeProperly(e);a=a.replace(strTemp,strNewFilter);a=a.replace("Filter=1&","")}window.location.href=STSPageUrlValidation(a)}function SelectField(b,i){var a=window.location.href,f=window.location.hash,c=false,e=/\#.*/i;a=a.replace(e,"");viewGuid=GetUrlKeyValue("View",true);pageView=GetUrlKeyValue("PageView",true);if(b.toUpperCase()!=viewGuid.toUpperCase()){var g=escapeProperly(b);if(g.toUpperCase()!=viewGuid.toUpperCase()){var e=/\?[^?]*/i,h=a.indexOf("?");if(h!=-1)a=a.replace(e,"?View="+b);else a=a+"?View="+b;c=true}}if(!c&&GetUrlKeyValue("SelectedID")!=""){var d=/&SelectedID=[^&]*/gi;a=a.replace(d,"");d=/\?SelectedID=[^&]*&?/;a=a.replace(d,"?")}a=a+"&SelectedID=";a=a+i;if(c&&pageView!="")a=a+"&PageView="+pageView;if(f!="")a=a+f;SubmitFormPost(a)}function FilterField(d,b,a,c){return FilterFieldV3(d,b,a,c,false)}function FilterFieldV3(e,k,l,m,p){var a=CanonicalizeUrlEncodingCase(window.location.href),b=a.match("[&?]Paged=TRUE[^&]*");if(b){var c=/&p_[^&]*/gi;a=a.replace(c,"");c=/&PageFirstRow=[^&]*/gi;a=a.replace(c,"");c=/&PageLastRow=[^&]*/gi;a=a.replace(c,"");c=/&PagedPrev=TRUE[^&]*/i;a=a.replace(c,"");b=a.match("[?]Paged=TRUE[^&]*");if(b){var f=a.substr(b["index"]).indexOf("&");if(f!=-1)a=a.substr(0,b["index"]+1)+a.substr(f+b["index"]+1);else a=a.substr(0,b["index"])}else{c=/&Paged=TRUE[^&]*/i;a=a.replace(c,"")}}viewGuid=GetUrlKeyValue("View",true);if(viewGuid==""){a=StURLSetVar2(a,"View",e);viewGuid=e}if(e.toUpperCase()!=viewGuid.toUpperCase()){var o=escapeProperly(e);if(o.toUpperCase()!=viewGuid.toUpperCase()){var q=/\?[^?]*/i,f=a.indexOf("?");if(f!=-1)a=a.replace(q,"?View="+e);else a=a+"?View="+e}}b=a.match("FilterField([0-9]+)="+k+"&");if(!b)if(0==m){a=a.replace("Filter=1&","");a=a.replace("?Filter=1","")}else{var f=a.indexOf("?");if(f!=-1)a=a+"&";else a=a+"?";i=0;do{i++;FilterArray=a.match("FilterField"+i+"=[^&]*"+"&FilterValue"+i+"=[^&]*")}while(FilterArray);a=a+"FilterField"+i+"="+k+"&FilterValue"+i+"="+escapeProperly(l);a=a.replace("Filter=1&","")}else{filterNo=parseInt(b[1]);var h=a.match("FilterValue"+filterNo+"=[^&]*"),d="&"+b[0]+h[0];if(0==m){if(a.indexOf(d)==-1)d=b[0]+h[0]+"&";a=a.replace(d,"");j=filterNo+1;FilterArray=a.match("FilterField"+j+"=[^&]*"+"&FilterValue"+j+"=[^&]*");for(i=filterNo;FilterArray;i++){strNew="FilterField"+i;strOld="FilterField"+j;a=a.replace(strOld,strNew);strNew="FilterValue"+i;strOld="FilterValue"+j;a=a.replace(strOld,strNew);j++;FilterArray=a.match("FilterField"+j+"=[^&]*"+"&FilterValue"+j+"=[^&]*")}a=a.replace("Filter=1&","");a=a.replace("?Filter=1","")}else{var g;if(a.indexOf(d)==-1){d="?"+b[0]+h[0];g="?"}else g="&";var n=g+"FilterField"+b[1]+"="+k+"&FilterValue"+b[1]+"="+escapeProperly(l);a=a.replace(d,n);a=a.replace("Filter=1&","")}}b=a.match("FilterField([0-9]+)=");if(!b)a=a+"&FilterClear=1";else a=a.replace("&FilterClear=1","");if(p)return a;else SubmitFormPost(a)}function CanonicalizeUrlEncodingCase(c){var b="",a;for(a=0;a<c.length;a++){var d=c.charAt(a);if(d=="%"&&a+2<c.length){b+=d;a++;b+=c.charAt(a).toString().toUpperCase();a++;b+=c.charAt(a).toString().toUpperCase()}else b+=d}return b}function SetControlValue(b,c){var a=document.getElementById(b);if(a!=null)a.value=c}var bValidSearchTerm=false;function SetSearchView(){if(typeof bValidSearchTerm!="undefined")bValidSearchTerm=true}function SubmitFormPost(c,b){if(typeof MSOWebPartPageFormName!="undefined"){var a=document.forms[MSOWebPartPageFormName];if(null!=a)if(b!=undefined&&b==true||!a.onsubmit||a.onsubmit()!=false){a.action=STSPageUrlValidation(c);a.method="POST";if(isPortalTemplatePage(c))a.target="_top";if(!bValidSearchTerm)ClearSearchTerm("");a.submit()}}}var g_varSkipRefreshOnFocus=0;function RefreshOnFocus(){if(typeof g_varSkipRefreshOnFocus=="undefined"||!g_varSkipRefreshOnFocus){var a=window.location.href,b=a.indexOf("#");if(b==-1)window.location.href=a;else window.location.href=a.substring(0,b)}}function DisableRefreshOnFocus(){g_varSkipRefreshOnFocus=1}function SetWindowRefreshOnFocus(){window.onbeforeunload=DisableRefreshOnFocus;window.onfocus=RefreshOnFocus}function RemoveParametersFromUrl(a){var b=a.indexOf("?");if(b==-1)return a;else return a.substr(0,b)}function GoToPageRelative(a){if(a.substr(0,4)!="http"&&a.substr(0,1)!="/"){var b=RemoveParametersFromUrl(window.location.href),c=b.lastIndexOf("/");if(c>0)a=b.substring(0,c+1)+a}GoToPage(a)}function EnterFolder(a){var b=RemoveParametersFromUrl(window.location.href),c=RemoveParametersFromUrl(a);if(c.toLowerCase()!=b.toLowerCase())STSNavigate(a);else SubmitFormPost(a)}function GoToDiscussion(b){var c=b.indexOf("?")>=0?"&":"?",a=GetSource();if(a!=null&&a!="")b+=c+"TopicsView="+a;STSNavigate(b)}function STSNavigateWithCheckoutAlert(g,f,d,c,e,a,b){if(typeof a=="undefined"||a==null||a=="")a=currentItemCheckedOutUserId;if((typeof b=="undefined"||b==null||b=="")&&typeof ctx!="undefined")b=ctx.CurrentUserId;if(d=="1"){alert(L_CannotEditPropertyForLocalCopy_Text);return}if(a!=null&&a!=""&&b!=null&&a!=b){alert(L_CannotEditPropertyCheckout_Text);return}if(f=="1"&&browseris.ie)if(confirm(L_ConfirmCheckout_Text)){if(c.charAt(0)=="/"||c.substr(0,3).toLowerCase()=="%2f")c=document.location.protocol+"//"+document.location.host+c;CheckoutviaXmlhttp(e,c)}else return;STSNavigate(g)}function CheckoutviaXmlhttp(c,b){var a=new ActiveXObject("Microsoft.XMLHTTP");if(a==null)return false;a.Open("POST",c+"/_vti_bin/lists.asmx",false);a.setRequestHeader("Content-Type","text/xml; charset=utf-8");a.setRequestHeader("SOAPAction","http://schemas.microsoft.com/sharepoint/soap/CheckOutFile");var d='<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><CheckOutFile xmlns="http://schemas.microsoft.com/sharepoint/soap/"><pageUrl>'+b+"</pageUrl></CheckOutFile></soap:Body></soap:Envelope>";a.Send(d);if(a.status==200&&a.ResponseText.indexOf("true")!=0)return true;else return false}var g_ExtensionNotSupportCheckoutToLocal=["ascx","asp","aspx","htm","html","master","odc","exe","bat","com","cmd","onetoc2"],g_ExtensionDefaultForRead=["jpg","jpeg","bmp","png","gif","onetoc2","one","odc"];function FSupportCheckoutToLocal(a){var c=true;if(a==null||a=="")return false;a=a.toLowerCase();var b=0;for(b=0;b<g_ExtensionNotSupportCheckoutToLocal.length;b++)if(a==g_ExtensionNotSupportCheckoutToLocal[b])return false;return true}function FDefaultOpenForReadOnly(a){var c=false;if(a==null||a=="")return true;a=a.toLowerCase();var b=0;for(b=0;b<g_ExtensionDefaultForRead.length;b++)if(a==g_ExtensionDefaultForRead[b])return true;return false}function CheckoutDocument(f,a,d){var b=null,g=true,c=false;if(a.charAt(0)=="/"||a.substr(0,3).toLowerCase()=="%2f")a=document.location.protocol+"//"+document.location.host+a;var e=SzExtension(unescapeProperly(a));if(FSupportCheckoutToLocal(e)&&d=="SharePoint.OpenDocuments.3")b=StsOpenEnsureEx(d);if(b!=null)try{g=b.CheckoutDocumentPrompt(unescapeProperly(a),false,"");SetWindowRefreshOnFocus();c=true;return}catch(h){}if(!c)NavigateToCheckinAspx(f,"FileName="+escapeProperly(unescapeProperly(a))+"&Checkout=true")}function NewItem(a){GoToPage(a)}function EditItem(a){GoToPage(a)}function GoToHistoryLink(b,d){if(b.href==null)return;var c=b.href,f=b.href.indexOf("?")>=0?"&":"?",e=f+"VersionNo="+d,a=GetSource();if(a!=null&&a!="")a="&Source="+a;var c=b.href+e+a;if(isPortalTemplatePage(c))window.top.location=STSPageUrlValidation(c);else window.location=STSPageUrlValidation(c)}function GoToLink(c){if(c.href==null)return;var d=c.href.indexOf("?")>=0?"&":"?",a=GetSource();if(a!=null&&a!="")a=d+"Source="+a;var b=c.href+a;if(isPortalTemplatePage(b))window.top.location=STSPageUrlValidation(b);else window.location=STSPageUrlValidation(b)}function GoBack(a){window.location.href=unescapeProperly(GetSource(a))}function ReplyItem(a,b,e,d){if(b.length>=504){var c="Cannot reply to this thread. The reply limit has been reached.";alert(c)}else{a+="?Threading="+b;a+="&Guid="+e;a+="&Subject="+d;GoToPage(a)}}function GoBacktoCurrentIssue(a,b){a+="?ID="+b;GoToPage(a)}function CatchCreateError(){return true}function ExportToDatabase(e,f,g,d){var b="To export a list, you must have a Windows SharePoint Services-compatible application and Microsoft Internet Explorer 6.0 or greater.",c="Export to database failed. To export a list, you must have a Windows SharePoint Services-compatible application.";if(browseris.ie5up&&browseris.win32)try{var a;a=new ActiveXObject("SharePoint.ExportDatabase");if(!a){alert(b);return}a.SiteUrl=makeAbsUrl(e);a.ListID=f;a.ViewID=g;a.DoExport(d);a=null}catch(h){alert(c);return}else alert(b)}function ExportList(b){var a="To export a list, you must have a Windows SharePoint Services-compatible application.";if(fSSImporter&&SSImporterObj.IqyImportEnabled()||confirm(a))window.location.href=STSPageUrlValidation(makeAbsUrl(b))}function ExportDiagram(l,e,k,f,h,g){try{objDiagramLaunch=new ActiveXObject("DiagramLaunch.DiagramLauncher");var c="",i=l,d=g,b=e,j=k;objDiagramLaunch.CreateDiagram(c,i,d,b,f,h,j)}catch(m){var a="Unable to create diagram.";alert(a)}delete objDiagramLaunch}var ListCtrlObj,fListControl=false,fListErrorShown=false,L_EditInGrid_Text="The list cannot be displayed in Datasheet view for one or more of the following reasons: \n\n- A datasheet component compatible with Windows SharePoint Services is not installed.\n- Your Web browser does not support ActiveX controls. \n- Support for ActiveX controls is disabled.";function CatchListCreateError(){alert(L_EditInGrid_Text);fListErrorShown=true;return false}function EnsureListControl(){if(!fListControl){fListErrorShown=false;if(browseris.ie5up&&browseris.win32){var b='try{    ListCtrlObj=new ActiveXObject("ListNet.ListNet");    if (ListCtrlObj)        fListControl=true;} catch (e){    fListControl=false;};',a=new Function(b);a()}else{window.onerror=CatchListCreateError;ListCtrlObj=new ActiveXObject("ListNet.ListNet");if(ListCtrlObj)fListControl=true}}ListCtrlObj=null;return fListControl}var L_NoQuestion_Text="The survey contains no questions.",L_NoVoteAllowed_Text="You are not allowed to respond again to this survey.";function IsVoteOK(a){if(1==a)alert(L_NoQuestion_Text);else if(2==a)alert(L_NoVoteAllowed_Text);else return true}function hasHighChar(b){var a=0;for(a=0;a<b.length;a++)if(b.charCodeAt(a)>127)return true;return false}function RemovePagingArgs(a){var f=/&*Paged=TRUE/gi;a=a.replace(f,"");var c=/&*PagedPrev=TRUE/gi;a=a.replace(c,"");var e=/&p_[^&]*/gi;a=a.replace(e,"");var g=/&PageFirstRow=[^&]*/gi;a=a.replace(g,"");var d=/&PageLastRow=[^&]*/gi;a=a.replace(d,"");var h=/\?Filter=1&*/gi;a=a.replace(h,"?");var i=/&Filter=1/gi;a=a.replace(i,"");var b=/\?$/;a=a.replace(b,"");return a}function ClearSearchTerm(a){if(typeof MSOWebPartPageFormName!="undefined"){var c=document.forms[MSOWebPartPageFormName];if(null!=c)if(a!=null){var b=c["SearchString"+a];if(b!=null)b.value=""}}bValidSearchTerm=true}function SubmitSearchRedirect(b){var a=document.forms["frmSiteSearch"];if(a==null)if(typeof MSOWebPartPageFormName!="undefined")a=document.forms[MSOWebPartPageFormName];if(a!=null){var e=a.elements["SearchString"].value;b=b+"?k="+escapeProperly(e);var d=a.elements["SearchScope"];if(d!=null){var c=d.value;if(c)b=b+"&u="+escapeProperly(c)}a.action=b;a.submit()}}function ShowGridUrlInHTML(a){if(a.indexOf("?")>0)a=a+"&";else a=a+"?";a=a+"ShowInGrid=HTML";return a}function SubmitSearch(){SubmitSearchForView("")}function SubmitSearchForView(f){var a=document.forms[0],c="SearchString"+f,e=a.elements[c].value;if(""==e){var d="Please enter one or more search words.";alert(d);a.elements[c].focus()}else{var b;b=RemovePagingArgs(a.action);if(typeof bGridViewPresent!="undefined"&&bGridViewPresent)b=ShowGridUrlInHTML(b);a.action=b;a.submit()}}function IsKeyDownSubmit(a){if(a!=null){var c,b;if(browseris.ie){c=a.keyCode;b=a.altKey||a.ctrlKey}else{c=a.which;b=a.modifers&(a.ALT_MASK|a.CONTROL_MASK)}if(c==13&&!b)return true}return false}function SearchViewKeyDown(a){if(IsKeyDownSubmit(event))SubmitSearchForView(a)}function SearchKeyDown(b,a){if(IsKeyDownSubmit(b)){SubmitSearchRedirect(a);return false}return true}function AlertAndSetFocus(b,a){a.focus();a.select();window.alert(b)}function AlertAndSetFocusForDropdown(b,a){a.focus();window.alert(b)}function setElementValue(c,b){var a=document.getElementsByName(c).item(0);if(a==null)return false;a.value=b;return true}function GetMultipleSelectedText(b){if(b){var a;a="";for(var c=0;c<b.options.length;c++)if(b.options[c].selected)a+=","+b.options[c].text;if(a.length>0)a=a.substring(1);return a}else return ""}function GetCBSelectedValues(c){if(c==null)return;var a={};a.strList="";a.fAllChecked=true;for(var d=0;d<c.elements.length;d++){var b=c.elements[d];if(b.type=="checkbox"&&!b.disabled)if(b.checked){if(a.strList!="")a.strList+=",";a.strList+=b.value}else a.fAllChecked=false}return a}var fNewDoc=false,fNewDoc2=false,fNewDoc3=false,L_EditDocumentProgIDError_Text="'Edit Document' requires a Windows SharePoint Services-compatible application and Microsoft Internet Explorer 6.0 or greater.",L_EditDocumentRuntimeError_Text="The document could not be opened for editing.  A Windows SharePoint Services compatible application could not be found to edit the document.";function editDocumentWithProgID(a,b){if(fNewDoc){if(a.charAt(0)=="/"||a.substr(0,3).toLowerCase()=="%2f")a=document.location.protocol+"//"+document.location.host+a;if(!fNewDoc2&&!fNewDoc3){if(!EditDocumentButton.EditDocument(a,b))alert(L_EditDocumentRuntimeError_Text)}else if(!EditDocumentButton.EditDocument2(window,a,b))alert(L_EditDocumentRuntimeError_Text)}else alert(L_EditDocumentProgIDError_Text)}function editDocumentWithProgID2(c,g,f,e,d,b){var a=editDocumentWithProgIDNoUI(c,g,f,e,d,b);if(a==1){alert(L_EditDocumentRuntimeError_Text);window.onfocus=RefreshOnNextFocus}else if(a==2)alert(L_EditDocumentProgIDError_Text)}function editDocumentWithProgIDNoUI(a,c,d,g,j,h){var b,k,f=false;d=d.replace(/(?:\.\d+)$/,"");if(a.charAt(0)=="/"||a.substr(0,3).toLowerCase()=="%2f")a=document.location.protocol+"//"+document.location.host+a;var i=SzExtension(unescapeProperly(a));if(FSupportCheckoutToLocal(i))try{b=new ActiveXObject(d+".3");if(b!=null){if(g=="1"){if(!b.CheckoutDocumentPrompt(a,true,c))return 1}else{if(h=="1")f=true;if(!b.EditDocument3(window,a,f,c))return 1}var e=false;e=b.PromptedOnLastOpen();if(e)window.onfocus=RefreshOnNextFocus;else SetWindowRefreshOnFocus();return}}catch(l){}if(g=="1")if(confirm(L_ConfirmCheckout_Text))NavigateToCheckinAspx(j,"FileName="+escapeProperly(unescapeProperly(a))+"&Checkout=true");else return;try{b=new ActiveXObject(d+".2");if(!b.EditDocument2(window,a,c))return 1;window.onfocus=RefreshOnNextFocus;return}catch(l){}try{b=new ActiveXObject(d+".1");window.onfocus=null;if(SzExtension(a)=="ppt"&&c=="")c="PowerPoint.Slide";if(!b.EditDocument(a,c))return 1;SetWindowRefreshOnFocus();return}catch(l){return 2}}function RefreshOnNextFocus(){SetWindowRefreshOnFocus()}function createNewDocumentWithProgID2(b,a,e,d,c){if(!createNewDocumentWithProgIDCore(b,a,e,c,false))createNewDocumentWithProgIDCore(b,a,d,c,true)}function createNewDocumentWithProgID(b,a,c,d){createNewDocumentWithProgIDCore(b,a,c,d,true)}function createNewDocumentWithProgIDCore(e,d,f,i,h){var a,b,g,c=false;if(i)var b=L_NewFormLibTb1_Text,g=L_NewFormLibTb2_Text;else var b=L_NewDocLibTb1_Text,g=L_NewDocLibTb2_Text;try{a=new ActiveXObject(f+".2");if(!a.CreateNewDocument2(window,e,d))alert(b);c=a.PromptedOnLastOpen();if(c)window.onfocus=RefreshOnNextFocus;else SetWindowRefreshOnFocus();return true}catch(j){}try{a=new ActiveXObject(f+".1");window.onfocus=null;if(!a.CreateNewDocument(e,d))alert(b);SetWindowRefreshOnFocus();return true}catch(j){if(h)alert(g)}}function createNewDocumentWithRedirect(f,b,c,g,e,a){if(IsClientAppInstalled(c)&&a!=1){var d=c.replace(/(?:\.\d+)$/,"");createNewDocumentWithProgID(f,b,d,g)}else STSNavigate(e+"&SaveLocation="+makeAbsUrl(escapeProperly(b))+"&Source="+GetSource()+"&DefaultItemOpen="+a)}if(typeof ExpandBody=="undefined")function ExpandBody(c,b){var a=document.forms[MSOWebPartPageFormName];a.CAML_Expand.value=a.CAML_Expand.value.concat(c);a.action=a.action.concat("#"+b);a.submit();return false}if(typeof CollapseBody=="undefined")function CollapseBody(c,d){var a=document.forms[MSOWebPartPageFormName],b=new RegExp("{","g");c=c.replace(b,"\\{");b=new RegExp("}","g");c=c.replace(b,"\\}");b=new RegExp(c,"g");a.CAML_Expand.value=a.CAML_Expand.value.replace(b,"");a.CAML_ShowOriginalEmailBody.value=a.CAML_ShowOriginalEmailBody.value.replace(b,"");a.action=a.action.concat("#"+d);a.submit();return false}if(typeof ShowQuotedText=="undefined")function ShowQuotedText(c,b){var a=document.forms[MSOWebPartPageFormName];a.CAML_ShowOriginalEmailBody.value=a.CAML_ShowOriginalEmailBody.value.concat(c);if(a.action.indexOf("#")>0)a.action=a.action.substr(0,a.action.indexOf("#"));a.action=a.action.concat("#"+b);a.submit();return false}if(typeof HideQuotedText=="undefined")function HideQuotedText(b,d){var a=document.forms[MSOWebPartPageFormName],c=new RegExp("{","g");b=b.replace(c,"\\{");c=new RegExp("}","g");b=b.replace(c,"\\}");c=new RegExp(b,"g");a.CAML_ShowOriginalEmailBody.value=a.CAML_ShowOriginalEmailBody.value.replace(c,"");if(a.action.indexOf("#")>0)a.action=a.action.substr(0,a.action.indexOf("#"));a.action=a.action.concat("#"+d);a.submit();return false}function LRUCache(){this.state=[];this.ageStack=[];this.count=0}function LRUCache_Add(a,b){if(!a)return;oldAge=a.state[b];if(oldAge!=null)a.ageStack[oldAge]=null;else a.count++;age=a.ageStack.length;a.state[b]=age;a.ageStack.push(b)}function LRUCache_Remove(a,b){if(!a)return;age=a.state[b];if(age!=null){a.ageStack[age]=null;a.state[b]=null;a.count--}}function AddGroupToCookie(c){var a=ExpGroupFetchWebPartID(c);if(a==null)return;LRUCache_Add(g_ExpGroupWPState,a);if(g_ExpGroupTable[a]==null)g_ExpGroupTable[a]=new LRUCache;var b=ExpGroupFetchGroupString(c);if(b==null)return;LRUCache_Add(g_ExpGroupTable[a],b);ExpGroupRenderCookie()}function RemoveGroupFromCookie(d){var a=ExpGroupFetchWebPartID(d);if(a==null)return;if(g_ExpGroupTable[a]==null)return;LRUCache_Add(g_ExpGroupWPState,a);var c=ExpGroupFetchGroupString(d);if(c==null)return;var b;for(b in g_ExpGroupTable[a].state)if(g_ExpGroupTable[a].state[b]!=null&&b.substring(0,c.length)==c)LRUCache_Remove(g_ExpGroupTable[a],b);ExpGroupRenderCookie()}function ExpGroupRenderCookie(){if(!g_ExpGroupWPState)return;var c=ExpGroupWPListName+"=",a=0,d;for(d=g_ExpGroupWPState.ageStack.length-1;d>=0;d--)if(g_ExpGroupWPState.ageStack[d]!=null){var b=g_ExpGroupWPState.ageStack[d];if(a==ExpGroupMaxWP){DeleteCookie(ExpGroupCookiePrefix+b);break}else if(g_ExpGroupTable[b]==null){a++;if(a>1)c+=escape(ExpGroupCookieDelimiter);c+=escape(b)}else if(g_ExpGroupTable[b].count==0)DeleteCookie(ExpGroupCookiePrefix+b);else if(a<ExpGroupMaxWP){a++;ExpGroupRenderCookieForWebPart(b);if(a>1)c+=escape(ExpGroupCookieDelimiter);c+=escape(b)}}if(a==0)DeleteCookie(ExpGroupWPListName);else document.cookie=c}function ExpGroupRenderCookieForWebPart(a){if(!g_ExpGroupTable[a].ageStack)return;var d=ExpGroupCookiePrefix+a+"=",e=true,b;for(b=g_ExpGroupTable[a].ageStack.length-1;b>=0;b--)if(g_ExpGroupTable[a].ageStack[b]!=null){var f=g_ExpGroupTable[a].ageStack[b],c="";if(!e)c+=escape(ExpGroupCookieDelimiter);c+=escape(f);if(d.length+c.length<=ExpGroupMaxCookieLength){d+=c;e=false}}document.cookie=d+";"}function ExpGroupOnPageLoad(){flag=document.getElementById("GroupByColFlag");if(flag!=null){g_ExpGroupNeedsState=true;ExpGroupParseCookie()}}function ExpGroupParseCookie(){var c=GetCookie(ExpGroupWPListName);if(c==null)return;g_ExpGroupParseStage=true;var d=c.split(ExpGroupCookieDelimiter),b;for(b=d.length-1;b>=0;b--){var a=d[b];LRUCache_Add(g_ExpGroupWPState,a);if(g_ExpGroupTable[a]==null)if(document.getElementById("GroupByCol"+a)!=null)ExpGroupParseCookieForWebPart(a)}g_ExpGroupParseStage=false;if(g_ExpGroupQueue.length>0)ExpGroupFetchData(g_ExpGroupQueue.shift())}function ExpGroupParseCookieForWebPart(d){var k=GetCookie(ExpGroupCookiePrefix+d);if(k==null)return;var l=k.split(ExpGroupCookieDelimiter),a;g_ExpGroupTable[d]=new LRUCache;for(a=l.length-1;a>=0;a--){var h=l[a];LRUCache_Add(g_ExpGroupTable[d],h)}var c=[],m=document.getElementById("GroupByCol"+d).parentNode;tbodyTags=m.getElementsByTagName("TBODY");for(a=0;a<tbodyTags.length;a++){var h=tbodyTags[a].getAttribute("groupString");if(h!=null){var i=tbodyTags[a].id;if(i==null)continue;var b=i.substring(4,i.length);if(g_ExpGroupTable[d].state[h]!=null&&c[b]==null){ExpCollGroup(b,"img_"+b);c[b]=true;tbody=document.getElementById("tbod"+b+"_");if(tbody!=null){isLoaded=tbody.getAttribute("isLoaded");if(isLoaded=="false")g_ExpGroupQueue.push(b)}}}}var e;for(e in c){var j=e.indexOf("_");if(j!=e.length-1&&j!=-1){var f=e.substring(0,j+1);if(c[f]==null){var g=ExpGroupFetchGroupString(f);if(g!=null){LRUCache_Add(g_ExpGroupState,g);ExpCollGroup(f,"img_"+f);c[g]=true}}}}}function ExpGroupBy(e){if(browseris.w3c&&!browseris.ie)document.all=document.getElementsByTagName("*");docElts=document.all;numElts=docElts.length;images=e.getElementsByTagName("IMG");img=images[0];srcPath=img.src;index=srcPath.lastIndexOf("/");imgName=srcPath.slice(index+1);var b="auto";if(imgName=="plus.gif"){b="";img.src="/_layouts/images/minus.gif"}else{b="none";img.src="/_layouts/images/plus.gif"}oldName=img.name;img.name=img.alt;img.alt=oldName;spanNode=img;while(spanNode!=null){spanNode=spanNode.parentNode;if(spanNode!=null&&spanNode.id!=null&&spanNode.id.length>5&&spanNode.id.substr(0,5)=="group")break}parentNode=spanNode;while(parentNode!=null){parentNode=parentNode.parentNode;if(parentNode!=null&&parentNode.tagName=="TABLE")break}lastNode=null;if(parentNode!=null){lastNode=parentNode.lastChild;if(lastNode!=null&&lastNode.tagName=="TBODY")lastNode=lastNode.lastChild;if(lastNode!=null&&lastNode.tagName=="TR"&&lastNode.lastChild!=null)lastNode=lastNode.lastChild}for(var c=0;c<numElts;c++){var a=docElts.item(c);if(a==spanNode)break}ID=spanNode.id.slice(5);displayStyle=b;for(var d=c+1;d<numElts;d++){var a=docElts.item(d);if(a.id.length>5&&a.id.substr(0,5)=="group"){curID=a.id.slice(5);if(curID<=ID)return}parentNode=a;while(parentNode!=null){parentNode=parentNode.parentNode;if(parentNode==spanNode)break}if(parentNode==spanNode)continue;if(a.id!=null&&a.id.substring(0,5)=="group")b=displayStyle;if(a.id!=null&&a.id.substring(0,8)=="footer"+ID)b=displayStyle;if(displayStyle!="none"&&a!=img&&a.tagName=="IMG"&&a.src!=null)if(a.src.slice(a.src.length-25)=="/_layouts/images/plus.gif")b="none";else if(a.src.slice(a.src.length-26)=="/_layouts/images/minus.gif")b="";if(a.tagName==spanNode.tagName&&a.id!="footer")a.style.display=b;if(a.tagName=="TABLE"&&lastNode==null||a==lastNode)break}}function SzExtension(a){var c=new String(a),b=/^.*\.([^\.]*)$/;return c.replace(b,"$1").toLowerCase()}function SzServer(a){var c=new String(a),b=/^([^:]*):\/\/([^\/]*).*$/;return c.replace(b,"$1://$2")}var v_stsOpenDoc=null,v_strStsOpenDoc=null;function StsOpenEnsureEx(a){if(v_stsOpenDoc==null||v_strStsOpenDoc!=a);return v_stsOpenDoc}function DispDocItem(b,a){return DispDocItemEx(b,"FALSE","FALSE","FALSE",a)}var L_OpenDocumentLocalError_Text="This document was being edited offline, but there is no application configured to open the document from SharePoint.  The document can only be opened for reading.";function DispDocItemEx(i,m,j,l,a){itemTable=FindSTSMenuTable(i,"CTXName");if(!browseris.ie||!browseris.win32){if(browseris.ie)event.cancelBubble=false;return true}var d,b,f,c=true,p=itemTable!=null?GetAttributeFromItemTable(itemTable,"Ext","FileType"):"",h="",o=document.getElementById("FileDialogViewTable");if(o!=null){if(browseris.ie){event.cancelBubble=false;event.returnValue=false}return true}b=itemTable!=null?GetAttributeFromItemTable(itemTable,"Url","ServerUrl"):"";if(b==null||b=="")b=i.href;else b=SzServer(i.href)+b;f=SzExtension(b);if(currentItemProgId==null&&itemTable!=null)currentItemProgId=itemTable.getAttribute("HTMLType");if(currentItemProgId!=null)h=currentItemProgId;if(FDefaultOpenForReadOnly(f)){if(a.indexOf("SharePoint.OpenDocuments")>=0)a="SharePoint.OpenDocuments.3"}else if(!FSupportCheckoutToLocal(f))a="";if(currentItemCheckedOutUserId==null&&itemTable!=null)currentItemCheckedOutUserId=itemTable.COUId;if(currentItemCheckedoutToLocal==null&&itemTable!=null)currentItemCheckedoutToLocal=GetAttributeFromItemTable(itemTable,"COut","IsCheckedoutToLocal ");if(currentItemCheckedOutUserId!=null&&currentItemCheckedOutUserId!=""&&currentItemCheckedOutUserId==ctx.CurrentUserId&&(a==""||a.indexOf("SharePoint.OpenDocuments")>=0)&&FSupportCheckoutToLocal(f)||a=="SharePoint.OpenDocuments")a="SharePoint.OpenDocuments.3";var g=2;if(a!=""&&HasRights(16,0)){if(a.indexOf(".3")>=0)g=3;d=StsOpenEnsureEx(a);if(d==null&&g==3){a=a.replace(".3",".2");d=StsOpenEnsureEx(a);g=2}}if(d!=null)if(g==2||itemTable==null&&currentItemCheckedOutUserId==null||ctx.isVersions==1&&(itemTable==null||itemTable.isMostCur=="0")){try{if(currentItemCheckedOutUserId!=null&&currentItemCheckedOutUserId!=""&&(currentItemCheckedOutUserId==ctx.CurrentUserId||ctx.CurrentUserId==null))if(currentItemCheckedoutToLocal=="1"){alert(L_OpenDocumentLocalError_Text);c=false}else c=d.EditDocument2(window,b,h);else c=d.ViewDocument2(window,b,h)}catch(q){c=false}if(c)window.onfocus=RefreshOnNextFocus}else{var e=0;if(currentItemCheckedOutUserId!="")if(currentItemCheckedOutUserId!=ctx.CurrentUserId&&ctx.CurrentUserId!=null)e=1;else if(currentItemCheckedoutToLocal==null||currentItemCheckedoutToLocal!="1")e=2;else e=4;else if(!HasRights(0,4)||FDefaultOpenForReadOnly(f))e=1;else if(ctx.isForceCheckout==true)e=3;try{c=d.ViewDocument3(window,b,e,h)}catch(q){c=false}if(c){var k=d.PromptedOnLastOpen();if(k)window.onfocus=RefreshOnNextFocus;else SetWindowRefreshOnFocus()}}else if(currentItemCheckedoutToLocal=="1")alert(L_OpenDocumentLocalError_Text);if(d==null||!c){if(m=="TRUE"&&j=="TRUE"&&l=="TRUE"){if(itemTable==null)return c;if(browseris.ie){event.cancelBubble=true;event.returnValue=false}var n=new Function("return "+itemTable.getAttribute("CTXName")+".HttpRoot;");GoToPage(n()+"/_layouts"+"/htmltrverify.aspx?doc="+escapeProperly(b))}return}d=null;if(browseris.ie){event.cancelBubble=true;event.returnValue=false}return c}function DispDocItemEx2(d,c,h,e,g,k,i,a,b){var m=false,l=b!=null&&b!="",f=IsClientAppInstalled(a)&&HasRights(16,0);if(l)if(i==1||!f){STSNavigate(b+"&Source="+GetSource()+"&DefaultItemOpen="+i);c.cancelBubble=true;c.returnValue=false;return false}else if(f)if(a==""||a.indexOf("SharePoint.OpenDocuments")>=0)return DispDocItemEx(d,h,e,g,k);else{if(!ViewDoc(d.href,a)){var j=editDocumentWithProgIDNoUI(d.href,currentItemProgId,a,false,ctx.HttpRoot,"0");if(j==1||j==2)STSNavigate(b+"&Source="+GetSource())}c.cancelBubble=true;c.returnValue=false;return false}return DispDocItemEx(d,h,e,g,a)}function DispDocItemExWithOutContext(o,n,e,a,d,i,g,m,k,b,h,j,f,c,l){DispEx(o,n,e,a,d,i,g,m,k,b,h,j,f,c,l)}function DispEx(p,b,g,d,f,k,i,o,m,a,j,l,h,e,c){var n=document.getElementById("FileDialogViewTable");if(n!=null){b.cancelBubble=false;b.returnValue=false;return true}if(typeof ctx=="undefined"||ctx==null)ctx=new ContextInfo;ctx.CurrentUserId=l;if(h=="1")ctx.isForceCheckout=true;else ctx.isForceCheckout=false;currentItemCheckedOutUserId=j;currentItemCheckedoutToLocal=e;currentItemProgId=m;if(c!=null&&c!="")SetCurrentPermMaskFromString(c,null);b.cancelBubble=true;if(a!=null&&a!="")a=a.substring(1);return DispDocItemEx2(p,b,g,d,f,k,i,o,a)}function IsClientAppInstalled(a){var b=null;if(a!="")b=StsOpenEnsureEx(a);return b!=null}function ViewDoc(d,c){var b=StsOpenEnsureEx(c),a=false;if(b!=null)try{a=b.ViewDocument2(window,d)}catch(e){a=false}return a}function PortalPinToMyPage(a,c,b){a.action=c+"_vti_bin/portalapi.aspx?Cmd=PinToMyPage";a.ReturnUrl.value=window.location.href;a.ListViewUrl.value=MakeMtgInstanceUrl(a.ListViewUrl.value,b);a.submit()}function PortalPinToMyPage(a,g,e,f,b,d,h,c){a.action=g+"_vti_bin/portalapi.aspx?Cmd=PinToMyPage";SetFieldValue(a,"ReturnUrl",window.location.href);SetFieldValue(a,"ListViewUrl",MakeMtgInstanceUrl(d,e));SetFieldValue(a,"ListTitle",f);SetFieldValue(a,"ListDescription",b);SetFieldValue(a,"BaseType",h);SetFieldValue(a,"ServerTemplate",c);a.submit()}function SetFieldValue(c,b,d){var a=c[b];if(a==null){a=document.createElement("INPUT");a.setAttribute("type","hidden");a.setAttribute("name",b);c.appendChild(a)}a.value=d}function StURLSetVar2(a,d,h){var b=d+"="+h,f=a.indexOf("#"),c;if(f!=-1){c=a.substring(f,a.length);a=a.substring(0,f)}var g=a.indexOf("?");if(g!=-1){var e=a.indexOf("?"+d+"=",g);if(e==-1){e=a.indexOf("&"+d+"=",g);if(e!=-1)b="&"+b}else b="?"+b;if(e!=-1){var i=new RegExp("[&?]"+d+"=[^&]*","");a=a.replace(i,b)}else a=a+"&"+b}else a=a+"?"+b;if(c!=null&&c.length>0)a=a+c;return a}function RemoveQueryParameterFromUrl(a,c){var d=new RegExp("[&?]"+c+"=[^&]*","");a=a.replace(d,"");if(a.indexOf("?")==-1){var b=a.indexOf("&");if(b!=-1)a=a.substring(0,b)+"?"+a.substring(b+1)}return a}function MoveToViewDate(c,b){var a=window.location.href;if(c!=null)a=StURLSetVar2(a,"CalendarDate",escapeProperly(c));if(b!=null)a=StURLSetVar2(a,"CalendarPeriod",b);SubmitFormPost(a,true)}function MoveToDate(a){MoveToViewDate(a,null)}function MoveToToday(){MoveToViewDate("",null)}function MoveView(a){MoveToViewDate(null,a)}function ClickDay(a){MoveToViewDate(a,null)}function GetMonthView(c){var b=window.location.href,a=document.getElementById("ExpandedWeeksId");if(a!=null)a.value=c;else return;SubmitFormPost(b,true)}function NewItemDT(a,c,b){if(a==null)return;if(b!=null)a=StURLSetVar2(a,"CalendarTime",b);if(c!=null)a=StURLSetVar2(a,"CalendarDate",c);NewItem(a,false)}function ClickTime(b,a){NewItemDT(b,null,a)}function NewItemDay(b,a){NewItemDT(b,a,null)}function HasValidUrlPrefix(b){var a=b.toLowerCase();if(-1==a.search("^http://")&&-1==a.search("^https://"))return false;return true}function ScrollToAnchorInInnerScrollPane(h,d,g){if(!browseris.ie4up)return;try{var i=document.getElementById(h),a=document.getElementById(i[d].value);if(typeof a=="undefined"||a==null)throw""}catch(k){var b=null;for(var c=0;c<document.anchors.length;c++){b=document.anchors[c];var j=b.href;if(j.search(g)!=-1){a=b;break}}}if(typeof a!="undefined"&&a!=null){var f=document.body.scrollTop,e=document.body.scrollLeft;a.scrollIntoView(false);document.body.scrollTop=f;document.body.scrollLeft=e}}function FilterChoice(e,d,C,s){var a,h=0,g=false,l="",u=e.id,t=e.name,j="",q="",B=d.choices,c=B.split("|"),x=AbsLeft(d),y=AbsTop(d)+d.offsetHeight,A=d.optHid,v=c.length-1,m=-1,p=false,o="";if(e!=null&&e.selectedIndex>=0){g=true;o=e.options[e.selectedIndex].innerText}for(a=0;a<c.length;a=a+2){var b=c[a];while(a<v-1&&c[a+1].length==0){b=b+"|";a++;if(a<v-1)b=b+c[a+1];a++}var k=c[a+1],i=b.toLocaleLowerCase(),z=C.toLocaleLowerCase();if(s.length!=0)g=true;if(i.indexOf(z)==0){var n=s.toLocaleLowerCase();if(n.length!=0&&i.indexOf(n)==0&&j.length==0)g=false;if(i.length>20)p=true;if(!g||i==o){l+='<option selected value="'+k+'">'+STSHtmlEncode(b)+"</option>";g=true;j=b;q=k;m=a}else l+='<option value="'+k+'">'+STSHtmlEncode(b)+"</option>";h++}}var r=' ondblclick="HandleOptDblClick()" onkeydown="HandleOptKeyDown()"',f="";if(p)f='<select tabIndex="-1" ctrl="'+d.id+'" name="'+t+'" id="'+u+'"'+r;else f='<select class="ms-lookuptypeindropdown" tabIndex="-1" ctrl="'+d.id+'" name="'+t+'" id="'+u+'"'+r;if(h==0)f+=' style="display:none;position:absolute;z-index:2;left:'+x+"px;top:"+y+'px" onfocusout="OptLoseFocus(this)"></select>';else f+=' style="position:absolute;z-index:2;left:'+x+"px;top:"+y+'px"'+' size="'+(h<=8?h:8)+'"'+(h==1?'multiple="true"':"")+' onfocusout="OptLoseFocus(this)">'+l+"</select>";e.outerHTML=f;var w=document.getElementById(A);if(m!=0||c[1]!="0")w.value=q;else w.value="0";if(m!=0||c[1]!="0")return j;else return ""}function OptLoseFocus(a){var b=document.getElementById(a.ctrl);if(a.selectedIndex>=0)SetCtrlFromOpt(b,a);a.style.display="none"}function SetCtrlMatch(b,a){var c=document.getElementById(b.optHid);c.value=a.options[a.selectedIndex].value;if(c.value!=0)b.match=a.options[a.selectedIndex].innerText;else b.match=""}function AbsLeft(c){var b=c.offsetLeft,a=c.offsetParent;while(a.tagName!="BODY"){b+=a.offsetLeft;a=a.offsetParent}b+=a.offsetLeft;return b}function AbsTop(c){var b=c.offsetTop,a=c.offsetParent;while(a.tagName!="BODY"){b+=a.offsetTop;a=a.offsetParent}b+=a.offsetTop;return b}function SetCtrlFromOpt(a,b){var c=document.getElementById(a.optHid);c.value=b.options[b.selectedIndex].value;if(b.options[b.selectedIndex].value==0){a.value="";a.match=""}else{a.value=b.options[b.selectedIndex].innerText;a.match=a.value}}function HandleOptDblClick(){var a=event.srcElement,b=document.getElementById(a.ctrl);SetCtrlFromOpt(b,a);SetCtrlMatch(b,a);a.style.display="none"}function HandleOptKeyDown(){var a=event.srcElement,b=document.getElementById(a.ctrl),c=event.keyCode;switch(c){case 13:case 9:SetCtrlFromOpt(b,a);event.returnValue=false;a.style.display="none";return}return}function EnsureSelectElement(c,b){var a=document.getElementById(b);if(a==null){a=document.createElement("SELECT");c.parentNode.appendChild(a);a.outerHTML='<select id="'+b+'" ctrl="'+c.id+'" class="ms-lookuptypeindropdown" name="'+b+'" style="display:none" onfocusout="OptLoseFocus(this)"></select>';FilterChoice(a,c,c.value,"")}return document.getElementById(b)}function HandleKey(){var g=event.keyCode,b=event.srcElement,c=b.value,a=EnsureSelectElement(b,b.opt),d=false,f,e;switch(g){case 8:if(c.length>0)c=c.substr(0,c.length-1);d=true;break;case 16:case 17:case 18:return;case 9:case 16:case 17:case 18:return;case 13:f=b.value.toLocaleLowerCase();e=b.match.toLocaleLowerCase();if(e.indexOf(f)!=0)b.match=FilterChoice(a,b,b.value,"");if(a.style.display!="none"){b.value=b.match;a.style.display="none";event.returnValue=false}return;case 27:a.style.display="none";event.returnValue=false;return;case 38:if(a.style.display!="none"){if(a.selectedIndex>0)a.selectedIndex=a.selectedIndex-1;else a.selectedIndex=a.options.length-1;SetCtrlMatch(b,a);event.returnValue=false}return;case 40:if(a.style.display!="none"&&a.selectedIndex<a.options.length-1){a.selectedIndex=a.selectedIndex+1;SetCtrlMatch(b,a);event.returnValue=false;return}d=true}if(d);b.match=FilterChoice(a,b,c,"")}function ShowDropdown(b){var a=document.getElementById(b),d=a.value,c=EnsureSelectElement(a,a.opt);a.match=FilterChoice(c,a,"",a.value);a.focus()}function HandleChar(){var a=event.srcElement,b=a.value,d=document.getElementById(a.opt),c=event.keyCode;if(c==13)return;b=b+String.fromCharCode(c).toLocaleLowerCase();a.match=FilterChoice(d,a,b,"")}function HandleLoseFocus(){var b=event.srcElement,a=document.getElementById(b.opt);if(a!=null&&a.style.display!="none"&&document.activeElement!=a)OptLoseFocus(a)}function HandleChange(){var a=event.srcElement,c=a.value,b=document.getElementById(a.opt);a.match=FilterChoice(b,a,c,"")}function IsSafeHref(a){return a.match(new RegExp("^http://","i"))||a.match(new RegExp("^https://","i"))||a.match(new RegExp("^ftp://","i"))||a.match(new RegExp("^file://","i"))||a.match(new RegExp("^mailto:","i"))||a.match(new RegExp("^news:","i"))||a.match(new RegExp("^/","i"))||a.match(new RegExp("^\\\\\\\\","i"))}var L_RelativeUrlError_Text="Addresses that start from the current page might not display correctly. You must enter the complete URL or an address that starts from the current server.",L_UnknownProtocolUrlError_Text="Hyperlinks must begin with http://, https://, mailto:, news:, ftp://, file://, or \\\\. Check the address and try again.",L_UrlTooLongError_Text="The URL for the location must be no longer than 256 characters without the query parameters. The query parameters start at the question mark (?).";function IsSafeHrefAlert(a,b){if(a.match("^[^?]{257}")){alert(L_UrlTooLongError_Text);return false}else if(IsSafeHref(a))return true;else if(a.match("^[a-zA-Z]*:")){alert(L_UnknownProtocolUrlError_Text);return false}else if(true==b)return true;else{alert(L_RelativeUrlError_Text);return false}}function PositionMiniConsole(){var a=document.getElementById("miniconsole");if(browseris.ie55up&&browseris.win32)if(document.getElementById("siteactiontd"))a.style.top="1";else a.style.top="8";else a.style.top="0"}var deleteInstance=0;function DeleteItemConfirmation(){var a="";if(typeof ItemIsCopy!="undefined")if(ItemIsCopy)a=L_NotifyThisIsCopy_Text;if(recycleBinEnabled==1&&deleteInstance!=1)a+=L_STSRecycleConfirm_Text;else a+=L_STSDelConfirm_Text;return confirm(a)}function DeleteInstanceConfirmation(){deleteInstance=1;return DeleteItemConfirmation()}function CancelMultiPageConfirmation(d){var b="A partial survey response has been saved.  Click OK to delete the partial survey response. If you want to continue this survey later click Cancel.  Your partial response can be found in the All Responses survey view.\n\nDo you want to send this partial response to the site Recycle Bin?",c="A partial survey response has been saved.  Click OK to delete the partial survey response. If you want to continue this survey later click Cancel.  Your partial response can be found in the All Responses survey view.\n\nDo you want to delete the partial response?",a="";if(recycleBinEnabled==1)a=b;else a=c;if(confirm(a)==true)return true;else STSNavigate(d);return false}function RestoreItemVersionConfirmation(){var a="You are about to replace the current version with the selected version.",b=a;return confirm(b)}function DeleteItemVersionConfirmation(c){var b="Are you sure you want to delete this version?",a="Are you sure you want to send this version to the site Recycle Bin?";if(c)return confirm(a);else return confirm(b)}function DeleteUserInfoItemConfirmation(){var a="You are about to delete this user.",b=a;return confirm(b)}function UnlinkCopyConfirmation(){return confirm(L_ConfirmUnlinkCopy_Text)}function Discuss(b){var a="'Discuss' requires a Windows SharePoint Services-compatible application and Microsoft Internet Explorer 6.0 or greater.";if(browseris.ie5up&&browseris.win32)window.parent.location.href=b;else alert(a)}function ProcessDefaultNavigateHierarchy(g,e,d,b,c,j,i,h,f){if(typeof _spCustomNavigateHierarchy=="function")_spCustomNavigateHierarchy(g,e,d,b,c,j);else if(c==false)top.location=b;else{var a=document.createElement("INPUT");a.type="hidden";a.name="_spTreeNodeClicked";a.value=d;i.appendChild(a);var k="?RootFolder="+escapeProperly(b)+h;SubmitFormPost(f+k);return false}}function ParseMultiColumnValue(b,d){var f=[];if(d==null)d=";#";var o=d.charCodeAt(0),n=d.charCodeAt(1);if(b==null||b.length==0)return f;var h=d.charAt(0),m=h+h,k=new RegExp(m,"g"),j=d.charAt(0),c=0;if(b.substr(0,2)==d)c=2;var a=c,g=false,i=b.length;while(a<i){var l=b.indexOf(h,a);if(l>=0){a=l;a++;if(b.charCodeAt(a)==n){if(a-1>c){var e=b.substr(c,a-c-1);if(g)e=e.replace(k,j);f.push(e);g=false}else f.push("");a++;c=a;continue}else if(b.charCodeAt(a)==o){a++;g=true;continue}else throw"ArgumentException"}else a=i}if(a>c){var e=b.substr(c,a-c);if(g)e=e.replace(k,j);f.push(e)}return f}function ConvertMultiColumnValueToString(f,b,c){if(b==null)b=";#";if(c==null)c=true;var h=b.charAt(0),i=h+h,j=new RegExp(b.charAt(0),"g"),g=false,d="";for(var e=0;e<f.length;e++){var a=f[e];if(a!=null&&a.length>0)a=a.replace(j,i);if(a!=null&&a.length>0)g=true;if(c||e!=0)d+=b;d+=a}if(g){if(c)d+=b;return d}else return ""}var httpFolderTarget=null,httpFolderSource=null,httpFolderDiv=null;function NavigateHttpFolderCore(){if(httpFolderDiv==null){httpFolderDiv=document.createElement("DIV");document.body.appendChild(httpFolderDiv);httpFolderDiv.onreadystatechange=NavigateHttpFolderCore;httpFolderDiv.addBehavior("#default#httpFolder")}if(httpFolderDiv.readyState=="complete"){httpFolderDiv.onreadystatechange=null;try{var a=document.frames.item(httpFolderTarget);if(a!=null)a.document.body.innerText=L_WebFoldersRequired_Text}catch(e){}var b=false;try{var c="";c=httpFolderDiv.navigateFrame(httpFolderSource,httpFolderTarget);if(c=="OK")b=true}catch(e){}if(!b&&0==httpFolderSource.search("http://[a-zA-Z0-9-.]+(:80)?/")){var d=httpFolderSource.replace(/http:\/\/([a-zA-Z0-9\-\.]+)(:80)?[\/]/,"//$1/").replace(/[\/]/g,"\\"),a=document.frames.item(httpFolderTarget);if(a!=null)try{a.onload=null;a.document.location.href=d;b=true}catch(e){}}if(!b)alert(L_WebFoldersError_Text)}}function NavigateHttpFolder(a,b){if("/"==a.charAt(0))a=document.location.protocol+"//"+document.location.host+a;httpFolderSource=a;httpFolderTarget=b;NavigateHttpFolderCore()}function NavigateHttpFolderIfSupported(b,a){if(SupportsNavigateHttpFolder())NavigateHttpFolder(b,a);else{alert(L_WebFoldersError_Text);window.history.back()}}function SupportsNavigateHttpFolder(){return browseris.ie5up&&browseris.win32}cGCMinimumWidth=400;cGCMinimumHeight=200;cGCMaxGCResizeCount=10;var glGCObjectHeight=0,glGCObjectWidth=0;glGCResizeCounter=0;function TestGCObject(a){if(browseris.ie55up&&typeof a=="undefined"||a==null||a.object==null)return false;return true}function GCComputeSizing(e){if(TestGCObject(e)){var g=document.documentElement.currentStyle.direction=="rtl",d=document.documentElement.scrollWidth,f=document.documentElement.scrollHeight,a=0,c=0;if(g){a=-180;c=120}else{a=32;c=-2}var b=e.parentElement;while(b!=document.body){a+=b.offsetLeft;c+=b.offsetTop;b=b.offsetParent;if(g)if(b.offsetLeft>0)break}a+=e.parentElement.offsetLeft;c+=e.parentElement.offsetTop;glGCObjectHeight=f-c;if(glGCObjectHeight>f)glGCObjectHeight=f;if(glGCObjectHeight<cGCMinimumHeight)glGCObjectHeight=cGCMinimumHeight;if(g)glGCObjectWidth=d+a;else glGCObjectWidth=d-a;if(glGCObjectWidth>d)glGCObjectWidth=d;if(glGCObjectWidth<cGCMinimumWidth)glGCObjectWidth=cGCMinimumWidth}}function GCResizeGridControl(a){if(TestGCObject(a)){var c=glGCObjectHeight,b=glGCObjectWidth;GCComputeSizing(a);if(c!=glGCObjectHeight)a.height=glGCObjectHeight;if(b!=glGCObjectWidth)a.width=glGCObjectWidth}}function GCWindowResize(a){if(TestGCObject(a)){glGCResizeCounter=0;GCResizeGridControl(a)}}function GCOnResizeGridControl(a){if(TestGCObject(a))if(glGCResizeCounter<cGCMaxGCResizeCount){glGCResizeCounter++;GCResizeGridControl(a)}}function GCActivateAndFocus(a){if(TestGCObject(a)){a.SetActive;a.Focus}}function GCNavigateToNonGridPage(){var a=window.location.href;gridPart=a.match("ShowInGrid=");if(gridPart){gridSet=/ShowInGrid=\w*/;a=a.replace(gridSet,"")}var b=a.indexOf("?");if(b!=-1){var c=a.indexOf("?",b+1);if(c!=-1)a=a.slice(0,c);a=a+"&"}else a=a+"?";a=a+"ShowInGrid=False";document.location.replace(STSPageUrlValidation(a))}function GCAddNewColumn(a,b){if(TestGCObject(a)){var h=window.location.href,e=a.Name,g=a.SelectedColumnUniqueName,i=a.RightToLeft,f=a.ViewGUID,c="FldNew.aspx",d=a.ServerTemplate;if(d=="102")c="QstNew.aspx";b=b+"/_layouts/"+c+"?List="+e+"&View="+f+"&Source="+h+"&RelativeToField="+g+"&LTR="+i;window.location=b}}function GCEditDeleteColumn(a,b){if(TestGCObject(a)){var g=window.location.href,f=a.SelectedColumnUniqueName,e=a.Name,c="FldEdit.aspx",d=a.ServerTemplate;if(d=="102")c="QstEdit.aspx";b=b+"/_layouts/"+c+"?List="+e+"&Field="+f+"&Source="+g;window.location=b}}function GCShowHideTaskPane(a){if(TestGCObject(a)){var b=a.DisplayTaskPane;a.DisplayTaskPane=!b}}function GCShowHideTotalsRow(a){if(TestGCObject(a)){var b=a.DisplaySheetTotals;a.DisplaySheetTotals=!b}}function GCGridNewRow(a){if(TestGCObject(a))a.SelectNewRow()}function GCRefresh(a){if(TestGCObject(a))a.Refresh()}function GCNewFolder(a){if(TestGCObject(a))a.NewFolder()}var L_Edit_Text="Edit",L_ViewItem_Text="View Item",L_EditItem_Text="Edit Item",L_EditSeriesItem_Text="Edit Series",L_DeleteItem_Text="Delete Item",L_DeleteDocItem_Text="Delete",L_ViewProperties_Text="View Properties",L_EditProperties_Text="Edit Properties",L_ViewResponse_Text="View Response",L_EditResponse_Text="Edit Response",L_DeleteResponse_Text="Delete Response",L_Subscribe_Text="Alert Me",L_CustomizeNewButton_Text="Change New Button Order",L_Review_Text="Send for Review",L_EditIn_Text="Edit in ^1",L_EditInApplication_Text="Edit Document",L_Checkin_Text="Check In",L_Checkout_Text="Check Out",L_DiscardCheckou_Text="Discard Check Out",L_CreateDWS_Text="Create Document Workspace",L_PublishBack_Text="Publish to Source Location",L_Versions_Text="Version History",L_WorkOffline_Text="Connect to Client",L_Reply_Text="Reply",L_ExportContact_Text="Export Contact",L_ExportEvent_Text="Export Event",L_Reschedule_Text="Rescheduling Options",L_Move_Text="Move",L_Keep_Text="Keep",L_Delete_Text="Delete",L_Open_Text="Open",L_SiteSettings_Text="Change Site Settings",L_ManageUsers_Text="Manage Users",L_DeleteSite_Text="Delete Site",L_SiteStorage_Text="Manage Site Storage",L_MngPerms_Text="Manage Permissions",L_Settings_Text="Settings",L_Remove_Text="Remove from this list",L_ModerateItem_Text="Approve/reject",L_PublishItem_Text="Publish a Major Version",L_CancelPublish_Text="Cancel Approval",L_UnPublishItem_Text="Unpublish this version",L_DownloadOriginal_Text="Download Picture",L_EditVersion_Text="Edit",L_EditInOIS_Text="Edit Picture",L_Workflows_Text="Workflows",L_Send_Text="Send To",L_ExistingCopies_Text="Existing Copies",L_OtherLocation_Text="Other Location",L_GoToSourceItem_Text="Go to Source Item",L_NotifyThisIsCopy_Text="This item was copied from another location and may be receiving updates from there.  You should make sure that the source stops sending updates or this item may get recreated.\n\n",L_SendToEmail_Text="E-mail a Link",L_DownloadACopy_Text="Download a Copy",L_DocTran_Text="Convert Document",L_AddToMyLinks_Text="Add to My Links",L_AddToCategory_Text="Submit to Portal Area",L_VS_DownArrow_Text="Select a View",L_ModifyView="Modify this view",L_CreateView="Create a new view";function resetExecutionState(){IsMenuShown=false;itemTable=null;EndDeferItem();imageCell=null;onKeyPress=false;currentCtx=null;currentEditMenu=null;currentItemID=null;downArrowText=null;currentItemAppName=null;currentItemProgId=null;currentItemIcon=null;currentItemOpenControl=null;currentItemModerationStatus=null;currentItemUIString=null;currentItemCheckedoutToLocal=null;currentItemCanModify=null;currentItemFileUrl=null;currentItemFSObjType=null;currentItemCheckedOutUserId=null;currentItemCheckoutExpires=null;currentItemPermMaskH=null;currentItemPermMaskL=null;currentItemIsEventsExcp=null;currentItemIsEventsDeletedExcp=null}function IsMenuEnabled(){return browseris.ie55up||browseris.nav6up||browseris.safari125up}function GetSelectedElement(a,b){while(a!=null&&a.tagName!=b)a=a.parentNode;return a}function setupMenuContext(a){currentCtx=a}function FindSTSMenuTable(a,c){var b=a.getAttribute(c);while(a!=null&&(b==null||b=="")){a=GetSelectedElement(a.parentNode,"TABLE");if(a!=null)b=a.getAttribute(c)}return a}function OnLinkDeferCall(a){if(!IsMenuEnabled())return false;a.onblur=OutItem;a.onkeydown=PopMenu;var b=FindSTSMenuTable(a,"CTXName");if(b==null)return false;OnItem(b);return false}function StartDeferItem(a){if(a!=itemTable){itemTableDeferred=a;a.onmouseout=EndDeferItem;a.onclick=DeferredOnItem;a.oncontextmenu=DeferredOnItem}}function DeferredOnItem(b){var a=itemTableDeferred;if(a!=null){MenuHtc_hide();OnItem(a);CreateMenu(b);return false}}function EndDeferItem(){var a=itemTableDeferred;if(a!=null){itemTableDeferred=null;a.onmouseout=null;a.onclick=null;a.oncontextmenu=null}}function GetFirstChildElement(b){for(var a=0;a<b.childNodes.length;a++)if(b.childNodes[a].nodeType==1)return b.childNodes[a];return null}function GetLastChildElement(b){for(var a=b.childNodes.length-1;a>=0;a--)if(b.childNodes[a].nodeType==1)return b.childNodes[a];return null}function OnItemDeferCall(d){if(!IsMenuEnabled())return false;if(IsMenuOn()){StartDeferItem(d);return false}if(itemTable!=null)OutItem();itemTable=d;currentItemID=GetAttributeFromItemTable(itemTable,"ItemId","Id");var e=new Function("setupMenuContext("+itemTable.getAttribute("CTXName")+");");e();var c=currentCtx;if(browseris.nav6up)itemTable.className="ms-selectedtitlealternative";else itemTable.className="ms-selectedtitle";if(browseris.ie5up&&!browseris.ie55up){itemTable.onclick=EditMenuDefaultForOnclick;itemTable.oncontextmenu=EditMenuDefaultForOnclick}else{itemTable.onclick=CreateMenu;itemTable.oncontextmenu=CreateMenu}itemTable.onmouseout=OutItem;var b;b=GetFirstChildElement(GetFirstChildElement(itemTable));if(b!=null)imageCell=GetLastChildElement(b);if(c.listTemplate==200){if(itemTable.getAttribute("menuType")=="Orphaned")downArrowText=L_Reschedule_Text}else downArrowText=L_Edit_Text;var a=GetFirstChildElement(imageCell);a.src=c.imagesPath+"menudark.gif";a.alt=downArrowText;a.style.visibility="visible";imageCell.className="ms-menuimagecell";return false}function OutItem(){if(!IsMenuOn()&&itemTable!=null){itemTable.className="ms-unselectedtitle";itemTable.onclick=null;itemTable.oncontextmenu=null;itemTable.onmouseout=null;if(imageCell!=null){GetFirstChildElement(imageCell).style.visibility="hidden";imageCell.className=""}resetExecutionState()}}function IsMenuOn(){if(!IsMenuShown)return false;var a=false;a=MenuHtc_isOpen(currentEditMenu);if(!a)IsMenuShown=false;return a}function PopMenu(a){if(!IsMenuEnabled())return true;if(a==null)a=window.event;var b;if(browseris.nav6up)b=a.which;else b=a.keyCode;if(!IsMenuOn()&&(a.shiftKey&&b==13||a.altKey&&b==40)){onKeyPress=true;CreateMenu(a);onKeyPress=false;return false}else return true}function CreateMenuEx(b,c,d){if(c==null)return;IsMenuShown=true;document.body.onclick="";var a;a=CMenu(currentItemID+"_menu");if(!a)return;else if(b.isVersions)AddVersionMenuItems(a,b);else if(b.listBaseType==1)AddDocLibMenuItems(a,b);else if(b.listTemplate==200)AddMeetingMenuItems(a,b);else AddListMenuItems(a,b);InsertFeatureMenuItems(a,b);currentEditMenu=a;c.onmouseout=null;OMenu(a,c,null,null,-1);itemTable=GetSelectedElement(c,"TABLE");a._onDestroy=OutItem;d.cancelBubble=true;return false}function CreateMenu(a){if(!IsContextSet())return;var c=currentCtx;if(a==null)a=window.event;var b=a.srcElement?a.srcElement:a.target;if(itemTable==null||imageCell==null||onKeyPress==false&&(b.tagName=="A"||b.parentNode.tagName=="A"))return;return CreateMenuEx(c,itemTable,a)}function AddSendSubMenu(m,a){strDisplayText=L_Send_Text;var l=GetAttributeFromItemTable(itemTable,"Url","ServerUrl"),d,j,f;if(currentItemFileUrl!=null){j=unescapeProperly(currentItemFileUrl);d=escapeProperly(j);f=SzExtension(j);if(f!=null&&f!="")f=f.toLowerCase()}var c=CASubM(m,strDisplayText,"","",400);c.id="ID_Send";var b,h=itemTable.getAttribute("SRed");if(currentItemProgId!="SharePoint.WebPartPage.Document"&&(h==null||h==""||HasRights(0,32))&&f!="aspx"){if(typeof a.SendToLocationName!="undefined"&&a.SendToLocationName!=null&&a.SendToLocationName!=""&&typeof a.SendToLocationUrl!="undefined"&&a.SendToLocationUrl!=null&&a.SendToLocationUrl!=""){strAction="STSNavigate('"+a.HttpRoot+"/_layouts/copy.aspx?"+"SourceUrl="+d+"&Source="+GetSource()+"&FldUrl="+escapeProperly(a.SendToLocationUrl)+"')";b=CAMOpt(c,a.SendToLocationName,strAction,"")}if(typeof itemTable.getAttribute("HCD")!="undefined"&&itemTable.getAttribute("HCD")=="1"){strDisplayText=L_ExistingCopies_Text;strAction="STSNavigate('"+a.HttpRoot+"/_layouts/updatecopies.aspx?"+"SourceUrl="+d+"&Source="+GetSource()+"')";strImagePath=a.imagesPath+"existingLocations.gif";b=CAMOpt(c,strDisplayText,strAction,strImagePath);b.id="ID_ExistingCopies"}strDisplayText=L_OtherLocation_Text;strAction="STSNavigate('"+a.HttpRoot+"/_layouts/copy.aspx?"+"SourceUrl="+d+"&Source="+GetSource()+"')";strImagePath=a.imagesPath+"sendOtherLoc.gif";b=CAMOpt(c,strDisplayText,strAction,strImagePath);b.id="ID_OtherLocation";if(a.OfficialFileName!=null&&a.OfficialFileName!=""){strDisplayText=a.OfficialFileName;strAction="STSNavigate('"+a.HttpRoot+"/_layouts/SendToOfficialFile.aspx?"+"SourceUrl="+d+"&Source="+GetSource()+"')";strImagePath="";CAMOpt(c,strDisplayText,strAction,strImagePath)}CAMSep(c)}if(HasRights(16,0)){strDisplayText=L_SendToEmail_Text;var l=GetAttributeFromItemTable(itemTable,"Url","ServerUrl"),g=a.HttpRoot.substr(0);if(g[g.length-1]!="/")g+="/";var k=-1,i="";k=g.substring(8).indexOf("/")+8;i=g.substr(0,k)+escapeProperlyCore(unescapeProperly(l),true);var e=itemTable.getAttribute("SRed");if(e!=null&&e!=""&&e!="1")if(e.substring(0,1)!="1")i=e;else i=e.substring(1);strAction="javascript:navigateMailToLinkNew('"+i+"')";strImagePath=a.imagesPath+"gmailnew.gif";b=CAMOpt(c,strDisplayText,strAction,strImagePath);b.id="ID_SendToEmail"}var h=itemTable.getAttribute("SRed");if(currentItemFSObjType!=1&&a.listBaseType==1&&(h==null||h==""||HasRights(0,32))){if(a.listTemplate!=109&&a.listTemplate!=119)AddWorkspaceMenuItem(c,a);strAction="STSNavigate('"+a.HttpRoot+"/_layouts/download.aspx?"+"SourceUrl="+d+"&Source="+GetSource()+"&FldUrl="+escapeProperly(a.SendToLocationUrl)+"')";b=CAMOpt(c,L_DownloadACopy_Text,strAction,"");b.id="ID_DownloadACopy"}}function AddDocTransformSubMenu(l,h){if(typeof rgDocTransformers=="undefined"||rgDocTransformers==null)return;var c=null,b=GetAttributeFromItemTable(itemTable,"Url","ServerUrl"),d;if(currentItemFileUrl!=null)d=escapeProperly(unescapeProperly(currentItemFileUrl));var g=b.lastIndexOf(".");if(g>0){var j=b.substring(g+1,b.length).toLowerCase(),a,e=false;for(a=0;a<rgDocTransformers.length;a++)if(rgDocTransformers[a].ConvertFrom==j){var f=GetAttributeFromItemTable(itemTable,"CId","ContentTypeId"),k=new RegExp("/|"+f+"|/");if(f&&!k.test(rgDocTransformers[a].ExcludedContentTypes)){if(!e){c=CASubM(l,L_DocTran_Text,h.imagesPath+"ConvertDocument.gif",L_DocTran_Text,500);c.Id="ID_ConvertDocument";e=true}strAction="STSNavigate('"+h.HttpRoot+"/_layouts/"+escapeProperlyCore(rgDocTransformers[a].TransformUIPage,true)+"?"+"FileName="+d+"&TID="+rgDocTransformers[a].Id+"&Source="+GetSource()+"')";var i;i=CAMOpt(c,rgDocTransformers[a].Name,strAction,"");i.Id="ID_Transform"+rgDocTransformers[a].Id}}}}function AddMeetingMenuItems(d,b){if(itemTable.getAttribute("menuType")=="Orphaned"){var a,c=GetAttributeFromItemTable(itemTable,"ItemId","Id");strDisplayText=L_Move_Text;strAction="GoToMtgMove('"+b.listUrlDir+"',"+c+",'"+itemTable.getAttribute("DateTime")+"','"+itemTable.getAttribute("DateTimeISO")+"')";strImagePath="";a=CAMOpt(d,strDisplayText,strAction,strImagePath);a.id="ID_Move";strDisplayText=L_Keep_Text;strAction="MtgKeep('"+b.HttpPath+"','"+b.listName+"',"+c+")";strImagePath="";a=CAMOpt(d,strDisplayText,strAction,strImagePath);a.id="ID_Keep";strDisplayText=L_Delete_Text;strAction="MtgDelete('"+b.HttpPath+"','"+b.listName+"',"+c+")";strImagePath=b.imagesPath+"delitem.gif";a=CAMOpt(d,strDisplayText,strAction,strImagePath);a.id="ID_Delete"}}function AddListMenuItems(c,a){if(typeof Custom_AddListMenuItems!="undefined")if(Custom_AddListMenuItems(c,a))return;if(currentItemFileUrl==null)currentItemFileUrl=GetAttributeFromItemTable(itemTable,"Url","ServerUrl");var d;if(currentItemFileUrl!=null)d=escapeProperly(unescapeProperly(currentItemFileUrl));if(currentItemIsEventsExcp==null){currentItemIsEventsExcp=false;currentItemIsEventsDeletedExcp=false;currentItemEvtType=itemTable.getAttribute("EventType");if(currentItemEvtType!=null&&(currentItemEvtType==2||currentItemEvtType==3||currentItemEvtType==4)){currentItemIsEventsExcp=true;if(currentItemEvtType==3)currentItemIsEventsDeletedExcp=true}}var b;if(a.listBaseType==3&&a.listTemplate==108){strDisplayText=L_Reply_Text;if(itemTable.getAttribute("Ordering").length>=504){var f="Cannot reply to this thread. The reply limit has been reached.";strAction="alert('"+f+"')"}else strAction="STSNavigate('"+a.newFormUrl+"?Threading="+escapeProperly(itemTable.getAttribute("Ordering"))+"&Guid="+escapeProperly(itemTable.getAttribute("ThreadID"))+"&Subject="+escapeProperly(itemTable.getAttribute("Subject"))+"&Source="+GetSource()+"')";strImagePath=a.imagesPath+"reply.gif";b=CAMOpt(c,strDisplayText,strAction,strImagePath,null,100);b.id="ID_Reply"}AddSharedNamespaceMenuItems(c,a);if(currentItemID.indexOf(".0.")<0&&HasRights(0,8)&&!currentItemIsEventsExcp){if(a.listBaseType==4)strDisplayText=L_DeleteResponse_Text;else strDisplayText=L_DeleteItem_Text;strAction="DeleteListItem()";strImagePath=a.imagesPath+"delitem.gif";b=CAMOpt(c,strDisplayText,strAction,strImagePath,null,300);b.id="ID_DeleteItem"}var e=itemTable.getAttribute("CId");if(e!=null&&e.indexOf("0x0106")==0&&HasRights(16,0)){strDisplayText=L_ExportContact_Text;strAction="STSNavigate('"+a.HttpPath+"&Cmd=Display&CacheControl=1&List="+a.listName+"&ID="+currentItemID+"&Using="+escapeProperly(a.listUrlDir)+"/vcard.vcf"+"')";strImagePath=a.imagesPath+"exptitem.gif";b=CAMOpt(c,strDisplayText,strAction,strImagePath,null,350);b.id="ID_ExportContact"}CAMSep(c);if(a.verEnabled==1)AddVersionsMenuItem(c,a,d);AddWorkflowsMenuItem(c,a);CAMSep(c);if(currentItemID.indexOf(".0.")<0&&HasRights(128,0)){strDisplayText=L_Subscribe_Text;strAction="NavigateToSubNewAspx('"+a.HttpRoot+"', 'List="+a.listName+"&ID="+currentItemID+"')";strImagePath="";b=CAMOpt(c,strDisplayText,strAction,strImagePath,null,1100);b.id="ID_Subscribe"}if(a.isModerated==true&&HasRights(0,16)&&HasRights(0,4)&&HasRights(0,135168)&&a.listBaseType!=4){strDisplayText=L_ModerateItem_Text;strAction="STSNavigate('"+a.HttpRoot+"/_layouts/approve.aspx?List="+a.listName+"&ID="+currentItemID+"&Source="+GetSource()+"')";strImagePath=a.imagesPath+"apprj.gif";b=CAMOpt(c,strDisplayText,strAction,strImagePath,null,1150);b.id="ID_ModerateItem"}if(currentItemFSObjType==1&&a.ContentTypesEnabled&&a.listTemplate!=108){strDisplayText=L_CustomizeNewButton_Text;strAction="STSNavigate('"+a.HttpRoot+"/_layouts/ChangeContentTypeOrder.aspx?List="+a.listName+"&RootFolder="+d+"&Source="+GetSource()+"')";strImagePath="";b=CAMOpt(c,strDisplayText,strAction,strImagePath,null,1170);b.id="ID_CustomizeNewButton"}}function ReplaceUrlTokens(a,b){if(currentItemID!=null)a=a.replace("{ItemId}",currentItemID);if(currentItemFileUrl!=null)a=a.replace("{ItemUrl}",currentItemFileUrl);if(b.HttpRoot!=null)a=a.replace("{SiteUrl}",b.HttpRoot);if(b.listName!=null)a=a.replace("{ListId}",b.listName);return a}function InsertFeatureMenuItems(o,h){CAMSep(o);var e=GetAttributeFromItemTable(itemTable,"Ext","FileType"),g=GetAttributeFromItemTable(itemTable,"Type","HTMLType"),d=GetAttributeFromItemTable(itemTable,"CId","ContentTypeId"),i=null;if(h!=null)i=h.listTemplate;if(e)e=e.toLowerCase();if(g)g=g.toLowerCase();if(d)d=d.toLowerCase();var w,m=document.getElementById("ECBItems");if(m!=null){var n=m.childNodes[0];for(var j=0;j<n.childNodes.length;j++){var a=n.childNodes[j],r=parseInt(GetInnerText(a.childNodes[3])),s=parseInt(GetInnerText(a.childNodes[4])),f=GetInnerText(a.childNodes[5]),b=GetInnerText(a.childNodes[6]),c=false;if(b){b=b.toLowerCase();if(f=="FileType")c=e==b.toLowerCase();else if(f=="ProgId")c=g==b.toLowerCase();else if(f=="ContentType")c=d&&d.indexOf(b.toLowerCase())==0;else if(f=="List")c=i&&i==b}if(c&&HasRights(r,s)){var v=a.childNodes[0],p=a.childNodes[1],t=a.childNodes[2],x=parseInt(GetInnerText(a.childNodes[7])),q=GetInnerText(v),l=ReplaceUrlTokens(GetInnerText(t),h),k;if(l.substr(0,11)=="javascript:")k=l;else k="STSNavigate('"+STSScriptEncode(l)+"')";var u=ReplaceUrlTokens(GetInnerText(p),h);w=CIMOpt(o,q,k,u,null,x)}}}}function GetRootFolder(c){var a=GetUrlKeyValue("RootFolder",true);if(a==""||bValidSearchTerm){var b;if(itemTable)b=GetAttributeFromItemTable(itemTable,"DRef","FileDirRef");if(b!=null)a="/"+b;else a=c.listUrlDir;a=escapeProperly(a)}return "&RootFolder="+a}function HasRights(a,b){if(currentItemPermMaskH==null){if(itemTable==null)return true;var c=GetAttributeFromItemTable(itemTable,"Perm","PermMask");if(c==null)return true;var d=itemTable.getAttribute("Author");SetCurrentPermMaskFromString(c,d)}if(!currentItemCanModify&&(EqualRights(a,b,0,4)||EqualRights(a,b,0,8)||EqualRights(a,b,1073741824,0)))return false;return (b&currentItemPermMaskL)==b&&(a&currentItemPermMaskH)==a}function EqualRights(b,d,c,a){return b==c&&a==a}function SetCurrentPermMaskFromString(b,c){var a=b.length;if(a<=10){currentItemPermMaskH=0;currentItemPermMaskL=parseInt(b)}else{currentItemPermMaskH=parseInt(b.substring(2,a-8),16);currentItemPermMaskL=parseInt(b.substring(a-8,a),16)}currentItemCanModify=true;currentItemCanModify=c==null||HasRights(0,2048)||ctx.CurrentUserId==c||ctx.CurrentUserId==null||ctx.WriteSecurity==1}function AddSharedNamespaceMenuItems(c,a){var d=GetRootFolder(a);setupMenuContext(a);if(currentItemFileUrl==null)currentItemFileUrl=GetAttributeFromItemTable(itemTable,"Url","ServerUrl");if(currentItemFSObjType==null)currentItemFSObjType=GetAttributeFromItemTable(itemTable,"OType","FSObjType");if(currentItemModerationStatus==null)currentItemModerationStatus=GetAttributeFromItemTable(itemTable,"MS","MStatus");if(currentItemCheckedOutUserId==null)currentItemCheckedOutUserId=itemTable.getAttribute("COUId");if(currentItemCheckedoutToLocal==null)currentItemCheckedoutToLocal=GetAttributeFromItemTable(itemTable,"COut","IsCheckedoutToLocal ");if(currentItemCheckedoutToLocal!=1)currentItemCheckedoutToLocal=0;bIsCheckout=0;if(a.isForceCheckout==true&&currentItemCheckedOutUserId==""&&currentItemFSObjType!=1)bIsCheckout=1;var e;if(currentItemFileUrl!=null)e=escapeProperly(unescapeProperly(currentItemFileUrl));var b;if(a.listBaseType==1)strDisplayText=L_ViewProperties_Text;else if(a.listBaseType==4)strDisplayText=L_ViewResponse_Text;else strDisplayText=L_ViewItem_Text;strAction="STSNavigate('"+a.displayFormUrl+"?ID="+currentItemID+"&Source="+GetSource()+d+"')";strImagePath="";b=CAMOpt(c,strDisplayText,strAction,strImagePath,null,200);if(a.listBaseType==1)b.id="ID_ViewProperties";else b.id="ID_ViewItem";if(HasRights(0,4)&&!currentItemIsEventsDeletedExcp){if(a.listBaseType==1)strDisplayText=L_EditProperties_Text;else if(a.listBaseType==4)strDisplayText=L_EditResponse_Text;else strDisplayText=L_EditItem_Text;if(a.listBaseType==1)strAction="STSNavigateWithCheckoutAlert('"+a.editFormUrl+"?ID="+currentItemID+"&Source="+GetSource()+d+"',"+bIsCheckout+",'"+currentItemCheckedoutToLocal+"','"+STSScriptEncode(currentItemFileUrl)+"','"+a.HttpRoot+"')";else strAction="STSNavigate('"+a.editFormUrl+"?ID="+currentItemID+"&Source="+GetSource()+"')";strImagePath=a.imagesPath+"edititem.gif";b=CAMOpt(c,strDisplayText,strAction,strImagePath,null,220);if(a.listBaseType==1)b.id="ID_EditProperties";else b.id="ID_EditItem";if(a.listTemplate==106&&currentItemID.indexOf(".0.")>0){var g=currentItemID.indexOf(".0."),f=currentItemID.substr(0,g);strDisplayText=L_EditSeriesItem_Text;strAction="STSNavigate('"+a.editFormUrl+"?ID="+f+"&Source="+GetSource()+"')";strImagePath=a.imagesPath+"recurrence.gif";b=CAMOpt(c,strDisplayText,strAction,strImagePath,null,230);b.id="ID_EditSeriesItem"}}AddManagePermsMenuItem(c,a,a.listName,currentItemID)}function AddDocLibMenuItems(b,a){if(typeof Custom_AddDocLibMenuItems!="undefined")if(Custom_AddDocLibMenuItems(b,a))return;var h=GetRootFolder(a),c;AddSharedNamespaceMenuItems(b,a);var d;if(currentItemFileUrl!=null)d=escapeProperly(unescapeProperly(currentItemFileUrl));var e=itemTable.getAttribute("SRed");if(HasRights(0,4)&&HasRights(16,0)&&currentItemFSObjType!=1&&(e==null||e==""||HasRights(0,32)))if(a.isWebEditorPreview==0&&a.listBaseType==1)if(a.listTemplate==109&&itemTable.getAttribute("IsImage")=="1"){strDisplayText=L_EditInOIS_Text;strAction="EditSingleImage('"+currentItemID+"')";strImagePath=a.imagesPath+"oisweb.gif";c=CAMOpt(b,strDisplayText,strAction,strImagePath,null,240);c.id="ID_EditInOIS"}else{setDocType();if(currentItemAppName!=""&&currentItemOpenControl!=""){strDisplayText="";if(currentItemAppName!=" ")strDisplayText=StBuildParam(L_EditIn_Text,currentItemAppName);else{var g=StsOpenEnsureEx(currentItemOpenControl+".3");if(g!=null)strDisplayText=L_EditInApplication_Text}if(strDisplayText!=""){strAction="editDocumentWithProgID2('"+currentItemFileUrl+"', '"+currentItemProgId+"', '"+currentItemOpenControl+"', '"+bIsCheckout+"', '"+a.HttpRoot+"', '"+currentItemCheckedoutToLocal+"')";strImagePath=a.imagesPath+currentItemIcon;c=CAMOpt(b,strDisplayText,strAction,strImagePath,null,240);c.id="ID_EditIn_"+currentItemAppName}}}if(HasRights(0,8)){strDisplayText=L_DeleteDocItem_Text;var f="false";if(typeof itemTable.getAttribute("CSrc")!="undefined"&&itemTable.getAttribute("CSrc")!=null&&itemTable.getAttribute("CSrc")!="")f="true";strAction="DeleteDocLibItem('"+a.HttpPath+"&Cmd=Delete&List="+a.listName+"&ID="+currentItemID+"&owsfileref="+d+"&NextUsing="+GetSource()+"',"+f+")";strImagePath=a.imagesPath+"delitem.gif";c=CAMOpt(b,strDisplayText,strAction,strImagePath,null,310);c.id="ID_DeleteDocItem"}AddGotoSourceItemMenuItem(b,a,itemTable,currentItemFSObjType);if(currentItemFSObjType!=1){AddSendSubMenu(b,a);AddDocTransformSubMenu(b,a)}if(currentItemFSObjType!=1&&a.listTemplate==109&&typeof DownloadOriginalImage=="function"){strAction="DownloadOriginalImage("+currentItemID+")";strImagePath=a.imagesPath+"download.gif";strDisplayText=L_DownloadOriginal_Text;c=CAMOpt(b,strDisplayText,strAction,strImagePath,null,550);c.id="ID_DownloadOriginal"}if(HasRights(0,4)){if(a.isModerated==true&&((currentItemModerationStatus==2||!a.EnableMinorVersions)&&currentItemCheckedOutUserId==""||currentItemFSObjType==1)){strDisplayText=L_ModerateItem_Text;strAction="STSNavigate('"+a.HttpRoot+"/_layouts/approve.aspx?List="+a.listName+"&ID="+currentItemID+"&Source="+GetSource()+GetRootFolder(a)+"')";strImagePath=a.imagesPath+"apprj.gif";c=CAMOpt(b,strDisplayText,strAction,strImagePath,null,1150);c.id="ID_ModerateItem"}if(currentItemFSObjType!=1)if(a.listBaseType==1){CAMSep(b);AddCheckinCheckoutMenuItem(b,a,d)}}if(a.verEnabled==1||a.isModerated)AddVersionsMenuItem(b,a,d);if(currentItemFSObjType!=1){AddWorkflowsMenuItem(b,a);CAMSep(b);if(a.PortalUrl!=null){strDisplayText=L_AddToMyLinks_Text;strAction="Portal_Tasks('PinToMyPage')";strImagePath="";c=CAMOpt(b,strDisplayText,strAction,strImagePath,null,1e3);c.id="ID_AddToMyLinks";CAMSep(b)}}else if(a.listBaseType==1&&HasRights(16,0))AddWorkOfflineMenuItem(b,a,currentItemFileUrl);if(HasRights(128,0)){strDisplayText=L_Subscribe_Text;strAction="NavigateToSubNewAspx('"+a.HttpRoot+"', 'List="+a.listName+"&ID="+currentItemID+"')";strImagePath="";c=CAMOpt(b,strDisplayText,strAction,strImagePath,null,1100);c.id="ID_Subscribe"}if(currentItemFSObjType==1&&a.ContentTypesEnabled&&a.listTemplate!=108){strDisplayText=L_CustomizeNewButton_Text;strAction="STSNavigate('"+a.HttpRoot+"/_layouts/ChangeContentTypeOrder.aspx?List="+a.listName+"&RootFolder="+d+"&Source="+GetSource()+"')";strImagePath="";c=CAMOpt(b,strDisplayText,strAction,strImagePath,null,1170);c.id="ID_CustomizeNewButton"}}function AddManagePermsMenuItem(e,a,c,d){if(!HasRights(1073741824,0)||currentItemIsEventsExcp)return;strDisplayText=L_MngPerms_Text;strAction="NavigateToManagePermsPage('"+a.HttpRoot+"', '"+c+"','"+d+"')";strImagePath=a.imagesPath+"manageperm.gif";var b=CAMOpt(e,strDisplayText,strAction,strImagePath,null,250);b.id="ID_MngPerms"}function AddGotoSourceItemMenuItem(e,d,a,c){if(c!=1&&typeof a.getAttribute("CSrc")!="undefined"&&a.getAttribute("CSrc")!=null&&a.getAttribute("CSrc")!=""){strDisplayText=L_GoToSourceItem_Text;strAction="NavigateToSourceItem('"+a.getAttribute("CSrc")+"')";strImagePath=d.imagesPath+"goToOriginal.gif";var b=CAMOpt(e,strDisplayText,strAction,strImagePath,null,340);b.id="ID_GoToSourceItem"}}function AddCheckinCheckoutMenuItem(d,a,c){var b;if(!HasRights(0,4))return;if(currentItemCheckedOutUserId==null)currentItemCheckedOutUserId=itemTable.getAttribute("COUId");if(currentItemCheckedOutUserId!=""){if(currentItemCheckedOutUserId==a.CurrentUserId||a.CurrentUserId==null||HasRights(0,256)){strDisplayText=L_Checkin_Text;strAction="NavigateToCheckinAspx('"+a.HttpRoot+"', 'List="+a.listName+"&FileName="+c+"')";strImagePath=a.imagesPath+"checkin.gif";b=CAMOpt(d,strDisplayText,strAction,strImagePath,null,700);b.id="ID_Checkin";strDisplayText=L_DiscardCheckou_Text;strAction="UnDoCheckOut('"+a.HttpRoot+"', '"+c+"')";strImagePath=a.imagesPath+"unchkout.gif";b=CAMOpt(d,strDisplayText,strAction,strImagePath,null,710);b.id="ID_DiscardCheckou"}}else{strDisplayText=L_Checkout_Text;if(currentItemOpenControl=="")setDocType();var h="";if(a.listTemplate!=109)h=currentItemOpenControl+".3";var f=itemTable.getAttribute("SRed");if(f==null||f==""||HasRights(0,32)){strAction="CheckoutDocument('"+a.HttpRoot+"', '"+c+"', '"+h+"')";strImagePath=a.imagesPath+"checkout.gif";b=CAMOpt(d,strDisplayText,strAction,strImagePath,null,700);b.id="ID_Checkout"}if(currentItemModerationStatus==null)currentItemModerationStatus=GetAttributeFromItemTable(itemTable,"MS","MStatus");if(a.EnableMinorVersions){if(currentItemUIString==null)currentItemUIString=GetAttributeFromItemTable(itemTable,"UIS","UIString");var i=currentItemUIString%512;if((currentItemModerationStatus==1||currentItemModerationStatus==3)&&a.isModerated||!a.isModerated&&i!=0){strDisplayText=L_PublishItem_Text;strAction="NavigateToCheckinAspx('"+a.HttpRoot+"', 'List="+a.listName+"&FileName="+c+"&Publish=true')";strImagePath=a.imagesPath+"pubmajor.gif";b=CAMOpt(d,strDisplayText,strAction,strImagePath,null,720);b.id="ID_PublishItem"}else{var e,g=false;if(!a.isModerated||currentItemModerationStatus==0){strDisplayText=L_UnPublishItem_Text;e="ID_UnPublishItem";strImagePath=a.imagesPath+"unpub.gif"}else{strDisplayText=L_CancelPublish_Text;e="ID_CancelPublish";strImagePath=a.imagesPath+"unapprv.gif";g=true}strAction="UnPublish('"+a.HttpRoot+"', 'FileName="+c+"&UnPublish=true',"+g+")";b=CAMOpt(d,strDisplayText,strAction,strImagePath,null,730);b.id=e}}}}function AddWorkflowsMenuItem(h,a){if(a.WorkflowsAssociated&&HasRights(0,4)){var d=GetAttributeFromItemTable(itemTable,"CId","ContentTypeId");if(d==null||d.substr(0,8)!="0x010801"){var e=a.imagesPath+"workflows.gif",b,c=currentItemID.indexOf(".0.");if(c>0)b=currentItemID.substr(0,c);else b=currentItemID;var g="STSNavigate('"+a.HttpRoot+"/_layouts/Workflow.aspx?ID="+b+"&List="+a.listName+"&Source="+GetSource()+"')",f=CAMOpt(h,L_Workflows_Text,g,e,null,900);f.id="ID_Workflows"}}}function AddWorkspaceMenuItem(d,a){var b,c=GetAttributeFromItemTable(itemTable,"SUrl","SourceUrl");if(c!=null&&c!=""&&c!="%20"){if(HasRights(0,135168)){strAction="STSNavigate('"+a.HttpRoot+"/_layouts/publishback.aspx?list="+a.listName+"&item="+currentItemID+GetRootFolder(a)+"')";b=CAMOpt(d,L_PublishBack_Text,strAction,"",null,1140);b.id="ID_PublishBack"}}else if(HasRights(0,8388608)&&HasRights(0,135168)&&HasRights(0,67108864)){strAction="STSNavigate('"+a.HttpRoot+"/_layouts/createws.aspx?list="+a.listName+"&item="+currentItemID+GetRootFolder(a)+"')";b=CAMOpt(d,L_CreateDWS_Text,strAction,"",null,1140);b.id="ID_CreateDWS"}}function AddVersionsMenuItem(e,a,d){if(currentItemID!=null){var b=currentItemID.toString();if(b.indexOf(".0.")>=0)return}if(!HasRights(0,64))return;strDisplayText=L_Versions_Text;strAction="NavigateToVersionsAspx('"+a.HttpRoot+"', 'list="+a.listName+"&ID="+currentItemID+"&FileName="+d+"')";strImagePath=a.imagesPath+"versions.gif";var c=CAMOpt(e,strDisplayText,strAction,strImagePath,null,800);c.id="ID_Versions"}function AddWorkOfflineMenuItem(c,a,b){strDisplayText=GetStssyncAppNameForType("documents",L_WorkOffline_Text,strImagePath);if(strDisplayText){strAction="javascript:ExportHailStorm('documents','"+a.HttpRoot+"','"+a.listName+"','"+STSScriptEncode(a.SiteTitle)+"','"+a.ListTitle+"','"+STSScriptEncode(a.listUrlDir)+"','','"+STSScriptEncode(unescapeProperly(a.listUrlDir))+"'";strAction+=",'"+STSScriptEncode(unescapeProperly(b))+"','"+currentItemID+"')";strImagePath=GetStssyncIconPath(a.imagesPath+"tbsprsht.gif",a.imagesPath);menuOption=CAMOpt(c,strDisplayText,strAction,strImagePath);menuOption.id="ID_WorkOffline"}}function AddVersionMenuItems(b,a){if(typeof AddVersionMenuItemsCore=="function")AddVersionMenuItemsCore(b,a)}function NavigateToSubNewAspx(a,b){STSNavigate(a+"/_layouts/SubNew.aspx?"+b+"&Source="+GetSource())}function NavigateToVersionsAspx(a,b){STSNavigate(a+"/_layouts/Versions.aspx?"+b+"&Source="+GetSource())}var L_UndoCheckoutWarning_Text="If you discard your check out, you will lose all changes made to the document.  Are you sure you want to discard your check out?",L_UnPublishWarning_Text=" Are you sure you want to unpublish this version of the document?",L_CancleApproval_TEXT=" Are you sure that you want to cancel the approval of this document?";function UnDoCheckOut(e,c){try{var b=null,d=SzExtension(unescapeProperly(c));if(FSupportCheckoutToLocal(d))b=StsOpenEnsureEx("SharePoint.OpenDocuments.3");if(b!=null){var a=currentItemFileUrl;if(a.charAt(0)=="/"||a.substr(0,3).toLowerCase()=="%2f")a=document.location.protocol+"//"+document.location.host+a;b.DiscardLocalCheckout(a);SetWindowRefreshOnFocus();return}else if(!confirm(L_UndoCheckoutWarning_Text))return}catch(f){}NavigateToCheckinAspx(e,"FileName="+c+"&DiscardCheckout=true")}function UnPublish(c,d,b){var a=L_UnPublishWarning_Text;if(b)a=L_CancleApproval_TEXT;if(!confirm(a))return;NavigateToCheckinAspx(c,d)}function NavigateToCheckinAspx(a,b){SubmitFormPost(a+"/_layouts"+"/Checkin.aspx?"+b+"&Source="+GetSource())}function NavigateToManagePermsPage(b,a,c){var d=",LISTITEM";STSNavigate(b+"/_layouts/User.aspx?obj="+a+","+c+d+"&List="+a+"&Source="+GetSource())}function NavigateToSourceItem(a){var c=a.match(/[^\/]*\/\/[^\/]*/g),b=c[0];a=escapeProperly(a);STSNavigate(b+"/_layouts/copyutil.aspx?GoToDispForm=1&Use=url&ItemUrl="+a)}function setDocType(){var a;a=GetAttributeFromItemTable(itemTable,"Icon","DocIcon").split("|");currentItemIcon=a[0];currentItemAppName=a[1];currentItemOpenControl=a[2];currentItemProgId=GetAttributeFromItemTable(itemTable,"Type","HTMLType")}function DeleteListItem(){if(!IsContextSet())return;var a=currentCtx,b=currentItemID;if(confirm(a.RecycleBinEnabled?L_STSRecycleConfirm_Text:L_STSDelConfirm_Text))SubmitFormPost(a.HttpPath+"&Cmd=Delete&List="+a.listName+"&ID="+b+"&NextUsing="+GetSource())}function DeleteDocLibItem(b,c){if(!IsContextSet())return;var a=currentItemFSObjType==1?ctx.RecycleBinEnabled?L_STSRecycleConfirm1_Text:L_STSDelConfirm1_Text:ctx.RecycleBinEnabled?L_STSRecycleConfirm_Text:L_STSDelConfirm_Text;if(c&&currentItemFSObjType!=1)a=L_NotifyThisIsCopy_Text+a;if(confirm(a))SubmitFormPost(b)}function EditMenuDefaultForOnclick(){if(!IsContextSet())return;var a=currentCtx;if(a.isVersions)STSNavigate(itemTable.getAttribute("verUrl"));else if(a.listTemplate==200){var b=currentItemID;MtgNavigate(b)}else EditListItem()}function EditListItem(){if(event.srcElement.tagName=="A"||event.srcElement.parentNode.tagName=="A")return;if(!IsContextSet())return;var b=currentCtx,a=b.editFormUrl+"?ID="+currentItemID+"&Source="+GetSource();if(b.listBaseType==1)a=a+GetRootFolder(b);STSNavigate(a)}function DoNavigateToTemplateGallery(a,b){document.cookie="MSOffice_AWS_DefSaveLoc="+a;STSNavigate(b)}function Portal_Tasks(j){if(!IsContextSet())return;var b=currentCtx,g=unescapeProperly(currentItemFileUrl),c=0,d=0;c=g.lastIndexOf("/");d=g.lastIndexOf(".");if(c<0||d<0||c>d)return;var i=g.substr(c+1,d-c-1),f="";c=b.HttpRoot.indexOf("://");if(c>0){d=b.HttpRoot.indexOf("/",c+3);if(d>0)f=b.HttpRoot.substring(0,d);else f=b.HttpRoot}var e="";if(currentItemFileUrl.charAt(0)=="/"||currentItemFileUrl.substr(0,3).toLowerCase()=="%2f")e=f+currentItemFileUrl;else e=currentItemFileUrl;var a="";if(false==setElementValue("ListViewURL",e))a=a+"&ListViewURL="+escapeProperly(e);if(false==setElementValue("ListTitle",i))a=a+"&ListTitle="+escapeProperly(i);if(false==setElementValue("ListDescription",""))a=a+"&ListDescription=";if(false==setElementValue("ReturnUrl",window.location.href))a=a+"&ReturnUrl="+escapeProperly(window.location.href);if(b.PortalUrl.substr(0,4)!="http")b.PortalUrl=f+b.PortalUrl;var h=b.PortalUrl+"_vti_bin/portalapi.aspx?cmd="+j;h=h+"&IconUrl="+b.imagesPath+currentItemIcon+a;SubmitFormPost(h)}function IsContextSet(){if(currentCtx==null)return false;else if(currentCtx.isExplictLogin)return true;else if(currentCtx.HttpPath==null||currentItemID==null)return false;return true}function ChangeContentType(d){var b=document.getElementById(d),a=window.location.href,e=a.indexOf("?");if(a.indexOf("?")<=0)a=a+"?ContentTypeId="+b.value;else if(a.indexOf("&ContentTypeId=")<=0)a=a+"&ContentTypeId="+b.value;else{var c=/&ContentTypeId=[^&]*/i;a=a.replace(c,"&ContentTypeId="+b.value)}STSNavigate(a)}function TopHelpButtonClick(a){if(typeof navBarHelpOverrideKey!="undefined")return HelpWindowKey(navBarHelpOverrideKey);if(a!=null)HelpWindowKey(a);else HelpWindowKey("NavBarHelpHome")}function HelpWindowHelper(b){var a;if(typeof b=="undefined")a="/_layouts/help.aspx?Lcid="+L_Language_Text;else a="/_layouts/help.aspx?Lcid="+L_Language_Text+b;var c=window.open(a,"STSHELP","height=500,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,width=475");c.focus()}function HelpWindowKey(a){HelpWindowHelper("&Key="+a)}function HelpWindowUrl(a){HelpWindowHelper("&Url="+a)}function HelpWindow(){HelpWindowKey("helphome")}function HelpBack(){history.back()}function HelpForward(){history.forward()}function HelpPrint(){window.print()}function HelpSearch(a){var d=256,b="";if(typeof glob_strLocaleNumId=="undefined")return true;if(typeof glob_strCollectionIds=="undefined")return true;if(glob_strCollectionIds.length<=0)return true;if(typeof a=="undefined")return true;if(a.length<=0)return true;a=TrimWhiteSpaces(a);if(a.length==0)return true;a=a.substr(0,d);a=encodeURIComponent(a);b="/_layouts/HelpSearch.aspx?lcid="+escapeProperlyCore(glob_strLocaleNumId,true);for(var c=0;c<glob_strCollectionIds.length;c++)b=b+"&cid"+c+"="+escapeProperlyCore(glob_strCollectionIds[c],true);b=b+"&sq="+a;window.location.href=b}var L_EmptySlideShow_Text="No pictures found in the library. Add pictures and try again.",L_NotOurView_Text="This operation cannot be completed within current view. Please select another view and try again.";function IsImgLibJssLoaded(){if(typeof fImglibJssLoaded!="undefined")return fImglibJssLoaded;return false}function EditSelectedImages(){if(!IsImgLibJssLoaded()){alert(L_NotOurView_Text);return}_EditSelectedImages()}function DeleteImages(){if(!IsImgLibJssLoaded()){alert(L_NotOurView_Text);return}_DeleteImages()}function SendImages(){if(!IsImgLibJssLoaded()){alert(L_NotOurView_Text);return}_SendImages()}function DownloadImages(){if(!IsImgLibJssLoaded()){alert(L_NotOurView_Text);return}_DownloadImages()}function MtgToggleTimeZone(){var b=document.getElementById("TimeZoneSection"),a=document.getElementById("TimeZoneLink"),d="Show time zone",c="Hide time zone";if(b.style.display=="none"){b.style.display="";a.innerHTML="&lt;&lt;";a.title=c;SetCookie("MtgTimeZone","1","")}else{b.style.display="none";a.innerHTML="&gt;&gt;";a.title=d;SetCookie("MtgTimeZone","0","")}}function GetPageUrl(a){return unescapeProperly(a?g_webUrl:g_pageUrl)}function MtgNavigate(a){if(a==g_instanceId)return;var b=!g_fPageGlobal;window.location.href=GetPageUrl(b)+"?InstanceID="+a+"&"+g_thispagedata}function GoToMtgMove(d,c,b,a){window.location.href=d+"/movetodt.aspx"+"?FromInstanceID="+c+"&FromInstanceDate="+escapeProperly(b)+"&FromInstanceDateISO="+escapeProperly(a)+"&Source="+escapeProperly(window.location.href)}function MtgKeep(c,d,b){var a="The information for this meeting date does not match the information in your calendar and scheduling program. If you keep this meeting date, it will continue to appear in the Meeting Series list in the workspace.";if(confirm(a))SubmitFormPost(c+"&Cmd=MtgKeep&List="+escapeProperly(d)+"&EditInstanceID="+b+"&NextUsing="+escapeProperly(window.location.href))}function MtgDelete(d,e,a){var b="This meeting date and the content associated with it will be deleted from the workspace.";if(confirm(b)){var c=a==g_instanceId;SubmitFormPost(d+"&Cmd=MtgMove&List="+escapeProperly(e)+"&FromInstanceID="+a+"&ToInstanceID=-3"+"&NextUsing="+escapeProperly(c?GetPageUrl(true):window.location.href))}}function SetCookie(b,a,c){document.cookie=b+"="+a+";path="+c}function SetAsLastTabVisited(){if(typeof g_pageUrl!="undefined"&&typeof g_webUrl!="undefined")SetCookie("MtgLastTabVisited",escapeProperly(unescapeProperly(g_pageUrl)),escapeProperlyCore(unescapeProperly(g_webUrl),true))}function MtgDeletePageConfirm(){var c="This page will be deleted from all meetings associated with this workspace.  ",b="Are you sure you want to delete this page?",a;if(document.getElementById("MtgTlPart_PageType").value=="MtgTlPart_LocalPage")a=b;else a=c+b;return confirm(a)}function MtgRedirect(){var a=GetCookie("MtgLastTabVisited");if(a==null)if(typeof g_webUrl!="undefined")a=g_webUrl;else a="../../";else a=escapeProperlyCore(a,true);window.location.href=a}function MakeMtgInstanceUrl(a,c){if(c!="undefined"&&c!=""){var b=a.indexOf("?");if(b==-1||a.indexOf("InstanceID=",b)==-1)a=a+(b==-1?"?":"&")+"InstanceID="+c}return a}function commonShowModalDialog(m,b,k,l){if(document.getElementById("__spPickerHasReturnValue")!=null)document.getElementById("__spPickerHasReturnValue").value="";if(document.getElementById("__spPickerReturnValueHolder")!=null)document.getElementById("__spPickerReturnValueHolder").value="";commonModalDialogReturnValue.clear();var n;if(window.showModalDialog){n=window.showModalDialog(m,l,b);onDialogClose(k,null,n)}else{var j=500,i=550,p="yes";if(!b)b="width="+j+",height="+i;else{function r(){return []}function d(a,b,c){a.push(b);a[b]=c}function q(b){var c=[];for(var a=0;a<b.length;a++)c.push(b[a]);return c}var a=r(),h,e;if(b.search(/^(\s*\w+\s*:\s*.+?\s*)(;\s*\s*\w+\s*:\s*.+?\s*)*(;\s*)?$/)!=-1){h=/^\s*(\w+)\s*:\s*(.+?)\s*$/;e=b.split(/\s*;\s*/)}else{h=/^\s*(\w+)\s*=\s*(.+?)\s*$/;e=b.split(/\s*,\s*/)}for(var s in e){var f=h.exec(e[s]);if(f&&f.length==3)d(a,f[1].toLowerCase(),f[2])}if(!a["width"])d(a,"width",a["dialogwidth"]||j);if(!a["height"])d(a,"height",a["dialogheight"]||i);if(!a["scrollbars"])d(a,"scrollbars",a["scroll"]||p);b="";var g=q(a);for(var o in g){if(b)b+=",";b+=g[o]+"="+a[g[o]]}}var c=window.open(m,"_blank",b+",modal=yes,dialog=yes");c.dialogArguments=l;window.onfocus=function(){var a=document.getElementById("__spPickerHasReturnValue")!=null&&document.getElementById("__spPickerHasReturnValue").value=="1"||commonModalDialogReturnValue.isSet();if(c&&!c.closed&&!a)c.focus();else{window.onfocus=null;onDialogClose(k,c,null)}}}}function onDialogClose(b,c,a){if(b)if(typeof a!="undefined"&&a!=null)b(a);else if(typeof c!="undefined"&&c!=null&&typeof c.returnValue!="undefined"){a=c.returnValue;b(a)}else if(typeof commonModalDialogReturnValue!="undefined"&&commonModalDialogReturnValue!=null&&commonModalDialogReturnValue.isSet()){a=commonModalDialogReturnValue.get();b(a);commonModalDialogReturnValue.clear()}else if(document.getElementById("__spPickerHasReturnValue")!=null&&document.getElementById("__spPickerHasReturnValue").value=="1"&&document.getElementById("__spPickerReturnValueHolder")!=null){a=document.getElementById("__spPickerReturnValueHolder").value;b(a)}}function setModalDialogReturnValue(a,b){if(a.opener!=null&&typeof b=="string"&&a.opener.document.getElementById("__spPickerHasReturnValue")!=null&&a.opener.document.getElementById("__spPickerReturnValueHolder")!=null){a.opener.document.getElementById("__spPickerHasReturnValue").value="1";a.opener.document.getElementById("__spPickerReturnValueHolder").value=b}else setModalDialogObjectReturnValue(a,b)}function setModalDialogObjectReturnValue(a,b){if(a.showModalDialog)a.returnValue=b;if(a.opener!=null)a.opener.commonModalDialogReturnValue.set(b)}commonModalDialogReturnValue={hasRetval:false,retVal:null,"set":function(a){if(typeof a!="undefined"){this.retVal=a;this.hasRetval=true}},isSet:function(){return this.hasRetval},"get":function(){if(this.hasRetval)return this.retVal},clear:function(){this.hasRetval=false;this.retVal=null}};var filterTable=null,bIsFilterMenuShown=false,bIsFilterDataLoaded=false,filterImageCell=null,currentFilterMenu=null,loadingFilterMenu=null,ctxFilter=null,bIsFilterKeyPress=false,filterStr=null,strFieldName="",bMenuLoadInProgress=false,strFilteredValue=null,L_NotSortable_Text="This column type cannot be sorted",L_NotFilterable_Text="This column type cannot be filtered",L_AOnTop_Text="A on Top",L_ZOnTop_Text="Z on Top",L_SmallestOnTop_Text="Smallest on Top",L_LargestOnTop_Text="Largest on Top",L_OldestOnTop_Text="Oldest on Top",L_NewestOnTop_Text="Newest on Top",L_AttachmentsOnTop_Text="Attachments on Top",L_BlanksOnTop_Text="Blanks on Top",L_Ascending_Text="Ascending",L_Descending_Text="Descending",L_DontFilterBy_Text="Clear Filter from ^1",L_Loading_Text="Loading....",L_FilterMode_Text="Show Filter Choices",L_OpenMenu_Text="Open Menu";function resetFilterMenuState(){if(bMenuLoadInProgress)return;bIsFilterMenuShown=false;bIsFilterDataLoaded=false;filterTable=null;filterImageCell=null;currentFilterMenu=null;loadingFilterMenu=null;ctxFilter=null;bIsFilterKeyPress=false}function setupFilterMenuContext(a){ctxFilter=a}function IsFilterMenuOn(){if(!bIsFilterMenuShown)return false;var a=false;a=MenuHtc_isOpen(currentFilterMenu)||MenuHtc_isOpen(loadingFilterMenu);if(!a)bIsFilterMenuShown=false;return a}function IsFilterMenuEnabled(){return true}function OnMouseOverFilterDeferCall(c){if(!IsFilterMenuEnabled())return false;if(IsFilterMenuOn())return false;if(window.location.href.search("[?&]Filter=1")!=-1)return false;if(c.FilterDisable=="TRUE")return false;if(filterTable!=null)OnMouseOutFilter();filterTable=c;var d=new Function("setupFilterMenuContext(ctx"+filterTable.getAttribute("CtxNum")+");");d();filterTable.className="ms-selectedtitle";filterTable.onclick=CreateFilterMenu;filterTable.oncontextmenu=CreateFilterMenu;filterTable.onmouseout=OnMouseOutFilter;var b=filterTable.childNodes[0].childNodes[0];filterImageCell=b.childNodes[b.childNodes.length-1];var a=filterImageCell.childNodes[0];a.src=ctxFilter.imagesPath+"menudark.gif";a.alt=L_OpenMenu_Text;a.style.visibility="visible";if(IsElementRtl(filterTable)){filterImageCell.style.right=null;filterImageCell.style.left="1px"}else{filterImageCell.style.left=null;filterImageCell.style.right="1px"}filterImageCell.className="ms-menuimagecell";return true}function OnMouseOutFilter(){if(!IsFilterMenuOn()&&filterTable!=null){filterTable.className="ms-unselectedtitle";filterTable.onclick="";filterTable.oncontextmenu="";filterTable.onmouseout="";if(filterImageCell!=null){filterImageCell.childNodes[0].style.visibility="hidden";filterImageCell.className=""}resetFilterMenuState()}}function OnFocusFilter(a){if(window.location.href.search("[?&]Filter=1")!=-1)return false;if(!IsFilterMenuEnabled())return false;a.onblur=OnMouseOutFilter;a.onkeydown=PopFilterMenu;var b=FindSTSMenuTable(a,"CTXNum");if(b==null)return false;OnMouseOverFilter(b);return false}function PopFilterMenu(a){if(!IsFilterMenuEnabled())return true;if(a==null)a=window.event;var b;if(browseris.nav6up)b=a.which;else b=a.keyCode;if(!IsFilterMenuOn()&&(a.shiftKey&&b==13||a.altKey&&b==40)){CreateFilterMenu(a);return false}else return true}function CreateFilterMenu(a){if(filterTable==null||filterImageCell==null)return true;if(a==null)a=window.event;bIsFilterMenuShown=true;window.document.body.onclick="";currentFilterMenu=CMenu("filter_menu");loadingFilterMenu=CMenu("filter_menu_loading");currentFilterMenu.setAttribute("CompactMode","true");addSortMenuItems(currentFilterMenu,loadingFilterMenu);if(filterStr==null)addFilterMenuItems(currentFilterMenu,loadingFilterMenu);else addAdHocFilterMenuItems(currentFilterMenu,loadingFilterMenu);a.cancelBubble=true;return false}function GetUrlWithNoSortParameters(d){var a=window.location.href,c,e=0,b,f;do{b=d.indexOf("=",e);if(b==-1)return a;c=d.substring(e,b);if(c!="");a=RemoveQueryParameterFromUrl(a,c);f=d.indexOf("&",b+1);if(f==-1)return a;e=f+1}while(c!="");return a}function addSortMenuItems(b,a){if(filterTable.getAttribute("Sortable")=="FALSE"||filterTable.getAttribute("SortDisable")=="TRUE"||filterTable.getAttribute("FieldType")=="MultiChoice"){CAMOptFilter(b,a,L_NotSortable_Text,"","",false,"fmi_ns");CAMSep(b);CAMSep(a);return}var e="",d="",c="",f="/_layouts/"+L_Language_Text+"/images/SORTAZLang.gif",g="/_layouts/"+L_Language_Text+"/images/SORTZALang.gif";if(filterStr==null){var j=filterTable.getAttribute("SortFields"),n=j.indexOf("&SortDir");if(n==-1){CAMOptFilter(b,a,L_NotSortable_Text,"","",false,"fmi_ns");CAMSep(b);CAMSep(a);return}var q=j.indexOf("&",n+1),k=GetUrlWithNoSortParameters(j);k=RemovePagingArgs(k);if(k.indexOf("?")<0)k+="?";else k+="&";e="SubmitFormPost('"+STSScriptEncode(k)+STSScriptEncode(j.substr(0,n)+"&SortDir=Asc"+j.substr(q))+"');";d="SubmitFormPost('"+STSScriptEncode(k)+STSScriptEncode(j.substr(0,n)+"&SortDir=Desc"+j.substr(q))+"');";var c=filterTable.getAttribute("FieldType");strFieldName=filterTable.getAttribute("Name")}else{var o=" ",h=filterStr.lastIndexOf(o);c=filterStr.substring(h+1);if(c.substring(0,2)=="x:")c=c.substring(2);var l=filterStr.substring(0,h);h=l.lastIndexOf(o);strFieldName=l.substring(h+1);if(strFieldName.substring(0,1)=="@")strFieldName=strFieldName.substring(1);l=filterStr.substring(0,h);h=l.lastIndexOf(o);if(h>0)strFieldName=l.substring(0,h);var s=filterTable.childNodes[0].childNodes[0],r=s.childNodes[0].childNodes[0],i=r.href;i=i.replace(/%20/g," ");if(i.indexOf("'ascending'")>0){e=i;d=i.replace("'ascending'","'descending'")}else{d=i;e=i.replace("'descending'","'ascending'")}}c=c.toLowerCase();if(c=="dateTime"){CAMOptFilter(b,a,L_OldestOnTop_Text,e,f,true,"fmi_asc");CAMOptFilter(b,a,L_NewestOnTop_Text,d,g,true,"fmi_desc")}else if(c=="integer"||c=="number"||c=="currency"){CAMOptFilter(b,a,L_SmallestOnTop_Text,e,f,true,"fmi_asc");CAMOptFilter(b,a,L_LargestOnTop_Text,d,g,true,"fmi_desc")}else if(c=="text"||c=="user"||c=="string"){CAMOptFilter(b,a,L_AOnTop_Text,e,f,true,"fmi_asc");CAMOptFilter(b,a,L_ZOnTop_Text,d,g,true,"fmi_desc")}else if(c=="calculated"){var m=filterTable.getAttribute("ResultType");if(m=="Number"||m=="Currency"){CAMOptFilter(b,a,L_SmallestOnTop_Text,e,f,true,"fmi_asc");CAMOptFilter(b,a,L_LargestOnTop_Text,d,g,true,"fmi_desc")}else if(m=="dateTime"){CAMOptFilter(b,a,L_OldestOnTop_Text,e,f,true,"fmi_asc");CAMOptFilter(b,a,L_NewestOnTop_Text,d,g,true,"fmi_desc")}else if(m=="boolean"){CAMOptFilter(b,a,L_Ascending_Text,e,f,true,"fmi_asc");CAMOptFilter(b,a,L_Descending_Text,d,g,true,"fmi_desc")}else{CAMOptFilter(b,a,L_AOnTop_Text,e,f,true,"fmi_asc");CAMOptFilter(b,a,L_ZOnTop_Text,d,g,true,"fmi_desc")}}else if(c=="attachments"){CAMOptFilter(b,a,L_BlanksOnTop_Text,e,f,true,"fmi_asc");CAMOptFilter(b,a,L_AttachmentsOnTop_Text,d,g,true,"fmi_desc")}else if(c=="lookup"){var p=filterTable.getAttribute("Name");if(p=="Last_x0020_Modified"||p=="Created_x0020_Date"){CAMOptFilter(b,a,L_OldestOnTop_Text,e,f,true,"fmi_asc");CAMOptFilter(b,a,L_NewestOnTop_Text,d,g,true,"fmi_desc")}else{CAMOptFilter(b,a,L_Ascending_Text,e,f,true,"fmi_asc");CAMOptFilter(b,a,L_Descending_Text,d,g,true,"fmi_desc")}}else{CAMOptFilter(b,a,L_Ascending_Text,e,f,true,"fmi_asc");CAMOptFilter(b,a,L_Descending_Text,d,g,true,"fmi_desc")}CAMSep(b);CAMSep(a)}function CAMOptFilter(h,g,d,f,c,b,e){var a;a=CAMOpt(h,d,f,c);a.id=e;if(!b)a.setAttribute("enabled","false");a=CAMOpt(g,d,f,c);a.id=e+"_p";if(!b)a.setAttribute("enabled","false")}function ShowFilterLoadingMenu(){if(!bIsFilterDataLoaded)OMenu(loadingFilterMenu,filterTable,null,null,-1)}function addFilterMenuItems(e,h){var f;if(filterTable.getAttribute("Filterable")=="FALSE"||filterTable.getAttribute("FieldType ")=="Note"||filterTable.getAttribute("FieldType ")=="URL"){f=CAMOpt(e,L_NotFilterable_Text,"");f.setAttribute("enabled","false");OMenu(e,filterTable,null,null,-1);e._onDestroy=OnMouseOutFilter;return}var c=document.getElementById("FilterIframe"+filterTable.getAttribute("CtxNum"));if(c==null)return;var d=c.getAttribute("FilterLink"),g=escapeProperly(filterTable.getAttribute("Name"));strFilteredValue=null;var b="",j=0,a;do{j++;a=d.match("FilterField"+j+"=[^&]*"+"&FilterValue"+j+"=[^&]*");if(a!=null){if(strFilteredValue==null)strFilteredValue=getFilterValueFromUrl(a.toString(),g);b=b+"&"+a}}while(a);var l=strFilteredValue!=null;strDisplayText=StBuildParam(L_DontFilterBy_Text,filterTable.getAttribute("DisplayName"));var m="javascript:SubmitFormPost('"+STSScriptEncode(FilterFieldV3(ctxFilter.view,g,"",0,true))+"')",i;if(l)i=ctxFilter.imagesPath+"FILTEROFF.gif";else i=ctxFilter.imagesPath+"FILTEROFFDISABLED.gif";CAMOptFilter(e,h,strDisplayText,m,i,l,"fmi_clr");f=CAMOpt(h,L_Loading_Text,"");f.setAttribute("enabled","false");setTimeout("ShowFilterLoadingMenu()",500);h._onDestroy=OnMouseOutFilter;a=d.match("MembershipGroupId=[^&]*");if(a!=null)b=b+"&"+a;a=d.match("InstanceID=[^&]*");if(a!=null)b=b+"&"+a;var k="";a=d.match("RootFolder=[^&]*");if(a!=null)k="&"+a;if(browseris.safari){c.src="/_layouts/blank.htm";c.style.offsetLeft="-550px";c.style.offsetTop="-550px";c.style.display="block"}c.src=ctxFilter.HttpRoot+"/_layouts/filter.aspx?ListId="+ctxFilter.listName+k+"&FieldInternalName="+g+"&ViewId="+ctxFilter.view+"&FilterOnly=1&Filter=1"+b;bMenuLoadInProgress=true}function getFilterValueFromUrl(b,f){var a,c,e;a=b.indexOf("=");if(a==-1)return;c=b.indexOf("&");if(c==-1)return;if(c<a)return;b=CanonicalizeUrlEncodingCase(b);e=b.substring(a+1,c);if(e==f){var d;a=b.indexOf("=",c+1);if(a==-1)return;d=b.substr(a+1);d=unescapeProperly(d);return d}return null}function OnIframeLoad(){bMenuLoadInProgress=false;if(filterTable!=null&&filterTable.getAttribute("Name")!=null){var f=window.frames["FilterIframe"+filterTable.getAttribute("CtxNum")];if(f!=null){var c=filterTable.getAttribute("Name"),e=f.document.getElementById("diidFilter"+c);c=escapeProperly(c);if(e!=null){var g=e.childNodes.length;if(g>500)addFilterOptionMenuItem();else{var b=e.childNodes;for(var a=1;a<g;a++){var d;if(b[a].innerText)d=b[a].innerText;else if(b[a].textContent)d=b[a].textContent;else d=b[a].innerHTML;var h="javascript:SubmitFormPost('"+STSScriptEncode(FilterFieldV3(ctxFilter.view,c,b[a].value,a,true))+"')",i=CAMOpt(currentFilterMenu,d,h);if(strFilteredValue!=null&&strFilteredValue==b[a].value)i.setAttribute("checked","true")}}}else addFilterOptionMenuItem();bIsFilterDataLoaded=true;if(loadingFilterMenu!=null)loadingFilterMenu._onDestroy=null;if(currentFilterMenu!=null){currentFilterMenu._onDestroy=OnMouseOutFilter;OMenu(currentFilterMenu,filterTable,null,null,-1)}}}}function addFilterOptionMenuItem(){var a=window.location.href;a=StURLSetVar2(a,"Filter","1");a=StURLSetVar2(a,"View",ctxFilter.view);a="javascript:SubmitFormPost('"+a+"')";CAMOpt(currentFilterMenu,L_FilterMode_Text,a)}function OnMouseOverAdHocFilterDeferCall(c,b){filterStr=b;if(!browseris.ie55up||!browseris.win32)return false;if(IsFilterMenuOn())return false;if(filterTable!=null)OnMouseOutFilter();filterTable=c;filterTable.className="ms-selectedtitle";filterTable.onclick=CreateFilterMenu;filterTable.oncontextmenu=CreateFilterMenu;filterTable.onmouseout=OnMouseOutFilter;var a=filterTable.children[0].children[0];filterImageCell=a.children[a.children.length-1];filterImageCell.children[0].src="/_layouts/images/menudark.gif";filterImageCell.children[0].style.visibility="visible";filterImageCell.style.visibility="visible";filterImageCell.className="ms-menuimagecell";return true}function addAdHocFilterMenuItems(c,a){var b=CAMOpt(a,L_Loading_Text,"");b.setAttribute("enabled","false");OMenu(a,filterTable,null,null,-1);a._onDestroy=OnMouseOutFilter;DoCallBack("__filter={"+filterStr+"}")}function UpdateFilterCallback(b){var i="</OPTION>",a=-1;a=b.indexOf(i,a+1);var c=b.lastIndexOf(">",a),k=StBuildParam(L_DontFilterBy_Text,strFieldName),h,e="";if(c<a-1){var d=b.lastIndexOf('"',a);if(d>0){var g=b.lastIndexOf('"',d-1);if(g>0)e=b.substring(g+1,d)}}if(c==a-1)h="/_layouts/images/FILTEROFFDISABLED.gif";else h="/_layouts/images/FILTEROFF.gif";if(a>0){var j=CAMOpt(currentFilterMenu,k,e,h);j.setAttribute("enabled",c==a-1?"false":"true");var d=a,l='<OPTION href="';a=b.indexOf(i,a+8);while(a>0){c=b.indexOf(l,d+8);c=b.indexOf('"',c+20);if(c>0&&c<a){var f=b.substring(c+2,a),e="";d=b.lastIndexOf('"',c);if(d>0){var g=b.lastIndexOf('"',d-1);if(g>0){e=b.substring(g+1,d);e=e.replace(/&amp;/g,"&")}}if(f.length>40)f=f.substring(0,40)+"...";if(f.length>0)CAMOpt(currentFilterMenu,f,e)}d=a;a=b.indexOf(i,a+8)}}else{var j=CAMOpt(currentFilterMenu,L_NotFilterable_Text,"");j.setAttribute("enabled","false");OMenu(currentFilterMenu,filterTable,null,null,-1);return}loadingFilterMenu._onDestroy=null;OMenu(currentFilterMenu,filterTable,null,null,-1);currentFilterMenu._onDestroy=OnMouseOutFilter}function OnClickFilter(d,e){var b=FindSTSMenuTable(d,"CTXNum");if(b!=null&&b.getAttribute("SortFields")!=null){var c=b.getAttribute("SortFields"),a=GetUrlWithNoSortParameters(c);a=RemovePagingArgs(a);if(a.indexOf("?")<0)a+="?";else a+="&";SubmitFormPost(a+c)}if(!bIsFileDialogView)e.cancelBubble=true;return false}function ToggleSelectionAllUsers(b){var a=document.getElementById("spToggleUserSelectionCheckBox_"+b.toString());if(a!=null){var h="spUserSelectionCheckBox_"+b.toString(),e=document.getElementsByName(h);a.checked=!a.checked;for(var d=0;d<e.length;d++){var g=e[d];g.checked=a.checked}var f="cbxUserSelectAll"+b.toString(),c=document.getElementById(f);if(c!=null)if(a.checked)c.src="/_layouts/images/checkall.gif";else c.src="/_layouts/images/unchecka.gif"}}function UserSelectionOnClick(j,c){var g="cbxUserSelectAll"+c.toString(),b=document.getElementById(g),a=document.getElementById("spToggleUserSelectionCheckBox_"+c.toString());if(!j.checked){if(a!=null)a.checked=false;if(b!=null)b.src="/_layouts/images/unchecka.gif"}else{var i="spUserSelectionCheckBox_"+c.toString(),f=document.getElementsByName(i),e=true;for(var d=0;d<f.length;d++){var h=f[d];if(!h.checked){e=false;break}}if(e){if(b)b.src="/_layouts/images/checkall.gif";if(a)a.checked=true}}}var g_menuCounter=0,g_oSelRw=null,g_iEntityEditorLineHeight=16,g_EntityEditorHiddenEntityKeyId="HiddenEntityKey",g_EntityEditorHiddenEntityDisplayTextId="HiddenEntityDisplayText",g_EntityEditorShowEntityDisplayTextInTextBox="ShowEntityDisplayTextInTextBox",g_EntityEditorDownLevelId="downlevelTextBox",g_EntityEditorUpLevelId="upLevelDiv",g_EntityEditorHiddenId="hiddenSpanData",g_EntityEditorCheckNamesId="checkNames",g_EntityEditorOuterTableId="OuterTable",g_EntityEditorErrorLabelId="errorLabel",g_EntityEditorResultTableId="resultTable",g_EntityEditorResultTableAttrEditorId="EditorControlClientId";function onKeyDownRw(h,c,d,g,a){if(!a)a=window.event;var b=a.keyCode;if(a.shiftKey&&b==13||a.altKey&&b==40){onClickRw(true,false);canEvt(a);return}if(g==false){if(b!=8&&b!=46&&b!=37&&b!=39&&b!=9)canEvt(a);else if(autoPostBackEnabled(h))schedulePostBack();PickerAdjustHeight(c,d)}else{PickerAdjustHeight(c,d);if(a.ctrlKey&&b==75||!a.ctrlKey&&!a.altKey&&!a.shiftKey&&b==13){canEvt(a);var f=getSubControlID(c,g_EntityEditorCheckNamesId),e=document.getElementById(f);if(e)e.click()}}}function onKeyUpRw(a){copyUplevelToHidden(a)}function onMouseDownRw(){if(event.button==2)g_oSelRw=document.selection.createRange()}function onContextMenuSpnRw(){var a=g_oSelRw,b=document.selection.createRange();if(a.text=="")ret=onClickRw(false,false);else if(a.inRange(b))a.select();else onClickRw(false,false);return false}function canEvt(a){if(a==null)a=event;a.returnValue=false;a.cancelBubble=true}function copyUplevelToHidden(b){if(document.getElementById(b)==null)return;updateControlValue(b);var c=document.getElementById(getSubControlID(b,g_EntityEditorUpLevelId)),d=document.getElementById(getSubControlID(b,g_EntityEditorHiddenId)),a=c.childNodes;for(i=0;i<a.length;i++)if(a[i].tagName!="SPAN"&&a[i].nodeType!=3)if(a[i].tagName=="A"){var e=document.body.createTextRange();e.moveToElementText(a[i]);e.execCommand("Unlink")}else{var g=document.createTextNode(a[i].innerText);a[i].replaceNode(g)}if(EntityEditor_UseContentEditableControl)d.value=c.innerHTML;else{var f=document.getElementById(getSubControlID(b,g_EntityEditorDownLevelId));d.value=f.value}}function getUplevel(b){if(EntityEditor_UseContentEditableControl){var c=document.getElementById(getSubControlID(b,g_EntityEditorUpLevelId)),a=c.childNodes;for(i=0;i<a.length;i++)if(a[i].tagName!="SPAN"&&a[i].nodeType!=3){var e=document.createTextNode(a[i].innerText);a[i].replaceNode(e)}return c.innerHTML}var d=document.getElementById(getSubControlID(b,g_EntityEditorDownLevelId));return d.value}function EntityEditorHasData(a){if(EntityEditor_UseContentEditableControl){var d=document.getElementById(getSubControlID(a,g_EntityEditorUpLevelId)),c=d.childNodes;if(c.length>0)return true}else{var b=document.getElementById(getSubControlID(a,g_EntityEditorDownLevelId));if(b.value!=null&&b.value.length>0)return true}return false}function EEDecodeSpecialChars(b){var a=b.replace(/&quot;/g,'"');a=a.replace(/&gt;/g,">");a=a.replace(/&lt;/g,"<");a=a.replace(/&#39;/g,"'");a=a.replace(/&amp;/g,"&");return a}function onClickRw(r,n){var e=document.selection.createRange(),d=e.parentElement(),a=null;if(d.tagName=="SPAN"&&d.id=="content")a=d.parentElement;else if(d.tagName=="SPAN"&&d.id.substring(0,4)=="span"&&!n)a=d;if(a!=null){e.moveToElementText(a);var k="character";e.moveStart(k,-1);e.moveEnd(k,1);e.select();g_oSelRw=e;var j=a.children("divEntityData"),o=j.getAttribute("isresolved");if(o=="False"){var g=a;if(g.getBoundingClientRect().right>g.parentElement.getBoundingClientRect().right)g=g.parentElement;var b=a.parentElement.id.replace("_upLevelDiv",""),h=j.getAttribute("key"),c=DeferCall("CMenu","Entity_Menu"+g_menuCounter);g_menuCounter++;var f=null;if(matches[b]!=null&&matches[b][h]!=null)f=matches[b][h];var i=document.getElementById(b),l=i.getAttribute("MoreItemsText"),q=i.getAttribute("RemoveText"),m=i.getAttribute("NoMatchesText");if(f==null||f.childNodes.length==0)CAMOpt(c,m);else for(x=0;x<f.childNodes.length;x++){var p=f.childNodes[x];CAMOpt(c,p.getAttribute("DisplayText"),"EEReplace('"+STSScriptEncode(b)+"', '"+STSScriptEncode(h)+"', "+x+");")}CAMSep(c);CAMOpt(c,q,"EERemove();");CAMOpt(c,l,"EEShowMore('"+STSScriptEncode(b)+"', '"+STSScriptEncode(h)+"');");OMenu(c,g,null,null,-1)}}}function EEShowMore(b,a){DeferCall("__Dialog__"+b,a)}function EEReplace(a,e,f){var c=matches[a][e].childNodes[f],d=ConvertEntityToSpan("",c);g_oSelRw.pasteHTML(d);PickerAdjustHeight(a,g_maxheight[a]);var b=document.getElementById(getSubControlID(a,"downlevelTextBox"));if(b!=null&&autoPostBackEnabled(b))schedulePostBack()}function EERemove(){g_oSelRw.select();document.selection.clear()}var g_maxheight=[];function EntityEditorSetWaitCursor(b){if(document.getElementById(b)==null)return;var a=document.getElementById(getSubControlID(b,g_EntityEditorOuterTableId));if(a!=null)a.style.cursor="wait"}function EntityEditorClearWaitCursor(b){if(document.getElementById(b)==null)return;var a=document.getElementById(getSubControlID(b,g_EntityEditorOuterTableId));if(a!=null)a.style.cursor=""}function EntityEditorHandleCheckNameResult(b,a){EntityEditorClearWaitCursor(a);EntityEditorCallback(b,a)}function EntityEditorHandleCheckNameError(c,b){EntityEditorClearWaitCursor(b);var a=document.getElementById(getSubControlID(b,g_EntityEditorErrorLabelId));if(a)a.innerHTML=STSHtmlEncode(c)}function EntityEditorCallback(result,ctx,preventAutoPostBack){if(document.getElementById(ctx)==null)return;var editor=document.getElementById(ctx),errorControl=document.getElementById(getSubControlID(ctx,"errorLabel")),xmlDoc;if(document.implementation&&document.implementation.createDocument)xmlDoc=(new DOMParser).parseFromString(result,"text/xml");else{xmlDoc=new ActiveXObject("Microsoft.XMLDOM");xmlDoc.async=false;xmlDoc.loadXML(result)}var entities=xmlDoc.documentElement,separator=entities.getAttribute("Separator");if(separator==null)separator=String.fromCharCode(0);var append=entities.getAttribute("Append"),maxHeight=entities.getAttribute("MaxHeight");g_maxheight[ctx]=maxHeight;var spanData="",downlevelData="";if(append=="False")errorControl.innerHTML=STSHtmlEncode(entities.getAttribute("Error"));for(x=0;x<entities.childNodes.length;x++){var entity=entities.childNodes[x];spanData+=ConvertEntityToSpan(ctx,entity);if(x==0&&editor.getAttribute(g_EntityEditorShowEntityDisplayTextInTextBox)=="1"){downlevelData+=entity.getAttribute("DisplayText");document.getElementById(getSubControlID(ctx,g_EntityEditorHiddenEntityKeyId)).value=entity.getAttribute("Key");document.getElementById(getSubControlID(ctx,g_EntityEditorHiddenEntityDisplayTextId)).value=entity.getAttribute("DisplayText")}else downlevelData+=entity.getAttribute("Key");if(spanData!=""&&x+1!=entities.childNodes.length){spanData+=separator+" ";downlevelData+=separator+" "}}var uplevel=document.getElementById(getSubControlID(ctx,g_EntityEditorUpLevelId)),hiddenSpan=document.getElementById(getSubControlID(ctx,g_EntityEditorHiddenId)),downlevel=document.getElementById(getSubControlID(ctx,g_EntityEditorDownLevelId)),shouldPostBack=(preventAutoPostBack==null||!preventAutoPostBack)&&autoPostBackEnabled(uplevel),shouldNotifyChange=uplevel.innerHTML!=spanData;if(append=="True"&&uplevel.innerHTML!=""){uplevel.innerHTML+=separator+" "+spanData;hiddenSpan.value+=separator+" "+spanData;downlevel.value+=separator+" "+downlevelData}else{shouldPostBack=shouldPostBack&&uplevel.innerHTML!=spanData&&spanData.indexOf("ms-entity-resolved")!=-1;downlevel.value=downlevelData;uplevel.innerHTML=spanData;hiddenSpan.value=spanData}if(shouldNotifyChange&&!shouldPostBack&&downlevel.onvaluesetfrompicker)if(typeof downlevel.onvaluesetfrompicker=="function")downlevel.onvaluesetfrompicker();else eval(downlevel.onvaluesetfrompicker);updateControlValue(ctx);PickerAdjustHeight(ctx,maxHeight);if(shouldPostBack)schedulePostBack();var cbScript=editor.getAttribute("EEAfterCallbackClientScript");if(cbScript!=null&&cbScript!="")if(preventAutoPostBack==undefined||preventAutoPostBack==false){var timeoutScript=cbScript+"('"+STSScriptEncode(ctx)+"', '"+STSScriptEncode(result)+"')";setTimeout(timeoutScript,500)}}function updateControlValue(a){if(document.getElementById(a)==null)return;var b=document.getElementById(getSubControlID(a,g_EntityEditorUpLevelId)),c=document.getElementById(a);c.value=b.innerHTML!=""?"true":"";CheckOk(a)}function CheckOk(a){var c=document.getElementById(a);if(c==null)return;var b=false;if(c.getAttribute("allowEmpty")=="1")b=true;var d=document.getElementById(getSubControlID(a,g_EntityEditorUpLevelId));if(d.innerHTML!=""){if(self.enableOK!=null)enableOK()}else if(self.disableOK!=null&&!b)disableOK()}var matches=[];function ConvertEntityToSpan(g,b){if(matches[g]==null)matches[g]=[];var e=b.getAttribute("Key"),f=b.getAttribute("DisplayText"),i=b.getAttribute("IsResolved"),h=b.getAttribute("Description"),j="ms-entity-unresolved";if(i=="True")j="ms-entity-resolved";var a="<span id='span"+STSHtmlEncode(e)+"' tabindex='-1' contentEditable='false' class='"+j+"' ";a+="title='"+STSHtmlEncode(h)+"'>";a+="<div style='display:none;' id='divEntityData' ";a+="key='"+STSHtmlEncode(e)+"' displaytext='"+STSHtmlEncode(f)+"' isresolved='"+STSHtmlEncode(i)+"' ";a+="description='"+STSHtmlEncode(h)+"'>";var k=EntityEditor_SelectSingleNode(b,"MultipleMatches");matches[g][e]=k;var d=EntityEditor_SelectSingleNode(b,"ExtraData");if(d){var c;if(d.firstChild)c=d.firstChild.xml;if(!c)c=d.innerXml||d.innerHTML;if(!c)c="";a+="<div data='"+STSHtmlEncode(c)+"'></div>"}else a+="<div data=''></div>";a+="</div>";a+="<span id='content' tabindex='-1' contenteditable onMouseDown='onMouseDownRw();' onContextMenu='onContextMenuSpnRw();' >";if(f!="")a+=STSHtmlEncode(f);else a+=STSHtmlEncode(e);a+="</span></span>";return a}function PickerAdjustHeight(a,c){var f=document.getElementById(a);if(f==null)return;var b=document.getElementById(getSubControlID(a,g_EntityEditorDownLevelId)),e=document.getElementById(getSubControlID(a,g_EntityEditorUpLevelId)),d=b.rows;PickerAdjustHeight2(b,d,c);PickerAdjustHeight2(e,d,c)}function PickerAdjustHeight2(c,f,h){var g=h;if(c!=null){var a=c.scrollHeight,d=c.clientHeight,e=c.offsetHeight;if(a==0){a=13;d=14;e=18}var b=g*g_iEntityEditorLineHeight;a=a<f*g_iEntityEditorLineHeight?f*g_iEntityEditorLineHeight:a;if(d!=a&&(a<=b||d<b))c.style.height=e+(a>b?b:a)-d;else if(d>b)c.style.height=b}}function docopy(){var a=document.selection.createRange();window.clipboardData.setData("Text",a.text);window.event.returnValue=false;return false}function dopaste(){var a=document.selection.createRange();window.event.returnValue=false;a.text=window.clipboardData.getData("Text");return false}function getSubControlID(b,a){return b+"_"+a}var nav4=window.Event?true:false,selected=new Array(0),lastSelected;function PickerDialogSetClearState(){selected=new Array(0);lastSelected=null;PickerDialogUpdateAddSelectionButton()}function singleselectevent(b){if(!b)b=window.event;var a=null;if(nav4)a=b.target.parentNode||b.currentTarget.parentNode;else{a=b.srcElement;if(a.tagName=="TD")a=a.parentElement}while(a.tagName!="TR")a=a.parentNode;addSelection(a,true,true);lastSelected=a;addSelected_Click();PickerDialogUpdateAddSelectionButton();return false}function multiselectevent(b){if(!b)b=window.event;var h=false,j=false;j=b["ctrlKey"];h=b["shiftKey"];var a=null;if(nav4)a=b.target.parentNode||b.currentTarget.parentNode;else{a=b.srcElement;if(a.tagName=="TD")a=a.parentElement}while(a.tagName!="TR")a=a.parentNode;if(h==false){if(j==false){setSelectedColor(false);selected=new Array(0)}lastSelected=a;var d=-1;for(i=0;i<selected.length;i++)if(selected[i]==a){d=i;i=selected.length}if(d==-1)selected=selected.concat(new Array(a));else{setSelectedRowColor(selected[d],false);selected.splice(d,1)}}else{setSelectedColor(false);selected=new Array(0);var g;if(nav4)g=a.parentNode;else g=a.parentElement;var f,e,c=g.rows;if(lastSelected==null)lastSelected=c[1];for(i=1;i<c.length;i++){if(c[i]==a)f=i;if(c[i]==lastSelected)e=i;if(f!=null||e!=null)selected=selected.concat(new Array(c[i]));if(f!=null&&e!=null)i=c.length}}setSelectedColor(true);PickerDialogUpdateAddSelectionButton();return false}function setSelectedRowColor(c,d){for(var a=0;a<c.childNodes.length;a++){var b=c.childNodes[a].className;if(d)b="ms-pb-selected";else b="ms-pb";c.childNodes[a].className=b}}function setSelectedColor(a){for(i=0;i<selected.length;i++)setSelectedRowColor(selected[i],a)}function IsSearchResultRow(a){if(a==null||a.className=="ms-pickersearchsummarytr"||a.className=="ms-pickeremptyresulttexttr"||a.className=="ms-pickerresultheadertr")return false;return true}function tableKeyDown(c,d,a){if(c.rows.length<=1)return;if(!a)a=window.event;if(a.ctrlKey&&a.keyCode==65&&d==true){for(x=1;x<c.rows.length;x++)if(IsSearchResultRow(c.rows[x]))addSelection(c.rows[x],false,false);return false}if(a.keyCode==13){addSelected_Click();if(d==false&&selected.length>0&&self.doClickOK!=null&&typeof self.doClickOK=="function")window.setTimeout("doClickOK();",100)}if(a.keyCode==40||a.keyCode==38){var b=c.rows[1];if(a.keyCode==40)if(lastSelected!=null&&IsSearchResultRow(lastSelected.nextSibling))b=lastSelected.nextSibling;if(a.keyCode==38){if(lastSelected!=null&&IsSearchResultRow(lastSelected.previousSibling))b=lastSelected.previousSibling;if(b==c.rows[0])b=c.rows[1]}if(IsSearchResultRow(b)){if(d==true&&a.shiftKey)addSelection(b,false,true);else addSelection(b,true,true);if(b!=null)lastSelected=b;if(d==false)addSelected_Click();return false}}PickerDialogUpdateAddSelectionButton()}function addSelection(a,c,b){if(a==null)return;if(c==true){setSelectedColor(false);selected=new Array(0)}selected=selected.concat(new Array(a));setSelectedColor(true);if(b&&a.focus)a.focus();PickerDialogUpdateAddSelectionButton()}function autoPostBackEnabled(b){var a=b==null?null:b.attributes.getNamedItem("AutoPostBack");return a!=null&&a.value=="1"}function schedulePostBack(){window.setTimeout("__doPostBack('','')",0)}function saveOldEntities(b){var a=document.getElementById(b);if(a!=null&&autoPostBackEnabled(a))a.oldEntities=getEntityKeysFromElement(b)}function postbackIfEntitiesChanged(e){var d=document.getElementById(e);if(d==null)return false;var a=d.oldEntities;d.oldEntities=null;var c=getEntityKeysFromElement(e),b=false;if(autoPostBackEnabled(d))if(a==null&&c!=null||a!=null&&c==null||a.length!=c.length)b=true;else for(i=0;!b&&i<a.length;i++)if(a[i]!=c[i])b=true;if(b)schedulePostBack()}function getEntityKeysFromElement(g){var c=document.getElementById(g),d=[],f=0;for(x=0;c!=null&&x<c.childNodes.length;x++){var b=c.childNodes[x];if(b.attributes!=null){var e=b.attributes.getNamedItem("class");if(e!=null&&e.value=="ms-entity-resolved"){var a=b.children("divEntityData");if(a!=null&&a.getAttribute("key")!=null){d[f]=a.getAttribute("key");f++}}}}return d.sort()}function EntityEditor_SelectSingleNode(b,a){if(document.implementation&&document.implementation.createDocument){var c=b.getElementsByTagName(a);if(c.length>0)return c[0];return null}else return b.selectSingleNode(a)}function PickerDialogCallbackContext(){this.queryTextBoxElementId=null;this.resultTableId=null;this.errorElementId=null;this.htmlMessageElementId=null;this.queryButtonElementId=null}function PickerDialogSetFocusDelay(a,b){setTimeout("if (document.getElementById('"+a+"') !=null) { try {document.getElementById('"+a+"').focus(); } catch(e) {} }",b)}function PickerDialogHandleQueryResult(h,a){var b=ParseMultiColumnValue(h),g=parseInt(b[0]),i=document.getElementById(a.errorElementId);i.innerHTML=STSHtmlEncode(b[1]);var f=document.getElementById(a.htmlMessageElementId);f.innerHTML=b[2];var e=document.getElementById(a.queryButtonElementId);if(e!=null)SetControlDisabledStatus(e,false);var d=document.getElementById(a.resultTableId),c;if(nav4)c=d.parentNode;else c=d.parentElement;c.innerHTML=b[3];if(g>0)PickerDialogSetFocusDelay(a.resultTableId+"_row0_Link",200);else PickerDialogSetFocusDelay(a.queryTextBoxElementId,200)}function PickerDialogHandleQueryError(g,a){var h=document.getElementById(a.errorElementId);h.innerHTML=STSHtmlEncode(g);var f=document.getElementById(a.htmlMessageElementId);f.innerHTML="";var d=document.getElementById(a.queryButtonElementId);if(d!=null)SetControlDisabledStatus(d,false);var c=document.getElementById(a.resultTableId),b;if(nav4)b=c.parentNode;else b=c.parentElement;b.innerHTML="<table id='"+a.resultTableId+"' width='100%' height='100%'>  "+" <tr>                                                              "+"    <td>                                                           "+"    </td>                                                          "+" </tr>                                                             "+"</table>";var e=document.getElementById(a.queryTextBoxElementId);try{e.focus()}catch(i){}}function PickerDialogShowWait(b){var a=document.getElementById(b.errorElementId);if(a!=null)a.innerHTML="";a=document.getElementById(b.htmlMessageElementId);if(a!=null)a.innerHTML="";a=document.getElementById(b.queryButtonElementId);if(a!=null)SetControlDisabledStatus(a,true);var c=document.getElementById(b.resultTableId);if(c!=null){var d;if(nav4)d=c.parentNode;else d=c.parentElement;var e="Query in progress. Please wait...",f="Please wait while your query is processed.";d.innerHTML="<table id='"+b.resultTableId+"' class='ms-pickerwait'>"+" <tr>                                                              "+"    <td width='100%' height='100%' align='center' valign='middle'> "+"         <table width='100%'>                                      "+"            <tr>                                                   "+"                <td align='center' valign='middle'>                "+"                    <img alt='"+e+"' src='/_layouts/images/gears_an.gif' >"+"                </td>                                              "+"            </tr>                                                  "+"            <tr>                                                   "+"                <td align='center'>&nbsp;</td>                     "+"            </tr>                                                  "+"            <tr class='ms-pickerwaittexttr'>                         "+"                <td align='center' class='ms-descriptiontext'>     "+"                    "+f+"                </td>                                              "+"            </tr>                                                  "+"        </table>                                                   "+"    </td>                                                          "+" </tr>                                                             "+"</table>"}}function PickerResultsMultiSelectOnDblClick(c){var a=document.getElementById(g_EntityEditorResultTableId),d=c.getAttribute("entityXml"),b=a.getAttribute(g_EntityEditorResultTableAttrEditorId);EntityEditorCallback(d,b)}function PickerResultsSingleSelectOnClick(c){var a=document.getElementById(g_EntityEditorResultTableId),d=c.getAttribute("entityXml"),b=a.getAttribute(g_EntityEditorResultTableAttrEditorId);EntityEditorCallback(d,b)}function PickerResultsSingleSelectOnDblClick(c){var a=document.getElementById(g_EntityEditorResultTableId),d=c.getAttribute("entityXml"),b=a.getAttribute(g_EntityEditorResultTableAttrEditorId);EntityEditorCallback(d,b);if(self.doClickOK!=null&&typeof self.doClickOK=="function")doClickOK()}function PickerResultsMultiSelectOnNameClick(b){var a=b;while(a.tagName!="TR")a=a.parentNode;PickerResultsMultiSelectOnDblClick(a);return true}function PickerResultsSingleSelectOnNameClick(b){var a=b;while(a.tagName!="TR")a=a.parentNode;PickerResultsSingleSelectOnDblClick(a);return true}function PickerResultsNameOnFocus(b){var a=b;while(a.tagName!="TR")a=a.parentNode;addSelection(a,true,false);lastSelected=a}function PickerResultsNameOnKeyDown(b,a){if(a!=null&&a.keyCode==13)return false;return true}function MSOWebPartPage_GetLocalizedStrings(){var b="You are about to reset all personalized Web Parts to their shared values and delete any private Web Parts. Click OK to complete this operation. Click Cancel to keep your personalized Web Part settings and private Web Parts.",c="Resetting this Web Part will cause you to lose any changes you made.  Are you sure you want to do this? To reset this Web Part, click OK. To keep your changes, click Cancel.",p="Are you sure you want to remove the connection between the %0 Web Part and the %1 Web Part? To remove the connection, click OK. To keep the connection, click Cancel.",h="This Web Part Page has been personalized. As a result, one or more Web Part properties may contain confidential information. Make sure the properties contain information that is safe for others to read. After exporting this Web Part, view properties in the Web Part description file (.webpart or .dwp) by using a text editor, such as Microsoft Notepad.",k="Cannot retrieve properties at this time.",s="Changes have been made to the contents of one or more Web Parts on this page. To save the changes, press OK.  To discard the changes, press Cancel.",l="Widen",i="Narrow",j="Expand Toolpart: %0",f="Collapse Toolpart: %0",g="Web Part Background Color",n="Transparent Web Part Background Color",r="The URL is not valid for the %0 property. Check the URL spelling and path and try again.",o="The path to the folder is not valid for the %0 property. Check the path name and try again.",q="The path to the file or folder is not valid. Check the path and try again.",e="The current browser does not support links to files or folders. To specify a link to a file or folder, you must use Microsoft Internet Explorer 5.0 or later",v="Link",m="Transparent",d="Cannot save your changes.",t="Access Denied saving Web Part properties: either the Web Part is embedded directly in the page, or you do not have sufficient permissions to save properties.",u="Cannot create or modify the connection. One of the Web Parts does not have any data fields.",a={};a.ResetPagePersonalizationDialogText=b;a.ResetPartPersonalizationDialogText=c;a.RemoveConnection=p;a.ExportPersonalizationDialogText=h;a.GetPropertiesFailure=k;a.SaveDirtyPartsDialogText=s;a.ToolPaneWidenToolTip=l;a.ToolPaneShrinkToolTip=i;a.ToolPartExpandToolTip=j;a.ToolPartCollapseToolTip=f;a.WebPartBackgroundColor=g;a.TransparentTooltip=n;a.InvalidURLPath=r;a.InvalidFolderPath=o;a.InvalidFilePath=q;a.FileOrFolderUnsupported=e;a.Link=v;a.TransparentLiteral=m;a.ContentEditorSaveFailed=d;a.AccessDenied=t;a.NoInitArgs=u;return a}var MSOStrings=MSOWebPartPage_GetLocalizedStrings(),L_AccessibleMenu_Text="Menu";function FNEmpWz(a){return a&&a!=""}function AChld(b,a){if(b&&a)b.appendChild(a)}function AImg(a,c,b){if(!a)return;if(FNEmpWz(c))a.setAttribute("iconSrc",c);if(FNEmpWz(b))a.setAttribute("iconAltText",b);else a.setAttribute("iconAltText","")}function CMenu(b){var a=document.getElementById(b);if(a){a._initialized=false;a._oContents=null;a.innerHTML="";return a}a=document.createElement("MENU");if(!a)return null;if(b)a.id=b;a.className="ms-SrvMenuUI";AChld(document.body,a);return a}function CMItm(b){var a=document.createElement("SPAN");if(!a)return null;a.setAttribute("type",b);return a}function SetInnerText(a,b){if(document.createTextNode!=null){var c=document.createTextNode(b);a.innerHTML="";a.appendChild(c)}else a.innerText=b}function CMOpt(f,g,e,d,c,b){var a=CMItm("option");if(!a)return null;a.setAttribute("text",f);a.setAttribute("onMenuClick",g);if(b)a.setAttribute("description",b);AImg(a,e,d);if(FNEmpWz(c))a.setAttribute("sequence",c);return a}function CAMOpt(h,f,g,e,c,d,b){var a=CMOpt(f,g,e,c,d,b);if(!a)return null;AChld(h,a);return a}function CIMOpt(c,h,i,g,f,d){var a=CMOpt(h,i,g,f,d);if(!a)return null;for(var b=0;b<c.childNodes.length;b++){var e=c.childNodes[b].getAttribute("sequence");if(e)if(e>d){c.childNodes[b].parentNode.insertBefore(a,c.childNodes[b]);return a}}AChld(c,a);return a}function CMSep(){var a=CMItm("separator");SetInnerText(a,"");return a}function CAMSep(b){var a=CMSep();if(!a)return null;AChld(b,a);return a}function CSubM(f,e,d,c,b){var a=CMItm("submenu");if(!a)return null;a.setAttribute("text",f);if(b)a.setAttribute("description",b);AImg(a,e,d);if(FNEmpWz(c))a.setAttribute("sequence",c);return a}function CASubM(g,f,e,c,d,b){var a=CSubM(f,e,c,d,b);if(!a)return null;AChld(g,a);return a}function FRdy(a){if(!a)return false;if(a.readyState==null)return true;switch(a.readyState){case "loaded":case "interactive":case "complete":return true;default:return false}}function OMenu(a,e,c,d,b){if(typeof a=="string")a=document.getElementById(a);if(a)OMenuInt(a,e,c,d,b);return false}function OMenuInt(a,e,c,d,b){if(a&&!MenuHtc_isOpen(a))MenuHtc_show(a,e,c,d,b)}function OMenuEvnt(){var a=event.srcElement;if(a&&FRdy(document)&&FRdy(a)){var e=a.getAttribute("relativeTo"),c=a.getAttribute("forceRefresh"),d=a.getAttribute("flipTop"),b=a.getAttribute("yOffsetTop");if(e!=null)a.removeAttribute("relativeTo");if(c!=null)a.removeAttribute("forceRefresh");if(d!=null)a.removeAttribute("flipTop");if(b!=null)a.removeAttribute("yOffsetTop");a.onreadystatechange=null;OMenuInt(a,e,c,d,b)}}var kfnDisableEvent=new Function("return false"),g_menuHtc_lastMenu=null,g_uniqueNumber=0;function IsAccessibilityFeatureEnabledProxy(){if(typeof IsAccessibilityFeatureEnabled!="undefined")return IsAccessibilityFeatureEnabled();return false}function MenuHtc_show(oMaster,oParent,fForceRefresh,fFlipTop,yOffset){if(!(browseris.ie55up||browseris.nav6up||browseris.safari125up))return false;MenuHtc_hide();MenuHtc_init(oMaster);oMaster._oParent=oParent;oMaster._fIsRtL=IsElementRtl(oMaster._oParent);if((browseris.ie||browseris.nav)&&IsAccessibilityFeatureEnabledProxy()){var menu=null;if(oParent.foa!=null){menu=byid(oParent.foa);if(menu==null)menu=eval(oParent.foa)}if(menu!=null&&menu.onblur!=null)menu.onblur();RenderAccessibleMenu(oMaster,fForceRefresh);g_menuHtc_lastMenu=oMaster}else{SetBodyEventHandlers(null);AssureId(oParent);var result=ShowRoot(oMaster,oParent,fForceRefresh,fFlipTop,yOffset);g_menuHtc_lastMenu=oMaster;NavigateToMenu(oMaster);SetBodyEventHandlers(HandleDocumentBodyClick)}if(browseris.ie)if(window.event!=null)window.event.cancelBubble=true;return false}function MenuHtc_hide(){ClearTimeOutToHideMenu();var a=g_menuHtc_lastMenu;if(a!=null)if(a._accessibleMenu!=null)CloseAccessibleMenu(a);else HideMenu(a);g_menuHtc_lastMenu=null}function MenuHtc_isOpen(a){if(!a||!a._initialized)return false;var b=IsOpen(a);return b}function MenuHtc_item(a,c,b){MenuHtc_init(a);var d=GetItem(a,c,b);return d}function TrapMenuClick(a){if(a!=null)a.cancelBubble=true;return false}function SetBodyEventHandlers(a){document.body.onclick=a}function HandleDocumentBodyClick(){if(g_menuHtc_lastMenu!=null){var a=g_menuHtc_lastMenu;if(a!=null)HideMenu(a)}return false}function GetEventPopup(b){var a=GetEventSrcElement(b);while(a!=null){if(a.master!=null)return a;a=a.parentNode}return null}function GetUniqueNumber(){g_uniqueNumber++;return g_uniqueNumber}function MenuHtc_init(a){if(a._initialized)return;a._initialized=true;a._wzPrefixID="mp"+GetUniqueNumber();if(a.id==null)a.id=a._wzPrefixID+"_id";a._nLevel=0;a._arrPopup=[];a._arrSelected=[];if(typeof a._onDestroy=="undefined")a._onDestroy=null;a._fLargeIconMode=false;a._fCompactItemsWithoutIcons=false}function PrepContents(a){a._fLargeIconMode=a.getAttribute("largeIconMode")=="true";a._fCompactItemsWithoutIcons=a.getAttribute("CompactMode")=="true";if(!browseris.safari){a._oContents=document.createElement("span");a._oContents.style.display="none";a._oContents.innerHTML=a.innerHTML}else{a._oContents=a.cloneNode(true);a._oContents.style.display="none"}if(a._fLargeIconMode)if(a._fIsRtL)a._wzMenuStyle="ms-MenuUILargeRtL";else a._wzMenuStyle="ms-MenuUILarge";else if(a._fIsRtL)a._wzMenuStyle="ms-MenuUIRtL";else a._wzMenuStyle="ms-MenuUI";a._wzChkMrkPath="/_layouts/images/ChkMrk.gif";a._wzMArrPath="/_layouts/images/MArr.gif";a._wzMArrPathRtL="/_layouts/images/MArrRtL.gif"}function FixUpMenuStructure(h){var f=h._oRoot.childNodes,e=null,a=null;for(var c=0;c<f.length;c++){var b=f[c];if(b.nodeType!=1)continue;var d=false,i=b.style!=null&&b.style.display=="none",j=FIsIHidden(b);if(i||j)d=true;else if(FIsIType(b,"separator"))if(a!=null||c==0)d=true;else a=b;else{var g=b.getAttribute("menuGroupId");if(g!=e&&a==null&&c!=0){var a=document.createElement("ie:menuitem");a.setAttribute("type","separator");h._oRoot.insertBefore(a,b)}else if(FIsIType(b,"submenu")&&a!=null){b.parentNode.removeChild(a);a=null}else a=null;e=g}if(d){b.parentNode.removeChild(b);c--}}if(a!=null)a.parentNode.removeChild(a)}function IsElementRtl(a){while(a!=null&&a.tagName!=null){var b=a.getAttribute("dir");if((b==null||b=="")&&a.style!=null)b=a.style.direction;if(b=="rtl")return true;else if(b=="ltr")return false;a=a.parentNode}return false}function AdjustScrollPosition(c,d,b){var a=c;while(a!=null&&a!=d&&a!=c.offsetParent&&a.tagName!=null&&a.tagName.toLowerCase()!="body"&&a.tagName.toLowerCase()!="html"){if(a.scrollWidth>a.clientWidth&&a.offsetWidth>=a.clientWidth&&a.clientWidth!=0)if(!IsElementRtl(a)){if(a.scrollLeft>0)b.x-=a.scrollLeft}else b.x+=a.scrollWidth-a.offsetWidth-a.scrollLeft;if(a.scrollTop>0)b.y-=a.scrollTop;a=a.parentNode}}function MenuHtc_GetElementPosition(c,f){var b={};b.x=0;b.y=0;b.width=0;b.height=0;if(c.offsetParent){var a=c;while(a!=null&&a!=f){b.x+=a.offsetLeft;b.y+=a.offsetTop;AdjustScrollPosition(a,f,b);var e=a.tagName.toLowerCase();if(e!="table"&&e!="body"&&e!="html"&&e!="div"&&a.clientTop&&a.clientLeft){b.x+=a.clientLeft;b.y+=a.clientTop}if(browseris.ie&&e=="td"){if(a.runtimeStyle.borderTopStyle!="none"||a.currentStyle.borderTopStyle!="none"){var d;if(a.runtimeStyle.borderTopWidth!="")d=parseInt(a.runtimeStyle.borderTopWidth);else d=parseInt(a.currentStyle.borderTopWidth);if(!isNaN(d))b.y+=d}if(a.runtimeStyle.borderLeftStyle!="none"||a.currentStyle.borderLeftStyle!="none"){var d;if(a.runtimeStyle.borderLeftWidth!="")d=parseInt(a.runtimeStyle.borderLeftWidth);else d=parseInt(a.currentStyle.borderLeftWidth);if(!isNaN(d))b.x+=d}}a=a.offsetParent}}else if(c.left&&c.top){b.x=c.left;b.y=c.top}else{if(c.x)b.x=c.x;if(c.y)b.y=c.y}if(c.offsetWidth&&c.offsetHeight){b.width=c.offsetWidth;b.height=c.offsetHeight}else if(c.style&&c.style.pixelWidth&&c.style.pixelHeight){b.width=c.style.pixelWidth;b.height=c.style.pixelHeight}return b}function MenuHtcInternal_Show(b,c,r,i){var a=b._arrPopup[b._nLevel],h,g,e;if(!b._oContents)PrepContents(b);if(!b._oContents||IsOpen(b))return;if(!a&&!b._oRoot){b._nLevel=0;b._oRoot=b._oContents}g=b._nLevel==0;i=i&&g;if(!a){b._arrPopup[b._nLevel]=document.createElement("DIV");a=b._arrPopup[b._nLevel];a.isMenu=true;a.master=b;a.level=b._nLevel;e=document.createElement("DIV");var f=document.createElement("table"),m=document.createElement("tbody");e.isInner=true;a.style.position="absolute";e.style.overflow="visible";f.appendChild(m);e.appendChild(f);a.appendChild(e);if(b._fIsRtL)a.setAttribute("dir","rtl");else a.setAttribute("dir","ltr");document.body.appendChild(a);FixUpMenuStructure(b);var p=0,q=b._oRoot.childNodes.length;for(h=0;h<q;h++){var j=b._oRoot.childNodes[h];if(j.nodeType!=1)continue;if(!FIsIType(j,"label")){var n=CreateMenuItem(b,j,MakeID(b,b._nLevel,p));if(n)m.appendChild(n);p++}}a.className="ms-MenuUIPopupBody";f.className=b._wzMenuStyle;f.cellSpacing=0;f.cellPadding=0;a.oncontextmenu=kfnDisableEvent;a.ondragstart=kfnDisableEvent;a.onselectstart=kfnDisableEvent;if(c._onmouseover==null)c._onmouseover=c.onmouseover;if(c._onmouseout==null)c._onmouseout=c.onmouseout;if(c._onmousedown==null)c._onmousedown=c.onmousedown;if(c._onclick==null)c._onclick=c.onclick;if(browseris.nav){a.onkeypress=function(){return false};a.onkeyup=function(){return false};a.onkeydown=function(a){PopupKeyDown(a);return false};a.onmousedown=function(a){TrapMenuClick(a);return false};a.onmouseover=function(a){PopupMouseOver(a);return false};a.onmouseout=function(a){PopupMouseLeave(a);return false};a.onclick=function(a){PopupMouseClick(a);TrapMenuClick(a);return false};c.onmouseover=function(a){PopupMouseOverParent(a);return false};c.onmouseout=function(a){PopupMouseLeaveParent(a);return false};c.onmousedown=function(a){TrapMenuClick(a);return false};c.onclick=function(a){TrapMenuClick(a);return false};c.oncontextmenu=function(a){TrapMenuClick(a);return false}}else{a.onkeydown=new Function("PopupKeyDown(event); return false;");a.onmousedown=new Function("TrapMenuClick(event); return false;");a.onmouseover=new Function("PopupMouseOver(event); return false;");a.onmouseout=new Function("PopupMouseLeave(event); return false;");a.onclick=new Function("PopupMouseClick(event); TrapMenuClick(event); return false;");c.onmouseover=new Function("PopupMouseOverParent(event); return false;");c.onmouseout=new Function("PopupMouseLeaveParent(event); return false;");c.onmousedown=new Function("TrapMenuClick(event); return false;");c.onclick=new Function("TrapMenuClick(event); return false;");c.oncontextmenu=new Function("TrapMenuClick(event); return false;")}if(g){var l=b.getAttribute("onunloadtext");if(l)a.onunload=new Function(l)}}else{var o=b._arrSelected[b._nLevel];if(o)UnselectItem(o)}b._arrSelected[b._nLevel]=null;var d;if(browseris.ie){var k=document.body.scrollLeft;d=document.createElement("iframe");AssureId(d);d.src="/_layouts/blank.htm";d.style.position="absolute";d.style.display="none";d.scrolling="no";d.frameBorder="0";document.body.appendChild(d);a.style.zIndex=103;a._backgroundFrameId=d.id;if(k!=document.body.scrollLeft)document.body.scrollLeft=k}SetMenuPosition(b,c,a,e,i,g);if(browseris.ie){SetBackFrameSize(null,a);a.onresize=new Function("SetBackFrameSize(event, null);");d.style.display="block";d.style.zIndex=101}}function SetMenuPosition(F,H,b,e,E,C){var f=window.screen.width,g=window.screen.height;if(browseris.nav){f=document.body.clientWidth;g=document.body.clientHeight}else if(self.innerHeight){f=self.innerWidth;g=self.innerHeight}else if(document.documentElement&&document.documentElement.clientHeight){f=document.documentElement.clientWidth;g=document.documentElement.clientHeight}else if(document.body){f=document.body.clientWidth;g=document.body.clientHeight}var a=b.scrollWidth+b.offsetWidth-b.clientWidth,c=b.scrollHeight+b.offsetHeight-b.clientHeight,B=false,t=false;if(a>f-50){B=true;a=f-50}if(F._fCompactItemsWithoutIcons&&c>=375){t=true;c=375}if(c>=g-50){t=true;c=g-50}if(!B&&!t)e.style.overflow="visible";else if(browseris.ie){if(B){b.style.width=a+"px";e.style.width=a+"px";e.style.overflowX="scroll"}else{e.style.width=a+"px";e.style.overflowX="visible"}if(t){b.style.height=c+"px";e.style.height=c+"px";e.style.overflowY="scroll"}else{e.style.height=c+"px";e.style.overflowY="visible"}}else{b.style.height=c+"px";e.style.height=c+"px";b.style.width=a+"px";e.style.width=a+"px";e.style.overflow="auto"}a=b.scrollWidth+b.offsetWidth-b.clientWidth;c=b.scrollHeight+b.offsetHeight-b.clientHeight;var v=0,u=f,d=0,K=0,n=0,o=H;if(browseris.safari)if(o.tagName=="TR"&&o.childNodes.length>0)o=o.childNodes[0];var p=MenuHtc_GetElementPosition(o);d=p.x;n=p.y;var i;if(C){i=p.width;n+=p.height;n-=1}else i=p.width+1;var G=!E&&!document.body.getAttribute("flipped"),s,A,w,x;if(!F._fIsRtL){var q,l;if(C){w=d;q=d+a;l=d+i-a}else{w=d+i;q=d+i+a;l=d-a}x=l;s=q>u&&l>v;A=!(l<v&&q<u)}else{var k,r;if(C){k=d+i-a;r=d+a;x=d}else{k=d-a;r=d+i+a;x=d+i}w=k;s=k<v&&r<u;A=!(r>u&&k>v)}var D=G?s:A,y=D?x:w,h,j;if(browseris.nav){h=window.pageXOffset;j=window.pageYOffset}else{var m=document.body.parentElement;if(!IsElementRtl(document.body)){h=document.body.scrollLeft;h+=m.scrollLeft}else{h=-document.body.scrollWidth+document.body.offsetWidth+document.body.scrollLeft;h+=-m.scrollWidth+m.offsetWidth+m.scrollLeft}j=document.body.scrollTop;j+=m.scrollTop}if(a>=f)y=h;else if(y-h+a>=f)y=h+f-a;var z;if(c>=g)z=j;else if(n+c-j>=g)z=j+g-c;else z=n;b.setAttribute("flipped",E?D&&s:D);var I=Math.max(y,h),J=Math.max(z,j);b.style.left=I+"px";b.style.top=J+"px"}function SetBackFrameSize(e,a){if(a==null)a=GetEventSrcElement(e);var d=a.scrollWidth+a.offsetWidth-a.clientWidth,c=a.scrollHeight+a.offsetHeight-a.clientHeight,b=document.getElementById(a._backgroundFrameId);b.style.left=a.offsetLeft+"px";b.style.top=a.offsetTop+"px";b.style.width=d+"px";b.style.height=c+"px"}function HideMenu(a,b){ClearTimeOutToHideMenu();if(b==null)b=0;if(b==2){if(a._onDestroy!=null){a._onDestroy();a._onDestroy=null}return}if(IsOpen(a)&&!IsAccessibilityFeatureEnabledProxy()){if(a._oParent!=null){a._oParent.onclick=a._oParent._onclick;a._oParent.onmouseover=a._oParent._onmouseover;a._oParent.onmouseout=a._oParent._onmouseout;a._oParent.onmousedown=a._oParent._onmousedown}SetBodyEventHandlers(null);UpdateLevel(a,0);var c=a._arrPopup[0];if(c!=null){var d=document.getElementById(c._backgroundFrameId);if(d!=null)d.parentNode.removeChild(d);c.parentNode.removeChild(c);a._arrPopup[0]=null;if(b==0)if(a._onDestroy!=null){a._onDestroy();a._onDestroy=null}}g_menuHtc_lastMenu=null}}function IsOpen(a){if(a._accessibleMenu&&!a._accessibleMenu.closed)return true;if(!a._arrPopup)return false;var b=a._arrPopup[a._nLevel];return b}function FindLabel(d){var a=d?d.childNodes:null;if(a)for(var b=0;b<a.length;b++){var c=a[b];if(c.nodeType!=1)continue;if(FIsIType(c,"label"))return c}return null}function ShowRoot(a,b,f,d,e){UpdateLevel(a,0);if(f){a._oContents=null;a._oRoot=null;a._nLevel=0;a._arrPopup=[];a._arrSelected=[]}else a._oRoot=a._oContents;var c=0;if(b)c+=b.offsetHeight;if(browseris.safari)if(b.tagName=="TR"&&b.childNodes.length>0)c+=b.childNodes[0].offsetTop+b.childNodes[0].offsetHeight-b.offsetTop;if(e)c+=e;d=d!=false;MenuHtcInternal_Show(a,b,c,d)}function ShowSubMenu(a,c,b){if(!b)return;if(b.submenuRoot==null)return;UpdateLevel(a,c);a._oRoot=b.submenuRoot;a._nLevel=a._nLevel+1;MenuHtcInternal_Show(a,b,-1)}function ShowSubMenuEvnt(c){var a=document.getElementById(c),b=a._arrPopup[a._nLevel];if(b){b.removeAttribute("timeoutID");ShowSubMenu(a,a._nLevel,a._arrSelected[a._nLevel])}}function SetShowSubMenuEvnt(a){var b=a._arrPopup[a._nLevel];if(b){ClearTimeOut("timeoutID");document.body.setAttribute("timeoutID",window.setTimeout(new Function("ShowSubMenuEvnt('"+a.id+"');"),100))}}function ClearTimeOut(a){var b=document.body.getAttribute(a);if(b!=null)window.clearTimeout(b);document.body.removeAttribute(a)}function ClearShowSubMenuEvnt(){ClearTimeOut("timeoutID")}function GetEventSrcItem(b,c){for(var a=c;a&&!FIStringEquals(a.tagName,"BODY");a=a.parentNode)if(FIStringEquals(a.tagName,"TR")&&a.id.substring(0,b._wzPrefixID.length)==b._wzPrefixID)return a;return null}function UpdateLevel(a,d){var b;while(a._nLevel>d){b=a._arrPopup[a._nLevel];if(b){ClearShowSubMenuEvnt(b);var c=document.getElementById(b._backgroundFrameId);if(c!=null)c.parentNode.removeChild(c);b.parentNode.removeChild(b)}a._arrPopup[a._nLevel]=null;a._arrSelected[a._nLevel]=null;a._oRoot=a._oRoot.parentNode;a._nLevel--}b=a._arrPopup[a._nLevel];if(b)ClearShowSubMenuEvnt(b)}function PopupMouseOver(e){var d=GetEventPopup(e);if(d!=null){var a=d.master,c=d.level;if(c<0)return;var b=GetEventSrcItem(a,GetEventSrcElement(e));if(b)if(b!=a._arrSelected[c]){if(FIsIType(b,"separator"))return;ToggleMenuItem(a,c,b);if(FIsIType(b,"submenu"))EngageSelection(a,true,true,false)}else if(c<a._nLevel)UnselectCurrentOption(a);ClearTimeOutToHideMenu()}}function PopupMouseLeave(b){var a;a=GetEventPopup(b);if(a!=null){UnselectCurrentOption(a.master);SetTimeOutToHideMenu()}return false}function PopupMouseOverParent(){if(g_menuHtc_lastMenu!=null){ClearTimeOutToHideMenu();if(g_menuHtc_lastMenu._oParent!=null&&g_menuHtc_lastMenu._oParent._onmouseover!=null)g_menuHtc_lastMenu._oParent._onmouseover()}}function PopupMouseLeaveParent(){if(g_menuHtc_lastMenu!=null){if(g_menuHtc_lastMenu._oParent!=null&&g_menuHtc_lastMenu._oParent._onmouseout!=null)g_menuHtc_lastMenu._oParent._onmouseout();SetTimeOutToHideMenu()}}function ClearTimeOutToHideMenu(){if(document.body.getAttribute("HideMenuTimeOut")!=null)ClearTimeOut("HideMenuTimeOut")}function SetTimeOutToHideMenu(){ClearTimeOut("HideMenuTimeOut");document.body.setAttribute("HideMenuTimeOut",window.setTimeout(MenuHtc_hide,1500))}function PopupMouseClick(d){var c=GetEventPopup(d),a=c.master,b=c.level;if(b<0)return;var e=a._arrSelected[b];UpdateLevel(a,b);EngageSelection(a,true,false,false)}function PopupKeyDown(c){var d=GetEventPopup(c),b=d.master,f=d.level;if(f<0)return;var a=GetEventKeyCode(c),e=c.shiftKey;if(b._fIsRtL)if(a==37)a=39;else if(a==39)a=37;if(a==9)a=!e?40:38;ClearShowSubMenuEvnt(d);switch(a){case 38:MoveMenuSelection(b,-1);break;case 40:MoveMenuSelection(b,1);break;case 37:case 27:CloseCurrentLevel(b,a==27);break;case 39:case 13:EngageSelection(b,a==13,false,true)}c.returnValue=false}function SetNewId(a){a.id="msomenuid"+GetUniqueNumber();return a.id}function AssureId(a){if(a.id==null||a.id=="")a.id="msomenuid"+GetUniqueNumber();return a.id}function NavigateToMenu(b){var c=b._arrPopup[b._nLevel].firstChild;AssureId(c);try{var a=c.firstChild.firstChild.firstChild;a.tabIndex=0;if(a.setActive!=null)a.setActive();else if(a.focus!=null)a.focus()}catch(d){}}function ExecuteOnClick(fnOnClick){try{if(browseris.safari)if(FIStringEquals(typeof fnOnClick,"string"))eval("var document=window.document; {"+fnOnClick+"}");else fnOnClick();else{if(FIStringEquals(typeof fnOnClick,"string"))fnOnClick=new Function("var document=window.document; {"+fnOnClick+"}");var oTemp=window.document.body.appendChild(window.document.createElement("span"));oTemp.onclick=fnOnClick;oTemp.onclick();oTemp.parentNode.removeChild(oTemp)}}catch(a){}}function EngageSelection(a,e,d,g){var b=a._arrSelected[a._nLevel];if(!b||b.optionDisabled)return;if(FIsIType(b,"submenu"))if(d)SetShowSubMenuEvnt(a);else{ShowSubMenu(a,a._nLevel,b);if(g)MoveMenuSelection(a,1)}else if(e){var f=b.getAttribute("enabled");if(f!="false"){var c=b.getAttribute("onMenuClick");if(c){HideMenu(a,1);ExecuteOnClick(c);HideMenu(a,2)}}}}function CloseCurrentLevel(oMaster,fAllowHideRoot){if(oMaster._nLevel>0){UpdateLevel(oMaster,oMaster._nLevel-1);var obj=oMaster._arrSelected[oMaster._nLevel];if(obj!=null)if(browseris.nav){obj=obj.firstChild.firstChild.firstChild.firstChild.firstChild.nextSibling.firstChild.firstChild;if(obj.focus!=null)obj.focus()}else if(obj.focus!=null)obj.focus()}else if(fAllowHideRoot){HideMenu(oMaster);var oParent=oMaster._oParent;while(oParent!=null&&oParent.tagName=="SPAN"&&oParent.getAttribute("contentEditable")!=null)oParent=oParent.parentElement;if(oParent!=null){var focusElement=oParent;if(oParent.foa!=null){var foa=null;foa=eval(oParent.foa);if(foa==null)foa=byid(oParent.foa);if(foa!=null)focusElement=foa}if(focusElement.setActive!=null)focusElement.setActive();else if(focusElement.focus!=null)focusElement.focus()}}}function UnselectCurrentOption(a){if(a._nLevel>=0){var b=a._arrSelected[a._nLevel];if(FIsIType(b,"option")){UnselectItem(b);a._arrSelected[a._nLevel]=null}}}function MakeID(a,c,b){return a._wzPrefixID+"_"+c+"_"+b}function GetItem(a,b,c){var d=a._arrPopup[b];return d?document.getElementById(MakeID(a,b,c)):null}function MoveMenuSelection(b,g){var a=-1,d=b._oRoot.childNodes.length,f=b._arrSelected[b._nLevel];if(f){var e=f?f.id:null;if(e){var i=parseInt(e.substring(e.lastIndexOf("_")+1,e.length));a=(i+d+g)%d}}if(a<0)a=g>0?0:d-1;var c,h=a;do{c=GetItem(b,b._nLevel,a);a=(a+d+g)%d}while(a!=h&&(!c||c.style.display=="none"||!(FIsIType(c,"option")||FIsIType(c,"submenu"))));ToggleMenuItem(b,b._nLevel,c)}function ToggleMenuItem(e,f,a){var b=e._arrSelected[f];if(!a||b&&a.id==b.id)return;if(b){UnselectItem(b);b.onkeydown=null;b.onmousedown=null;b.onmouseover=null;b.onmouseout=null;b.oncontextmenu=null}UpdateLevel(e,f);SelectItem(a);e._arrSelected[f]=a;a.tabIndex=0;if(a.setActive!=null)a.setActive();else if(a.focus!=null)a.focus();var g=e._arrPopup[f],c=g.childNodes[0],d=MenuHtc_GetElementPosition(a,c);if(d.y+d.height-c.scrollTop>c.offsetHeight)c.scrollTop=d.y+d.height-c.offsetHeight;else if(d.y<c.scrollTop)c.scrollTop=d.y}function SelectItem(b){if(!b)return;var a=b.firstChild,c=a.firstChild;if(a.className=="ms-MenuUIItemTableCellCompact")a.className="ms-MenuUIItemTableCellCompactHover";else a.className="ms-MenuUIItemTableCellHover";c.className="ms-MenuUIItemTableHover"}function UnselectItem(b){if(!b)return;var a=b.firstChild,c=a.firstChild;if(a.className=="ms-MenuUIItemTableCellCompactHover")a.className="ms-MenuUIItemTableCellCompact";else a.className="ms-MenuUIItemTableCell";c.className="ms-MenuUIItemTable"}function SetImageSize(c,b,a){if(a==null)if(c._fLargeIconMode)a=32;else a=16;b.width=a;b.height=a}function CreateMenuOption(b,i,c,w,p){var f=document.createElement("td"),d=document.createElement("td"),l=document.createElement("td"),o=document.createElement("td");i.appendChild(f);i.appendChild(d);i.appendChild(l);i.appendChild(o);if(b._fLargeIconMode)f.className=!b._fIsRtL?"ms-MenuUIIconLarge":"ms-MenuUIIconRtlLarge";else f.className=!b._fIsRtL?"ms-MenuUIIcon":"ms-MenuUIIconRtL";f.align="center";if(b._fCompactItemsWithoutIcons&&!c.getAttribute("iconSrc"))d.className=!b._fIsRtL?"ms-MenuUILabelCompact":"ms-MenuUILabelCompactRtl";else d.className=!b._fIsRtL?"ms-MenuUILabel":"ms-MenuUILabelRtL";l.className="ms-MenuUIAccessKey";o.className="ms-MenuUISubmenuArrow";if(!b._fLargeIconMode)d.noWrap=true;f.noWrap=true;l.noWrap=true;o.noWrap=true;d.id=c.id;if(!p)p=c.innerHTML;if(c.getAttribute("enabled")=="false"){i.disabled=true;d.className+=" ms-MenuUIItemTableCellDisabled"}var j=null,n=null;if(c.getAttribute("checked")=="true"){j=b._wzChkMrkPath;n="*"}else{j=EvalAttributeValue(c,"iconSrc","iconScript");n=c.getAttribute("iconAltText")}var x=p,q=EvalAttributeValue(c,"text","textScript"),r=EvalAttributeValue(c,"description","descriptionScript"),e=document.createElement("div");if(r!=null&&b._fLargeIconMode){var v=document.createElement("B"),g=document.createElement("SPAN"),s=document.createTextNode(q),z=document.createElement("BR"),m=document.createElement("SPAN"),y=document.createTextNode(r);g.setAttribute("style","white-space: nowrap;");m.className="ms-menuitemdescription";e.appendChild(v);v.appendChild(g);g.appendChild(s);e.appendChild(z);e.appendChild(m);m.appendChild(y)}else if(q!=null){var g=document.createElement("SPAN"),s=document.createTextNode(q);g.setAttribute("style","white-space: nowrap;");e.appendChild(g);g.appendChild(s)}var t=document.createElement("SPAN");t.innerHTML=x;e.appendChild(t);if(j){var a=document.createElement("IMG");SetImageSize(b,a);var h=document.createElement("LABEL");f.appendChild(a);d.appendChild(h);var k=w+"_"+"ICON";a.id=k;a.src=j;if(n){a.alt="";a.title=""}h.htmlFor=k;h.appendChild(e)}else if(browseris.nav||b._fLargeIconMode){var a=document.createElement("IMG");SetImageSize(b,a);var h=document.createElement("LABEL");f.appendChild(a);d.appendChild(h);var k=w+"_"+"ICON";a.id=k;a.src="/_layouts/images/blank.gif";a.alt="";a.title="";h.htmlFor=k;h.appendChild(e);if(b._fLargeIconMode){a.width=32;a.height=16}else a.width=16}else{f.innerHTML="&nbsp;";d.appendChild(e)}var u=c.getAttribute("accessKeyText");if(u)l.innerHTML=u;SetIType(i,"option")}function CreateMenuSeparator(b,d){var c=document.createElement("td"),a=document.createElement("div");d.appendChild(c);c.appendChild(a);if(b._fLargeIconMode)a.className=!b._fIsRtL?"ms-MenuUISeparatorLarge":"ms-MenuUISeparatorLargeRtl";else a.className=!b._fIsRtL?"ms-MenuUISeparator":"ms-MenuUISeparatorRtL";a.innerHTML="&nbsp;";SetIType(d,"separator")}function CreateSubmenu(a,c,d,g){var e=FindLabel(d);CreateMenuOption(a,c,d,g,e?e.innerHTML:null);var f=c.childNodes[3],b=document.createElement("IMG");SetImageSize(a,b,16);f.appendChild(b);b.src=!a._fIsRtL?a._wzMArrPath:a._wzMArrPathRtL;b.alt=!a._fIsRtL?">":"<";b.title="";SetIType(c,"submenu");c.submenuRoot=d}function MergeAttributes(c,b){if(browseris.nav||c.mergeAttributes==null){var e=b.attributes;for(var d=0;d<e.length;d++){var a=e[d];if(a!=null&&a.specified&&a.nodeName!="id"&&a.nodeName!="ID"&&a.nodeName!="name")c.setAttribute(a.nodeName,a.nodeValue)}if(b.getAttribute("type")!=null)c.setAttribute("type",b.getAttribute("type"));if(b.submenuRoot!=null)c.submenuRoot=b.submenuRoot}else c.mergeAttributes(b)}function CreateMenuItem(f,b,h,j){if(FIsIType(b,"label"))return;var a=document.createElement("tr");MergeAttributes(a,b);a.setAttribute("onMenuClick",b.getAttribute("onMenuClick"));if(FIsIType(b,"separator")){CreateMenuSeparator(f,a);return a}if(!GetIType(b))SetIType(b,"option");var c=document.createElement("tr"),e=document.createElement("td"),d=document.createElement("table"),i=document.createElement("tbody");c.appendChild(e);e.appendChild(d);d.appendChild(i);i.appendChild(a);if(f._fCompactItemsWithoutIcons&&!b.getAttribute("iconSrc"))e.className="ms-MenuUIItemTableCellCompact";else e.className="ms-MenuUIItemTableCell";d.className="ms-MenuUIItemTable";d.width="100%";d.cellSpacing=0;d.cellPadding=0;if(FIsIType(b,"submenu"))CreateSubmenu(f,a,b,h);else if(FIsIType(b,"option"))CreateMenuOption(f,a,b,h,j);if(a.disabled||a.getAttribute("enabled")=="false"){a.disabled=false;a.className="ms-MenuUIDisabled";a.disabled=false;for(var g=0;g<a.childNodes.length;g++){if(a.childNodes[g].nodeType!=1)continue;a.childNodes[g].disabled=true;e.className+=" ms-MenuUIItemTableCellDisabled"}a.optionDisabled=true}MergeAttributes(c,a);if(a.optionDisabled!=null)c.optionDisabled=a.optionDisabled;c.id=h;SetIType(c,GetIType(a));return c}function GetItems(a){if(!a._oContents)PrepContents(a);return a._oContents.childNodes}function GetIType(a){return a?a.getAttribute("type"):null}function FIsIType(b,a){return FIStringEquals(GetIType(b),a)}function SetIType(a,b){if(a)a.setAttribute("type",b)}function FIStringEquals(a,b){return a!=null&&b!=null&&a.toLowerCase()==b.toLowerCase()}function RenderAccessibleMenu(a,c){if(c){a._oContents=null;a._oRoot=null;a._nLevel=0;a._arrPopup=[];a._arrSelected=[]}else a._oRoot=a._oContents;if(!a._oContents)PrepContents(a);if(!a._oContents)return;if(!a._oRoot){a._nLevel=0;a._oRoot=a._oContents}FixUpMenuStructure(a);var d=a._fIsRtL?"rtl":"ltr";g_menuHtc_html="<html dir='"+d+"'><head><title>"+L_AccessibleMenu_Text+"</title></head><body><ul id='root'>";RenderMenuLevel(a,a._oRoot,true);g_menuHtc_html=g_menuHtc_html+"</ul></body></html>";var b=window.open("/_layouts/blank.htm","_blank","status=no,toolbar=no,menubar=no,location=no");a._accessibleMenu=b;b.document.write(g_menuHtc_html);b.document.close();b.focus()}function CloseAccessibleMenu(a,b){if(b==null)b=0;if(a!=null){if(b==0||b==1)if(a._accessibleMenu!=null){a._accessibleMenu.close();a._accessibleMenu=null}if(b==0||b==2)if(a._onDestroy!=null){a._onDestroy();a._onDestroy=null}}}function GetMenuItemText(d,b,a){if(a==""){a=EvalAttributeValue(b,"text","textScript");var c=EvalAttributeValue(b,"description","descriptionScript");if(c!=null&&c!=""&&d._fLargeIconMode){if(a!="")a=a+": ";a=a+c}}if(b.getAttribute("checked")=="true")a="* "+a;if(b.title!=null&&b.title!="")a=a+": "+b.title;return a}function GetMenuItemEnabled(a,b){if(!b)return false;if(a.getAttribute("enabled")=="false")return false;if(a.getAttribute("disabled")!=null&&a.getAttribute("disabled")!="")return false;return true}var g_menuHtc_html;function RenderMenuLevel(c,h,g){for(var d=0;d<h.childNodes.length;d++){var a=h.childNodes[d];if(a.nodeType!=1)continue;if(a.style.display=="none")continue;if(FIsIType(a,"option")){var f=GetMenuItemText(c,a,a.innerHTML);if(!GetMenuItemEnabled(a,g))g_menuHtc_html=g_menuHtc_html+'<li><span id="'+a.id+'">'+f+"</span></li>";else g_menuHtc_html=g_menuHtc_html+'<li><a href="#" id="'+a.id+'" '+"onMenuClick"+'="'+a.getAttribute("onMenuClick")+'" onclick="'+"javascript:opener.ExecuteOnAccessibleClick(this.getAttribute('"+"onMenuClick"+"')); return false;"+'">'+f+"</a></li>"}else if(FIsIType(a,"submenu")){var f=GetMenuItemText(c,a,"");g_menuHtc_html=g_menuHtc_html+'<li><span id="'+a.id+'">'+f;for(var e=0;e<a.childNodes.length;e++){var b=a.childNodes[e];if(b.nodeType!=1)continue;if(b.style.display=="none")continue;if(FIsIType(b,"label")){g_menuHtc_html=g_menuHtc_html+" "+b.innerHTML;break}}g_menuHtc_html=g_menuHtc_html+"</span><ul>";RenderMenuLevel(c,a,GetMenuItemEnabled(a,g));g_menuHtc_html=g_menuHtc_html+"</ul></li>"}}}function ExecuteOnAccessibleClick(b){var a=g_menuHtc_lastMenu;if(a!=null){CloseAccessibleMenu(a,1);window.focus();ExecuteOnClick(b);CloseAccessibleMenu(a,2)}}function FIsIHidden(oItem){if(oItem){var hiddenFunc=oItem.getAttribute("hidden");if(!hiddenFunc)return false;return eval(hiddenFunc)}else return false}function EvalAttributeValue(oNode,sAttribute1,sAttribute2){var result=oNode.getAttribute(sAttribute2);if(result!=null&&result.toLowerCase().indexOf("javascript:")==0){result=eval(result.substring(11));if(result!=null&&result!="")return result}var result=oNode.getAttribute(sAttribute1);if(result==null)return "";return result}var flyoutsAllowed=false;function enableFlyoutsAfterDelay(){setTimeout("flyoutsAllowed=true;",25)}function overrideMenu_HoverStatic(b){if(!flyoutsAllowed)setTimeout(delayMenu_HoverStatic(b),50);else{var c=Menu_HoverRoot(b),a=Menu_GetData(b);if(!a)return;__disappearAfter=a.disappearAfter;Menu_Expand(c,a.horizontalOffset,a.verticalOffset)}}function delayMenu_HoverStatic(a){return function(){overrideMenu_HoverStatic(a)}}var MMU_chDelim=",",MMU_chDelimEnc="%2c",MMU_postbackPrefix="javascript:__doPostBack(",MMU_chDelim2="%",MMU_chDelim2Enc="%25";function MHash_New(){var a={};a._keys=[];a._values=[];return a}function MHash_Add(a,c,b){a._keys.push(c);a._values.push(b)}function MHash_Count(a){return a._keys.length}function MHash_Keys(a){return a._keys}function MHash_Values(a){return a._values}function MHash_Exists(b,c){for(var a=0;a<b._keys.length;a++)if(b._keys[a]==c)return true;return false}function MHash_Item(b,c){for(var a=0;a<b._keys.length;a++)if(b._keys[a]==c)return b._values[a];return null}var MMU_reDelimEnc=new RegExp(MMU_chDelimEnc,"g"),MMU_reDelim2Enc=new RegExp(MMU_chDelim2Enc,"g"),MMU_reDelimDec=new RegExp(MMU_chDelim,"g"),MMU_reDelim2Dec=new RegExp(MMU_chDelim2,"g");function MMU_EncVal(a){return a.replace(MMU_reDelimDec,MMU_chDelimEnc).replace(MMU_reDelim2Dec,MMU_chDelim2Enc)}function MMU_DecVal(a){return a.replace(MMU_reDelim2Enc,MMU_chDelim2).replace(MMU_reDelimEnc,MMU_chDelim)}function MMU_ParseNV(h){var g=MHash_New(),d=h.split(MMU_chDelim);if(d!=null){var c;for(c=0;c<d.length;c++){var a=d[c],b=a.indexOf("=");if(b==0)continue;var f=null,e=null;if(b<0)f=a;else{f=a.substr(0,b);if(b<a.length-1)e=MMU_DecVal(a.substr(b+1));else e=""}MHash_Add(g,f,e)}}return g}function MMU_ParseNVAttr(a,c){var b=a.getAttribute(c);if(b==null&&a.childNodes.length>0&&a.childNodes[0].nodeType==1)b=a.childNodes[0].getAttribute(c);if(b==null)return MHash_New();return MMU_ParseNV(b)}function MMU_ResetMenuState(f,h,i,g,b){var d;for(d=0;d<f.childNodes.length;d++){var a=f.childNodes[d];if(a.nodeType!=1)continue;var c=a.getAttribute("id");if(a!=null&&c!=null&&c.length>0){if(a.childNodes.length>0){MMU_ResetMenuState(a,h,i,g,b);continue}if(MHash_Exists(i,c))a.style.display="none";else{a.style.display="";var e=a.getAttribute("enabledOverride");if(e!=null&&e.length>0)a.setAttribute("enabled",e);else if(MHash_Exists(h,c))a.setAttribute("enabled","false");else{a.setAttribute("enabled","true");if(MHash_Exists(g,c))a.setAttribute("checked","true");else a.setAttribute("checked","false")}}MMU_ReplTokValAttr(a,"onMenuClick",b);MMU_ReplTokValAttr(a,"text",b);MMU_ReplTokValAttr(a,"description",b);MMU_ReplTokValVal(a,b)}}}function MMU_ReplTokValAttr(c,b,f){var a=c.getAttribute(b),d=c.getAttribute(b+"_Original");if(a!=null&&d==null&&MHash_Count(f)>0)c.setAttribute(b+"_Original",a);else if(a!=null&&d!=null&&a!=d)a=d;if(a==null||a.length<=0)return;var e=MMU_ReplTokVal(a,f);if(e!=a)c.setAttribute(b,e)}function MMU_ReplTokValVal(c,e){if(c.nextSibling==null)return;var a=c.nextSibling.nodeValue,b=c.getAttribute("valOrig");if(a!=null&&b==null&&MHash_Count(e)>0){b=a;c.setAttribute("valOrig",b)}else if(a!=null&&b!=null&&a!=b)a=b;var d=MMU_ReplTokVal(a,e);if(a!=null&&d!=null&&d!=a)c.nextSibling.nodeValue=d}function MMU_ReplTokVal(a,c){if(a!=null&&a.indexOf("%")>=0&&c!=null&&MHash_Count(c)>0){var d=MHash_Keys(c),e=MHash_Values(c),b;for(b=0;b<d.length;b++){var f=d[b],g=e[b];a=a.replace("%"+f+"%",g)}}return a}var g_MMU_HighlightedEcbTable=null,g_MMU_HighlightedEcbTableOpen=null,g_MMU_OpenTimeoutHandle=null;function MMU_Open(menu,ecbLink,e,fAlignRight,alignId,delay){try{if(menu==null||ecbLink==null)return;if(ecbLink.getAttribute("suppressBubbleIfPostback")!=null&&e!=null&&e.srcElement!=null&&e.srcElement.href!=null&&e.srcElement.href.substr(0,MMU_postbackPrefix.length)==MMU_postbackPrefix){event.cancelBubble=true;return}ClearHighlightedEcbTableOpen();if(fAlignRight==null)fAlignRight=true;MMU_ResetMenuState(menu,MMU_ParseNVAttr(ecbLink,"menuItemsDisabled"),MMU_ParseNVAttr(ecbLink,"menuItemsHidden"),MMU_ParseNVAttr(ecbLink,"menuItemsChecked"),MMU_ParseNVAttr(ecbLink,"menuTokenValues"));var elemAlign=null;if(alignId!=null&&alignId.length>0)elemAlign=document.getElementById(alignId);if(elemAlign==null)elemAlign=document.getElementById(ecbLink.id+"_t");if(elemAlign==null)elemAlign=ecbLink;MMU_EcbHighlight(MMU_GetHighlightElement(ecbLink),true);var openMenuScript="MenuHtc_show(document.getElementById('"+menu.id+"'), document.getElementById('"+elemAlign.id+"'), true, "+fAlignRight+", null);";openMenuScript+="SetEcbMouseOutAndDestroy('"+menu.id+"');";if(delay!=null&&delay>0){openMenuScript+=" g_MMU_OpenTimeoutHandle=null;";g_MMU_OpenTimeoutHandle=window.setTimeout(openMenuScript,delay,"javascript")}else eval(openMenuScript);if(e!=null)e.cancelBubble=true}catch(a){alert(L_Loading_Error_Text)}}function SetEcbMouseOutAndDestroy(a){if(g_MMU_HighlightedEcbTable!=null){g_MMU_HighlightedEcbTable.onmouseout=null;g_MMU_HighlightedEcbTableOpen=g_MMU_HighlightedEcbTable;document.getElementById(a)._onDestroy=ClearHighlightedEcbTableOpen}}function ClearHighlightedEcbTableOpen(){if(g_MMU_HighlightedEcbTableOpen!=null){MMU_EcbHighlight(g_MMU_HighlightedEcbTableOpen,false);g_MMU_HighlightedEcbTableOpen=null}}function MMU_EcbLinkOnFocusBlurDeferCall(d,c,a){if(a)c.onblur=a?new Function("MMU_EcbLinkOnFocusBlurDeferCall(null, this, false)"):null;if(g_MMU_HighlightedEcbTableOpen!=null)return;var b=document.getElementById(c.id+"_t");if(b!=null)MMU_EcbHighlight(b,a)}function MMU_EcbLinkOnKeyDown(f,b,a){if(a==null){a=window.event;if(a==null)return}var e=b.href!=null&&b.href.length>0;if((a.shiftKey||!e)&&GetEventKeyCode(a)==13||a.altKey&&GetEventKeyCode(a)==40){var c=byid(b.id+"_ti");if(c==null){var d=b.getAttribute("serverclientid");if(d!=null&&d.length>0)c=byid(d+"_ti")}if(c!=null)c.click();else b.click();return false}else return true}function MMU_EcbTableMouseOverOutDeferCall(b,a){if(a){if(b==g_MMU_HighlightedEcbTableOpen)return;b.onmouseout=a?new Function("MMU_EcbTableMouseOverOut(this, false)"):null}MMU_EcbHighlight(b,a)}function MMU_EcbHighlight(a,b){if(a==null&&!b)a=g_MMU_HighlightedEcbTableOpen;if(a==null)return;if(b==null)b=false;var d=a.getAttribute("hoverActive"),c=a.getAttribute("hoverInactive");if(d==null)d="ms-selectedtitle";if(c==null)c="ms-unselectedtitle";if(b){a.className=d;g_MMU_HighlightedEcbTable=a}else a.className=c;var e=a.getAttribute("menuformat"),f=document.getElementById(a.id+"i");if(f!=null&&e!=null&&e=="ArrowOnHover")f.style.visibility=b?"visible":"hidden";if(!b)g_MMU_HighlightedEcbTable=null}function MMU_PopMenuIfShowingDeferCall(b){if(!IsAccessibilityFeatureEnabledProxy()&&g_menuHtc_lastMenu){var a=g_menuHtc_lastMenu.getAttribute("type");if(a&&a=="ServerMenu")b.onclick()}}function MMU_HandleArrowSplitButtonKeyDown(a,b,c,d){if(!a.shiftKey&&!a.altKey&&!a.ctrlKey&&GetEventKeyCode(a)==13){d.parentNode.click();return}return MMU_EcbLinkOnKeyDown(byid(b),c,a)}function MMU_GetHighlightElement(b){var a=null;a=document.getElementById(b.id+"_t");if(a!=null)return a;else return b}function MMU_GetMenuFromClientId(a){return document.getElementById(a)}var g_MMU_theFormActionAtPageLoad=null,g_MMU_theFormActionAtPreMenuOpen=null,g_MMU_Form0ActionAtPageLoad=null,g_MMU_Form0ActionAtPreMenuOpen=null;function MMU_CallbackPreMenuOpen(templateClientId,menuClientId,callbackEventReference,timeoutLength,timeoutMessage,e){try{g_MMU_theFormActionAtPreMenuOpen=theForm!=null?theForm.action:"null";g_MMU_Form0ActionAtPreMenuOpen=document.forms!=null&&document.forms.length>0?document.forms[0].action:"null";var menuTemplate=document.getElementById(templateClientId),menuLink=document.getElementById(menuClientId);if(menuLink.getAttribute("suppressBubbleIfPostback")!=null&&e!=null&&e.srcElement!=null&&e.srcElement.href!=null&&e.srcElement.href.substr(0,MMU_postbackPrefix.length)==MMU_postbackPrefix){event.cancelBubble=true;return}MMU_StopPendingTimerEventsFromCallback();MMU_RemoveCallbackItemsFromMenuTemplate(menuTemplate);var menu=document.getElementById(menuClientId);menu.setAttribute("callbackInProgress","true");var loadingMessageMenuItem=CAMOpt(menuTemplate,L_Loading_Text,"null");loadingMessageMenuItem.setAttribute("callbackitem","true");loadingMessageMenuItem.setAttribute("enabled","false");var callbackContext=templateClientId+";"+menuClientId+";"+timeoutMessage.replace(/;/g,"%semi%").replace(/\'/g,"%quot%");callbackEventReference=callbackEventReference.replace(/__CALLBACKCONTEXT__/g,callbackContext);eval(callbackEventReference);g_MMU_RequestTimeoutTimeoutHandle=window.setTimeout("MMU_CallbackErrHandler('timeout', '"+callbackContext+"')",timeoutLength,"javascript")}catch(a){alert(L_Loading_Error_Text)}}var g_MMU_RequestTimeoutTimeoutHandle=null;function MMU_RemoveCallbackItemsFromMenuTemplate(b){try{for(var a=0;a<b.childNodes.length;a++){var c=b.childNodes[a];if(c.nodeType==1&&c.getAttribute("callbackitem")=="true"){b.removeChild(c);--a}}}catch(d){alert(L_Loading_Error_Text)}}function MMU_StopPendingTimerEventsFromCallback(){if(g_MMU_OpenTimeoutHandle!=null){window.clearTimeout(g_MMU_OpenTimeoutHandle);g_MMU_OpenTimeoutHandle=null}if(g_MMU_RequestTimeoutTimeoutHandle!=null){window.clearTimeout(g_MMU_RequestTimeoutTimeoutHandle);g_MMU_RequestTimeoutTimeoutHandle=null}}function MMU_UpdateMenuTemplateWithErrorItem(a,b){MMU_RemoveCallbackItemsFromMenuTemplate(a);var c=CAMOpt(a,b,"null");loadingMessageMenuItem.setAttribute("callbackitem","true");loadingMessageMenuItem.setAttribute("enabled","false")}function MMU_UpdateOpenedMenuWithErrorItem(c,a,b){MMU_UpdateMenuTemplateWithErrorItem(a,b);HideMenu(a);MMU_Open(a,c)}function MMU_CallbackHandler(l,k){MMU_StopPendingTimerEventsFromCallback();var j=MMU_ParseContext(k),c=document.getElementById(j.TemplateClientId);if(c==null){alert(L_Loading_Error_Text);return}var b=document.getElementById(j.MenuClientId);if(b==null){alert(L_Loading_Error_Text);return}var g="",i="",h="",f="",e="",a=l.split(MMU_chDelim);if(a==null||a.length!=5)e=MMU_GenerateErrorMenuItem(L_Loading_Error_Text);else{var d=new RegExp(MMU_chDelimEnc,"g");g=a[0].replace(d,MMU_chDelim);i=a[1].replace(d,MMU_chDelim);h=a[2].replace(d,MMU_chDelim);f=a[3].replace(d,MMU_chDelim);e=a[4].replace(d,MMU_chDelim)}b.setAttribute("menuItemsDisabled",g);b.setAttribute("menuItemsHidden",i);b.setAttribute("menuItemsChecked",h);b.setAttribute("menuTokenValues",f);MMU_RemoveCallbackItemsFromMenuTemplate(c);c.innerHTML=c.innerHTML+e;HideMenu(c);MMU_Open(c,b);b.setAttribute("callbackInProgress","")}function MMU_CallbackErrHandler(f,e){try{alert(L_Loading_Error_Text);var a=MMU_ParseContext(e),d=document.getElementById(a.TemplateClientId);if(d==null){alert(L_Loading_Error_Text);return}var b=document.getElementById(a.MenuClientId);if(b==null){alert(L_Loading_Error_Text);return}b.setAttribute("callbackInProgress","");var c=L_Loading_Error_Text;if(f=="timeout"&&a.TimeoutMessage!=null&&a.TimeoutMessage.length>0)c=a.TimeoutMessage;MMU_UpdateOpenedMenuWithErrorItem(b,d,c)}catch(g){alert(L_Loading_Error_Text)}}function MMU_ParseContext(c){try{var a={},b=c.split(";");a.TemplateClientId=b[0];a.MenuClientId=b[1];a.TimeoutMessage=b[2].replace(/%semi%/g,";").replace(/%quot%/g,"'");return a}catch(d){alert(L_Loading_Error_Text)}}var L_NewFormLibTb3_Text="The document(s) could not be merged.\nThe required application may not be installed properly, or the template for this document library cannot be opened.\n\nPlease try the following:\n1. Check the General Settings for this document library for the name of the template, and install the application necessary for opening the template. If the application was set to install on first use, run the application and then try creating a new document again.\n\n2.  If you have permission to modify this document library, go to General Settings for the library and configure a new template.",L_NewFormLibTb4_Text="Select the document(s) you want to merge, and then click 'Merge Selected Documents' on the toolbar.";function combineDocuments(h,g,f){fNewDoc=false;if(browseris.w3c&&!browseris.ie)document.all=document.getElementsByTagName("*");var a=true,b,c;try{var d=document.all.chkCombine;for(i=0;a&&i<d.length;i++)if(d[i].checked&&a){a=false;b=document.all.chkUrl[i].HREF;c=document.all.chkProgID[i].HREF}}catch(j){}try{if(a&&document.all.chkCombine.checked){a=false;b=document.all.chkUrl.HREF;c=document.all.chkProgID.HREF}}catch(j){}if(!a){var e=false;try{NewDocumentButton=new ActiveXObject(c);fNewDoc=NewDocumentButton!=null}catch(j){}if(!fNewDoc)alert(L_NewFormLibTb3_Text);else{try{e=NewDocumentButton.MergeDocuments(b,document.all.chkCombine,makeAbsUrl(f))}catch(j){}if(!e)alert(L_NewFormLibTb3_Text);else window.onfocus=RefreshOnFocus}}else alert(L_NewFormLibTb4_Text)}var L_NewFormLibTb5_Text="Select the document(s) you want to relink, and then click 'Relink Selected Documents' on the toolbar.",L_NewFormLibTb6_Text="Only 500 documents can be relinked at a time. Modify your selection and then try again.";function repairLinks(e,f,g){if(browseris.w3c&&!browseris.ie)document.all=document.getElementsByTagName("*");var b=0,d=document.all.SubmitRepairDocs;d.value="";var c=document.getElementsByTagName("input");for(var a=0;a<c.length;a++)if(c[a].id=="chkRepair")if(c[a].checked){d.value+=c[a].getAttribute("docID");d.value+=" ";b++}if(b>0&&b<=500){document.all.SubmitRepairRedirectList.value=f;document.all.SubmitRepairRedirectFolder.value=e;document.all.SubmitRepairDocsForm.action=g+"/submitrepair.aspx";document.all.SubmitRepairDocsForm.submit()}else alert(b==0?L_NewFormLibTb5_Text:L_NewFormLibTb6_Text)}function NavigateToManageCopiesPage(a,b){STSNavigate(a+"/_layouts"+"/managecopies.aspx?ItemUrl="+b+"&Source="+GetSource())}var L_ViewVersion_Text="View",L_RestoreVersion_Text="Restore",L_DeleteVersion_Text="Delete",L_DenyVersion_Text="Reject this version",L_UnPublishVersion_Text="Unpublish this version";function AddVersionMenuItemsCore(b,c){if(currentItemID!=null){var f=currentItemID.toString();if(f.indexOf(".0.")>=0)return}if(!HasRights(0,64))return;var a,e=itemTable.getAttribute("isCur"),h=itemTable.getAttribute("Level"),g=itemTable.getAttribute("canViewProperty");if(currentItemFSObjType==null)currentItemFSObjType=GetAttributeFromItemTable(itemTable,"OType","FSObjType");if(g!="0"){a=CAMOpt(b,L_ViewVersion_Text,"javascript:ViewVersion()","");a.id="ID_ViewVersion"}if(HasRights(0,4)){a=CAMOpt(b,L_RestoreVersion_Text,"javascript:RestoreVersion()","");a.id="ID_RestoreVersion"}if(HasRights(0,128)&&e!="1"){a=CAMOpt(b,L_DeleteVersion_Text,"javascript:DeleteVersion()","");a.id="ID_DeleteVersion"}if(HasRights(0,16)&&HasRights(0,4))if((c.isModerated||c.EnableMinorVersions)&&currentItemFSObjType!=1&&(h==1&&e=="1")){var d=L_DenyVersion_Text;if(c.EnableMinorVersions)d=L_UnPublishVersion_Text;a=CAMOpt(b,d,"javascript:TakeOfflineVersion()","");a.id="ID_TakeOfflineVersion"}}function ViewVersion(){if(!IsContextSet())return;STSNavigate(itemTable.getAttribute("verUrl"))}var L_Version_Restore_Confirm_Text="You are about to replace the current version with the selected version.",L_Version_RestoreVersioningOff_Confirm_Text="Versioning is currently disabled. As a result, you are about to overwrite the current version. All changes to this version will be lost.",L_Version_NoRestore_Current_ERR="Cannot restore the current version.";function RestoreVersion(){if(!IsContextSet())return;var a=currentCtx;if(itemTable.getAttribute("isMostCur")!="0")alert(L_Version_NoRestore_Current_ERR);else{var b=a.HttpPath+"&op=Restore&ver="+itemTable.getAttribute("verId");if(confirm(a.verEnabled?L_Version_Restore_Confirm_Text:L_Version_RestoreVersioningOff_Confirm_Text))SubmitFormPost(b)}}var L_Version_NoOffline_NonCurrent_ERR="You can only take offline the current published or approved version",L_Version_unpublish_Confirm_Text="Are you sure you want to unpublish this version of the document?",L_Version_deny_Confirm_Text="Are you sure you want to deny this version of the document?";function TakeOfflineVersion(){if(!IsContextSet())return;var b=currentCtx,a=L_Version_deny_Confirm_Text;if(b.EnableMinorVersions)a=L_Version_unpublish_Confirm_Text;if(itemTable.getAttribute("isCur")!="1"||itemTable.getAttribute("Level")!=1)alert(L_Version_NoOffline_NonCurrent_ERR);else if(confirm(a))SubmitFormPost(b.HttpPath+"&op=TakeOffline")}var L_Version_Delete_Confirm_Text="Are you sure you want to delete this version?",L_Version_Recycle_Confirm_Text="Are you sure you want to send this version to the site Recycle Bin?",L_Version_NoDelete_Current_ERR="You cannot delete the current checked in version, major version, or approved version.";function DeleteVersion(){if(!IsContextSet())return;var a=currentCtx;if(itemTable.getAttribute("isCur")!="0")alert(L_Version_NoDelete_Current_ERR);else{var b=a.HttpPath+"&op=Delete&ver="+itemTable.getAttribute("verId");if(confirm(a.RecycleBinEnabled?L_Version_Recycle_Confirm_Text:L_Version_Delete_Confirm_Text))SubmitFormPost(b)}}var L_Version_DeleteAll_Confirm_Text="Are you sure you want to delete all previous versions associated with this file?",L_Version_RecycleAll_Confirm_Text="Are you sure you want to send all previous versions associated with this file to the site Recycle Bin?",L_Version_DeleteAllMinor_Confirm_Text="Are you sure you want to delete all previous draft versions of this file?",L_Version_RecycleAllMinor_Confirm_Text="Are you sure you want to send all previous draft versions of this file to the site Recycle Bin?",L_Version_NoDeleteAll_None_ERR="There are no previous versions to delete.";function DeleteAllVersions(b,a){if(b<=1)alert(L_Version_NoDeleteAll_None_ERR);else if(confirm(a.RecycleBinEnabled?L_Version_RecycleAll_Confirm_Text:L_Version_DeleteAll_Confirm_Text))SubmitFormPost(a.HttpPath+"&op=DeleteAll")}function DeleteAllMinorVersions(b,a){if(b<=1)alert(L_Version_NoDeleteAll_None_ERR);else if(confirm(a.RecycleBinEnabled?L_Version_RecycleAllMinor_Confirm_Text:L_Version_DeleteAllMinor_Confirm_Text))SubmitFormPost(a.HttpPath+"&op=DeleteAllMinor")}function EditInGrid(b,a){EnsureListControl();if(fListControl){encViewId=escapeProperly(a);strDocUrl=b+"?ShowInGrid=True&View="+encViewId;pageView=GetUrlKeyValue("PageView",true);if(pageView!="")strDocUrl=strDocUrl+"&PageView="+pageView;showWebPart=GetUrlKeyValue("ShowWebPart",true);if(showWebPart!="")strDocUrl=strDocUrl+"&ShowWebPart="+showWebPart;viewId=GetUrlKeyValue("View",true);if(viewId.toUpperCase()==a.toUpperCase()||viewId.toUpperCase()==encViewId.toUpperCase()){rootFolder=GetUrlKeyValue("RootFolder",true);if(rootFolder!="")strDocUrl=strDocUrl+"&RootFolder="+rootFolder}SubmitFormPost(strDocUrl)}else if(!fListErrorShown){alert(L_EditInGrid_Text);fListErrorShown=true}}function ExitGrid(e){var a,b,d,c;a=e;b=GetUrlKeyValue("PageView",true);d=GetUrlKeyValue("View",true);if(d!=""){a=a+"?View="+d;c=GetUrlKeyValue("RootFolder",true);if(c!="")a=a+"&RootFolder="+c;if(b!="")a=a+"&PageView="+b;showWebPart=GetUrlKeyValue("ShowWebPart",true);if(showWebPart!="")a=a+"&ShowWebPart="+showWebPart;a=a+"&ShowInGrid=HTML"}else{a=a+"?ShowInGrid=HTML";if(b!="")a=a+"&PageView="+b;showWebPart=GetUrlKeyValue("ShowWebPart",true);if(showWebPart!="")a=a+"&ShowWebPart="+showWebPart}SubmitFormPost(a)}