﻿var L_ContainIllegalChar_Text="^1 contains illegal character '^2'.",L_ContainIllegalString_Text="^1 contains illegal characters or substring.",LegalUrlChars=[false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,true,true,false,false,true,false,false,true,true,true,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,false,true,false,true,false,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,false,false,false,false,false];function AdmBuildParam(b){var c,a;for(a=1;a<AdmBuildParam.arguments.length;a++){c=new RegExp("\\^"+a);b=b.replace(c,AdmBuildParam.arguments[a])}return b}function IndexOfIllegalCharInUrlLeafName(b){for(var a=0;a<b.length;a++){var c=b.charCodeAt(a);if(c<128&&(b.charAt(a)=="/"||!LegalUrlChars[c]))return a}return -1}function IndexOfIllegalCharInUrlPath(c){for(var a=0;a<c.length;a++){var b=c.charCodeAt(a);if(b<128&&!LegalUrlChars[b])return a}return -1}function UrlContainsIllegalStrings(a){if(a.indexOf("..")>=0||a.indexOf("//")>=0||a.indexOf("./")>=0||a.indexOf("/.")>=0||a.indexOf(".")==0||a.lastIndexOf(".")==a.length-1)return true;return false}function UrlLeafNameValidate(a,b){var c="";if(typeof a.MessagePrefix=="string")c=a.MessagePrefix;else c=a.id;var d=IndexOfIllegalCharInUrlLeafName(b.Value);if(d>=0){if(typeof a.errormessage=="string")a.errormessage=AdmBuildParam(L_ContainIllegalChar_Text,c,b.Value.charAt(d));b.IsValid=false}else if(UrlContainsIllegalStrings(b.Value)){if(typeof a.errormessage=="string")a.errormessage=AdmBuildParam(L_ContainIllegalString_Text,c);b.IsValid=false}else b.IsValid=true}function UrlPathValidate(a,b){var c="";if(typeof a.MessagePrefix=="string")c=a.MessagePrefix;else c=a.id;var d=IndexOfIllegalCharInUrlPath(b.Value);if(d>=0){if(typeof a.errormessage=="string")a.errormessage=AdmBuildParam(L_ContainIllegalChar_Text,c,b.Value.charAt(d));b.IsValid=false}else if(UrlContainsIllegalStrings(b.Value)){if(typeof a.errormessage=="string")a.errormessage=AdmBuildParam(L_ContainIllegalString_Text,c);b.IsValid=false}else b.IsValid=true}function IsCheckBoxListSelected(a){if(a==null)return false;var c=a.length;if(c==null)return a.checked;else for(var b=0;b<c;b++)if(a[b].checked)return true;return false}function STSValidatorEnable(c,b,d){var a=document.getElementById(c);if(a==null)return;if(d==true)a.enabled=b==true;else ValidatorEnable(a,b)}var L_Language_Text="1033",L_ClickOnce1_text="You are already attempting to save this item. If you attempt to save this item again, you may create duplicate information. Would you like to save this item again?",L_STSDelConfirm_Text="Are you sure you want to delete this item?",L_STSDelConfirm1_Text="Are you sure you want to delete this folder and all its contents?",L_NewDocLibTb1_Text="The document could not be created. \nThe required application may not be installed properly, or the template for this document library cannot be opened.\n\nPlease try the following:\n1. Check the General Settings for this document library for the name of the template, and install the application necessary for opening the template. If the application was set to install on first use, run the application and then try creating a new document again.\n\n2.  If you have permission to modify this document library, go to General Settings for the library and configure a new template.",L_NewDocLibTb2_Text="'New Document' requires a Windows SharePoint Services-compatible application and Microsoft Internet Explorer 5.0 or greater. To add a document to this document library, click the 'Upload Document' button.",L_NewFormLibTb1_Text="The form could not be created.\nThe required application may not be installed properly, or the template for this form library cannot be opened.\n\nPlease try the following:\n1. Check the General Settings for this form library for the name of the template, and install the application necessary for opening the template. If the application was set to install on first use, run the application and then try creating a new form again.\n\n2.  If you have permission to modify this form library, go to General Settings for the library and configure a new template.",L_NewFormLibTb2_Text="This feature requires Microsoft Internet Explorer 5.0 or later and a Windows SharePoint Services-compatible XML editor such as Microsoft Office InfoPath.",L_NewFormLibTb3_Text="The form(s) could not be merged.\nThe required application may not be installed properly, or the template for this form library cannot be opened.\n\nPlease try the following:\n1. Check the General Settings for this form library for the name of the template, and install the application necessary for opening the template. If the application was set to install on first use, run the application and then try creating a new form again.\n\n2.  If you have permission to modify this form library, go to General Settings for the library and configure a new template.",L_NewFormLibTb4_Text="Select the form(s) you want to merge, and then click 'Merge Forms' on the toolbar.",L_NewFormLibTb5_Text="Select the form(s) you want to relink, and then click 'Relink Forms' on the toolbar.",L_NewFormLibTb6_Text="Only 100 forms can be relinked at a time. Modify your selection and then try again.",L_NewFormClickOnce1_Text="New Folder",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 escapeProperlyCore(e,g){var c="",b="",d=0,i=" \"%<>'&";for(d=0;d<e.length;d++){var a=e.charCodeAt(d),f=e.charAt(d);if(g&&(f=="#"||f=="?")){c+=e.substr(d);break}if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||g&&(a>=32&&a<=95)&&i.indexOf(f)<0)c+=f;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<e.length-1){var a=(a&1023)<<10;d++;var h=e.charCodeAt(d);a|=h&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 escapeForSync(e){var b="",d=0,c=0,g="\\&|[]";for(d=0;d<e.length;d++){var a=e.charCodeAt(d),f=e.charAt(d);if(g.indexOf(f)>=0)b+="|";if(c&&a<=127){b+="]";c=0}if(!c&&a>127){b+="[";c=1}if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)b+=f;else if(a<=15)b+="%0"+a.toString(16).toUpperCase();else if(a<=127)b+="%"+a.toString(16).toUpperCase();else if(a<=255)b+="00"+a.toString(16).toUpperCase();else if(a<=4095)b+="0"+a.toString(16).toUpperCase();else b+=a.toString(16).toUpperCase()}if(c)b+="]";return b}function escapeProperly(a){return escapeProperlyCore(a,false)}var g_rgdwchMinEncoded=new Array([0,128,2048,65536,2097152,67108864,2147483648]);function Vutf8ToUnicode(e){var d=0,a="",b,h,c,f,g;while(d<e.length)if(e[d]<127)a+=String.fromCharCode(e[d++]);else{c=e[d++];f=c&32?c&16?3:2:1;b=c&255>>>2+f;while(f&&d<e.length){--f;c=e[d++];if(c==0)return a;if((c&192)!=128){a+="?";break}b=b<<6|c&63}if(f){a+="?";break}if(b<g_rgdwchMinEncoded[g]){a+="?";break}else if(b<=65535)a+=String.fromCharCode(b);else if(b<=1114111){b-=SURROGATE_OFFSET;a+=String.fromCharCode(HIGH_SURROGATE_BITS|b>>>10);a+=String.fromCharCode(LOW_SURROGATE_BITS|b&1023)}else a+="?"}return a}function unescapeProperlyInternal(e){var d=0,g=0,c="",f=[],a=0,b,h;while(d<e.length)if(e.charAt(d)=="%")if(e.charAt(++d)=="u"){b="";for(g=0;g<4&&d<e.length;++g)b+=e.charAt(++d);while(b.length<4)b+="0";h=parseInt(b,16);if(isNaN(h))c+="?";else c+=String.fromCharCode(h)}else{b="";for(g=0;g<2&&d<e.length;++g)b+=e.charAt(d++);while(b.length<2)b+="0";h=parseInt(b,16);if(isNaN(h)){if(a){c+=Vutf8ToUnicode(f);a=0;f.length=a}c+="?"}else f[a++]=h}else{if(a){c+=Vutf8ToUnicode(f);a=0;f.length=a}c+=e.charAt(d++)}if(a){c+=Vutf8ToUnicode(f);a=0;f.length=a}return c}function unescapeProperly(b){var a=null;if((browseris.ie55up||browseris.nav6up)&&typeof decodeURIComponent!="undefined")a=decodeURIComponent(b);else a=unescapeProperlyInternal(b);return a}function encodeScriptQuote(d){var b="",a=0;for(a=0;a<d.length;a++){var c=d.charAt(a);if(c=="'")b+="%27";else b+=c}return b}function STSHtmlEncode(d){var a="",b=0;for(b=0;b<d.length;b++){var c=d.charAt(b);switch(c){case "<":a+="&lt;";break;case ">":a+="&gt;";break;case "&":a+="&amp;";break;case '"':a+="&quot;";break;case "'":a+="&#39;";break;default:a+=c}}return a}function StAttrQuote(a){a=a.toString();a=a.replace(/&/g,"&amp;");a=a.replace(/\"/g,"&quot;");a=a.replace(/\r/g,"&#13;");return '"'+a+'"'}function STSScriptEncode(d){var a="",c=0;for(c=0;c<d.length;c++){var b=d.charCodeAt(c);if(b>4095)a+="\\u"+b.toString(16).toUpperCase();else if(b>255)a+="\\u0"+b.toString(16).toUpperCase();else if(b>127)a+="\\u00"+b.toString(16).toUpperCase();else switch(d.charAt(c)){case "\\":a+="\\\\";break;case '"':a+='\\"';break;case "\r":a+="\\r";break;case "\n":a+="\\n";break;case "'":a+="\\'";break;case "<":a+="\\u003c";break;case ">":a+="\\u003e";break;default:a+=d.charAt(c)}}return a}function STSScriptEncodeWithQuote(a){return '"'+STSScriptEncode(a)+'"'}function makeAbsUrl(a){if(a.length>0&&"/"==a.substr(0,1))a=window.location.protocol+"//"+window.location.host+a;return a}function FilterNoteField(c,d,f,k){if(k!=13)return;event.returnValue=false;var a=window.location.href;pagedPart=/&Paged=TRUE&p_[^&]*&PageFirstRow=[^&]*/ig;a=a.replace(pagedPart,"");viewGuid=GetUrlKeyValue("View");if(c.toUpperCase()!=viewGuid.toUpperCase()){var g=escapeProperly(c);if(g.toUpperCase()!=viewGuid.toUpperCase()){var j=/\?[^?]*/i,e=a.indexOf("?");if(e!=-1)a=a.replace(j,"?View="+c);else a=a+"?View="+c}}var b=a.match("FilterField([0-9]+)="+d);if(!b){var e=a.indexOf("?");if(e!=-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(f);a=a.replace("Filter=1&","")}else{filterNo=parseInt(b[1]);var h=a.match("&FilterValue"+filterNo+"=[^&]*");strTemp="&"+b[0]+h[0];strNewFilter="&FilterField"+b[1]+"="+d+"&FilterValue"+b[1]+"="+escapeProperly(f);a=a.replace(strTemp,strNewFilter);a=a.replace("Filter=1&","")}window.location.href=STSPageUrlValidation(a)}function SelectField(b,i){var a=window.location.href,e=window.location.hash,c=false,d=/\#.*/i;a=a.replace(d,"");viewGuid=GetUrlKeyValue("View");pageView=GetUrlKeyValue("PageView");if(b.toUpperCase()!=viewGuid.toUpperCase()){var f=escapeProperly(b);if(f.toUpperCase()!=viewGuid.toUpperCase()){var d=/\?[^?]*/i,h=a.indexOf("?");if(h!=-1)a=a.replace(d,"?View="+b);else a=a+"?View="+b;c=true}}if(!c&&GetUrlKeyValue("SelectedID")!=""){var g=/&SelectedID=[^&]*/ig;a=a.replace(g,"")}a=a+"&SelectedID=";a=a+i;if(c&&pageView!="")a=a+"&PageView="+pageView;if(e!="")a=a+e;SubmitFormPost(a)}function FilterField(c,d,f,g){var a=window.location.href;pagedPart=/&Paged=TRUE&p_[^&]*&PageFirstRow=[^&]*/ig;a=a.replace(pagedPart,"");viewGuid=GetUrlKeyValue("View");if(c.toUpperCase()!=viewGuid.toUpperCase()){var h=escapeProperly(c);if(h.toUpperCase()!=viewGuid.toUpperCase()){var l=/\?[^?]*/i,e=a.indexOf("?");if(e!=-1)a=a.replace(l,"?View="+c);else a=a+"?View="+c}}var b=a.match("FilterField([0-9]+)="+d+"&");if(!b)if(0==g){a=a.replace("Filter=1&","");a=a.replace("?Filter=1","")}else{var e=a.indexOf("?");if(e!=-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(f);a=a.replace("Filter=1&","")}else{filterNo=parseInt(b[1]);var k=a.match("FilterValue"+filterNo+"=[^&]*");strTemp="&"+b[0]+k[0];if(0==g){a=a.replace(strTemp,"");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{strNewFilter="&FilterField"+b[1]+"="+d+"&FilterValue"+b[1]+"="+escapeProperly(f);a=a.replace(strTemp,strNewFilter);a=a.replace("Filter=1&","")}}SubmitFormPost(a)}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(b){if(typeof MSOWebPartPageFormName!="undefined"){var a=document.forms[MSOWebPartPageFormName];if(null!=a){a.action=STSPageUrlValidation(b);a.method="POST";if(isPortalTemplatePage(b))a.target="_top";if(!bValidSearchTerm)ClearSearchTerm("");a.submit()}}}function TrimSpaces(c){var a,b;c=c.toString();var d=c.length;for(a=0;a<d;a++)if(c.charAt(a)!=" ")break;if(a==d)return "";for(b=d-1;b>a;b--)if(c.charAt(b)!=" ")break;b++;return c.substring(a,b)}function TrimWhiteSpaces(c){var a,b;c=c.toString();var d=c.length;for(a=0;a<d;a++){ch=c.charAt(a);if(ch!=" "&&ch!="\t"&&ch!="\n"&&ch!="\r"&&ch!="\f")break}if(a==d)return "";for(b=d-1;b>a;b--){ch=c.charAt(b);if(ch!=" "&&ch!="\t"&&ch!="\n"&&ch!="\r"&&ch!="\f")break}b++;return c.substring(a,b)}var g_varSkipRefreshOnFocus=0;function RefreshOnFocus(){if(typeof g_varSkipRefreshOnFocus=="undefined"||!g_varSkipRefreshOnFocus)window.location.href=window.location}function DisableRefreshOnFocus(){g_varSkipRefreshOnFocus=1}function SetWindowRefreshOnFocus(){window.onbeforeunload=DisableRefreshOnFocus;window.onfocus=RefreshOnFocus}function STSPageUrlValidation(a){if(a.substr(0,4)!="http"){var b="Invalid page URL: ";alert(b+a);return ""}else return a}function GetSource(b){var a=GetUrlKeyValue("Source");if(a=="")if(b!=null&&b!="")a=b;else a=escapeProperly(window.location.href);return STSPageUrlValidation(a)}function GetUrlKeyValue(c,a){var d="";if(a==null)a=window.location.href+"";var b=a.indexOf("&"+c+"=");if(b==-1)b=a.indexOf("?"+c+"=");if(b!=-1){ndx2=a.indexOf("&",b+1);if(ndx2==-1)ndx2=a.length;d=a.substring(b+c.length+2,ndx2)}return d}function GoToPage(b){var c=b.indexOf("?")>=0?"&":"?",a=GetSource();if(a!=null&&a!="")b+=c+"Source="+a;STSNavigate(b)}function isPortalTemplatePage(a){if(GetUrlKeyValue("PortalTemplate")=="1"||GetUrlKeyValue("PortalTemplate",a)=="1"||currentCtx!=null&&currentCtx.isPortalTemplate)return true;else return false}function STSNavigate(a){if(isPortalTemplatePage(a))window.top.location=STSPageUrlValidation(a);else window.location=STSPageUrlValidation(a)}function NewItem(a){GoToPage(a)}function EditItem(a){GoToPage(a)}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,d,e){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="+d;a+="&Subject="+e;GoToPage(a)}}function GoBacktoCurrentIssue(a,b){a+="?ID="+b;GoToPage(a)}function RemoveRelated(f,c){var d="Removing an issue from this list removes only its relationships to the related items. The related items themselves are not affected.";if(confirm(d)){var e="idRelatedIssueRow"+c;document.getElementsByName("RelatedIssueToBeRemovedFromServer").item(0).value+=c+";";var a=document.getElementById("idRelatedIssueTable");if(a!=null){var b=a.rows.item(e);if(b!=null)a.deleteRow(b.rowIndex);if(a.rows.length==1){a.style.display="none";document.getElementById("idRelatedIssueHeadtable").style.display="none"}}}}var fSSImporter=false,SSImporterObj;function CatchCreateError(){return true}function EnsureSSImporter(){if(!fSSImporter)if(browseris.ie5up&&browseris.win32){var a="";a+="try";a+="{";a+='    SSImporterObj = new ActiveXObject("SharePoint.SpreadsheetLauncher.1");';a+="    if (SSImporterObj)";a+="        fSSImporter = true;";a+="} catch (e)";a+="{";a+="    fSSImporter = false;";a+="};";var b=new Function(a);b()}else{window.onerror=CatchCreateError;SSImporterObj=new ActiveXObject("SharePoint.SpreadsheetLauncher.1");if(SSImporterObj)fSSImporter=true}return fSSImporter}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(b)+"&Source="+GetSource()}function GetStssyncAppName(e){if(browseris.ie5up&&browseris.win32)try{var b,a=new ActiveXObject("SharePoint.StssyncHandler");if(!a||!(b=a.GetStssyncAppName()))return false;else{var c="Link to ",d="";return c+b+d}}catch(f){return false}else return e}function ExportHailStorm(e,b,f,g,h,i){var d=500,a="stssync://sts/?ver=1.0&type="+escapeProperly(e)+"&cmd=add-folder"+"&base-url="+escapeForSync(b)+"&list-url="+escapeForSync("/"+i.substr(b.length+1))+"&guid="+escapeProperly(f)+"&site-name="+escapeForSync(g)+"&list-name="+escapeForSync(h),c="The title of the site or list is too long. Shorten the title and try again.";if(a.length>d)alert(c);else try{window.location.href=a}catch(k){}}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 a="";a+="try";a+="{";a+='    ListCtrlObj = new ActiveXObject("ListNet.ListNet.11");';a+="    if (ListCtrlObj)";a+="        fListControl = true;";a+="} catch (e)";a+="{";a+="    fListControl = false;";a+="};";var b=new Function(a);b()}else{window.onerror=CatchListCreateError;ListCtrlObj=new ActiveXObject("ListNet.ListNet.11");if(ListCtrlObj)fListControl=true}}ListCtrlObj=null;return fListControl}function EditInGrid(b,a){EnsureListControl();if(fListControl){encViewId=escapeProperly(a);strDocUrl=b+"?ShowInGrid=True&View="+encViewId;pageView=GetUrlKeyValue("PageView");if(pageView!="")strDocUrl=strDocUrl+"&PageView="+pageView;showWebPart=GetUrlKeyValue("ShowWebPart");if(showWebPart!="")strDocUrl=strDocUrl+"&ShowWebPart="+showWebPart;viewId=GetUrlKeyValue("View");if(viewId.toUpperCase()==a.toUpperCase()||viewId.toUpperCase()==encViewId.toUpperCase()){rootFolder=GetUrlKeyValue("RootFolder");if(rootFolder!="")strDocUrl=strDocUrl+"&RootFolder="+rootFolder}SubmitFormPost(strDocUrl)}else if(!fListErrorShown){alert(L_EditInGrid_Text);fListErrorShown=true}}function ExitGrid(e){var a,b,d,c;a=e;b=GetUrlKeyValue("PageView");d=GetUrlKeyValue("View");if(d!=""){a=a+"?View="+d;c=GetUrlKeyValue("RootFolder");if(c!="")a=a+"&RootFolder="+c;if(b!="")a=a+"&PageView="+b;showWebPart=GetUrlKeyValue("ShowWebPart");if(showWebPart!="")a=a+"&ShowWebPart="+showWebPart;a=a+"&ShowInGrid=HTML"}else{a=a+"?ShowInGrid=HTML";if(b!="")a=a+"&PageView="+b;showWebPart=GetUrlKeyValue("ShowWebPart");if(showWebPart!="")a=a+"&ShowWebPart="+showWebPart}SubmitFormPost(a)}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 d=/&*Paged=TRUE/ig;a=a.replace(d,"");var c=/&p_[^&]*/ig;a=a.replace(c,"");var e=/&PageFirstRow=[^&]*/ig;a=a.replace(e,"");var f=/\?Filter=1&*/ig;a=a.replace(f,"?");var g=/&Filter=1/ig;a=a.replace(g,"");var b=/\?$/;a=a.replace(b,"");return a}function ClearSearchTerm(c){if(typeof MSOWebPartPageFormName!="undefined"){var b=document.forms[MSOWebPartPageFormName];if(null!=b)if(c!=null){var a=b["SearchString"+c];if(a!=null)a.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){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(a,b){if(IsKeyDownSubmit(a)){SubmitSearchRedirect(b);return false}return true}function AlertAndSetFocus(b,a){a.focus();a.select();window.alert(b)}function AlertAndSetFocusForDropdown(a,b){b.focus();window.alert(a)}function setElementValue(b,c){var a=document.getElementsByName(b).item(0);if(a==null)return false;a.value=c;return true}function GetSelectedValue(a){if(a&&a.selectedIndex>-1)return a.options[a.selectedIndex].value;else return ""}function GetSelectedText(a){if(a&&a.selectedIndex>-1)return a.options[a.selectedIndex].text;else return ""}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,L_EditDocumentProgIDError_Text="'Edit Document' requires a Windows SharePoint Services-compatible application and Microsoft Internet Explorer 5.0 or greater.",L_EditDocumentRuntimeError_Text="The document could not be edited.\nThe required application may not be installed properly, or the requested document cannot be opened.\n\nPlease ensure that the necessary application is installed and that the path to the document is correct. If the application was set to install on first use, run the application and then try editing a document again.";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){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(a,c,d){var b;if(a.charAt(0)=="/"||a.substr(0,3).toLowerCase()=="%2f")a=document.location.protocol+"//"+document.location.host+a;try{b=new ActiveXObject(d+".2");if(!b.EditDocument2(window,a,c))alert(L_EditDocumentRuntimeError_Text);window.onfocus=RefreshOnNextFocus;return}catch(e){}try{b=new ActiveXObject(d+".1");window.onfocus=null;if(SzExtension(a)=="ppt"&&c=="")c="PowerPoint.Slide";if(!b.EditDocument(a,c))alert(L_EditDocumentRuntimeError_Text);SetWindowRefreshOnFocus();return}catch(e){alert(L_EditDocumentProgIDError_Text)}}function RefreshOnNextFocus(){SetWindowRefreshOnFocus()}function createNewDocumentWithProgID(d,e,f,h){var a,b,g,c=false;if(h)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,d,e))alert(b);c=a.PromptedOnLastOpen();if(c)window.onfocus=RefreshOnNextFocus;else SetWindowRefreshOnFocus();return}catch(i){}try{a=new ActiveXObject(f+".1");window.onfocus=null;if(!a.CreateNewDocument(d,e))alert(b);SetWindowRefreshOnFocus();return}catch(i){alert(g)}}function retrieveCurrentThemeLink(){var c,b=document.getElementsByTagName("link");for(var a=0;a<b.length;a++)if(b[a].type=="text/css"&&b[a].id=="onetidThemeCSS")c=b[a];if(c){var f=/(\.\.\/)+/,d=c.href,e=d.replace(f,"/");return e}}var L_strExpand_Text="Expand",L_strCollapse_Text="Collapse";function DiscussionBoard(b,a){CheckNav();if(!Array.prototype.push){function c(){for(var a=0;a<arguments.length;a++)this[this.length]=arguments[a];return this.length}Array.prototype.push=c}this.id=a;this.name="board"+a;this.rootPosts=[];this.allPosts=[];this.lastInsert=0;this.lastNode=0;this.expanded=false;this.threaded=b;this.initialized=false;this.widgetBaseSrc=null;this.init=function(){this.mainTable=document.getElementById(this.id);var b=this.mainTable.getElementsByTagName("A");if(this.threaded){for(var a=0;a<b.length;a++)if(b[a].name=="post")this.insert(new Post(b[a],this));this.setReplyCountAndIndent()}else for(var a=0;a<b.length;a++)if(b[a].name=="post")this.allPosts.push(new Post(b[a],this));this.initialized=true};this.setReplyCountAndIndent=function(){var b;for(var a=0;a<this.rootPosts.length;a++){b=this.rootPosts[a];b.setReplyCountAndIndent(true)}};this.insert=function(a){var b;for(var c=this.lastInsert;c<this.rootPosts.length;c++){b=this.rootPosts[c];if(a.id.indexOf(b.id)==0&&a.id!=b.id){a.hide();return b.insert(a)}else this.lastInsert++}this.rootPosts.push(a)};this.retrieve=function(d,f){if(this.threaded){var c,e;for(var a=0;a<this.rootPosts.length;a++){c=this.rootPosts[a];if(d.indexOf(c.id)==0)if(e=c.retrieve(d,f)!=-1)return e}}else{var b;for(var a=0;a<this.allPosts.length;a++){b=this.allPosts[a];if(d==b.id&&f==b.guid)return b}}return -1};this.expandCollapse=function(){if(!this.initialized)return false;if(this.expanded){var b;for(var a=0;a<this.rootPosts.length;a++){b=this.rootPosts[a];b.hideTextAndChildren()}this.expanded=false}else{var b;for(var a=0;a<this.rootPosts.length;a++){b=this.rootPosts[a];b.showTextAndChildren(true)}this.expanded=true}};this.handleClicks=function(a){if(!this.initialized)return true;a=a?a:window.event?window.event:"";if(a){var b;if(a.target)b=a.target;else b=a.srcElement;if(a.type=="keydown")if(String.fromCharCode(a.keyCode)=="\r")b=b.firstChild;else return true;if(b)if(b.name&&"widget"==b.name.valueOf()){srcPath=b.getAttribute("src");if(srcPath){index=srcPath.lastIndexOf("/");imgName=srcPath.slice(index+1);if(imgName.valueOf()=="discbul.gif"||imgName.valueOf()!="plus.gif"&&imgName.valueOf()!="minus.gif")return true;var c,d;if(a.type=="click"||a.type=="keydown"){c=this.retrieve(b.id,b.parentNode.parentNode.parentNode.parentNode.parentNode.getAttribute("PostID"));this.lastNode=c;d=imgName.valueOf()=="plus.gif"?"expand":"collapse"}else if(a.type=="dblclick"){c=this.lastNode;d=imgName.valueOf()=="plus.gif"?"collapse":"expandRecursively"}switch(d){case "expand":if(this.threaded)c.showTextAndChildren(false);else c.showText();break;case "expandRecursively":if(this.threaded)c.showTextAndChildren(true);else c.showText();break;case "collapse":if(this.threaded){c.hideTextAndChildren();this.expanded=false}else c.hideText()}}}}return true}}function Post(a,b){this.board=b;this.depth=0;this.replyCount=0;this.lastInsert=0;this.childNodes=[];this.anchor=a;this.widget=a.firstChild;this.widgetPadding=this.widget.parentNode.parentNode;if(!this.board.widgetBaseSrc){currentWidgetSrcPath=this.widget.getAttribute("src");marker=currentWidgetSrcPath.lastIndexOf("/");this.board.widgetBaseSrc=currentWidgetSrcPath.slice(0,marker+1)}this.id=this.widget.id;this.guid=this.widgetPadding.parentNode.parentNode.parentNode.getAttribute("PostID");if(this.board.threaded){this.indent=a.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.firstChild;if(browseris.ie&&!browseris.mac)this.body=this.indent.parentNode.childNodes[1].childNodes[1];else this.body=this.indent.parentNode.childNodes[1].childNodes[2];this.row=this.indent.parentNode.parentNode.parentNode.parentNode.parentNode;this.reply=this.row.childNodes[1];this.bodyPadding=this.body.firstChild.firstChild.firstChild;this.bodyPadding.setAttribute("width",8)}else this.body=a.parentNode.parentNode.parentNode.parentNode.parentNode.childNodes[1];this.insert=function(a){this.replyCount++;a.depth++;var b;for(var c=this.lastInsert;c<this.childNodes.length;c++){b=this.childNodes[c];if(a.id.indexOf(b.id)==0&&a.id!=b.id)return b.insert(a);else this.lastInsert++}this.childNodes.push(a)};this.retrieve=function(d,e){var a,c;for(var b=0;b<this.childNodes.length;b++){a=this.childNodes[b];if(d.indexOf(a.id)==0)if(c=a.retrieve(d,e)!=-1)return c}if(this.guid==e)return this;else return -1};this.show=function(){this.row.style.display=""};this.hide=function(){this.row.style.display="none"};this.showTextThreaded=function(){this.show();this.widget.src=this.board.widgetBaseSrc+"minus.gif";this.widget.alt=L_strCollapse_Text;this.body.style.display=""};this.showText=function(){this.widget.src=this.board.widgetBaseSrc+"minus.gif";this.widget.alt=L_strCollapse_Text;this.body.style.display=""};this.hideText=function(){this.widget.src=this.board.widgetBaseSrc+"plus.gif";this.widget.alt=L_strExpand_Text;if(browseris.nav6)this.body.setAttribute("style","display: none");else this.body.style.display="none"};this.showTextAndChildren=function(c){this.showTextThreaded();if(c){var b;for(var a=0;a<this.childNodes.length;a++){b=this.childNodes[a];b.showTextAndChildren(c)}}else{var b;for(var a=0;a<this.childNodes.length;a++){b=this.childNodes[a];b.show()}}};this.hideTextAndChildren=function(){this.hideText();var a;for(var b=0;b<this.childNodes.length;b++){a=this.childNodes[b];a.hide();a.hideTextAndChildren()}};this.setReplyCountAndIndent=function(c){this.reply.innerHTML=this.replyCount;this.indent.setAttribute("width",this.depth*16);if(c){var b;for(var a=0;a<this.childNodes.length;a++){b=this.childNodes[a];b.setReplyCountAndIndent(c)}}};this.hideText();this.widget.parentNode.style.cursor="hand";this.widgetPadding.style.paddingTop="2px"}function CheckNav(){if(browseris.nav4){var a="View requires Internet Explorer or Netscape 6.0 for Windows. Please use the Summary view";alert(a);window.back();history.back()}return}function ExpCollGroup(b,c){if(browseris.nav)return;viewTable=document.getElementById("titl"+b).parentNode;tbodyTags=viewTable.getElementsByTagName("TBODY");numElts=tbodyTags.length;len=b.length;img=document.getElementById(c);srcPath=img.src;index=srcPath.lastIndexOf("/");c=srcPath.slice(index+1);if(c=="plus.gif"){fOpen=true;displayStr="";img.src="/_layouts/images/minus.gif"}else{fOpen=false;displayStr="none";img.src="/_layouts/images/plus.gif"}for(var d=0;d<numElts;d++){var a=tbodyTags[d];if(a.id!=null&&a.id.length>len+4&&b==a.id.slice(4).substr(0,len)){if(fOpen){index=a.id.indexOf("_",len+4);if(index!=-1){index=a.id.indexOf("_",index+1);if(index!=-1)continue}}a.style.display=displayStr;if(fOpen&&a.id.substr(0,4)=="titl"){imgObj=document.getElementById("img_"+a.id.slice(4));imgObj.src="/_layouts/images/plus.gif"}}}}function ExpGroupBy(d){if(browseris.nav)return;if(browseris.w3c&&!browseris.ie)document.all=document.getElementsByTagName("*");docElts=document.all;numElts=docElts.length;img=d.children[0];srcPath=img.src;index=srcPath.lastIndexOf("/");imgName=srcPath.slice(index+1);if(imgName=="plus.gif"){fOpen=true;displayStr="block";img.src="/_layouts/images/minus.gif"}else{fOpen=false;displayStr="none";img.src="/_layouts/images/plus.gif"}oldName=img.name;img.name=img.alt;img.alt=oldName;spanNode=img;while(spanNode!=null){spanNode=spanNode.parentElement;if(spanNode!=null&&spanNode.id!=null&&spanNode.id.length>5&&spanNode.id.substr(0,5)=="group")break}parentNode=spanNode;while(parentNode!=null){parentNode=parentNode.parentElement;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 b=0;b<numElts;b++){var a=docElts(b);if(a==spanNode)break}ID=spanNode.id.slice(5);for(var c=b+1;c<numElts;c++){var a=docElts(c);if(a.id.length>5&&a.id.substr(0,5)=="group"){curID=a.id.slice(5);if(curID<=ID)return}if(a!=img&&a.tagName=="IMG"&&a.src&&a.src.slice(a.src.length-25)=="/_layouts/images/plus.gif"){a.src="/_layouts/images/minus.gif";oldName=a.name;a.name=a.alt;a.alt=oldName}if(a.tagName==spanNode.tagName&&a.id!="footer")a.style.display=displayStr;if(a.tagName=="TABLE"&&lastNode==null||a==lastNode)break}}var BASETYPE_GENERIC_LIST=0,BASETYPE_DOCUMENT_LIBRARY=1,BASETYPE_SHARED_TEMPLATES=2,BASETYPE_DISCUSSION=3,BASETYPE_SURVEY=4,BASETYPE_ISSUE=5,LISTTEMPLATE_GENERIC_LIST=100,LISTTEMPLATE_DOCUMENT_LIBRARY=101,LISTTEMPLATE_SURVEY=102,LISTTEMPLATE_LINKS=103,LISTTEMPLATE_ANNOUNCEMENTS=104,LISTTEMPLATE_CONTACTS=105,LISTTEMPLATE_EVENTS=106,LISTTEMPLATE_TASKS=107,LISTTEMPLATE_DISCUSSION=108,LISTTEMPLATE_IMAGE_LIBRARY=109,LISTTEMPLATE_ISSUE_TRACKER=1100,LISTTEMPLATE_MEETINGS=200,LISTTEMPLATE_MEETING_USER=202,LISTTEMPLATE_MY_DOCUMENTS=2002,LISTTEMPLATE_PRIVATE_DOCUMENTS=2003;function SzExtension(a){var c=new String(a),b=/^.*\.([^\.]*)$/;return c.replace(b,"$1").toLowerCase()}var v_stsOpenDoc=null,v_strStsOpenDoc=null;function StsOpenEnsureEx(a){if(v_stsOpenDoc==null||v_strStsOpenDoc!=a);return v_stsOpenDoc}function DispDocItem(){return}function DispDocItemEx(c,k,l,m,e){if(!browseris.ie||!browseris.win32){itemTable=FindSTSMenuTable(c);if(itemTable==null)return true;var i=new Function("setupMenuContext("+itemTable.getAttribute("CTXName")+");");i();var g=GetRootFolder(currentCtx);if(itemTable.getAttribute("FSObjType")!=1&&currentCtx.displayFormUrl!=null)c.href=currentCtx.displayFormUrl+"?ID="+itemTable.getAttribute("ItemId")+"&Source="+GetSource()+g;return true}var a,b,j,d,c,h=document.getElementById("FileDialogViewTable");if(h!=null){event.cancelBubble=false;event.returnValue=false;return}b=c.href;j=SzExtension(b);if(e!="")a=StsOpenEnsureEx(e);if(a==null){if(k=="TRUE"&&l=="TRUE"&&m=="TRUE"){itemTable=FindSTSMenuTable(c);if(itemTable==null)return;event.cancelBubble=true;event.returnValue=false;var f=new Function("return "+itemTable.getAttribute("CTXName")+".HttpRoot;");GoToPage(f()+"/_layouts/"+L_Language_Text+"/htmltrverify.aspx?doc="+escapeProperly(b))}return}d=a.ViewDocument2(window,b);a=null;if(d){event.cancelBubble=true;event.returnValue=false}return}function ViewDoc(){return false}function PortalPinToMyPage(a,b,c){a.action=b+"_vti_bin/portalapi.aspx?Cmd=PinToMyPage";a.ReturnUrl.value=window.location.href;a.ListViewUrl.value=MakeMtgInstanceUrl(a.ListViewUrl.value,c);a.submit()}var L_CutToolTip_TEXT="Cut",L_CopyToolTip_TEXT="Copy",L_PasteToolTip_TEXT="Paste",L_BoldToolTip_TEXT="Bold",L_ItalicToolTip_TEXT="Italic",L_UnderlineToolTip_TEXT="Underline",L_JustifyLeftToolTip_TEXT="Align Left",L_JustifyCenterToolTip_TEXT="Center",L_JustifyRightToolTip_TEXT="Align Right",L_OrderedListToolTip_TEXT="Numbered List",L_UnorderedListToolTip_TEXT="Bulletted List",L_OutdentToolTip_TEXT="Decrease Indent",L_IndentToolTip_TEXT="Increase Indent",L_ForeColorToolTip_TEXT="Text Color",L_BackColorToolTip_TEXT="Background Color",L_LTRToolTip_TEXT="Left-to-Right",L_RTLToolTip_TEXT="Right-to-Left",L_CreateLinkToolTip_TEXT="Insert Hyperlink",L_InsertImageToolTip_TEXT="Insert Image",L_FontNameLabel_TEXT="Font",L_FontNameToolTip_TEXT="Font",L_FontSizeLabel_TEXT="Size",L_FontSizeToolTip_TEXT="Font Size",L_ExampleText_TEXT="Example Text",L_EditorIFrameTitle_TEXT="Rich Text Editor",L_Black_TEXT="Black",L_Brown_TEXT="Brown",L_OliveGreen_TEXT="Olive Green",L_DarkGreen_TEXT="Dark Green",L_DarkTeal_TEXT="Dark Teal",L_DarkBlue_TEXT="Dark Blue",L_Indigo_TEXT="Indigo",L_Gray80_TEXT="Gray 80%",L_DarkRed_TEXT="Dark Red",L_Orange_TEXT="Orange",L_DarkYellow_TEXT="Dark Yellow",L_Green_TEXT="Green",L_Teal_TEXT="Teal",L_Blue_TEXT="Blue",L_BlueGray_TEXT="Blue Gray",L_Gray50_TEXT="Gray 50%",L_Red_TEXT="Red",L_LightOrange_TEXT="Light Orange",L_Lime_TEXT="Lime",L_SeaGreen_TEXT="Sea Green",L_Aqua_TEXT="Aqua",L_LightBlue_TEXT="Light Blue",L_Violet_TEXT="Violet",L_Gray40_TEXT="Gray 40%",L_Pink_TEXT="Pink",L_Gold_TEXT="Gold",L_Yellow_TEXT="Yellow",L_BrightGreen_TEXT="Bright Green",L_Turquoise_TEXT="Turquoise",L_SkyBlue_TEXT="Sky Blue",L_Plum_TEXT="Plum",L_Gray25_TEXT="Gray 25%",L_Rose_TEXT="Rose",L_Tan_TEXT="Tan",L_LightYellow_TEXT="Light Yellow",L_LightGreen_TEXT="Light Green",L_LightTurquoise_TEXT="Light Turquoise",L_PaleBlue_TEXT="Pale Blue",L_Lavender_TEXT="Lavender",L_White_TEXT="White",L_Font1_TEXT="Arial",L_Font2_TEXT="Courier",L_Font3_TEXT="Tahoma",L_Font4_TEXT="Times",L_Font5_TEXT="Verdana",L_Font6_TEXT="",L_Font7_TEXT="",L_Font8_TEXT="",L_BoldKey_TEXT="B",L_BoldShiftKey_TEXT="false",L_BoldAltKey_TEXT="false",L_ItalicKey_TEXT="I",L_ItalicShiftKey_TEXT="false",L_ItalicAltKey_TEXT="false",L_UnderlineKey_TEXT="U",L_UnderlineShiftKey_TEXT="false",L_UnderlineAltKey_TEXT="false",L_JustifyLeftKey_TEXT="L",L_JustifyLeftShiftKey_TEXT="false",L_JustifyLeftAltKey_TEXT="false",L_JustifyCenterKey_TEXT="E",L_JustifyCenterShiftKey_TEXT="false",L_JustifyCenterAltKey_TEXT="false",L_JustifyRightKey_TEXT="R",L_JustifyRightShiftKey_TEXT="false",L_JustifyRightAltKey_TEXT="false",L_SelectFontNameKey_TEXT="F",L_SelectFontNameShiftKey_TEXT="true",L_SelectFontNameAltKey_TEXT="false",L_SelectFontSizeKey_TEXT="P",L_SelectFontSizeShiftKey_TEXT="true",L_SelectFontSizeAltKey_TEXT="false",L_OutdentKey_TEXT="M",L_OutdentShiftKey_TEXT="true",L_OutdentAltKey_TEXT="false",L_IndentKey_TEXT="M",L_IndentShiftKey_TEXT="false",L_IndentAltKey_TEXT="false",L_UnorderedListKey_TEXT="L",L_UnorderedListShiftKey_TEXT="true",L_UnorderedListAltKey_TEXT="false",L_OrderedListKey_TEXT="E",L_OrderedListShiftKey_TEXT="true",L_OrderedListAltKey_TEXT="false",L_CreateLinkKey_TEXT="K",L_CreateLinkShiftKey_TEXT="false",L_CreateLinkAltKey_TEXT="false",L_SelectForeColorKey_TEXT="C",L_SelectForeColorShiftKey_TEXT="true",L_SelectForeColorAltKey_TEXT="false",L_SelectBackColorKey_TEXT="W",L_SelectBackColorShiftKey_TEXT="true",L_SelectBackColorAltKey_TEXT="false",L_InsertImageKey_TEXT="G",L_InsertImageShiftKey_TEXT="true",L_InsertImageAltKey_TEXT="false",L_LTRKey_VALUE=190,L_RTLKey_VALUE=188,g_strRTEUnselectedClassName="ms-rtetoolbarunsel",g_strRTESelectedClassName="ms-rtetoolbarsel",g_strRTEDisabledClassName="ms-rtetoolbardis",g_strRTEHoverClassName="ms-rtetoolbarhov",g_strRTETextEditorPullDownMenuID="RTETextEditorPullDownMenu",g_strRTEDialogHelperID="RTEDialogHelper",g_strRTECutMnemonic="Cut",g_strRTECopyMnemonic="Copy",g_strRTEPasteMnemonic="Paste",g_strRTEFontNameMnemonic="FontName",g_strRTEFontSizeMnemonic="FontSize",g_strRTEBoldMnemonic="Bold",g_strRTEItalicMnemonic="Italic",g_strRTEUnderlineMnemonic="Underline",g_strRTEJustifyLeftMnemonic="JustifyLeft",g_strRTEJustifyCenterMnemonic="JustifyCenter",g_strRTEJustifyRightMnemonic="JustifyRight",g_strRTEOrderedListMnemonic="InsertOrderedList",g_strRTEUnorderedListMnemonic="InsertUnorderedList",g_strRTEOutdentMnemonic="Outdent",g_strRTEIndentMnemonic="Indent",g_strRTEForeColorMnemonic="ForeColor",g_strRTEBackColorMnemonic="BackColor",g_strRTELTRMnemonic="LTR",g_strRTERTLMnemonic="RTL",g_strRTECreateLinkMnemonic="CreateLink",g_strRTEInsertImageMnemonic="InsertImage",g_strRTERestrictedModeAttributeName="RestrictedMode",g_strRTEAllowHyperlinkAttributeName="AllowHyperlink",g_strRTEBaseElementIDAttributeName="BaseElementID",g_strRTEWebLocaleAttributeName="WebLocale",g_strRTEButtonMnemonicAttributeName="ButtonMnemonic",g_strRTECommandToExecuteAttributeName="CommandToExecute",g_strRTECommandValueAttributeName="CommandValue",g_strRTEMenuItemBaseName="MenuItem",g_strRTEMenuItemAttributeName="MenuItem",g_strRTEMenuOpeningAttributeName="MenuOpening",g_strRTEMenuTableElementName="MenuTable",g_strRTEBegBoldItalicToken="%BEGBI%",g_strRTEEndBoldItalicToken="%ENDBI%",g_strRTEFontNameToken="%FONTNAME%",g_strRTEFontSizeToken="%FONTSIZE%",g_ntRTEElement=1,g_ntRTEText=3,g_iLineHeight=14,g_rgstRTETextEditorSelectionType=[],g_rgrngRTETextEditorSelection=[];function RTE_SaveSelection(a){var b=RTE_GetEditorDocument(a);g_rgrngRTETextEditorSelection[a]=b.selection.createRange();g_rgstRTETextEditorSelectionType[a]=b.selection.type}function RTE_RestoreSelection(b){var a=g_rgrngRTETextEditorSelection[b];if(null!=a)a.select()}function RTE_GetSelection(a){return g_rgrngRTETextEditorSelection[a]}var g_elemRTELastTextAreaConverted=null,g_strRTETextEditorWithTheFocus=null,g_strRTEPrevTextEditor=null,g_strRTEEditorFirstFocus=null,g_rgstrRTEAllEditorsInThePage=[],g_fRTEDialogIsOpen=false;function RTE_GetEditorIFrameID(a){return a+"_iframe"}function RTE_GetEditorTextArea(b){var a=document.getElementById(b);return a}function RTE_GetEditorIFrame(b){var a=null;if(null!=document.frames&&document.frames.length>0){var c=document.getElementById(RTE_GetEditorIFrameID(b));if(c!=null)a=document.frames(RTE_GetEditorIFrameID(b))}return a}function RTE_GetEditorElement(b){var a=document.getElementById(RTE_GetEditorIFrameID(b));return a}function RTE_GetEditorDocument(c){var a=RTE_GetEditorIFrame(c);if(null==a)return null;var b=a.document;return b}function RTE_GetWebLocale(a){return RTE_GetEditorDocument(a).body.getAttribute(g_strRTEWebLocaleAttributeName)}function RTE_IsInRestrictedMode(b){var a=RTE_GetEditorDocument(b);if(null!=a.body.getAttribute(g_strRTERestrictedModeAttributeName))return true;return false}function RTE_IsHyperlinkAllowed(b){var a=RTE_GetEditorDocument(b);if(null!=a.body.getAttribute(g_strRTEAllowHyperlinkAttributeName))return true;return false}function RTE_ShouldShowDirection(){return true}function RTE_EditorWithTheFocus(){return g_strRTETextEditorWithTheFocus}function RTE_PrevEditor(){return g_strRTEPrevTextEditor}function RTE_GetRichEditTextOnly(a){return RTE_GetEditorDocument(a).body.innerText}function RTE_GiveEditorFocus(a){RTE_GetEditorIFrame(a).focus()}function RTE_GiveEditorFirstFocus(a){RTE_GetEditorIFrame(a).focus();g_strRTEEditorFirstFocus=a}function RTE_ConvertTextAreaToRichEdit(b,f,h,j,i){if(!(browseris.ie5up&&browseris.win32))return;var c=RTE_GetEditorTextArea(b),e=c.innerText;if(null==e||0==e.length)e="<div></div>";g_elemRTELastTextAreaConverted=c;window.attachEvent("onload",new Function("RTE_TextAreaWindow_OnLoad('"+b+"');"));var g="";g+=RTE_GenerateToolBarHtml(b,i,c,f,h);g+=RTE_GenerateIFrameEditorHtml(b,c,f,h);c.insertAdjacentHTML("afterEnd",g);c.onfocus=new Function("RTE_TextArea_OnFocus('"+b+"')");c.style.display="none";window.attachEvent("onbeforeunload",new Function("RTE_TransferIFrameContentsToTextArea('"+b+"');"));var d='<html><head><link rel="stylesheet" type="text/css" href="';d+=RTE_GetServerRelativeStylesheetUrl("ows.css",i);d+='"></head><body class="ms-formbody" style="border: 1px solid black; margin: 1px;">';d+=e;d+="</body></html>";var a=RTE_GetEditorDocument(b);a.designMode="on";a=RTE_GetEditorDocument(b);a.open("text/html","replace");a.write(d);a.close();a=RTE_GetEditorDocument(b);a.body.scroll="yes";a.body.wordWrap=false;a.body.onkeydown=new Function("RTE_OnKeyDown('"+b+"', this)");a.body.onkeyup=new Function("RTE_OnKeyUp('"+b+"', this)");a.body.onmouseup=new Function("RTE_OnMouseUp('"+b+"')");a.body.oncontextmenu=new Function("return false");a.body.onblur=new Function("RTE_OnBlur('"+b+"');");if(f){a.body.ondragenter=new Function("RTE_OnDragEnter(this);");a.body.ondragover=new Function("RTE_OnDragOver(this);");a.body.ondragdrop=new Function("RTE_OnDrop(this);")}RTE_GetEditorElement(b).onfocus=new Function("RTE_OnFocus('"+b+"');");if(j!="")a.dir=j;else a.dir=document.dir;if(f){a.body.setAttribute(g_strRTERestrictedModeAttributeName,"true");a.body.onpaste=new Function("RTE_OnPaste_Restricted('"+b+"', this);")}if(h)a.body.setAttribute(g_strRTEAllowHyperlinkAttributeName,"true");a.body.setAttribute(g_strRTEBaseElementIDAttributeName,b);a.body.setAttribute(g_strRTEWebLocaleAttributeName,i);g_rgstrRTEAllEditorsInThePage[g_rgstrRTEAllEditorsInThePage.length]=b;RTE_GiveEditorFocus(b);RTE_ResetAllToolBarStates(b)}function RTE_DisableToolBar(a){var b=RTE_IsInRestrictedMode(a),c=RTE_IsHyperlinkAllowed(a);if(!b){RTE_TB_SetButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTECutMnemonic));RTE_TB_SetButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTECopyMnemonic));RTE_TB_SetButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTEPasteMnemonic))}RTE_TB_SetButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTEFontNameMnemonic));RTE_TB_SetButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTEFontSizeMnemonic));RTE_TB_SetButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTEBoldMnemonic));RTE_TB_SetButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTEItalicMnemonic));RTE_TB_SetButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTEUnderlineMnemonic));RTE_TB_SetButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTEJustifyLeftMnemonic));RTE_TB_SetButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTEJustifyCenterMnemonic));RTE_TB_SetButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTEJustifyRightMnemonic));RTE_TB_SetButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTEOrderedListMnemonic));RTE_TB_SetButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTEUnorderedListMnemonic));RTE_TB_SetButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTEOutdentMnemonic));RTE_TB_SetButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTEIndentMnemonic));RTE_TB_SetButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTEForeColorMnemonic));RTE_TB_SetButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTEBackColorMnemonic));if(RTE_ShouldShowDirection()){RTE_TB_SetButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTELTRMnemonic));RTE_TB_SetButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTERTLMnemonic))}if(!b||c)RTE_TB_SetButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTECreateLinkMnemonic));if(!b)RTE_TB_SetButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTEInsertImageMnemonic))}function RTE_ResetAllToolBarStates(a){if(browseris.ie55up&&RTE_EditorWithTheFocus()!=a&&RTE_ToolBarButtonWithTheFocus()==null&&!RTE_DD_MenuIsOpen()&&!g_fRTEDialogIsOpen){RTE_DisableToolBar(a);return}var b=RTE_GetEditorDocument(a),c=RTE_IsInRestrictedMode(a),d=RTE_IsHyperlinkAllowed(a);if(!c){RTE_TB_SetEnabledFromCommandEnabled(a,b,g_strRTECutMnemonic,true);RTE_TB_SetEnabledFromCommandEnabled(a,b,g_strRTECopyMnemonic,true);RTE_TB_ClearButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTEPasteMnemonic))}RTE_TB_ClearButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTEFontNameMnemonic));RTE_TB_ClearButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTEFontSizeMnemonic));RTE_TB_ClearButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTEBoldMnemonic));RTE_TB_SetCheckFromCommandValue(a,b,g_strRTEBoldMnemonic);RTE_TB_ClearButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTEItalicMnemonic));RTE_TB_SetCheckFromCommandValue(a,b,g_strRTEItalicMnemonic);RTE_TB_ClearButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTEUnderlineMnemonic));RTE_TB_SetCheckFromCommandValue(a,b,g_strRTEUnderlineMnemonic);RTE_TB_ClearButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTEJustifyLeftMnemonic));RTE_TB_SetCheckFromCommandValue(a,b,g_strRTEJustifyLeftMnemonic);RTE_TB_ClearButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTEJustifyCenterMnemonic));RTE_TB_SetCheckFromCommandValue(a,b,g_strRTEJustifyCenterMnemonic);RTE_TB_ClearButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTEJustifyRightMnemonic));RTE_TB_SetCheckFromCommandValue(a,b,g_strRTEJustifyRightMnemonic);RTE_TB_ClearButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTEOrderedListMnemonic));RTE_TB_SetCheckFromCommandValue(a,b,g_strRTEOrderedListMnemonic);RTE_TB_ClearButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTEUnorderedListMnemonic));RTE_TB_SetCheckFromCommandValue(a,b,g_strRTEUnorderedListMnemonic);RTE_TB_ClearButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTEOutdentMnemonic));RTE_TB_ClearButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTEIndentMnemonic));RTE_TB_ClearButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTEForeColorMnemonic));RTE_TB_ClearButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTEBackColorMnemonic));if(RTE_ShouldShowDirection()){RTE_TB_ClearButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTELTRMnemonic));RTE_TB_ClearButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTERTLMnemonic))}if(!c||d)RTE_TB_SetEnabledFromCommandEnabled(a,b,g_strRTECreateLinkMnemonic,true);if(!c)RTE_TB_ClearButtonDisabled(RTE_TB_GetToolBarButton(a,g_strRTEInsertImageMnemonic))}function RTE_TransferTextAreaContentsToIFrame(c){var e=RTE_GetEditorTextArea(c),a=e.innerText,b=RTE_GetEditorDocument(c);if(null==b)return;if(null==a||0==a.length)a="<div></div>";b.body.innerHTML=a;if(c==g_strRTEEditorFirstFocus){var d=b.body.createTextRange();d.collapse(true);d.select();g_strRTEEditorFirstFocus=null}}function RTE_TransferIFrameContentsToTextArea(d){var b,c,e=RTE_GetEditorTextArea(d),a=RTE_GetEditorDocument(d);if(null==a)return;b=a.body.innerHTML;c=a.body.innerText;if(0>=c.length)b="";e.innerText=b}function RTE_TextAreaWindow_OnLoad(a){RTE_TransferTextAreaContentsToIFrame(a)}function RTE_TextArea_OnFocus(a){RTE_GiveEditorFocus(a)}function RTE_OnFocus(a){g_strRTETextEditorWithTheFocus=a;if(g_strRTEPrevTextEditor!=null&&g_strRTEPrevTextEditor.length>0&&g_strRTEPrevTextEditor!=a)RTE_DisableToolBar(g_strRTEPrevTextEditor);RTE_StartResetToolBarTimer(a)}function RTE_OnBlur(a){RTE_SaveSelection(a);g_strRTEPrevTextEditor=g_strRTETextEditorWithTheFocus;g_strRTETextEditorWithTheFocus=null;RTE_StartResetToolBarTimer(a)}function RTE_OnDragEnter(b){var a=b.document.parentWindow.event;if(null!=a){a.dataTransfer.dropEffect="none";a.returnValue=false}}function RTE_OnDragOver(b){var a=b.document.parentWindow.event;if(null!=a){a.dataTransfer.dropEffect="none";a.returnValue=false}}function RTE_OnDrop(b){var a=b.document.parentWindow.event;if(null!=a){a.dataTransfer.dropEffect="none";a.returnValue=false}}function RTE_FInterpretTextAsBoolean(a){if(a.toLowerCase()=="true")return true;else return false}function RTE_OnKeyDown(a,j){RTE_SaveSelection(a);var g=RTE_IsInRestrictedMode(a),i=RTE_IsHyperlinkAllowed(a),b=j.document.parentWindow.event,d=b.keyCode,e=b.altKey,f=b.ctrlKey,c=b.shiftKey;if(browseris.ie5up&&!browseris.ie55up&&(!f&&!e&&!c))switch(d){case 9:var h=RTE_GetEditorDocument(a).body.createTextRange();h.collapse(true);h.select()}if(!f&&!e&&c)switch(d){case 9:b.returnValue=false;document.body.focus();RTE_MoveFocusBackwards(RTE_GetEditorTextArea(a),a)}else if(f)if(L_BoldKey_TEXT.charCodeAt(0)==d&&RTE_FInterpretTextAsBoolean(L_BoldShiftKey_TEXT)==c&&RTE_FInterpretTextAsBoolean(L_BoldAltKey_TEXT)==e){b.returnValue=false;RTE_TB_GetToolBarButton(a,g_strRTEBoldMnemonic).children(0).click()}else if(L_ItalicKey_TEXT.charCodeAt(0)==d&&RTE_FInterpretTextAsBoolean(L_ItalicShiftKey_TEXT)==c&&RTE_FInterpretTextAsBoolean(L_ItalicAltKey_TEXT)==e){b.returnValue=false;RTE_TB_GetToolBarButton(a,g_strRTEItalicMnemonic).children(0).click()}else if(L_UnderlineKey_TEXT.charCodeAt(0)==d&&RTE_FInterpretTextAsBoolean(L_UnderlineShiftKey_TEXT)==c&&RTE_FInterpretTextAsBoolean(L_UnderlineAltKey_TEXT)==e){b.returnValue=false;RTE_TB_GetToolBarButton(a,g_strRTEUnderlineMnemonic).children(0).click()}else if(L_JustifyLeftKey_TEXT.charCodeAt(0)==d&&RTE_FInterpretTextAsBoolean(L_JustifyLeftShiftKey_TEXT)==c&&RTE_FInterpretTextAsBoolean(L_JustifyLeftAltKey_TEXT)==e){b.returnValue=false;RTE_TB_GetToolBarButton(a,g_strRTEJustifyLeftMnemonic).children(0).click()}else if(L_JustifyCenterKey_TEXT.charCodeAt(0)==d&&RTE_FInterpretTextAsBoolean(L_JustifyCenterShiftKey_TEXT)==c&&RTE_FInterpretTextAsBoolean(L_JustifyCenterAltKey_TEXT)==e){b.returnValue=false;RTE_TB_GetToolBarButton(a,g_strRTEJustifyCenterMnemonic).children(0).click()}else if(L_JustifyRightKey_TEXT.charCodeAt(0)==d&&RTE_FInterpretTextAsBoolean(L_JustifyRightShiftKey_TEXT)==c&&RTE_FInterpretTextAsBoolean(L_JustifyRightAltKey_TEXT)==e){b.returnValue=false;RTE_TB_GetToolBarButton(a,g_strRTEJustifyRightMnemonic).children(0).click()}else if(L_IndentKey_TEXT.charCodeAt(0)==d&&RTE_FInterpretTextAsBoolean(L_IndentShiftKey_TEXT)==c&&RTE_FInterpretTextAsBoolean(L_IndentAltKey_TEXT)==e){b.returnValue=false;RTE_TB_GetToolBarButton(a,g_strRTEIndentMnemonic).children(0).click()}else if(L_CreateLinkKey_TEXT.charCodeAt(0)==d&&RTE_FInterpretTextAsBoolean(L_CreateLinkShiftKey_TEXT)==c&&RTE_FInterpretTextAsBoolean(L_CreateLinkAltKey_TEXT)==e){b.returnValue=false;if(!g||i)RTE_TB_GetToolBarButton(a,g_strRTECreateLinkMnemonic).children(0).click()}else if(L_SelectFontNameKey_TEXT.charCodeAt(0)==d&&RTE_FInterpretTextAsBoolean(L_SelectFontNameShiftKey_TEXT)==c&&RTE_FInterpretTextAsBoolean(L_SelectFontNameAltKey_TEXT)==e){b.returnValue=false;RTE_TB_GetToolBarButton(a,g_strRTEFontNameMnemonic).children(0).click()}else if(L_SelectFontSizeKey_TEXT.charCodeAt(0)==d&&RTE_FInterpretTextAsBoolean(L_SelectFontSizeShiftKey_TEXT)==c&&RTE_FInterpretTextAsBoolean(L_SelectFontSizeAltKey_TEXT)==e){b.returnValue=false;RTE_TB_GetToolBarButton(a,g_strRTEFontSizeMnemonic).children(0).click()}else if(L_SelectForeColorKey_TEXT.charCodeAt(0)==d&&RTE_FInterpretTextAsBoolean(L_SelectForeColorShiftKey_TEXT)==c&&RTE_FInterpretTextAsBoolean(L_SelectForeColorAltKey_TEXT)==e){b.returnValue=false;RTE_TB_GetToolBarButton(a,g_strRTEForeColorMnemonic).children(0).click()}else if(L_SelectBackColorKey_TEXT.charCodeAt(0)==d&&RTE_FInterpretTextAsBoolean(L_SelectBackColorShiftKey_TEXT)==c&&RTE_FInterpretTextAsBoolean(L_SelectBackColorAltKey_TEXT)==e){b.returnValue=false;RTE_TB_GetToolBarButton(a,g_strRTEBackColorMnemonic).children(0).click()}else if(L_UnorderedListKey_TEXT.charCodeAt(0)==d&&RTE_FInterpretTextAsBoolean(L_UnorderedListShiftKey_TEXT)==c&&RTE_FInterpretTextAsBoolean(L_UnorderedListAltKey_TEXT)==e){b.returnValue=false;RTE_TB_GetToolBarButton(a,g_strRTEUnorderedListMnemonic).children(0).click()}else if(L_OrderedListKey_TEXT.charCodeAt(0)==d&&RTE_FInterpretTextAsBoolean(L_OrderedListShiftKey_TEXT)==c&&RTE_FInterpretTextAsBoolean(L_OrderedListAltKey_TEXT)==e){b.returnValue=false;RTE_TB_GetToolBarButton(a,g_strRTEOrderedListMnemonic).children(0).click()}else if(L_OutdentKey_TEXT.charCodeAt(0)==d&&RTE_FInterpretTextAsBoolean(L_OutdentShiftKey_TEXT)==c&&RTE_FInterpretTextAsBoolean(L_OutdentAltKey_TEXT)==e){b.returnValue=false;RTE_TB_GetToolBarButton(a,g_strRTEOutdentMnemonic).children(0).click()}else if(L_InsertImageKey_TEXT.charCodeAt(0)==d&&RTE_FInterpretTextAsBoolean(L_InsertImageShiftKey_TEXT)==c&&RTE_FInterpretTextAsBoolean(L_InsertImageAltKey_TEXT)==e){b.returnValue=false;if(!g)RTE_TB_GetToolBarButton(a,g_strRTEInsertImageMnemonic).children(0).click()}else if(L_LTRKey_VALUE==d&&c){b.returnValue=false;RTE_TB_GetToolBarButton(a,g_strRTELTRMnemonic).children(0).click()}else if(L_RTLKey_VALUE==d&&c){b.returnValue=false;RTE_TB_GetToolBarButton(a,g_strRTERTLMnemonic).children(0).click()}}function RTE_OnKeyUp(a){RTE_StartResetToolBarTimer(a)}function RTE_OnMouseUp(a){RTE_DD_CloseMenu();RTE_ResetAllToolBarStates(a)}function RTE_OnPaste_Restricted(a,d){RTE_SaveSelection(a);d.document.parentWindow.event.returnValue=false;RTE_RestoreSelection(a);var c=RTE_GetSelection(a),b=window.clipboardData.getData("Text");if(null!=c&&null!=b)c.text=b}var g_cRTEResetToolBarTimerQueue=0;function RTE_StartResetToolBarTimer(a){++g_cRTEResetToolBarTimerQueue;window.setTimeout('RTE_OnResetToolBarTimer("'+a+'")',400)}function RTE_OnResetToolBarTimer(a){--g_cRTEResetToolBarTimerQueue;if(0==g_cRTEResetToolBarTimerQueue)RTE_ResetAllToolBarStates(a)}var g_fRTEFirstTimeGenerateCalled=true;function RTE_GenerateIFrameEditorHtml(g,f,h,i){var a="";if(g_fRTEFirstTimeGenerateCalled){g_fRTEFirstTimeGenerateCalled=false;a+='<iframe id="'+g_strRTETextEditorPullDownMenuID+'"  src="'+RTE_GetServerRelativeUnlocalizedImageUrl("blank.gif")+'" class="ms-rtetoolbarmenu" TABINDEX=-1 style="display:none; position:absolute;" '+g_strRTEBaseElementIDAttributeName+'="x" '+g_strRTEWebLocaleAttributeName+'="x" '+g_strRTEButtonMnemonicAttributeName+'="x"></iframe>';document.body.insertAdjacentHTML("afterBegin",'<object id="RTEDialogHelper" name="RTEDialogHelper" classid="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b" style="width:0px; height:0px;" TABINDEX=-1></OBJECT>')}var d="",c="",b="",e=f.getAttribute("rows");if(h&&null!=e&&e>0){d="";c=' height="'+e*g_iLineHeight+'"';if(i)b=' class="ms-longer"';else b=' class="ms-long"'}else{d=' width="'+f.offsetWidth+'"';c=' height="'+f.offsetHeight+'"';b=""}a+="<div>";a+="<iframe "+d+c+b+' id="'+RTE_GetEditorIFrameID(g)+'" title="'+L_EditorIFrameTitle_TEXT+'" src="'+RTE_GetServerRelativeUnlocalizedImageUrl("blank.gif")+'" TABINDEX=1></iframe>';a+="</div>";return a}function RTE_GenerateToolBarHtml(b,c,h,d,g){var a="",e=' class="ms-toolbar rtetoolbar" ',f=' width="'+h.currentStyle.width+'" ';if(d){if(g)e=' class="ms-toolbar rtetoolbar ms-longer" ';else e=' class="ms-toolbar rtetoolbar ms-long" ';f=""}a+="<table cellpadding=0 cellspacing=0 "+e+f+">";a+="<tr><td><table cellspacing=0 cellpadding=0 border=0>";a+="<tr>";if(!d){a+=RTE_TB_GenerateExecCommandToolBarButtonHtml(b,g_strRTECutMnemonic,false,RTE_GetServerRelativeImageUrl("rtecut.gif"),"",L_CutToolTip_TEXT,true);a+=RTE_TB_GenerateExecCommandToolBarButtonHtml(b,g_strRTECopyMnemonic,false,RTE_GetServerRelativeImageUrl("rtecopy.gif"),"",L_CopyToolTip_TEXT,true);a+=RTE_TB_GenerateExecCommandToolBarButtonHtml(b,g_strRTEPasteMnemonic,false,RTE_GetServerRelativeImageUrl("rtepaste.gif"),"",L_PasteToolTip_TEXT,false);a+=RTE_TB_GenerateToolBarSeparatorHtml()}a+=RTE_GenerateFontNameToolBarButtonHtml(b,c,d);a+=RTE_GenerateFontSizeToolBarButtonHtml(b,c,d);a+=RTE_TB_GenerateToolBarSeparatorHtml();a+=RTE_TB_GenerateExecCommandToolBarButtonHtml(b,g_strRTEBoldMnemonic,false,RTE_GetServerRelativeImageUrl("rtebold.gif"),"",L_BoldToolTip_TEXT,false);a+=RTE_TB_GenerateExecCommandToolBarButtonHtml(b,g_strRTEItalicMnemonic,false,RTE_GetServerRelativeImageUrl("rteital.gif"),"",L_ItalicToolTip_TEXT,false);a+=RTE_TB_GenerateExecCommandToolBarButtonHtml(b,g_strRTEUnderlineMnemonic,false,RTE_GetServerRelativeImageUrl("rteundl.gif"),"",L_UnderlineToolTip_TEXT,false);a+=RTE_TB_GenerateToolBarSeparatorHtml();if(c=="1025"||c=="1037"){a+=RTE_TB_GenerateExecCommandToolBarButtonHtml(b,g_strRTEJustifyRightMnemonic,false,RTE_GetServerRelativeImageUrl("rtertal.gif"),"",L_JustifyRightToolTip_TEXT,false);a+=RTE_TB_GenerateExecCommandToolBarButtonHtml(b,g_strRTEJustifyCenterMnemonic,false,RTE_GetServerRelativeImageUrl("rtectral.gif"),"",L_JustifyCenterToolTip_TEXT,false);a+=RTE_TB_GenerateExecCommandToolBarButtonHtml(b,g_strRTEJustifyLeftMnemonic,false,RTE_GetServerRelativeImageUrl("rteltal.gif"),"",L_JustifyLeftToolTip_TEXT,false)}else{a+=RTE_TB_GenerateExecCommandToolBarButtonHtml(b,g_strRTEJustifyLeftMnemonic,false,RTE_GetServerRelativeImageUrl("rteltal.gif"),"",L_JustifyLeftToolTip_TEXT,false);a+=RTE_TB_GenerateExecCommandToolBarButtonHtml(b,g_strRTEJustifyCenterMnemonic,false,RTE_GetServerRelativeImageUrl("rtectral.gif"),"",L_JustifyCenterToolTip_TEXT,false);a+=RTE_TB_GenerateExecCommandToolBarButtonHtml(b,g_strRTEJustifyRightMnemonic,false,RTE_GetServerRelativeImageUrl("rtertal.gif"),"",L_JustifyRightToolTip_TEXT,false)}a+=RTE_TB_GenerateToolBarSeparatorHtml();a+=RTE_TB_GenerateExecCommandToolBarButtonHtml(b,g_strRTEOrderedListMnemonic,false,RTE_GetServerRelativeImageUrl("rtenlst.gif"),"",L_OrderedListToolTip_TEXT,false);a+=RTE_TB_GenerateExecCommandToolBarButtonHtml(b,g_strRTEUnorderedListMnemonic,false,RTE_GetServerRelativeImageUrl("rteblst.gif"),"",L_UnorderedListToolTip_TEXT,false);if(!d)a+=RTE_TB_GenerateToolBarSeparatorHtml();if(c=="1025"||c=="1037"){a+=RTE_TB_GenerateExecCommandToolBarButtonHtml(b,g_strRTEIndentMnemonic,false,RTE_GetServerRelativeImageUrl("rteidt.gif"),"",L_IndentToolTip_TEXT,false);a+=RTE_TB_GenerateExecCommandToolBarButtonHtml(b,g_strRTEOutdentMnemonic,false,RTE_GetServerRelativeImageUrl("rteuidt.gif"),"",L_OutdentToolTip_TEXT,false)}else{a+=RTE_TB_GenerateExecCommandToolBarButtonHtml(b,g_strRTEOutdentMnemonic,false,RTE_GetServerRelativeImageUrl("rteuidt.gif"),"",L_OutdentToolTip_TEXT,false);a+=RTE_TB_GenerateExecCommandToolBarButtonHtml(b,g_strRTEIndentMnemonic,false,RTE_GetServerRelativeImageUrl("rteidt.gif"),"",L_IndentToolTip_TEXT,false)}if(!d)a+=RTE_TB_GenerateToolBarSeparatorHtml();if(!d||g)a+=RTE_TB_GenerateExecCommandToolBarButtonHtml(b,g_strRTECreateLinkMnemonic,true,RTE_GetServerRelativeImageUrl("rtelnk.gif"),"",L_CreateLinkToolTip_TEXT,true);if(!d)a+=RTE_TB_GenerateExecCommandToolBarButtonHtml(b,g_strRTEInsertImageMnemonic,true,RTE_GetServerRelativeImageUrl("rteimg.gif"),"",L_InsertImageToolTip_TEXT,false);a+=RTE_TB_GenerateToolBarSeparatorHtml();a+=RTE_GenerateForeColorToolBarButtonHtml(b,c);a+=RTE_GenerateBackColorToolBarButtonHtml(b,c);if(RTE_ShouldShowDirection()){if(!d)a+=RTE_TB_GenerateToolBarSeparatorHtml();if(c=="1025"||c=="1037"){a+=RTE_TB_GenerateToolBarButtonHtml(b,"rtl","RTE_SetDirectionOfSelection('"+b+"', 'rtl');",RTE_GetServerRelativeImageUrl("rtertl.gif"),"",L_RTLToolTip_TEXT);a+=RTE_TB_GenerateToolBarButtonHtml(b,"ltr","RTE_SetDirectionOfSelection('"+b+"', 'ltr');",RTE_GetServerRelativeImageUrl("rteltr.gif"),"",L_LTRToolTip_TEXT)}else{a+=RTE_TB_GenerateToolBarButtonHtml(b,"ltr","RTE_SetDirectionOfSelection('"+b+"', 'ltr');",RTE_GetServerRelativeImageUrl("rteltr.gif"),"",L_LTRToolTip_TEXT);a+=RTE_TB_GenerateToolBarButtonHtml(b,"rtl","RTE_SetDirectionOfSelection('"+b+"', 'rtl');",RTE_GetServerRelativeImageUrl("rtertl.gif"),"",L_RTLToolTip_TEXT)}}a+="</tr>";a+="</table></td></tr>";a+="</table>";return a}function RTE_GenerateFontNameToolBarButtonHtml(b,c,d){var a="";a+=RTE_TB_GenerateOpenCellButtonHtml(b,g_strRTEFontNameMnemonic);a+='<a TABINDEX=-1 href="#" onfocus="RTE_TB_OnFocus(\''+b+"', this);\" onblur=\"RTE_TB_OnBlur('"+b+"', this);\" onclick=\"RTE_DD_OpenFontNameOrSizeSelector('"+b+"' ,'"+c+'\', true); return false;" title="'+L_FontNameToolTip_TEXT+'"';if(d)a+='><img src="'+RTE_GetServerRelativeImageUrl("rtefnt.gif")+'" alt="'+L_FontNameToolTip_TEXT+'" border=0>';else a+=' style="margin-left: 2px; margin-right: 2px;">'+L_FontNameLabel_TEXT+'&nbsp;<img alt="'+L_FontNameToolTip_TEXT+'" src="'+RTE_GetServerRelativeImageUrl("rtednar.gif")+'" border=0>';a+="</a>";a+=RTE_TB_GenerateCloseCellButtonHtml();return a}function RTE_GenerateFontSizeToolBarButtonHtml(b,c,d){var a="";a+=RTE_TB_GenerateOpenCellButtonHtml(b,g_strRTEFontSizeMnemonic);a+='<a TABINDEX=-1 href="#" onfocus="RTE_TB_OnFocus(\''+b+"', this);\" onblur=\"RTE_TB_OnBlur('"+b+"', this);\" onclick=\"RTE_DD_OpenFontNameOrSizeSelector('"+b+"', '"+c+'\', false); return false;" title="'+L_FontSizeToolTip_TEXT+'"';if(d)a+='><img src="'+RTE_GetServerRelativeImageUrl("rtefntsz.gif")+'" alt="'+L_FontSizeToolTip_TEXT+'" border=0>';else a+=' style="margin-left: 2px; margin-right: 2px;">'+L_FontSizeLabel_TEXT+'&nbsp;<img alt="'+L_FontSizeToolTip_TEXT+'" src="'+RTE_GetServerRelativeImageUrl("rtednar.gif")+'" border=0>';a+="</a>";a+=RTE_TB_GenerateCloseCellButtonHtml();return a}function RTE_GenerateForeColorToolBarButtonHtml(b,c){var a="";a+=RTE_TB_GenerateOpenCellButtonHtml(b,g_strRTEForeColorMnemonic);a+='<a TABINDEX=-1 href="#" onfocus="RTE_TB_OnFocus(\''+b+"', this);\" onblur=\"RTE_TB_OnBlur('"+b+"', this);\" onclick=\"RTE_DD_OpenForeColorSelector('"+b+"', '"+c+'\'); return false;"><img src="'+RTE_GetServerRelativeImageUrl("rtetxclr.gif")+'" alt="'+L_ForeColorToolTip_TEXT+'" border=0></a>';a+=RTE_TB_GenerateCloseCellButtonHtml();return a}function RTE_GenerateBackColorToolBarButtonHtml(b,c){var a="";a+=RTE_TB_GenerateOpenCellButtonHtml(b,g_strRTEBackColorMnemonic);a+='<a TABINDEX=-1 href="#" onfocus="RTE_TB_OnFocus(\''+b+"', this);\" onblur=\"RTE_TB_OnBlur('"+b+"', this);\" onclick=\"RTE_DD_OpenBackColorSelector('"+b+"', '"+c+'\'); return false;"><img src="'+RTE_GetServerRelativeImageUrl("rtebkclr.gif")+'" alt="'+L_BackColorToolTip_TEXT+'" border=0></a>';a+=RTE_TB_GenerateCloseCellButtonHtml();return a}function RTE_ShouldIgnoreElement(){return false}function RTE_FindChildElementOfType(a,e,i,j,b){if(a.nodeType!=g_ntRTEElement||a.className.indexOf("rtetoolbar")>=0||a.id==g_strRTETextEditorPullDownMenuID||a.id==RTE_GetEditorIFrameID(i))return null;if(b&&!j&&e.indexOf("|"+a.tagName+"|")>=0)return a;if(a.children!=null&&a.children.length>0){var c=0,d=a.children.length-1,f=1;if(!b){c=d;d=0;f=-1}do{var g=a.children(c);if(g!=null){var h=RTE_FindChildElementOfType(g,e,i,false,b);if(h!=null)return h}c+=f}while(b&&c<=d||!b&&c>=d)}if(!b&&!j&&e.indexOf("|"+a.tagName+"|")>=0)return a;return null}function RTE_FindNextElementOfType(d,e,f,b){if(b){var c=RTE_FindChildElementOfType(d,e,f,true,b);if(c!=null)return elemFound}var a=d;do{if(b)if(a.nextSibling!=null)a=a.nextSibling;else while(true){if(a.parentNode==null){a=a.firstChild;break}if(a.parentNode.nextSibling!=null){a=a.parentNode.nextSibling;break}a=a.parentNode}else if(a.previousSibling!=null)a=a.previousSibling;else while(true){if(a.parentNode==null){a=a.lastChild;break}if(a.parentNode.previousSibling!=null){a=a.parentNode.previousSibling;break}a=a.parentNode}if(a!=null){var c=RTE_FindChildElementOfType(a,e,f,false,b);if(c!=null)return c}}while(a!=null);return null}var g_strRTEFocusElementTagNames="|INPUT|TEXTAREA|IFRAME|A|";function RTE_MoveFocus(g,c,d){var a=RTE_FindNextElementOfType(g,g_strRTEFocusElementTagNames,c,d);while(a!=null&&(a.disabled==true||a.hidden==true))a=RTE_FindNextElementOfType(a,g_strRTEFocusElementTagNames,c,d);if(a!=null)if(a.tagName=="IFRAME"){var b=null;if(null!=document.frames&&document.frames.length>0){var f=document.getElementById(a.id);if(f!=null){b=document.frames(a.id);if(b!=null)b.focus()}}}else if(a.tagName=="INPUT"){a.focus();a.select()}else if(a.tagName=="TEXTAREA"){a.focus();var e=a.createTextRange();e.collapse(false);e.select()}else a.focus()}function RTE_MoveFocusBackwards(a,b){RTE_MoveFocus(a,b,false)}function RTE_MoveFocusForwards(a,b){RTE_MoveFocus(a,b,true)}function RTE_ExecuteCommandOnSelection(a,b,d,e){var c=RTE_GetEditorDocument(a);RTE_RestoreSelection(a);if(b==g_strRTECreateLinkMnemonic||b==g_strRTEInsertImageMnemonic)g_fRTEDialogIsOpen=true;c.execCommand(b,d,e);if(g_fRTEDialogIsOpen){g_fRTEDialogIsOpen=false;RTE_OnFocus(a)}RTE_StartResetToolBarTimer(a)}function RTE_SetDirectionOfSelection(d,c){var e=RTE_GetSelection(d);RTE_RestoreSelection(d);var b;if("ltr"==c)b="|H1|H2|H3|H4|H5|H6|P|PRE|LI|TD|DIV|BLOCKQUOTE|DT|DD|TABLE|HR|IMG|TR|UL|OL|";else b="|H1|H2|H3|H4|H5|H6|P|PRE|LI|TD|DIV|BLOCKQUOTE|DT|DD|TABLE|HR|IMG|";var a=e.parentElement();while(a!=null&&b.indexOf("|"+a.tagName+"|")==-1)a=a.parentElement;if(a)if("ltr"==c){a.dir="ltr";a.align="left"}else{a.dir="rtl";a.align="right"}}var g_strRTEToolBarButtonWithTheFocus=null;function RTE_ToolBarButtonWithTheFocus(){return g_strRTEToolBarButtonWithTheFocus}function RTE_TB_GetToolBarButton(b,c){var a=document.all(b+"_"+c);return a}function RTE_TB_GenerateOpenCellButtonHtml(b,c){var a="";a+="<td class=ms-toolbar>";a+="<table cellpadding=1 cellspacing=0 border=0>";a+="<tr>";a+='<td class="ms-toolbar '+g_strRTEUnselectedClassName+'" nowrap id="'+b+"_"+c+'" onmouseover="RTE_TB_OnMouseOver(this);" onmouseout="RTE_TB_OnMouseOut(this);">';return a}function RTE_TB_GenerateCloseCellButtonHtml(){var a="";a+="</td>";a+="</tr>";a+="</table>";a+="</td>";return a}function RTE_TB_GenerateToolBarSeparatorHtml(){return "<td class=ms-separator>|</td>"}function RTE_TB_GenerateToolBarButtonHtml(b,e,f,c,d,g){var a="";a+=RTE_TB_GenerateOpenCellButtonHtml(b,e);a+='<a TABINDEX=-1 href="#" onfocus="RTE_TB_OnFocus(\''+b+"', this);\" onblur=\"RTE_TB_OnBlur('"+b+'\', this);" onclick="'+f+'; return false;">';if(0<c.length)a+='<img border=0 src="'+c+'" alt="'+g+'">';if(0<d.length)a+=" "+d;a+="</a>";a+=RTE_TB_GenerateCloseCellButtonHtml();return a}function RTE_TB_GenerateExecCommandToolBarButtonHtml(b,c,e,f,g,h,d){var a="";if(d)a+="var sel = RTE_GetEditorDocument('"+b+"').selection; if ((null != sel) && ('None' != sel.type)) { ";if(browseris.ie5up&&!browseris.ie55up&&!browseris.ie6up)a+="RTE_SaveSelection('"+b+"');";a+="RTE_ExecuteCommandOnSelection('"+b+"', '"+c+"', "+e+", null );";if(d)a+="}";return RTE_TB_GenerateToolBarButtonHtml(b,c,a,f,g,h)}function RTE_TB_SetButtonCheck(a){a.className=RTE_RemoveClassFromClassList(a.className,g_strRTEUnselectedClassName);a.className=RTE_AddClassToClassList(a.className,g_strRTESelectedClassName)}function RTE_TB_ClearButtonCheck(a){a.className=RTE_RemoveClassFromClassList(a.className,g_strRTESelectedClassName);a.className=RTE_AddClassToClassList(a.className,g_strRTEUnselectedClassName)}function RTE_TB_SetButtonDisabled(a){a.className=RTE_AddClassToClassList(a.className,g_strRTEDisabledClassName);a.disabled=true;var b=a.children(0);if(b!=null&&b.tagName=="A")b.disabled=true}function RTE_TB_ClearButtonDisabled(a){a.disabled=false;var b=a.children(0);if(b!=null&&b.tagName=="A")b.disabled=false;a.className=RTE_RemoveClassFromClassList(a.className,g_strRTEDisabledClassName)}function RTE_TB_SetButtonHover(a){a.className=RTE_AddClassToClassList(a.className,g_strRTEHoverClassName)}function RTE_TB_ClearButtonHover(a){a.className=RTE_RemoveClassFromClassList(a.className,g_strRTEHoverClassName)}function RTE_TB_SetCheckFromCommandValue(d,c,a){var b=RTE_TB_GetToolBarButton(d,a);if(c.queryCommandSupported(a)&&c.queryCommandValue(a))RTE_TB_SetButtonCheck(b);else RTE_TB_ClearButtonCheck(b)}function RTE_TB_SetEnabledFromCommandEnabled(g,c,f,h){var a=true;if(h){var e=c.selection;if(null==e||"none"==e.type)a=false;else{var b=c.selection.createRange();if(b!=null&&b.text!=null&&0>=b.text.length)a=false}}var d=RTE_TB_GetToolBarButton(g,f);if(a&&c.queryCommandEnabled(f))RTE_TB_ClearButtonDisabled(d);else RTE_TB_SetButtonDisabled(d)}function RTE_TB_OnMouseOver(a){if(0>a.className.indexOf(g_strRTEDisabledClassName))RTE_TB_SetButtonHover(a)}function RTE_TB_OnMouseOut(a){RTE_TB_ClearButtonHover(a)}function RTE_TB_OnFocus(b,a){g_strRTEToolBarButtonWithTheFocus=a.parentElement.id}function RTE_TB_OnBlur(){g_strRTEToolBarButtonWithTheFocus=null}var g_strRTEDDBaseElementID=null,g_strRTEDDButtonMnemonic=null,g_fRTEFirstCallToGetMenu=true,g_elemRTEHighlightedMenuItem=null,g_iRTEHighlightedMenuItem=-1,g_iRTEMenuItemMax=-1;function RTE_DD_GetMenuElement(){var a=document.getElementById(g_strRTETextEditorPullDownMenuID);if(null==a&&document.parentWindow!=null&&document.parentWindow.document!=null)a=document.parentWindow.parent.document.getElementById(g_strRTETextEditorPullDownMenuID);return a}function RTE_DD_GetMenuFrame(){var a=null,b=RTE_DD_GetMenuElement();if(null!=b)if(document.frames.length>0)a=document.frames(g_strRTETextEditorPullDownMenuID);else if(document.parentWindow!=null&&document.parentWindow.frames!=null)a=document.parentWindow.parent.document.frames(g_strRTETextEditorPullDownMenuID);if(null==a)if(g_fRTEFirstCallToGetMenu){g_fRTEFirstCallToGetMenu=false;return null}return a}function RTE_DD_GetMenuBaseElementID(){return RTE_DD_GetMenuElement().getAttribute(g_strRTEBaseElementIDAttributeName)}function RTE_DD_GetMenuButtonMnemonic(){return RTE_DD_GetMenuElement().getAttribute(g_strRTEButtonMnemonicAttributeName)}function RTE_DD_MenuIsOpen(){if(""==RTE_DD_GetMenuElement().style.display)return true;return false}var g_fRTEMenuMoved=false;function RTE_DD_OpenMenu(c,j,q,r){var a=RTE_DD_GetMenuElement(),b=RTE_DD_GetMenuFrame();if(!g_fRTEMenuMoved){g_elemRTELastTextAreaConverted.insertAdjacentElement("afterEnd",a);a=RTE_DD_GetMenuElement();b=RTE_DD_GetMenuFrame()}if(g_strRTEDDBaseElementID==c&&g_strRTEDDButtonMnemonic==j){RTE_DD_CloseMenu();RTE_RestoreSelection(c);return}if(null!=g_strRTEDDBaseElementID&&null!=g_strRTEDDButtonMnemonic)RTE_DD_CloseMenu();g_strRTEDDBaseElementID=c;g_strRTEDDButtonMnemonic=j;g_iRTEMenuItemMax=r-1;if(browseris.ie5up&&!browseris.ie55up&&!browseris.ie6up)RTE_SaveSelection(c);var h=RTE_TB_GetToolBarButton(c,j);a.setAttribute(g_strRTEBaseElementIDAttributeName,c);a.setAttribute(g_strRTEButtonMnemonicAttributeName,j);a.setAttribute(g_strRTEMenuOpeningAttributeName,"1");a.style.top="";a.style.left="";a.style.height="";a.style.width="";var o=RTE_GetWebLocale(c);b.document.open("text/html","replace");b.document.write('<html><head><link rel="stylesheet" type="text/css" href="'+RTE_GetServerRelativeStylesheetUrl("ows.css",o)+'"><script language="javascript" src="'+RTE_GetServerRelativeScriptUrl("ows.js",o)+('"></sc'+"ript></head>")+'<body class="ms-rtetoolbarmenu" '+g_strRTECommandToExecuteAttributeName+'="x" '+g_strRTECommandValueAttributeName+'="x"><div class="ms-rtetoolbarmenu" id="divAroundMenu">'+q+"</div></body></html>");b.document.close();a=RTE_DD_GetMenuElement();b=RTE_DD_GetMenuFrame();b.document.body.onfocus=new Function("RTE_DD_OnFocus('"+c+"');");b.document.body.onblur=new Function("RTE_DD_OnBlur('"+c+"');");b.document.body.onkeydown=new Function("RTE_DD_OnKeyDown(this);");a.style.border="0px";b.document.body.style.border="1px solid black";a.style.display="";var s=b.document.all("divAroundMenu"),n=b.document.all(g_strRTEMenuTableElementName),m=300,e=RTE_GetElementWindowCoordinates(h),v=e[g_iRTELeft],w=e[g_iRTETop],t=h.offsetWidth,u=h.offsetHeight,i=n.scrollWidth+4,d=n.scrollHeight+4,p=a.document.documentElement.offsetWidth,l=a.document.documentElement.offsetHeight,g=e[g_iRTETop]+h.offsetHeight,f=e[g_iRTELeft],k=false;if(d>m){k=true;d=m}if(d>l){k=true;d=l-30}if(g+d>l){g=e[g_iRTETop]-d-10;if(0>g)g=0}if(f+i>p){f=p-i-30;if(0>f)f=0}if(k){b.document.body.scroll="yes";i+=22}else b.document.body.scroll="";a.style.left=f;a.style.top=g;a.style.width=i;a.style.height=d;RTE_DD_SetHighlightOnMenuItem(RTE_DD_GetMenuItem(0))}function RTE_DD_CloseMenu(){var a=RTE_DD_GetMenuElement();if(null==a)return;a.style.display="none";if(g_strRTEDDBaseElementID!=null&&g_strRTEDDButtonMnemonic!=null)RTE_TB_ClearButtonHover(RTE_TB_GetToolBarButton(g_strRTEDDBaseElementID,g_strRTEDDButtonMnemonic));g_strRTEDDBaseElementID=null;g_strRTEDDButtonMnemonic=null;g_elemRTEHighlightedMenuItem=null;g_iRTEHighlightedMenuItem=-1;g_iRTEMenuItemMax=-1}function RTE_DD_GenerateMenuOpenHtml(a){if(a=="1037"||a=="1025")return '<table dir="rtl" id="'+g_strRTEMenuTableElementName+'"cellspacing=0 cellpading=0 border=0><tr>';else return '<table id="'+g_strRTEMenuTableElementName+'"cellspacing=0 cellpading=0 border=0><tr>'}function RTE_DD_GenerateMenuCloseHtml(){return "</tr></table>"}function RTE_DD_GenerateMenuItemHtml(c,a,d,e,f,g){var b="";if((1>=c||1<c&&0==a%c)&&0!=a)b="</tr><tr>";b+='<td class="ms-toolbar '+g_strRTEUnselectedClassName+'" nowrap id="'+g_strRTEMenuItemBaseName+a+'" '+g_strRTEMenuItemAttributeName+'="'+a+'" onfocus="RTE_DD_Item_OnFocus(this)" onclick="return RTE_DD_StartCmdExec(\''+d+"', '"+e+'\')" onmouseover="RTE_DDItem_OnMouseOver(this);" onmouseout="RTE_DDItem_OnMouseOut(this);"><a TABINDEX=-1 href="#" class="'+g_strRTEUnselectedClassName+'" style="text-decoration: none; color: black; cursor: hand;" title="'+g+'" onblur="RTE_DD_Item_OnBlur()" onfocus="RTE_DD_Item_OnFocus(this.parentElement)" >'+f+"</a></td>";return b}function RTE_DD_GetMenuItem(b){var a=RTE_DD_GetMenuFrame().document.all(g_strRTEMenuItemBaseName+b);return a}function RTE_DD_GetHighlightedMenuItem(){return g_elemRTEHighlightedMenuItem}function RTE_DD_ClearHighlightOnMenuItem(a){RTE_TB_OnMouseOut(a)}function RTE_DD_ClearHighlightedMenuItem(){RTE_DD_ClearHighlightOnMenuItem(RTE_DD_GetHighlightedMenuItem())}function RTE_DD_SetHighlightOnMenuItem(a){if(!RTE_DD_MenuIsOpen())return;var b=a.getAttribute(g_strRTEMenuItemAttributeName);if(null!=g_elemRTEHighlightedMenuItem){RTE_DD_ClearHighlightOnMenuItem(g_elemRTEHighlightedMenuItem);g_elemRTEHighlightedMenuItem=null;g_iRTEHighlightedMenuItem=-1}RTE_TB_OnMouseOver(a);a.children(0).focus();g_elemRTEHighlightedMenuItem=a;g_iRTEHighlightedMenuItem=parseInt(b)}function RTE_DD_SetHighlightOnPrevMenuItem(f){var c=RTE_DD_GetHighlightedMenuItem(),b=c.getAttribute(g_strRTEMenuItemAttributeName),a=parseInt(b);if(a>0){var d=Math.max(a-f,0),e=RTE_DD_GetMenuItem(d);RTE_DD_SetHighlightOnMenuItem(e)}}function RTE_DD_SetHighlightOnNextMenuItem(f){var c=RTE_DD_GetHighlightedMenuItem(),b=c.getAttribute(g_strRTEMenuItemAttributeName),a=parseInt(b);if(a<g_iRTEMenuItemMax){var d=Math.min(a+f,g_iRTEMenuItemMax),e=RTE_DD_GetMenuItem(d);RTE_DD_SetHighlightOnMenuItem(e)}}function RTE_DD_StartCmdExec(a,b){document.body.setAttribute(g_strRTECommandToExecuteAttributeName,a);document.body.setAttribute(g_strRTECommandValueAttributeName,b);document.body.focus();RTE_DD_SetHighlightOnMenuItem(RTE_DD_GetMenuItem(0));return false}function RTE_DD_OnFocus(){}function RTE_DD_OnBlur(){var e=RTE_DD_GetMenuElement();if(e.getAttribute(g_strRTEMenuOpeningAttributeName)=="1")return;var b=RTE_DD_GetMenuBaseElementID(),c=RTE_DD_GetMenuFrame(),a=c.document.body.getAttribute(g_strRTECommandToExecuteAttributeName),d=c.document.body.getAttribute(g_strRTECommandValueAttributeName);RTE_DD_CloseMenu();RTE_GiveEditorFocus(b);RTE_RestoreSelection(b);if("x"!=a)RTE_ExecuteCommandOnSelection(RTE_DD_GetMenuBaseElementID(),a,false,d)}function RTE_DD_Item_OnFocus(b){var a=RTE_DD_GetMenuElement();a.setAttribute(g_strRTEMenuOpeningAttributeName,"0");RTE_DD_SetHighlightOnMenuItem(b)}function RTE_DD_Item_OnBlur(){g_elemRTEHighlightedMenuItem=null;g_iRTEHighlightedMenuItem=-1;window.setTimeout("RTE_OnItemBlurTestCloseMenu()",30)}function RTE_OnItemBlurTestCloseMenu(){if(null==g_elemRTEHighlightedMenuItem)RTE_DD_CloseMenu()}function RTE_DD_OnKeyDown(g){var a=g.document.parentWindow.event,e=a.keyCode,f=a.altKey,d=a.ctrlKey,c=a.shiftKey;if(!d&&!f&&!c)switch(e){case 27:var b=g_strRTEDDBaseElementID;RTE_DD_CloseMenu();RTE_GiveEditorFocus(b);RTE_ResetAllToolBarStates(b);break;case 38:a.returnValue=false;RTE_DD_SetHighlightOnPrevMenuItem(1);break;case 9:a.returnValue=false;break;case 40:a.returnValue=false;RTE_DD_SetHighlightOnNextMenuItem(1);break;case 33:a.returnValue=false;RTE_DD_SetHighlightOnPrevMenuItem(12);break;case 34:a.returnValue=false;RTE_DD_SetHighlightOnNextMenuItem(12);break;case 36:a.returnValue=false;break;case 35:a.returnValue=false}if(!d&&!f&&c)switch(e){case 9:a.returnValue=false}}function RTE_DDItem_OnMouseOver(a){if(null!=a)RTE_DD_SetHighlightOnMenuItem(a)}function RTE_DDItem_OnMouseOut(a){if(null!=a)RTE_DD_ClearHighlightOnMenuItem(a)}var g_rgstrRTEMenuHtml=[],g_strRTEColorMatrixMenuItemPrefixHtml='<div unselectable="on" style="width: 10px; height: 10px; background-color: ',g_strRTEColorMatrixMenuItemSufffixHtml=';"><img unselectable="on" width=10 height=10 src="'+RTE_GetServerRelativeUnlocalizedImageUrl("blank.gif")+'" alt="%TOOLTIP%"></div>';function RTE_DD_OpenFontNameOrSizeSelector(h,n,i){var b=RTE_GetSelection(h),j=b.queryCommandValue(g_strRTEFontNameMnemonic),k=b.queryCommandValue(g_strRTEFontSizeMnemonic),m=b.queryCommandValue(g_strRTEBoldMnemonic),l=b.queryCommandValue(g_strRTEItalicMnemonic),a="",g=-1,e="",f=RTE_DD_GetFontNameOrSizeSelectorUnformattedHtml(i,n);a=f[0];g=f[1];if(i){a=a.replace(new RegExp(g_strRTEFontSizeToken,"g"),Math.min(Math.max(k,2),5));e=g_strRTEFontNameMnemonic}else{a=a.replace(new RegExp(g_strRTEFontNameToken,"g"),j);e=g_strRTEFontSizeMnemonic}var c="",d="";if(m){c="<b>";d="</b>"}if(l){c+="<i>";d+="</i>"}a=a.replace(new RegExp(g_strRTEBegBoldItalicToken,"g"),c);a=a.replace(new RegExp(g_strRTEEndBoldItalicToken,"g"),d);RTE_DD_OpenMenu(h,e,a,g)}function RTE_DD_GetFontNameOrSizeSelectorUnformattedHtml(g,h){var a;if(g)a=g_strRTEFontNameMnemonic;else a=g_strRTEFontSizeMnemonic;var b=g_rgstrRTEMenuHtml[a];if(null!=b)return b;b=RTE_DD_GenerateMenuOpenHtml(h);var e=-1;if(g){var f=RTE_GetSortedFontNames();e=f.length;var d;for(d=0;d<e;d++)b+=RTE_DD_GenerateMenuItemHtml(1,d,a,f[d],g_strRTEBegBoldItalicToken+'<font size="'+g_strRTEFontSizeToken+'" face="'+f[d]+'">'+f[d]+"</font>"+g_strRTEEndBoldItalicToken,"")}else{e=7;var c;for(c=1;c<=e;c++)b+=RTE_DD_GenerateMenuItemHtml(1,c-1,a,c,g_strRTEBegBoldItalicToken+'<font size="'+c+'" face="'+g_strRTEFontNameToken+'">'+c+" - "+L_ExampleText_TEXT+"</font>"+g_strRTEEndBoldItalicToken,"")}b+=RTE_DD_GenerateMenuCloseHtml();g_rgstrRTEMenuHtml[a]=[b,e];return g_rgstrRTEMenuHtml[a]}function RTE_DD_OpenForeColorSelector(a,b){RTE_DD_OpenMenu(a,g_strRTEForeColorMnemonic,RTE_DD_GetColorSelectorHtml(g_strRTEForeColorMnemonic,b),g_rgrgstrRTEColorMatrix.length)}function RTE_DD_OpenBackColorSelector(a,b){RTE_DD_OpenMenu(a,g_strRTEBackColorMnemonic,RTE_DD_GetColorSelectorHtml(g_strRTEBackColorMnemonic,b),g_rgrgstrRTEColorMatrix.length)}function RTE_DD_GetColorSelectorHtml(c,d){var b=g_rgstrRTEMenuHtml[c];if(null==b){b=RTE_DD_GenerateMenuOpenHtml(d);var a;for(a=0;a<g_rgrgstrRTEColorMatrix.length;a++)b+=RTE_DD_GenerateMenuItemHtml(g_cRTEColorMatrixColumns,a,c,g_rgrgstrRTEColorMatrix[a][1],g_strRTEColorMatrixMenuItemPrefixHtml+g_rgrgstrRTEColorMatrix[a][1]+g_strRTEColorMatrixMenuItemSufffixHtml.replace("%TOOLTIP%",g_rgrgstrRTEColorMatrix[a][0]),"");b+=RTE_DD_GenerateMenuCloseHtml();g_rgstrRTEMenuHtml[c]=b}return b}var g_cRTEColorMatrixColumns=8,g_rgrgstrRTEColorMatrix=[[L_Black_TEXT,"#000000"],[L_Brown_TEXT,"#993300"],[L_OliveGreen_TEXT,"#333300"],[L_DarkGreen_TEXT,"#003300"],[L_DarkTeal_TEXT,"#003366"],[L_DarkBlue_TEXT,"#000080"],[L_Indigo_TEXT,"#333399"],[L_Gray80_TEXT,"#333333"],[L_DarkRed_TEXT,"#800000"],[L_Orange_TEXT,"#ff6600"],[L_DarkYellow_TEXT,"#808000"],[L_Green_TEXT,"#008000"],[L_Teal_TEXT,"#008080"],[L_Blue_TEXT,"#0000FF"],[L_BlueGray_TEXT,"#666699"],[L_Gray50_TEXT,"#808080"],[L_Red_TEXT,"#FF0000"],[L_LightOrange_TEXT,"#ff9900"],[L_Lime_TEXT,"#99cc00"],[L_SeaGreen_TEXT,"#339966"],[L_Aqua_TEXT,"#33cccc"],[L_LightBlue_TEXT,"#3366ff"],[L_Violet_TEXT,"#800080"],[L_Gray40_TEXT,"#969696"],[L_Pink_TEXT,"#FF00FF"],[L_Gold_TEXT,"#ffcc00"],[L_Yellow_TEXT,"#FFFF00"],[L_BrightGreen_TEXT,"#00FF00"],[L_Turquoise_TEXT,"#00FFFF"],[L_SkyBlue_TEXT,"#00ccff"],[L_Plum_TEXT,"#993366"],[L_Gray25_TEXT,"#C0C0C0"],[L_Rose_TEXT,"#ff99cc"],[L_Tan_TEXT,"#ffcc99"],[L_LightYellow_TEXT,"#ffff99"],[L_LightGreen_TEXT,"#ccffcc"],[L_LightTurquoise_TEXT,"#ccffff"],[L_PaleBlue_TEXT,"#99ccff"],[L_Lavender_TEXT,"#cc99ff"],[L_White_TEXT,"#FFFFFF"]];function RTE_GetDialogHelper(){return document.all(g_strRTEDialogHelperID)}function RTE_GetSortedFontNames(){var a=[],b=RTE_GetDialogHelper();if(null!=b&&null!=b.fonts&&0<b.fonts.count){var c;for(c=1;c<b.fonts.count;c++)RTE_InsertIntoSortedArrayIfValid(b.fonts(c),a)}else{RTE_InsertIntoSortedArrayIfValid(L_Font1_TEXT,a);RTE_InsertIntoSortedArrayIfValid(L_Font2_TEXT,a);RTE_InsertIntoSortedArrayIfValid(L_Font3_TEXT,a);RTE_InsertIntoSortedArrayIfValid(L_Font4_TEXT,a);RTE_InsertIntoSortedArrayIfValid(L_Font5_TEXT,a);RTE_InsertIntoSortedArrayIfValid(L_Font6_TEXT,a);RTE_InsertIntoSortedArrayIfValid(L_Font7_TEXT,a);RTE_InsertIntoSortedArrayIfValid(L_Font8_TEXT,a)}return a}function RTE_IsChildOfElement(d,e){var a=e.children;if(null==a||0>=a.length)return false;var b=0;for(b=0;b<a.length;b++){var c=a[b];if(c==d)return true;if(RTE_IsChildOfElement(d,c))return true}return false}function RTE_FindParentElementWithTag(a,b){if(null==a.parentElement)return null;return RTE_FindParentElementOrSelfWithTag(a.parentElement,b)}function RTE_FindParentElementOrSelfWithTag(a,b){if(a.tagName==b)return a;else{if(null==a.parentElement)return null;return RTE_FindParentElementOrSelfWithTag(a.parentElement,b)}}var g_iRTELeft=0,g_iRTETop=1,g_iRTEWidth=2,g_iRTEHeight=3,g_iRTERight=4,g_iRTEBottom=5;function RTE_GetElementWindowCoordinates(a){var c=0,d=0,f=a.offsetWidth,e=a.offsetHeight;do{c+=a.offsetLeft;d+=a.offsetTop;if(null==a.offsetParent){c+=parseInt(a.currentStyle.marginLeft);d+=parseInt(a.currentStyle.marginTop)}a=a.offsetParent}while(a!=null);var b=[];b[g_iRTELeft]=c;b[g_iRTETop]=d;b[g_iRTEWidth]=f;b[g_iRTEHeight]=e;b[g_iRTERight]=c+f-1;b[g_iRTEBottom]=d+e-1;return b}function RTE_GetServerRelativeUnlocalizedImageUrl(a){return "/_layouts/images/"+a}function RTE_GetServerRelativeImageUrl(a){return "/_layouts/"+L_Language_Text+"/images/"+a}function RTE_GetServerRelativeStylesheetUrl(a,b){return "/_layouts/"+b+"/styles/"+a}function RTE_GetServerRelativeScriptUrl(a,b){return "/_layouts/"+b+"/"+a}function RTE_StripDoubleSpaces(a){while(a.indexOf("  ")!=-1)a=a.replace(/  /g," ");return a}function RTE_AddClassToClassList(a,b){if(0<=a.indexOf(b))return a;return RTE_StripDoubleSpaces(a+" "+b)}function RTE_ReplaceClassInClassList(a,c,d){var b=a.indexOf(c),e="";if(0<b)return RTE_StripDoubleSpaces(a.substr(0,b)+" "+d+" "+a.substr(b+c.length));return RTE_AddClassToClassList(a,d)}function RTE_RemoveClassFromClassList(a,b){return RTE_ReplaceClassInClassList(a,b,"")}function RTE_AddOrRemoveClassFromClassList(c,a,b){if(c)return RTE_AddClassToClassList(a,b);return RTE_RemoveClassFromClassList(a,b)}function RTE_InsertIntoSortedArrayIfValid(c,b){if(null==c||0==c.length)return;var a=0;for(a=b.length;a>=0;a--)if(0==a||b[a-1]<c){b[a]=c;return}else b[a]=b[a-1]}function FormTabIndex(){if(window.formTabIndex){if(formTabIndex==-1)return "";return "tabindex="+formTabIndex}return "tabindex=1"}function IntlDate(f,g,a,b,c,d,e){this.yr=f;this.mon=g;this.day=a;this.hr=b;this.min=c;this.sec=d;this.caltype=e}IntlDate.prototype.valueOf=toIntlValue;function toIntlValue(){var a=0,c=11;if((this.caltype==6||this.caltype==8)&&(this.day<1||this.day>30))a=Number.NaN;if(this.caltype==8)if((this.yr*7+1)%19<7)c=12;if(this.mon<0||this.mon>c)a=Number.NaN;if(this.caltype==7){var b=new Date(Date.UTC(this.yr-543,this.mon,this.day));if(this.yr-543!=b.getUTCFullYear()||this.mon!=b.getUTCMonth()||this.day!=b.getUTCDate())a=Number.NaN}return a}IntlDate.prototype.setUTCHours=setIntlHours;function setIntlHours(c,a,b){if(!a)a=0;if(!b)b=0;this.hr=c;this.min=a;this.sec=b}IntlDate.prototype.setSeconds=setIntlSeconds;function setIntlSeconds(a){this.sec=a}IntlDate.prototype.setTime=setIntlTime;function setIntlTime(b){var a=new Date(b);this.yr=a.getFullYear();this.mon=a.getMonth();this.day=a.getDate();this.hr=a.getHours();this.min=a.getMinutes();this.sec=a.getSeconds()}IntlDate.prototype.getUTCFullYear=getIntlFullYear;function getIntlFullYear(){return this.yr}IntlDate.prototype.getUTCMonth=getIntlMonth;function getIntlMonth(){return this.mon}IntlDate.prototype.getUTCDate=getIntlDate;function getIntlDate(){return this.day}IntlDate.prototype.getUTCHours=getIntlHours;function getIntlHours(){return this.hr}IntlDate.prototype.getUTCMinutes=getIntlMinutes;function getIntlMinutes(){return this.min}IntlDate.prototype.getUTCSeconds=getIntlSeconds;function getIntlSeconds(){return this.sec}IntlDate.prototype.getTime=getIntlTime;function getIntlTime(){var a=new Date(this.yr,this.mon,this.day,this.hr,this.min,this.sec);return a.getTime()}function DateOptions(){var b="All Day",c="more...",g=c,f=b,a=54,d="am",e="pm";this.stDateOrder="MDY";this.f12Hour=true;this.stAM=d;this.stPM=e;this.TimeMarkPosn=0;this.dminControl=5;this.chDateSep="/";this.chTimeSep=":";this.dyrWindow=30;this.dow=0;this.webTZOffsetMin=0;this.WorkDayStartHour=8;this.WorkDayEndHour=17;this.DailyStartHourDelta=1;this.DailyEndHourDelta=4;this.CalendarPeriod="month";this.L_AllDay_Text=f;this.AllDayWidth=a;this.L_More_Text=g}DateOptions.prototype.SetTimeFormat=DOSetTimeFormat;function DOSetTimeFormat(a){this.f12Hour=a==0}DateOptions.prototype.SetDateOrder=DOSetDateOrder;function DOSetDateOrder(a){switch(a){case 0:this.stDateOrder="MDY";break;case 1:this.stDateOrder="DMY";break;case 2:this.stDateOrder="YMD"}}DateOptions.prototype.SetDOW=DOSetDOW;function DOSetDOW(a){this.dow=(a+1)%7}DateOptions.prototype.ParseLocaleDate=DOParseLocaleDate;function DOParseLocaleDate(c,i){var g=this.chDateSep,o=this.stDateOrder,b=c.indexOf(g),l,n,e,d,h,a;if(b<0){g="/";b=c.indexOf(g);if(b<0){g="-";b=c.indexOf(g)}}if(b<0)return Number.NaN;var f=c.indexOf(g,b+1);l=c.substr(0,b)-0;if(f<0){if(i!=1)return Number.NaN;f=c.length;var p=this.Today();e=p.getUTCFullYear();if(o=="YMD")o="MDY"}else e=c.substr(f+1)-0;n=c.substr(b+1,f-b-1)-0;if(isNaN(l)||isNaN(e)||isNaN(e))return Number.NaN;var m;switch(o){case "DMY":h=l;d=n;a=e;m=c.length-f-1;break;case "YMD":a=l;m=b;d=n;h=e;break;case "MDY":d=l;h=n;a=e;m=c.length-f-1}if(a<0)return Number.NaN;if(m<3)a=this.YrWindow(a,i);d=d-1;var k=1900,j=8900;switch(i){case 6:k=1319;j=3481;break;case 7:k=2444;j=5043;break;case 8:k=5662;j=5998;break;case 16:k=1823;j=3920}var q=i==1&&a==1899&&d==11&&h==31;if((a<k||a>j)&&!q)return Number.NaN;switch(i){case 6:case 7:case 8:var p=this.DateIntlYMD(a,d,h,i);break;default:var p=this.DateYMD(a,d,h)}return p}DateOptions.prototype.DateYMD=DODateYMD;function DODateYMD(b,c,d){if(isNaN(b)||isNaN(c)||isNaN(d))return Number.NaN;var a=new Date(Date.UTC(b,c,d));if(b!=a.getUTCFullYear()||c!=a.getUTCMonth()||d!=a.getUTCDate())return Number.NaN;return a}DateOptions.prototype.DateIntlYMD=DODateIntlYMD;function DODateIntlYMD(a,b,c,e){if(isNaN(a)||isNaN(b)||isNaN(c))return Number.NaN;var d=new IntlDate(a,b,c,0,0,0,e);return d}DateOptions.prototype.YrWindow=DOYrWindow;function DOYrWindow(b,e){var a=b-0;if(isNaN(a))return b;if(b<100){switch(e){case 1:var d=this.Today(),c=d.getUTCFullYear();a+=WMultiple(c,100);if(a>c+this.dyrWindow)a-=100;else if(a<c+this.dyrWindow-100)a+=100;break;case 6:if(a<52)a+=1400;else a+=1300;break;case 7:if(a<73)a+=2500;else a+=2400;break;case 8:if(a<91)a+=5700;else a+=5600;break;case 16:if(a<52)a+=1900;else a+=1800}return a}return b}DateOptions.prototype.StDate=DOStDate;function DOStDate(a){return this.StDateString(a.getUTCFullYear(),a.getUTCMonth()+1,a.getUTCDate())}DateOptions.prototype.StDateString=DOStDateString;function DOStDateString(c,d,b){var a;switch(this.stDateOrder){case "MDY":a=d+this.chDateSep+b+this.chDateSep+c;break;case "DMY":a=b+this.chDateSep+d+this.chDateSep+c;break;case "YMD":a=c+this.chDateSep+d+this.chDateSep+b}return a}DateOptions.prototype.StTime=DOStTime;function DOStTime(d){var b="",a=d.getUTCHours(),c=d.getUTCMinutes();if(this.f12Hour)if(a>=12){b=this.stPM;if(a>12)a-=12}else{if(a==0)a=12;b=this.stAM}if(this.TimeMarkPosn==0)return a+this.chTimeSep+St2Digits(c)+" "+b;else return b+" "+a+this.chTimeSep+St2Digits(c)}DateOptions.prototype.StBareTime=DOStBareTime;function DOStBareTime(b){var d="",a=b.getUTCHours(),c=b.getUTCMinutes();if(this.f12Hour)if(a>=12){if(a>12)a-=12}else if(a==0)a=12;return a+this.chTimeSep+St2Digits(c)}DateOptions.FHasTime=DOFHasTime;function DOFHasTime(a){var c=a.getUTCHours(),b=a.getUTCMinutes();return c!=0||b!=0}DateOptions.prototype.StTimeControls=DOStTimeControls;function DOStTimeControls(e,g){var a,m=g.getUTCHours(),f=g.getUTCMinutes(),b,c,d="",n,o,k="Hours",j="Minutes",l=":",h="",i="0";a="<span dir=ltr><SELECT TITLE='"+k+"' "+FormTabIndex()+" class='ms-input' NAME="+StAttrQuote(e.frm.StFieldName(e,"Hours"))+">\r";for(b=0;b<24;b++){if(b==m)stSelected=" SELECTED";else stSelected="";a+="<OPTION VALUE="+b+stSelected+">";c=b;if(this.f12Hour){if(b<12)d=this.stAM;else{d=this.stPM;c-=12}if(c==0)c=12;if(this.TimeMarkPosn==0)a+=c+" "+d+"\r";else a+=d+" "+c+"\r"}else{if(b<10)a+=i;a+=c+l+"\r"}}a+="</SELECT>\r";a+="&nbsp;<SELECT TITLE='"+j+"' "+FormTabIndex()+" NAME="+StAttrQuote(e.frm.StFieldName(e,"Minutes"))+">\r";f=WMultiple(f,this.dminControl);for(minT=0;minT<60;minT+=this.dminControl){if(minT==f)stSelected=" Selected=True";else stSelected="";a+="<OPTION VALUE="+minT+stSelected+">";a+=St2Digits(minT)+h+"\r"}a+="</SELECT></span>\r";return a}DateOptions.prototype.SetTimeControls=DOSetTimeControls;function DOSetTimeControls(a,c){var e=a.frm.FieldSubPart(a,"Hours"),d=a.frm.FieldSubPart(a,"Minutes"),f=c.getUTCHours(),b=c.getUTCMinutes(),g;b=WMultiple(b,this.dminControl);e.selectedIndex=f;d.selectedIndex=b/this.dminControl}DateOptions.prototype.Today=DOToday;function DOToday(){var a=this.Now();a.setUTCHours(0,0,0,0);return a}DateOptions.prototype.Now=DONow;function DONow(){var a=new Date;a.setTime(a.getTime()-this.webTZOffsetMin*DateOptions.msMinute);return a}DateOptions.ClientToday=DOClientToday;function DOClientToday(){var a=DateOptions.ClientNow();a.setUTCHours(0,0,0,0);return a}DateOptions.ClientNow=DOClientNow;function DOClientNow(){var a=new Date;a.setTime(a.getTime()-a.getTimezoneOffset()*DateOptions.msMinute);return a}DateOptions.ParseISODate=DOParseISODate;function DOParseISODate(a,c){var b="#INVALID";if(a.length<19)return b;var i=a.substr(0,4)-0,f=a.substr(5,2)-0,d=a.substr(8,2)-0,h=a.substr(11,2)-0,e=a.substr(14,2)-0,g=a.substr(17,2)-0;if(isNaN(i)||isNaN(f)||isNaN(d)||isNaN(h)||isNaN(e)||isNaN(g))return b;if(c=="undefined")c=0;switch(c){case 6:case 7:case 8:b=new IntlDate(i,f-1,d,h,e,g,c);break;default:b=new Date(Date.UTC(i,f-1,d,h,e,g))}return b}DateOptions.prototype.RoundDate=DateRoundDate;function DateRoundDate(a){a.setSeconds(0);return a}DateOptions.StISODate=DOStISODate;function DOStISODate(a){var g=a.getUTCFullYear(),d=a.getUTCMonth()+1,b=a.getUTCDate(),f=a.getUTCHours(),c=a.getUTCMinutes(),e=a.getUTCSeconds();return g+"-"+St2Digits(d)+"-"+St2Digits(b)+"T"+St2Digits(f)+":"+St2Digits(c)+":"+St2Digits(e)+"Z"}DateOptions.msSecond=1e3;DateOptions.msMinute=DateOptions.msSecond*60;DateOptions.msHour=DateOptions.msMinute*60;DateOptions.msDay=DateOptions.msHour*24;DateOptions.msWeek=DateOptions.msDay*7;DateOptions.cdyYr=365;DateOptions.cdyQYr=4*DateOptions.cdyYr+1;DateOptions.cdyC=25*DateOptions.cdyQYr-1;DateOptions.cdyQC=4*DateOptions.cdyC+1;DateOptions.mpMonIdy=[31,61,92,122,153,184,214,245,275,306,337];DateOptions.idyJan1=306;DateOptions.ddayOrigin=135080;function DateDecode(j){this.ms=j.getTime();this.msDay=this.ms%DateOptions.msDay;if(this.sec<0)this.sec+=DateOptions.msDay;this.idy=Math.floor(this.ms/DateOptions.msDay)+DateOptions.ddayOrigin;var g=this.idy%DateOptions.cdyQC,i=Math.floor(this.idy/DateOptions.cdyQC),c=g%DateOptions.cdyC,e=Math.floor(g/DateOptions.cdyC);if(e==4){e=3;c=DateOptions.cdyC}var f=c%DateOptions.cdyQYr,h=Math.floor(c/DateOptions.cdyQYr),b=f%DateOptions.cdyYr,d=Math.floor(f/DateOptions.cdyYr);if(d==4){d=3;b=DateOptions.cdyYr}this.yr=1600+i*400+e*100+h*4+d;if(b>=DateOptions.idyJan1)this.yr++;var a;for(a=0;a<11;a++)if(b<DateOptions.mpMonIdy[a])break;this.mon=(a+2)%12;this.day=b-(a>0?DateOptions.mpMonIdy[a-1]:0)+1;this.hr=Math.floor(this.msDay/DateOptions.msHour);this.min=Math.floor(this.msDay%DateOptions.msHour/DateOptions.msMinute);this.sec=Math.floor(this.msDay%DateOptions.msMinute/DateOptions.msSecond);this.dow=(this.idy+3)%7}DateDecode.prototype.MsEncode=DDMsEncode;function DDMsEncode(){this.ms=Date.UTC(this.yr,this.mon,this.day,this.hr,this.min,this.sec);return this.ms}DateOptions.fOldDate=typeof Date.prototype.getUTCHours=="undefined";if(DateOptions.fOldDate){Date.prototype.getUTCDay=DateGetUTCDay;Date.prototype.getUTCDate=DateGetUTCDate;Date.prototype.getUTCFullYear=DateGetUTCFullYear;Date.prototype.getUTCMonth=DateGetUTCMonth;Date.prototype.getUTCHours=DateGetUTCHours;Date.prototype.getUTCMinutes=DateGetUTCMinutes;Date.prototype.getUTCSeconds=DateGetUTCSeconds;Date.prototype.setUTCDate=DateSetUTCDate;Date.prototype.setUTCHours=DateSetUTCHours;Date.prototype.EnsureDecode=DateEnsureDecode;Date.prototype.ResetMs=DateResetMs}function DateEnsureDecode(){if(this.dd=="undefined"||this.dd.ms!=this.getTime())this.dd=new DateDecode(this)}function DateResetMs(){this.setTime(this.dd.MsEncode())}function DateGetUTCDate(){this.EnsureDecode();return this.dd.day}function DateGetUTCDay(){this.EnsureDecode();return this.dd.dow}function DateGetUTCFullYear(){this.EnsureDecode();return this.dd.yr}function DateGetUTCMonth(){this.EnsureDecode();return this.dd.mon}function DateGetUTCHours(){this.EnsureDecode();return this.dd.hr}function DateGetUTCMinutes(){this.EnsureDecode();return this.dd.min}function DateGetUTCSeconds(){this.EnsureDecode();return this.dd.sec}function DateSetUTCDate(a){this.EnsureDecode();this.dd.day=a;this.ResetMs()}function DateSetUTCHours(c,a,b){this.EnsureDecode();if(!a)a=0;if(!b)b=0;this.dd.hr=c;this.dd.min=a;this.dd.sec=b;this.ResetMs()}DateDecode.prototype.toString=StDateDecode;function StDateDecode(){return "Date Object\rYear: "+this.yr+"\rMon: "+(this.mon+1)+"\rDay: "+this.day+"\rhr: "+this.hr+"\rmin: "+this.min+"\rsec: "+this.sec}function DatePicker(a){this.frm=a;if(a.fUseDHTML){document.write('<IFRAME FRAMEBORDER=0 SRC="'+a.stPagePath+'iframe.htm" SCROLLING=no style="position:absolute;display:none;background:white;" ID=DatePickerWind></IFRAME>');this.wnd=DatePickerWind;document.body.onclick=DPCancelHandler;this.ifrm=document.getElementById("DatePickerWind")}}function DPCancelHandler(){frmCurrent.dp.Cancel()}var L_DatePickerAlt_Text="Choose date from calendar";DatePicker.prototype.StButton=DPStButton;function DPStButton(b,c){var a="";if(this.frm.fUseDHTML)a+='<IMG ALT="'+L_DatePickerAlt_Text+'" CLASS=ms-button '+"ONCLICK='{var elt = event.srcElement; "+c+"; if (!elt.disabled) frm.FindField("+STSScriptEncodeWithQuote(b.stName)+").PopDatePicker(elt);}'"+"SRC="+StAttrQuote(this.frm.stImagesPath+"calendar.gif")+">";return a}DatePicker.prototype.Popup=DPPopup;function DPPopup(c,d,a){if(this.elt!=null&&this.elt==a){this.Cancel();return}this.Cancel();this.bRTLAlign=false;this.date=new Date(c.getTime());this.date.setUTCHours(0,0,0,0);this.field=d;this.elt=a;var b=WindowPosition(a);this.ifrm.style.pixelLeft=b.x+1;this.ifrm.style.pixelTop=b.y+a.offsetHeight;this.SetHTML(this.StBuild())}DatePicker.prototype.AdjustFrameSize=DPAdjustFrameSize;function DPAdjustFrameSize(){this.ifrm.style.display="block";var a=this.wnd.document.getElementById("DatePickerDiv");if(!this.bDidAlign){this.bDidAlign=true;this.ifrm.style.pixelWidth=a.offsetWidth-100}this.ifrm.style.pixelWidth=a.offsetWidth;this.ifrm.style.pixelHeight=a.offsetHeight;if(this.ifrm.currentStyle.direction=="rtl"&&!this.bRTLAlign){this.bRTLAlign=true;this.ifrm.style.pixelLeft-=this.ifrm.style.pixelWidth-event.srcElement.offsetWidth+1}}DatePicker.prototype.StBuild=DPStBuild;function DPStBuild(){var a="";this.cal=new Calendar(this.date.getUTCFullYear(),this.date.getUTCMonth(),this.frm.dopt,"parent.frm.dp");this.cal.fDatePicker=true;this.cal.dateDP=this.date;a+=this.cal.StBuild();return a}DatePicker.prototype.SetHTML=DPSetHTML;function DPSetHTML(b){var a=this.wnd.document.getElementById("onetidThemeCSS");if(a&&this.frm.themeCSSurl)a.href=this.frm.themeCSSurl;this.wnd.document.body.innerHTML="<DIV ID=DatePickerDiv>"+b+"</DIV>";this.wnd.document.selection.empty();this.AdjustFrameSize()}DatePicker.prototype.ClickDay=DPClickDay;function DPClickDay(b,c,d){var a=new Date(Date.UTC(b,c,d));this.field.value=this.frm.dopt.StDate(a);this.Cancel()}DatePicker.prototype.MoveMonth=DPMoveMonth;function DPMoveMonth(a){this.cal.SetDate(this.cal.yr,this.cal.mon+a,1);this.SetHTML(this.cal.StBuild())}DatePicker.prototype.Cancel=DPCancel;function DPCancel(){if(this.elt!=null){this.ifrm.style.display="none";this.elt=null}}DatePicker.prototype.SetDate=DPSetDate;function DPSetDate(a,b,c){this.cal.SetDate(a,b,c);this.SetHTML(this.cal.StBuild())}function FrmOnSubmitRetFalse(){return false}var frmCurrent;function OWSForm(a,b,c){this.stName=a;this.stFieldPrefix="urn:schemas-microsoft-com:office:office#";this.dopt=new DateOptions;this.nopt=new NumberOptions;this.fUseDHTML=browseris.ie4up&&browseris.win32;if(!b)this.fUseDHTML=false;this.ifldMax=0;this.rgfld=[];this.stError="";this.stImagesPath="";this.stPagePath=c+L_Language_Text+"/";this.dp=new DatePicker(this);this.stInputStyle=browseris.ie4up&&browseris.win32||browseris.nav6up?"CLASS=ms-input":"";this.stLongStyle=browseris.ie4up&&browseris.win32||browseris.nav6up?"CLASS=ms-long":"";this.fPreviewMode=false;if(document.forms[this.stName])document.forms[this.stName].onsubmit=FrmOnSubmitRetFalse;this.form=null;this.themeCSSurl=retrieveCurrentThemeLink();frmCurrent=this}OWSForm.prototype.AddField=FrmAddField;function FrmAddField(a,b,c,d){this.rgfld[this.ifldMax++]=a;a.frm=this;a.stName=b;a.stDisplay=c;a.stValue=d;a.fRequired=false;a.stError="";a.stAttributes="";a.fCalcCheck=false}OWSForm.prototype.DataBind=FrmDataBind;function FrmDataBind(){var a,b;if(this.form==null)this.form=document.forms[this.stName];for(a=0;a<this.ifldMax;a++){b=this.rgfld[a];b.DataBind()}}OWSForm.prototype.FindField=FrmFindField;function FrmFindField(b){var a;for(ifld=0;ifld<this.ifldMax;ifld++){a=this.rgfld[ifld];if(a.stName==b)return a}return null}OWSForm.prototype.ValidateAndSubmit=FrmValidateAndSubmit;function FrmValidateAndSubmit(b){if(this.fPreviewMode){var a="This form cannot be saved when previewing this page.";window.alert(a);return}if(this.FValidate(b)){this.FPostProcess();this.form.submit()}}OWSForm.prototype.FValidate=FValidateForm;function FValidateForm(d){var b,a,c=true;if(this.form==null)this.form=document.forms[this.stName];for(b=0;b<this.ifldMax;b++){a=this.rgfld[b];if(!a.fSkipValidation&&!a.FValidate()){if(a.errFld)a=a.errFld;if(c){this.stError=a.stError;c=false}if(d){a.FieldFocus();alert(this.stError);return false}}}return c}OWSForm.prototype.FPostProcess=FPostProcessForm;function FPostProcessForm(){var a,b;this.form=document.forms[this.stName];for(a=0;a<this.ifldMax;a++){b=this.rgfld[a];if(b.PostProcess)b.PostProcess()}return true}OWSForm.prototype.SetFirstFocus=FrmSetFirstFocus;function FrmSetFirstFocus(b){var a;if(b!=true)this.InitFormFields();for(a in this.rgfld)if(this.rgfld[a].FieldFocus&&this.rgfld[a].FieldFocus())break}OWSForm.prototype.InitFormFields=FrmInitFields;function FrmInitFields(){var a;window.focus();this.form=document.forms[this.stName];for(a in this.rgfld)if(this.rgfld[a].Init)this.rgfld[a].Init()}OWSForm.prototype.BuildFieldUI=FrmBuildFieldUI;function FrmBuildFieldUI(b,a){document.write(a)}OWSForm.prototype.StFieldPost=FrmStFieldPost;function FrmStFieldPost(a){if(!a.posted){a.posted=true;return "<INPUT TYPE=HIDDEN NAME="+StAttrQuote(this.stFieldPrefix+a.stName)+">\r"}else return ""}OWSForm.prototype.FieldPost=FrmFieldPost;function FrmFieldPost(a){if(this.form==null)this.form=document.forms[this.stName];return this.form[this.stFieldPrefix+a.stName]}OWSForm.prototype.FilenameFieldPost=FilenameFrmFieldPost;function FilenameFrmFieldPost(a){if(this.form==null)this.form=document.forms[this.stName];return this.form[a.stName]}OWSForm.prototype.StFieldSubPart=FrmStFieldSubPart;function FrmStFieldSubPart(a,f,e){var d="MaxLength=255 ",b;switch(a.direction){case 1:b=" dir=ltr";break;case 2:b=" dir=rtl";break;default:b=""}var c=a.IMEMode?' style="ime-mode:'+a.IMEMode+'" ':"";return "<INPUT "+FormTabIndex()+" "+d+a.stAttributes+" TITLE="+StAttrQuote(a.stDisplay)+" NAME="+StAttrQuote(this.StFieldName(a,f))+" id='"+"id"+a.stName+"'"+c+" VALUE="+StAttrQuote(e)+b+">"}OWSForm.prototype.FieldSubPart=FrmFieldSubPart;function FrmFieldSubPart(a,b){if(this.form==null)this.form=document.forms[this.stName];return this.form[this.StFieldName(a,b)]}OWSForm.prototype.StFieldName=FrmStFieldName;function FrmStFieldName(a,b){return this.StFieldNameFactory(a.stName,b)}OWSForm.prototype.StFieldNameFactory=FrmStFieldNameFactory;function FrmStFieldNameFactory(a,b){return "OWS:"+a+":"+b}OWSForm.prototype.GetSelValue=FrmGetSelValue;function FrmGetSelValue(b){if(this.form==null)this.form=document.forms[this.stName];var a=this.form[b];return a[a.selectedIndex].value}OWSForm.prototype.TestURL=FormTestURL;function FormTestURL(c){var b=this.FindField(c),a=StURLNormalize(TrimWhiteSpaces(this.FieldSubPart(b,"URL").value));if(a.substr(0,7)=="mailto:")open(a,"_self");else open(a,"_blank")}OWSForm.prototype.SetRadioValue=FormSetRadioValue;function FormSetRadioValue(b,c){var a=this.FindField(b);if(a.stAlias)a=this.FindField(a.stAlias);a.SetValue(c);return true}OWSForm.prototype.RevertSelect=FormRevertSelect;function FormRevertSelect(b,c){var a=this.FindField(b);a.RevertSelect(c)}OWSForm.prototype.SetFillInButton=FormSetFillInButton;function FormSetFillInButton(c){if(event!=null){var a;if(browseris.ie)a=event.keyCode;else a=event.which;if(a==9||a==16)return}var b=this.FindField(c);b.SetFillInButton()}OWSForm.prototype.UnsetFillInButton=FormUnsetFillInButton;function FormUnsetFillInButton(b){var a=this.FindField(b);a.UnsetFillInButton()}function NumberOptions(){this.chDigSep=",";this.chDecimal=".";this.chMinus="-";this.iNegNumber=1;this.rgcchSep=[3,0]}NumberOptions.prototype.SetGrouping=NoptSetGrouping;function NoptSetGrouping(a){this.rgcchSep=a.split(";")}NumberOptions.prototype.NumParse=NoptNumParse;function NoptNumParse(a){var e=false;a=a.toUpperCase();var f=new RegExp("\\"+this.chDigSep,"g");a=a.replace(f,"");f=new RegExp("\\"+this.chDecimal,"g");a=a.replace(f,".");if(a.search(/\(/)!=-1&&a.search(/\)/)!=-1){e=true;a=a.replace(/\(/,"").replace(/\)/,"")}var c=0,h=false,g="";for(c=0;c<a.length;c++){var d=a.charAt(c);if(d=="E")h=true;if(!h&&d==this.chMinus)e=true;else g+=d}var b=g-0;if(b>1.79e308)return Number.NaN;if(b!=0&&b<2.23e-308)b=0;if(e)b=-b;return b}NumberOptions.prototype.StNumber=NoptStNumber;function NoptStNumber(f){var e,c;if(f=="")return "";var d=f-0;e=d<0;if(e)d=-d;var a=d.toString();a=a.toUpperCase();if(isNaN(d))return f;a=a.replace(/\./,this.chDecimal);var g=a.indexOf(this.chDecimal);if(this.rgcchSep[0]!=0&&a.indexOf("E")==-1){if(g!=-1)c=g-1;else c=a.length-1;var b=0;while(b<this.rgcchSep.length&&c>=this.rgcchSep[b]){a=StInsertAt(a,c-this.rgcchSep[b]+1,this.chDigSep);c-=this.rgcchSep[b];b++;if(b<this.rgcchSep.length&&this.rgcchSep[b]==0)b--}}if(e)switch(this.iNegNumber){case 0:a="("+a+")";break;case 1:a=this.chMinus+a;break;case 2:a=this.chMinus+" "+a;break;case 3:a=a+this.chMinus;break;case 4:a=a+" "+this.chMinus}return a}function DateField(a,b,c,d){a.AddField(this,b,c,d);this.fDateOnly=false;this.stAttributes=a.stInputStyle+" SIZE=12";this.caltype=1;this.direction=0;this.stPopUpOnClick2="";this.origDate=null}var L_DateOrderYear_Text="YYYY",L_DateOrderMonth_Text="M",L_DateOrderDay_Text="D",L_DateOrderDesc_Text="Enter date in ^2 format^1.",L_CalendarHijri_Text=" using Hijri Calendar",L_CalendarHebrew_Text=" using Hebrew Lunar Calendar",L_CalendarThai_Text=" using Buddhist Calendar",L_CalendarSaka_Text=" using Saka Era Calendar";DateField.prototype.BuildUI=DateBuildUI;function DateBuildUI(){var a=this.stBuildUI();this.frm.BuildFieldUI(this,a+"\r")}DateField.prototype.stBuildUI=stDateBuildUI;function stDateBuildUI(){var a="",b;a+=this.frm.StFieldPost(this);if(!this.fHideDateSpan)a+="<span ID="+StAttrQuote(this.frm.StFieldName(fld,"DateSpan"))+">";if(FBlankString(this.stValue)){a+=this.frm.StFieldSubPart(this,"Date","");b=this.frm.dopt.Today()}else{b=DateOptions.ParseISODate(this.stValue,this.caltype);if(b=="#INVALID"){b=this.frm.dopt.Today();a+=this.frm.StFieldSubPart(this,"Date",b)}else{b=this.frm.dopt.RoundDate(b);a+=this.frm.StFieldSubPart(this,"Date",this.frm.dopt.StDate(b))}}this.origDate=b;a+="&nbsp;";if(this.caltype==1)a+=this.frm.dp.StButton(this,this.stPopUpOnClick2);a+="&nbsp;&nbsp;";if(!this.fHideDateSpan)a+="</span>";if(!this.fDateOnly)a+=this.frm.dopt.StTimeControls(this,b);a+="<IMG alt='' style='vertical-align: bottom' width=1pt height=26pt SRC="+StAttrQuote(this.frm.stImagesPath+"blank.gif")+">";var c="",d="";switch(this.caltype){case 6:c=L_CalendarHijri_Text;break;case 7:c=L_CalendarThai_Text;break;case 8:c=L_CalendarHebrew_Text;break;case 16:c=L_CalendarSaka_Text;break;default:c=""}d=this.frm.dopt.StDateString(L_DateOrderYear_Text,L_DateOrderMonth_Text,L_DateOrderDay_Text);if(!this.fHideDescription)a+="&nbsp;<br><SPAN class=ms-formdescription ID="+StAttrQuote(this.frm.StFieldName(fld,"DateSpan"))+">"+StBuildParam(L_DateOrderDesc_Text,c,d)+"</SPAN>";return a}DateField.prototype.PopDatePicker=DatePopDatePicker;function DatePopDatePicker(c){this.frm.form=document.forms[this.frm.stName];var a,d=this.frm.FieldPost(this),b=this.frm.FieldSubPart(this,"Date");event.cancelBubble=true;a=this.frm.dopt.Today();if(this.FValidate()&&this.date!=null)a=this.date;this.frm.dp.Popup(a,b,c);return true}DateField.prototype.DataBind=DateDataBind;function DateDataBind(){var a,b=this.frm.FieldPost(this),c=this.frm.FieldSubPart(this,"Date");if(FBlankString(b.value)){c.value="";a=this.frm.dopt.Today()}else{a=DateOptions.ParseISODate(b.value);a=this.frm.dopt.RoundDate(a);c.value=this.frm.dopt.StDate(a)}if(!this.fDateOnly)this.frm.dopt.SetTimeControls(this,a)}DateField.prototype.FieldFocus=DateFieldFocus;function DateFieldFocus(){var a=this.frm.FieldSubPart(this,"Date");if(!a.disabled){a.focus();a.select();return true}return false}var L_DateRequired_Text="You must specify a date for ^1.",L_InvalidDate_Text="^1 is not a valid date.";DateField.prototype.FValidate=DateFValidate;function DateFValidate(){var g=this.frm.FieldPost(this),e=this.frm.FieldSubPart(this,"Date");if(!e.disabled){var f=TrimWhiteSpaces(e.value);if(f=="")if(this.fRequired){this.stError=StBuildParam(L_DateRequired_Text,this.stDisplay);return false}else{g.value="";this.date=null;return true}var a=this.frm.dopt.ParseLocaleDate(f,this.caltype);if(isNaN(a)){this.stError=StBuildParam(L_InvalidDate_Text,this.stDisplay);return false}var c=1900,b=8900;switch(this.caltype){case 6:c=1319;b=3481;break;case 7:c=2444;b=5043;break;case 8:c=5662;b=5998;break;case 16:c=1823;b=3920}if(!this.fDateOnly){var l=this.frm.GetSelValue(this.frm.StFieldName(this,"Hours"))-0,j=this.frm.GetSelValue(this.frm.StFieldName(this,"Minutes"));a.setUTCHours(l,j)}var d=a.getUTCFullYear(),k=a.getUTCMonth(),i=a.getUTCDate(),h=(this.origDate==null||a.getTime()>=this.origDate.getTime())&&this.caltype==1&&d==1899&&k==11&&i==31;if((d<c||d>b)&&!h){this.stError=StBuildParam(L_InvalidDate_Text,this.stDisplay);return false}g.value=DateOptions.StISODate(a);this.date=a}return true}function URLField(b,c,d,a,e){if(FBlankString(a))a="http://";b.AddField(this,c,d,a);this.stDesc=e;this.stAttributes=b.stLongStyle}var L_URLHeading_Text="Type the Web address:",L_URLTest_Text="Click here to test",L_URLHeadingDesc_Text="Type the description:",L_URLDescriptionTooltip_Text="Description";URLField.prototype.BuildUI=URLBuildUI;function URLBuildUI(){var a="";a+=this.frm.StFieldPost(this);a+="<SPAN CLASS=ms-formdescription>"+L_URLHeading_Text+" (";a+="<A "+FormTabIndex()+" HREF='javascript:frm.TestURL("+STSScriptEncodeWithQuote(this.stName)+")' target=_self>"+L_URLTest_Text+"</A>)&nbsp;<br></span>\r";a+="<SPAN dir=ltr>";a+=this.frm.StFieldSubPart(this,"URL",this.stValue);a+="</SPAN>";a+="&nbsp;<br>\r<SPAN CLASS=ms-formdescription>"+L_URLHeadingDesc_Text+"<br></SPAN>\r";var b=this.stDisplay;this.stDisplay=L_URLDescriptionTooltip_Text;a+=this.frm.StFieldSubPart(this,"Desc",this.stDesc);this.stDisplay=b;this.frm.BuildFieldUI(this,a)}URLField.prototype.DataBind=URLDataBind;function URLDataBind(){var e=this.frm.FieldPost(this),g=this.frm.FieldSubPart(this,"URL"),f=this.frm.FieldSubPart(this,"Desc"),b=e.value,a,d,c=b.indexOf(", ");if(c==-1){c=b.lastIndexOf(",");if(c==b.length-1)b+=" "}if(c==-1){a=b;d=b}else{a=b.substr(0,c);d=b.substr(c+2)}a=a.replace(/\,\,/,",");if(FBlankString(d))d=a;if(FBlankString(a))a="http://";g.value=a;f.value=d}URLField.prototype.FieldFocus=URLFieldFocus;function URLFieldFocus(){var a=this.frm.FieldSubPart(this,"URL");if(!a.disabled){a.focus();a.select();return true}return false}URLField.prototype.FValidate=URLValidate;function URLValidate(){var c,e=this.frm.FieldPost(this),a=TrimWhiteSpaces(this.frm.FieldSubPart(this,"URL").value),b=TrimWhiteSpaces(this.frm.FieldSubPart(this,"Desc").value);if(a=="http://")a="";if(this.fRequired&&FBlankString(a)){this.stError=StBuildParam(L_FieldRequired_Text,this.stDisplay);return false}a=StURLNormalize(a);var d="You cannot type a semicolon (;) immediately followed by a number sign (#) in the Web address of a hyperlink.";if(-1!=a.indexOf(";#")||-1!=b.indexOf(";#")){this.stError=d;return false}c=a.replace(/,/g,",,")+", "+b;e.value=c;return true}function StURLNormalize(a){if(a.substr(0,2)=="\\\\"||a.substr(0,2)=="//")a="file:"+a;if(a.substr(0,5)=="file:")a=a.replace(/\\/g,"/");return a}function NumberField(a,b,c,d){a.AddField(this,b,c,d);this.fPercent=false;this.cchDisplaySize=""}NumberField.prototype.BuildUI=NumberBuildUI;function NumberBuildUI(){var a=this.stBuildUI();this.frm.BuildFieldUI(this,a)}function StDivideByOneHundred(a){if(a=="")return a;var b;b=a.indexOf("E");if(b==-1)b=a.indexOf("e");var c;if(b==-1)c="";else{c=a.slice(b);a=a.substr(0,b)}var d;if(a.charAt(0)=="-"){d="-";a=a.slice(1)}else d="";b=a.indexOf(".");if(b==-1){b=a.length;a+="."}a=a.substr(0,b)+a.slice(b+1);b-=2;if(b==-1){a="0"+a;b=0}a=StInsertAt(a,b,".");a=d+a+c;return a}function StMultiplyByOneHundred(a){if(a=="")return a;var b;b=a.indexOf("E");if(b==-1)b=a.indexOf("e");var c;if(b==-1)c="";else{c=a.slice(b);a=a.substr(0,b)}b=a.indexOf(".");if(b==-1)a+="00";else{a=a.substr(0,b)+a.slice(b+1);b+=2;while(b>=a.length+1)a+="0";a=StInsertAt(a,b,".")}a=a+c;return a}NumberField.prototype.stBuildUI=stNumberBuildUI;function stNumberBuildUI(){var c=this.stValue-0;if(this.fPercent&&!isNaN(c)){if(this.stValue!=0)this.stValue=StMultiplyByOneHundred(this.stValue);if(this.wMin!=0)this.wMin=StMultiplyByOneHundred(this.wMin.toString());if(this.wMax!=0)this.wMax=StMultiplyByOneHundred(this.wMax.toString())}var b;if(this.cchDisplaySize!="")b=this.cchDisplaySize-0;else b=11;this.stAttributes=this.frm.stInputStyle+" SIZE="+b;var a="";a+=this.frm.StFieldPost(this);a+=this.frm.StFieldSubPart(this,"Local",this.frm.nopt.StNumber(this.stValue));if(this.fPercent&&!this.fCalcCheck)a+="&nbsp;%";return a}NumberField.prototype.DataBind=NumberDataBind;function NumberDataBind(){var a=this.frm.FieldPost(this),b=this.frm.FieldSubPart(this,"Local");if(this.fPercent)a.value=StMultiplyByOneHundred(a.value.toString());b.value=this.frm.nopt.StNumber(a.value)}NumberField.prototype.FieldFocus=NumberFieldFocus;function NumberFieldFocus(){var a=this.frm.FieldSubPart(this,"Local");if(!a.disabled){a.focus();a.select();return true}return false}var L_ValueRequired_Text="You must specify a value for ^1.",L_InvalidNumber_Text="^1 is not a valid number.",L_InvalidRange_Text="^1 must be between ^2 and ^3.",L_InvalidMin_Text="^1 must be greater than or equal to ^2.",L_InvalidMax_Text="^1 must be less than or equal to ^2.",L_InvalidInteger_Text="^1 must be an integer.";NumberField.prototype.FValidate=NumberFValidate;function NumberFValidate(){var a=this.frm.FieldPost(this),b=this.frm.FieldSubPart(this,"Local").value;if(FBlankString(b)){if(this.fRequired){this.stError=StBuildParam(L_ValueRequired_Text,this.stDisplay);return false}a.value="";return true}if(this.fCalcCheck){a.value=b;return true}wValue=this.frm.nopt.NumParse(b);if(isNaN(wValue)){this.stError=StBuildParam(L_InvalidNumber_Text,this.stDisplay);return false}if(FNumber(this.wMin)&&FNumber(this.wMax)&&(wValue<this.wMin||wValue>this.wMax)){this.stError=StBuildParam(L_InvalidRange_Text,this.stDisplay,this.frm.nopt.StNumber(this.wMin),this.frm.nopt.StNumber(this.wMax));return false}if(FNumber(this.wMin)&&wValue<this.wMin){this.stError=StBuildParam(L_InvalidMin_Text,this.stDisplay,this.frm.nopt.StNumber(this.wMin));return false}if(FNumber(this.wMax)&&wValue>this.wMax){this.stError=StBuildParam(L_InvalidMax_Text,this.stDisplay,this.frm.nopt.StNumber(this.wMax));return false}if(this.fInteger&&wValue&&Math.floor(wValue)!=wValue){this.stError=StBuildParam(L_InvalidInteger_Text,this.stDisplay);return false}if(this.fPercent)a.value=StDivideByOneHundred(wValue.toString());else a.value=wValue;return true}function FNumber(a){return a!=""&&a!=null&&!isNaN(a)}function BooleanField(a,b,c,d){a.AddField(this,b,c,d)}BooleanField.prototype.BuildUI=BooleanBuildUI;function BooleanBuildUI(){var a="";a+=this.frm.StFieldPost(this);a+="<INPUT "+FormTabIndex()+" TYPE=CHECKBOX "+this.stAttributes+" TITLE="+StAttrQuote(this.stDisplay)+" NAME="+StAttrQuote(this.frm.StFieldName(fld,"Checkbox"));if(this.stValue!=0)a+=" CHECKED";a+=">\r";this.frm.BuildFieldUI(this,a)}BooleanField.prototype.DataBind=BooleanDataBind;function BooleanDataBind(){var b=this.frm.FieldPost(this),a=this.frm.FieldSubPart(this,"Checkbox");a.checked=b.value!=0}BooleanField.prototype.FieldFocus=BooleanFieldFocus;function BooleanFieldFocus(){var a=this.frm.FieldSubPart(this,"Checkbox");if(!a.disabled){a.focus();return true}return false}BooleanField.prototype.FValidate=BooleanFValidate;function BooleanFValidate(){var a=this.frm.FieldPost(this),b=this.frm.FieldSubPart(this,"Checkbox");if(b.checked)a.value=1;else a.value=0;return true}function Field(a,b,c){a.AddField(this,b,c,"")}Field.prototype.FieldFocus=FieldFieldFocus;function FieldFieldFocus(){var a=this.frm.FieldPost(this);if(!a.disabled){a.focus();return true}return false}Field.prototype.DataBind=FieldDataBind;function FieldDataBind(){}var L_FieldRequired_Text="You must specify a non-blank value for ^1.";Field.prototype.FValidate=FieldFValidate;function FieldFValidate(){var a=this.frm.FieldPost(this);if(this.fRequired&&FBlankString(a.value)){this.stError=StBuildParam(L_FieldRequired_Text,this.stDisplay);return false}if(this.frm.wBaseType==1&&a.value&&a.value.length>255){this.stError=StBuildParam(L_TextFieldMax_Text,this.stDisplay,255);return false}return true}Field.prototype.BuildUI=FieldBuildUI;function FieldBuildUI(){}function NoteField(a,b,c,d){a.AddField(this,b,c,d);this.stDirection="";this.stNumLines=""}NoteField.prototype.FieldFocus=NoteFieldFieldFocus;function NoteFieldFieldFocus(){return NoteFieldFieldFocusCore(this)}function NoteFieldFieldFocusCore(b){var a=b.frm.FieldPost(b);if(!a.disabled){a.focus();return true}return false}NoteField.prototype.BuildUI=NoteFieldBuildUI;function NoteFieldBuildUI(){NoteFieldBuildUICore(this)}function NoteFieldBuildUICore(a){var b="";b+="<TEXTAREA "+FormTabIndex()+' COLS="30"'+" ROWS="+StAttrQuote(a.stNumLines)+" TITLE="+StAttrQuote(a.stDisplay)+" Name="+StAttrQuote(a.frm.stFieldPrefix+a.stName)+" "+a.frm.stLongStyle;b+=a.IMEMode?' style="ime-mode:'+a.IMEMode+'" ':"";b+=">";b+=STSHtmlEncode(a.stValue);b+="</TEXTAREA>";a.frm.BuildFieldUI(a,b)}NoteField.prototype.DataBind=FieldDataBind;NoteField.prototype.FValidate=NoteFieldFValidate;function NoteFieldFValidate(){return NoteFieldFValidateCore(this)}function NoteFieldFValidateCore(a){var b=a.frm.FieldPost(a);if(a.fRequired&&FBlankString(b.value)){a.stError=StBuildParam(L_FieldRequired_Text,a.stDisplay);return false}if(a.frm.wBaseType==1&&b.value&&b.value.length>255){a.stError=StBuildParam(L_TextFieldMax_Text,a.stDisplay,255);return false}return true}function RichTextField(a,b,c,d){a.AddField(this,b,c,d);this.stDirection="";this.stNumLines="";this.fAllowHyperlink=false}RichTextField.prototype.FieldFocus=RichTextFieldFieldFocus;function RichTextFieldFieldFocus(){if(browseris.ie5up){RTE_GiveEditorFirstFocus(this.frm.stFieldPrefix+this.stName);return true}else return NoteFieldFieldFocusCore(this)}RichTextField.prototype.BuildUI=RichTextFieldBuildUI;function RichTextFieldBuildUI(){var a="",b="You may add HTML formatting. Click <a href= 'javascript:HelpWindowKey(\"nsrichtext\")'>here</a> for more information.";NoteFieldBuildUICore(this);if(browseris.ie5up&&browseris.win32)RTE_ConvertTextAreaToRichEdit(this.frm.stFieldPrefix+this.stName,true,fld.fAllowHyperlink,this.stDirection,L_Language_Text);else{a+="&nbsp;<br><SPAN class=ms-formdescription>"+b+"</SPAN>&nbsp;<br>";document.write(a)}}RichTextField.prototype.DataBind=FieldDataBind;RichTextField.prototype.FValidate=RichTextFieldFValidate;function RichTextFieldFValidate(){var m=NoteFieldFValidateCore(this);if(m&&!browseris.ie5up){var l=this.frm.FieldPost(this),a=l.value,c=a.length;if(a!=""){var b=a,h=a.substr(0,5),k=a.substr(c-6,6);h.toLowerCase();k.toLowerCase();if(h!="<div>"||k!="</div>"){var d=a.substr(0,4),e=a.substr(c-5,5);d.toLowerCase();e.toLowerCase();if(d!="<ol>"&&d!="<ul>"&&e!="</ol>"&&e!="</ul>"){var f=a.substr(0,12),i=a.substr(c-13,13);f.toLowerCase();i.toLowerCase();if(f!="<blockquote>"&&i!="</blockquote>"){var g=a.substr(0,3),j=a.substr(c-4,4);g.toLowerCase();j.toLowerCase();if(g!="<p>"||j!="</p>")b="<div>"+a+"</div>"}}}var n=/\n([^<])/g;b=b.replace(n,"\n<br>$1");l.value=b}}return m}function TextField(a,b,c,d){a.AddField(this,b,c,d);this.cchMaxLength="";this.cchDisplaySize=""}TextField.prototype.BuildUI=TextFieldBuildUI;function TextFieldBuildUI(){var a=this.stBuildUI();this.frm.BuildFieldUI(this,a)}TextField.prototype.stBuildUI=stTextFieldBuildUI;function stTextFieldBuildUI(){var a="",b;if(this.cchMaxLength=="")this.cchMaxLength=255;else this.cchMaxLength=this.cchMaxLength-0;if(this.cchDisplaySize!="")b=this.cchDisplaySize-0;else if(this.cchMaxLength<32)b=this.cchMaxLength-0;a+="<INPUT "+FormTabIndex()+" ";if(b)a+=this.frm.stInputStyle+" SIZE="+b;else a+=this.frm.stLongStyle;var c=this.IMEMode?' style="ime-mode:'+this.IMEMode+'" ':"";a+=" MAXLENGTH="+this.cchMaxLength+" "+this.stAttributes+" TITLE="+StAttrQuote(this.stDisplay)+" NAME="+StAttrQuote(this.frm.stFieldPrefix+this.stName)+c+" VALUE="+StAttrQuote(this.stValue)+">\r";return a}TextField.prototype.FieldFocus=TextFieldFieldFocus;function TextFieldFieldFocus(){var a=this.frm.FieldPost(this);if(!a.disabled){a.focus();a.select();return true}return false}TextField.prototype.DataBind=FieldDataBind;var L_TextFieldMax_Text="^1 can have no more than ^2 characters.";TextField.prototype.FValidate=TextFieldFValidate;function TextFieldFValidate(){var a=this.frm.FieldPost(this);a.value=TrimWhiteSpaces(a.value);if(a.value.length>this.cchMaxLength){this.stError=StBuildParam(L_TextFieldMax_Text,this.stDisplay,this.cchMaxLength);return false}if(this.fRequired&&a.value==""){this.stError=StBuildParam(L_FieldRequired_Text,this.stDisplay);return false}return true}function FilenameField(a,b,c,d){a.AddField(this,b,c,d);this.cchMaxLength="";this.cchDisplaySize=""}FilenameField.prototype.BuildUI=FilenameFieldBuildUI;function FilenameFieldBuildUI(){var a="",b;if(this.cchMaxLength=="")this.cchMaxLength=255;else this.cchMaxLength=this.cchMaxLength-0;if(this.cchDisplaySize!="")b=this.cchDisplaySize-0;else if(this.cchMaxLength<32)b=this.cchMaxLength-0;a+="<INPUT "+FormTabIndex()+" ";if(b)a+=this.frm.stInputStyle+" SIZE="+b;else a+=this.frm.stLongStyle;if(this.stValue.length>this.cchMaxLength)this.stValue=this.stValue.substr(0,this.cchMaxLength);var c=this.IMEMode?' style="ime-mode:'+this.IMEMode+'" ':"";a+=" MAXLENGTH="+this.cchMaxLength+" "+this.stAttributes+" NAME="+StAttrQuote(this.stName)+" TITLE="+StAttrQuote(this.stDisplay)+" "+c+" VALUE="+StAttrQuote(this.stValue)+">\r";this.frm.BuildFieldUI(this,a)}FilenameField.prototype.FieldFocus=FilenameFieldFieldFocus;function FilenameFieldFieldFocus(){var a=this.frm.FilenameFieldPost(this);if(!a.disabled){a.focus();a.select();return true}return false}FilenameField.prototype.DataBind=FieldDataBind;var L_FilenameFieldMax_Text="^1 can have no more than ^2 characters.";FilenameField.prototype.FValidate=FilenameFieldFValidate;function FilenameFieldFValidate(){var a=this.frm.FilenameFieldPost(this);a.value=TrimWhiteSpaces(a.value);if(a.value.length>this.cchMaxLength){this.stError=StBuildParam(L_FilenameFieldMax_Text,this.stDisplay,this.cchMaxLength);return false}if(this.fRequired&&a.value==""){this.stError=StBuildParam(L_FieldRequired_Text,this.stDisplay);return false}return true}GridChoiceField.prototype.FieldFocus=GridChoiceFieldFocus;function GridChoiceFieldFocus(){return true}function GridChoiceField(a,b,c,d){a.AddField(this,b,c,d);this.rgGridChoices=[]}GridChoiceField.prototype.BuildUI=GridChoiceBuildUI;function GridChoiceBuildUI(){var a="",b,d,m=this.frm.rgfld[this.frm.ifldMax-1].stDisplay,n=this.frm.rgfld[this.frm.ifldMax-1].stName,f=this.frm.rgfld[this.frm.ifldMax-1].stValue,l=this.rgGridChoices.length;this.iGridHeight=l;this.IsNew=f=="";var c=99,k=STSHtmlEncode(this.GridNATxt)==""?"":"<td align=right class=ms-gridT1>&nbsp;</TD>";a+=this.frm.StFieldPost(this);a+="<TABLE CELLPADDING=0 CELLSPACING=1 BORDER=0 HEIGHT=95%>\r";a+="<tr><TD>&nbsp;</TD><td class=ms-verticaldots>&nbsp;</td>\r";a+="<td  class=ms-gridT1>"+STSHtmlEncode(this.GridTxtRng1)+"&nbsp;</TD><td align=center class=ms-gridT1 colspan = ";a+=this.GridEndNum-2+">"+STSHtmlEncode(this.GridTxtRng2)+"</TD><td align=right class=ms-gridT1>&nbsp;"+STSHtmlEncode(this.GridTxtRng3)+"</TD>\r";a+=k+"</tr>\r";a+="<tr><TD>&nbsp;</TD><td class=ms-verticaldots>&nbsp;</td>\r";for(b=this.GridStartNum;b<=this.GridEndNum&&c>0;b++){a+="<td align=center class=ms-gridT1>";a+=b;a+="</TD>\r";c--}if(STSHtmlEncode(this.GridNATxt)!=""){a+="<td align=center class=ms-gridT1>";a+=STSHtmlEncode(this.GridNATxt);a+="</TD>\r";a+="</tr>"}a+="<TR><td class=ms-sectionline colspan=100% height=1><img alt='' src=";a+=StAttrQuote(this.frm.stImagesPath+"blank.gif");a+="</td></TR>";for(b in this.rgGridChoices){var h=this.rgGridChoices[b],i=-999;if(!this.IsNew){var g=h.stDisplay.length,e=f.indexOf(h.stDisplay+";#",0);if(e!=-1){var j=f.indexOf("#",e+g+2);if(j>e+g+2)i=f.substr(e+g+2,j-(e+g+2))}}a+="<TR><TD align=center class=ms-gridText>";a+=STSHtmlEncode(h.stDisplay);a+="</TD><td class=ms-verticaldots>&nbsp;</td>";c=99;endNum=STSHtmlEncode(this.GridNATxt)==""?this.GridEndNum-1:this.GridEndNum;for(d=this.GridStartNum;d<=endNum&&c>0;d++){a+="<td align=center><INPUT "+FormTabIndex()+" ";if(this.nochange=="yes")a+='onclick="window.location.reload();"';a+=" TYPE=RADIO NAME=";a+=StAttrQuote(this.frm.StFieldName(fld,"RadioButtons:")+b);if(d-0==i-0)a+=" checked ";a+="></TD>\r";c--}a+="<td align=center><INPUT "+FormTabIndex()+" ";if(this.nochange=="yes")a+='onclick="window.location.reload();"';a+=" TYPE=RADIO NAME=";a+=StAttrQuote(this.frm.StFieldName(fld,"RadioButtons:")+b);if(d-0==i-0)a+=" checked ";a+="></TD>\r";a+="</tr>\r"}a+="</table>";this.frm.BuildFieldUI(this,a)}GridChoiceField.prototype.FValidate=GridChoiceFValidate;function GridChoiceFValidate(){var c=this.frm.FieldPost(this);c.value="";var a="",b;for(b in this.rgGridChoices){var d=this.frm.FieldSubPart(this,"RadioButtons:"+b);endNum=this.GridNATxt==""?this.GridEndNum:this.GridEndNum-0+1;for(j=this.GridStartNum;j<=endNum;j++)if(d[j-this.GridStartNum].checked){a+=this.rgGridChoices[b].stValue+";#";a+=j>=0?"+"+j:j;a+="#";break}}if(this.fRequired&&a==""){this.stError=StBuildParam(L_FieldRequired_Text,this.stDisplay);return false}c.value=a;return true}GridChoiceField.prototype.AddChoice=GridChoiceAddChoice;function GridChoiceAddChoice(c,a){if(a==null||a=="")a=c;var b={};b.stDisplay=c;b.stValue=a;this.rgGridChoices[this.rgGridChoices.length]=b}function ChoiceField(a,b,c,d){a.AddField(this,b,c,d);this.rgChoices=[];this.format="Dropdown";this.fFillInChoice=false;this.radioClass="class=ms-RadioText ";this.tableClass=""}ChoiceField.prototype.BuildUI=ChoiceBuildUI;function ChoiceBuildUI(){if(this.rgChoices.length==0)return;if(this.format!="Dropdown"&&this.format!="RadioButtons"&&this.format!="Checkboxes")this.format="Dropdown";var a=this.stBuildUI();this.frm.BuildFieldUI(this,a)}var L_SpecifyYourOwn_Text="Specify your own value:",L_Choose_Text="Choose Option",L_FillInValue_Text="Fill-in Value";ChoiceField.prototype.stBuildUI=stChoiceBuildUI;function stChoiceBuildUI(){if(this.rgChoices.length==0)return;var st="",i,stControlName="NAME="+StAttrQuote(this.frm.StFieldName(this,this.format));if(this.fFillInChoice){var fillin_value="",stFillInButtonName=this.frm.StFieldName(this,"FillInButton");if(this.format=="RadioButtons"||this.format=="Checkboxes")this.AddChoice(L_SpecifyYourOwn_Text)}st+=this.frm.StFieldPost(this);if(this.format=="RadioButtons"){if(this.radioClass.indexOf("valign")==-1&&this.radioClass.indexOf("VALIGN")==-1)this.radioClass+=" VALIGN=MIDDLE";st+="<TABLE CELLPADDING=0 CELLSPACING=1 "+this.tableClass+" >\r";var fValueMatched=false;for(i in this.rgChoices){var choice=this.rgChoices[i],stRawClickAttr="frm.SetRadioValue("+STSScriptEncodeWithQuote(this.stName)+", "+STSScriptEncodeWithQuote(choice.stValue)+");",stTitle="";if(this.stDisplay.length||choice.stDisplay.length)stTitle=this.stDisplay+": "+choice.stDisplay;stClickAttr="onclick="+StAttrQuote(stRawClickAttr);if(this.fIncludeMouseDown){stClickAttr+=" onmousedown="+StAttrQuote(stRawClickAttr);stClickAttr+=" onkeypress="+StAttrQuote(stRawClickAttr);stClickAttr+=" onmousewheel="+StAttrQuote(stRawClickAttr)}st+="<TR "+stClickAttr+">\r<TD VALIGN=TOP>"+"<INPUT "+FormTabIndex()+" TYPE=RADIO "+this.stAttributes+" "+stControlName+" TITLE="+StAttrQuote(stTitle)+" VALUE="+StAttrQuote(choice.stValue);if(this.fFillInChoice&&!fValueMatched&&i==this.rgChoices.length-1&&this.stValue!=""){st+=" CHECKED";fillin_value=this.stValue}else if(choice.stValue==this.stValue){st+=" CHECKED";fValueMatched=true}st+="></TD>\r<TD "+this.radioClass+">";if(this.nobr)st+="<nobr>";st+=STSHtmlEncode(choice.stDisplay);if(choice.hasLayoutProc)st+=eval(choice.stLayoutProc+"(this, stRawClickAttr)");if(this.nobr)st+="</nobr>";st+="</TD>\r</TR>\r"}if(this.fFillInChoice){fillin_value=RemoveReplaceDelimiter(fillin_value);var stClickAttr="frm.SetFillInButton("+STSScriptEncodeWithQuote(this.stName)+");",stKeyDownAttr="frm.SetFillInButton("+STSScriptEncodeWithQuote(this.stName)+");";stClickAttr="onclick="+StAttrQuote(stClickAttr);stKeyDownAttr="onkeydown="+StAttrQuote(stKeyDownAttr);stControlName="NAME="+StAttrQuote(this.frm.StFieldName(fld,"FillIn"));if(fillin_value.length>255)fillin_value=fillin_value.substr(0,255);st+="<TR>\r<TD VALIGN=TOP></TD>\r<TD class=ms-RadioText VALIGN=TOP><INPUT "+FormTabIndex()+" MAXLENGTH=255 "+stClickAttr+" "+stKeyDownAttr+" "+this.frm.stLongStyle+" "+this.stAttributes+" "+stControlName+" TITLE="+StAttrQuote(this.stDisplay+": "+L_FillInValue_Text);st+=this.IMEMode?' style="ime-mode:'+this.IMEMode+'" ':"";st+=" VALUE="+STSHtmlEncode(fillin_value)+"></TD>\r</TR>\r"}st+="</TABLE>\r"}else if(this.format=="Checkboxes"){if(this.radioClass.indexOf("valign")==-1&&this.radioClass.indexOf("VALIGN")==-1)this.radioClass+=" VALIGN=MIDDLE ";st+="<TABLE CELLPADDING=0 CELLSPACING=1 "+this.tableClass+" >\r";stValue=this.stValue;fMultiValue=false;if(stValue.charAt(0)==";"&&stValue.charAt(1)=="#")fMultiValue=true;var count=0;if(this.horizontal)st+="<TR>\r";for(i in this.rgChoices){var choice=this.rgChoices[i],stClickAttr="frm.RevertSelect("+STSScriptEncodeWithQuote(this.stName)+", "+STSScriptEncodeWithQuote(choice.stValue)+");",stTitle=this.stDisplay+": "+STSHtmlEncode(choice.stDisplay);stClickAttr="onclick="+StAttrQuote(stClickAttr);if(!this.horizontal)st+="<TR>\r";st+="<TD VALIGN=TOP>";st+="<INPUT "+FormTabIndex()+" TYPE=CHECKBOX "+this.stAttributes+" "+stControlName+" TITLE="+StAttrQuote(stTitle)+" VALUE="+StAttrQuote(choice.stValue);if(fMultiValue){var searchPattern=";#"+choice.stValue+";#",start=stValue.indexOf(searchPattern);if(start!=-1){st+=" CHECKED";end=start+searchPattern.length;stValue=stValue.substr(0,start+2)+stValue.substr(end);if(stValue==";#;#")stValue=""}}else if(stValue==choice.stValue){st+=" CHECKED";stValue=""}st+="></TD>\r<TD "+this.radioClass;st+=stClickAttr+">"+STSHtmlEncode(choice.stDisplay);st+="</TD>\r";if(!this.horizontal)st+="</TR>\r";else if(this.horizontalBreakEvery&&0==++count%this.horizontalBreakEvery)st+="</TR>\r<TR>\r"}if(this.horizontal)st+="</TR>\r";fillin_value=RemoveReplaceDelimiter(stValue);if(this.fFillInChoice){var stClickAttr="frm.SetFillInButton("+STSScriptEncodeWithQuote(this.stName)+");",stKeyDownAttr="frm.SetFillInButton("+STSScriptEncodeWithQuote(this.stName)+");";stClickAttr="onclick="+StAttrQuote(stClickAttr);stKeyDownAttr="onkeydown="+StAttrQuote(stKeyDownAttr);stControlName="NAME="+StAttrQuote(this.frm.StFieldName(this,"FillIn"));if(fillin_value>255)fillin_value=fillin_value.substr(0,255);st+="<TR>\r<TD VALIGN=TOP></TD>\r<TD class=ms-RadioText VALIGN=TOP><INPUT "+FormTabIndex()+" MAXLENGTH=255 "+stClickAttr+" "+stKeyDownAttr+" "+this.frm.stLongStyle+" "+this.stAttributes+" "+stControlName+" TITLE="+StAttrQuote(this.stDisplay+": "+L_FillInValue_Text)+" VALUE="+STSHtmlEncode(fillin_value)+"></TD>\r</TR>\r"}st+="</TABLE>\r"}else{if(!this.horizontal)st+="<TABLE CELLPADDING=0 CELLSPACING=1 "+this.tableClass+" >\r";var fDropdownSelected=false,L_FillChoice_TXT="Choice Drop Down",stClickAttr="";if(this.fFillInChoice){stClickAttr="frm.UnsetFillInButton("+STSScriptEncodeWithQuote(this.stName)+");";stClickAttr="onclick="+StAttrQuote(stClickAttr)}var stControls="";if(!this.horizontal)stControls+="<TD";else stControls+="<SPAN";stControls+=" class=ms-RadioText VALIGN=TOP><SELECT TITLE=";if(this.fFillInChoice)stControls+=StAttrQuote(this.stDisplay+": "+L_FillChoice_TXT);else stControls+=StAttrQuote(this.stDisplay);stControls+=this.IMEMode?' style="ime-mode:'+this.IMEMode+'" ':"";stControls+=" "+FormTabIndex()+" "+this.stAttributes+stClickAttr+stControlName+">\r";for(i in this.rgChoices){var choice=this.rgChoices[i];stControls+="<OPTION  VALUE="+StAttrQuote(choice.stValue);if(choice.stValue==this.stValue){stControls+=" SELECTED";fDropdownSelected=true}stControls+=">"+STSHtmlEncode(choice.stDisplay)+"</OPTION>\r"}stControls+="</SELECT>";if(!this.horizontal)stControls+="</TD>\r";else stControls+="</SPAN>\r";if(this.fFillInChoice){var stDropdownButton="<TR>\r<TD VALIGN=TOP><INPUT "+FormTabIndex()+" TITLE="+StAttrQuote(this.stDisplay+": "+L_Choose_Text)+" TYPE=RADIO NAME="+StAttrQuote(stFillInButtonName);if(fDropdownSelected||this.stValue=="")stDropdownButton+=" CHECKED";stDropdownButton+="></TD>\r"+stControls+"</TR>\r";stControls=stDropdownButton;var stClickAttr="frm.SetFillInButton("+STSScriptEncodeWithQuote(this.stName)+");";stClickAttr="onclick="+StAttrQuote(stClickAttr);stControls+="<TR "+stClickAttr+">\r<TD VALIGN=TOP><INPUT TITLE=";stControls+=StAttrQuote(this.stDisplay+": "+L_SpecifyYourOwn_Text);stControls+=this.IMEMode?' style="ime-mode:'+this.IMEMode+'" ':"";stControls+=" "+FormTabIndex()+" TYPE=RADIO NAME="+StAttrQuote(stFillInButtonName);if(!fDropdownSelected&&this.stValue!=""){stControls+=" CHECKED";fillin_value=this.stValue}stControls+="></TD>\r<TD class=ms-descriptiontext VALIGN=MIDDLE>"+L_SpecifyYourOwn_Text+"</TD>\r</TR>\r";fillin_value=RemoveReplaceDelimiter(fillin_value);stControlName="NAME="+StAttrQuote(this.frm.StFieldName(fld,"FillIn"));stControls+="<TR>\r<TD VALIGN=TOP></TD>\r<TD class=ms-RadioText VALIGN=TOP><INPUT ";stControls+=this.IMEMode?' style="ime-mode:'+this.IMEMode+'" ':"";stControls+=" TITLE=";stControls+=StAttrQuote(this.stDisplay+": "+L_FillInValue_Text);if(fillin_value>255)fillin_value=fillin_value.substr(0,255);stControls+=" "+FormTabIndex()+" MAXLENGTH=255 "+stClickAttr+" "+this.frm.stLongStyle+" "+this.stAttributes+" "+stControlName+" VALUE="+STSHtmlEncode(fillin_value)+"></TD>\r</TR>\r";st+=stControls}else if(!this.horizontal)st+="<TR>"+stControls+"</TR>\r";else st+=stControls+"\r";if(!this.horizontal)st+="</TABLE>\r"}return st}ChoiceField.prototype.Init=ChoiceInit;function ChoiceInit(){if(this.rgChoices.length==0)return;this.SetValue(this.stValue)}ChoiceField.prototype.AddChoice=ChoiceAddChoice;function ChoiceAddChoice(c,b){if(b==null||b=="")b=c;var a={};a.stDisplay=c;a.stValue=b;a.hasLayoutProc=false;this.rgChoices[this.rgChoices.length]=a;return a}ChoiceField.prototype.AddChoiceWithLayoutProc=ChoiceAddChoiceWithLayoutProc;function ChoiceAddChoiceWithLayoutProc(a,b,c){choice=this.AddChoice(a,b);choice.stLayoutProc=c;choice.hasLayoutProc=true}ChoiceField.prototype.DataBind=ChoiceDataBind;function ChoiceDataBind(){if(this.rgChoices.length==0)return;var a=this.frm.FieldPost(this),b=this.GetControl();this.SetValue(a.value,true)}ChoiceField.prototype.SetValue=ChoiceSetValue;function ChoiceSetValue(a,h){if(this.rgChoices.length==0)return;var b,c=this.frm.FieldSubPart(this,this.format);if(FBlankString(a)||this.format=="Checkboxes"){if(this.format=="Dropdown")c.selectedIndex=-1;else if(this.rgChoices.length!=1)for(b in this.rgChoices)c[b].checked=false;else c.checked=false;if(this.fFillInChoice){this.SetFillInValue("");this.UnsetFillInButton()}if(FBlankString(a))return}if(this.format=="Checkboxes"&&a.charAt(0)==";"&&a.charAt(1)=="#"){for(b in this.rgChoices){var g=this.rgChoices[b],e=";#"+g.stValue+";#",d=a.indexOf(e);if(d!=-1){var c=this.GetControl(b);c.checked=true;end=d+e.length;a=a.substr(0,d+2)+a.substr(end);if(a==";#;#")break}}if(this.fFillInChoice){a=RemoveReplaceDelimiter(a);if(a!="")this.SetFillInValue(a);else{this.UnsetFillInButton();if(h)this.GetFillInControl().value=""}}return}var f=true;for(b in this.rgChoices){var g=this.rgChoices[b];if(g.stValue==a){if(this.format=="Dropdown")c.selectedIndex=b;else{var c=this.GetControl(b);c.checked=true}f=false;break}}if(this.fFillInChoice)if(f||a==L_SpecifyYourOwn_Text){if(a!=L_SpecifyYourOwn_Text)this.SetFillInValue(a)}else{this.UnsetFillInButton();if(h)this.GetFillInControl().value=""}return}ChoiceField.prototype.GetControl=ChoiceGetControl;function ChoiceGetControl(b){var a=this.frm.FieldSubPart(this,this.format);if((this.format=="RadioButtons"||this.format=="Checkboxes")&&this.rgChoices.length!=1){if(b!=null)return a[b];for(b in this.rgChoices)if(a[b].checked)return a[b];return a[0]}else return a}ChoiceField.prototype.GetFillInButtonControl=ChoiceGetFillInButtonControl;function ChoiceGetFillInButtonControl(){if(this.format=="Dropdown"){var a=this.frm.FieldSubPart(this,"FillInButton");return a[1]}else{var b=this.frm.FieldSubPart(this,this.format);return b[this.rgChoices.length-1]}}ChoiceField.prototype.GetFillInControl=ChoiceGetFillInControl;function ChoiceGetFillInControl(){return this.frm.FieldSubPart(this,"FillIn")}ChoiceField.prototype.FieldFocus=ChoiceFieldFocus;function ChoiceFieldFocus(){if(this.rgChoices.length==0)return false;var a=false;if(this.fFillInChoice)if(this.format=="RadioButtons"||this.format=="Checkboxes"){var c=this.frm.FieldSubPart(this,this.format);for(i in this.rgChoices)if(c[i].checked)break;if(i==this.rgChoices.length-1)a=true}else{var d=this.GetFillInButtonControl();if(d.checked)a=true}if(a)var b=this.GetFillInControl();else var b=this.GetControl();if(!b.disabled){b.focus();return true}return false}ChoiceField.prototype.FValidate=ChoiceFValidate;function ChoiceFValidate(){if(this.rgChoices.length==0)return;var a=this.frm.FieldPost(this);a.value="";if(this.fFillInChoice)var j=this.GetFillInButtonControl(),c=this.GetFillInControl();if(this.format=="Checkboxes"&&this.rgChoices.length!=1)var b=this.frm.FieldSubPart(this,this.format);else var b=this.GetControl();if(this.format=="Dropdown"){if(this.fFillInChoice&&j.checked){if(-1!=c.value.indexOf(";#")){var f="Fill in value can't contain string ;#.";this.stError=StBuildParam(f,this.stDisplay);return false}a.value=TrimWhiteSpaces(c.value)}else if(b.selectedIndex!=-1)a.value=b[b.selectedIndex].value}else if(this.format=="Checkboxes"&&this.rgChoices.length!=1){var e="",d="",h=0;for(var i in this.rgChoices)if(b[i].checked==true){if(this.fFillInChoice&&i==this.rgChoices.length-1){var g=TrimWhiteSpaces(c.value);if(g=="")break;if(-1!=g.indexOf(";#")){var f="Fill in value can't contain string ;#.";this.stError=StBuildParam(f,this.stDisplay);return false}d=g}else d=this.rgChoices[i].stValue;h++;if(h==1)e=d;else if(h==2)e=";#"+e+";#"+d+";#";else e+=d+";#"}a.value=e}else if(this.fFillInChoice&&j.checked){if(-1!=c.value.indexOf(";#")){var f="Fill in value can't contain string ;#.";this.stError=StBuildParam(f,this.stDisplay);return false}a.value=TrimWhiteSpaces(c.value)}else if(b.checked)a.value=b.value;if(this.fRequired&&a.value==""){this.stError=StBuildParam(L_FieldRequired_Text,this.stDisplay);return false}if(this.frm.wBaseType==1&&a.value&&a.value.length>255){this.stError=StBuildParam(L_TextFieldMax_Text,this.stDisplay,255);return false}return true}ChoiceField.prototype.RevertSelect=ChoiceRevertSelect;function ChoiceRevertSelect(c){if(c=="")return;for(i in this.rgChoices){var d=this.rgChoices[i];if(d.stValue==c){var a=this.GetControl(i);if(a.checked)a.checked=false;else{a.checked=true;if(this.fFillInChoice&&i==this.rgChoices.length-1){var b=this.GetFillInControl();if(!b.disabled)b.focus()}}break}}}ChoiceField.prototype.SetFillInButton=ChoiceFieldSetFillInButton;function ChoiceFieldSetFillInButton(){var b=this.GetFillInButtonControl();b.checked=true;var a=this.GetFillInControl();a.focus()}ChoiceField.prototype.UnsetFillInButton=ChoiceFieldUnsetFillInButton;function ChoiceFieldUnsetFillInButton(){if(this.format=="Dropdown"){var a=this.frm.FieldSubPart(this,"FillInButton");a[0].checked=true}else{var b=this.GetFillInButtonControl();b.checked=false}}ChoiceField.prototype.SetFillInValue=ChoiceSetFillInValue;function ChoiceSetFillInValue(c){var b=this.GetFillInButtonControl();b.checked=true;var a=this.GetFillInControl();a.value=c}function RemoveReplaceDelimiter(a){a=a.replace(/^;#/g,"");a=a.replace(/;#$/g,"");a=a.replace(/;#/g,"; ");return a}var _RecurDateRangeDiv="recurDateRangeDiv",_RecurPatternTextDiv="recurPatternTextDiv",_RecurDailyDiv="recurDailyDiv",_RecurWeeklyDiv="recurWeeklyDiv",_RecurMonthlyDiv="recurMonthlyDiv",_recurFld;function RecurrencePattern(c,r,s){var m="None",f="Custom",j="Daily",g="Weekly",e="Monthly",h="Yearly",o="No end date",n="End after: ",l="End by: ";c.AddField(this,r,s,"");this.fSkipValidation=true;this.isModifyException=false;this.isNewModifyException=false;this.stStartDate="";this.stEndDate="";this.caltype=1;this.todayiso="";this.stPrefix="RecurrencePattern#";this.iCustom="1";this.fDoCustom=false;this.rgStRecurType=[m,f,j,g,e,h];var a=0;for(i in this.rgStRecurType)a=Math.max(a,this.rgStRecurType[i].length);this.ccRecurType=a+14;this.rgStRangeType=[o,n,l];var q="1",p="1",k="1",b="1",d="10";this.recurrencePatternChoice="0";this.monthlyChoiceValue="0";this.dateRangeEndChoice="0";this.dayFrequency=q;this.weekFrequency=p;this.monthFrequency1=b;this.monthFrequency2=b;this.weeklyDayMultiValue=";#"+c.dopt.Today().getUTCDay()+";#";this.monthly1DayValue=k;this.monthly2DayValue="0";this.monthly2WeekValue="0";this.dateRangeStart=DateOptions.StISODate(this.frm.dopt.Today());this.dateRangeEnd=DateOptions.StISODate(this.frm.dopt.Today());this.dateRangeEndOccurrences=d}RecurrencePattern.prototype.BuildUI=RecurrencePatternBuildUI;function RecurrencePatternBuildUI(){var d="Date Range",e="Pattern",c="Start Date";if(this.recurrencePatternChoice<0||this.recurrencePatternChoice>this.rgStRecurType.length)this.recurrencePatternChoice="0";if(this.dateRangeEndChoice<0||this.dateRangeEndChoice>this.rgStRangeType.length)this.dateRangeEndChoice="0";if(this.monthlyChoiceValue<0||this.monthlyChoiceValue>2)this.monthlyChoiceValue=0;var a="";if(this.isModifyException||this.isNewModifyException){if(this.isModifyException)a+="<INPUT TYPE=HIDDEN NAME="+StAttrQuote(this.frm.stFieldPrefix+this.stPrefix+"Modify:"+this.stName)+"VALUE='TRUE'>\r";else if(this.isNewModifyException){a+="<INPUT TYPE=HIDDEN NAME="+StAttrQuote(this.frm.stFieldPrefix+this.stPrefix+"NewModify:"+this.stName)+"VALUE='TRUE'>\r";a+="<INPUT TYPE=HIDDEN NAME="+StAttrQuote(this.frm.stFieldPrefix+fld.stRecurrenceIDName)+"VALUE="+StAttrQuote(this.stRecurrenceID)+">\r";a+="<INPUT TYPE=HIDDEN NAME="+StAttrQuote(this.frm.stFieldPrefix+fld.stUIDName)+"VALUE="+StAttrQuote(this.stUID)+">\r"}if(this.stRecurrenceDescription)a+=STSHtmlEncode(this.stRecurrenceDescription);document.write(a);this.eventHook=new RecurrencePatternEventHooks(this,this.frm,null,this.stStartDate,this.stEndDate);this.eventHook.value=0;this.eventHook.Init();return}var b=this.frm.FindField(this.stStartDate);if(b){a+="<INPUT TYPE=HIDDEN NAME="+StAttrQuote(this.frm.stFieldPrefix+this.stPrefix+"oldStartDate:"+this.stName)+"VALUE='";a+=b.stValue;a+="'>\r"}_recurFld=this;a+="<table border='0' cellpadding='0' cellspacing='0' class='ms-formrecurrence'>\r";a+="<tr><td rowspan='5' nowrap>\r";a+=RecurrencePatternTypes(this);a+="</td>";a+="<td rowspan='5' nowrap><IMG width=40pt height=1pt SRC="+StAttrQuote(this.frm.stImagesPath+"blank.gif")+">"+"</td></tr>\r";a+="<tr><td nowrap valign='top'><div ID='"+_RecurPatternTextDiv+"' ";if(this.recurrencePatternChoice>"1")a+="style='display:none'";a+=">\r";a+="<nobr><span class='ms-formdescription'>"+e+"</span></nobr>";a+="</div></td></tr>\r";a+="<tr><td nowrap valign='top' rowspan='4' height=68pt><table border='0' cellpadding='0' cellspacing='0' class='ms-formrecurrence'>";a+="<tr><td nowrap><IMG width=12pt height=1pt SRC="+StAttrQuote(this.frm.stImagesPath+"blank.gif")+"></td></tr>";a+="<tr><td nowrap valign='top'><div ID='"+_RecurDailyDiv+"' ";if(this.recurrencePatternChoice!="2")a+="style='display:none'";a+=">\r";a+=RecurrencePatternDaily(this);a+="</div></td></tr>\r";a+="<tr><td nowrap valign='top'><div ID='"+_RecurWeeklyDiv+"' ";if(this.recurrencePatternChoice!="3")a+="style='display:none'";a+=">\r";a+=RecurrencePatternWeekly(this);a+="</div></td></tr>\r";a+="<tr><td nowrap valign='top'><div ID='"+_RecurMonthlyDiv+"' ";if(this.recurrencePatternChoice!="4")a+="style='display:none'";a+=">\r";a+=RecurrencePatternMonthly(this);a+="</div></td></tr></table></td></tr></table>\r";document.write(a);a="<div ID='"+_RecurDateRangeDiv+"' ";if(this.recurrencePatternChoice>"1")a+="style='display:none'";a+=">\r";a+="<table border='0' cellpadding='0' cellspacing='0' class='ms-formrecurrence'><tr>\r";a+="<td nowrap><IMG width=116pt height=1pt SRC="+StAttrQuote(this.frm.stImagesPath+"blank.gif")+">"+"</td>";a+="<td valign=top nowrap><nobr><span class='ms-formdescription'>"+d+"</span><br><br>"+c+"</nobr><br>";a+=RecurrenceDateRangeStart(this);a+="</td>";a+="<td nowrap><IMG width=10pt height=1pt SRC="+StAttrQuote(this.frm.stImagesPath+"blank.gif")+">"+"</td><td nowrap><br><br>";a+=RecurrenceDateRangeEnd(this);a+="</td></tr></table></div>\r";document.write(a);_recurFld=null}RecurrencePattern.prototype.Init=RecurrencePatternInit;function RecurrencePatternInit(){if(this.isModifyException||this.isNewModifyException){var a=this.frm.FindField(this.stEndDate);if(a)a.fRequired=true}}function RecurrencePatternTypes(a){var c="",d="Recurrence Type";fld=new ChoiceField(a.frm,a.stPrefix+"Type:"+a.stName,d,a.recurrencePatternChoice);fld.format="RadioButtons";fld.radioClass="class=ms-radiotext ";for(i in a.rgStRecurType){var b="";if(i!=a.iCustom||a.fDoCustom){b=i;fld.AddChoice(a.rgStRecurType[i],b)}}c+=fld.stBuildUI();a.eventHook=new RecurrencePatternEventHooks(a,a.frm,fld,a.stStartDate,a.stEndDate);a.eventHook.Init();return c}function RecurrencePatternDaily(b){var c="",e="Recur every ^1 day(s)",d="The number of days between recurrences of this event",a=new NumberField(b.frm,b.stPrefix+"daily_dayFrequency:"+b.stName,d,b.dayFrequency);a.cchDisplaySize=3;a.wMin=1;a.wMax=255;a.fInteger=true;a.fSkipValidation=true;_recurFld.dayFrequencyFld=a;var f=a.stBuildUI();c=StBuildParam(e,f);c+="<p><p>";return c}var L_Monday_Text="Monday",L_Tuesday_Text="Tuesday",L_Wednesday_Text="Wednesday",L_Thursday_Text="Thursday",L_Friday_Text="Friday",L_Saturday_Text="Saturday",L_Sunday_Text="Sunday";function RecurrencePatternWeekly(b){var k="Recur every ^1 week(s) on:^2",j="The number of weeks between recurrences of this event",h="the day(s) of the week on which this event occurs",a=new NumberField(b.frm,b.stPrefix+"weekly_weekFrequency:"+b.stName,j,b.weekFrequency);a.cchDisplaySize=3;a.wMin=1;a.wMax=52;a.fInteger=true;a.fSkipValidation=true;b.weeklyFrequencyFld=a;var m=a.stBuildUI(),d=[L_Sunday_Text,L_Monday_Text,L_Tuesday_Text,L_Wednesday_Text,L_Thursday_Text,L_Friday_Text,L_Saturday_Text],c=StURLGetVar("Source");if(c.length){c=unescape(c);var e=StSearchVar(c,"CalendarDate"),l=StSearchVar(c,"CalendarPeriod");if(l=="day"&&e.length){var f=DateOptions.ParseISODate(e);if(!isNaN(f))b.weeklyDayMultiValue=";#"+f.getUTCDay()+";#"}}a=new ChoiceField(b.frm,b.stPrefix+"weekly_multiDays:"+b.stName,h,b.weeklyDayMultiValue);a.format="Checkboxes";a.radioClass=" class=ms-input valign=baseline ";a.tableClass=" class=ms-formrecurrence ";a.horizontal=true;a.horizontalBreakEvery=4;b.weeklyMultiDayFld=a;var g="";for(i in d){g=i;a.AddChoice(d[i],g)}var n="<DIV>"+a.stBuildUI()+"</DIV>";return StBuildParam(k,m,n)}function RecurrencePatternMonthly(a){fld=new ChoiceField(a.frm,a.stPrefix+"MonthlyRecurType:"+a.stName,"",a.monthlyChoiceValue);fld.format="RadioButtons";fld.radioClass="class=ms-input valign=baseline";fld.tableClass=" class=ms-formrecurrence ";fld.fIncludeMouseDown=true;fld.nobr=true;a.monthlyChoiceFld=fld;fld.AddChoiceWithLayoutProc("","0","RecurrencePatternMonthly1");fld.AddChoiceWithLayoutProc("","1","RecurrencePatternMonthly2");var b=fld.stBuildUI();return b}function RecurrencePatternMonthly1(){var d="Day ^1 of every ^2 month(s)",c="The date each month that this event occurs",b="The number of months between recurrences",a=new NumberField(_recurFld.frm,_recurFld.stPrefix+"monthly_day:"+_recurFld.stName,c,_recurFld.monthly1DayValue);a.cchDisplaySize=2;a.wMin=1;a.wMax=31;a.fInteger=true;a.fSkipValidation=true;_recurFld.monthlyChoice1DayFld=a;var e=a.stBuildUI(),a=new NumberField(_recurFld.frm,_recurFld.stPrefix+"monthly_monthFrequency:"+_recurFld.stName,b,_recurFld.monthFrequency1);a.cchDisplaySize=2;a.wMin=1;a.wMax=12;a.fInteger=true;a.fSkipValidation=true;_recurFld.monthlyChoice1MonthFreqFld=a;var f=a.stBuildUI();return StBuildParam(d,e,f)}function RecurrencePatternMonthly2(){var n="The ^1^2 of every ^3 month(s)",e="The week each month that this event occurs",g="The day of the week on which this event occurs",f="The number of months between recurrences",k="first",j="second",l="third",h="fourth",m="last",c=[k,j,l,h,m],d=[L_Sunday_Text,L_Monday_Text,L_Tuesday_Text,L_Wednesday_Text,L_Thursday_Text,L_Friday_Text,L_Saturday_Text];a=new ChoiceField(_recurFld.frm,_recurFld.stPrefix+"monthlyByDay_weekOfMonth:"+_recurFld.stName,e,_recurFld.monthly2WeekValue);a.horizontal=true;for(i in c){var b="";b=i;a.AddChoice(c[i],b)}var o=a.stBuildUI();a=new ChoiceField(_recurFld.frm,_recurFld.stPrefix+"monthlyByDay_day:"+_recurFld.stName,g,_recurFld.monthly2DayValue);a.horizontal=true;for(i in d){var b="";b=i;a.AddChoice(d[i],b)}var p=a.stBuildUI(),a=new NumberField(_recurFld.frm,_recurFld.stPrefix+"monthlyByDay_monthFrequency:"+_recurFld.stName,f,_recurFld.monthFrequency2);a.cchDisplaySize=2;a.wMin=1;a.wMax=12;a.fInteger=true;a.fSkipValidation=true;_recurFld.monthlyChoice2MonthFreqFld=a;var q=a.stBuildUI();return StBuildParam(n,o,p,q)}function RecurrenceDateRangeStart(a){var b="<nobr>\r",c="When this event begins";fld=new DateField(a.frm,a.stPrefix+"windowStart:"+a.stName,c,a.todayiso);fld.fRequired=true;fld.fSkipValidation=true;fld.caltype=a.caltype;a.dateRangeFldStart=fld;fld.fDateOnly=true;fld.fHideDateSpan=true;b+=fld.stBuildUI();b+="</nobr>\r";return b}function RecurrenceDateRangeEnd(a){var b="The date this event ends";fld=new ChoiceField(a.frm,a.stPrefix+"EndDateRangeType:"+a.stName,b,a.dateRangeEndChoice);a.endRangeOptionFld=fld;fld.format="RadioButtons";fld.tableClass="class='ms-formrecurrence'";fld.radioClass="class=ms-input valign=baseline";fld.fIncludeMouseDown=true;fld.nobr=true;fld.AddChoice(a.rgStRangeType[0],"0");fld.AddChoiceWithLayoutProc(a.rgStRangeType[1],"1","RecurrenceEndDateRange1");fld.AddChoiceWithLayoutProc(a.rgStRangeType[2],"2","RecurrenceEndDateRange2");return fld.stBuildUI()}function RecurrenceEndDateRange1(){var c="^1 occurrence(s)",b="The number of times this event recurs",a=new NumberField(_recurFld.frm,_recurFld.stPrefix+"repeatInstances:"+_recurFld.stName,b,_recurFld.dateRangeEndOccurrences);a.cchDisplaySize=4;a.wMin=1;a.wMax=999;a.fInteger=true;a.fSkipValidation=true;_recurFld.dateRangeFldEndOccurrances=a;var d=a.stBuildUI();return StBuildParam(c,d)}function RecurrenceEndDateRange2(d,c){var b="When this event ends",a=new DateField(_recurFld.frm,_recurFld.stPrefix+"windowEnd:"+_recurFld.stName,b,"");a.fRequired=true;a.fSkipValidation=true;a.caltype=_recurFld.caltype;_recurFld.dateRangeFldEnd=a;a.fDateOnly=true;a.fHideDateSpan=true;a.stPopUpOnClick2=c;return a.stBuildUI()}function RecurrencePatternEventHooks(e,b,a,c,d){this.recurFld=e;this.frm=b;this.typeFld=a;this.stStartDate=c;this.stEndDate=d;b.AddField(this,"RecurrencePatternType","Date range, end pattern",0);if(a)a.stAlias="RecurrencePatternType";this.rgStPatternTypes=["","",_RecurDailyDiv,_RecurWeeklyDiv,_RecurMonthlyDiv,""];this.value=-1}RecurrencePatternEventHooks.prototype.Init=RecurrencePatternEventHooksInit;function RecurrencePatternEventHooksInit(){this.dateFldStart=this.frm.FindField(this.recurFld.stStartDate);this.dateFldEnd=this.frm.FindField(this.recurFld.stEndDate);this.dateRangeFldStart=this.recurFld.dateRangeFldStart;this.dateRangeFldEnd=this.recurFld.dateRangeFldEnd;var d="";d=StURLGetVar("ID");if(0==d.length)if(this.dateFldStart){var a=StURLGetVar("Source");if(a.length){a=unescape(a);var b=StSearchVar(a,"CalendarDate"),f=StSearchVar(a,"CalendarPeriod");if(f=="day"&&b.length){var c=DateOptions.ParseISODate(b);if(!isNaN(c)){b=this.frm.dopt.StDate(c);var g=this.frm.FieldSubPart(this.dateFldStart,"Date");g.value=b}}}var e=this.dateFldStart.disabled;this.dateFldStart.disabled=false;if(this.dateFldStart.FValidate()&&this.dateFldStart.date){this.dateFldStart.date.setUTCHours(0,0,0,0);this.frm.dopt.SetTimeControls(this.dateFldStart,this.dateFldStart.date)}this.dateFldStart.disabled=e}this.DateToDateRange();this.InitHooks()}RecurrencePatternEventHooks.prototype.InitHooks=DoInitRecurrencePatternEventHooks;function DoInitRecurrencePatternEventHooks(){this.divtags=document.getElementsByTagName("div");this.stRecurDateRangeDiv=this.divtags[_RecurDateRangeDiv];this.stRecurPatternTextDiv=this.divtags[_RecurPatternTextDiv];var a=document.getElementsByTagName("span");this.stStartDateSpan=a[this.frm.StFieldNameFactory(this.stStartDate,"DateSpan")];this.stEndDateSpan=a[this.frm.StFieldNameFactory(this.stEndDate,"DateSpan")];if(this.typeFld)this.ToggleDisplay(this.typeFld.stValue,true)}RecurrencePatternEventHooks.prototype.FValidate=RecurrencePatternValidate;function RecurrencePatternValidate(){var e="The start date and time are after the end date and time.";this.errFld=0;if(this.value==0){if(!this.dateFldEnd.FValidate()||!this.dateFldEnd.date){var g=this.frm.GetSelValue(this.frm.StFieldName(this.dateFldEnd,"Hours"))-0,f=this.frm.GetSelValue(this.frm.StFieldName(this.dateFldEnd,"Minutes"));if(g!=0||f!=0)this.CopyDateFld(this.dateFldStart,this.dateFldEnd)}if(this.dateFldStart.FValidate()&&this.dateFldEnd.FValidate()&&this.dateFldStart.date&&this.dateFldEnd.date&&this.dateFldEnd.date.getTime()<this.dateFldStart.date.getTime()){this.errFld=this.dateFldStart;this.errFld.stError=e;return false}}else if(this.value>=2){if(!this.dateRangeFldStart.FValidate()){this.errFld=this.dateRangeFldStart;return false}if(this.recurFld.endRangeOptionFld&&this.recurFld.endRangeOptionFld.FValidate()){var b=this.frm.FieldPost(this.recurFld.endRangeOptionFld),d=this.dateRangeFldEnd.FValidate();if(!b||b.value=="2"){if(!d){this.errFld=this.dateRangeFldEnd;return false}if(this.dateRangeFldEnd.date.getTime()<this.dateRangeFldStart.date.getTime()){this.errFld=this.dateRangeFldStart;this.errFld.stError=e;return false}}else if(b.value=="1"){if(this.recurFld.dateRangeFldEndOccurrances){this.recurFld.dateRangeFldEndOccurrances.fRequired=true;var a=this.recurFld.dateRangeFldEndOccurrances.FValidate();this.recurFld.dateRangeFldEndOccurrances.fRequired=false;if(!a){this.errFld=this.recurFld.dateRangeFldEndOccurrances;return false}}if(!d)this.CopyDateFld(this.dateRangeFldStart,this.dateRangeFldEnd)}else if(!d)this.CopyDateFld(this.dateRangeFldStart,this.dateRangeFldEnd)}if(this.value==2){if(this.recurFld.dayFrequencyFld){this.recurFld.dayFrequencyFld.fRequired=true;var a=this.recurFld.dayFrequencyFld.FValidate();this.recurFld.dayFrequencyFld.fRequired=false;if(!a){this.errFld=this.recurFld.dayFrequencyFld;return false}}}else if(this.value==3){if(this.recurFld.weeklyFrequencyFld){this.recurFld.weeklyFrequencyFld.fRequired=true;var a=this.recurFld.weeklyFrequencyFld.FValidate();this.recurFld.weeklyFrequencyFld.fRequired=false;if(!a){this.errFld=this.recurFld.weeklyFrequencyFld;return false}}if(this.recurFld.weeklyMultiDayFld){this.recurFld.weeklyMultiDayFld.fRequired=true;var a=this.recurFld.weeklyMultiDayFld.FValidate();this.recurFld.weeklyMultiDayFld.fRequired=false;if(!a){this.errFld=this.recurFld.weeklyMultiDayFld;return false}}}else if(this.value==4)if(this.recurFld.monthlyChoiceFld&&this.recurFld.monthlyChoiceFld.FValidate()){var c=this.frm.FieldPost(this.recurFld.monthlyChoiceFld);if(c)if(c.value=="0"){this.recurFld.monthlyChoice1DayFld.fRequired=true;var a=this.recurFld.monthlyChoice1DayFld.FValidate();this.recurFld.monthlyChoice1DayFld.fRequired=false;if(!a){this.errFld=this.recurFld.monthlyChoice1DayFld;return false}this.recurFld.monthlyChoice1MonthFreqFld.fRequired=true;a=this.recurFld.monthlyChoice1MonthFreqFld.FValidate();this.recurFld.monthlyChoice1MonthFreqFld.fRequired=false;if(!a){this.errFld=this.recurFld.monthlyChoice1MonthFreqFld;return false}}else if(c.value=="1"){this.recurFld.monthlyChoice2MonthFreqFld.fRequired=true;var a=this.recurFld.monthlyChoice2MonthFreqFld.FValidate();this.recurFld.monthlyChoice2MonthFreqFld.fRequired=false;if(!a){this.errFld=this.recurFld.monthlyChoice2MonthFreqFld;return false}}}}return true}RecurrencePatternEventHooks.prototype.SetValue=RecurrencePatternEventHooksSetValue;function RecurrencePatternEventHooksSetValue(a){this.typeFld.SetValue(a);this.ToggleDisplay(a,false)}function DisplayOff(a){if(a)if(!a.length){DoDisplayOff(a);if(a.children)DoDisplayOff(a.children)}else{var b;for(b=0;b<a.length;b++){DoDisplayOff(a[b]);if(a[b].children)DoDisplayOff(a[b].children)}}}function DoDisplayOff(a){if(a)if(!a.length){a.disabled=true;if(a.style)a.style.display="none"}else{var b;for(b=0;b<a.length;b++){a[b].disabled=true;if(a[b].style)a[b].style.display="none"}}}function DisplayOn(a){if(a)if(!a.length){DoDisplayOn(a);if(a.children)DoDisplayOn(a.children)}else{var b;for(b=0;b<a.length;b++){DoDisplayOn(a[b]);if(a[b].children)DoDisplayOn(a[b].children)}}}function DoDisplayOn(a){if(a)if(!a.length){a.disabled=false;if(a.style)a.style.display=""}else{var b;for(b=0;b<a.length;b++){a[b].disabled=false;if(a[b].style)a[b].style.display=""}}}function FieldsDisabled(a){if(a)if(!a.length){a.disabled=true;if(a.style)a.style.visibility="hidden"}else{var b;for(b=0;b<a.length;b++){a[b].disabled=true;if(a[b].style)a[b].style.visibility="hidden"}}}function FieldsEnabled(a){if(a)if(!a.length){a.disabled=false;if(a.style)a.style.visibility="visible"}else{var b;for(b=0;b<a.length;b++){a[b].disabled=false;if(a[b].style)a[b].style.visibility="visible"}}}RecurrencePatternEventHooks.prototype.DateRangeToDate=FnDateRangeToDate;function FnDateRangeToDate(){this.CopyDateFld(this.dateRangeFldStart,this.dateFldStart);this.CopyDateFld(this.dateRangeFldEnd,this.dateFldEnd)}RecurrencePatternEventHooks.prototype.DateToDateRange=FnDateToDateRange;function FnDateToDateRange(){this.CopyDateFld(this.dateFldStart,this.dateRangeFldStart);this.CopyDateFld(this.dateFldEnd,this.dateRangeFldEnd)}RecurrencePatternEventHooks.prototype.ToggleDisplay=RecurrencePatternEventHooksToggleDisplay;function RecurrencePatternEventHooksToggleDisplay(c,d){if(!d&&this.value==c)return;if(this.value>=0&&this.rgStPatternTypes[this.value]!="")DisplayOff(this.divtags[this.rgStPatternTypes[this.value]]);var f=this.value;this.value=c;if(this.value>=0&&this.rgStPatternTypes[this.value]!="")DisplayOn(this.divtags[this.rgStPatternTypes[this.value]]);if(this.value==0){this.DateRangeToDate();DisplayOn(this.stStartDateSpan);DisplayOn(this.stEndDateSpan);DisplayOff(this.stRecurDateRangeDiv);DisplayOff(this.stRecurPatternTextDiv)}else{if(d||f==0){this.DateToDateRange();if(this.recurFld.endRangeOptionFld&&this.recurFld.endRangeOptionFld.FValidate()){var b=this.frm.FieldPost(this.recurFld.endRangeOptionFld);if(!b||b.value!="2"){var a=this.frm.FieldSubPart(this.dateRangeFldEnd,"Date");a.value="";var e=a.disabled;a.disabled=false;this.dateRangeFldEnd.FValidate();a.disabled=e}}}DisplayOff(this.stStartDateSpan);DisplayOff(this.stEndDateSpan);DisplayOn(this.stRecurDateRangeDiv);DisplayOn(this.stRecurPatternTextDiv)}}RecurrencePatternEventHooks.prototype.PostProcess=DateFieldPostProcess;function DateFieldPostProcess(){if(this.value>=2)this.DateRangeToDate()}RecurrencePatternEventHooks.prototype.CopyDateFld=FnCopyDateFld;function FnCopyDateFld(c,a){if(c&&a){var g=c.frm.FieldPost(c),e=a.frm.FieldPost(a);if(g&&e){var d=this.frm.FieldSubPart(c,"Date"),h=this.frm.dopt.ParseLocaleDate(d.value,this.recurFld.caltype);if(!isNaN(h)){var b=this.frm.FieldSubPart(a,"Date");b.value=d.value;var f=b.disabled;b.disabled=false;a.FValidate();b.disabled=f}}}}function TelephonePattern(g,h,i,a){this.frm=g;this.stName=h;if(!a)a="";this.stValue=TrimWhiteSpaces(a);this.fIncludeExtension=false;this.fIncludePIN=false;var d="",c="",e="",b="",f="";if(this.stValue.length)this.ParseFieldValues();else{this.countryCode=d;this.nationalCode=c;this.number=e;this.numberExtension=b;this.pin=f}this.countryCodeLen=4;this.nationalCodeLen=4;this.numberLen=9;this.numberExtensionLen=9;this.PINLen=6;this.stPrefix="TelephonePattern#"}TelephonePattern.prototype.ParseFieldValues=FnParseFieldValues;function FnParseFieldValues(){var fldNames=["countryCode","nationalCode","number","numberExtension","pin"],i=0,escape=";#",iDelim1,iDelim2;iDelim1=this.stValue.indexOf(escape,0);if(iDelim1!=-1)for(i=0;i<5;i++){iDelim1+=2;iDelim2=this.stValue.indexOf(escape,iDelim1);if(iDelim2!=-1){var stValue=this.stValue.substr(iDelim1,iDelim2-iDelim1);stValue=TrimWhiteSpaces(stValue);eval("this."+fldNames[i]+"=stValue")}else break;iDelim1=iDelim2}if(i!=5){this.countryCode="";this.nationalCode="";this.number=stValue;this.numberExtension="";this.pin=""}}TelephonePattern.prototype.BuildUI=TelephonePatternBuildUI;function TelephonePatternBuildUI(){var e="<nobr>",b="^1 ( ^2) ^3",k=", ext( ^4)",l=", PIN( ^5)",h="",g="Telephone Area Code",i="Telephone Number",f="",j="",a=new TextField(this.frm,this.stPrefix+"countryCode:"+this.stName,h,this.countryCode);a.cchMaxLength=this.countryCodeLen;if(this.countryCode.length>a.cchMaxLength)a.cchMaxLength=this.countryCode.length;var m=a.stBuildUI();a=new TextField(this.frm,this.stPrefix+"nationalCode:"+this.stName,g,this.nationalCode);a.fRequired=this.fRequired;a.cchMaxLength=this.nationalCodeLen;if(this.nationalCode.length>a.cchMaxLength)a.cchMaxLength=this.nationalCode.length;var n=a.stBuildUI();a=new TextField(this.frm,this.stPrefix+"number:"+this.stName,i,this.number);a.fRequired=this.fRequired;a.cchMaxLength=this.numberLen;if(this.number.length>a.cchMaxLength)a.cchMaxLength=this.number.length;var o=a.stBuildUI(),c;if(this.fIncludeExtension||this.numberExtension.length>0){b+=k;a=new TextField(this.frm,this.stPrefix+"numberExtension:"+this.stName,f,this.numberExtension);a.cchMaxLength=this.numberExtensionLen;if(this.numberExtension.length>a.cchMaxLength)a.cchMaxLength=this.numberExtension.length;c=a.stBuildUI()}else c=0;var d;if(this.fIncludePIN||this.pin.length>0){b+=l;a=new TextField(this.frm,this.stPrefix+"pin:"+this.stName,j,this.pin);a.cchMaxLength=this.PINLen;if(this.PIN.length>a.cchMaxLength)a.cchMaxLength=this.PIN.length;d=a.stBuildUI()}else d=0;e+=StBuildParam(b,m,n,o,c,d);e+="</nobr>";document.write(e)}function StBuildParam(b){var c,a;for(a=1;a<StBuildParam.arguments.length;a++){c=new RegExp("\\^"+a);b=b.replace(c,StBuildParam.arguments[a])}return b}function WindowPosition(a){var b={};b.x=0;b.y=0;while(a.offsetParent!=null&&a.id.search("WebPart")!=0){b.x+=a.offsetLeft;b.y+=a.offsetTop;a=a.offsetParent}return b}function StInsertAt(a,b,c){return a.substr(0,b)+c+a.substr(b)}function WMultiple(b,a){return Math.round(b/a)*a}function St2Digits(b){var a="";if(b<10)a+="0";a+=b;return a}function FBlankString(a){a=a.toString();a=a.replace(/\s/g,"");return a==""}function StURL(a,b){if(FBlankString(a))return STSHtmlEncode(b);return "<A HREF="+StAttrQuote(a)+">"+STSHtmlEncode(b)+"</A>"}function FrmLocalFieldName(a){return FrmStFieldNameFactory(a,"Local")}function fDataLoseConvert(b,a){switch(b){case "Text":case "Choice":switch(a){case "Number":case "Currency":case "DateTime":return true}break;case "Note":switch(a){case "Text":case "Choice":case "MultiChoice":case "Number":case "Currency":case "DateTime":return true}break;case "MultiChoice":switch(a){case "Text":case "Note":case "Choice":case "Number":case "Currency":case "DateTime":return true}break;case "DateTime":switch(a){case "Text":case "Note":case "Choice":case "MultiChoice":return true}break;case "Number":case "Currency":switch(a){case "Text":case "Note":case "Choice":case "MultiChoice":case "Boolean":return true}}return false}function MsFloorTime(c,b,d){var a=c.getTime();if(d)a=a-1;a=b*Math.floor(a/b);return a}function Calendar(c,b,d,i){if(!d)d=new DateOptions;this.dopt=d;var h=1;if(c==null||b==null){var a=StURLGetVar("CalendarDate");if(a!=""){c=a.substr(0,4)-0;var g=a.indexOf("-",5);if(g==-1)b=a.substr(5)-1;else{b=a.substr(5,g-5)-1;h=a.substr(g+1)}}if(a==""||isNaN(d.DateYMD(c,b,1))){var f=this.dopt.Today();c=f.getUTCFullYear();b=f.getUTCMonth();h=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=d.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(c,b,h);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(!i)i="cal";this.stObject=i}Calendar.msMinute=6e4;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:hand;" 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:hand;" 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:hand;" 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(c,d,e){var a=new Date(Date.UTC(c,d,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(c,d+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,e,f){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(e)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(!f&&b.getUTCMonth()!=this.mon)a=' BGCOLOR="#e6e6e6"';else a="";return a}Calendar.prototype.AddFullEvent=CalAddFullEvent;function CalAddFullEvent(g,h,l,m,j,f,k){var a,b;if(g=="")return;a=DateOptions.ParseISODate(g);if(h=="")b=new Date(a.getTime());else b=DateOptions.ParseISODate(h);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 e=Calendar.msHour/3;if(b.getTime()<a.getTime()+e)d=new Date(a.getTime()+e)}f+="&Source="+escapeProperly(window.location.href);var i=new CalEvent(c,d,a,b,l,m,j,f,k);this.AddEvent(i)}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:hand;" 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:hand;" 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:hand;" 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:hand;">&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:hand;">&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:hand;" 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:hand;" 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:hand;\" 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(b,c,d){var a;a=StURLSetVar("CalendarDate",b+"-"+St2Digits(c)+"-"+d);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(a,b){return StURLSetVar2(window.location.href,a,b)}function StViewURLSetVar(a,b,c){stUrl=window.location.href;p1=stUrl.lastIndexOf("/");if(p1>0)stUrl=stUrl.substring(0,p1+1)+a;return StURLSetVar2(stUrl,b,c)}function StURLSetVar2(a,d,g){var b=d+"="+g,e=a.indexOf("?");if(e!=-1){var c=a.indexOf("?"+d+"=",e);if(c==-1){c=a.indexOf("&"+d+"=",e);if(c!=-1)b="&"+b}else b="?"+b;if(c!=-1){var f=new RegExp("[&?]"+d+"=[^&]*","");a=a.replace(f,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,b,c){a.setTime(this.dateStart.getTime()+b*Calendar.msWeek+c*Calendar.msDay)}var L_NoTitle_Text="(No Title)";function CalEvent(a,b,c,d,j,k,e,l,m){this.dateStart=a;this.dateEnd=b;this.actualDateStart=c;this.actualDateEnd=d;this.stLocation=j;this.stDesc=k;this.stTitle=e;if(e.length==0)this.stTitle=L_NoTitle_Text;this.stURL=l;this.rgIcons=m;var n,o,h=MsFloorTime(a,Calendar.msDay,0),i=MsFloorTime(b,Calendar.msDay,1);if(h<i&&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/"+L_Language_Text+"/"+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/"+L_Language_Text+"/"+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 FileuploadString="fileupload",FileUploadIndex=0,FileUploadIndexStart,attachmentsOnClientToBeRemoved,attachmentsOnClientToBeRemovedIndex,attachmentsOnServerToBeRemoved,attachmentsOnServerToBeRemovedIndex;function UploadAttachment(){var a="Attachments are not supported in your browser.\nTo use this feature, your computer must be running Internet Explorer 5 for Windows or later.";if(browseris.ie5up&&browseris.win32)ShowPartAttachment();else alert(a)}function IssueShowHideView(f){var a="block";if(!f)a="none";var c=document.getElementById("idRelatedIssueTable"),e=document.getElementById("idHistoryIssuetable"),b=document.getElementById("idRelatedIssueHeadtable"),d=document.getElementById("idHistoryIssueHeadtable");if(c!=null)c.style.display=a;if(e!=null)e.style.display=a;if(b!=null)b.style.display=a;if(d!=null)d.style.display=a}function ShowPart1(){partAttachment.style.display="none";part1.style.display="block";IssueShowHideView(true);frm.SetFirstFocus(true)}function ShowPartAttachment(){part1.style.display="none";partAttachment.style.display="block";document.all.item(FileuploadString+FileUploadIndex).focus();IssueShowHideView(false)}function CancelAttach(){fileID=FileuploadString+FileUploadIndex;fileInput=attachmentsOnClient.children[fileID];filename=fileInput.value;if(filename)fileInput.outerHTML="<input type=file class=ms-long name="+fileID+">";ShowPart1()}function OkAttach(){fileID=FileuploadString+FileUploadIndex;fileInput=attachmentsOnClient.all(fileID);filename=TrimWhiteSpaces(fileInput.value);if(!filename){var b="You must specify a non-blank value for File Name.";alert(b);fileInput.focus()}else{var a="Name";oRow=idAttachmentsTable.insertRow();RowID="attachRow"+FileUploadIndex;oRow.id=RowID;oCellFileName=oRow.insertCell();oCellFileName.className="ms-vb";oCellFileName.innerHTML=filename+"&nbsp;&nbsp;&nbsp;&nbsp;";oCellControl=oRow.insertCell();oCellControl.className="ms-propertysheet";oCellControl.innerHTML="<IMG SRC='"+document.all.RectGifUrl.value+"'>&nbsp;<a tabindex=1 href='javascript:RemoveLocal("+RowID+',"'+fileID+"\")'>"+L_Delete_Text+"</a>";fileInput.style.display="none";++FileUploadIndex;attachmentsOnClient.insertAdjacentHTML("beforeEnd","<input tabIndex=1 type=file class=ms-long name="+FileuploadString+FileUploadIndex+" title="+a+">");var c=fileInput.form;c.encoding="multipart/form-data";idAttachmentsRow.style.display="block";ShowPart1()}}function RemoveLocal(a,b){idAttachmentsTable.deleteRow(a.rowIndex);attachmentsOnClient.children[b].outerHTML="";if(idAttachmentsTable.rows.length==0)idAttachmentsRow.style.display="none"}function RemoveFromServer(a){var b="Are you sure you want to delete this attachment?";if(confirm(b)){document.getElementById("idAttachmentsTable").deleteRow(document.getElementById(a).rowIndex);document.getElementsByName("attachmentsToBeRemovedFromServer").item(0).value+=a+";";if(document.getElementById("idAttachmentsTable").rows.length==0)document.getElementById("idAttachmentsRow").style.display="none"}}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_Discuss_Text="Discuss",L_Subscribe_Text="Alert Me",L_Review_Text="Send for Review",L_EditIn_Text="Edit in ^1",L_Checkin_Text="Check In",L_Checkout_Text="Check Out",L_CreateDWS_Text="Create Document Workspace",L_PublishBack_Text="Publish to Source Location",L_Versions_Text="Version History",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_Sharing_Text="Sharing",L_Settings_Text="Settings",L_Remove_Text="Remove from this list",L_ModerateItem_Text="Approve/reject",L_DownloadOriginal_Text="Download Picture",L_EditVersion_Text="Edit",L_ViewVersion_Text="View",L_RestoreVersion_Text="Restore",L_DeleteVersion_Text="Delete",L_EditInOIS_Text="Edit Picture",L_AddToMyLinks_Text="Add to My Links",L_AddToCategory_Text="Submit to Portal Area";function ContextInfo(){this.listBaseType=null;this.listTemplate=null;this.listName=null;this.listUrlDir=null;this.HttpPath=null;this.HttpRoot=null;this.imagesPath=null;this.PortalUrl=null;this.isWebEditorPreview=null;this.rootFolderForDisplay=null;this.isPortalTemplate=null;this.isModerated=false;this.recursiveView=false;this.displayFormUrl=null;this.editFormUrl=null;this.newFormUrl=null;this.ctxId=null}var IsMenuShown=false,itemTableDeferred=null,itemTable=null,imageCell=null,onKeyPress=false,downArrowText=null,currentCtx=null,currenMenu=null,currentItemID=null,currentItemAppName=null,currentItemProgId=null,currentItemIcon=null,currentItemOpenControl=null,currentItemFileUrl=null,currentItemFSObjType=null,currentItemCheckedOutUserId=null,currentItemCheckoutExpires=null;function resetExecutionState(){IsMenuShown=false;itemTable=null;EndDeferItem();imageCell=null;onKeyPress=false;currentCtx=null;currenMenu=null;currentItemID=null;downArrowText=null;currentItemAppName=null;currentItemProgId=null;currentItemIcon=null;currentItemOpenControl=null;currentItemFileUrl=null;currentItemFSObjType=null;currentItemCheckedOutUserId=null;currentItemCheckoutExpires=null}function GetSelectedElement(a,b){while(a!=null&&a.tagName!=b)a=a.parentNode;return a}function setupMenuContext(a){currentCtx=a}function FindSTSMenuTable(a){var b=a.getAttribute("CTXName");while(a!=null&&(b==null||b=="")){a=GetSelectedElement(a.parentNode,"TABLE");if(a!=null)b=a.getAttribute("CTXName")}return a}function OnLink(a){if(!browseris.ie55up)return false;a.onblur=OutItem;a.onkeypress=PopMenu;var b=FindSTSMenuTable(a);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(){var a=itemTableDeferred;if(a!=null){HideSelectedRow();OnItem(a);CreateMenu();window.event.returnValue=false}}function EndDeferItem(){var a=itemTableDeferred;if(a!=null){itemTableDeferred=null;a.onmouseout=null;a.onclick=null;a.oncontextmenu=null}}function OnItem(b){if(!browseris.ie5up||!browseris.win32)return false;if(IsMenuOn()){StartDeferItem(b);return false}if(itemTable!=null)OutItem();itemTable=b;currentItemID=itemTable.ItemId;var c=new Function("setupMenuContext("+itemTable.CTXName+");");c();var a=currentCtx;itemTable.className="ms-selectedtitle";if(browseris.ie55up){itemTable.onclick=CreateMenu;itemTable.oncontextmenu=CreateMenu}else{itemTable.onclick=EditMenuDefaultForOnclick;itemTable.oncontextmenu=EditMenuDefaultForOnclick}itemTable.onmouseout=OutItem;titleRow=itemTable.children[0].children[0];i=0;while(titleRow.children[i]!=null)imageCell=titleRow.children[i++];if(a.listTemplate==LISTTEMPLATE_MEETINGS){if(itemTable.menuType=="Orphaned")downArrowText=L_Reschedule_Text}else downArrowText=L_Edit_Text;imageCell.children[0].src=a.imagesPath+"downarrw.gif";imageCell.children[0].alt=downArrowText;imageCell.children[0].style.visibility="visible";imageCell.style.visibility="visible";imageCell.className="ms-menuimagecell";return true}function OutItem(){if(!IsMenuOn()&&itemTable!=null){itemTable.className="ms-unselectedtitle";itemTable.onclick="";itemTable.onmouseout="";if(imageCell!=null){imageCell.children[0].style.visibility="hidden";imageCell.style.visibility="hidden";imageCell.bgColor=""}resetExecutionState()}}function HideSelectedRow(){var a=GetSelectedElement(event.srcElement,"TABLE");if(a!=itemTable&&itemTable!=null)OutItem()}function IsMenuOn(){if(!IsMenuShown)return false;var a=false;if(!a)IsMenuShown=false;return a}function PopMenu(){if(!browseris.ie55up)return true;if(!IsMenuOn()&&event.shiftKey&&event.keyCode==13){onKeyPress=true;CreateMenu();onKeyPress=false;return false}else return true}function CreateMenu(){if(!IsContextSet())return;var a=currentCtx;if(itemTable==null||imageCell==null||onKeyPress==false&&(event.srcElement.tagName=="A"||event.srcElement.parentNode.tagName=="A"))return;IsMenuShown=true;window.document.body.onclick="";m=CMenu(currentItemID+"_menu");currenMenu=m;if(a.isVersions)AddVersionMenuItems(m,a);else if(a.listBaseType==BASETYPE_DOCUMENT_LIBRARY)AddDocLibMenuItems(m,a);else if(a.listTemplate==LISTTEMPLATE_MEETINGS)AddMeetingMenuItems(m,a);else AddListMenuItems(m,a);OMenu(m,itemTable,null,null,-1);document.body.onclick=HideSelectedRow;return false}function AddMeetingMenuItems(c,a){if(itemTable.menuType=="Orphaned"){var b=itemTable.ItemId;strDisplayText=L_Move_Text;strAction="GoToMtgMove('"+a.listUrlDir+"',"+b+",'"+itemTable.DateTime+"','"+itemTable.DateTimeISO+"')";strImagePath="";CAMOpt(c,strDisplayText,strAction,strImagePath);strDisplayText=L_Keep_Text;strAction="MtgKeep('"+a.HttpPath+"','"+a.listName+"',"+b+")";strImagePath="";CAMOpt(c,strDisplayText,strAction,strImagePath);strDisplayText=L_Delete_Text;strAction="MtgDelete('"+a.HttpPath+"','"+a.listName+"',"+b+")";strImagePath=a.imagesPath+"delitem.gif";CAMOpt(c,strDisplayText,strAction,strImagePath)}}function AddListMenuItems(b,a){if(typeof Custom_AddListMenuItems!="undefined")if(Custom_AddListMenuItems(b,a))return;if(a.listBaseType==BASETYPE_DISCUSSION){strDisplayText=L_Reply_Text;if(itemTable.Ordering.length>=504){var c="Cannot reply to this thread. The reply limit has been reached.";strAction="alert('"+c+"')"}else strAction="STSNavigate('"+a.newFormUrl+"?Threading="+escapeProperly(itemTable.Ordering)+"&Guid="+escapeProperly(itemTable.ThreadID)+"&Subject="+escapeProperly(itemTable.Subject)+"&Source="+GetSource()+"')";strImagePath=a.imagesPath+"reply.gif";CAMOpt(b,strDisplayText,strAction,strImagePath)}strDisplayText=L_ViewItem_Text;strAction="STSNavigate('"+a.displayFormUrl+"?ID="+currentItemID+"&Source="+GetSource()+"')";strImagePath="";CAMOpt(b,strDisplayText,strAction,strImagePath);strDisplayText=L_EditItem_Text;strAction="STSNavigate('"+a.editFormUrl+"?ID="+currentItemID+"&Source="+GetSource()+"')";strImagePath=a.imagesPath+"edititem.gif";CAMOpt(b,strDisplayText,strAction,strImagePath);if(a.listTemplate==LISTTEMPLATE_EVENTS&&currentItemID.indexOf(".0.")>0){var e=currentItemID.indexOf(".0."),d=currentItemID.substr(0,e);strDisplayText=L_EditSeriesItem_Text;strAction="STSNavigate('"+a.editFormUrl+"?ID="+d+"&Source="+GetSource()+"')";strImagePath=a.imagesPath+"recur.gif";CAMOpt(b,strDisplayText,strAction,strImagePath)}if(currentItemID.indexOf(".0.")<0){strDisplayText=L_DeleteItem_Text;strAction="DeleteListItem()";strImagePath=a.imagesPath+"delitem.gif";CAMOpt(b,strDisplayText,strAction,strImagePath)}if(a.listTemplate==LISTTEMPLATE_CONTACTS){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";CAMOpt(b,strDisplayText,strAction,strImagePath)}if(currentItemID.indexOf(".0.")<0){strDisplayText=L_Subscribe_Text;strAction="NavigateToSubNewAspx('"+a.HttpRoot+"', 'List="+a.listName+"&ID="+currentItemID+"')";strImagePath="";CAMOpt(b,strDisplayText,strAction,strImagePath)}if(a.isModerated==true&&a.listBaseType!=BASETYPE_SURVEY){strDisplayText=L_ModerateItem_Text;strAction="STSNavigate('"+a.editFormUrl+"?ID="+currentItemID+"&ChangeApproval=TRUE&Source="+GetSource()+"')";strImagePath="";CAMOpt(b,strDisplayText,strAction,strImagePath)}}function GetRootFolder(c){var a=GetUrlKeyValue("RootFolder");if(a==""||bValidSearchTerm){var b;if(itemTable)b=itemTable.getAttribute("FileDirRef");if(b!=null)a="/"+b;else a="/"+c.listUrlDir;a=escapeProperly(a)}return "&RootFolder="+a}function AddDocLibMenuItems(b,a){if(typeof Custom_AddDocLibMenuItems!="undefined")if(Custom_AddDocLibMenuItems(b,a))return;var d=GetRootFolder(a);setupMenuContext(a);if(currentItemFileUrl==null)currentItemFileUrl=itemTable.ServerUrl;if(currentItemFSObjType==null)currentItemFSObjType=itemTable.FSObjType;var c=escapeProperly(unescapeProperly(currentItemFileUrl));if(currentItemFSObjType!=1){strDisplayText=L_ViewProperties_Text;strAction="STSNavigate('"+a.displayFormUrl+"?ID="+currentItemID+"&Source="+GetSource()+d+"')";strImagePath="";CAMOpt(b,strDisplayText,strAction,strImagePath)}strDisplayText=L_EditProperties_Text;strAction="STSNavigate('"+a.editFormUrl+"?ID="+currentItemID+"&Source="+GetSource()+d+"')";strImagePath=a.imagesPath+"edititem.gif";CAMOpt(b,strDisplayText,strAction,strImagePath);if(currentItemFSObjType!=1)if(a.isWebEditorPreview==0)if(a.listTemplate==LISTTEMPLATE_IMAGE_LIBRARY&&itemTable.IsImage=="1"){strDisplayText=L_EditInOIS_Text;strAction="EditSingleImage('"+currentItemID+"')";strImagePath=a.imagesPath+"oisweb.gif";CAMOpt(b,strDisplayText,strAction,strImagePath)}else{setDocType();if(currentItemAppName!=""&&currentItemOpenControl!=""){strDisplayText=StBuildParam(L_EditIn_Text,currentItemAppName);strAction="editDocumentWithProgID2('"+currentItemFileUrl+"', '"+currentItemProgId+"', '"+currentItemOpenControl+"')";strImagePath=a.imagesPath+currentItemIcon;CAMOpt(b,strDisplayText,strAction,strImagePath)}}strDisplayText=L_DeleteDocItem_Text;strAction="DeleteDocLibItem('"+a.HttpPath+"&Cmd=Delete&List="+a.listName+"&ID="+currentItemID+"&owsfileref="+c+"&NextUsing="+GetSource()+"')";strImagePath=a.imagesPath+"delitem.gif";CAMOpt(b,strDisplayText,strAction,strImagePath);if(a.isModerated==true){strDisplayText=L_ModerateItem_Text;strAction="STSNavigate('"+a.editFormUrl+"?ID="+currentItemID+"&ChangeApproval=TRUE&Source="+GetSource()+d+"')";strImagePath="";CAMOpt(b,strDisplayText,strAction,strImagePath)}if(currentItemFSObjType!=1&&a.listTemplate==LISTTEMPLATE_IMAGE_LIBRARY){strAction="DownloadOriginalImage("+currentItemID+")";strImagePath=a.imagesPath+"download.gif";strDisplayText=L_DownloadOriginal_Text;CAMOpt(b,strDisplayText,strAction,strImagePath)}if(currentItemFSObjType!=1){CAMSep(b);AddCheckinCheckoutMenuItem(b,a,c);AddVersionsMenuItem(b,a,c);CAMSep(b);if(a.PortalUrl!=null){strDisplayText=L_AddToMyLinks_Text;strAction="Portal_Tasks('PinToMyPage')";strImagePath="";CAMOpt(b,strDisplayText,strAction,strImagePath);strDisplayText=L_AddToCategory_Text;strAction="Portal_Tasks('Categorize')";strImagePath="";CAMOpt(b,strDisplayText,strAction,strImagePath);CAMSep(b)}}strDisplayText=L_Subscribe_Text;strAction="NavigateToSubNewAspx('"+a.HttpRoot+"', 'List="+a.listName+"&ID="+currentItemID+"')";strImagePath="";CAMOpt(b,strDisplayText,strAction,strImagePath);if(currentItemFSObjType!=1){strDisplayText=L_Discuss_Text;strAction="STSNavigate('"+a.HttpPath+"&Cmd=COMMFRMS&URL=";if(a.isWebEditorPreview==0)strAction+=c;strAction+="')";strImagePath=a.imagesPath+"icdisc.gif";CAMOpt(b,strDisplayText,strAction,strImagePath);if(a.listTemplate!=LISTTEMPLATE_IMAGE_LIBRARY)AddWorkspaceMenuItem(b,a)}}function AddCheckinCheckoutMenuItem(c,a,b){if(currentItemCheckedOutUserId==null)currentItemCheckedOutUserId=itemTable.COUId;if(currentItemCheckedOutUserId!=""){strDisplayText=L_Checkin_Text;strAction="NavigateToCheckinAspx('"+a.HttpRoot+"', 'FileName="+b+"')";strImagePath=a.imagesPath+"checkin.gif"}else{strDisplayText=L_Checkout_Text;strAction="NavigateToCheckinAspx('"+a.HttpRoot+"', 'FileName="+b+"&Checkout=true')";strImagePath=a.imagesPath+"checkout.gif"}CAMOpt(c,strDisplayText,strAction,strImagePath)}function AddWorkspaceMenuItem(b,a){if(itemTable.SourceUrl!=null&&itemTable.SourceUrl!=""&&itemTable.SourceUrl!="%20"){strAction="STSNavigate('"+a.HttpRoot+"/_layouts/"+L_Language_Text+"/publishback.aspx?list="+a.listName+"&item="+currentItemID+GetRootFolder(a)+"')";CAMOpt(b,L_PublishBack_Text,strAction,"")}else{strAction="STSNavigate('"+a.HttpRoot+"/_layouts/"+L_Language_Text+"/createws.aspx?list="+a.listName+"&item="+currentItemID+GetRootFolder(a)+"')";CAMOpt(b,L_CreateDWS_Text,strAction,"")}}function AddVersionsMenuItem(c,a,b){strDisplayText=L_Versions_Text;strAction="NavigateToVersionsAspx('"+a.HttpRoot+"', 'list="+a.listName+"&FileName="+b+"')";strImagePath=a.imagesPath+"versions.gif";CAMOpt(c,strDisplayText,strAction,strImagePath)}function AddVersionMenuItems(a){CAMOpt(a,L_ViewVersion_Text,"javascript:ViewVersion()","");CAMOpt(a,L_RestoreVersion_Text,"javascript:RestoreVersion()","");CAMOpt(a,L_DeleteVersion_Text,"javascript:DeleteVersion()","")}function ViewVersion(){if(!ViewDoc(itemTable.verUrl))STSNavigate(itemTable.verUrl)}var L_Version_Restore_Confirm_Text="You are about to replace the current version with the selected version.",L_Version_RestoreVersioningOff_Confirm_Text="Versioning is currently disabled. As a result, you are about to overwrite the current version. All changes to this version will be lost.",L_Version_NoRestore_Current_ERR="Cannot restore the current version.";function RestoreVersion(){if(!IsContextSet())return;var a=currentCtx;if(itemTable.isCur!="0")alert(L_Version_NoRestore_Current_ERR);else if(confirm(a.verEnabled?L_Version_Restore_Confirm_Text:L_Version_RestoreVersioningOff_Confirm_Text))SubmitFormPost(a.HttpPath+"&op=Restore&ver="+itemTable.verId)}var L_Version_Delete_Confirm_Text="You are about to delete this version.",L_Version_NoDelete_Current_ERR="Cannot delete the current version.";function DeleteVersion(){if(!IsContextSet())return;var a=currentCtx;if(itemTable.isCur!="0")alert(L_Version_NoDelete_Current_ERR);else if(confirm(L_Version_Delete_Confirm_Text))SubmitFormPost(a.HttpPath+"&op=Delete&ver="+itemTable.verId)}var L_Version_DeleteAll_Confirm_Text="You are about to delete all previous versions associated with this file.",L_Version_NoDeleteAll_None_ERR="There are no previous versions to delete.";function DeleteAllVersions(a,b){if(a<=1)alert(L_Version_NoDeleteAll_None_ERR);else if(confirm(L_Version_DeleteAll_Confirm_Text))SubmitFormPost(b.HttpPath+"&op=DeleteAll")}function NavigateToSubNewAspx(a,b){STSNavigate(a+"/_layouts/"+L_Language_Text+"/SubNew.aspx?"+b+"&Source="+GetSource())}function NavigateToVersionsAspx(a,b){STSNavigate(a+"/_layouts/"+L_Language_Text+"/Versions.aspx?"+b+"&Source="+GetSource())}function NavigateToCheckinAspx(a,b){SubmitFormPost(a+"/_layouts/"+L_Language_Text+"/Checkin.aspx?"+b+"&Source="+GetSource())}function setDocType(){var a;a=itemTable.DocIcon.split("|");currentItemIcon=a[0];currentItemAppName=a[1];currentItemOpenControl=a[2];currentItemProgId=itemTable.HTMLType}function DeleteListItem(){if(!IsContextSet())return;var a=currentCtx;if(confirm(L_STSDelConfirm_Text))SubmitFormPost(a.HttpPath+"&Cmd=Delete&List="+a.listName+"&ID="+currentItemID+"&NextUsing="+GetSource())}function DeleteDocLibItem(a){if(!IsContextSet())return;if(confirm(currentItemFSObjType==1?L_STSDelConfirm1_Text:L_STSDelConfirm_Text))SubmitFormPost(a)}function EditMenuDefaultForOnclick(){if(!IsContextSet())return;var a=currentCtx;if(a.isVersions)STSNavigate(itemTable.verUrl);else if(a.listTemplate==LISTTEMPLATE_MEETINGS){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==BASETYPE_DOCUMENT_LIBRARY)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||currentCtx.HttpPath==null||currentItemID==null)return false;else return true}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 IMNGetStatusImage(c,b){var a="blank.gif";switch(c){case 0:a="imnon.gif";break;case 1:if(b)a="imnoff.gif";else a="blank.gif";break;case 2:a="imnaway.gif";break;case 3:a="imnbusy.gif";break;case 4:a="imnaway.gif";break;case 5:a="imnbusy.gif";break;case 6:a="imnaway.gif"}return a}function IMNGetHeaderImage(){return "imnhdr.gif"}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(e,f){var a=document.images(e);if(a){var c=a.src,d=c.lastIndexOf("/"),b=c.slice(0,d+1);b+=f;if(c!=b)a.src=b;if(a.altbase)a.alt=a.altbase}}function IMNHandleAccelerator(){if(IMNControlObj)if(event.altKey&&event.shiftKey&&event.keyCode==121)IMNControlObj.DoAccelerator()}function IMNGetOOUILocation(a){var c={},b=a,h=a,f=0,i=0,d=0,j=document.dir=="rtl";while(b&&b.tagName!="SPAN"&&b.tagName!="TABLE")b=b.parentNode;if(b){var g=b.tagName=="TABLE"?b.rows(0).cells(0).childNodes:b.childNodes,e;for(e=0;e<g.length;++e)if(g.item(e).tagName=="IMG"&&g.item(e).id){h=g.item(e);break}}a=h;while(a){if(j){if(a.scrollWidth>=a.clientWidth+a.scrollLeft)d=a.scrollWidth-a.clientWidth-a.scrollLeft;else d=a.clientWidth+a.scrollLeft-a.scrollWidth;f+=a.offsetLeft+d}else f+=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)d=a.scrollWidth-a.clientWidth-a.scrollLeft;else d=a.clientWidth+a.scrollLeft-a.scrollWidth;f+=a.offsetLeft+d}else f+=a.offsetLeft-a.scrollLeft;i+=a.offsetTop-a.scrollTop;a=a.offsetParent}}catch(k){}c.objSpan=b;c.objOOUI=h;c.oouiX=f;c.oouiY=i;if(j)c.oouiX+=h.offsetWidth;return c}function IMNShowOOUIMouse(){IMNShowOOUI(0)}function IMNShowOOUIKyb(){IMNShowOOUI(1)}function IMNShowOOUI(h){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 g=IMNNameDictionaryObj[d.id];if(b)b.onkeydown=IMNHandleAccelerator;IMNControlObj.ShowOOUI(g,h,e,f)}}}function IMNHideOOUI(){if(IMNControlObj){IMNControlObj.HideOOUI();return false}return true}function IMNScroll(){if(!bIMNInScrollFunc){bIMNInScrollFunc=true;IMNHideOOUI()}bIMNInScrollFunc=false;return IMNOrigScrollFunc?IMNOrigScrollFunc():true}function IMNRC(e){if(e==null||e=="")return;if(browseris.ie5up&&browseris.win32){var b=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,g;d=IMNControlObj.GetStatus(e,a);if(IMNIsOnlineState(d)||IMNSortableObj[a]||IMNShowOfflineObj[a]){g=IMNGetStatusImage(d,IMNSortableObj[a]||IMNShowOfflineObj[a]);IMNUpdateImage(a,g);IMNDictionaryObj[a]=d}}}if(f){var h=IMNGetOOUILocation(b);c=h.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 HelpWindowHelper(b){var a;if(b=="")a="/_layouts/"+L_Language_Text+"/help.aspx"+"?LCID="+L_Language_Text;else a="/_layouts/"+L_Language_Text+"/help.aspx"+b+"&LCID="+L_Language_Text;var c=window.open(a,"STSHELP","width=270,height=500,menubar,scrollbars,toolbar,resizable");c.focus()}function HelpWindowKey(a){if(typeof navBarHelpOverrideKey!="undefined"&&a.toLowerCase()=="navbarhelphome")a=navBarHelpOverrideKey;HelpWindowHelper("?Key="+a)}function HelpWindowUrl(a){HelpWindowHelper("?Url="+a)}function HelpWindow(){HelpWindowKey("helphome")}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.",fImglibJssLoaded=false;function EditSelectedImages(){if(!fImglibJssLoaded){alert(L_NotOurView_Text);return}_EditSelectedImages()}function DeleteImages(){if(!fImglibJssLoaded){alert(L_NotOurView_Text);return}_DeleteImages()}function SendImages(){if(!fImglibJssLoaded){alert(L_NotOurView_Text);return}_SendImages()}function DownloadImages(){if(!fImglibJssLoaded){alert(L_NotOurView_Text);return}_DownloadImages()}var MSOTlPn_prevBuilder=null,MSOTlPn_prevWidth=0,MSOTlPn_prevHeight=0,MSOTlPn_shownViewChangeWarning=false,MSOWebPartPage_hideNextBeforeUnload=false,MSOWebPartPage_partDeleted="";function MSOLayout_CheckAndSaveChanges(){if(document.forms[MSOWebPartPageFormName].MSOLayout_LayoutChanges!=null&&document.forms[MSOWebPartPageFormName].MSOLayout_LayoutChanges.value!="")MSOLayout_SaveChanges()}function MSOWebPartPage_ExportCheckWarning(c,d){var b=true;if(d)if(!confirm(MSOStrings.ExportPersonalizationDialogText))b=false;if(b){var a=false;if(typeof MSOWPSC_SavePerformed=="boolean")a=MSOWPSC_SavePerformed;MSOWebPartPage_SetWindowLocation(c);if(typeof MSOWPSC_SavePerformed=="boolean"){MSOWPSC_SavePerformed=a;MSOWebPartPage_hideNextBeforeUnload=true}}}function MSOMode_SetMode(b){var a=MSOMode_GetNewUrl(b);MSOLayout_CheckAndSaveChanges();if(document.forms[MSOWebPartPageFormName].MSOTlPn_View.value!=4){document.forms[MSOWebPartPageFormName].MSOTlPn_View.value=0;var c=/[& | \?]ToolPaneView=[-0-9A-Z]*/ig;a=MSOMode_RemoveMode(a,c)}document.forms[MSOWebPartPageFormName].MSOWebPartPage_Shared.value=b?"true":"false";document.forms[MSOWebPartPageFormName].action=a;document.forms[MSOWebPartPageFormName].submit()}function MSOMode_GetNewUrl(e,a){if(a==null)a=document.location.href;var c=/[& | \?]PageView=Personal/ig,b=/[& | \?]PageView=Shared/ig,d="PageView="+(e?"Shared":"Personal");a=MSOMode_RemoveMode(a,c);a=MSOMode_RemoveMode(a,b);a=MSOMode_AddMode(a,b,d);return a}function MSOMode_RemoveMode(a,h){var f=/\#/,d=a.search(f);if(d!=-1)a=a.substring(0,d);var e=/\?/,c=a.search(e);if(c!=-1){var g=a.substring(0,c),b=a.substring(c,a.length);b=b.replace(h,"");if(b.length!=0&&b.charAt(0)!="?")b="?"+b;a=g+b}return a}function MSOMode_AddMode(a,h,d){var f=/\#/,c=a.search(f);if(c!=-1)a=a.substring(0,c);var e=/\?/,b=a.search(e);if(b==-1)a+="?"+d;else{var g=a.substring(b,a.length);if(g.search(h)==-1)a+="&"+d}return a}function MSOPGrid_BuilderVisible(a){MSOPGrid_HidePrevBuilder();MSOTlPn_prevBuilder=null;a.style.display="inline"}function MSOPGrid_HidePrevBuilder(){if(MSOTlPn_prevBuilder!=null)(eval(MSOTlPn_prevBuilder)).style.display="none"}function MSOPGrid_doBuilder(c,a,d){var b=showModalDialog(c,a,d);a.value=b}function MSOWebPartPage_RestorePageDefault(){if(confirm(MSOStrings.ResetPagePersonalizationDialogText)){var a=document.createElement("INPUT");a.type="hidden";a.name="MSOWebPartPage_RestorePageDefault";a.value="true";document.forms[MSOWebPartPageFormName].appendChild(a);if(document.forms[MSOWebPartPageFormName].MSOLayout_LayoutChanges!=null)document.forms[MSOWebPartPageFormName].MSOLayout_LayoutChanges.value="";MSOMode_SetMode(false)}}function MSOWebPartPage_RestorePartDefaults(b){if(confirm(MSOStrings.ResetPartPersonalizationDialogText)){var a=document.createElement("INPUT");a.type="hidden";a.name="MSO_RestoreSettings";a.value=b;document.forms[MSOWebPartPageFormName].appendChild(a);MSOMode_SetMode(false)}}function MSOWebPartPage_MenuDoPostBack(d,e){var c=document.forms[MSOWebPartPageFormName],b=c.__EVENTTARGET,a=c.__EVENTARGUMENT;if(b==null){b=document.createElement("INPUT");b.style.display="none";b.name="__EVENTTARGET";document.forms[MSOWebPartPageFormName].appendChild(b)}if(a==null){a=document.createElement("INPUT");a.style.display="none";a.name="__EVENTARGUMENT";document.forms[MSOWebPartPageFormName].appendChild(a)}b.value=d;a.value=e;c.submit()}function MSOWebPartPage_SignIn(){var a=document.createElement("INPUT");a.type="hidden";a.name="MSOWebPartPage_AnonymousAccessLogIn";a.value="1";document.forms[MSOWebPartPageFormName].appendChild(a);document.forms[MSOWebPartPageFormName].submit()}function MSOWebPartPage_SetWindowLocation(b){var a=b.toLowerCase();if(a.indexOf("javascript:")==0||a.indexOf("vbscript:")==0)MSOWebPartPage_hideNextBeforeUnload=true;window.location=b}function MSOWebPartPage_SetNewWindowLocation(a){window.open(a)}function MSOTlPn_onToolPaneCloseClick(){var b="0",a="49";MSOTlPn_ShowToolPaneWrapper(b,a)}function MSOPGrid_InvokeFPBuilder(b,c,a){a.value=window.external.InvokeBuilder(b,c,a.id);a.focus()}function MSOMenu_KeyboardClick(b){for(var a=1;a<arguments.length;a++)if(event.keyCode==arguments[a]){b.click();event.returnValue=false;return}}function MSOTlPn_ToggleDisplay(a,b,g,d,e,h){var f=a+"_STATEFIELD",c;if(document.all.item(a).style.display=="none"){document.all.item(a).style.display="";document.images[b].src="/_layouts/images/TPMin2.gif";document.images[b].alt=e;document.all.item(h).title=e;document.all.item(g).title=e;c="1"}else{document.all.item(a).style.display="none";document.images[b].src="/_layouts/images/TPMax2.gif";document.images[b].alt=d;document.all.item(h).title=d;document.all.item(g).title=d;c="0"}if(document.all[f]!=null)document.all[f].value=c}var MSOTlPn_originalToolPaneWidth;function MSOTlPn_onToolPaneMaxClick(){var e=1,a=document.all["MSOTlPn_minMaxIcon"],c=a.src.substring(0,a.src.lastIndexOf("/")+1);if(document.all["MSOTlPn_Tbl"].toolpaneWide==null){MSOTlPn_originalToolPaneWidth=document.all["MSOTlPn_Tbl"].style.width;document.all["MSOTlPn_Tbl"].style.width=(parseInt(document.all["MSOTlPn_Tbl"].offsetWidth)+100).toString()+"px";c+=document.dir=="rtl"?"tpmax.gif":"tpmin.gif";a.title=MSOStrings.ToolPaneShrinkToolTip;a.alt=MSOStrings.ToolPaneShrinkToolTip;a.parentElement.title=MSOStrings.ToolPaneShrinkToolTip;document.all["MSOTlPn_Tbl"].toolpaneWide="1"}else{document.all["MSOTlPn_Tbl"].style.width=MSOTlPn_originalToolPaneWidth;c+=document.dir=="rtl"?"tpmin.gif":"tpmax.gif";a.title=MSOStrings.ToolPaneWidenToolTip;a.alt=MSOStrings.ToolPaneWidenToolTip;a.parentElement.title=MSOStrings.ToolPaneWidenToolTip;document.all["MSOTlPn_Tbl"].toolpaneWide=null;e=-1}a.src=c;var d=document.all["MSOTlPn_Tbl"];for(var b=0;b<d.all.length;b++)if(d.all(b).getAttribute("ms-TlPnWiden")=="true")d.all(b).style.pixelWidth+=e*120;MSOTlPn_WindowResize()}function MSOTlPn_WindowResize(){var c=document.all["MSOTlPn_MainTD"];if(c==null||c.offsetWidth==0)return;var g=c.offsetWidth,h=document.body.offsetWidth-document.body.clientWidth,f=document.all["MSOTlPn_WebPartPageDiv"];if(f.offsetWidth+c.offsetWidth==document.body.clientWidth)return;var e=0,a=f.offsetParent,b=0;while(a!=null){if(document.dir!="rtl"){b=a.offsetLeft+(a.offsetWidth-(a.clientLeft+a.clientWidth));if(a.offsetParent!=null)b+=a.offsetParent.clientLeft}else b=a.offsetParent!=null?a.offsetParent.offsetWidth-(a.offsetLeft+a.offsetWidth):0;e+=b;a=a.offsetParent}e-=h;var d=document.body.clientWidth-(e+g);if(d<250)d=250;document.all["MSO_tblPageBody"].style.pixelWidth=d+g;f.style.pixelWidth=d;if(window.event.type=="load"&&document.all.MSOTlPn_TlPnCaptionSpan!=null)document.all.MSOTlPn_TlPnCaptionSpan.scrollIntoView(false)}function MSOTlPn_CheckUrl(){var b=/[& | \?]ToolPaneView=[-0-9A-Z]*/ig,c=document.forms[MSOWebPartPageFormName].action,a;a=MSOMode_RemoveMode(document.forms[MSOWebPartPageFormName].action,b);document.forms[MSOWebPartPageFormName].action=a}function MSOTlPn_Resize(b){if(MSOTlPn_prevWidth!=b.clientWidth){MSOTlPn_prevWidth=b.clientWidth;MSOTlPn_WindowResize()}if(MSOTlPn_prevHeight!=document.body.clientHeight){MSOTlPn_prevHeight=document.body.clientHeight;var a=document.all["MSOTlPn_WebPartPageDiv"];a.style.height="100%";a.style.height=a.offsetHeight}}function MSOWebPartPage_SetupFixedWidthWebParts(){var a=document.all["MSOFixedWidthTitle"];if(a!=null)if(a.length>0)for(var b=0;b<a.length;b++)a[b].style.width=MSOWebPartPage_AllocateSpaceForFirstTD(a[b]);else a.style.width=MSOWebPartPage_AllocateSpaceForFirstTD(a)}function MSOWebPartPage_AllocateSpaceForFirstTD(f){var a=document.createElement("DIV");a.style.width=f.fixedWidth;document.body.appendChild(a);var c=a.offsetWidth;document.body.removeChild(a);var b=MSOLayout_GetParentTable(f).cloneNode(true);if(b!=0){document.body.appendChild(b);var e=b.rows(0);for(var d=1;d<e.cells.length;d++)c-=e.cells(d).offsetWidth;document.body.removeChild(b)}return c<1?1:c}function MSOWebPartPage_FindControlName(c){var a=document.all.tags("label");if(a!=null)for(i=0;i<a.length;i++){var b=a[i];if(b.innerText==c)if(b.htmlFor.indexOf("_EDITOR")!=-1)return b.htmlFor}return null}function MSOTlPn_ListViewChange(a){if(MSOTlPn_shownViewChangeWarning)return;alert(a);MSOTlPn_shownViewChangeWarning=true}function MSOTlPn_CustomWindowResize(){var a=document.all["MSOTlPn_Tbl"];if(a==null||a.offsetWidth==0)return;a.style.pixelWidth=document.body.clientWidth}function MSOTlPn_ShowListFilter(){if(document.all["WebPartListFilter"].style.display=="none"){document.all["WebPartListFilter"].style.display="block";document.forms[MSOWebPartPageFormName].MSOGallery_FilterVisible.value="true"}else{document.all["WebPartListFilter"].style.display="none";document.forms[MSOWebPartPageFormName].MSOGallery_FilterVisible.value="false"}}function MSOGallery_GetCookie(d){var c=d+"=",a=document.cookie.indexOf(c);if(a==-1)return null;var b=document.cookie.indexOf(";",a+c.length);if(b==-1)b=document.cookie.length;return unescape(document.cookie.substring(a+c.length,b))}function MSOTlPn_ShowAllUsersToolPane(a,b,c){MSOLayout_CheckAndSaveChanges();document.forms[MSOWebPartPageFormName].action=MSOMode_GetNewUrl(true);MSOTlPn_ShowToolPaneWrapper(a,b,c)}function MSOLayout_MakeInvisibleIfEmpty(){var b=document.getElementsByName("_invisibleIfEmpty"),c=navigator.userAgent.toLowerCase(),d=c.indexOf("mozilla")!=-1&&(c.indexOf("spoofer")==-1&&c.indexOf("compatible")==-1),e=c.indexOf("msie")!=-1;for(var a=0;a<b.length;a++)if(e&&b[a].childNodes.length==0||d&&b[a].childNodes.length<=1)b[a].style.display="none"}function MSOLayout_GetParentRow(b){var a=b.parentElement;while(a.tagName!="TR"&&a.tagName!="BODY")a=a.parentElement;if(a.tagName!="TR")return null;else return a}function MSOLayout_GetParentTable(b){for(var a=b;a.tagName!="TABLE";a=a.parentElement)if(a==document.body)return 0;return a}function ShowMtgNavigatorPane(){document.getElementById("MeetingNavigatorPane").style.display="block"}function HideMtgNavigatorPane(){document.getElementById("MeetingNavigatorPane").style.display="none"}function MtgShowTimeZone(){if(GetCookie("MtgTimeZone")=="1")MtgToggleTimeZone()}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="inline";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(a,b,c,d){window.location.href=g_webUrl+"/"+a+"/movetodt.aspx"+"?FromInstanceID="+b+"&FromInstanceDate="+escapeProperly(c)+"&FromInstanceDateISO="+escapeProperly(d)+"&Source="+escapeProperly(window.location.href)}function MtgKeep(b,c,d){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(b+"&Cmd=MtgKeep&List="+escapeProperly(c)+"&EditInstanceID="+d+"&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 FormatDate(a,b){var i=a.indexOf(" "),c=a.substr(i+1);a=a.substr(0,i);var h=b.indexOf(" "),e=b.substr(h+1);b=b.substr(0,h);var f="<b>Date:</b>",g="<b>Time:</b>",d=" - ";if(browseris.win32&&a==b)d=" -‎ ";if(a==b){document.write(f+" "+a);if(c!=e)document.write(" "+g+" "+c+d+e);else document.write(" "+g+" "+c)}else document.write(f+" "+a+" ("+c+")"+d+b+" ("+e+")")}function SetCookie(a,b,c){document.cookie=a+"="+b+";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 GetCookie(d){var b=document.cookie.split("; ");for(var a=0;a<b.length;a++){var c=b[a].split("=");if(d==c[0])return unescapeProperly(c[1])}return null}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 GetAlertText(e){var c="This meeting date is no longer associated with a meeting in your calendar and scheduling program. Either this meeting date was canceled, or the link to the workspace was removed from the scheduled meeting.",b="This meeting date was canceled from your calendar and scheduling program. To specify what you want to do with the associated information in the workspace, do the following: In the Meeting Series pane, point to the meeting date, and in the drop-down list, click Keep, Delete, or Move.",l="This meeting date is no longer linked to the associated meeting in your calendar and scheduling program. To specify what you want to do with the information in the workspace, do the following: In the Meeting Series pane, point to the meeting date, and in the drop-down list, click Keep, Delete, or Move.",g="This meeting series was canceled from your calendar and scheduling program.",k="This meeting series is no longer linked to the associated meeting series in your calendar and scheduling program. You can keep or delete the workspace. If you keep the workspace, you will not be able to link it to another scheduled meeting.",i="This meeting was changed in your calendar and scheduling program from a recurring meeting to a nonrecurring meeting. You can keep or delete the workspace. If you keep the workspace, you will not be able to link it to another scheduled meeting.",j="This meeting was changed in your calendar and scheduling program from a nonrecurring meeting to a recurring meeting. The current workspace does not support a recurring meeting. In your scheduling program, unlink the meeting from the workspace, and then link the meeting again to a new workspace. The new workspace will automatically support a recurring meeting.",h="This meeting was created using a calendar and scheduling program that only supports series updates to the Meeting Workspace. Changes you make to individual occurrences of meetings in that program will not appear in the workspace.",f="This past meeting was modified or canceled from your calendar and scheduling program. To keep, delete or move this meeting in the workspace, use the drop-down menu next to its date in the Meeting Series pane. To update the scheduling information for this meeting in the workspace, use your scheduling program to update this specific meeting occurrence.",a=e&15,d=e-a;if(a)switch(a){case 1:return g_meetingCount==1?c:b;case 2:return g;case 3:return b;case 4:return g_meetingCount==1?c:l;case 5:return k;case 6:return i;case 7:return j;case 8:return f}else if(d)switch(d){case 16:return h}return null}function MtgRedirect(){var a=GetCookie("MtgLastTabVisited");if(a==null)if(typeof L_Menu_BaseUrl!="undefined")a=L_Menu_BaseUrl;else 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}