﻿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}function MsFloorTime(d,b,c){var a=d.getTime();if(c)a=a-1;a=b*Math.floor(a/b);return a}function Calendar(d,b,c,g){if(!c)c=new DateOptions;this.dopt=c;var i=1;if(d==null||b==null){var a=StURLGetVar("CalendarDate");if(a!=""){d=a.substr(0,4)-0;var h=a.indexOf("-",5);if(h==-1)b=a.substr(5)-1;else{b=a.substr(5,h-5)-1;i=a.substr(h+1)}}if(a==""||isNaN(c.DateYMD(d,b,1))){var f=this.dopt.Today();d=f.getUTCFullYear();b=f.getUTCMonth();i=f.getUTCDate()}}var e=StURLGetVar("CalendarPeriod");if(e=="week"){this.period="week";this.iperiod=1}else if(e=="day"){this.period="vday";this.iperiod=2}else if(e=="vday"){this.period="vday";this.iperiod=2}else if(e=="month"){this.period="month";this.iperiod=0}else{this.period=c.CalendarPeriod;if(this.period=="week")this.iperiod=1;else if(this.period=="day")this.iperiod=2;else if(this.period=="vday")this.iperiod=2;else this.iperiod=0}this.SetDate(d,b,i);if(this.iperiod==0){this.cchanMin=4;this.cchanMax=4}else if(this.iperiod==1){this.cchanMin=20;this.cchanMax=20}else{this.cchanMin=3;this.cchanMax=100}this.ievtMax=0;this.rgEvt=[];this.fUseDHTML=browseris.ie&&browseris.verIEFull>4&&browseris.win32||browseris.nav6up;this.fDatePicker=false;this.dateDP=null;if(!g)g="cal";this.stObject=g}Calendar.msMinute=1e3*60;Calendar.msHour=Calendar.msMinute*60;Calendar.msDay=Calendar.msHour*24;Calendar.msWeek=Calendar.msDay*7;var L_rgDOW0_Text="Sun",L_rgDOW1_Text="Mon",L_rgDOW2_Text="Tue",L_rgDOW3_Text="Wed",L_rgDOW4_Text="Thur",L_rgDOW5_Text="Fri",L_rgDOW6_Text="Sat";Calendar.rgDOW=[L_rgDOW0_Text,L_rgDOW1_Text,L_rgDOW2_Text,L_rgDOW3_Text,L_rgDOW4_Text,L_rgDOW5_Text,L_rgDOW6_Text];var L_rgDOWLong0_Text="Sunday",L_rgDOWLong1_Text="Monday",L_rgDOWLong2_Text="Tuesday",L_rgDOWLong3_Text="Wednesday",L_rgDOWLong4_Text="Thursday",L_rgDOWLong5_Text="Friday",L_rgDOWLong6_Text="Saturday";Calendar.rgDOWLong=[L_rgDOWLong0_Text,L_rgDOWLong1_Text,L_rgDOWLong2_Text,L_rgDOWLong3_Text,L_rgDOWLong4_Text,L_rgDOWLong5_Text,L_rgDOWLong6_Text];var L_rgDOWDP0_Text="S",L_rgDOWDP1_Text="M",L_rgDOWDP2_Text="T",L_rgDOWDP3_Text="W",L_rgDOWDP4_Text="Th",L_rgDOWDP5_Text="F",L_rgDOWDP6_Text="S";Calendar.rgDOWDP=[L_rgDOWDP0_Text,L_rgDOWDP1_Text,L_rgDOWDP2_Text,L_rgDOWDP3_Text,L_rgDOWDP4_Text,L_rgDOWDP5_Text,L_rgDOWDP6_Text];var L_rgMonths0_Text="January",L_rgMonths1_Text="February",L_rgMonths2_Text="March",L_rgMonths3_Text="April",L_rgMonths4_Text="May",L_rgMonths5_Text="June",L_rgMonths6_Text="July",L_rgMonths7_Text="August",L_rgMonths8_Text="September",L_rgMonths9_Text="October",L_rgMonths10_Text="November",L_rgMonths11_Text="December";Calendar.rgMonths=[L_rgMonths0_Text,L_rgMonths1_Text,L_rgMonths2_Text,L_rgMonths3_Text,L_rgMonths4_Text,L_rgMonths5_Text,L_rgMonths6_Text,L_rgMonths7_Text,L_rgMonths8_Text,L_rgMonths9_Text,L_rgMonths10_Text,L_rgMonths11_Text];var L_MYDATE_Text="^1 ^2",L_YMDATE_Text="^1 ^2",L_MDYDATE_Text="^1 ^2, ^3",L_DMYDATE_Text="^1 ^2, ^3",L_YMDDATE_Text="^1, ^2 ^3",L_MDYDATESameYear_Text="^1 ^2",L_DMYDATESameYear_Text="^1 ^2",L_YMDDATESameYear_Text="^1, ^2 ^3",L_DATE1DATE2_Text="^1 - ^2",L_MDY_DOW_DATE_Text="^4 ^1 ^2, ^3",L_DMY_DOW_DATE_Text="^4 ^1 ^2, ^3",L_YMD_DOW_DATE_Text="^4 ^1, ^2 ^3";Calendar.prototype.StMonthYear=CalStMonthYear;function CalStMonthYear(){var a="";if(this.iperiod!=0)a+='<SPAN style="cursor:pointer;" onmouseover="HighlightText(this, \'red\');" onmouseout="HighlightText(this, \'\');"'+StClickEvent(this.stObject+".MoveMonth(0)")+">";var b="",c="",d="";switch(this.dopt.stDateOrder){case "MDY":case "DMY":c=Calendar.rgMonths[this.mon];d=this.yr;b=L_MYDATE_Text;break;case "YMD":c=this.yr;d=Calendar.rgMonths[this.mon];b=L_YMDATE_Text}a+=StBuildParam(b,c,d);if(this.iperiod!=0)a+="</SPAN>";return a}Calendar.prototype.StDaySpanMonthYear=CalDaySpanMonthYear;function CalDaySpanMonthYear(){var i="",k="",l="",a="",b="",c="",d="",e="",f="",g="",h="";if(this.iperiod!=0)i+='<SPAN style="cursor:pointer;" onmouseover="HighlightText(this, \'red\');" onmouseout="HighlightText(this, \'\');"'+StClickEvent(this.stObject+".MoveMonth(0)")+">";var j=this.dateStart.getUTCFullYear()!=this.dateEnd.getUTCFullYear();switch(this.dopt.stDateOrder){case "MDY":c=Calendar.rgMonths[this.dateStart.getUTCMonth()];d=this.dateStart.getUTCDate();e=this.dateStart.getUTCFullYear();if(j)a=L_MDYDATE_Text;else a=L_MDYDATESameYear_Text;f=Calendar.rgMonths[this.dateEnd.getUTCMonth()];g=this.dateEnd.getUTCDate();h=this.dateEnd.getUTCFullYear();b=L_MDYDATE_Text;break;case "DMY":c=this.dateStart.getUTCDate();d=Calendar.rgMonths[this.dateStart.getUTCMonth()];e=this.dateStart.getUTCFullYear();if(j)a=L_DMYDATE_Text;else a=L_DMYDATESameYear_Text;f=this.dateEnd.getUTCDate();g=Calendar.rgMonths[this.dateEnd.getUTCMonth()];h=this.dateEnd.getUTCFullYear();b=L_DMYDATE_Text;break;case "YMD":c=this.dateStart.getUTCFullYear();d=Calendar.rgMonths[this.dateStart.getUTCMonth()];e=this.dateStart.getUTCDate();if(j)a=L_YMDDATE_Text;else a=L_YMDDATESameYear_Text;f=this.dateEnd.getUTCFullYear();g=Calendar.rgMonths[this.dateEnd.getUTCMonth()];h=this.dateEnd.getUTCDate();b=L_YMDDATE_Text}k=StBuildParam(a,c,d,e);l=StBuildParam(b,f,g,h);i+=StBuildParam(L_DATE1DATE2_Text,k,l);if(this.iperiod!=0)i+="</SPAN>";return i}Calendar.prototype.StDayMonthYear=CalStDayMonthYear;function CalStDayMonthYear(){var e="";e+='<SPAN style="cursor:pointer;" onmouseover="HighlightText(this, \'red\');" onmouseout="HighlightText(this, \'\');"'+StClickEvent(this.stObject+".MoveMonth(0)")+">";var a="",b="",c="",d="",f=Calendar.rgDOWLong[this.dow];switch(this.dopt.stDateOrder){case "MDY":b=Calendar.rgMonths[this.mon];c=this.day;d=this.yr;a=L_MDY_DOW_DATE_Text;break;case "DMY":b=this.day;c=Calendar.rgMonths[this.mon];d=this.yr;a=L_DMY_DOW_DATE_Text;break;case "YMD":b=this.yr;c=Calendar.rgMonths[this.mon];d=this.day;a=L_YMD_DOW_DATE_Text}e+=StBuildParam(a,b,c,d,f);e+="</SPAN>";return e}function alertDate(b,a){alert(b+": yr="+a.getUTCFullYear()+" mon="+(a.getUTCMonth()+1)+" day="+a.getUTCDate())}Calendar.prototype.SetDate=CalSetDate;function CalSetDate(d,c,e){var a=new Date(Date.UTC(d,c,e));this.dateStart=new Date(a.getTime());this.dateEnd=new Date(a.getTime());this.givenDate=new Date(a.getTime());if(this.iperiod==0){this.dateStart.setUTCDate(1);this.dateEnd.setTime(Date.UTC(d,c+1,0))}var b=0;if(this.iperiod!=2){this.dateStart.setUTCDate(this.dateStart.getUTCDate()-(this.dateStart.getUTCDay()-this.dopt.dow+7)%7);b=this.IrwFromDate(this.dateEnd);this.dateEnd.setUTCDate(this.dateEnd.getUTCDate()+b*7-1)}this.irwMax=b+1;if(this.iperiod==1){this.dateEnd.setTime(this.dateStart.getTime()+6*Calendar.msDay);a=new Date(this.dateStart.getTime()+3*Calendar.msDay)}else if(this.iperiod==2)this.dateTodayEnd=new Date(this.dateStart.getTime()+Calendar.msDay-1);this.day=a.getUTCDate();this.mon=a.getUTCMonth();this.yr=a.getUTCFullYear();this.dow=a.getUTCDay()}Calendar.prototype.DayStyle=CalDayStyle;function CalDayStyle(b,d,f,e){var a,c=this.dopt.Today();if(b.getTime()==c.getTime())if(d)a=" style=\"border-color:'#FFD275'; border-bottom-style:solid; border-left-style:solid; border-right-style:solid; border-bottom-width:2pt; border-left-width:2pt; border-right-width:2pt\" ";else if(f)a=" style=\"border-color:'#FFD275'; border-top-style:solid; border-left-style:solid; border-right-style:solid; border-top-width:2pt; border-left-width:2pt; border-right-width:2pt\" ";else a=" style=\"border-color:'#FFD275'; border-left-style:solid; border-right-style:solid; border-left-width:2pt; border-right-width:2pt\" ";else if(!e&&b.getUTCMonth()!=this.mon)a=' BGCOLOR="#e6e6e6"';else a="";return a}Calendar.prototype.AddFullEvent=CalAddFullEvent;function CalAddFullEvent(e,g,i,l,k,h,j){var a,b;if(e=="")return;a=DateOptions.ParseISODate(e);if(g=="")b=new Date(a.getTime());else b=DateOptions.ParseISODate(g);if(b<a)b=new Date(a.getTime());var c=new Date(a.getTime()),d=new Date(b.getTime());if(this.iperiod==2){if(a>this.dateTodayEnd||b<this.dateStart)return;if(c<this.dateStart)c=this.dateStart;var f=Calendar.msHour/3;if(b.getTime()<a.getTime()+f)d=new Date(a.getTime()+f)}h+="&Source="+escapeProperly(window.location.href);var m=new CalEvent(c,d,a,b,i,l,k,h,j);this.AddEvent(m)}Calendar.prototype.AddEvent=CalAddEvent;function CalAddEvent(a){this.rgEvt[this.ievtMax++]=a}Calendar.prototype.AssignChannels=CalAssignChannels;function CalAssignChannels(){var a;this.mpSpan={};this.mpIchan={};this.mpEvents={};var j=false,c,d;if(this.iperiod==2){j=true;c=this.dateStart;d=this.dateTodayEnd;this.mpNoTimeEvents=[];this.mpAllDayEvents=[];var h=this.dopt.WorkDayStartHour-this.dopt.DailyStartHourDelta,i=this.dopt.WorkDayEndHour+this.dopt.DailyEndHourDelta;if(h<0)h=0;if(i>24)i=24;this.minQuarterStart=4*h;this.maxQuarterEnd=4*i-1;for(a=0;a<this.rgEvt.length;a++){evt=this.rgEvt[a];if(evt.actualDateStart>d||evt.actualDateEnd-1<c||evt.actualDateStart<=c&&evt.actualDateEnd>=d)continue;irwMin=this.IrwFromDate(evt.dateStart);if(irwMin<0)irwMin=0;irwMax=this.IrwFromDate(evt.dateEnd);if(irwMax>this.irwMax)irwMax=this.irwMax;if(irwMin<this.irwMax&&irwMax>=0)for(irw=irwMin;irw<=irwMax;irw++){var g=new Date;this.SetDateFromGrid(g,irw,0);if(g<c||g>=d)continue;var k=g.getTime()/(Calendar.msHour/4),b=MsFloorTime(evt.dateStart,Calendar.msHour/4,0)/(Calendar.msHour/4)-k,f=MsFloorTime(evt.dateEnd,Calendar.msHour/4,1)/(Calendar.msHour/4)-k+1;if(f<b)f=b;if(b<this.minQuarterStart)this.minQuarterStart=b;if(f>this.maxQuarterEnd)this.maxQuarterEnd=f;if(b>0&&95-b<2)this.FVdayOverflow=true}}this.minQuarterStart=Math.floor(this.minQuarterStart/4)*4;if(this.minQuarterStart<0)this.minQuarterStart=0;if(this.maxQuarterEnd>95)this.maxQuarterEnd=95;else this.maxQuarterEnd=4*(Math.floor(this.maxQuarterEnd/4)+1)-1}if(this.iperiod<=1)this.rgEvt.sort(CalEvtSort);var e=this.dateStart;e.setUTCHours(0,0,0,0);e=e.getTime();for(a=0;a<this.rgEvt.length;a++){evt=this.rgEvt[a];if(j){if(evt.actualDateStart.getTime()==e&&evt.actualDateEnd.getTime()==e){this.mpNoTimeEvents[this.mpNoTimeEvents.length]=evt;continue}if(evt.actualDateStart<=c&&evt.actualDateEnd>=d){this.mpAllDayEvents[this.mpAllDayEvents.length]=evt;continue}}irwMin=this.IrwFromDate(evt.dateStart);if(irwMin<0)irwMin=0;irwMax=this.IrwFromDate(evt.dateEnd);if(irwMax>this.irwMax)irwMax=this.irwMax;if(irwMin<this.irwMax&&irwMax>=0)for(irw=irwMin;irw<=irwMax;irw++)this.PlaceEventInRow(evt,irw)}}function CalEvtSort(a,b){if(a.multiDay^b.multiDay)if(a.multiDay)return -1;else return 1;else if(a.multiDay){var c=a.dateEnd-a.dateStart,d=b.dateEnd-b.dateStart;if(d<c)return -1;else if(d>c)return 1;else return 0}else if(a.dateStart<b.dateStart)return -1;else if(a.dateStart>b.dateStart)return 1;else return 0}Calendar.prototype.PlaceEventInRow=CalPlaceEventInRow;function CalPlaceEventInRow(c,f){var l,j=new Date;this.SetDateFromGrid(j,f,0);if(this.iperiod==2){if(f!=0)return;var k=j.getTime()/(Calendar.msHour/4),d=MsFloorTime(c.dateStart,Calendar.msHour/4,0)/(Calendar.msHour/4)-k,e=MsFloorTime(c.dateEnd,Calendar.msHour/4,1)/(Calendar.msHour/4)-k;if(e<d)e=d;var h,g;if(this.iperiod==2){h=this.minQuarterStart;g=this.maxQuarterEnd}else{h=4*this.dopt.WorkDayStartHour;g=4*this.dopt.WorkDayEndHour-1}if(e>=h&&d<=g){if(this.FVdayOverflow)g=99;d=Math.max(d,h);e=Math.min(e,g);ichan=this.IchanNext(f,d,e);new Span(this,f,d,e,ichan,c)}}else{var i,a,b;i=j.getTime()/Calendar.msDay;a=MsFloorTime(c.dateStart,Calendar.msDay,0)/Calendar.msDay-i;b=MsFloorTime(c.dateEnd,Calendar.msDay,1)/Calendar.msDay-i;if(b<a||c.actualDateEnd.getTime()-c.actualDateStart.getTime()<Calendar.msDay)b=a;if(b>=0&&a<=6){a=Math.max(a,0);b=Math.min(b,6);ichan=this.IchanNext(f,a,b);new Span(this,f,a,b,ichan,c)}}}function Span(a,e,c,h,g,d){this.evt=d;this.cbucket=h-c+1;if(a.iperiod==2){d.ichan=g;d.ihour=c;var f=a.maxQuarterEnd;if(f==95)f=99;d.rowspan=Math.min(this.cbucket,1+f-c)}a.mpSpan[e+"."+c+"."+g]=this;for(bucket=c;bucket<=h;bucket++){a.mpIchan[e+"."+bucket]=g+1;var b=a.mpEvents[e+"."+bucket];if(b==null){b=[];a.mpEvents[e+"."+bucket]=b}b[b.length]=d}}Calendar.prototype.IchanNext=CalIchanNext;function CalIchanNext(c,d,e){var a,b=0;for(a=d;a<=e;a++)if(this.mpIchan[c+"."+a]!=null)b=Math.max(b,this.mpIchan[c+"."+a]);return b}Calendar.prototype.IrwFromDate=CalIrwFromDate;function CalIrwFromDate(b){var a;a=Math.floor((b.getTime()-this.dateStart.getTime())/Calendar.msWeek);return a}Calendar.prototype.BuildUI=CalBuildUI;function CalBuildUI(){var a=this.StBuild();document.write(a)}Calendar.prototype.StBuild=CalStBuild;function CalStBuild(){this.AssignChannels();if(this.fDatePicker)return this.StBuildPicker();if(!this.fUseDHTML)return this.StDownlevelBuild();return this.StBuildDHTML()}Calendar.prototype.StBuildDHTML=CalStBuildDHTML;function CalStBuildDHTML(){var a,f,h=new Date,l,e,d,g,b,t,n,C,D;t=C=4*this.dopt.WorkDayStartHour;n=4*this.dopt.WorkDayEndHour;D=n-1;if(this.iperiod==2){t=this.minQuarterStart;n=this.maxQuarterEnd+1;if(n==96&&this.FVdayOverflow)n=100}var A='<th style="cursor:pointer;" onmouseover="HighlightText(this, \'red\');" onmouseout="HighlightText(this, \'\');" ';if(this.iperiod==2){g=this.IchanNext(0,t,n);var y=this.mpNoTimeEvents.length,x=this.mpAllDayEvents.length;g=Math.max(g,this.cchanMin);if(this.cchanMax>0)g=Math.min(g,this.cchanMax);a="<table width=100% class=ms-cal cellpadding=0 cellspacing=0>";a+="<tr>"+A+StClickEvent(this.stObject+".MoveDate(-1)")+' class=ms-calhead style="cursor:pointer;" width=8%>&lt;</th><th width=84% class=ms-calhead nowrap>'+this.StDayMonthYear()+"</th>"+A+StClickEvent(this.stObject+".MoveDate(1)")+' class=ms-calhead style="cursor:pointer;" width=8%>&gt;</th></tr>';if(y>0){a+="</table><table width=100% class=ms-cal cellpadding=0 cellspacing=0>\r";a+="<tr height=0><td width="+(this.dopt.AllDayWidth+8)+"pt/><td/></tr>\r";a+="<tr><td class=ms-CalAllDay rowspan="+(y+1)+"></td><td width=1%/></tr>";for(i=0;i<y;i++){p=this.mpNoTimeEvents[i];a+="<tr><td class=ms-Vapptsingle style='border-top:1px solid black; border-left:1px solid black; border-bottom:1px solid black; border-right:1px solid black;' ";a+=" TITLE="+StAttrQuote(p.StTip(this.dopt))+"><nobr>"+StRenderVDayEvt(p,this.dopt,2)+"</nobr></td></tr>\r"}}if(x>0){a+="</table><table width=100% class=ms-cal cellpadding=0 cellspacing=0>\r";a+="<tr height=0><td width="+(this.dopt.AllDayWidth+8)+"pt/><td/></tr>\r";a+="<tr><td class=ms-CalAllDay rowspan="+(x+1)+">"+this.dopt.L_AllDay_Text+"</td><td width=1%/></tr>";for(i=0;i<x;i++){p=this.mpAllDayEvents[i];a+="<tr><td class=ms-Vapptsingle style='border-top:1px solid black; border-left:1px solid black; border-bottom:1px solid black; border-right:1px solid black;' ";a+=" TITLE="+StAttrQuote(p.StTip(this.dopt))+"><nobr>"+StRenderVDayEvt(p,this.dopt,2)+"</nobr></td></tr>\r"}}a+="</table><table width=100% STYLE='table-layout:fixed' class=ms-vcal cellpadding=0 cellspacing=0>\r";a+="<tr height=0><td width="+this.dopt.AllDayWidth+"pt/><td width=8pt/>\r";for(d=1;d<g;d++)a+="<td/>\r";a+="</tr>\r";var w={},m=new Array(n);for(b=t;b<n;b++){m[b]=0;for(d=0;d<g;d++)w[b+"."+d]=0}for(i=0;i<this.rgEvt.length;i++){var p=this.rgEvt[i],b=p.ihour,d=p.ichan,o=p.rowspan,k=d+1;for(c=0;c<o;c++)if(m[b+c]>k)k=m[b+c];for(c=0;c<o;c++){m[b+c]=k;w[b+c+"."+d]=1}}for(i=0;i<this.rgEvt.length;i++){var E=0,c=0;b=this.rgEvt[i].ihour;k=m[b];o=this.rgEvt[i].rowspan;var s=0,B=false;for(c=1;c<o;c++){s=m[b+c];B|=s!=k;if(s>k)k=s}if(!B)continue;for(c=0;c<o;c++)m[b+c]=k}for(i=this.rgEvt.length-1;i>=0;i--){var E=0,c=0;b=this.rgEvt[i].ihour;k=m[b];o=this.rgEvt[i].rowspan;var s=0,B=false;for(c=1;c<o;c++){s=m[b+c];B|=s!=k;if(s>k)k=s}if(!B)continue;for(c=0;c<o;c++)m[b+c]=k}for(b=t;b<n;b++){a+="<tr>\r";if(b%4==0){var r=b/4;if(r==24)r="&nbsp;";else if(this.dopt.f12Hour){r=(b/4+11)%12+1;if(this.dopt.TimeMarkPosn==0)r+=" "+(b/4<12?this.dopt.stAM:this.dopt.stPM);else r=(b/4<12?this.dopt.stAM:this.dopt.stPM)+" "+r}var j="";if(b<C||b>D)j=' BGCOLOR="#e6e6e6" ';if(b!=t||x>0||y>0){a+="<td class=ms-CalHour rowspan=2"+j+"><nobr>"+r+"</nobr></td>";a+="<td class=ms-calHour"+j+">&nbsp;</td>\r"}else{a+="<td class=ms-firstCalHour rowspan=2"+j+"><nobr>"+r+"</nobr></td>";a+="<td class=ms-firstCalHour"+j+">&nbsp;</td>\r"}}else if(b%2==0){a+="<td class=ms-CalHalfHour"+j+">&nbsp;</td>\r";a+="<td class=ms-calHalfHour"+j+">&nbsp;</td>\r"}else if(b%4==1)a+="<td class=ms-CalQuarterHour"+j+">&nbsp;</td>\r";else if(b%4==3){a+="<td class=ms-CalQuarterHour"+j+">&nbsp;</td>\r";a+="<td class=ms-calQuarterHour"+j+">&nbsp;</td>\r"}for(d=0;d<g;d++){f=this.mpSpan[0+"."+b+"."+d];if(f!=null){var u="ms-Vappt",o=f.evt.rowspan,v=Math.floor(g/m[b]);if(v>g/this.cchanMin)v=Math.floor(g/this.cchanMin);var z=v-1;if(z>0)for(c=0;c<o;c++){z=v-1;for(jchan=g-1;jchan>d&&z>0;jchan--)if(w[b+c+"."+jchan]==0){w[b+c+"."+jchan]=1;z--}}a+="<td class="+u+" style='border-top:1px solid black; border-left:1px solid black; border-bottom:2px solid black; border-right:2px solid black;' rowspan="+f.evt.rowspan;if(v>1)a+=" colspan="+v;a+=" TITLE="+StAttrQuote(f.evt.StTip(this.dopt))+"><nobr>"+StRenderVDayEvt(f.evt,this.dopt,f.evt.rowspan)+"</nobr></td>\r"}else if(w[b+"."+d]==0)if(b%4==0)if(b!=t||x>0||y>0)a+="<td class=ms-calHour"+j+">&nbsp;</td>\r";else a+="<td class=ms-firstCalHour"+j+">&nbsp;</td>\r";else if(b%2==0)a+="<td class=ms-calHalfHour"+j+">&nbsp;</td>\r";else a+="<td class=ms-calQuarterHour"+j+">&nbsp;</td>\r"}a+="</tr>\r"}a+="<tr>\r";for(d=-2;d<g;d++)a+="<td class=ms-CalHour>&nbsp;</td>\r";a+="</tr>\r"}else{var q=this.iperiod==1;a="<table width=100% class=ms-cal cellpadding=0 cellspacing=0>";a+="<tr>"+A+StClickEvent(this.stObject+".MoveDate(-1)")+' class=ms-calhead style="cursor:pointer;">&lt;</td><td class=ms-calhead colspan=5>';if(this.iperiod==0)a+=this.StMonthYear();else a+=this.StDaySpanMonthYear();a+="</td>"+A+StClickEvent(this.stObject+".MoveDate(1)")+' class=ms-calhead style="cursor:pointer;">&gt;</td></tr>';a+="<tr>\r";for(e=0;e<7;e++)a+="<td class=ms-calDOW>"+Calendar.rgDOW[(e+this.dopt.dow)%7]+"</td>\r";a+="</tr>";for(l=0;l<this.irwMax;l++){g=Math.max(this.IchanNext(l,0,6),this.cchanMin);if(this.cchanMax>0)g=Math.min(g,this.cchanMax);a+="<tr>\r";for(e=0;e<7;e++){this.SetDateFromGrid(h,l,e);a+="<td class=ms-calTop"+this.DayStyle(h,false,true,q)+'>&nbsp;<span style="cursor:pointer;" onmouseover="HighlightText(this, \'red\');" onmouseout="HighlightText(this, \'\');"'+StClickEvent(this.stObject+".MoveToDay("+h.getUTCFullYear()+","+(h.getUTCMonth()+1)+","+h.getUTCDate()+")")+">"+h.getUTCDate()+"</span>&nbsp;</td>\r"}a+="</tr>\r";for(d=0;d<g;d++){if(this.iperiod==1){a+="<tr>\r";for(e=0;e<7;e++){this.SetDateFromGrid(h,l,e);if(d==g-1&&this.SpanCheck(l,e,d,g))a+="<td class=ms-apptsingle "+this.DayStyle(h,false,false,q)+">&nbsp;</td>";else{f=this.mpSpan[l+"."+e+"."+d];if(f!=null&&!f.evt.multiDay&&0!=f.evt.actualDateStart.getTime()%Calendar.msDay&&0!=f.evt.actualDateEnd.getTime()%Calendar.msDay){var u="ms-apptsingle"+this.DayStyle(h,false,false,q);a+="<td class="+u+" colspan="+f.cbucket+" TITLE="+StAttrQuote(f.evt.StTip(this.dopt))+"><nobr>";a+=StEvtTime(f.evt,this.dopt,true);a+="&nbsp;</nobr></td>\r";e+=f.cbucket-1}else a+="<td class=ms-calMid"+this.DayStyle(h,false,false,q)+">&nbsp;</td>\r"}}a+="</tr>\r"}a+="<tr>\r";for(e=0;e<7;e++){this.SetDateFromGrid(h,l,e);if(d==g-1&&this.SpanCheck(l,e,d,g))a+="<td class=ms-apptsingle "+this.DayStyle(h,false,false,q)+'><span style="cursor:pointer;" onmouseover="HighlightText(this, \'red\');" onmouseout="HighlightText(this, \'\');"'+StClickEvent(this.stObject+".MoveToDay("+h.getUTCFullYear()+","+(h.getUTCMonth()+1)+","+h.getUTCDate()+")")+">"+this.dopt.L_More_Text+"</span></td>\r";else{f=this.mpSpan[l+"."+e+"."+d];if(f!=null){var u="ms-appt";if(!f.evt.multiDay)u="ms-apptsingle"+this.DayStyle(h,false,false,q);a+="<td class="+u+" colspan="+f.cbucket+" TITLE="+StAttrQuote(f.evt.StTip(this.dopt))+"><nobr>"+StURL(f.evt.stURL,f.evt.stTitle)+"</nobr></td>\r";e+=f.cbucket-1}else a+="<td class=ms-calMid"+this.DayStyle(h,false,false,q)+">&nbsp;</td>\r"}}a+="</tr>\r";a+="<tr>\r";if(d==g-1)u="ms-CalBot";else u="ms-CalSpacer";for(e=0;e<7;e++){this.SetDateFromGrid(h,l,e);a+="<td class="+u+this.DayStyle(h,d==g-1,false,q)+">&nbsp;</td>\r"}a+="</tr>\r"}}}a+="</table>";return a}Calendar.prototype.SpanCheck=CalSpanCheck;function CalSpanCheck(e,a,g,f){var d,b,c;if(this.IchanNext(e,a,a)>f)return true;d=this.mpSpan[e+"."+a+"."+g];if(d!=null){c=d.cbucket+a;if(c>7)c=7;for(b=a+1;b<c;b++)if(this.IchanNext(e,b,b)>f)return true}return false}function StRenderVDayEvt(a,f,e){var b="";b+="<table height=12px border='0' cellpadding='0' cellspacing='0' style='border-collapse: collapse; padding-right:6px' ><tr>";if(a.rgIcons&&a.rgIcons.length){var c,d=true;for(c in a.rgIcons)if(a.rgIcons[c]&&a.rgIcons[c].indexOf("blank.gif")<0){d=false;break}if(!d){b+="<td valign=top nowrap>";for(c in a.rgIcons)if(a.rgIcons[c]&&a.rgIcons[c].length)b+=a.rgIcons[c];b+="</td>"}}b+="<td nowrap>"+StURL(a.stURL,a.stTitle)+"</td></tr></table>";if(e>2)b+="<nobr>"+StEvtTime(a,f,false)+"</nobr>";if(e>3&&a.stLocation!=null)b+="<br><nobr>"+STSHtmlEncode(a.stLocation)+"</nobr>";return b}function StEvtTime(a,c,d){var b="";if(d)b+=c.StTime(a.actualDateStart);else b+=c.StBareTime(a.actualDateStart);if(a.actualDateStart.getTime()!=a.actualDateEnd.getTime()&&(MsFloorTime(a.actualDateStart,Calendar.msDay,0)==MsFloorTime(a.actualDateEnd,Calendar.msDay,0)||a.actualDateEnd.getTime()-a.actualDateStart.getTime()<Calendar.msDay)){b+=" - ";if(d)b+=c.StTime(a.actualDateEnd);else b+=c.StBareTime(a.actualDateEnd)}return b}function StClickEvent(a){return 'onclick="'+a+'" ondblclick="'+a+'"'}var L_TodaysDate_Text="Today's date is ^1";Calendar.prototype.StBuildPicker=CalStBuildPicker;function CalStBuildPicker(){var a,c=new Date,d=this.dopt.Today(),f,b,p,e,k="&loz;";a='<TABLE ONSELECTSTART="return false;" CLASS=ms-datepicker CELLPADDING="2" CELLSPACING="0" BORDER="1">\r';var i="<td style=\"cursor:pointer;\" onmouseover=\"Highlight(this, 'yellow', 'black');\" onmouseout=\"Highlight(this, '', '');\" ";a+="<tr>"+i+StClickEvent(this.stObject+".MoveMonth(-1)")+" class=ms-dpnextprev>&lt;</td><td class=ms-dphead colspan=5>"+this.StMonthYear()+"</td>"+i+StClickEvent(this.stObject+".MoveMonth(1)")+" class=ms-dpnextprev>&gt;</td></tr>";a+="<tr>\r";for(b=0;b<7;b++)a+='<TD class=ms-dpdow HEIGHT="20" WIDTH="14%">&nbsp;'+Calendar.rgDOWDP[(b+this.dopt.dow)%7]+"&nbsp;</TD>\r";a+="</tr>\r";for(f=0;f<this.irwMax;f++){a+="<tr>\r";for(b=0;b<7;b++){this.SetDateFromGrid(c,f,b);var h=this.mpEvents[f+"."+b],g=h!=null,o=c.getUTCFullYear(),n=c.getUTCMonth(),m=c.getUTCDate();a+=i+StClickEvent(this.stObject+".ClickDay("+o+","+n+","+m+")");if(g){var j="";for(e=0;e<h.length;e++){j+=h[e].StTip(this.dopt);if(e<h.length-1)j+="\r"}a+=" TITLE="+StAttrQuote(j)}a+=' WIDTH="14%"'+this.DPDayStyle(c,g)+">&nbsp;"+(g?"<b>":"")+c.getUTCDate()+(g?"</b>":"")+(c.getTime()==d.getTime()?"<font color=red>"+k+"</font>":"&nbsp;");a+="</TD>\r"}a+="</tr>\r"}var l="<A HREF='javascript:"+this.stObject+".SetDate("+d.getUTCFullYear()+","+d.getUTCMonth()+","+d.getUTCDate()+");'>"+this.dopt.StDate(d)+"</A>";a+="<tr><td class=ms-DPFoot colspan=7><font color=red>&loz;</font>"+StBuildParam(L_TodaysDate_Text,l)+"</td></tr>";a+="</table>";return a}Calendar.prototype.MoveDate=CalMoveDate;function CalMoveDate(a){if(this.iperiod==2)this.MoveVDay(a);else if(this.iperiod==1)this.MoveWeek(a);else this.MoveMonth(a)}Calendar.prototype.MoveMonth=CalMoveMonth;function CalMoveMonth(c){var a,b=this.givenDate.getUTCFullYear()*12+this.givenDate.getUTCMonth()+c,d=Math.floor(b/12);b=b%12;if(c!=0)a=StURLSetVar("CalendarDate",d+"-"+St2Digits(b+1)+"-1");else a=StURLSetVar("CalendarDate",d+"-"+St2Digits(b+1)+"-"+this.givenDate.getUTCDate());a=StURLSetVar2(a,"CalendarPeriod","month");this.Post(a)}Calendar.prototype.MoveWeek=CalMoveWeek;function CalMoveWeek(c){var a,b=this.givenDate;b.setUTCDate(this.givenDate.getUTCDate()+7*c);a=StURLSetVar("CalendarDate",b.getUTCFullYear()+"-"+St2Digits(b.getUTCMonth()+1)+"-"+b.getUTCDate());a=StURLSetVar2(a,"CalendarPeriod","week");this.Post(a)}Calendar.prototype.MoveDay=CalMoveDay;Calendar.prototype.MoveVDay=CalMoveDay;function CalMoveDay(c){var a,b=this.givenDate;b.setUTCDate(this.givenDate.getUTCDate()+c);a=StURLSetVar("CalendarDate",b.getUTCFullYear()+"-"+St2Digits(b.getUTCMonth()+1)+"-"+b.getUTCDate());a=StURLSetVar2(a,"CalendarPeriod","day");this.Post(a)}Calendar.prototype.MoveToDay=CalMoveToDay;function CalMoveToDay(d,c,b){var a;a=StURLSetVar("CalendarDate",d+"-"+St2Digits(c)+"-"+b);a=StURLSetVar2(a,"CalendarPeriod","day");this.Post(a)}Calendar.prototype.MoveToToday=CalMoveToToday;function CalMoveToToday(){var a=this.dopt.Today(),b=StURLSetVar("CalendarDate",a.getUTCFullYear()+"-"+St2Digits(a.getUTCMonth()+1)+"-"+a.getUTCDate());this.Post(b)}Calendar.prototype.Post=CalDoPost;function CalDoPost(a){if(this.stViewID&&this.stViewID.length)a=StURLSetVar2(a,"View",this.stViewID);SubmitFormPost(a)}function EditSeries(c){var b="";if(c)b=StSearchVar(c,"ID");else b=StURLGetVar("ID");if(b.length){var d=b.indexOf(".0.");if(d>0){var a="";if(c){a=window.location.href;var e=a.indexOf("?");if(e>0)c+=a.substring(e,a.length);a=StURLSetVar2(c,"ID",b.substr(0,d))}else a=StURLSetVar("ID",b.substr(0,d));window.location.href=a}}}function EditSeriesID(b,c){if(b.length){var a="";if(c){a=window.location.href;var d=a.indexOf("?");if(d>0)c+=a.substring(d,a.length);a=StURLSetVar2(c,"ID",b)}else a=StURLSetVar("ID",b);window.location.href=a}}function StURLSetVar(b,a){return StURLSetVar2(window.location.href,b,a)}function StViewURLSetVar(a,c,b){stUrl=window.location.href;p1=stUrl.lastIndexOf("/");if(p1>0)stUrl=stUrl.substring(0,p1+1)+a;return StURLSetVar2(stUrl,c,b)}function StURLSetVar2(a,c,f){var b=c+"="+f,e=a.indexOf("?");if(e!=-1){var d=a.indexOf("?"+c+"=",e);if(d==-1){d=a.indexOf("&"+c+"=",e);if(d!=-1)b="&"+b}else b="?"+b;if(d!=-1){var g=new RegExp("[&?]"+c+"=[^&]*","");a=a.replace(g,b)}else a=a+"&"+b}else a=a+"?"+b;return a}function StURLGetVar(b){var a=document.location.href;return StSearchVar(a,b)}function StSearchVar(b,d){var f=new RegExp("[?&]"+d+"=","g"),a=b.search(f);if(a==-1)return "";a+=d.length+2;var c=b.indexOf("&",a+1);if(c==-1)c=b.length;var e=b.substring(a,c);return e}function HighlightText(a,b){if(b!=""){a.colorTextSav=a.style.color;a.style.color=b}else a.style.color=a.colorTextSav}function Highlight(a,b,c){if(b!=""){a.colorBackSav=a.style.backgroundColor;a.colorTextSav=a.style.color;a.style.backgroundColor=b;a.style.color=c}else{a.style.backgroundColor=a.colorBackSav;a.style.color=a.colorTextSav}}Calendar.prototype.DPDayStyle=CalDPDayStyle;function CalDPDayStyle(b,c){var a="";if(b.getTime()==this.dateDP.getTime())a+=" class=ms-dpselectedday";else if(b.getUTCMonth()!=this.mon)a+=" class=ms-dpnonmonth";else a+=" class=ms-dpday";if(c)a+=' style:"font-weight: bold;"';return a}Calendar.prototype.StDownlevelBuild=CalStDownlevelBuild;function CalStDownlevelBuild(){var a,f=new Date,d,b,g,c;a='<TABLE CELLPADDING="2" CELLSPACING="0" WIDTH="100%" BORDER="1">\r';a+='<TR><TD class=ms-calhead><A class=ms-calhead TARGET=_self HREF="javascript:'+this.stObject+'.MoveDate(-1);"><B>&lt;</B></A></TD><TD class=ms-calhead colspan=5>'+this.StMonthYear()+'</TD><TD class=ms-calhead><A class=ms-calhead TARGET=_self HREF="javascript:'+this.stObject+'.MoveDate(1);"><B>&gt;</B></A></TD></TR>';a+="<tr>\r";for(b=0;b<7;b++)a+='<TD class=ms-calDOWDown HEIGHT="20" WIDTH="14%">&nbsp;'+Calendar.rgDOW[(b+this.dopt.dow)%7]+"&nbsp;</TD>\r";a+="</tr>\r";for(d=0;d<this.irwMax;d++){a+="<tr>\r";for(b=0;b<7;b++){this.SetDateFromGrid(f,d,b);a+='<TD class=ms-calDown HEIGHT="80" WIDTH="14%"'+this.DayStyle(f)+">&nbsp;"+f.getUTCDate()+"&nbsp;<br>\r";var e=this.mpEvents[d+"."+b];if(e!=null)for(c=0;c<e.length;c++)a+=StURL(e[c].stURL,e[c].stTitle)+"<br>\r";a+="</TD>"}a+="</tr>\r"}a+="</table>";return a}Calendar.prototype.SetDateFromGrid=CalSetDateFromGrid;function CalSetDateFromGrid(a,c,b){a.setTime(this.dateStart.getTime()+c*Calendar.msWeek+b*Calendar.msDay)}var L_NoTitle_Text="(No Title)";function CalEvent(a,b,c,d,h,l,e,m,j){this.dateStart=a;this.dateEnd=b;this.actualDateStart=c;this.actualDateEnd=d;this.stLocation=h;this.stDesc=l;this.stTitle=e;if(e.length==0)this.stTitle=L_NoTitle_Text;this.stURL=m;this.rgIcons=j;var n,o,i=MsFloorTime(a,Calendar.msDay,0),k=MsFloorTime(b,Calendar.msDay,1);if(i<k&&d.getTime()-c.getTime()>=Calendar.msDay)this.multiDay=true;else this.multiDay=false;var f=MsFloorTime(a,Calendar.msHour/4,0),g=MsFloorTime(b,Calendar.msHour/4,1);if(f<g)this.multiQuarter=true}CalEvent.prototype.FOverlap=EvtFOverlap;function EvtFOverlap(a){return a.dateStart<=this.dateEnd&&a.dateEnd>=this.dateStart}var L_Tip_Text="^1: ^2";CalEvent.prototype.StTip=EvtStTip;function EvtStTip(c){var a,b=StEvtTime(this,c,true);if(DateOptions.FHasTime(this.actualDateStart)||DateOptions.FHasTime(this.actualDateEnd))a=StBuildParam(L_Tip_Text,b,this.stTitle);else a=this.stTitle;if(!FBlankString(this.stLocation))a+="\r"+this.stLocation;if(!FBlankString(this.stDesc))a+="\r"+this.stDesc;return a}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)}var IMNControlObj=null,bIMNControlInited=false,IMNDictionaryObj=null,bIMNSorted=false,bIMNOnloadAttached=false,IMNOrigScrollFunc=null,bIMNInScrollFunc=false,IMNSortableObj=null,IMNHeaderObj=null,IMNNameDictionaryObj=null,IMNShowOfflineObj=null;function EnsureIMNControl(){if(!bIMNControlInited){if(browseris.ie5up&&browseris.win32);bIMNControlInited=true;if(IMNControlObj)IMNControlObj.OnStatusChange=IMNOnStatusChange}return IMNControlObj}function IMNImageInfo(){this.img=null;this.alt=""}var L_IMNOnline_Text="Available",L_IMNOffline_Text="Offline",L_IMNAway_Text="Away",L_IMNBusy_Text="Busy",L_IMNDoNotDisturb_Text="Do not disturb",L_IMNIdle_Text="May be away",L_IMNBlocked_Text="Blocked",L_IMNOnline_OOF_Text="Available (OOF)",L_IMNOffline_OOF_Text="Offline (OOF)",L_IMNAway_OOF_Text="Away (OOF)",L_IMNBusy_OOF_Text="Busy (OOF)",L_IMNDoNotDisturb_OOF_Text="Do not disturb (OOF)",L_IMNIdle_OOF_Text="May be away (OOF)";function IMNGetStatusImage(e,d){var b="blank.gif",a="";switch(e){case 0:b="imnon.png";a=L_IMNOnline_Text;break;case 11:b="imnonoof.png";a=L_IMNOnline_OOF_Text;break;case 1:if(d){b="imnoff.png";a=L_IMNOffline_Text}else{b="blank.gif";a=""}break;case 12:if(d){b="imnoffoof.png";a=L_IMNOffline_OOF_Text}else{b="blank.gif";a=""}break;case 2:b="imnaway.png";a=L_IMNAway_Text;break;case 13:b="imnawayoof.png";a=L_IMNAway_OOF_Text;break;case 3:b="imnbusy.png";a=L_IMNBusy_Text;break;case 14:b="imnbusyoof.png";a=L_IMNBusy_OOF_Text;break;case 4:b="imnaway.png";a=L_IMNAway_Text;break;case 5:b="imnbusy.png";a=L_IMNBusy_Text;break;case 6:b="imnaway.png";a=L_IMNAway_Text;break;case 7:b="imnbusy.png";a=L_IMNBusy_Text;break;case 8:b="imnaway.png";a=L_IMNAway_Text;break;case 9:b="imndnd.png";a=L_IMNDoNotDisturb_Text;break;case 15:b="imndndoof.png";a=L_IMNDoNotDisturb_OOF_Text;break;case 10:b="imnbusy.png";a=L_IMNBusy_Text;break;case 16:b="imnidle.png";a=L_IMNIdle_Text;break;case 17:b="imnidleoof.png";a=L_IMNIdle_OOF_Text;break;case 18:b="imnblocked.png";a=L_IMNBlocked_Text;break;case 19:b="imnidlebusy.png";a=L_IMNBusy_Text;break;case 20:b="imnidlebusyoof.png";a=L_IMNBusy_OOF_Text}var c=new IMNImageInfo;c.img=b;c.alt=a;return c}function IMNGetHeaderImage(){var a=new IMNImageInfo;a.img="imnhdr.gif";a.alt="";return a}function IMNIsOnlineState(a){if(a==1)return false;return true}function IMNSortList(e,c,d){var a=null,b=null;if(IMNSortableObj&&IMNSortableObj[e]){b=document.getElementById(e);while(b&&!(b.tagName=="TR"&&typeof b.Sortable!="undefined"))b=b.parentNode;a=b;while(a&&a.tagName!="TABLE")a=a.parentNode;if(a!=null&&b!=null){if(a.rows[1].style.display=="none")for(i=1;i<4;i++)a.rows[i].style.display="block";if(!IMNIsOnlineState(c)&&IMNIsOnlineState(d)){a.rows[2].style.display="none";i=3;while(a.rows[i].id!="Offline"&&a.rows[i].innerText<b.innerText)i++;a.moveRow(b.rowIndex,i);if(a.rows[a.rows.length-3].id=="Offline")a.rows[a.rows.length-2].style.display="block"}else if(IMNIsOnlineState(c)&&!IMNIsOnlineState(d)){if(b.rowIndex==3&&a.rows[b.rowIndex+1].id=="Offline")a.rows[2].style.display="block";if(a.rows[a.rows.length-3].id=="Offline")a.rows[a.rows.length-2].style.display="none";i=a.rows.length-2;while(a.rows[i-1].id!="Offline"&&a.rows[i].innerText>b.innerText)i--;a.moveRow(b.rowIndex,i)}}}}function IMNOnStatusChange(d,b,a){if(IMNDictionaryObj){var c=IMNGetStatusImage(b,IMNSortableObj[a]||IMNShowOfflineObj[a]);if(IMNDictionaryObj[a]!=b){if(bIMNSorted)IMNSortList(a,IMNDictionaryObj[a],b);IMNUpdateImage(a,c);IMNDictionaryObj[a]=b}}}function IMNUpdateImage(j,d){var a=document.images(j);if(a){var e=d.img,i=d.alt,c=a.src,g=c.lastIndexOf("/"),b=c.slice(0,g+1);b+=e;if(c==b&&e!="blank.gif")return;if(a.altbase)a.alt=a.altbase;else a.alt=i;var f=browseris.ie&&browseris.ie55up&&browseris.verIEFull<7,h=b.toLowerCase().indexOf(".png")>0;if(f)if(h){a.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+b+"),sizingMethod=scale,enabled=true);";a.src="/_layouts/images/blank.gif"}else{a.style.filter="";a.src=b}else a.src=b}}function IMNHandleAccelerator(){if(IMNControlObj)if(event.altKey&&event.shiftKey&&event.keyCode==121)IMNControlObj.DoAccelerator()}function IMNImageOnClick(){if(IMNControlObj){IMNShowOOUIKyb();IMNControlObj.DoAccelerator()}}function IMNGetOOUILocation(a){var e={},c=a,g=a,h=0,i=0,f=0,j=document.dir=="rtl";while(c&&c.tagName!="SPAN"&&c.tagName!="TABLE")c=c.parentNode;if(c){var d=c.tagName=="TABLE"?c.rows(0).cells(0).childNodes:c.childNodes,b;for(b=0;b<d.length;++b){if(d.item(b).tagName=="IMG"&&d.item(b).id){g=d.item(b);break}if(d.item(b).tagName=="A"&&d.item(b).childNodes.length>0&&d.item(b).childNodes.item(0).tagName=="IMG"&&d.item(b).childNodes.item(0).id){g=d.item(b).childNodes.item(0);break}}}a=g;while(a){if(j){if(a.scrollWidth>=a.clientWidth+a.scrollLeft)f=a.scrollWidth-a.clientWidth-a.scrollLeft;else f=a.clientWidth+a.scrollLeft-a.scrollWidth;h+=a.offsetLeft+f}else h+=a.offsetLeft-a.scrollLeft;i+=a.offsetTop-a.scrollTop;a=a.offsetParent}try{a=window.frameElement;while(a){if(j){if(a.scrollWidth>=a.clientWidth+a.scrollLeft)f=a.scrollWidth-a.clientWidth-a.scrollLeft;else f=a.clientWidth+a.scrollLeft-a.scrollWidth;h+=a.offsetLeft+f}else h+=a.offsetLeft-a.scrollLeft;i+=a.offsetTop-a.scrollTop;a=a.offsetParent}}catch(k){}e.objSpan=c;e.objOOUI=g;e.oouiX=h;e.oouiY=i;if(j)e.oouiX+=g.offsetWidth;return e}function IMNShowOOUIMouse(){IMNShowOOUI(0)}function IMNShowOOUIKyb(){IMNShowOOUI(1)}function IMNShowOOUI(g){if(browseris.ie5up&&browseris.win32){var c=window.event.srcElement,b=c,d=c,e=0,f=0;if(EnsureIMNControl()&&IMNNameDictionaryObj){var a=IMNGetOOUILocation(c);b=a.objSpan;d=a.objOOUI;e=a.oouiX;f=a.oouiY;var h=IMNNameDictionaryObj[d.id];if(b)b.onkeydown=IMNHandleAccelerator;IMNControlObj.ShowOOUI(h,g,e,f)}}}function IMNHideOOUI(){if(IMNControlObj){IMNControlObj.HideOOUI();return false}return true}function IMNScroll(){if(!bIMNInScrollFunc){bIMNInScrollFunc=true;IMNHideOOUI()}bIMNInScrollFunc=false;if(IMNOrigScrollFunc==IMNScroll)return true;return IMNOrigScrollFunc?IMNOrigScrollFunc():true}var imnCount=0,imnElems,imnElemsCount=0,imnMarkerBatchSize=4,imnMarkerBatchDelay=40;function ProcessImn(){if(EnsureIMNControl()&&IMNControlObj.PresenceEnabled){imnElems=document.getElementsByName("imnmark");imnElemsCount=imnElems.length;ProcessImnMarkers()}}function ProcessImnMarkers(){for(i=0;i<imnMarkerBatchSize;++i){if(imnCount==imnElemsCount)return;IMNRC(imnElems[imnCount].sip,imnElems[imnCount]);imnCount++}setTimeout("ProcessImnMarkers()",imnMarkerBatchDelay)}function IMNRC(e,g){if(e==null||e=="")return;if(browseris.ie5up&&browseris.win32){var b=g?g:window.event.srcElement,c=b,a=b.id,f=false;if(!IMNDictionaryObj){IMNDictionaryObj={};IMNNameDictionaryObj={};IMNSortableObj={};IMNShowOfflineObj={};if(!IMNOrigScrollFunc){IMNOrigScrollFunc=window.onscroll;window.onscroll=IMNScroll}}if(IMNDictionaryObj){if(!IMNNameDictionaryObj[a]){IMNNameDictionaryObj[a]=e;f=true}if(typeof IMNDictionaryObj[a]=="undefined")IMNDictionaryObj[a]=1;if(!IMNSortableObj[a]&&typeof b.Sortable!="undefined"){IMNSortableObj[a]=b.Sortable;if(!bIMNOnloadAttached){if(EnsureIMNControl()&&IMNControlObj.PresenceEnabled)window.attachEvent("onload",IMNSortTable);bIMNOnloadAttached=true}}if(!IMNShowOfflineObj[a]&&typeof b.ShowOfflinePawn!="undefined")IMNShowOfflineObj[a]=b.ShowOfflinePawn;if(f&&EnsureIMNControl()&&IMNControlObj.PresenceEnabled){var d=1,h;d=IMNControlObj.GetStatus(e,a);if(IMNIsOnlineState(d)||IMNSortableObj[a]||IMNShowOfflineObj[a]){h=IMNGetStatusImage(d,IMNSortableObj[a]||IMNShowOfflineObj[a]);IMNUpdateImage(a,h);IMNDictionaryObj[a]=d}}}if(f){var i=IMNGetOOUILocation(b);c=i.objSpan;if(c){c.onmouseover=IMNShowOOUIMouse;c.onfocusin=IMNShowOOUIKyb;c.onmouseout=IMNHideOOUI;c.onfocusout=IMNHideOOUI}}}}function IMNSortTable(){var a;for(a in IMNDictionaryObj)IMNSortList(a,1,IMNDictionaryObj[a]);bIMNSorted=true}function IMNRegisterHeader(){if(browseris.ie5up&&browseris.win32){var c=window.event.srcElement;if(!IMNHeaderObj)IMNHeaderObj={};if(IMNHeaderObj){var a=c.id;if(!IMNHeaderObj[a]){IMNHeaderObj[a]=a;var b;b=IMNGetHeaderImage();IMNUpdateImage(a,b)}}}}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}var _spBodyOnLoadFunctionNames;if(_spBodyOnLoadFunctionNames==null){_spBodyOnLoadFunctionNames=[];_spBodyOnLoadFunctionNames.push("_spBodyOnLoad");_spBodyOnLoadFunctionNames.push("_spRestoreScrollForDiv_rscr")}var _spOriginalFormAction,_spEscapedFormAction,_spFormOnSubmitCalled=false,_spBodyOnPageShowRegistered=false;function _spBodyOnPageShow(){_spFormOnSubmitCalled=false}function _spResetFormOnSubmitCalledFlag(){_spFormOnSubmitCalled=false}function _spBodyOnLoadWrapper(){if(!_spBodyOnPageShowRegistered&&typeof browseris!="undefined"&&!browseris.ie&&typeof window.addEventListener=="function"){window.addEventListener("pageshow",_spBodyOnPageShow,false);_spBodyOnPageShowRegistered=true}if(_spOriginalFormAction==null)if(document.forms.length>0){_spOriginalFormAction=document.forms[0].action;var b=window.location.href,a=b.indexOf("://");if(a>=0){var c=b.substring(a+3);a=c.indexOf("/");if(a>=0)b=c.substring(a)}_spEscapedFormAction=escapeUrlForCallback(b);document.forms[0].action=_spEscapedFormAction}_spFormOnSubmitCalled=false;if(typeof Sys!="undefined"&&typeof Sys.Net!="undefined"&&typeof Sys.Net.WebRequestManager!="undefined")Sys.Net.WebRequestManager.add_invokingRequest(_spResetFormOnSubmitCalledFlag);ProcessDefaultOnLoad(_spBodyOnLoadFunctionNames)}var _spSuppressFormOnSubmitWrapper=false;function _spFormOnSubmitWrapper(){if(_spSuppressFormOnSubmitWrapper)return true;if(_spFormOnSubmitCalled)return false;if(typeof _spFormOnSubmit=="function"){var b=_spFormOnSubmit(),a=false;if(typeof b==typeof a&&b==a)return false}RestoreToOriginalFormAction();_spFormOnSubmitCalled=true;return true}function RestoreToOriginalFormAction(){if(_spOriginalFormAction!=null){if(_spEscapedFormAction==document.forms[0].action)document.forms[0].action=_spOriginalFormAction;_spOriginalFormAction=null;_spEscapedFormAction=null}}function DefaultFocus(){if(typeof _spUseDefaultFocus!="undefined"){var a=document.getElementsByName("_spFocusHere"),b=null;if(a==null||a.length<=0)b=document.getElementById("_spFocusHere");else if(a!=null&&a.length>0)b=a[0];if(b!=null){var c=b.getElementsByTagName("a");if(c!=null&&c.length>0)try{c[0].focus()}catch(d){}}}}function ProcessDefaultOnLoad(onLoadFunctionNames){ProcessPNGImages();UpdateAccessibilityUI();ProcessImn();for(var i=0;i<onLoadFunctionNames.length;i++){var expr="if(typeof("+onLoadFunctionNames[i]+")=='function'){"+onLoadFunctionNames[i]+"();}";eval(expr)}if(typeof _spUseDefaultFocus!="undefined")DefaultFocus()}