//core
var IsMenuShown=false;var itemTableDeferred=null;var itemTable=null;var imageCell=null;var onKeyPress=false;var downArrowText=null;var currentCtx=null;var currentEditMenu=null;var currentItemID=null;var currentItemAppName=null;var currentItemProgId=null;var currentItemIcon=null;var currentItemOpenControl=null;var currentItemFileUrl=null;var currentItemFSObjType=null;var currentItemCheckedOutUserId=null;var currentItemCheckoutExpires=null;var currentItemModerationStatus=null;var currentItemUIString=null;var currentItemCheckedoutToLocal=null;var bIsCheckout=0;var currentItemCanModify=null;var currentItemPermMaskH=null;var currentItemPermMaskL=null;var currentItemIsEventsExcp=null;var currentItemIsEventsDeletedExcp=null;var UTF8_1ST_OF_2=192;var UTF8_1ST_OF_3=224;var UTF8_1ST_OF_4=240;var UTF8_TRAIL=128;var HIGH_SURROGATE_BITS=55296;var LOW_SURROGATE_BITS=56320;var SURROGATE_6_BIT=64512;var SURROGATE_ID_BITS=63488;var SURROGATE_OFFSET=65536;function escapeProperlyCoreCore(k,g,e,c){var l="";var f="";var d=0;var h=" \"%<>'&";if(typeof(k)=="undefined"){return""}for(d=0;d<k.length;d++){var m=k.charCodeAt(d);var a=k.charAt(d);if(g&&(a=="#"||a=="?")){l+=k.substr(d);break}if(e&&a=="&"){l+=a;continue}if(m<=127){if(c){l+=a}else{if((m>=97&&m<=122)||(m>=65&&m<=90)||(m>=48&&m<=57)||(g&&(m>=32&&m<=95)&&h.indexOf(a)<0)){l+=a}else{if(m<=15){l+="%0"+m.toString(16).toUpperCase()}else{if(m<=127){l+="%"+m.toString(16).toUpperCase()}}}}}else{if(m<=2047){f=UTF8_1ST_OF_2|(m>>6);l+="%"+f.toString(16).toUpperCase();f=UTF8_TRAIL|(m&63);l+="%"+f.toString(16).toUpperCase()}else{if((m&SURROGATE_6_BIT)!=HIGH_SURROGATE_BITS){f=UTF8_1ST_OF_3|(m>>12);l+="%"+f.toString(16).toUpperCase();f=UTF8_TRAIL|((m&4032)>>6);l+="%"+f.toString(16).toUpperCase();f=UTF8_TRAIL|(m&63);l+="%"+f.toString(16).toUpperCase()}else{if(d<k.length-1){var m=(m&1023)<<10;d++;var b=k.charCodeAt(d);m|=b&1023;m+=SURROGATE_OFFSET;f=UTF8_1ST_OF_4|(m>>18);l+="%"+f.toString(16).toUpperCase();f=UTF8_TRAIL|((m&258048)>>12);l+="%"+f.toString(16).toUpperCase();f=UTF8_TRAIL|((m&4032)>>6);l+="%"+f.toString(16).toUpperCase();f=UTF8_TRAIL|(m&63);l+="%"+f.toString(16).toUpperCase()}}}}}return l}function escapeProperly(a){return escapeProperlyCoreCore(a,false,false,false)}function escapeProperlyCore(b,a){return escapeProperlyCoreCore(b,a,false,false)}function escapeUrlForCallback(d){var b=d.indexOf("#");var c=d.indexOf("?");if((b>0)&&((c==-1)||(b<c))){var a=d.substr(0,b);if(c>0){a+=d.substr(c)}d=a}return escapeProperlyCoreCore(d,true,false,true)}function PageUrlValidation(a){if(a.substr(0,4)!="http"&&a.substr(0,1)!="/"){var b="Invalid page URL: ";alert(b);return""}else{return a}}var g_ExpGroupWPState=new LRUCache();function makeAbsUrl(a){if(a.length>0&&"/"==a.substr(0,1)){a=window.location.protocol+"//"+window.location.host+a}return a}function FilterNoteField(g,k,c,l){if(l!=13){return}event.returnValue=false;var e=window.location.href;pagedPart=/&Paged=TRUE&p_[^&]*&PageFirstRow=[^&]*/gi;e=e.replace(pagedPart,"");viewGuid=GetUrlKeyValue("View",true);if(viewGuid==""){e=StURLSetVar2(e,"View",g);viewGuid=g}if(g.toUpperCase()!=viewGuid.toUpperCase()){var d=escapeProperly(g);if(d.toUpperCase()!=viewGuid.toUpperCase()){var f=/\?[^?]*/i;var h=e.indexOf("?");if(h!=-1){e=e.replace(f,"?View="+g)}else{e=e+"?View="+g}}}var a=e.match("FilterField([0-9]+)="+k);if(!a){var h=e.indexOf("?");if(h!=-1){e=e+"&"}else{e=e+"?"}i=0;do{i++;FilterArray=e.match("FilterField"+i+"=[^&]*&FilterValue"+i+"=[^&]*")}while(FilterArray);e=e+"FilterField"+i+"="+k+"&FilterValue"+i+"="+escapeProperly(c);e=e.replace("Filter=1&","")}else{filterNo=parseInt(a[1]);var b=e.match("&FilterValue"+filterNo+"=[^&]*");strTemp="&"+a[0]+b[0];strNewFilter="&FilterField"+a[1]+"="+k+"&FilterValue"+a[1]+"="+escapeProperly(c);e=e.replace(strTemp,strNewFilter);e=e.replace("Filter=1&","")}window.location.href=STSPageUrlValidation(e)}function SelectField(g,d){var b=window.location.href;var k=window.location.hash;var c=false;var f=/\#.*/i;b=b.replace(f,"");viewGuid=GetUrlKeyValue("View",true);pageView=GetUrlKeyValue("PageView",true);if(g.toUpperCase()!=viewGuid.toUpperCase()){var a=escapeProperly(g);if(a.toUpperCase()!=viewGuid.toUpperCase()){var f=/\?[^?]*/i;var h=b.indexOf("?");if(h!=-1){b=b.replace(f,"?View="+g)}else{b=b+"?View="+g}c=true}}if(!c&&(GetUrlKeyValue("SelectedID")!="")){var e=/&SelectedID=[^&]*/gi;b=b.replace(e,"");e=/\?SelectedID=[^&]*&?/;b=b.replace(e,"?")}b=b+"&SelectedID=";b=b+d;if(c&&(pageView!="")){b=b+"&PageView="+pageView}if(k!=""){b=b+k}SubmitFormPost(b)}function FilterField(a,d,c,b){return FilterFieldV3(a,d,c,b,false)}function FilterFieldV3(n,p,c,m,q){var f=CanonicalizeUrlEncodingCase(window.location.href);var a=f.match("[&?]Paged=TRUE[^&]*");if(a){var l=/&p_[^&]*/gi;f=f.replace(l,"");l=/&PageFirstRow=[^&]*/gi;f=f.replace(l,"");l=/&PageLastRow=[^&]*/gi;f=f.replace(l,"");l=/&PagedPrev=TRUE[^&]*/i;f=f.replace(l,"");a=f.match("[?]Paged=TRUE[^&]*");if(a){var o=f.substr(a.index).indexOf("&");if(o!=-1){f=f.substr(0,a.index+1)+f.substr(o+a.index+1)}else{f=f.substr(0,a.index)}}else{l=/&Paged=TRUE[^&]*/i;f=f.replace(l,"")}}viewGuid=GetUrlKeyValue("View",true);if(viewGuid==""){f=StURLSetVar2(f,"View",n);viewGuid=n}if(n.toUpperCase()!=viewGuid.toUpperCase()){var d=escapeProperly(n);if(d.toUpperCase()!=viewGuid.toUpperCase()){var k=/\?[^?]*/i;var o=f.indexOf("?");if(o!=-1){f=f.replace(k,"?View="+n)}else{f=f+"?View="+n}}}a=f.match("FilterField([0-9]+)="+p+"&");if(!a){if(0==m){f=f.replace("Filter=1&","");f=f.replace("?Filter=1","")}else{var o=f.indexOf("?");if(o!=-1){f=f+"&"}else{f=f+"?"}i=0;do{i++;FilterArray=f.match("FilterField"+i+"=[^&]*&FilterValue"+i+"=[^&]*")}while(FilterArray);f=f+"FilterField"+i+"="+p+"&FilterValue"+i+"="+escapeProperly(c);f=f.replace("Filter=1&","")}}else{filterNo=parseInt(a[1]);var b=f.match("FilterValue"+filterNo+"=[^&]*");var g="&"+a[0]+b[0];if(0==m){if(f.indexOf(g)==-1){g=a[0]+b[0]+"&"}f=f.replace(g,"");j=filterNo+1;FilterArray=f.match("FilterField"+j+"=[^&]*&FilterValue"+j+"=[^&]*");for(i=filterNo;FilterArray;i++){strNew="FilterField"+i;strOld="FilterField"+j;f=f.replace(strOld,strNew);strNew="FilterValue"+i;strOld="FilterValue"+j;f=f.replace(strOld,strNew);j++;FilterArray=f.match("FilterField"+j+"=[^&]*&FilterValue"+j+"=[^&]*")}f=f.replace("Filter=1&","");f=f.replace("?Filter=1","")}else{var e;if(f.indexOf(g)==-1){g="?"+a[0]+b[0];e="?"}else{e="&"}var h=e+"FilterField"+a[1]+"="+p+"&FilterValue"+a[1]+"="+escapeProperly(c);f=f.replace(g,h);f=f.replace("Filter=1&","")}}a=f.match("FilterField([0-9]+)=");if(!a){f=f+"&FilterClear=1"}else{f=f.replace("&FilterClear=1","")}if(q){return f}else{SubmitFormPost(f)}}function CanonicalizeUrlEncodingCase(d){var c="";var a;for(a=0;a<d.length;a++){var b=d.charAt(a);if(b=="%"&&(a+2)<d.length){c+=b;a++;c+=d.charAt(a).toString().toUpperCase();a++;c+=d.charAt(a).toString().toUpperCase()}else{c+=b}}return c}function SetControlValue(b,a){var c=document.getElementById(b);if(c!=null){c.value=a}}var bValidSearchTerm=false;function SetSearchView(){if(typeof(bValidSearchTerm)!="undefined"){bValidSearchTerm=true}}function SubmitFormPost(b,a){if(typeof(MSOWebPartPageFormName)!="undefined"){var c=document.forms[MSOWebPartPageFormName];if(null!=c){if((a!=undefined&&a==true)||!c.onsubmit||(c.onsubmit()!=false)){c.action=STSPageUrlValidation(b);c.method="POST";if(isPortalTemplatePage(b)){c.target="_top"}if(!bValidSearchTerm){ClearSearchTerm("")}c.submit()}}}}var g_varSkipRefreshOnFocus=0;function RefreshOnFocus(){if(typeof(g_varSkipRefreshOnFocus)=="undefined"||!g_varSkipRefreshOnFocus){var a=window.location.href;var b=a.indexOf("#");if(b==-1){window.location.href=a}else{window.location.href=a.substring(0,b)}}}function DisableRefreshOnFocus(){g_varSkipRefreshOnFocus=1}function SetWindowRefreshOnFocus(){window.onbeforeunload=DisableRefreshOnFocus;window.onfocus=RefreshOnFocus}function RemoveParametersFromUrl(a){var b=a.indexOf("?");if(b==-1){return a}else{return a.substr(0,b)}}function GoToPageRelative(a){if(a.substr(0,4)!="http"&&a.substr(0,1)!="/"){var b=RemoveParametersFromUrl(window.location.href);var c=b.lastIndexOf("/");if(c>0){a=b.substring(0,c+1)+a}}GoToPage(a)}function EnterFolder(a){var c=RemoveParametersFromUrl(window.location.href);var b=RemoveParametersFromUrl(a);if(b.toLowerCase()!=c.toLowerCase()){STSNavigate(a)}else{SubmitFormPost(a)}}function GoToDiscussion(a){var b=a.indexOf("?")>=0?"&":"?";var c=GetSource();if(c!=null&&c!=""){a+=b+"TopicsView="+c}STSNavigate(a)}function STSNavigateWithCheckoutAlert(g,d,c,b,a,f,e){if(typeof(f)=="undefined"||f==null||f==""){f=currentItemCheckedOutUserId}if((typeof(e)=="undefined"||e==null||e=="")&&typeof(ctx)!="undefined"){e=ctx.CurrentUserId}if(c=="1"){alert(L_CannotEditPropertyForLocalCopy_Text);return}if(f!=null&&f!=""&&e!=null&&f!=e){alert(L_CannotEditPropertyCheckout_Text);return}if(d=="1"&&browseris.ie){if(confirm(L_ConfirmCheckout_Text)){if(b.charAt(0)=="/"||b.substr(0,3).toLowerCase()=="%2f"){b=document.location.protocol+"//"+document.location.host+b}CheckoutviaXmlhttp(a,b)}else{return}}STSNavigate(g)}function CheckoutviaXmlhttp(a,d){var b=new ActiveXObject("Microsoft.XMLHTTP");if(b==null){return false}b.Open("POST",a+"/_vti_bin/lists.asmx",false);b.setRequestHeader("Content-Type","text/xml; charset=utf-8");b.setRequestHeader("SOAPAction","http://schemas.microsoft.com/sharepoint/soap/CheckOutFile");var c='<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><CheckOutFile xmlns="http://schemas.microsoft.com/sharepoint/soap/"><pageUrl>'+d+"</pageUrl></CheckOutFile></soap:Body></soap:Envelope>";b.Send(c);if(b.status==200&&b.ResponseText.indexOf("true")!=0){return true}else{return false}}var g_ExtensionNotSupportCheckoutToLocal=new Array("ascx","asp","aspx","htm","html","master","odc","exe","bat","com","cmd","onetoc2");var g_ExtensionDefaultForRead=new Array("jpg","jpeg","bmp","png","gif","onetoc2","one","odc");function FSupportCheckoutToLocal(c){var b=true;if(c==null||c==""){return false}c=c.toLowerCase();var a=0;for(a=0;a<g_ExtensionNotSupportCheckoutToLocal.length;a++){if(c==g_ExtensionNotSupportCheckoutToLocal[a]){return false}}return true}function FDefaultOpenForReadOnly(c){var b=false;if(c==null||c==""){return true}c=c.toLowerCase();var a=0;for(a=0;a<g_ExtensionDefaultForRead.length;a++){if(c==g_ExtensionDefaultForRead[a]){return true}}return false}function CheckoutDocument(d,f,g){var a=null;var c=true;var b=false;if(f.charAt(0)=="/"||f.substr(0,3).toLowerCase()=="%2f"){f=document.location.protocol+"//"+document.location.host+f}var h=SzExtension(unescapeProperly(f));if(FSupportCheckoutToLocal(h)&&g=="SharePoint.OpenDocuments.3"){a=StsOpenEnsureEx(g)}if(a!=null){try{c=a.CheckoutDocumentPrompt(unescapeProperly(f),false,"");SetWindowRefreshOnFocus();b=true;return}catch(k){}}if(!b){NavigateToCheckinAspx(d,"FileName="+escapeProperly(unescapeProperly(f))+"&Checkout=true")}}function NewItem(a){GoToPage(a)}function EditItem(a){GoToPage(a)}function GoToHistoryLink(f,b){if(f.href==null){return}var e=f.href;var c=f.href.indexOf("?")>=0?"&":"?";var d=c+"VersionNo="+b;var a=GetSource();if(a!=null&&a!=""){a="&Source="+a}var e=f.href+d+a;if(isPortalTemplatePage(e)){window.top.location=STSPageUrlValidation(e)}else{window.location=STSPageUrlValidation(e)}}function GoToLink(d){if(d.href==null){return}var a=d.href.indexOf("?")>=0?"&":"?";var b=GetSource();if(b!=null&&b!=""){b=a+"Source="+b}var c=d.href+b;if(isPortalTemplatePage(c)){window.top.location=STSPageUrlValidation(c)}else{window.location=STSPageUrlValidation(c)}}function GoBack(a){window.location.href=unescapeProperly(GetSource(a))}function ReplyItem(b,e,a,c){if(e.length>=504){var d="Cannot reply to this thread. The reply limit has been reached.";alert(d)}else{b+="?Threading="+e;b+="&Guid="+a;b+="&Subject="+c;GoToPage(b)}}function GoBacktoCurrentIssue(a,b){a+="?ID="+b;GoToPage(a)}function CatchCreateError(a,c,b){return true}function ExportToDatabase(c,b,k,g){var d="To export a list, you must have a Windows SharePoint Services-compatible application and Microsoft Internet Explorer 6.0 or greater.";var a="Export to database failed. To export a list, you must have a Windows SharePoint Services-compatible application.";if(browseris.ie5up&&browseris.win32){try{var f;f=new ActiveXObject("SharePoint.ExportDatabase");if(!f){alert(d);return}f.SiteUrl=makeAbsUrl(c);f.ListID=b;f.ViewID=k;f.DoExport(g);f=null}catch(h){alert(a);return}}else{alert(d)}}function ExportList(b){var a="To export a list, you must have a Windows SharePoint Services-compatible application.";if((fSSImporter&&SSImporterObj.IqyImportEnabled())||confirm(a)){window.location.href=STSPageUrlValidation(makeAbsUrl(b))}}function ExportDiagram(d,h,g,o,k,a){try{objDiagramLaunch=new ActiveXObject("DiagramLaunch.DiagramLauncher");var c="";var l=d;var f=a;var n=h;var p=g;objDiagramLaunch.CreateDiagram(c,l,f,n,o,k,p)}catch(m){var b="Unable to create diagram.";alert(b)}delete objDiagramLaunch}var ListCtrlObj;var fListControl=false;var fListErrorShown=false;var 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(a,c,b){alert(L_EditInGrid_Text);fListErrorShown=true;return false}function EnsureListControl(){if(!fListControl){fListErrorShown=false;if(browseris.ie5up&&browseris.win32){var a='try{    ListCtrlObj=new ActiveXObject("ListNet.ListNet");    if (ListCtrlObj)        fListControl=true;} catch (e){    fListControl=false;};';var b=new Function(a);b()}else{window.onerror=CatchListCreateError;ListCtrlObj=new ActiveXObject("ListNet.ListNet");if(ListCtrlObj){fListControl=true}}}ListCtrlObj=null;return fListControl}var L_NoQuestion_Text="The survey contains no questions.";var 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(d){var k=/&*Paged=TRUE/gi;d=d.replace(k,"");var e=/&*PagedPrev=TRUE/gi;d=d.replace(e,"");var h=/&p_[^&]*/gi;d=d.replace(h,"");var c=/&PageFirstRow=[^&]*/gi;d=d.replace(c,"");var b=/&PageLastRow=[^&]*/gi;d=d.replace(b,"");var g=/\?Filter=1&*/gi;d=d.replace(g,"?");var f=/&Filter=1/gi;d=d.replace(f,"");var a=/\?$/;d=d.replace(a,"");return d}function ClearSearchTerm(b){if(typeof(MSOWebPartPageFormName)!="undefined"){var a=document.forms[MSOWebPartPageFormName];if(null!=a){if(b!=null){var c=a["SearchString"+b];if(c!=null){c.value=""}}}}bValidSearchTerm=true}function SubmitSearchRedirect(e){var d=document.forms.frmSiteSearch;if(d==null){if(typeof(MSOWebPartPageFormName)!="undefined"){d=document.forms[MSOWebPartPageFormName]}}if(d!=null){var c=d.elements.SearchString.value;e=e+"?k="+escapeProperly(c);var a=d.elements.SearchScope;if(a!=null){var b=a.value;if(b){e=e+"&u="+escapeProperly(b)}}d.action=e;d.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 e=document.forms[0];var a="SearchString"+f;var d=e.elements[a].value;if(""==d){var c="Please enter one or more search words.";alert(c);e.elements[a].focus()}else{var b;b=RemovePagingArgs(e.action);if(typeof(bGridViewPresent)!="undefined"&&bGridViewPresent){b=ShowGridUrlInHTML(b)}e.action=b;e.submit()}}function IsKeyDownSubmit(b){if(b!=null){var a;var c;if(browseris.ie){a=b.keyCode;c=b.altKey||b.ctrlKey}else{a=b.which;c=b.modifers&(b.ALT_MASK|b.CONTROL_MASK)}if((a==13)&&!c){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(a,b){b.focus();b.select();window.alert(a)}function AlertAndSetFocusForDropdown(a,b){b.focus();window.alert(a)}function setElementValue(c,a){var b=document.getElementsByName(c).item(0);if(b==null){return false}b.value=a;return true}function GetMultipleSelectedText(c){if(c){var a;a="";for(var b=0;b<c.options.length;b++){if(c.options[b].selected){a+=","+c.options[b].text}}if(a.length>0){a=a.substring(1)}return a}else{return""}}function GetCBSelectedValues(c){if(c==null){return}var b=new Object();b.strList="";b.fAllChecked=true;for(var a=0;a<c.elements.length;a++){var d=c.elements[a];if(d.type=="checkbox"&&!d.disabled){if(d.checked){if(b.strList!=""){b.strList+=","}b.strList+=d.value}else{b.fAllChecked=false}}}return b}var fNewDoc=false;var fNewDoc2=false;var fNewDoc3=false;var L_EditDocumentProgIDError_Text="'Edit Document' requires a Windows SharePoint Services-compatible application and Microsoft Internet Explorer 6.0 or greater.";var L_EditDocumentRuntimeError_Text="The document could not be opened for editing.  A Windows SharePoint Services compatible application could not be found to edit the document.";function editDocumentWithProgID(a,b){if(fNewDoc){if(a.charAt(0)=="/"||a.substr(0,3).toLowerCase()=="%2f"){a=document.location.protocol+"//"+document.location.host+a}if((!fNewDoc2)&&(!fNewDoc3)){if(!EditDocumentButton.EditDocument(a,b)){alert(L_EditDocumentRuntimeError_Text)}}else{if(!EditDocumentButton.EditDocument2(window,a,b)){alert(L_EditDocumentRuntimeError_Text)}}}else{alert(L_EditDocumentProgIDError_Text)}}function editDocumentWithProgID2(b,g,f,c,a,d){var e=editDocumentWithProgIDNoUI(b,g,f,c,a,d);if(e==1){alert(L_EditDocumentRuntimeError_Text);window.onfocus=RefreshOnNextFocus}else{if(e==2){alert(L_EditDocumentProgIDError_Text)}}}function editDocumentWithProgIDNoUI(g,b,c,o,d,f){var m;var a;var l=false;c=c.replace(/(?:\.\d+)$/,"");if(g.charAt(0)=="/"||g.substr(0,3).toLowerCase()=="%2f"){g=document.location.protocol+"//"+document.location.host+g}var k=SzExtension(unescapeProperly(g));if(FSupportCheckoutToLocal(k)){try{m=new ActiveXObject(c+".3");if(m!=null){if(o=="1"){if(!m.CheckoutDocumentPrompt(g,true,b)){return 1}}else{if(f=="1"){l=true}if(!m.EditDocument3(window,g,l,b)){return 1}}var h=false;h=m.PromptedOnLastOpen();if(h){window.onfocus=RefreshOnNextFocus}else{SetWindowRefreshOnFocus()}return}}catch(n){}}if(o=="1"){if(confirm(L_ConfirmCheckout_Text)){NavigateToCheckinAspx(d,"FileName="+escapeProperly(unescapeProperly(g))+"&Checkout=true")}else{return}}try{m=new ActiveXObject(c+".2");if(!m.EditDocument2(window,g,b)){return 1}window.onfocus=RefreshOnNextFocus;return}catch(n){}try{m=new ActiveXObject(c+".1");window.onfocus=null;if(SzExtension(g)=="ppt"&&b==""){b="PowerPoint.Slide"}if(!m.EditDocument(g,b)){return 1}SetWindowRefreshOnFocus();return}catch(n){return 2}}function RefreshOnNextFocus(){SetWindowRefreshOnFocus()}function createNewDocumentWithProgID2(e,b,d,c,a){if(!createNewDocumentWithProgIDCore(e,b,d,a,false)){createNewDocumentWithProgIDCore(e,b,c,a,true)}}function createNewDocumentWithProgID(d,b,c,a){createNewDocumentWithProgIDCore(d,b,c,a,true)}function createNewDocumentWithProgIDCore(f,a,g,h,m){var k;var b;var d;var c=false;if(h){var b=L_NewFormLibTb1_Text;var d=L_NewFormLibTb2_Text}else{var b=L_NewDocLibTb1_Text;var d=L_NewDocLibTb2_Text}try{k=new ActiveXObject(g+".2");if(!k.CreateNewDocument2(window,f,a)){alert(b)}c=k.PromptedOnLastOpen();if(c){window.onfocus=RefreshOnNextFocus}else{SetWindowRefreshOnFocus()}return true}catch(l){}try{k=new ActiveXObject(g+".1");window.onfocus=null;if(!k.CreateNewDocument(f,a)){alert(b)}SetWindowRefreshOnFocus();return true}catch(l){if(m){alert(d)}}}function createNewDocumentWithRedirect(g,b,d,a,f,e){if(IsClientAppInstalled(d)&&e!=1){var c=d.replace(/(?:\.\d+)$/,"");createNewDocumentWithProgID(g,b,c,a)}else{STSNavigate(f+"&SaveLocation="+makeAbsUrl(escapeProperly(b))+"&Source="+GetSource()+"&DefaultItemOpen="+e)}}if(typeof(ExpandBody)=="undefined"){function ExpandBody(b,a){var c=document.forms[MSOWebPartPageFormName];c.CAML_Expand.value=c.CAML_Expand.value.concat(b);c.action=c.action.concat("#"+a);c.submit();return false}}if(typeof(CollapseBody)=="undefined"){function CollapseBody(b,a){var d=document.forms[MSOWebPartPageFormName];var c=new RegExp("{","g");b=b.replace(c,"\\{");c=new RegExp("}","g");b=b.replace(c,"\\}");c=new RegExp(b,"g");d.CAML_Expand.value=d.CAML_Expand.value.replace(c,"");d.CAML_ShowOriginalEmailBody.value=d.CAML_ShowOriginalEmailBody.value.replace(c,"");d.action=d.action.concat("#"+a);d.submit();return false}}if(typeof(ShowQuotedText)=="undefined"){function ShowQuotedText(b,a){var c=document.forms[MSOWebPartPageFormName];c.CAML_ShowOriginalEmailBody.value=c.CAML_ShowOriginalEmailBody.value.concat(b);if(c.action.indexOf("#")>0){c.action=c.action.substr(0,c.action.indexOf("#"))}c.action=c.action.concat("#"+a);c.submit();return false}}if(typeof(HideQuotedText)=="undefined"){function HideQuotedText(b,a){var d=document.forms[MSOWebPartPageFormName];var c=new RegExp("{","g");b=b.replace(c,"\\{");c=new RegExp("}","g");b=b.replace(c,"\\}");c=new RegExp(b,"g");d.CAML_ShowOriginalEmailBody.value=d.CAML_ShowOriginalEmailBody.value.replace(c,"");if(d.action.indexOf("#")>0){d.action=d.action.substr(0,d.action.indexOf("#"))}d.action=d.action.concat("#"+a);d.submit();return false}}function LRUCache(){this.state=new Array();this.ageStack=new Array();this.count=0}function LRUCache_Add(a,b){if(!a){return}oldAge=a.state[b];if(oldAge!=null){a.ageStack[oldAge]=null}else{a.count++}age=a.ageStack.length;a.state[b]=age;a.ageStack.push(b)}function LRUCache_Remove(a,b){if(!a){return}age=a.state[b];if(age!=null){a.ageStack[age]=null;a.state[b]=null;a.count--}else{}}function AddGroupToCookie(c){var b=ExpGroupFetchWebPartID(c);if(b==null){return}LRUCache_Add(g_ExpGroupWPState,b);if(g_ExpGroupTable[b]==null){g_ExpGroupTable[b]=new LRUCache()}var a=ExpGroupFetchGroupString(c);if(a==null){return}LRUCache_Add(g_ExpGroupTable[b],a);ExpGroupRenderCookie()}function RemoveGroupFromCookie(d){var c=ExpGroupFetchWebPartID(d);if(c==null){return}if(g_ExpGroupTable[c]==null){return}LRUCache_Add(g_ExpGroupWPState,c);var b=ExpGroupFetchGroupString(d);if(b==null){return}var a;for(a in g_ExpGroupTable[c].state){if(g_ExpGroupTable[c].state[a]!=null&&a.substring(0,b.length)==b){LRUCache_Remove(g_ExpGroupTable[c],a)}}ExpGroupRenderCookie()}function ExpGroupRenderCookie(){if(!g_ExpGroupWPState){return}var b=ExpGroupWPListName+"=";var c=0;var a;for(a=g_ExpGroupWPState.ageStack.length-1;a>=0;a--){if(g_ExpGroupWPState.ageStack[a]!=null){var d=g_ExpGroupWPState.ageStack[a];if(c==ExpGroupMaxWP){DeleteCookie(ExpGroupCookiePrefix+d);break}else{if(g_ExpGroupTable[d]==null){c++;if(c>1){b+=escape(ExpGroupCookieDelimiter)}b+=escape(d)}else{if(g_ExpGroupTable[d].count==0){DeleteCookie(ExpGroupCookiePrefix+d)}else{if(c<ExpGroupMaxWP){c++;ExpGroupRenderCookieForWebPart(d);if(c>1){b+=escape(ExpGroupCookieDelimiter)}b+=escape(d)}}}}}}if(c==0){DeleteCookie(ExpGroupWPListName)}else{document.cookie=b}}function ExpGroupRenderCookieForWebPart(f){if(!g_ExpGroupTable[f].ageStack){return}var c=ExpGroupCookiePrefix+f+"=";var e=true;var b;for(b=g_ExpGroupTable[f].ageStack.length-1;b>=0;b--){if(g_ExpGroupTable[f].ageStack[b]!=null){var d=g_ExpGroupTable[f].ageStack[b];var a="";if(!e){a+=escape(ExpGroupCookieDelimiter)}a+=escape(d);if(c.length+a.length<=ExpGroupMaxCookieLength){c+=a;e=false}}}document.cookie=c+";"}function ExpGroupOnPageLoad(){flag=document.getElementById("GroupByColFlag");if(flag!=null){g_ExpGroupNeedsState=true;ExpGroupParseCookie()}}function ExpGroupParseCookie(){var c=GetCookie(ExpGroupWPListName);if(c==null){return}g_ExpGroupParseStage=true;var b=c.split(ExpGroupCookieDelimiter);var a;for(a=b.length-1;a>=0;a--){var d=b[a];LRUCache_Add(g_ExpGroupWPState,d);if(g_ExpGroupTable[d]==null){if(document.getElementById("GroupByCol"+d)!=null){ExpGroupParseCookieForWebPart(d)}}}g_ExpGroupParseStage=false;if(g_ExpGroupQueue.length>0){ExpGroupFetchData(g_ExpGroupQueue.shift())}}function ExpGroupParseCookieForWebPart(k){var o=GetCookie(ExpGroupCookiePrefix+k);if(o==null){return}var g=o.split(ExpGroupCookieDelimiter);var c;g_ExpGroupTable[k]=new LRUCache();for(c=g.length-1;c>=0;c--){var f=g[c];LRUCache_Add(g_ExpGroupTable[k],f)}var a=new Array();var e=document.getElementById("GroupByCol"+k).parentNode;tbodyTags=e.getElementsByTagName("TBODY");for(c=0;c<tbodyTags.length;c++){var f=tbodyTags[c].getAttribute("groupString");if(f!=null){var l=tbodyTags[c].id;if(l==null){continue}var n=l.substring(4,l.length);if(g_ExpGroupTable[k].state[f]!=null&&a[n]==null){ExpCollGroup(n,"img_"+n);a[n]=true;tbody=document.getElementById("tbod"+n+"_");if(tbody!=null){isLoaded=tbody.getAttribute("isLoaded");if(isLoaded=="false"){g_ExpGroupQueue.push(n)}}}}}var m;for(m in a){var h=m.indexOf("_");if(h!=m.length-1&&h!=-1){var d=m.substring(0,h+1);if(a[d]==null){var b=ExpGroupFetchGroupString(d);if(b!=null){LRUCache_Add(g_ExpGroupState,b);ExpCollGroup(d,"img_"+d);a[b]=true}else{}}}}}function ExpGroupBy(a){if(browseris.nav){return}if((browseris.w3c)&&(!browseris.ie)){document.all=document.getElementsByTagName("*")}docElts=document.all;numElts=docElts.length;images=a.getElementsByTagName("IMG");img=images[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 c=0;c<numElts;c++){var d=docElts(c);if(d==spanNode){break}}ID=spanNode.id.slice(5);for(var b=c+1;b<numElts;b++){var d=docElts(b);if(d.id.length>5&&d.id.substr(0,5)=="group"){curID=d.id.slice(5);if(curID<=ID){return}}parentNode=d;while(parentNode!=null){parentNode=parentNode.parentElement;if(parentNode==spanNode){break}}if(parentNode==spanNode){continue}if(d!=img&&d.tagName=="IMG"&&d.src&&d.src.slice(d.src.length-25)=="/_layouts/images/plus.gif"){d.src="/_layouts/images/minus.gif";oldName=d.name;d.name=d.alt;d.alt=oldName}if(d.tagName==spanNode.tagName&&d.id!="footer"){d.style.display=displayStr}if((d.tagName=="TABLE"&&lastNode==null)||d==lastNode){break}}}function SzExtension(a){var c=new String(a);var b=/^.*\.([^\.]*)$/;return c.replace(b,"$1").toLowerCase()}function SzServer(a){var c=new String(a);var b=/^([^:]*):\/\/([^\/]*).*$/;return c.replace(b,"$1://$2")}var v_stsOpenDoc=null;var v_strStsOpenDoc=null;function StsOpenEnsureEx(a){if(v_stsOpenDoc==null||v_strStsOpenDoc!=a){}return v_stsOpenDoc}function DispDocItem(b,a){return DispDocItemEx(b,"FALSE","FALSE","FALSE",a)}var L_OpenDocumentLocalError_Text="This document was being edited offline, but there is no application configured to open the document from SharePoint.  The document can only be opened for reading.";function DispDocItemEx(s,d,l,t,b){itemTable=FindSTSMenuTable(s,"CTXName");if(!browseris.ie||!browseris.win32){if(browseris.ie){event.cancelBubble=false}return true}var r;var c;var h;var a=true;var q=itemTable!=null?GetAttributeFromItemTable(itemTable,"Ext","FileType"):"";var o="";var p=document.getElementById("FileDialogViewTable");if(p!=null){if(browseris.ie){event.cancelBubble=false;event.returnValue=false}return true}c=itemTable!=null?GetAttributeFromItemTable(itemTable,"Url","ServerUrl"):"";if(c==null||c==""){c=s.href}else{c=SzServer(s.href)+c}h=SzExtension(c);if((currentItemProgId==null)&&(itemTable!=null)){currentItemProgId=itemTable.getAttribute("HTMLType")}if(currentItemProgId!=null){o=currentItemProgId}if(FDefaultOpenForReadOnly(h)){if(b.indexOf("SharePoint.OpenDocuments")>=0){b="SharePoint.OpenDocuments.3"}}else{if(!FSupportCheckoutToLocal(h)){b=""}}if((currentItemCheckedOutUserId==null)&&(itemTable!=null)){currentItemCheckedOutUserId=itemTable.COUId}if((currentItemCheckedoutToLocal==null)&&(itemTable!=null)){currentItemCheckedoutToLocal=GetAttributeFromItemTable(itemTable,"COut","IsCheckedoutToLocal ")}if(((currentItemCheckedOutUserId!=null)&&(currentItemCheckedOutUserId!="")&&(currentItemCheckedOutUserId==ctx.CurrentUserId)&&(b==""||((b.indexOf("SharePoint.OpenDocuments"))>=0))&&FSupportCheckoutToLocal(h))||(b=="SharePoint.OpenDocuments")){b="SharePoint.OpenDocuments.3"}var f=2;if(b!=""&&HasRights(16,0)){if((b.indexOf(".3"))>=0){f=3}r=StsOpenEnsureEx(b);if(r==null&&f==3){b=b.replace(".3",".2");r=StsOpenEnsureEx(b);f=2}}if(r!=null){if(f==2||((itemTable==null)&&(currentItemCheckedOutUserId==null))||(ctx.isVersions==1&&(itemTable==null||itemTable.isMostCur=="0"))){try{if((currentItemCheckedOutUserId!=null)&&(currentItemCheckedOutUserId!="")&&(currentItemCheckedOutUserId==ctx.CurrentUserId||ctx.CurrentUserId==null)){if(currentItemCheckedoutToLocal=="1"){alert(L_OpenDocumentLocalError_Text);a=false}else{a=r.EditDocument2(window,c,o)}}else{a=r.ViewDocument2(window,c,o)}}catch(n){a=false}if(a){window.onfocus=RefreshOnNextFocus}}else{var k=0;if(currentItemCheckedOutUserId!=""){if((currentItemCheckedOutUserId!=ctx.CurrentUserId)&&(ctx.CurrentUserId!=null)){k=1}else{if(currentItemCheckedoutToLocal==null||currentItemCheckedoutToLocal!="1"){k=2}else{k=4}}}else{if(!HasRights(0,4)||FDefaultOpenForReadOnly(h)){k=1}else{if(ctx.isForceCheckout==true){k=3}}}try{a=r.ViewDocument3(window,c,k,o)}catch(n){a=false}if(a){var g=r.PromptedOnLastOpen();if(g){window.onfocus=RefreshOnNextFocus}else{SetWindowRefreshOnFocus()}}}}else{if(currentItemCheckedoutToLocal=="1"){alert(L_OpenDocumentLocalError_Text)}}if(r==null||!a){if(d=="TRUE"&&l=="TRUE"&&t=="TRUE"){if(itemTable==null){return a}if(browseris.ie){event.cancelBubble=true;event.returnValue=false}var m=new Function("return "+itemTable.getAttribute("CTXName")+".HttpRoot;");GoToPage(m()+"/_layouts/htmltrverify.aspx?doc="+escapeProperly(c))}return}r=null;if(browseris.ie){event.cancelBubble=true;event.returnValue=false}return a}function DispDocItemEx2(n,l,d,f,o,c,g,a,b){var e=false;var k=b!=null&&b!="";var h=IsClientAppInstalled(a)&&HasRights(16,0);if(k){if(g==1||!h){STSNavigate(b+"&Source="+GetSource()+"&DefaultItemOpen="+g);l.cancelBubble=true;l.returnValue=false;return false}else{if(h){if(a==""||a.indexOf("SharePoint.OpenDocuments")>=0){return DispDocItemEx(n,d,f,o,c)}else{if(!ViewDoc(n.href,a)){var m=editDocumentWithProgIDNoUI(n.href,currentItemProgId,a,false,ctx.HttpRoot,"0");if((m==1)||(m==2)){STSNavigate(b+"&Source="+GetSource())}}l.cancelBubble=true;l.returnValue=false;return false}}}}return DispDocItemEx(n,d,f,o,a)}function DispDocItemExWithOutContext(p,m,g,h,q,d,k,a,c,b,f,l,o,e,n){DispEx(p,m,g,h,q,d,k,a,c,b,f,l,o,e,n)}function DispEx(q,n,g,h,r,d,k,a,c,b,f,l,p,e,o){var m=document.getElementById("FileDialogViewTable");if(m!=null){n.cancelBubble=false;n.returnValue=false;return true}if(typeof(ctx)=="undefined"||ctx==null){ctx=new ContextInfo()}ctx.CurrentUserId=l;if(p=="1"){ctx.isForceCheckout=true}else{ctx.isForceCheckout=false}currentItemCheckedOutUserId=f;currentItemCheckedoutToLocal=e;currentItemProgId=c;if(o!=null&&o!=""){SetCurrentPermMaskFromString(o,null)}n.cancelBubble=true;if(b!=null&&b!=""){b=b.substring(1)}return DispDocItemEx2(q,n,g,h,r,d,k,a,b)}function IsClientAppInstalled(b){var a=null;if(b!=""){a=StsOpenEnsureEx(b)}return a!=null}function ViewDoc(c,d){var a=StsOpenEnsureEx(d);var b=false;if(a!=null){try{b=a.ViewDocument2(window,c)}catch(f){b=false}}return b}function PortalPinToMyPage(a,c,b){a.action=c+"_vti_bin/portalapi.aspx?Cmd=PinToMyPage";a.ReturnUrl.value=window.location.href;a.ListViewUrl.value=MakeMtgInstanceUrl(a.ListViewUrl.value,b);a.submit()}function PortalPinToMyPage(c,e,d,b,h,g,f,a){c.action=e+"_vti_bin/portalapi.aspx?Cmd=PinToMyPage";SetFieldValue(c,"ReturnUrl",window.location.href);SetFieldValue(c,"ListViewUrl",MakeMtgInstanceUrl(g,d));SetFieldValue(c,"ListTitle",b);SetFieldValue(c,"ListDescription",h);SetFieldValue(c,"BaseType",f);SetFieldValue(c,"ServerTemplate",a);c.submit()}function SetFieldValue(a,d,b){var c=a[d];if(c==null){c=document.createElement("INPUT");c.setAttribute("type","hidden");c.setAttribute("name",d);a.appendChild(c)}c.value=b}function StURLSetVar2(b,e,d){var a=e+"="+d;var k=b.indexOf("#");var h;if(k!=-1){h=b.substring(k,b.length);b=b.substring(0,k)}var c=b.indexOf("?");if(c!=-1){var f=b.indexOf("?"+e+"=",c);if(f==-1){f=b.indexOf("&"+e+"=",c);if(f!=-1){a="&"+a}}else{a="?"+a}if(f!=-1){var g=new RegExp("[&?]"+e+"=[^&]*","");b=b.replace(g,a)}else{b=b+"&"+a}}else{b=b+"?"+a}if(h!=null&&h.length>0){b=b+h}return b}function RemoveQueryParameterFromUrl(b,a){var d=new RegExp("[&?]"+a+"=[^&]*","");b=b.replace(d,"");if(b.indexOf("?")==-1){var c=b.indexOf("&");if(c!=-1){b=b.substring(0,c)+"?"+b.substring(c+1)}}return b}function MoveToViewDate(c,b){var a=window.location.href;if(c!=null){a=StURLSetVar2(a,"CalendarDate",escapeProperly(c))}if(b!=null){a=StURLSetVar2(a,"CalendarPeriod",b)}SubmitFormPost(a,true)}function MoveToDate(a){MoveToViewDate(a,null)}function MoveToToday(){MoveToViewDate("",null)}function MoveView(a){MoveToViewDate(null,a)}function ClickDay(a){MoveToViewDate(a,null)}function GetMonthView(c){var b=window.location.href;var a=document.getElementById("ExpandedWeeksId");if(a!=null){a.value=c}else{return}SubmitFormPost(b,true)}function NewItemDT(b,a,c){if(b==null){return}if(c!=null){b=StURLSetVar2(b,"CalendarTime",c)}if(a!=null){b=StURLSetVar2(b,"CalendarDate",a)}NewItem(b,false)}function ClickTime(a,b){NewItemDT(a,null,b)}function NewItemDay(b,a){NewItemDT(b,a,null)}function HasValidUrlPrefix(a){var b=a.toLowerCase();if(-1==b.search("^http://")&&-1==b.search("^https://")){return false}return true}function ScrollToAnchorInInnerScrollPane(m,k,n){if(!browseris.ie4up){return}try{var d=document.getElementById(m);var h=document.getElementById(d[k].value);if(typeof(h)=="undefined"||h==null){throw""}}catch(l){var f=null;for(var g=0;g<document.anchors.length;g++){f=document.anchors[g];var c=f.href;if(c.search(n)!=-1){h=f;break}}}if(typeof(h)!="undefined"&&h!=null){var b=document.body.scrollTop;var a=document.body.scrollLeft;h.scrollIntoView(false);document.body.scrollTop=b;document.body.scrollLeft=a}}function FilterChoice(d,q,G,C){var z;var f=0;var w=false;var B="";var a=d.id;var n=d.name;var t="";var u="";var E=q.choices;var v=E.split("|");var r=AbsLeft(q);var p=AbsTop(q)+q.offsetHeight;var e=q.optHid;var h=v.length-1;var s=-1;var c=false;var A="";if(d!=null&&d.selectedIndex>=0){w=true;A=d.options[d.selectedIndex].innerText}for(z=0;z<v.length;z=z+2){var b=v[z];while(z<h-1&&v[z+1].length==0){b=b+"|";z++;if(z<h-1){b=b+v[z+1]}z++}var D=v[z+1];var m=b.toLocaleLowerCase();var l=G.toLocaleLowerCase();if(C.length!=0){w=true}if(m.indexOf(l)==0){var F=C.toLocaleLowerCase();if((F.length!=0)&&(m.indexOf(F)==0)&&(t.length==0)){w=false}if(m.length>20){c=true}if(!w||m==A){B+='<option selected value="'+D+'">'+STSHtmlEncode(b)+"</option>";w=true;t=b;u=D;s=z}else{B+='<option value="'+D+'">'+STSHtmlEncode(b)+"</option>"}f++}}var o=' ondblclick="HandleOptDblClick()" onkeydown="HandleOptKeyDown()"';var k="";if(c){k='<select tabIndex="-1" ctrl="'+q.id+'" name="'+n+'" id="'+a+'"'+o}else{k='<select class="ms-lookuptypeindropdown" tabIndex="-1" ctrl="'+q.id+'" name="'+n+'" id="'+a+'"'+o}if(f==0){k+=' style="display:none;position:absolute;z-index:2;left:'+r+"px;top:"+p+'px" onfocusout="OptLoseFocus(this)"></select>'}else{k+=' style="position:absolute;z-index:2;left:'+r+"px;top:"+p+'px" size="'+(f<=8?f:8)+'"'+(f==1?'multiple="true"':"")+' onfocusout="OptLoseFocus(this)">'+B+"</select>"}d.outerHTML=k;var g=document.getElementById(e);if(s!=0||v[1]!="0"){g.value=u}else{g.value="0"}if(s!=0||v[1]!="0"){return t}else{return""}}function OptLoseFocus(a){var b=document.getElementById(a.ctrl);if(a.selectedIndex>=0){SetCtrlFromOpt(b,a)}a.style.display="none"}function SetCtrlMatch(c,b){var a=document.getElementById(c.optHid);a.value=b.options[b.selectedIndex].value;if(a.value!=0){c.match=b.options[b.selectedIndex].innerText}else{c.match=""}}function AbsLeft(c){var a=c.offsetLeft;var b=c.offsetParent;while(b.tagName!="BODY"){a+=b.offsetLeft;b=b.offsetParent}a+=b.offsetLeft;return a}function AbsTop(b){var c=b.offsetTop;var a=b.offsetParent;while(a.tagName!="BODY"){c+=a.offsetTop;a=a.offsetParent}c+=a.offsetTop;return c}function SetCtrlFromOpt(c,b){var a=document.getElementById(c.optHid);a.value=b.options[b.selectedIndex].value;if(b.options[b.selectedIndex].value==0){c.value="";c.match=""}else{c.value=b.options[b.selectedIndex].innerText;c.match=c.value}}function HandleOptDblClick(){var a=event.srcElement;var b=document.getElementById(a.ctrl);SetCtrlFromOpt(b,a);SetCtrlMatch(b,a);a.style.display="none"}function HandleOptKeyDown(){var b=event.srcElement;var c=document.getElementById(b.ctrl);var a=event.keyCode;switch(a){case 13:case 9:SetCtrlFromOpt(c,b);event.returnValue=false;b.style.display="none";return;default:break}return}function EnsureSelectElement(b,c){var a=document.getElementById(c);if(a==null){a=document.createElement("SELECT");b.parentNode.appendChild(a);a.outerHTML='<select id="'+c+'" ctrl="'+b.id+'" class="ms-lookuptypeindropdown" name="'+c+'" style="display:none" onfocusout="OptLoseFocus(this)"></select>';FilterChoice(a,b,b.value,"")}return document.getElementById(c)}function HandleKey(){var b=event.keyCode;var d=event.srcElement;var f=d.value;var a=EnsureSelectElement(d,d.opt);var e=false;var c;var g;switch(b){case 8:if(f.length>0){f=f.substr(0,f.length-1)}e=true;break;case 16:case 17:case 18:return;case 9:case 16:case 17:case 18:return;case 13:c=d.value.toLocaleLowerCase();g=d.match.toLocaleLowerCase();if(g.indexOf(c)!=0){d.match=FilterChoice(a,d,d.value,"")}if(a.style.display!="none"){d.value=d.match;a.style.display="none";event.returnValue=false}return;case 27:a.style.display="none";event.returnValue=false;return;case 38:if(a.style.display!="none"){if(a.selectedIndex>0){a.selectedIndex=a.selectedIndex-1}else{a.selectedIndex=a.options.length-1}SetCtrlMatch(d,a);event.returnValue=false}return;case 40:if(a.style.display!="none"&&a.selectedIndex<a.options.length-1){a.selectedIndex=a.selectedIndex+1;SetCtrlMatch(d,a);event.returnValue=false;return}e=true;break;case 46:break;default:break}if(e){}d.match=FilterChoice(a,d,f,"")}function ShowDropdown(b){var c=document.getElementById(b);var d=c.value;var a=EnsureSelectElement(c,c.opt);c.match=FilterChoice(a,c,"",c.value);c.focus()}function HandleChar(){var c=event.srcElement;var d=c.value;var b=document.getElementById(c.opt);var a=event.keyCode;if(a==13){return}d=d+String.fromCharCode(a).toLocaleLowerCase();c.match=FilterChoice(b,c,d,"")}function HandleLoseFocus(){var b=event.srcElement;var a=document.getElementById(b.opt);if(a!=null&&a.style.display!="none"&&document.activeElement!=a){OptLoseFocus(a)}}function HandleChange(){var b=event.srcElement;var c=b.value;var a=document.getElementById(b.opt);b.match=FilterChoice(a,b,c,"")}function IsSafeHref(a){return(a.match(new RegExp("^http://","i"))||a.match(new RegExp("^https://","i"))||a.match(new RegExp("^ftp://","i"))||a.match(new RegExp("^file://","i"))||a.match(new RegExp("^mailto:","i"))||a.match(new RegExp("^news:","i"))||a.match(new RegExp("^/","i"))||a.match(new RegExp("^\\\\\\\\","i")))}var L_RelativeUrlError_Text="Addresses that start from the current page might not display correctly. You must enter the complete URL or an address that starts from the current server.";var L_UnknownProtocolUrlError_Text="Hyperlinks must begin with http://, https://, mailto:, news:, ftp://, file://, or \\\\. Check the address and try again.";var L_UrlTooLongError_Text="The URL for the location must be no longer than 256 characters without the query parameters. The query parameters start at the question mark (?).";function IsSafeHrefAlert(a,b){if(a.match("^[^?]{257}")){alert(L_UrlTooLongError_Text);return false}else{if(IsSafeHref(a)){return true}else{if(a.match("^[a-zA-Z]*:")){alert(L_UnknownProtocolUrlError_Text);return false}else{if(true==b){return true}else{alert(L_RelativeUrlError_Text);return false}}}}}function PositionMiniConsole(){var a=document.getElementById("miniconsole");if(browseris.ie55up&&browseris.win32){if(document.getElementById("siteactiontd")){a.style.top="1"}else{a.style.top="8"}}else{a.style.top="0"}}var deleteInstance=0;function DeleteItemConfirmation(){var a="";if(typeof(ItemIsCopy)!="undefined"){if(ItemIsCopy){a=L_NotifyThisIsCopy_Text}}if(recycleBinEnabled==1&&deleteInstance!=1){a+=L_STSRecycleConfirm_Text}else{a+=L_STSDelConfirm_Text}return confirm(a)}function DeleteInstanceConfirmation(){deleteInstance=1;return DeleteItemConfirmation()}function CancelMultiPageConfirmation(d){var b="A partial survey response has been saved.  Click OK to delete the partial survey response. If you want to continue this survey later click Cancel.  Your partial response can be found in the All Responses survey view.\n\nDo you want to send this partial response to the site Recycle Bin?";var a="A partial survey response has been saved.  Click OK to delete the partial survey response. If you want to continue this survey later click Cancel.  Your partial response can be found in the All Responses survey view.\n\nDo you want to delete the partial response?";var c="";if(recycleBinEnabled==1){c=b}else{c=a}if(confirm(c)==true){return true}else{STSNavigate(d)}return false}function RestoreItemVersionConfirmation(){var b="You are about to replace the current version with the selected version.";var a=b;return confirm(a)}function DeleteItemVersionConfirmation(c){var b="Are you sure you want to delete this version?";var a="Are you sure you want to send this version to the site Recycle Bin?";if(c){return confirm(a)}else{return confirm(b)}}function DeleteUserInfoItemConfirmation(){var a="You are about to delete this user.";var b=a;return confirm(b)}function UnlinkCopyConfirmation(a){return confirm(L_ConfirmUnlinkCopy_Text)}function Discuss(b){var a="'Discuss' requires a Windows SharePoint Services-compatible application and Microsoft Internet Explorer 6.0 or greater.";if(browseris.ie5up&&browseris.win32){window.parent.location.href=b}else{alert(a)}}function ProcessDefaultNavigateHierarchy(h,e,a,b,l,k,c,d,m){if(typeof(_spCustomNavigateHierarchy)=="function"){_spCustomNavigateHierarchy(h,e,a,b,l,k)}else{if(l==false){top.location=b}else{var f=document.createElement("INPUT");f.type="hidden";f.name="_spTreeNodeClicked";f.value=a;c.appendChild(f);var g="?RootFolder="+escapeProperly(b)+d;SubmitFormPost(m+g);return false}}}function ParseMultiColumnValue(d,b){var e=new Array();if(b==null){b=";#"}var n=b.charCodeAt(0);var a=b.charCodeAt(1);if(d==null||d.length==0){return e}var g=b.charAt(0);var q=g+g;var p=new RegExp(q,"g");var k=b.charAt(0);var c=0;if(d.substr(0,2)==b){c=2}var h=c;var f=false;var o=d.length;while(h<o){var l=d.indexOf(g,h);if(l>=0){h=l;h++;if(d.charCodeAt(h)==a){if(h-1>c){var m=d.substr(c,h-c-1);if(f){m=m.replace(p,k)}e.push(m);f=false}else{e.push("")}h++;c=h;continue}else{if(d.charCodeAt(h)==n){h++;f=true;continue}else{throw"ArgumentException"}}}else{h=o}}if(h>c){var m=d.substr(c,h-c);if(f){m=m.replace(p,k)}e.push(m)}return e}function ConvertMultiColumnValueToString(c,a,b){if(a==null){a=";#"}if(b==null){b=true}var d=a.charAt(0);var l=d+d;var h=new RegExp(a.charAt(0),"g");var k=false;var g="";for(var e=0;e<c.length;e++){var f=c[e];if(f!=null&&f.length>0){f=f.replace(h,l)}if(f!=null&&f.length>0){k=true}if(b||e!=0){g+=a}g+=f}if(k){if(b){g+=a}return g}else{return""}}var httpFolderTarget=null;var httpFolderSource=null;var httpFolderDiv=null;function NavigateHttpFolderCore(){if(httpFolderDiv==null){httpFolderDiv=document.createElement("DIV");document.body.appendChild(httpFolderDiv);httpFolderDiv.onreadystatechange=NavigateHttpFolderCore;httpFolderDiv.addBehavior("#default#httpFolder")}if(httpFolderDiv.readyState=="complete"){httpFolderDiv.onreadystatechange=null;try{var f=document.frames.item(httpFolderTarget);if(f!=null){f.document.body.innerText=L_WebFoldersRequired_Text}}catch(d){}var a=false;try{var b="";b=httpFolderDiv.navigateFrame(httpFolderSource,httpFolderTarget);if(b=="OK"){a=true}}catch(d){}if(!a&&0==httpFolderSource.search("http://[a-zA-Z0-9-.]+(:80)?/")){var c=httpFolderSource.replace(/http:\/\/([a-zA-Z0-9\-\.]+)(:80)?[\/]/,"//$1/").replace(/[\/]/g,"\\");var f=document.frames.item(httpFolderTarget);if(f!=null){try{f.onload=null;f.document.location.href=c;a=true}catch(d){}}}if(!a){alert(L_WebFoldersError_Text)}}}function NavigateHttpFolder(b,a){if("/"==b.charAt(0)){b=document.location.protocol+"//"+document.location.host+b}httpFolderSource=b;httpFolderTarget=a;NavigateHttpFolderCore()}function NavigateHttpFolderIfSupported(b,a){if(SupportsNavigateHttpFolder()){NavigateHttpFolder(b,a)}else{alert(L_WebFoldersError_Text);window.history.back()}}function SupportsNavigateHttpFolder(){return(browseris.ie5up&&browseris.win32)}cGCMinimumWidth=400;cGCMinimumHeight=200;cGCMaxGCResizeCount=10;var glGCObjectHeight=0;var glGCObjectWidth=0;glGCResizeCounter=0;function TestGCObject(a){if(((browseris.ie55up)&&(typeof(a)=="undefined"))||(a==null)||(a.object==null)){return false}return true}function GCComputeSizing(g){if(TestGCObject(g)){var e=(document.documentElement.currentStyle.direction=="rtl");var d=document.documentElement.scrollWidth;var c=document.documentElement.scrollHeight;var a=0;var f=0;if(e){a=-180;f=120}else{a=32;f=-2}var b=g.parentElement;while(b!=document.body){a+=b.offsetLeft;f+=b.offsetTop;b=b.offsetParent;if(e){if(b.offsetLeft>0){break}}}a+=g.parentElement.offsetLeft;f+=g.parentElement.offsetTop;glGCObjectHeight=c-f;if(glGCObjectHeight>c){glGCObjectHeight=c}if(glGCObjectHeight<cGCMinimumHeight){glGCObjectHeight=cGCMinimumHeight}if(e){glGCObjectWidth=d+a}else{glGCObjectWidth=d-a}if(glGCObjectWidth>d){glGCObjectWidth=d}if(glGCObjectWidth<cGCMinimumWidth){glGCObjectWidth=cGCMinimumWidth}}}function GCResizeGridControl(c){if(TestGCObject(c)){var a=glGCObjectHeight;var b=glGCObjectWidth;GCComputeSizing(c);if(a!=glGCObjectHeight){c.height=glGCObjectHeight}if(b!=glGCObjectWidth){c.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 b=window.location.href;gridPart=b.match("ShowInGrid=");if(gridPart){gridSet=/ShowInGrid=\w*/;b=b.replace(gridSet,"")}var c=b.indexOf("?");if(c!=-1){var a=b.indexOf("?",c+1);if(a!=-1){b=b.slice(0,a)}b=b+"&"}else{b=b+"?"}b=b+"ShowInGrid=False";document.location.replace(STSPageUrlValidation(b))}function GCAddNewColumn(b,h){if(TestGCObject(b)){var a=window.location.href;var d=b.Name;var f=b.SelectedColumnUniqueName;var c=b.RightToLeft;var k=b.ViewGUID;var e="FldNew.aspx";var g=b.ServerTemplate;if(g=="102"){e="QstNew.aspx"}h=h+"/_layouts/"+e+"?List="+d+"&View="+k+"&Source="+a+"&RelativeToField="+f+"&LTR="+c;window.location=h}}function GCEditDeleteColumn(g,f){if(TestGCObject(g)){var e=window.location.href;var c=g.SelectedColumnUniqueName;var b=g.Name;var d="FldEdit.aspx";var a=g.ServerTemplate;if(a=="102"){d="QstEdit.aspx"}f=f+"/_layouts/"+d+"?List="+b+"&Field="+c+"&Source="+e;window.location=f}}function GCShowHideTaskPane(b){if(TestGCObject(b)){var a=b.DisplayTaskPane;b.DisplayTaskPane=!a}}function GCShowHideTotalsRow(b){if(TestGCObject(b)){var a=b.DisplaySheetTotals;b.DisplaySheetTotals=!a}}function GCGridNewRow(a){if(TestGCObject(a)){a.SelectNewRow()}}function GCRefresh(a){if(TestGCObject(a)){a.Refresh()}}function GCNewFolder(a){if(TestGCObject(a)){a.NewFolder()}}var L_Edit_Text="Edit";var L_ViewItem_Text="View Item";var L_EditItem_Text="Edit Item";var L_EditSeriesItem_Text="Edit Series";var L_DeleteItem_Text="Delete Item";var L_DeleteDocItem_Text="Delete";var L_ViewProperties_Text="View Properties";var L_EditProperties_Text="Edit Properties";var L_ViewResponse_Text="View Response";var L_EditResponse_Text="Edit Response";var L_DeleteResponse_Text="Delete Response";var L_Subscribe_Text="Alert Me";var L_CustomizeNewButton_Text="Change New Button Order";var L_Review_Text="Send for Review";var L_EditIn_Text="Edit in ^1";var L_EditInApplication_Text="Edit Document";var L_Checkin_Text="Check In";var L_Checkout_Text="Check Out";var L_DiscardCheckou_Text="Discard Check Out";var L_CreateDWS_Text="Create Document Workspace";var L_PublishBack_Text="Publish to Source Location";var L_Versions_Text="Version History";var L_WorkOffline_Text="Connect to Client";var L_Reply_Text="Reply";var L_ExportContact_Text="Export Contact";var L_ExportEvent_Text="Export Event";var L_Reschedule_Text="Rescheduling Options";var L_Move_Text="Move";var L_Keep_Text="Keep";var L_Delete_Text="Delete";var L_Open_Text="Open";var L_SiteSettings_Text="Change Site Settings";var L_ManageUsers_Text="Manage Users";var L_DeleteSite_Text="Delete Site";var L_SiteStorage_Text="Manage Site Storage";var L_MngPerms_Text="Manage Permissions";var L_Settings_Text="Settings";var L_Remove_Text="Remove from this list";var L_ModerateItem_Text="Approve/reject";var L_PublishItem_Text="Publish a Major Version";var L_CancelPublish_Text="Cancel Approval";var L_UnPublishItem_Text="Unpublish this version";var L_DownloadOriginal_Text="Download Picture";var L_EditVersion_Text="Edit";var L_EditInOIS_Text="Edit Picture";var L_Workflows_Text="Workflows";var L_Send_Text="Send To";var L_ExistingCopies_Text="Existing Copies";var L_OtherLocation_Text="Other Location";var L_GoToSourceItem_Text="Go to Source Item";var L_NotifyThisIsCopy_Text="This item was copied from another location and may be receiving updates from there.  You should make sure that the source stops sending updates or this item may get recreated.\n\n";var L_SendToEmail_Text="E-mail a Link";var L_DownloadACopy_Text="Download a Copy";var L_DocTran_Text="Convert Document";var L_AddToMyLinks_Text="Add to My Links";var L_AddToCategory_Text="Submit to Portal Area";var L_VS_DownArrow_Text="Select a View";var L_ModifyView="Modify this view";var L_CreateView="Create a new view";function resetExecutionState(){IsMenuShown=false;itemTable=null;EndDeferItem();imageCell=null;onKeyPress=false;currentCtx=null;currentEditMenu=null;currentItemID=null;downArrowText=null;currentItemAppName=null;currentItemProgId=null;currentItemIcon=null;currentItemOpenControl=null;currentItemModerationStatus=null;currentItemUIString=null;currentItemCheckedoutToLocal=null;currentItemCanModify=null;currentItemFileUrl=null;currentItemFSObjType=null;currentItemCheckedOutUserId=null;currentItemCheckoutExpires=null;currentItemPermMaskH=null;currentItemPermMaskL=null;currentItemIsEventsExcp=null;currentItemIsEventsDeletedExcp=null}function IsMenuEnabled(){return(browseris.ie55up||browseris.nav6up||browseris.safari125up)}function GetSelectedElement(b,a){while(b!=null&&b.tagName!=a){b=b.parentNode}return b}function setupMenuContext(a){currentCtx=a}function FindSTSMenuTable(c,a){var b=c.getAttribute(a);while(c!=null&&(b==null||b=="")){c=GetSelectedElement(c.parentNode,"TABLE");if(c!=null){b=c.getAttribute(a)}}return c}function OnLinkDeferCall(b){if(!IsMenuEnabled()){return false}b.onblur=OutItem;b.onkeydown=PopMenu;var a=FindSTSMenuTable(b,"CTXName");if(a==null){return false}OnItem(a);return false}function StartDeferItem(a){if(a!=itemTable){itemTableDeferred=a;a.onmouseout=EndDeferItem;a.onclick=DeferredOnItem;a.oncontextmenu=DeferredOnItem}}function DeferredOnItem(a){var b=itemTableDeferred;if(b!=null){MenuHtc_hide();OnItem(b);CreateMenu(a);return false}}function EndDeferItem(){var a=itemTableDeferred;if(a!=null){itemTableDeferred=null;a.onmouseout=null;a.onclick=null;a.oncontextmenu=null}}function GetFirstChildElement(b){for(var a=0;a<b.childNodes.length;a++){if(b.childNodes[a].nodeType==1){return b.childNodes[a]}}return null}function GetLastChildElement(b){for(var a=b.childNodes.length-1;a>=0;a--){if(b.childNodes[a].nodeType==1){return b.childNodes[a]}}return null}function OnItemDeferCall(e){if(!IsMenuEnabled()){return false}if(IsMenuOn()){StartDeferItem(e);return false}if(itemTable!=null){OutItem()}itemTable=e;currentItemID=GetAttributeFromItemTable(itemTable,"ItemId","Id");var d=new Function("setupMenuContext("+itemTable.getAttribute("CTXName")+");");d();var b=currentCtx;if(browseris.nav6up){itemTable.className="ms-selectedtitlealternative"}else{itemTable.className="ms-selectedtitle"}if(browseris.ie5up&&!browseris.ie55up){itemTable.onclick=EditMenuDefaultForOnclick;itemTable.oncontextmenu=EditMenuDefaultForOnclick}else{itemTable.onclick=CreateMenu;itemTable.oncontextmenu=CreateMenu}itemTable.onmouseout=OutItem;var c;c=GetFirstChildElement(GetFirstChildElement(itemTable));if(c!=null){imageCell=GetLastChildElement(c)}if(b.listTemplate==200){if(itemTable.getAttribute("menuType")=="Orphaned"){downArrowText=L_Reschedule_Text}}else{downArrowText=L_Edit_Text}var a=GetFirstChildElement(imageCell);a.src=b.imagesPath+"menudark.gif";a.alt=downArrowText;a.style.visibility="visible";imageCell.className="ms-menuimagecell";return false}function OutItem(){if(!IsMenuOn()&&itemTable!=null){itemTable.className="ms-unselectedtitle";itemTable.onclick=null;itemTable.oncontextmenu=null;itemTable.onmouseout=null;if(imageCell!=null){GetFirstChildElement(imageCell).style.visibility="hidden";imageCell.className=""}resetExecutionState()}}function IsMenuOn(){if(!IsMenuShown){return false}var a=false;a=MenuHtc_isOpen(currentEditMenu);if(!a){IsMenuShown=false}return a}function PopMenu(b){if(!IsMenuEnabled()){return true}if(b==null){b=window.event}var a;if(browseris.nav6up){a=b.which}else{a=b.keyCode}if(!IsMenuOn()&&((b.shiftKey&&a==13)||(b.altKey&&a==40))){onKeyPress=true;CreateMenu(b);onKeyPress=false;return false}else{return true}}function CreateMenuEx(c,b,d){if(b==null){return}IsMenuShown=true;document.body.onclick="";var a;a=CMenu(currentItemID+"_menu");if(!a){return}else{if(c.isVersions){AddVersionMenuItems(a,c)}else{if(c.listBaseType==1){AddDocLibMenuItems(a,c)}else{if(c.listTemplate==200){AddMeetingMenuItems(a,c)}else{AddListMenuItems(a,c)}}}}InsertFeatureMenuItems(a,c);currentEditMenu=a;b.onmouseout=null;OMenu(a,b,null,null,-1);itemTable=GetSelectedElement(b,"TABLE");a._onDestroy=OutItem;d.cancelBubble=true;return false}function CreateMenu(c){if(!IsContextSet()){return}var b=currentCtx;if(c==null){c=window.event}var a=c.srcElement?c.srcElement:c.target;if(itemTable==null||imageCell==null||(onKeyPress==false&&(a.tagName=="A"||a.parentNode.tagName=="A"))){return}return CreateMenuEx(b,itemTable,c)}function AddSendSubMenu(d,p){strDisplayText=L_Send_Text;var k=GetAttributeFromItemTable(itemTable,"Url","ServerUrl");var g;var a;var f;if(currentItemFileUrl!=null){a=unescapeProperly(currentItemFileUrl);g=escapeProperly(a);f=SzExtension(a);if(f!=null&&f!=""){f=f.toLowerCase()}}var c=CASubM(d,strDisplayText,"","",400);c.id="ID_Send";var l;var e=itemTable.getAttribute("SRed");if(currentItemProgId!="SharePoint.WebPartPage.Document"&&(e==null||e==""||HasRights(0,32))&&f!="aspx"){if(typeof(p.SendToLocationName)!="undefined"&&p.SendToLocationName!=null&&p.SendToLocationName!=""&&typeof(p.SendToLocationUrl)!="undefined"&&p.SendToLocationUrl!=null&&p.SendToLocationUrl!=""){strAction="STSNavigate('"+p.HttpRoot+"/_layouts/copy.aspx?SourceUrl="+g+"&Source="+GetSource()+"&FldUrl="+escapeProperly(p.SendToLocationUrl)+"')";l=CAMOpt(c,p.SendToLocationName,strAction,"")}if(typeof(itemTable.getAttribute("HCD"))!="undefined"&&itemTable.getAttribute("HCD")=="1"){strDisplayText=L_ExistingCopies_Text;strAction="STSNavigate('"+p.HttpRoot+"/_layouts/updatecopies.aspx?SourceUrl="+g+"&Source="+GetSource()+"')";strImagePath=p.imagesPath+"existingLocations.gif";l=CAMOpt(c,strDisplayText,strAction,strImagePath);l.id="ID_ExistingCopies"}strDisplayText=L_OtherLocation_Text;strAction="STSNavigate('"+p.HttpRoot+"/_layouts/copy.aspx?SourceUrl="+g+"&Source="+GetSource()+"')";strImagePath=p.imagesPath+"sendOtherLoc.gif";l=CAMOpt(c,strDisplayText,strAction,strImagePath);l.id="ID_OtherLocation";if(p.OfficialFileName!=null&&p.OfficialFileName!=""){strDisplayText=p.OfficialFileName;strAction="STSNavigate('"+p.HttpRoot+"/_layouts/SendToOfficialFile.aspx?SourceUrl="+g+"&Source="+GetSource()+"')";strImagePath="";CAMOpt(c,strDisplayText,strAction,strImagePath)}CAMSep(c)}if(HasRights(16,0)){strDisplayText=L_SendToEmail_Text;var k=GetAttributeFromItemTable(itemTable,"Url","ServerUrl");var h=p.HttpRoot.substr(0);if(h[h.length-1]!="/"){h+="/"}var b=-1;var o="";b=h.substring(8).indexOf("/")+8;o=escapeProperly(h.substr(0,b))+k;var n=itemTable.getAttribute("SRed");if((n!=null)&&(n!="")&&(n!="1")){if(n.substring(0,1)!="1"){o=n}else{o=n.substring(1)}}strAction="javascript:navigateMailToLink('mailto:?body="+o+"')";strImagePath=p.imagesPath+"gmailnew.gif";l=CAMOpt(c,strDisplayText,strAction,strImagePath);l.id="ID_SendToEmail"}var e=itemTable.getAttribute("SRed");if(currentItemFSObjType!=1&&p.listBaseType==1&&(e==null||e==""||HasRights(0,32))){if(p.listTemplate!=109&&p.listTemplate!=119){AddWorkspaceMenuItem(c,p)}strAction="STSNavigate('"+p.HttpRoot+"/_layouts/download.aspx?SourceUrl="+g+"&Source="+GetSource()+"&FldUrl="+escapeProperly(p.SendToLocationUrl)+"')";l=CAMOpt(c,L_DownloadACopy_Text,strAction,"");l.id="ID_DownloadACopy"}}function AddDocTransformSubMenu(b,n){if(typeof(rgDocTransformers)=="undefined"||rgDocTransformers==null){return}var a=null;var f=GetAttributeFromItemTable(itemTable,"Url","ServerUrl");var d;if(currentItemFileUrl!=null){d=escapeProperly(unescapeProperly(currentItemFileUrl))}var g=f.lastIndexOf(".");if(g>0){var c=f.substring(g+1,f.length).toLowerCase();var o;var h=false;for(o=0;o<rgDocTransformers.length;o++){if(rgDocTransformers[o].ConvertFrom==c){var e=GetAttributeFromItemTable(itemTable,"CId","ContentTypeId");var l=new RegExp("/|"+e+"|/");if(e&&!l.test(rgDocTransformers[o].ExcludedContentTypes)){if(!h){a=CASubM(b,L_DocTran_Text,n.imagesPath+"ConvertDocument.gif",L_DocTran_Text,500);a.Id="ID_ConvertDocument";h=true}strAction="STSNavigate('"+n.HttpRoot+"/_layouts/"+escapeProperlyCore(rgDocTransformers[o].TransformUIPage,true)+"?FileName="+d+"&TID="+rgDocTransformers[o].Id+"&Source="+GetSource()+"')";var k;k=CAMOpt(a,rgDocTransformers[o].Name,strAction,"");k.Id="ID_Transform"+rgDocTransformers[o].Id}}}}}function AddMeetingMenuItems(a,b){if(itemTable.getAttribute("menuType")=="Orphaned"){var c;var d=GetAttributeFromItemTable(itemTable,"ItemId","Id");strDisplayText=L_Move_Text;strAction="GoToMtgMove('"+b.listUrlDir+"',"+d+",'"+itemTable.getAttribute("DateTime")+"','"+itemTable.getAttribute("DateTimeISO")+"')";strImagePath="";c=CAMOpt(a,strDisplayText,strAction,strImagePath);c.id="ID_Move";strDisplayText=L_Keep_Text;strAction="MtgKeep('"+b.HttpPath+"','"+b.listName+"',"+d+")";strImagePath="";c=CAMOpt(a,strDisplayText,strAction,strImagePath);c.id="ID_Keep";strDisplayText=L_Delete_Text;strAction="MtgDelete('"+b.HttpPath+"','"+b.listName+"',"+d+")";strImagePath=b.imagesPath+"delitem.gif";c=CAMOpt(a,strDisplayText,strAction,strImagePath);c.id="ID_Delete"}}function AddListMenuItems(c,d){if(typeof(Custom_AddListMenuItems)!="undefined"){if(Custom_AddListMenuItems(c,d)){return}}if(currentItemFileUrl==null){currentItemFileUrl=GetAttributeFromItemTable(itemTable,"Url","ServerUrl")}var b;if(currentItemFileUrl!=null){b=escapeProperly(unescapeProperly(currentItemFileUrl))}if(currentItemIsEventsExcp==null){currentItemIsEventsExcp=false;currentItemIsEventsDeletedExcp=false;currentItemEvtType=itemTable.getAttribute("EventType");if(currentItemEvtType!=null&&(currentItemEvtType==2||currentItemEvtType==3||currentItemEvtType==4)){currentItemIsEventsExcp=true;if(currentItemEvtType==3){currentItemIsEventsDeletedExcp=true}}}var e;if(d.listBaseType==3&&d.listTemplate==108){strDisplayText=L_Reply_Text;if(itemTable.getAttribute("Ordering").length>=504){var f="Cannot reply to this thread. The reply limit has been reached.";strAction="alert('"+f+"')"}else{strAction="STSNavigate('"+d.newFormUrl+"?Threading="+escapeProperly(itemTable.getAttribute("Ordering"))+"&Guid="+escapeProperly(itemTable.getAttribute("ThreadID"))+"&Subject="+escapeProperly(itemTable.getAttribute("Subject"))+"&Source="+GetSource()+"')"}strImagePath=d.imagesPath+"reply.gif";e=CAMOpt(c,strDisplayText,strAction,strImagePath,null,100);e.id="ID_Reply"}AddSharedNamespaceMenuItems(c,d);if(currentItemID.indexOf(".0.")<0&&HasRights(0,8)&&!currentItemIsEventsExcp){if(d.listBaseType==4){strDisplayText=L_DeleteResponse_Text}else{strDisplayText=L_DeleteItem_Text}strAction="DeleteListItem()";strImagePath=d.imagesPath+"delitem.gif";e=CAMOpt(c,strDisplayText,strAction,strImagePath,null,300);e.id="ID_DeleteItem"}var a=itemTable.getAttribute("CId");if(a!=null&&a.indexOf("0x0106")==0&&HasRights(16,0)){strDisplayText=L_ExportContact_Text;strAction="STSNavigate('"+d.HttpPath+"&Cmd=Display&CacheControl=1&List="+d.listName+"&ID="+currentItemID+"&Using="+escapeProperly(d.listUrlDir)+"/vcard.vcf')";strImagePath=d.imagesPath+"exptitem.gif";e=CAMOpt(c,strDisplayText,strAction,strImagePath,null,350);e.id="ID_ExportContact"}CAMSep(c);if(d.verEnabled==1){AddVersionsMenuItem(c,d,b)}AddWorkflowsMenuItem(c,d);CAMSep(c);if((currentItemID.indexOf(".0.")<0)&&HasRights(128,0)){strDisplayText=L_Subscribe_Text;strAction="NavigateToSubNewAspx('"+d.HttpRoot+"', 'List="+d.listName+"&ID="+currentItemID+"')";strImagePath="";e=CAMOpt(c,strDisplayText,strAction,strImagePath,null,1100);e.id="ID_Subscribe"}if(d.isModerated==true&&HasRights(0,16)&&HasRights(0,4)&&HasRights(0,135168)&&d.listBaseType!=4){strDisplayText=L_ModerateItem_Text;strAction="STSNavigate('"+d.HttpRoot+"/_layouts/approve.aspx?List="+d.listName+"&ID="+currentItemID+"&Source="+GetSource()+"')";strImagePath=d.imagesPath+"apprj.gif";e=CAMOpt(c,strDisplayText,strAction,strImagePath,null,1150);e.id="ID_ModerateItem"}if(currentItemFSObjType==1&&d.ContentTypesEnabled&&d.listTemplate!=108){strDisplayText=L_CustomizeNewButton_Text;strAction="STSNavigate('"+d.HttpRoot+"/_layouts/ChangeContentTypeOrder.aspx?List="+d.listName+"&RootFolder="+b+"&Source="+GetSource()+"')";strImagePath="";e=CAMOpt(c,strDisplayText,strAction,strImagePath,null,1170);e.id="ID_CustomizeNewButton"}}function ReplaceUrlTokens(b,a){if(currentItemID!=null){b=b.replace("{ItemId}",currentItemID)}if(currentItemFileUrl!=null){b=b.replace("{ItemUrl}",currentItemFileUrl)}if(a.HttpRoot!=null){b=b.replace("{SiteUrl}",a.HttpRoot)}if(a.listName!=null){b=b.replace("{ListId}",a.listName)}return b}function InsertFeatureMenuItems(v,w){CAMSep(v);var f=GetAttributeFromItemTable(itemTable,"Ext","FileType");var k=GetAttributeFromItemTable(itemTable,"Type","HTMLType");var l=GetAttributeFromItemTable(itemTable,"CId","ContentTypeId");var n=null;if(w!=null){n=w.listTemplate}if(f){f=f.toLowerCase()}if(k){k=k.toLowerCase()}if(l){l=l.toLowerCase()}var r;var B=document.getElementById("ECBItems");if(B!=null){var o=B.childNodes[0];for(var h=0;h<o.childNodes.length;h++){var g=o.childNodes[h];var y=parseInt(GetInnerText(g.childNodes[3]));var u=parseInt(GetInnerText(g.childNodes[4]));var q=GetInnerText(g.childNodes[5]);var c=GetInnerText(g.childNodes[6]);var A=false;if(c){c=c.toLowerCase();if(q=="FileType"){A=(f==c.toLowerCase())}else{if(q=="ProgId"){A=(k==c.toLowerCase())}else{if(q=="ContentType"){A=(l&&l.indexOf(c.toLowerCase())==0)}else{if(q=="List"){A=(n&&n==c)}}}}}if(A&&HasRights(y,u)){var t=g.childNodes[0];var b=g.childNodes[1];var d=g.childNodes[2];var p=parseInt(GetInnerText(g.childNodes[7]));var z=GetInnerText(t);var s=ReplaceUrlTokens(GetInnerText(d),w);var a;if(s.substr(0,11)=="javascript:"){a=s}else{a="STSNavigate('"+STSScriptEncode(s)+"')"}var e=ReplaceUrlTokens(GetInnerText(b),w);r=CIMOpt(v,z,a,e,null,p)}}}}function GetRootFolder(a){var c=GetUrlKeyValue("RootFolder",true);if(c==""||bValidSearchTerm){var b;if(itemTable){b=GetAttributeFromItemTable(itemTable,"DRef","FileDirRef")}if(b!=null){c="/"+b}else{c=a.listUrlDir}c=escapeProperly(c)}return"&RootFolder="+c}function HasRights(a,c){if(currentItemPermMaskH==null){if(itemTable==null){return true}var d=GetAttributeFromItemTable(itemTable,"Perm","PermMask");if(d==null){return true}var b=itemTable.getAttribute("Author");SetCurrentPermMaskFromString(d,b)}if(!currentItemCanModify&&(EqualRights(a,c,0,4)||EqualRights(a,c,0,8)||EqualRights(a,c,1073741824,0))){return false}return(((c&currentItemPermMaskL)==c)&&((a&currentItemPermMaskH)==a))}function EqualRights(d,b,c,a){return((d==c)&&(a==a))}function SetCurrentPermMaskFromString(c,b){var a=c.length;if(a<=10){currentItemPermMaskH=0;currentItemPermMaskL=parseInt(c)}else{currentItemPermMaskH=parseInt(c.substring(2,a-8),16);currentItemPermMaskL=parseInt(c.substring(a-8,a),16)}currentItemCanModify=true;currentItemCanModify=(b==null)||HasRights(0,2048)||(ctx.CurrentUserId==b)||(ctx.CurrentUserId==null)||(ctx.WriteSecurity==1)}function AddSharedNamespaceMenuItems(b,c){var e=GetRootFolder(c);setupMenuContext(c);if(currentItemFileUrl==null){currentItemFileUrl=GetAttributeFromItemTable(itemTable,"Url","ServerUrl")}if(currentItemFSObjType==null){currentItemFSObjType=GetAttributeFromItemTable(itemTable,"OType","FSObjType")}if(currentItemModerationStatus==null){currentItemModerationStatus=GetAttributeFromItemTable(itemTable,"MS","MStatus")}if(currentItemCheckedOutUserId==null){currentItemCheckedOutUserId=itemTable.getAttribute("COUId")}if(currentItemCheckedoutToLocal==null){currentItemCheckedoutToLocal=GetAttributeFromItemTable(itemTable,"COut","IsCheckedoutToLocal ")}if(currentItemCheckedoutToLocal!=1){currentItemCheckedoutToLocal=0}bIsCheckout=0;if(c.isForceCheckout==true&&currentItemCheckedOutUserId==""&&currentItemFSObjType!=1){bIsCheckout=1}var a;if(currentItemFileUrl!=null){a=escapeProperly(unescapeProperly(currentItemFileUrl))}var d;if(c.listBaseType==1){strDisplayText=L_ViewProperties_Text}else{if(c.listBaseType==4){strDisplayText=L_ViewResponse_Text}else{strDisplayText=L_ViewItem_Text}}strAction="STSNavigate('"+c.displayFormUrl+"?ID="+currentItemID+"&Source="+GetSource()+e+"')";strImagePath="";d=CAMOpt(b,strDisplayText,strAction,strImagePath,null,200);if(c.listBaseType==1){d.id="ID_ViewProperties"}else{d.id="ID_ViewItem"}if(HasRights(0,4)&&!currentItemIsEventsDeletedExcp){if(c.listBaseType==1){strDisplayText=L_EditProperties_Text}else{if(c.listBaseType==4){strDisplayText=L_EditResponse_Text}else{strDisplayText=L_EditItem_Text}}if(c.listBaseType==1){strAction="STSNavigateWithCheckoutAlert('"+c.editFormUrl+"?ID="+currentItemID+"&Source="+GetSource()+e+"',"+bIsCheckout+",'"+currentItemCheckedoutToLocal+"','"+STSScriptEncode(currentItemFileUrl)+"','"+c.HttpRoot+"')"}else{strAction="STSNavigate('"+c.editFormUrl+"?ID="+currentItemID+"&Source="+GetSource()+"')"}strImagePath=c.imagesPath+"edititem.gif";d=CAMOpt(b,strDisplayText,strAction,strImagePath,null,220);if(c.listBaseType==1){d.id="ID_EditProperties"}else{d.id="ID_EditItem"}if(c.listTemplate==106&&currentItemID.indexOf(".0.")>0){var f=currentItemID.indexOf(".0.");var g=currentItemID.substr(0,f);strDisplayText=L_EditSeriesItem_Text;strAction="STSNavigate('"+c.editFormUrl+"?ID="+g+"&Source="+GetSource()+"')";strImagePath=c.imagesPath+"recurrence.gif";d=CAMOpt(b,strDisplayText,strAction,strImagePath,null,230);d.id="ID_EditSeriesItem"}}AddManagePermsMenuItem(b,c,c.listName,currentItemID)}function AddDocLibMenuItems(c,d){if(typeof(Custom_AddDocLibMenuItems)!="undefined"){if(Custom_AddDocLibMenuItems(c,d)){return}}var h=GetRootFolder(d);var f;AddSharedNamespaceMenuItems(c,d);var b;if(currentItemFileUrl!=null){b=escapeProperly(unescapeProperly(currentItemFileUrl))}var g=itemTable.getAttribute("SRed");if(HasRights(0,4)&&HasRights(16,0)&&currentItemFSObjType!=1&&(g==null||g==""||HasRights(0,32))){if(d.isWebEditorPreview==0&&d.listBaseType==1){if(d.listTemplate==109&&itemTable.getAttribute("IsImage")=="1"){strDisplayText=L_EditInOIS_Text;strAction="EditSingleImage('"+currentItemID+"')";strImagePath=d.imagesPath+"oisweb.gif";f=CAMOpt(c,strDisplayText,strAction,strImagePath,null,240);f.id="ID_EditInOIS"}else{setDocType();if(currentItemAppName!=""&&currentItemOpenControl!=""){strDisplayText="";if(currentItemAppName!=" "){strDisplayText=StBuildParam(L_EditIn_Text,currentItemAppName)}else{var e=StsOpenEnsureEx(currentItemOpenControl+".3");if(e!=null){strDisplayText=L_EditInApplication_Text}}if(strDisplayText!=""){strAction="editDocumentWithProgID2('"+currentItemFileUrl+"', '"+currentItemProgId+"', '"+currentItemOpenControl+"', '"+bIsCheckout+"', '"+d.HttpRoot+"', '"+currentItemCheckedoutToLocal+"')";strImagePath=d.imagesPath+currentItemIcon;f=CAMOpt(c,strDisplayText,strAction,strImagePath,null,240);f.id="ID_EditIn_"+currentItemAppName}}}}}if(HasRights(0,8)){strDisplayText=L_DeleteDocItem_Text;var a="false";if(typeof(itemTable.getAttribute("CSrc"))!="undefined"&&itemTable.getAttribute("CSrc")!=null&&itemTable.getAttribute("CSrc")!=""){a="true"}strAction="DeleteDocLibItem('"+d.HttpPath+"&Cmd=Delete&List="+d.listName+"&ID="+currentItemID+"&owsfileref="+b+"&NextUsing="+GetSource()+"',"+a+")";strImagePath=d.imagesPath+"delitem.gif";f=CAMOpt(c,strDisplayText,strAction,strImagePath,null,310);f.id="ID_DeleteDocItem"}AddGotoSourceItemMenuItem(c,d,itemTable,currentItemFSObjType);if(currentItemFSObjType!=1){AddSendSubMenu(c,d);AddDocTransformSubMenu(c,d)}if(currentItemFSObjType!=1&&d.listTemplate==109&&typeof(DownloadOriginalImage)=="function"){strAction="DownloadOriginalImage("+currentItemID+")";strImagePath=d.imagesPath+"download.gif";strDisplayText=L_DownloadOriginal_Text;f=CAMOpt(c,strDisplayText,strAction,strImagePath,null,550);f.id="ID_DownloadOriginal"}if(HasRights(0,4)){if((d.isModerated==true)&&(((currentItemModerationStatus==2)||!d.EnableMinorVersions)&&currentItemCheckedOutUserId==""||currentItemFSObjType==1)){strDisplayText=L_ModerateItem_Text;strAction="STSNavigate('"+d.HttpRoot+"/_layouts/approve.aspx?List="+d.listName+"&ID="+currentItemID+"&Source="+GetSource()+GetRootFolder(d)+"')";strImagePath=d.imagesPath+"apprj.gif";f=CAMOpt(c,strDisplayText,strAction,strImagePath,null,1150);f.id="ID_ModerateItem"}if(currentItemFSObjType!=1){if(d.listBaseType==1){CAMSep(c);AddCheckinCheckoutMenuItem(c,d,b)}}}if(d.verEnabled==1||d.isModerated){AddVersionsMenuItem(c,d,b)}if(currentItemFSObjType!=1){AddWorkflowsMenuItem(c,d);CAMSep(c);if(d.PortalUrl!=null){strDisplayText=L_AddToMyLinks_Text;strAction="Portal_Tasks('PinToMyPage')";strImagePath="";f=CAMOpt(c,strDisplayText,strAction,strImagePath,null,1000);f.id="ID_AddToMyLinks";CAMSep(c)}}else{if(d.listBaseType==1&&HasRights(16,0)){AddWorkOfflineMenuItem(c,d,currentItemFileUrl)}}if(HasRights(128,0)){strDisplayText=L_Subscribe_Text;strAction="NavigateToSubNewAspx('"+d.HttpRoot+"', 'List="+d.listName+"&ID="+currentItemID+"')";strImagePath="";f=CAMOpt(c,strDisplayText,strAction,strImagePath,null,1100);f.id="ID_Subscribe"}if(currentItemFSObjType==1&&d.ContentTypesEnabled&&d.listTemplate!=108){strDisplayText=L_CustomizeNewButton_Text;strAction="STSNavigate('"+d.HttpRoot+"/_layouts/ChangeContentTypeOrder.aspx?List="+d.listName+"&RootFolder="+b+"&Source="+GetSource()+"')";strImagePath="";f=CAMOpt(c,strDisplayText,strAction,strImagePath,null,1170);f.id="ID_CustomizeNewButton"}}function AddManagePermsMenuItem(a,b,c,d){if(!HasRights(1073741824,0)||currentItemIsEventsExcp){return}strDisplayText=L_MngPerms_Text;strAction="NavigateToManagePermsPage('"+b.HttpRoot+"', '"+c+"','"+d+"')";strImagePath=b.imagesPath+"manageperm.gif";var e=CAMOpt(a,strDisplayText,strAction,strImagePath,null,250);e.id="ID_MngPerms"}function AddGotoSourceItemMenuItem(a,c,e,b){if(b!=1&&typeof(e.getAttribute("CSrc"))!="undefined"&&e.getAttribute("CSrc")!=null&&e.getAttribute("CSrc")!=""){strDisplayText=L_GoToSourceItem_Text;strAction="NavigateToSourceItem('"+e.getAttribute("CSrc")+"')";strImagePath=c.imagesPath+"goToOriginal.gif";var d=CAMOpt(a,strDisplayText,strAction,strImagePath,null,340);d.id="ID_GoToSourceItem"}}function AddCheckinCheckoutMenuItem(c,h,a){var g;if(!HasRights(0,4)){return}if(currentItemCheckedOutUserId==null){currentItemCheckedOutUserId=itemTable.getAttribute("COUId")}if(currentItemCheckedOutUserId!=""){if(currentItemCheckedOutUserId==h.CurrentUserId||h.CurrentUserId==null||HasRights(0,256)){strDisplayText=L_Checkin_Text;strAction="NavigateToCheckinAspx('"+h.HttpRoot+"', 'List="+h.listName+"&FileName="+a+"')";strImagePath=h.imagesPath+"checkin.gif";g=CAMOpt(c,strDisplayText,strAction,strImagePath,null,700);g.id="ID_Checkin";strDisplayText=L_DiscardCheckou_Text;strAction="UnDoCheckOut('"+h.HttpRoot+"', '"+a+"')";strImagePath=h.imagesPath+"unchkout.gif";g=CAMOpt(c,strDisplayText,strAction,strImagePath,null,710);g.id="ID_DiscardCheckou"}}else{strDisplayText=L_Checkout_Text;if(currentItemOpenControl==""){setDocType()}var d="";if(h.listTemplate!=109){d=currentItemOpenControl+".3"}var e=itemTable.getAttribute("SRed");if(e==null||e==""||HasRights(0,32)){strAction="CheckoutDocument('"+h.HttpRoot+"', '"+a+"', '"+d+"')";strImagePath=h.imagesPath+"checkout.gif";g=CAMOpt(c,strDisplayText,strAction,strImagePath,null,700);g.id="ID_Checkout"}if(currentItemModerationStatus==null){currentItemModerationStatus=GetAttributeFromItemTable(itemTable,"MS","MStatus")}if(h.EnableMinorVersions){if(currentItemUIString==null){currentItemUIString=GetAttributeFromItemTable(itemTable,"UIS","UIString")}var b=currentItemUIString%512;if((((currentItemModerationStatus==1)||(currentItemModerationStatus==3))&&h.isModerated)||(!h.isModerated&&b!=0)){strDisplayText=L_PublishItem_Text;strAction="NavigateToCheckinAspx('"+h.HttpRoot+"', 'List="+h.listName+"&FileName="+a+"&Publish=true')";strImagePath=h.imagesPath+"pubmajor.gif";g=CAMOpt(c,strDisplayText,strAction,strImagePath,null,720);g.id="ID_PublishItem"}else{var k;var f=false;if((!h.isModerated)||(currentItemModerationStatus==0)){strDisplayText=L_UnPublishItem_Text;k="ID_UnPublishItem";strImagePath=h.imagesPath+"unpub.gif"}else{strDisplayText=L_CancelPublish_Text;k="ID_CancelPublish";strImagePath=h.imagesPath+"unapprv.gif";f=true}strAction="UnPublish('"+h.HttpRoot+"', 'FileName="+a+"&UnPublish=true',"+f+")";g=CAMOpt(c,strDisplayText,strAction,strImagePath,null,730);g.id=k}}}}function AddWorkflowsMenuItem(a,b){if(b.WorkflowsAssociated&&HasRights(0,4)){var f=GetAttributeFromItemTable(itemTable,"CId","ContentTypeId");if(f==null||f.substr(0,8)!="0x010801"){var d=b.imagesPath+"workflows.gif";var g;var h=currentItemID.indexOf(".0.");if(h>0){g=currentItemID.substr(0,h)}else{g=currentItemID}var e="STSNavigate('"+b.HttpRoot+"/_layouts/Workflow.aspx?ID="+g+"&List="+b.listName+"&Source="+GetSource()+"')";var c=CAMOpt(a,L_Workflows_Text,e,d,null,900);c.id="ID_Workflows"}}}function AddWorkspaceMenuItem(a,b){var c;var d=GetAttributeFromItemTable(itemTable,"SUrl","SourceUrl");if(d!=null&&d!=""&&d!="%20"){if(HasRights(0,135168)){strAction="STSNavigate('"+b.HttpRoot+"/_layouts/publishback.aspx?list="+b.listName+"&item="+currentItemID+GetRootFolder(b)+"')";c=CAMOpt(a,L_PublishBack_Text,strAction,"",null,1140);c.id="ID_PublishBack"}}else{if(HasRights(0,8388608)&&HasRights(0,135168)&&HasRights(0,67108864)){strAction="STSNavigate('"+b.HttpRoot+"/_layouts/createws.aspx?list="+b.listName+"&item="+currentItemID+GetRootFolder(b)+"')";c=CAMOpt(a,L_CreateDWS_Text,strAction,"",null,1140);c.id="ID_CreateDWS"}}}function AddVersionsMenuItem(a,b,c){if(currentItemID!=null){var e=currentItemID.toString();if(e.indexOf(".0.")>=0){return}}if(!HasRights(0,64)){return}strDisplayText=L_Versions_Text;strAction="NavigateToVersionsAspx('"+b.HttpRoot+"', 'list="+b.listName+"&ID="+currentItemID+"&FileName="+c+"')";strImagePath=b.imagesPath+"versions.gif";var d=CAMOpt(a,strDisplayText,strAction,strImagePath,null,800);d.id="ID_Versions"}function AddWorkOfflineMenuItem(a,b,c){strDisplayText=GetStssyncAppNameForType("documents",L_WorkOffline_Text,strImagePath);if(strDisplayText){strAction="javascript:ExportHailStorm('documents','"+b.HttpRoot+"','"+b.listName+"','"+STSScriptEncode(b.SiteTitle)+"','"+b.ListTitle+"','"+STSScriptEncode(b.listUrlDir)+"','','"+STSScriptEncode(unescapeProperly(b.listUrlDir))+"'";strAction+=",'"+STSScriptEncode(unescapeProperly(c))+"','"+currentItemID+"')";strImagePath=GetStssyncIconPath(b.imagesPath+"tbsprsht.gif",b.imagesPath);menuOption=CAMOpt(a,strDisplayText,strAction,strImagePath);menuOption.id="ID_WorkOffline"}}function AddVersionMenuItems(a,b){if(typeof(AddVersionMenuItemsCore)=="function"){AddVersionMenuItemsCore(a,b)}}function NavigateToSubNewAspx(a,b){STSNavigate(a+"/_layouts/SubNew.aspx?"+b+"&Source="+GetSource())}function NavigateToVersionsAspx(a,b){STSNavigate(a+"/_layouts/Versions.aspx?"+b+"&Source="+GetSource())}var L_UndoCheckoutWarning_Text="If you discard your check out, you will lose all changes made to the document.  Are you sure you want to discard your check out?";var L_UnPublishWarning_Text=" Are you sure you want to unpublish this version of the document?";var L_CancleApproval_TEXT=" Are you sure that you want to cancel the approval of this document?";function UnDoCheckOut(b,g){try{var a=null;var d=SzExtension(unescapeProperly(g));if(FSupportCheckoutToLocal(d)){a=StsOpenEnsureEx("SharePoint.OpenDocuments.3")}if(a!=null){var c=currentItemFileUrl;if(c.charAt(0)=="/"||c.substr(0,3).toLowerCase()=="%2f"){c=document.location.protocol+"//"+document.location.host+c}a.DiscardLocalCheckout(c);SetWindowRefreshOnFocus();return}else{if(!confirm(L_UndoCheckoutWarning_Text)){return}}}catch(f){}NavigateToCheckinAspx(b,"FileName="+g+"&DiscardCheckout=true")}function UnPublish(b,c,d){var a=L_UnPublishWarning_Text;if(d){a=L_CancleApproval_TEXT}if(!confirm(a)){return}NavigateToCheckinAspx(b,c)}function NavigateToCheckinAspx(a,b){SubmitFormPost(a+"/_layouts/Checkin.aspx?"+b+"&Source="+GetSource())}function NavigateToManagePermsPage(c,b,d){var a=",LISTITEM";STSNavigate(c+"/_layouts/User.aspx?obj="+b+","+d+a+"&List="+b+"&Source="+GetSource())}function NavigateToSourceItem(c){var b=c.match(/[^\/]*\/\/[^\/]*/g);var a=b[0];c=escapeProperly(c);STSNavigate(a+"/_layouts/copyutil.aspx?GoToDispForm=1&Use=url&ItemUrl="+c)}function setDocType(){var a;a=GetAttributeFromItemTable(itemTable,"Icon","DocIcon").split("|");currentItemIcon=a[0];currentItemAppName=a[1];currentItemOpenControl=a[2];currentItemProgId=GetAttributeFromItemTable(itemTable,"Type","HTMLType")}function DeleteListItem(){if(!IsContextSet()){return}var a=currentCtx;var b=currentItemID;if(confirm(a.RecycleBinEnabled?L_STSRecycleConfirm_Text:L_STSDelConfirm_Text)){SubmitFormPost(a.HttpPath+"&Cmd=Delete&List="+a.listName+"&ID="+b+"&NextUsing="+GetSource())}}function DeleteDocLibItem(c,a){if(!IsContextSet()){return}var b=(currentItemFSObjType==1)?(ctx.RecycleBinEnabled?L_STSRecycleConfirm1_Text:L_STSDelConfirm1_Text):(ctx.RecycleBinEnabled?L_STSRecycleConfirm_Text:L_STSDelConfirm_Text);if(a&&currentItemFSObjType!=1){b=L_NotifyThisIsCopy_Text+b}if(confirm(b)){SubmitFormPost(c)}}function EditMenuDefaultForOnclick(){if(!IsContextSet()){return}var a=currentCtx;if(a.isVersions){STSNavigate(itemTable.getAttribute("verUrl"))}else{if(a.listTemplate==200){var b=currentItemID;MtgNavigate(b)}else{EditListItem()}}}function EditListItem(){if(event.srcElement.tagName=="A"||event.srcElement.parentNode.tagName=="A"){return}if(!IsContextSet()){return}var a=currentCtx;var b=a.editFormUrl+"?ID="+currentItemID+"&Source="+GetSource();if(a.listBaseType==1){b=b+GetRootFolder(a)}STSNavigate(b)}function DoNavigateToTemplateGallery(b,a){document.cookie="MSOffice_AWS_DefSaveLoc="+b;STSNavigate(a)}function Portal_Tasks(e){if(!IsContextSet()){return}var l=currentCtx;var a=unescapeProperly(currentItemFileUrl);var h=0,g=0;h=a.lastIndexOf("/");g=a.lastIndexOf(".");if(h<0||g<0||h>g){return}var f=a.substr(h+1,g-h-1);var c="";h=l.HttpRoot.indexOf("://");if(h>0){g=l.HttpRoot.indexOf("/",h+3);if(g>0){c=l.HttpRoot.substring(0,g)}else{c=l.HttpRoot}}var k="";if(currentItemFileUrl.charAt(0)=="/"||currentItemFileUrl.substr(0,3).toLowerCase()=="%2f"){k=c+currentItemFileUrl}else{k=currentItemFileUrl}var d="";if(false==setElementValue("ListViewURL",k)){d=d+"&ListViewURL="+escapeProperly(k)}if(false==setElementValue("ListTitle",f)){d=d+"&ListTitle="+escapeProperly(f)}if(false==setElementValue("ListDescription","")){d=d+"&ListDescription="}if(false==setElementValue("ReturnUrl",window.location.href)){d=d+"&ReturnUrl="+escapeProperly(window.location.href)}if(l.PortalUrl.substr(0,4)!="http"){l.PortalUrl=c+l.PortalUrl}var b=l.PortalUrl+"_vti_bin/portalapi.aspx?cmd="+e;b=b+"&IconUrl="+l.imagesPath+currentItemIcon+d;SubmitFormPost(b)}function IsContextSet(){if(currentCtx==null){return false}else{if(currentCtx.isExplictLogin){return true}else{if(currentCtx.HttpPath==null||currentItemID==null){return false}}}return true}function ChangeContentType(e){var c=document.getElementById(e);var d=window.location.href;var b=d.indexOf("?");if(d.indexOf("?")<=0){d=d+"?ContentTypeId="+c.value}else{if(d.indexOf("&ContentTypeId=")<=0){d=d+"&ContentTypeId="+c.value}else{var a=/&ContentTypeId=[^&]*/i;d=d.replace(a,"&ContentTypeId="+c.value)}}STSNavigate(d)}function TopHelpButtonClick(a){if(typeof(navBarHelpOverrideKey)!="undefined"){return HelpWindowKey(navBarHelpOverrideKey)}if(a!=null){HelpWindowKey(a)}else{HelpWindowKey("NavBarHelpHome")}}function HelpWindowHelper(a){var b;if(typeof(a)=="undefined"){b="/_layouts/help.aspx?Lcid="+L_Language_Text}else{b="/_layouts/help.aspx?Lcid="+L_Language_Text+a}var c=window.open(b,"STSHELP","height=500,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,width=475");c.focus()}function HelpWindowKey(a){HelpWindowHelper("&Key="+a)}function HelpWindowUrl(a){HelpWindowHelper("&Url="+a)}function HelpWindow(){HelpWindowKey("helphome")}function HelpBack(){history.back()}function HelpForward(){history.forward()}function HelpPrint(){window.print()}function HelpSearch(c){var d=256;var b="";if(typeof(glob_strLocaleNumId)=="undefined"){return true}if(typeof(glob_strCollectionIds)=="undefined"){return true}if(glob_strCollectionIds.length<=0){return true}if(typeof(c)=="undefined"){return true}if(c.length<=0){return true}c=TrimWhiteSpaces(c);if(c.length==0){return true}c=c.substr(0,d);c=encodeURIComponent(c);b="/_layouts/HelpSearch.aspx?lcid="+escapeProperlyCore(glob_strLocaleNumId,true);for(var a=0;a<glob_strCollectionIds.length;a++){b=b+"&cid"+a+"="+escapeProperlyCore(glob_strCollectionIds[a],true)}b=b+"&sq="+c;window.location.href=b}var L_EmptySlideShow_Text="No pictures found in the library. Add pictures and try again.";var L_NotOurView_Text="This operation cannot be completed within current view. Please select another view and try again.";function IsImgLibJssLoaded(){if(typeof(fImglibJssLoaded)!="undefined"){return fImglibJssLoaded}return false}function EditSelectedImages(){if(!IsImgLibJssLoaded()){alert(L_NotOurView_Text);return}_EditSelectedImages()}function DeleteImages(){if(!IsImgLibJssLoaded()){alert(L_NotOurView_Text);return}_DeleteImages()}function SendImages(){if(!IsImgLibJssLoaded()){alert(L_NotOurView_Text);return}_SendImages()}function DownloadImages(){if(!IsImgLibJssLoaded()){alert(L_NotOurView_Text);return}_DownloadImages()}function MtgToggleTimeZone(){var d=document.getElementById("TimeZoneSection");var a=document.getElementById("TimeZoneLink");var b="Show time zone";var c="Hide time zone";if(d.style.display=="none"){d.style.display="";a.innerHTML="&lt;&lt;";a.title=c;SetCookie("MtgTimeZone","1","")}else{d.style.display="none";a.innerHTML="&gt;&gt;";a.title=b;SetCookie("MtgTimeZone","0","")}}function GetPageUrl(a){return unescapeProperly(a?g_webUrl:g_pageUrl)}function MtgNavigate(b){if(b==g_instanceId){return}var a=!g_fPageGlobal;window.location.href=GetPageUrl(a)+"?InstanceID="+b+"&"+g_thispagedata}function GoToMtgMove(c,d,b,a){window.location.href=c+"/movetodt.aspx?FromInstanceID="+d+"&FromInstanceDate="+escapeProperly(b)+"&FromInstanceDateISO="+escapeProperly(a)+"&Source="+escapeProperly(window.location.href)}function MtgKeep(c,a,d){var b="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(b)){SubmitFormPost(c+"&Cmd=MtgKeep&List="+escapeProperly(a)+"&EditInstanceID="+d+"&NextUsing="+escapeProperly(window.location.href))}}function MtgDelete(d,b,e){var a="This meeting date and the content associated with it will be deleted from the workspace.";if(confirm(a)){var c=(e==g_instanceId);SubmitFormPost(d+"&Cmd=MtgMove&List="+escapeProperly(b)+"&FromInstanceID="+e+"&ToInstanceID=-3&NextUsing="+escapeProperly(c?GetPageUrl(true):window.location.href))}}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 MtgDeletePageConfirm(){var b="This page will be deleted from all meetings associated with this workspace.  ";var a="Are you sure you want to delete this page?";var c;if(document.getElementById("MtgTlPart_PageType").value=="MtgTlPart_LocalPage"){c=a}else{c=b+a}return confirm(c)}function MtgRedirect(){var a=GetCookie("MtgLastTabVisited");if(a==null){if(typeof(g_webUrl)!="undefined"){a=g_webUrl}else{a="../../"}}else{a=escapeProperlyCore(a,true)}window.location.href=a}function MakeMtgInstanceUrl(c,a){if(a!="undefined"&&a!=""){var b=c.indexOf("?");if(b==-1||c.indexOf("InstanceID=",b)==-1){c=c+(b==-1?"?":"&")+"InstanceID="+a}}return c}function commonShowModalDialog(e,g,f,b){if(document.getElementById("__spPickerHasReturnValue")!=null){document.getElementById("__spPickerHasReturnValue").value=""}if(document.getElementById("__spPickerReturnValueHolder")!=null){document.getElementById("__spPickerReturnValueHolder").value=""}var h;if(window.showModalDialog){h=window.showModalDialog(e,b,g);if(f){f(h)}}else{var r=500,d=550,k="yes";if(!g){g="width="+r+",height="+d}else{function l(){return new Array()}function q(y,v,w){y.push(v);y[v]=w}function n(y){var w=new Array();for(var v=0;v<y.length;v++){w.push(y[v])}return w}var s=l(),a,p;if(g.search(/^(\s*\w+\s*:\s*.+?\s*)(;\s*\s*\w+\s*:\s*.+?\s*)*(;\s*)?$/)!=-1){a=/^\s*(\w+)\s*:\s*(.+?)\s*$/;p=g.split(/\s*;\s*/)}else{a=/^\s*(\w+)\s*=\s*(.+?)\s*$/;p=g.split(/\s*,\s*/)}for(var o in p){var u=a.exec(p[o]);if(u&&u.length==3){q(s,u[1].toLowerCase(),u[2])}}if(!s.width){q(s,"width",s.dialogwidth||r)}if(!s.height){q(s,"height",s.dialogheight||d)}if(!s.scrollbars){q(s,"scrollbars",s.scroll||k)}g="";var m=n(s);for(var t in m){if(g){g+=","}g+=m[t]+"="+s[m[t]]}}var c=window.open(e,"_blank",g+",modal=yes,dialog=yes");c.dialogArguments=b;window.onfocus=function(){var v=((document.getElementById("__spPickerHasReturnValue")!=null)&&(document.getElementById("__spPickerHasReturnValue").value=="1"))||commonModalDialogReturnValue.isSet();if(c&&!c.closed&&!v){c.focus()}else{window.onfocus=null;if(f){if(typeof(c.returnValue)!="undefined"){h=c.returnValue;f(h)}else{if(commonModalDialogReturnValue.isSet()){h=commonModalDialogReturnValue.get();f(h);commonModalDialogReturnValue.clear()}else{if(document.getElementById("__spPickerHasReturnValue")!=null&&document.getElementById("__spPickerHasReturnValue").value=="1"&&document.getElementById("__spPickerReturnValueHolder")!=null){h=document.getElementById("__spPickerReturnValueHolder").value;f(h)}}}}}}}}function setModalDialogReturnValue(b,a){if(b.opener!=null&&typeof(a)=="string"&&b.opener.document.getElementById("__spPickerHasReturnValue")!=null&&b.opener.document.getElementById("__spPickerReturnValueHolder")!=null){b.opener.document.getElementById("__spPickerHasReturnValue").value="1";b.opener.document.getElementById("__spPickerReturnValueHolder").value=a}else{setModalDialogObjectReturnValue(b,a)}}function setModalDialogObjectReturnValue(b,a){if(b.opener!=null){b.opener.commonModalDialogReturnValue.set(a)}else{b.returnValue=a}}commonModalDialogReturnValue={hasRetval:false,retVal:null,set:function(a){if(typeof(a)!="undefined"){this.retVal=a;this.hasRetval=true}},isSet:function(){return this.hasRetval},get:function(){if(this.hasRetval){return this.retVal}},clear:function(){this.hasRetval=false;this.retVal=null}};var filterTable=null;var bIsFilterMenuShown=false;var bIsFilterDataLoaded=false;var filterImageCell=null;var currentFilterMenu=null;var loadingFilterMenu=null;var ctxFilter=null;var bIsFilterKeyPress=false;var filterStr=null;var strFieldName="";var bMenuLoadInProgress=false;var strFilteredValue=null;var L_NotSortable_Text="This column type cannot be sorted";var L_NotFilterable_Text="This column type cannot be filtered";var L_AOnTop_Text="A on Top";var L_ZOnTop_Text="Z on Top";var L_SmallestOnTop_Text="Smallest on Top";var L_LargestOnTop_Text="Largest on Top";var L_OldestOnTop_Text="Oldest on Top";var L_NewestOnTop_Text="Newest on Top";var L_AttachmentsOnTop_Text="Attachments on Top";var L_BlanksOnTop_Text="Blanks on Top";var L_Ascending_Text="Ascending";var L_Descending_Text="Descending";var L_DontFilterBy_Text="Clear Filter from ^1";var L_Loading_Text="Loading....";var L_FilterMode_Text="Show Filter Choices";var L_OpenMenu_Text="Open Menu";function resetFilterMenuState(){if(bMenuLoadInProgress){return}bIsFilterMenuShown=false;bIsFilterDataLoaded=false;filterTable=null;filterImageCell=null;currentFilterMenu=null;loadingFilterMenu=null;ctxFilter=null;bIsFilterKeyPress=false}function setupFilterMenuContext(a){ctxFilter=a}function IsFilterMenuOn(){if(!bIsFilterMenuShown){return false}var a=false;a=MenuHtc_isOpen(currentFilterMenu)||MenuHtc_isOpen(loadingFilterMenu);if(!a){bIsFilterMenuShown=false}return a}function IsFilterMenuEnabled(){return true}function OnMouseOverFilterDeferCall(d){if(!IsFilterMenuEnabled()){return false}if(IsFilterMenuOn()){return false}if(window.location.href.search("[?&]Filter=1")!=-1){return false}if(d.FilterDisable=="TRUE"){return false}if(filterTable!=null){OnMouseOutFilter()}filterTable=d;var b=new Function("setupFilterMenuContext(ctx"+filterTable.getAttribute("CtxNum")+");");b();filterTable.className="ms-selectedtitle";filterTable.onclick=CreateFilterMenu;filterTable.oncontextmenu=CreateFilterMenu;filterTable.onmouseout=OnMouseOutFilter;var a=filterTable.childNodes[0].childNodes[0];filterImageCell=a.childNodes[a.childNodes.length-1];var c=filterImageCell.childNodes[0];c.src=ctxFilter.imagesPath+"menudark.gif";c.alt=L_OpenMenu_Text;c.style.visibility="visible";if(IsElementRtl(filterTable)){filterImageCell.style.right=null;filterImageCell.style.left="1px"}else{filterImageCell.style.left=null;filterImageCell.style.right="1px"}filterImageCell.className="ms-menuimagecell";return true}function OnMouseOutFilter(){if(!IsFilterMenuOn()&&filterTable!=null){filterTable.className="ms-unselectedtitle";filterTable.onclick="";filterTable.oncontextmenu="";filterTable.onmouseout="";if(filterImageCell!=null){filterImageCell.childNodes[0].style.visibility="hidden";filterImageCell.className=""}resetFilterMenuState()}}function OnFocusFilter(b){if(window.location.href.search("[?&]Filter=1")!=-1){return false}if(!IsFilterMenuEnabled()){return false}b.onblur=OnMouseOutFilter;b.onkeydown=PopFilterMenu;var a=FindSTSMenuTable(b,"CTXNum");if(a==null){return false}OnMouseOverFilter(a);return false}function PopFilterMenu(b){if(!IsFilterMenuEnabled()){return true}if(b==null){b=window.event}var a;if(browseris.nav6up){a=b.which}else{a=b.keyCode}if(!IsFilterMenuOn()&&((b.shiftKey&&a==13)||(b.altKey&&a==40))){CreateFilterMenu(b);return false}else{return true}}function CreateFilterMenu(a){if(filterTable==null||filterImageCell==null){return true}if(a==null){a=window.event}bIsFilterMenuShown=true;window.document.body.onclick="";currentFilterMenu=CMenu("filter_menu");loadingFilterMenu=CMenu("filter_menu_loading");currentFilterMenu.setAttribute("CompactMode","true");addSortMenuItems(currentFilterMenu,loadingFilterMenu);if(filterStr==null){addFilterMenuItems(currentFilterMenu,loadingFilterMenu)}else{addAdHocFilterMenuItems(currentFilterMenu,loadingFilterMenu)}a.cancelBubble=true;return false}function GetUrlWithNoSortParameters(d){var c=window.location.href;var e;var a=0;var f;var b;do{f=d.indexOf("=",a);if(f==-1){return c}e=d.substring(a,f);if(e!=""){}c=RemoveQueryParameterFromUrl(c,e);b=d.indexOf("&",f+1);if(b==-1){return c}a=b+1}while(e!="");return c}function addSortMenuItems(b,u){if(filterTable.getAttribute("Sortable")=="FALSE"||filterTable.getAttribute("SortDisable")=="TRUE"||filterTable.getAttribute("FieldType")=="MultiChoice"){CAMOptFilter(b,u,L_NotSortable_Text,"","",false,"fmi_ns");CAMSep(b);CAMSep(u);return}var d="";var r="";var a="";var e="/_layouts/"+L_Language_Text+"/images/SORTAZLang.gif";var g="/_layouts/"+L_Language_Text+"/images/SORTZALang.gif";if(filterStr==null){var q=filterTable.getAttribute("SortFields");var c=q.indexOf("&SortDir");if(c==-1){CAMOptFilter(b,u,L_NotSortable_Text,"","",false,"fmi_ns");CAMSep(b);CAMSep(u);return}var p=q.indexOf("&",c+1);var k=GetUrlWithNoSortParameters(q);k=RemovePagingArgs(k);if(k.indexOf("?")<0){k+="?"}else{k+="&"}d="SubmitFormPost('"+STSScriptEncode(k)+STSScriptEncode(q.substr(0,c)+"&SortDir=Asc"+q.substr(p))+"');";r="SubmitFormPost('"+STSScriptEncode(k)+STSScriptEncode(q.substr(0,c)+"&SortDir=Desc"+q.substr(p))+"');";var a=filterTable.getAttribute("FieldType");strFieldName=filterTable.getAttribute("Name")}else{var f=" ";var n=filterStr.lastIndexOf(f);a=filterStr.substring(n+1);if(a.substring(0,2)=="x:"){a=a.substring(2)}var h=filterStr.substring(0,n);n=h.lastIndexOf(f);strFieldName=h.substring(n+1);if(strFieldName.substring(0,1)=="@"){strFieldName=strFieldName.substring(1)}h=filterStr.substring(0,n);n=h.lastIndexOf(f);if(n>0){strFieldName=h.substring(0,n)}var s=filterTable.childNodes[0].childNodes[0];var t=s.childNodes[0].childNodes[0];var l=t.href;l=l.replace(/%20/g," ");if(l.indexOf("'ascending'")>0){d=l;r=l.replace("'ascending'","'descending'")}else{r=l;d=l.replace("'descending'","'ascending'")}}a=a.toLowerCase();if(a=="dateTime"){CAMOptFilter(b,u,L_OldestOnTop_Text,d,e,true,"fmi_asc");CAMOptFilter(b,u,L_NewestOnTop_Text,r,g,true,"fmi_desc")}else{if(a=="integer"||a=="number"||a=="currency"){CAMOptFilter(b,u,L_SmallestOnTop_Text,d,e,true,"fmi_asc");CAMOptFilter(b,u,L_LargestOnTop_Text,r,g,true,"fmi_desc")}else{if(a=="text"||a=="user"||a=="string"){CAMOptFilter(b,u,L_AOnTop_Text,d,e,true,"fmi_asc");CAMOptFilter(b,u,L_ZOnTop_Text,r,g,true,"fmi_desc")}else{if(a=="calculated"){var o=filterTable.getAttribute("ResultType");if(o=="Number"||o=="Currency"){CAMOptFilter(b,u,L_SmallestOnTop_Text,d,e,true,"fmi_asc");CAMOptFilter(b,u,L_LargestOnTop_Text,r,g,true,"fmi_desc")}else{if(o=="dateTime"){CAMOptFilter(b,u,L_OldestOnTop_Text,d,e,true,"fmi_asc");CAMOptFilter(b,u,L_NewestOnTop_Text,r,g,true,"fmi_desc")}else{if(o=="boolean"){CAMOptFilter(b,u,L_Ascending_Text,d,e,true,"fmi_asc");CAMOptFilter(b,u,L_Descending_Text,r,g,true,"fmi_desc")}else{CAMOptFilter(b,u,L_AOnTop_Text,d,e,true,"fmi_asc");CAMOptFilter(b,u,L_ZOnTop_Text,r,g,true,"fmi_desc")}}}}else{if(a=="attachments"){CAMOptFilter(b,u,L_BlanksOnTop_Text,d,e,true,"fmi_asc");CAMOptFilter(b,u,L_AttachmentsOnTop_Text,r,g,true,"fmi_desc")}else{if(a=="lookup"){var m=filterTable.getAttribute("Name");if(m=="Last_x0020_Modified"||m=="Created_x0020_Date"){CAMOptFilter(b,u,L_OldestOnTop_Text,d,e,true,"fmi_asc");CAMOptFilter(b,u,L_NewestOnTop_Text,r,g,true,"fmi_desc")}else{CAMOptFilter(b,u,L_Ascending_Text,d,e,true,"fmi_asc");CAMOptFilter(b,u,L_Descending_Text,r,g,true,"fmi_desc")}}else{CAMOptFilter(b,u,L_Ascending_Text,d,e,true,"fmi_asc");CAMOptFilter(b,u,L_Descending_Text,r,g,true,"fmi_desc")}}}}}}CAMSep(b);CAMSep(u)}function CAMOptFilter(g,b,d,c,h,e,f){var a;a=CAMOpt(g,d,c,h);a.id=f;if(!e){a.setAttribute("enabled","false")}a=CAMOpt(b,d,c,h);a.id=f+"_p";if(!e){a.setAttribute("enabled","false")}}function ShowFilterLoadingMenu(){if(!bIsFilterDataLoaded){OMenu(loadingFilterMenu,filterTable,null,null,-1)}}function addFilterMenuItems(b,e){var m;if(filterTable.getAttribute("Filterable")=="FALSE"||filterTable.getAttribute("FieldType ")=="Note"||filterTable.getAttribute("FieldType ")=="URL"){m=CAMOpt(b,L_NotFilterable_Text,"");m.setAttribute("enabled","false");OMenu(b,filterTable,null,null,-1);b._onDestroy=OnMouseOutFilter;return}var k=document.getElementById("FilterIframe"+filterTable.getAttribute("CtxNum"));if(k==null){return}var d=k.getAttribute("FilterLink");var f=escapeProperly(filterTable.getAttribute("Name"));strFilteredValue=null;var c="";var l=0;var a;do{l++;a=d.match("FilterField"+l+"=[^&]*&FilterValue"+l+"=[^&]*");if(a!=null){if(strFilteredValue==null){strFilteredValue=getFilterValueFromUrl(a.toString(),f)}c=c+"&"+a}}while(a);var o=(strFilteredValue!=null);strDisplayText=StBuildParam(L_DontFilterBy_Text,filterTable.getAttribute("DisplayName"));var h="javascript:SubmitFormPost('"+STSScriptEncode(FilterFieldV3(ctxFilter.view,f,"",0,true))+"')";var g;if(o){g=ctxFilter.imagesPath+"FILTEROFF.gif"}else{g=ctxFilter.imagesPath+"FILTEROFFDISABLED.gif"}CAMOptFilter(b,e,strDisplayText,h,g,o,"fmi_clr");m=CAMOpt(e,L_Loading_Text,"");m.setAttribute("enabled","false");setTimeout("ShowFilterLoadingMenu()",500);e._onDestroy=OnMouseOutFilter;a=d.match("MembershipGroupId=[^&]*");if(a!=null){c=c+"&"+a}var n="";a=d.match("RootFolder=[^&]*");if(a!=null){n="&"+a}if(browseris.safari){k.src="/_layouts/blank.htm";k.style.offsetLeft="-550px";k.style.offsetTop="-550px";k.style.display="block"}k.src=ctxFilter.HttpRoot+"/_layouts/filter.aspx?ListId="+ctxFilter.listName+n+"&FieldInternalName="+f+"&ViewId="+ctxFilter.view+"&FilterOnly=1&Filter=1"+c;bMenuLoadInProgress=true}function getFilterValueFromUrl(f,c){var b,a;var d;b=f.indexOf("=");if(b==-1){return}a=f.indexOf("&");if(a==-1){return}if(a<b){return}f=CanonicalizeUrlEncodingCase(f);d=f.substring(b+1,a);if(d==c){var e;b=f.indexOf("=",a+1);if(b==-1){return}e=f.substr(b+1);e=unescapeProperly(e);return e}return null}function OnIframeLoad(){bMenuLoadInProgress=false;if(filterTable!=null&&filterTable.getAttribute("Name")!=null){var e=window.frames["FilterIframe"+filterTable.getAttribute("CtxNum")];if(e!=null){var a=filterTable.getAttribute("Name");var l=e.document.getElementById("diidFilter"+a);a=escapeProperly(a);if(l!=null){var k=l.childNodes.length;if(k>500){addFilterOptionMenuItem()}else{var b=l.childNodes;for(var f=1;f<k;f++){var h;if(b[f].innerText){h=b[f].innerText}else{if(b[f].textContent){h=b[f].textContent}else{h=b[f].innerHTML}}var d="javascript:SubmitFormPost('"+STSScriptEncode(FilterFieldV3(ctxFilter.view,a,b[f].value,f,true))+"')";var g=CAMOpt(currentFilterMenu,h,d);if(strFilteredValue!=null&&strFilteredValue==b[f].value){g.setAttribute("checked","true")}}}}else{addFilterOptionMenuItem()}bIsFilterDataLoaded=true;if(loadingFilterMenu!=null){loadingFilterMenu._onDestroy=null}if(currentFilterMenu!=null){currentFilterMenu._onDestroy=OnMouseOutFilter;OMenu(currentFilterMenu,filterTable,null,null,-1)}}}}function addFilterOptionMenuItem(){var a=window.location.href;a=StURLSetVar2(a,"Filter","1");a=StURLSetVar2(a,"View",ctxFilter.view);a="javascript:SubmitFormPost('"+a+"')";CAMOpt(currentFilterMenu,L_FilterMode_Text,a)}function OnMouseOverAdHocFilterDeferCall(c,b){filterStr=b;if(!browseris.ie55up||!browseris.win32){return false}if(IsFilterMenuOn()){return false}if(filterTable!=null){OnMouseOutFilter()}filterTable=c;filterTable.className="ms-selectedtitle";filterTable.onclick=CreateFilterMenu;filterTable.oncontextmenu=CreateFilterMenu;filterTable.onmouseout=OnMouseOutFilter;var a=filterTable.children[0].children[0];filterImageCell=a.children[a.children.length-1];filterImageCell.children[0].src="/_layouts/images/menudark.gif";filterImageCell.children[0].style.visibility="visible";filterImageCell.style.visibility="visible";filterImageCell.className="ms-menuimagecell";return true}function addAdHocFilterMenuItems(c,b){var a=CAMOpt(b,L_Loading_Text,"");a.setAttribute("enabled","false");OMenu(b,filterTable,null,null,-1);b._onDestroy=OnMouseOutFilter;DoCallBack("__filter={"+filterStr+"}")}function UpdateFilterCallback(f,n){var o="</OPTION>";var g=-1;g=f.indexOf(o,g+1);var e=f.lastIndexOf(">",g);var b=StBuildParam(L_DontFilterBy_Text,strFieldName);var d;var c="";if(e<g-1){var l=f.lastIndexOf('"',g);if(l>0){var m=f.lastIndexOf('"',l-1);if(m>0){c=f.substring(m+1,l)}}}if(e==g-1){d="/_layouts/images/FILTEROFFDISABLED.gif"}else{d="/_layouts/images/FILTEROFF.gif"}if(g>0){var h=CAMOpt(currentFilterMenu,b,c,d);h.setAttribute("enabled",e==g-1?"false":"true");var l=g;var a='<OPTION href="';g=f.indexOf(o,g+8);while(g>0){e=f.indexOf(a,l+8);e=f.indexOf('"',e+20);if(e>0&&e<g){var k=f.substring(e+2,g);var c="";l=f.lastIndexOf('"',e);if(l>0){var m=f.lastIndexOf('"',l-1);if(m>0){c=f.substring(m+1,l);c=c.replace(/&amp;/g,"&")}}if(k.length>40){k=k.substring(0,40)+"..."}if(k.length>0){CAMOpt(currentFilterMenu,k,c)}}l=g;g=f.indexOf(o,g+8)}}else{var h=CAMOpt(currentFilterMenu,L_NotFilterable_Text,"");h.setAttribute("enabled","false");OMenu(currentFilterMenu,filterTable,null,null,-1);return}loadingFilterMenu._onDestroy=null;OMenu(currentFilterMenu,filterTable,null,null,-1);currentFilterMenu._onDestroy=OnMouseOutFilter}function OnClickFilter(d,c){var f=FindSTSMenuTable(d,"CTXNum");if(f!=null&&f.getAttribute("SortFields")!=null){var b=f.getAttribute("SortFields");var a=GetUrlWithNoSortParameters(b);a=RemovePagingArgs(a);if(a.indexOf("?")<0){a+="?"}else{a+="&"}SubmitFormPost(a+b)}if(!bIsFileDialogView){c.cancelBubble=true}return false}function ToggleSelectionAllUsers(a){var f=document.getElementById("spToggleUserSelectionCheckBox_"+a.toString());if(f!=null){var c="spUserSelectionCheckBox_"+a.toString();var h=document.getElementsByName(c);f.checked=!f.checked;for(var e=0;e<h.length;e++){var g=h[e];g.checked=f.checked}var d="cbxUserSelectAll"+a.toString();var b=document.getElementById(d);if(b!=null){if(f.checked){b.src="/_layouts/images/checkall.gif"}else{b.src="/_layouts/images/unchecka.gif"}}}}function UserSelectionOnClick(h,d){var c="cbxUserSelectAll"+d.toString();var f=document.getElementById(c);var k=document.getElementById("spToggleUserSelectionCheckBox_"+d.toString());if(!h.checked){if(k!=null){k.checked=false}if(f!=null){f.src="/_layouts/images/unchecka.gif"}}else{var a="spUserSelectionCheckBox_"+d.toString();var b=document.getElementsByName(a);var g=true;for(var e=0;e<b.length;e++){var l=b[e];if(!l.checked){g=false;break}}if(g){if(f){f.src="/_layouts/images/checkall.gif"}if(k){k.checked=true}}}}var g_menuCounter=0;var g_oSelRw=null;var g_iEntityEditorLineHeight=16;var g_EntityEditorHiddenEntityKeyId="HiddenEntityKey";var g_EntityEditorHiddenEntityDisplayTextId="HiddenEntityDisplayText";var g_EntityEditorShowEntityDisplayTextInTextBox="ShowEntityDisplayTextInTextBox";var g_EntityEditorDownLevelId="downlevelTextBox";var g_EntityEditorUpLevelId="upLevelDiv";var g_EntityEditorHiddenId="hiddenSpanData";var g_EntityEditorCheckNamesId="checkNames";var g_EntityEditorOuterTableId="OuterTable";var g_EntityEditorErrorLabelId="errorLabel";var g_EntityEditorResultTableId="resultTable";var g_EntityEditorResultTableAttrEditorId="EditorControlClientId";function onKeyDownRw(k,g,c,h,f){if(!f){f=window.event}var a=f.keyCode;if((f.shiftKey&&a==13)||(f.altKey&&a==40)){onClickRw(true,false);canEvt(f);return}if(h==false){if(a!=8&&a!=46&&a!=37&&a!=39&&a!=9){canEvt(f)}else{if(autoPostBackEnabled(k)){schedulePostBack()}}PickerAdjustHeight(g,c)}else{PickerAdjustHeight(g,c);if((f.ctrlKey&&a==75)||(!f.ctrlKey&&!f.altKey&&!f.shiftKey&&(a==13))){canEvt(f);var d=getSubControlID(g,g_EntityEditorCheckNamesId);var b=document.getElementById(d);if(b){b.click()}}}}function onKeyUpRw(a){copyUplevelToHidden(a)}function onMouseDownRw(){if(event.button==2){g_oSelRw=document.selection.createRange()}}function onContextMenuSpnRw(){var a=g_oSelRw;var b=document.selection.createRange();if(a.text==""){ret=onClickRw(false,false)}else{if(a.inRange(b)){a.select()}else{onClickRw(false,false)}}return false}function canEvt(a){if(a==null){a=event}a.returnValue=false;a.cancelBubble=true}function copyUplevelToHidden(b){if(document.getElementById(b)==null){return}updateControlValue(b);var g=document.getElementById(getSubControlID(b,g_EntityEditorUpLevelId));var e=document.getElementById(getSubControlID(b,g_EntityEditorHiddenId));var a=g.childNodes;for(i=0;i<a.length;i++){if(a[i].tagName!="SPAN"&&a[i].nodeType!=3){if(a[i].tagName=="A"){var d=document.body.createTextRange();d.moveToElementText(a[i]);d.execCommand("Unlink")}else{var f=document.createTextNode(a[i].innerText);a[i].replaceNode(f)}}}if(EntityEditor_UseContentEditableControl){e.value=g.innerHTML}else{var c=document.getElementById(getSubControlID(b,g_EntityEditorDownLevelId));e.value=c.value}}function getUplevel(b){if(EntityEditor_UseContentEditableControl){var e=document.getElementById(getSubControlID(b,g_EntityEditorUpLevelId));var a=e.childNodes;for(i=0;i<a.length;i++){if(a[i].tagName!="SPAN"&&a[i].nodeType!=3){var d=document.createTextNode(a[i].innerText);a[i].replaceNode(d)}}return e.innerHTML}var c=document.getElementById(getSubControlID(b,g_EntityEditorDownLevelId));return c.value}function EntityEditorHasData(b){if(EntityEditor_UseContentEditableControl){var d=document.getElementById(getSubControlID(b,g_EntityEditorUpLevelId));var a=d.childNodes;if(a.length>0){return true}}else{var c=document.getElementById(getSubControlID(b,g_EntityEditorDownLevelId));if(c.value!=null&&c.value.length>0){return true}}return false}function EEDecodeSpecialChars(b){var a=b.replace(/&quot;/g,'"');a=a.replace(/&gt;/g,">");a=a.replace(/&lt;/g,"<");a=a.replace(/&#39;/g,"'");a=a.replace(/&amp;/g,"&");return a}function onClickRw(p,s){var b=document.selection.createRange();var g=b.parentElement();var o=null;if(g.tagName=="SPAN"&&g.id=="content"){o=g.parentElement}else{if(g.tagName=="SPAN"&&g.id.substring(0,4)=="span"&&!s){o=g}}if(o!=null){b.moveToElementText(o);var u="character";b.moveStart(u,-1);b.moveEnd(u,1);b.select();g_oSelRw=b;var t=o.children("divEntityData");var n=t.getAttribute("isresolved");if(n=="False"){var m=o;if(m.getBoundingClientRect().right>m.parentElement.getBoundingClientRect().right){m=m.parentElement}var r=o.parentElement.id.replace("_upLevelDiv","");var k=t.getAttribute("key");var d=DeferCall("CMenu","Entity_Menu"+g_menuCounter);g_menuCounter++;var f=null;if(matches[r]!=null&&matches[r][k]!=null){f=matches[r][k]}var a=document.getElementById(r);var e=a.getAttribute("MoreItemsText");var q=a.getAttribute("RemoveText");var l=a.getAttribute("NoMatchesText");if(f==null||f.childNodes.length==0){CAMOpt(d,l)}else{for(x=0;x<f.childNodes.length;x++){var h=f.childNodes[x];CAMOpt(d,h.getAttribute("DisplayText"),"EEReplace('"+STSScriptEncode(r)+"', '"+STSScriptEncode(k)+"', "+x+");")}}CAMSep(d);CAMOpt(d,q,"EERemove();");CAMOpt(d,e,"EEShowMore('"+STSScriptEncode(r)+"', '"+STSScriptEncode(k)+"');");OMenu(d,m,null,null,-1)}}}function EEShowMore(b,a){DeferCall("__Dialog__"+b,a)}function EEReplace(f,b,e){var a=matches[f][b].childNodes[e];var d=ConvertEntityToSpan("",a);g_oSelRw.pasteHTML(d);PickerAdjustHeight(f,g_maxheight[f]);var c=document.getElementById(getSubControlID(f,"downlevelTextBox"));if(c!=null&&autoPostBackEnabled(c)){schedulePostBack()}}function EERemove(){g_oSelRw.select();document.selection.clear()}var g_maxheight=new Array();function EntityEditorSetWaitCursor(a){if(document.getElementById(a)==null){return}var b=document.getElementById(getSubControlID(a,g_EntityEditorOuterTableId));if(b!=null){b.style.cursor="wait"}}function EntityEditorClearWaitCursor(a){if(document.getElementById(a)==null){return}var b=document.getElementById(getSubControlID(a,g_EntityEditorOuterTableId));if(b!=null){b.style.cursor=""}}function EntityEditorHandleCheckNameResult(a,b){EntityEditorClearWaitCursor(b);EntityEditorCallback(a,b)}function EntityEditorHandleCheckNameError(b,a){EntityEditorClearWaitCursor(a);var c=document.getElementById(getSubControlID(a,g_EntityEditorErrorLabelId));if(c){c.innerHTML=STSHtmlEncode(b)}}function EntityEditorCallback(result,ctx,preventAutoPostBack){if(document.getElementById(ctx)==null){return}var editor=document.getElementById(ctx);var errorControl=document.getElementById(getSubControlID(ctx,"errorLabel"));var xmlDoc;if(document.implementation&&document.implementation.createDocument){xmlDoc=(new DOMParser()).parseFromString(result,"text/xml")}else{xmlDoc=new ActiveXObject("Microsoft.XMLDOM");xmlDoc.async=false;xmlDoc.loadXML(result)}var entities=xmlDoc.documentElement;var separator=entities.getAttribute("Separator");if(separator==null){separator=String.fromCharCode(0)}var append=entities.getAttribute("Append");var maxHeight=entities.getAttribute("MaxHeight");g_maxheight[ctx]=maxHeight;var spanData="";var downlevelData="";if(append=="False"){errorControl.innerHTML=STSHtmlEncode(entities.getAttribute("Error"))}for(x=0;x<entities.childNodes.length;x++){var entity=entities.childNodes[x];spanData+=ConvertEntityToSpan(ctx,entity);if(x==0&&editor.getAttribute(g_EntityEditorShowEntityDisplayTextInTextBox)=="1"){downlevelData+=entity.getAttribute("DisplayText");document.getElementById(getSubControlID(ctx,g_EntityEditorHiddenEntityKeyId)).value=entity.getAttribute("Key");document.getElementById(getSubControlID(ctx,g_EntityEditorHiddenEntityDisplayTextId)).value=entity.getAttribute("DisplayText")}else{downlevelData+=entity.getAttribute("Key")}if(spanData!=""&&x+1!=entities.childNodes.length){spanData+=separator+" ";downlevelData+=separator+" "}}var uplevel=document.getElementById(getSubControlID(ctx,g_EntityEditorUpLevelId));var downlevel=document.getElementById(getSubControlID(ctx,g_EntityEditorDownLevelId));var shouldPostBack=(preventAutoPostBack==null||!preventAutoPostBack)&&autoPostBackEnabled(uplevel);var shouldNotifyChange=(uplevel.innerHTML!=spanData);if(append=="True"&&uplevel.innerHTML!=""){uplevel.innerHTML+=separator+" "+spanData;downlevel.value+=separator+" "+downlevelData}else{shouldPostBack=shouldPostBack&&uplevel.innerHTML!=spanData&&spanData.indexOf("ms-entity-resolved")!=-1;downlevel.value=downlevelData;uplevel.innerHTML=spanData}if((shouldNotifyChange)&&(!shouldPostBack)&&(downlevel.onvaluesetfrompicker)){if(typeof(downlevel.onvaluesetfrompicker)=="function"){downlevel.onvaluesetfrompicker()}else{eval(downlevel.onvaluesetfrompicker)}}updateControlValue(ctx);PickerAdjustHeight(ctx,maxHeight);if(shouldPostBack){schedulePostBack()}var cbScript=editor.getAttribute("EEAfterCallbackClientScript");if(cbScript!=null&&cbScript!=""){if(preventAutoPostBack==undefined||preventAutoPostBack==false){var timeoutScript=cbScript+"('"+STSScriptEncode(ctx)+"', '"+STSScriptEncode(result)+"')";setTimeout(timeoutScript,500)}}}function updateControlValue(b){if(document.getElementById(b)==null){return}var c=document.getElementById(getSubControlID(b,g_EntityEditorUpLevelId));var a=document.getElementById(b);a.value=((c.innerHTML!="")?"true":"");CheckOk(b)}function CheckOk(b){var a=document.getElementById(b);if(a==null){return}var d=false;if(a.getAttribute("allowEmpty")=="1"){d=true}var c=document.getElementById(getSubControlID(b,g_EntityEditorUpLevelId));if(c.innerHTML!=""){if(self.enableOK!=null){enableOK()}}else{if(self.disableOK!=null&&!d){disableOK()}}}var matches=new Array();function ConvertEntityToSpan(m,d){if(matches[m]==null){matches[m]=new Array()}var l=d.getAttribute("Key");var h=d.getAttribute("DisplayText");var f=d.getAttribute("IsResolved");var k=d.getAttribute("Description");var b="ms-entity-unresolved";if(f=="True"){b="ms-entity-resolved"}var g="<span id='span"+STSHtmlEncode(l)+"' tabindex='-1' contentEditable='false' class='"+b+"' ";g+="title='"+STSHtmlEncode(k)+"'>";g+="<div style='display:none;' id='divEntityData' ";g+="key='"+STSHtmlEncode(l)+"' displaytext='"+STSHtmlEncode(h)+"' isresolved='"+STSHtmlEncode(f)+"' ";g+="description='"+STSHtmlEncode(k)+"'>";var a=EntityEditor_SelectSingleNode(d,"MultipleMatches");matches[m][l]=a;var c=EntityEditor_SelectSingleNode(d,"ExtraData");if(c){var e;if(c.firstChild){e=c.firstChild.xml}if(!e){e=c.innerXml||c.innerHTML}if(!e){e=""}g+="<div data='"+STSHtmlEncode(e)+"'></div>"}else{g+="<div data=''></div>"}g+="</div>";g+="<span id='content' tabindex='-1' contenteditable onMouseDown='onMouseDownRw();' onContextMenu='onContextMenuSpnRw();' >";if(h!=""){g+=STSHtmlEncode(h)}else{g+=STSHtmlEncode(l)}g+="</span></span>";return g}function PickerAdjustHeight(b,c){var a=document.getElementById(b);if(a==null){return}var e=document.getElementById(getSubControlID(b,g_EntityEditorDownLevelId));var f=document.getElementById(getSubControlID(b,g_EntityEditorUpLevelId));var d=e.rows;PickerAdjustHeight2(e,d,c);PickerAdjustHeight2(f,d,c)}function PickerAdjustHeight2(d,f,e){var b=e;if(d!=null){var h=d.scrollHeight;var a=d.clientHeight;var g=d.offsetHeight;if(h==0){h=13;a=14;g=18}var c=b*g_iEntityEditorLineHeight;h=((h<f*g_iEntityEditorLineHeight)?f*g_iEntityEditorLineHeight:h);if(a!=h&&(h<=c||a<c)){d.style.height=g+((h>c)?c:h)-a}else{if(a>c){d.style.height=c}}}}function docopy(){var a=document.selection.createRange();window.clipboardData.setData("Text",a.text);window.event.returnValue=false;return false}function dopaste(){var a=document.selection.createRange();window.event.returnValue=false;a.text=window.clipboardData.getData("Text");return false}function getSubControlID(b,a){return b+"_"+a}var nav4=window.Event?true:false;var selected=new Array(0);var lastSelected;function PickerDialogSetClearState(){selected=new Array(0);lastSelected=null;PickerDialogUpdateAddSelectionButton()}function singleselectevent(b){if(!b){b=window.event}var a=null;if(nav4){a=b.target.parentNode||b.currentTarget.parentNode}else{a=b.srcElement;if(a.tagName=="TD"){a=a.parentElement}}while(a.tagName!="TR"){a=a.parentNode}addSelection(a,true,true);lastSelected=a;addSelected_Click();PickerDialogUpdateAddSelectionButton();return false}function multiselectevent(g){if(!g){g=window.event}var c=false;var a=false;a=g.ctrlKey;c=g.shiftKey;var b=null;if(nav4){b=g.target.parentNode||g.currentTarget.parentNode}else{b=g.srcElement;if(b.tagName=="TD"){b=b.parentElement}}while(b.tagName!="TR"){b=b.parentNode}if(c==false){if(a==false){setSelectedColor(false);selected=new Array(0)}lastSelected=b;var l=-1;for(i=0;i<selected.length;i++){if(selected[i]==b){l=i;i=selected.length}}if(l==-1){selected=selected.concat(new Array(b))}else{setSelectedRowColor(selected[l],false);selected.splice(l,1)}}else{setSelectedColor(false);selected=new Array(0);var k;if(nav4){k=b.parentNode}else{k=b.parentElement}var d;var f;var h=k.rows;if(lastSelected==null){lastSelected=h[1]}for(i=1;i<h.length;i++){if(h[i]==b){d=i}if(h[i]==lastSelected){f=i}if(d!=null||f!=null){selected=selected.concat(new Array(h[i]))}if(d!=null&&f!=null){i=h.length}}}setSelectedColor(true);PickerDialogUpdateAddSelectionButton();return false}function setSelectedRowColor(d,a){for(var c=0;c<d.childNodes.length;c++){var b=d.childNodes[c].className;if(a){b="ms-pb-selected"}else{b="ms-pb"}d.childNodes[c].className=b}}function setSelectedColor(a){for(i=0;i<selected.length;i++){setSelectedRowColor(selected[i],a)}}function IsSearchResultRow(a){if(a==null||a.className=="ms-pickersearchsummarytr"||a.className=="ms-pickeremptyresulttexttr"||a.className=="ms-pickerresultheadertr"){return false}return true}function tableKeyDown(b,a,c){if(b.rows.length<=1){return}if(!c){c=window.event}if(c.ctrlKey&&c.keyCode==65&&a==true){for(x=1;x<b.rows.length;x++){if(IsSearchResultRow(b.rows[x])){addSelection(b.rows[x],false,false)}}return false}if(c.keyCode==13){addSelected_Click();if(a==false&&selected.length>0&&self.doClickOK!=null&&typeof(self.doClickOK)=="function"){window.setTimeout("doClickOK();",100)}}if(c.keyCode==40||c.keyCode==38){var d=b.rows[1];if(c.keyCode==40){if(lastSelected!=null&&IsSearchResultRow(lastSelected.nextSibling)){d=lastSelected.nextSibling}}if(c.keyCode==38){if(lastSelected!=null&&IsSearchResultRow(lastSelected.previousSibling)){d=lastSelected.previousSibling}if(d==b.rows[0]){d=b.rows[1]}}if(IsSearchResultRow(d)){if(a==true&&c.shiftKey){addSelection(d,false,true)}else{addSelection(d,true,true)}if(d!=null){lastSelected=d}if(a==false){addSelected_Click()}return false}}PickerDialogUpdateAddSelectionButton()}function addSelection(c,a,b){if(c==null){return}if(a==true){setSelectedColor(false);selected=new Array(0)}selected=selected.concat(new Array(c));setSelectedColor(true);if(b&&c.focus){c.focus()}PickerDialogUpdateAddSelectionButton()}function autoPostBackEnabled(b){var a=(b==null)?null:b.attributes.getNamedItem("AutoPostBack");return(a!=null&&a.value=="1")}function schedulePostBack(){window.setTimeout("__doPostBack('','')",0)}function saveOldEntities(a){var b=document.getElementById(a);if(b!=null&&autoPostBackEnabled(b)){b.oldEntities=getEntityKeysFromElement(a)}}function postbackIfEntitiesChanged(b){var c=document.getElementById(b);if(c==null){return false}var e=c.oldEntities;c.oldEntities=null;var d=getEntityKeysFromElement(b);var a=false;if(autoPostBackEnabled(c)){if((e==null&&d!=null)||(e!=null&&d==null)||(e.length!=d.length)){a=true}else{for(i=0;!a&&i<e.length;i++){if(e[i]!=d[i]){a=true}}}}if(a){schedulePostBack()}}function getEntityKeysFromElement(b){var d=document.getElementById(b);var f=new Array();var e=0;for(x=0;d!=null&&x<d.childNodes.length;x++){var h=d.childNodes[x];if(h.attributes!=null){var g=h.attributes.getNamedItem("class");if(g!=null&&g.value=="ms-entity-resolved"){var a=h.children("divEntityData");if(a!=null&&a.getAttribute("key")!=null){f[e]=a.getAttribute("key");e++}}}}return f.sort()}function EntityEditor_SelectSingleNode(c,b){if(document.implementation&&document.implementation.createDocument){var a=c.getElementsByTagName(b);if(a.length>0){return a[0]}return null}else{return c.selectSingleNode(b)}}function PickerDialogCallbackContext(){this.queryTextBoxElementId=null;this.resultTableId=null;this.errorElementId=null;this.htmlMessageElementId=null;this.queryButtonElementId=null}function PickerDialogSetFocusDelay(b,a){setTimeout("if (document.getElementById('"+b+"') !=null) { try {document.getElementById('"+b+"').focus(); } catch(e) {} }",a)}function PickerDialogHandleQueryResult(c,h){var k=ParseMultiColumnValue(c);var a=parseInt(k[0]);var d=document.getElementById(h.errorElementId);d.innerHTML=STSHtmlEncode(k[1]);var f=document.getElementById(h.htmlMessageElementId);f.innerHTML=k[2];var b=document.getElementById(h.queryButtonElementId);if(b!=null){SetControlDisabledStatus(b,false)}var g=document.getElementById(h.resultTableId);var e;if(nav4){e=g.parentNode}else{e=g.parentElement}e.innerHTML=k[3];if(a>0){PickerDialogSetFocusDelay(h.resultTableId+"_row0_Link",200)}else{PickerDialogSetFocusDelay(h.queryTextBoxElementId,200)}}function PickerDialogHandleQueryError(b,k){var d=document.getElementById(k.errorElementId);d.innerHTML=STSHtmlEncode(b);var f=document.getElementById(k.htmlMessageElementId);f.innerHTML="";var a=document.getElementById(k.queryButtonElementId);if(a!=null){SetControlDisabledStatus(a,false)}var h=document.getElementById(k.resultTableId);var g;if(nav4){g=h.parentNode}else{g=h.parentElement}g.innerHTML="<table id='"+k.resultTableId+"' width='100%' height='100%'>   <tr>                                                                  <td>                                                               </td>                                                           </tr>                                                             </table>";var l=document.getElementById(k.queryTextBoxElementId);try{l.focus()}catch(c){}}function PickerDialogShowWait(a){var d=document.getElementById(a.errorElementId);if(d!=null){d.innerHTML=""}d=document.getElementById(a.htmlMessageElementId);if(d!=null){d.innerHTML=""}d=document.getElementById(a.queryButtonElementId);if(d!=null){SetControlDisabledStatus(d,true)}var f=document.getElementById(a.resultTableId);if(f!=null){var c;if(nav4){c=f.parentNode}else{c=f.parentElement}var b="Query in progress. Please wait...";var e="Please wait while your query is processed.";c.innerHTML="<table id='"+a.resultTableId+"' class='ms-pickerwait'> <tr>                                                                  <td width='100%' height='100%' align='center' valign='middle'>          <table width='100%'>                                                  <tr>                                                                   <td align='center' valign='middle'>                                    <img alt='"+b+"' src='/_layouts/images/gears_an.gif' >                </td>                                                          </tr>                                                              <tr>                                                                   <td align='center'>&nbsp;</td>                                 </tr>                                                              <tr class='ms-pickerwaittexttr'>                                         <td align='center' class='ms-descriptiontext'>                         "+e+"                </td>                                                          </tr>                                                          </table>                                                       </td>                                                           </tr>                                                             </table>"}}function PickerResultsMultiSelectOnDblClick(d){var c=document.getElementById(g_EntityEditorResultTableId);var b=d.getAttribute("entityXml");var a=c.getAttribute(g_EntityEditorResultTableAttrEditorId);EntityEditorCallback(b,a)}function PickerResultsSingleSelectOnClick(d){var c=document.getElementById(g_EntityEditorResultTableId);var b=d.getAttribute("entityXml");var a=c.getAttribute(g_EntityEditorResultTableAttrEditorId);EntityEditorCallback(b,a)}function PickerResultsSingleSelectOnDblClick(d){var c=document.getElementById(g_EntityEditorResultTableId);var b=d.getAttribute("entityXml");var a=c.getAttribute(g_EntityEditorResultTableAttrEditorId);EntityEditorCallback(b,a);if(self.doClickOK!=null&&typeof(self.doClickOK)=="function"){doClickOK()}}function PickerResultsMultiSelectOnNameClick(b,a){var c=b;while(c.tagName!="TR"){c=c.parentNode}PickerResultsMultiSelectOnDblClick(c);return true}function PickerResultsSingleSelectOnNameClick(b,a){var c=b;while(c.tagName!="TR"){c=c.parentNode}PickerResultsSingleSelectOnDblClick(c);return true}function PickerResultsNameOnFocus(a){var b=a;while(b.tagName!="TR"){b=b.parentNode}addSelection(b,true,false);lastSelected=b}function PickerResultsNameOnKeyDown(b,a){if(a!=null&&a.keyCode==13){return false}return true}function MSOWebPartPage_GetLocalizedStrings(){var o="You are about to reset all personalized Web Parts to their shared values and delete any private Web Parts. Click OK to complete this operation. Click Cancel to keep your personalized Web Part settings and private Web Parts.";var v="Resetting this Web Part will cause you to lose any changes you made.  Are you sure you want to do this? To reset this Web Part, click OK. To keep your changes, click Cancel.";var t="Are you sure you want to remove the connection between the %0 Web Part and the %1 Web Part? To remove the connection, click OK. To keep the connection, click Cancel.";var g="This Web Part Page has been personalized. As a result, one or more Web Part properties may contain confidential information. Make sure the properties contain information that is safe for others to read. After exporting this Web Part, view properties in the Web Part description file (.webpart or .dwp) by using a text editor, such as Microsoft Notepad.";var r="Cannot retrieve properties at this time.";var f="Changes have been made to the contents of one or more Web Parts on this page. To save the changes, press OK.  To discard the changes, press Cancel.";var z="Widen";var b="Narrow";var n="Expand Toolpart: %0";var e="Collapse Toolpart: %0";var w="Web Part Background Color";var p="Transparent Web Part Background Color";var h="The URL is not valid for the %0 property. Check the URL spelling and path and try again.";var a="The path to the folder is not valid for the %0 property. Check the path name and try again.";var c="The path to the file or folder is not valid. Check the path and try again.";var k="The current browser does not support links to files or folders. To specify a link to a file or folder, you must use Microsoft Internet Explorer 5.0 or later";var q="Link";var y="Transparent";var m="Cannot save your changes.";var u="Access Denied saving Web Part properties: either the Web Part is embedded directly in the page, or you do not have sufficient permissions to save properties.";var d="Cannot create or modify the connection. One of the Web Parts does not have any data fields.";var l=new Object();l.ResetPagePersonalizationDialogText=o;l.ResetPartPersonalizationDialogText=v;l.RemoveConnection=t;l.ExportPersonalizationDialogText=g;l.GetPropertiesFailure=r;l.SaveDirtyPartsDialogText=f;l.ToolPaneWidenToolTip=z;l.ToolPaneShrinkToolTip=b;l.ToolPartExpandToolTip=n;l.ToolPartCollapseToolTip=e;l.WebPartBackgroundColor=w;l.TransparentTooltip=p;l.InvalidURLPath=h;l.InvalidFolderPath=a;l.InvalidFilePath=c;l.FileOrFolderUnsupported=k;l.Link=q;l.TransparentLiteral=y;l.ContentEditorSaveFailed=m;l.AccessDenied=u;l.NoInitArgs=d;return l}var MSOStrings=MSOWebPartPage_GetLocalizedStrings();var L_AccessibleMenu_Text="Menu";function FNEmpWz(a){return(a&&a!="")}function AChld(a,b){if(a&&b){a.appendChild(b)}}function AImg(a,c,b){if(!a){return}if(FNEmpWz(c)){a.setAttribute("iconSrc",c)}if(FNEmpWz(b)){a.setAttribute("iconAltText",b)}else{a.setAttribute("iconAltText","")}}function CMenu(b){var a=document.getElementById(b);if(a){a._initialized=false;a._oContents=null;a.innerHTML="";return a}a=document.createElement("MENU");if(!a){return null}if(b){a.id=b}a.className="ms-SrvMenuUI";AChld(document.body,a);return a}function CMItm(a){var b=document.createElement("SPAN");if(!b){return null}b.setAttribute("type",a);return b}function SetInnerText(c,b){if(document.createTextNode!=null){var a=document.createTextNode(b);c.innerHTML="";c.appendChild(a)}else{c.innerText=b}}function CMOpt(e,b,d,a,g,c){var f=CMItm("option");if(!f){return null}f.setAttribute("text",e);f.setAttribute("onMenuClick",b);if(c){f.setAttribute("description",c)}AImg(f,d,a);if(FNEmpWz(g)){f.setAttribute("sequence",g)}return f}function CAMOpt(g,e,b,d,a,h,c){var f=CMOpt(e,b,d,a,h,c);if(!f){return null}AChld(g,f);return f}function CIMOpt(a,b,f,k,d,h){var c=CMOpt(b,f,k,d,h);if(!c){return null}for(var e=0;e<a.childNodes.length;e++){var g=a.childNodes[e].getAttribute("sequence");if(g){if(g>h){a.childNodes[e].parentNode.insertBefore(c,a.childNodes[e]);return c}}}AChld(a,c);return c}function CMSep(){var a=CMItm("separator");SetInnerText(a,"");return a}function CAMSep(b){var a=CMSep();if(!a){return null}AChld(b,a);return a}function CSubM(d,c,a,e,b){var f=CMItm("submenu");if(!f){return null}f.setAttribute("text",d);if(b){f.setAttribute("description",b)}AImg(f,c,a);if(FNEmpWz(e)){f.setAttribute("sequence",e)}return f}function CASubM(e,d,c,a,f,b){var g=CSubM(d,c,a,f,b);if(!g){return null}AChld(e,g);return g}function FRdy(a){if(!a){return false}if(a.readyState==null){return true}switch(a.readyState){case"loaded":case"interactive":case"complete":return true;default:return false}}function OMenu(a,c,b,e,d){if(typeof(a)=="string"){a=document.getElementById(a)}if(a){OMenuInt(a,c,b,e,d)}return false}function OMenuInt(a,c,b,e,d){if(a&&!MenuHtc_isOpen(a)){MenuHtc_show(a,c,b,e,d)}}function OMenuEvnt(){var a=event.srcElement;if(a&&FRdy(document)&&FRdy(a)){var c=a.getAttribute("relativeTo");var b=a.getAttribute("forceRefresh");var e=a.getAttribute("flipTop");var d=a.getAttribute("yOffsetTop");if(c!=null){a.removeAttribute("relativeTo")}if(b!=null){a.removeAttribute("forceRefresh")}if(e!=null){a.removeAttribute("flipTop")}if(d!=null){a.removeAttribute("yOffsetTop")}a.onreadystatechange=null;OMenuInt(a,c,b,e,d)}}var kfnDisableEvent=new Function("return false");var g_menuHtc_lastMenu=null;var g_uniqueNumber=0;function IsAccessibilityFeatureEnabledProxy(){if(typeof(IsAccessibilityFeatureEnabled)!="undefined"){return IsAccessibilityFeatureEnabled()}return false}function MenuHtc_show(oMaster,oParent,fForceRefresh,fFlipTop,yOffset){if(!(browseris.ie55up||browseris.nav6up||browseris.safari125up)){return false}MenuHtc_hide();MenuHtc_init(oMaster);oMaster._oParent=oParent;oMaster._fIsRtL=IsElementRtl(oMaster._oParent);if((browseris.ie||browseris.nav)&&IsAccessibilityFeatureEnabledProxy()){var menu=null;if(oParent.foa!=null){menu=byid(oParent.foa);if(menu==null){menu=eval(oParent.foa)}}if(menu!=null&&menu.onblur!=null){menu.onblur()}RenderAccessibleMenu(oMaster,fForceRefresh);g_menuHtc_lastMenu=oMaster}else{SetBodyEventHandlers(null);AssureId(oParent);var result=ShowRoot(oMaster,oParent,fForceRefresh,fFlipTop,yOffset);g_menuHtc_lastMenu=oMaster;NavigateToMenu(oMaster);SetBodyEventHandlers(HandleDocumentBodyClick)}if(browseris.ie){if(window.event!=null){window.event.cancelBubble=true}}return false}function MenuHtc_hide(){ClearTimeOutToHideMenu();var a=g_menuHtc_lastMenu;if(a!=null){if(a._accessibleMenu!=null){CloseAccessibleMenu(a)}else{HideMenu(a)}}g_menuHtc_lastMenu=null}function MenuHtc_isOpen(b){if(!b||!b._initialized){return false}var a=IsOpen(b);return a}function MenuHtc_item(d,c,b){MenuHtc_init(d);var a=GetItem(d,c,b);return a}function TrapMenuClick(a){if(a!=null){a.cancelBubble=true}return false}function SetBodyEventHandlers(a){document.body.onclick=a}function HandleDocumentBodyClick(a){if(g_menuHtc_lastMenu!=null){var b=g_menuHtc_lastMenu;if(b!=null){HideMenu(b)}}return false}function GetEventPopup(b){var a=GetEventSrcElement(b);while(a!=null){if(a.master!=null){return a}a=a.parentNode}return null}function GetUniqueNumber(){g_uniqueNumber++;return g_uniqueNumber}function MenuHtc_init(a){if(a._initialized){return}a._initialized=true;a._wzPrefixID="mp"+GetUniqueNumber();if(a.id==null){a.id=a._wzPrefixID+"_id"}a._nLevel=0;a._arrPopup=new Array();a._arrSelected=new Array();if(typeof(a._onDestroy)=="undefined"){a._onDestroy=null}a._fLargeIconMode=false;a._fCompactItemsWithoutIcons=false}function PrepContents(a){a._fLargeIconMode=(a.getAttribute("largeIconMode")=="true");a._fCompactItemsWithoutIcons=(a.getAttribute("CompactMode")=="true");if(!browseris.safari){a._oContents=document.createElement("span");a._oContents.style.display="none";a._oContents.innerHTML=a.innerHTML}else{a._oContents=a.cloneNode(true);a._oContents.style.display="none"}if(a._fLargeIconMode){if(a._fIsRtL){a._wzMenuStyle="ms-MenuUILargeRtL"}else{a._wzMenuStyle="ms-MenuUILarge"}}else{if(a._fIsRtL){a._wzMenuStyle="ms-MenuUIRtL"}else{a._wzMenuStyle="ms-MenuUI"}}a._wzChkMrkPath="/_layouts/images/ChkMrk.gif";a._wzMArrPath="/_layouts/images/MArr.gif";a._wzMArrPathRtL="/_layouts/images/MArrRtL.gif"}function FixUpMenuStructure(f){var h=f._oRoot.childNodes;var k=null;var a=null;for(var c=0;c<h.length;c++){var b=h[c];if(b.nodeType!=1){continue}var e=false;var g=b.style!=null&&b.style.display=="none";var l=FIsIHidden(b);if(g||l){e=true}else{if(FIsIType(b,"separator")){if(a!=null||c==0){e=true}else{a=b}}else{var d=b.getAttribute("menuGroupId");if(d!=k&&a==null&&c!=0){var a=document.createElement("ie:menuitem");a.setAttribute("type","separator");f._oRoot.insertBefore(a,b)}else{if(FIsIType(b,"submenu")&&a!=null){b.parentNode.removeChild(a);a=null}else{a=null}}k=d}}if(e){b.parentNode.removeChild(b);c--}}if(a!=null){a.parentNode.removeChild(a)}}function IsElementRtl(b){while(b!=null&&b.tagName!=null){var a=b.getAttribute("dir");if((a==null||a=="")&&b.style!=null){a=b.style.direction}if(a=="rtl"){return true}else{if(a=="ltr"){return false}}b=b.parentNode}return false}function AdjustScrollPosition(b,c,a){var d=b;while(d!=null&&d!=c&&d!=b.offsetParent&&d.tagName!=null&&d.tagName.toLowerCase()!="body"&&d.tagName.toLowerCase()!="html"){if(d.scrollWidth>d.clientWidth&&d.offsetWidth>=d.clientWidth&&d.clientWidth!=0){if(!IsElementRtl(d)){if(d.scrollLeft>0){a.x-=d.scrollLeft}}else{a.x+=(d.scrollWidth-d.offsetWidth-d.scrollLeft)}}if(d.scrollTop>0){a.y-=d.scrollTop}d=d.parentNode}}function MenuHtc_GetElementPosition(d,f){var a=new Object();a.x=0;a.y=0;a.width=0;a.height=0;if(d.offsetParent){var e=d;while(e!=null&&e!=f){a.x+=e.offsetLeft;a.y+=e.offsetTop;AdjustScrollPosition(e,f,a);var c=e.tagName.toLowerCase();if(c!="table"&&c!="body"&&c!="html"&&c!="div"&&e.clientTop&&e.clientLeft){a.x+=e.clientLeft;a.y+=e.clientTop}if(browseris.ie&&c=="td"){if(e.runtimeStyle.borderTopStyle!="none"||e.currentStyle.borderTopStyle!="none"){var b;if(e.runtimeStyle.borderTopWidth!=""){b=parseInt(e.runtimeStyle.borderTopWidth)}else{b=parseInt(e.currentStyle.borderTopWidth)}if(!isNaN(b)){a.y+=b}}if(e.runtimeStyle.borderLeftStyle!="none"||e.currentStyle.borderLeftStyle!="none"){var b;if(e.runtimeStyle.borderLeftWidth!=""){b=parseInt(e.runtimeStyle.borderLeftWidth)}else{b=parseInt(e.currentStyle.borderLeftWidth)}if(!isNaN(b)){a.x+=b}}}e=e.offsetParent}}else{if(d.left&&d.top){a.x=d.left;a.y=d.top}else{if(d.x){a.x=d.x}if(d.y){a.y=d.y}}}if(d.offsetWidth&&d.offsetHeight){a.width=d.offsetWidth;a.height=d.offsetHeight}else{if(d.style&&d.style.pixelWidth&&d.style.pixelHeight){a.width=d.style.pixelWidth;a.height=d.style.pixelHeight}}return a}function MenuHtcInternal_Show(o,m,e,t){var s=o._arrPopup[o._nLevel];var a;var r;var q;if(!o._oContents){PrepContents(o)}if(!o._oContents||IsOpen(o)){return}if(!s&&!o._oRoot){o._nLevel=0;o._oRoot=o._oContents}r=o._nLevel==0;t=t&&r;if(!s){o._arrPopup[o._nLevel]=document.createElement("DIV");s=o._arrPopup[o._nLevel];s.isMenu=true;s.master=o;s.level=o._nLevel;q=document.createElement("DIV");var l=document.createElement("table");var b=document.createElement("tbody");q.isInner=true;s.style.position="absolute";q.style.overflow="visible";l.appendChild(b);q.appendChild(l);s.appendChild(q);if(o._fIsRtL){s.setAttribute("dir","rtl")}else{s.setAttribute("dir","ltr")}document.body.appendChild(s);FixUpMenuStructure(o);var k=0;var c=o._oRoot.childNodes.length;for(a=0;a<c;a++){var d=o._oRoot.childNodes[a];if(d.nodeType!=1){continue}if(!FIsIType(d,"label")){var g=CreateMenuItem(o,d,MakeID(o,o._nLevel,k));if(g){b.appendChild(g)}k++}}s.className="ms-MenuUIPopupBody";l.className=o._wzMenuStyle;l.cellSpacing=0;l.cellPadding=0;s.oncontextmenu=kfnDisableEvent;s.ondragstart=kfnDisableEvent;s.onselectstart=kfnDisableEvent;if(m._onmouseover==null){m._onmouseover=m.onmouseover}if(m._onmouseout==null){m._onmouseout=m.onmouseout}if(m._onmousedown==null){m._onmousedown=m.onmousedown}if(m._onclick==null){m._onclick=m.onclick}if(browseris.nav){s.onkeypress=function(u){return false};s.onkeyup=function(u){return false};s.onkeydown=function(u){PopupKeyDown(u);return false};s.onmousedown=function(u){TrapMenuClick(u);return false};s.onmouseover=function(u){PopupMouseOver(u);return false};s.onmouseout=function(u){PopupMouseLeave(u);return false};s.onclick=function(u){PopupMouseClick(u);TrapMenuClick(u);return false};m.onmouseover=function(u){PopupMouseOverParent(u);return false};m.onmouseout=function(u){PopupMouseLeaveParent(u);return false};m.onmousedown=function(u){TrapMenuClick(u);return false};m.onclick=function(u){TrapMenuClick(u);return false};m.oncontextmenu=function(u){TrapMenuClick(u);return false}}else{s.onkeydown=new Function("PopupKeyDown(event); return false;");s.onmousedown=new Function("TrapMenuClick(event); return false;");s.onmouseover=new Function("PopupMouseOver(event); return false;");s.onmouseout=new Function("PopupMouseLeave(event); return false;");s.onclick=new Function("PopupMouseClick(event); TrapMenuClick(event); return false;");m.onmouseover=new Function("PopupMouseOverParent(event); return false;");m.onmouseout=new Function("PopupMouseLeaveParent(event); return false;");m.onmousedown=new Function("TrapMenuClick(event); return false;");m.onclick=new Function("TrapMenuClick(event); return false;");m.oncontextmenu=new Function("TrapMenuClick(event); return false;")}if(r){var n=o.getAttribute("onunloadtext");if(n){s.onunload=new Function(n)}}}else{var p=o._arrSelected[o._nLevel];if(p){UnselectItem(p)}}o._arrSelected[o._nLevel]=null;var h;if(browseris.ie){var f=document.body.scrollLeft;h=document.createElement("iframe");AssureId(h);h.src="/_layouts/blank.htm";h.style.position="absolute";h.style.display="none";h.scrolling="no";h.frameBorder="0";document.body.appendChild(h);s.style.zIndex=103;s._backgroundFrameId=h.id;if(f!=document.body.scrollLeft){document.body.scrollLeft=f}}SetMenuPosition(o,m,s,q,t,r);if(browseris.ie){SetBackFrameSize(null,s);s.onresize=new Function("SetBackFrameSize(event, null);");h.style.display="block";h.style.zIndex=101}}function SetMenuPosition(e,O,B,J,c,a){var r=window.screen.width;var L=window.screen.height;if(browseris.nav){r=document.body.clientWidth;L=document.body.clientHeight}else{if(self.innerHeight){r=self.innerWidth;L=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){r=document.documentElement.clientWidth;L=document.documentElement.clientHeight}else{if(document.body){r=document.body.clientWidth;L=document.body.clientHeight}}}}var o=B.scrollWidth+B.offsetWidth-B.clientWidth;var s=B.scrollHeight+B.offsetHeight-B.clientHeight;var m=false;var H=false;if(o>r-50){m=true;o=r-50}if(e._fCompactItemsWithoutIcons&&s>=375){H=true;s=375}if(s>=L-50){H=true;s=L-50}if(!m&&!H){J.style.overflow="visible"}else{if(browseris.ie){if(m){B.style.width=o+"px";J.style.width=o+"px";J.style.overflowX="scroll"}else{J.style.width=o+"px";J.style.overflowX="visible"}if(H){B.style.height=s+"px";J.style.height=s+"px";J.style.overflowY="scroll"}else{J.style.height=s+"px";J.style.overflowY="visible"}}else{B.style.height=s+"px";J.style.height=s+"px";B.style.width=o+"px";J.style.width=o+"px";J.style.overflow="auto"}}o=B.scrollWidth+B.offsetWidth-B.clientWidth;s=B.scrollHeight+B.offsetHeight-B.clientHeight;var h=0;var l=r;var g=0;var M=0;var q=0;var d=O;if(browseris.safari){if(d.tagName=="TR"&&d.childNodes.length>0){d=d.childNodes[0]}}var K=MenuHtc_GetElementPosition(d);g=K.x;q=K.y;var C;if(a){C=K.width;q+=K.height;q-=1}else{C=K.width+1}var F=!c&&!document.body.getAttribute("flipped");var N,n;var z,w;if(!e._fIsRtL){var b;var G;if(a){z=g;b=g+o;G=g+C-o}else{z=g+C;b=g+C+o;G=g-o}w=G;N=b>l&&G>h;n=!(G<h&&b<l)}else{var I;var P;if(a){I=g+C-o;P=g+o;w=g}else{I=g-o;P=g+C+o;w=g+C}z=I;N=I<h&&P<l;n=!(P>l&&I>h)}var k=F?N:n;var E=k?w:z;var u;var v;if(browseris.nav){u=window.pageXOffset;v=window.pageYOffset}else{var A=document.body.parentElement;if(!IsElementRtl(document.body)){u=document.body.scrollLeft;u+=A.scrollLeft}else{u=-document.body.scrollWidth+document.body.offsetWidth+document.body.scrollLeft;u+=-A.scrollWidth+A.offsetWidth+A.scrollLeft}v=document.body.scrollTop;v+=A.scrollTop}if(o>=r){E=u}else{if(E-u+o>=r){E=u+r-o}}var D;if(s>=L){D=v}else{if(q+s-v>=L){D=v+L-s}else{D=q}}B.setAttribute("flipped",c?k&&N:k);var f=Math.max(E,u);var t=Math.max(D,v);B.style.left=f+"px";B.style.top=t+"px"}function SetBackFrameSize(d,c){if(c==null){c=GetEventSrcElement(d)}var f=c.scrollWidth+c.offsetWidth-c.clientWidth;var b=c.scrollHeight+c.offsetHeight-c.clientHeight;var a=document.getElementById(c._backgroundFrameId);a.style.left=c.offsetLeft+"px";a.style.top=c.offsetTop+"px";a.style.width=f+"px";a.style.height=b+"px"}function HideMenu(d,c){ClearTimeOutToHideMenu();if(c==null){c=0}if(c==2){if(d._onDestroy!=null){d._onDestroy();d._onDestroy=null}return}if(IsOpen(d)&&!IsAccessibilityFeatureEnabledProxy()){if(d._oParent!=null){d._oParent.onclick=d._oParent._onclick;d._oParent.onmouseover=d._oParent._onmouseover;d._oParent.onmouseout=d._oParent._onmouseout;d._oParent.onmousedown=d._oParent._onmousedown}SetBodyEventHandlers(null);UpdateLevel(d,0);var b=d._arrPopup[0];if(b!=null){var a=document.getElementById(b._backgroundFrameId);if(a!=null){a.parentNode.removeChild(a)}b.parentNode.removeChild(b);d._arrPopup[0]=null;if(c==0){if(d._onDestroy!=null){d._onDestroy();d._onDestroy=null}}}g_menuHtc_lastMenu=null}}function IsOpen(b){if(b._accessibleMenu&&!b._accessibleMenu.closed){return true}if(!b._arrPopup){return false}var a=b._arrPopup[b._nLevel];return a}function FindLabel(c){var b=c?c.childNodes:null;if(b){for(var a=0;a<b.length;a++){var d=b[a];if(d.nodeType!=1){continue}if(FIsIType(d,"label")){return d}}}return null}function ShowRoot(e,c,b,a,d){UpdateLevel(e,0);if(b){e._oContents=null;e._oRoot=null;e._nLevel=0;e._arrPopup=new Array();e._arrSelected=new Array()}else{e._oRoot=e._oContents}var f=0;if(c){f+=c.offsetHeight}if(browseris.safari){if(c.tagName=="TR"&&c.childNodes.length>0){f+=(c.childNodes[0].offsetTop+c.childNodes[0].offsetHeight-c.offsetTop)}}if(d){f+=d}a=a!=false;MenuHtcInternal_Show(e,c,f,a)}function ShowSubMenu(c,a,b){if(!b){return}if(b.submenuRoot==null){return}UpdateLevel(c,a);c._oRoot=b.submenuRoot;c._nLevel=c._nLevel+1;MenuHtcInternal_Show(c,b,-1)}function ShowSubMenuEvnt(c){var b=document.getElementById(c);var a=b._arrPopup[b._nLevel];if(a){a.removeAttribute("timeoutID");ShowSubMenu(b,b._nLevel,b._arrSelected[b._nLevel])}}function SetShowSubMenuEvnt(b){var a=b._arrPopup[b._nLevel];if(a){ClearTimeOut("timeoutID");document.body.setAttribute("timeoutID",window.setTimeout(new Function("ShowSubMenuEvnt('"+b.id+"');"),100))}}function ClearTimeOut(a){var b=document.body.getAttribute(a);if(b!=null){window.clearTimeout(b)}document.body.removeAttribute(a)}function ClearShowSubMenuEvnt(a){ClearTimeOut("timeoutID")}function GetEventSrcItem(c,a){for(var b=a;b&&!FIStringEquals(b.tagName,"BODY");b=b.parentNode){if(FIStringEquals(b.tagName,"TR")&&b.id.substring(0,c._wzPrefixID.length)==c._wzPrefixID){return b}}return null}function UpdateLevel(d,b){var c;while(d._nLevel>b){c=d._arrPopup[d._nLevel];if(c){ClearShowSubMenuEvnt(c);var a=document.getElementById(c._backgroundFrameId);if(a!=null){a.parentNode.removeChild(a)}c.parentNode.removeChild(c)}d._arrPopup[d._nLevel]=null;d._arrSelected[d._nLevel]=null;d._oRoot=d._oRoot.parentNode;d._nLevel--}c=d._arrPopup[d._nLevel];if(c){ClearShowSubMenuEvnt(c)}}function PopupMouseOver(d){var c=GetEventPopup(d);if(c!=null){var f=c.master;var b=c.level;if(b<0){return}var a=GetEventSrcItem(f,GetEventSrcElement(d));if(a){if(a!=f._arrSelected[b]){if(FIsIType(a,"separator")){return}ToggleMenuItem(f,b,a);if(FIsIType(a,"submenu")){EngageSelection(f,true,true,false)}}else{if(b<f._nLevel){UnselectCurrentOption(f)}}}ClearTimeOutToHideMenu()}}function PopupMouseLeave(b){var a;a=GetEventPopup(b);if(a!=null){UnselectCurrentOption(a.master);SetTimeOutToHideMenu()}return false}function PopupMouseOverParent(a){if(g_menuHtc_lastMenu!=null){ClearTimeOutToHideMenu();if(g_menuHtc_lastMenu._oParent!=null&&g_menuHtc_lastMenu._oParent._onmouseover!=null){g_menuHtc_lastMenu._oParent._onmouseover()}}}function PopupMouseLeaveParent(a){if(g_menuHtc_lastMenu!=null){if(g_menuHtc_lastMenu._oParent!=null&&g_menuHtc_lastMenu._oParent._onmouseout!=null){g_menuHtc_lastMenu._oParent._onmouseout()}SetTimeOutToHideMenu()}}function ClearTimeOutToHideMenu(){if(document.body.getAttribute("HideMenuTimeOut")!=null){ClearTimeOut("HideMenuTimeOut")}}function SetTimeOutToHideMenu(){ClearTimeOut("HideMenuTimeOut");document.body.setAttribute("HideMenuTimeOut",window.setTimeout(MenuHtc_hide,1500))}function PopupMouseClick(c){var b=GetEventPopup(c);var f=b.master;var a=b.level;if(a<0){return}var d=f._arrSelected[a];UpdateLevel(f,a);EngageSelection(f,true,false,false)}function PopupKeyDown(f){var d=GetEventPopup(f);var g=d.master;var b=d.level;if(b<0){return}var c=GetEventKeyCode(f);var a=f.shiftKey;if(g._fIsRtL){if(c==37){c=39}else{if(c==39){c=37}}}if(c==9){c=!a?40:38}ClearShowSubMenuEvnt(d);switch(c){case 38:MoveMenuSelection(g,-1);break;case 40:MoveMenuSelection(g,1);break;case 37:case 27:CloseCurrentLevel(g,c==27);break;case 39:case 13:EngageSelection(g,c==13,false,true);break}f.returnValue=false}function SetNewId(a){a.id="msomenuid"+GetUniqueNumber();return a.id}function AssureId(a){if(a.id==null||a.id==""){a.id="msomenuid"+GetUniqueNumber()}return a.id}function NavigateToMenu(d){var a=d._arrPopup[d._nLevel].firstChild;AssureId(a);try{var c=a.firstChild.firstChild.firstChild;c.tabIndex=0;if(c.setActive!=null){c.setActive()}else{if(c.focus!=null){c.focus()}}}catch(b){}}function ExecuteOnClick(fnOnClick){try{if(browseris.safari){if(FIStringEquals(typeof(fnOnClick),"string")){eval("var document=window.document; {"+fnOnClick+"}")}else{fnOnClick()}}else{if(FIStringEquals(typeof(fnOnClick),"string")){fnOnClick=new Function("var document=window.document; {"+fnOnClick+"}")}var oTemp=window.document.body.appendChild(window.document.createElement("span"));oTemp.onclick=fnOnClick;oTemp.onclick();oTemp.parentNode.removeChild(oTemp)}}catch(e){}}function EngageSelection(g,d,a,e){var f=g._arrSelected[g._nLevel];if(!f||f.optionDisabled){return}if(FIsIType(f,"submenu")){if(a){SetShowSubMenuEvnt(g)}else{ShowSubMenu(g,g._nLevel,f);if(e){MoveMenuSelection(g,1)}}}else{if(d){var c=f.getAttribute("enabled");if(c!="false"){var b=f.getAttribute("onMenuClick");if(b){HideMenu(g,1);ExecuteOnClick(b);HideMenu(g,2)}}}}}function CloseCurrentLevel(oMaster,fAllowHideRoot){if(oMaster._nLevel>0){UpdateLevel(oMaster,oMaster._nLevel-1);var obj=oMaster._arrSelected[oMaster._nLevel];if(obj!=null){if(browseris.nav){obj=obj.firstChild.firstChild.firstChild.firstChild.firstChild.nextSibling.firstChild.firstChild;if(obj.focus!=null){obj.focus()}}else{if(obj.focus!=null){obj.focus()}}}}else{if(fAllowHideRoot){HideMenu(oMaster);var oParent=oMaster._oParent;while(oParent!=null&&oParent.tagName=="SPAN"&&oParent.getAttribute("contentEditable")!=null){oParent=oParent.parentElement}if(oParent!=null){var focusElement=oParent;if(oParent.foa!=null){var foa=null;foa=eval(oParent.foa);if(foa==null){foa=byid(oParent.foa)}if(foa!=null){focusElement=foa}}if(focusElement.setActive!=null){focusElement.setActive()}else{if(focusElement.focus!=null){focusElement.focus()}}}}}}function UnselectCurrentOption(b){if(b._nLevel>=0){var a=b._arrSelected[b._nLevel];if(FIsIType(a,"option")){UnselectItem(a);b._arrSelected[b._nLevel]=null}}}function MakeID(c,b,a){return c._wzPrefixID+"_"+b+"_"+a}function GetItem(d,b,a){var c=d._arrPopup[b];return c?document.getElementById(MakeID(d,b,a)):null}function MoveMenuSelection(d,h){var a=-1;var g=d._oRoot.childNodes.length;var b=d._arrSelected[d._nLevel];if(b){var k=b?b.id:null;if(k){var c=parseInt(k.substring(k.lastIndexOf("_")+1,k.length));a=(c+g+h)%g}}if(a<0){a=h>0?0:(g-1)}var f;var e=a;do{f=GetItem(d,d._nLevel,a);a=(a+g+h)%g}while(a!=e&&(!f||f.style.display=="none"||!(FIsIType(f,"option")||FIsIType(f,"submenu"))));ToggleMenuItem(d,d._nLevel,f)}function ToggleMenuItem(g,d,f){var c=g._arrSelected[d];if(!f||(c&&f.id==c.id)){return}if(c){UnselectItem(c);c.onkeydown=null;c.onmousedown=null;c.onmouseover=null;c.onmouseout=null;c.oncontextmenu=null}UpdateLevel(g,d);SelectItem(f);g._arrSelected[d]=f;f.tabIndex=0;if(f.setActive!=null){f.setActive()}else{if(f.focus!=null){f.focus()}}var e=g._arrPopup[d];var b=e.childNodes[0];var a=MenuHtc_GetElementPosition(f,b);if(a.y+a.height-b.scrollTop>b.offsetHeight){b.scrollTop=a.y+a.height-b.offsetHeight}else{if(a.y<b.scrollTop){b.scrollTop=a.y}}}function SelectItem(c){if(!c){return}var b=c.firstChild;var a=b.firstChild;if(b.className=="ms-MenuUIItemTableCellCompact"){b.className="ms-MenuUIItemTableCellCompactHover"}else{b.className="ms-MenuUIItemTableCellHover"}a.className="ms-MenuUIItemTableHover"}function UnselectItem(c){if(!c){return}var b=c.firstChild;var a=b.firstChild;if(b.className=="ms-MenuUIItemTableCellCompactHover"){b.className="ms-MenuUIItemTableCellCompact"}else{b.className="ms-MenuUIItemTableCell"}a.className="ms-MenuUIItemTable"}function SetImageSize(c,a,b){if(b==null){if(c._fLargeIconMode){b=32}else{b=16}}a.width=b;a.height=b}function CreateMenuOption(z,e,l,u,t){var r=document.createElement("td");var g=document.createElement("td");var h=document.createElement("td");var a=document.createElement("td");e.appendChild(r);e.appendChild(g);e.appendChild(h);e.appendChild(a);if(z._fLargeIconMode){r.className=!z._fIsRtL?"ms-MenuUIIconLarge":"ms-MenuUIIconRtlLarge"}else{r.className=!z._fIsRtL?"ms-MenuUIIcon":"ms-MenuUIIconRtL"}r.align="center";if(z._fCompactItemsWithoutIcons&&!l.getAttribute("iconSrc")){g.className=!z._fIsRtL?"ms-MenuUILabelCompact":"ms-MenuUILabelCompactRtl"}else{g.className=!z._fIsRtL?"ms-MenuUILabel":"ms-MenuUILabelRtL"}h.className="ms-MenuUIAccessKey";a.className="ms-MenuUISubmenuArrow";if(!z._fLargeIconMode){g.noWrap=true}r.noWrap=true;h.noWrap=true;a.noWrap=true;g.id=l.id;if(!t){t=l.innerHTML}if(l.getAttribute("enabled")=="false"){e.disabled=true;g.className+=" ms-MenuUIItemTableCellDisabled"}var b=null,w=null;if(l.getAttribute("checked")=="true"){b=z._wzChkMrkPath;w="*"}else{b=EvalAttributeValue(l,"iconSrc","iconScript");w=l.getAttribute("iconAltText")}var f=t;var y=EvalAttributeValue(l,"text","textScript");var v=EvalAttributeValue(l,"description","descriptionScript");var s=document.createElement("div");if(v!=null&&z._fLargeIconMode){var k=document.createElement("B");var d=document.createElement("SPAN");var c=document.createTextNode(y);var n=document.createElement("BR");var q=document.createElement("SPAN");var m=document.createTextNode(v);d.setAttribute("style","white-space: nowrap;");q.className="ms-menuitemdescription";s.appendChild(k);k.appendChild(d);d.appendChild(c);s.appendChild(n);s.appendChild(q);q.appendChild(m)}else{if(y!=null){var d=document.createElement("SPAN");var c=document.createTextNode(y);d.setAttribute("style","white-space: nowrap;");s.appendChild(d);d.appendChild(c)}}var o=document.createElement("SPAN");o.innerHTML=f;s.appendChild(o);if(b){var A=document.createElement("IMG");SetImageSize(z,A);var B=document.createElement("LABEL");r.appendChild(A);g.appendChild(B);var p=u+"_ICON";A.id=p;A.src=b;if(w){A.alt="";A.title=""}B.htmlFor=p;B.appendChild(s)}else{if(browseris.nav||z._fLargeIconMode){var A=document.createElement("IMG");SetImageSize(z,A);var B=document.createElement("LABEL");r.appendChild(A);g.appendChild(B);var p=u+"_ICON";A.id=p;A.src="/_layouts/images/blank.gif";A.alt="";A.title="";B.htmlFor=p;B.appendChild(s);if(z._fLargeIconMode){A.width=32;A.height=16}else{A.width=16}}else{r.innerHTML="&nbsp;";g.appendChild(s)}}var C=l.getAttribute("accessKeyText");if(C){h.innerHTML=C}SetIType(e,"option")}function CreateMenuSeparator(d,a){var c=document.createElement("td");var b=document.createElement("div");a.appendChild(c);c.appendChild(b);if(d._fLargeIconMode){b.className=!d._fIsRtL?"ms-MenuUISeparatorLarge":"ms-MenuUISeparatorLargeRtl"}else{b.className=!d._fIsRtL?"ms-MenuUISeparator":"ms-MenuUISeparatorRtL"}b.innerHTML="&nbsp;";SetIType(a,"separator")}function CreateSubmenu(g,c,f,b){var e=FindLabel(f);CreateMenuOption(g,c,f,b,e?e.innerHTML:null);var d=c.childNodes[3];var a=document.createElement("IMG");SetImageSize(g,a,16);d.appendChild(a);a.src=!g._fIsRtL?g._wzMArrPath:g._wzMArrPathRtL;a.alt=!g._fIsRtL?">":"<";a.title="";SetIType(c,"submenu");c.submenuRoot=f}function MergeAttributes(b,a){if(browseris.nav||b.mergeAttributes==null){var d=a.attributes;for(var c=0;c<d.length;c++){var e=d[c];if(e!=null&&e.specified&&e.nodeName!="id"&&e.nodeName!="ID"&&e.nodeName!="name"){b.setAttribute(e.nodeName,e.nodeValue)}}if(a.getAttribute("type")!=null){b.setAttribute("type",a.getAttribute("type"))}if(a.submenuRoot!=null){b.submenuRoot=a.submenuRoot}}else{b.mergeAttributes(a)}}function CreateMenuItem(e,k,d,g){if(FIsIType(k,"label")){return}var c=document.createElement("tr");MergeAttributes(c,k);c.setAttribute("onMenuClick",k.getAttribute("onMenuClick"));if(FIsIType(k,"separator")){CreateMenuSeparator(e,c);return c}if(!GetIType(k)){SetIType(k,"option")}var h=document.createElement("tr");var l=document.createElement("td");var a=document.createElement("table");var f=document.createElement("tbody");h.appendChild(l);l.appendChild(a);a.appendChild(f);f.appendChild(c);if(e._fCompactItemsWithoutIcons&&!k.getAttribute("iconSrc")){l.className="ms-MenuUIItemTableCellCompact"}else{l.className="ms-MenuUIItemTableCell"}a.className="ms-MenuUIItemTable";a.width="100%";a.cellSpacing=0;a.cellPadding=0;if(FIsIType(k,"submenu")){CreateSubmenu(e,c,k,d)}else{if(FIsIType(k,"option")){CreateMenuOption(e,c,k,d,g)}}if(c.disabled||c.getAttribute("enabled")=="false"){c.disabled=false;c.className="ms-MenuUIDisabled";c.disabled=false;for(var b=0;b<c.childNodes.length;b++){if(c.childNodes[b].nodeType!=1){continue}c.childNodes[b].disabled=true;l.className+=" ms-MenuUIItemTableCellDisabled"}c.optionDisabled=true}MergeAttributes(h,c);if(c.optionDisabled!=null){h.optionDisabled=c.optionDisabled}h.id=d;SetIType(h,GetIType(c));return h}function GetItems(a){if(!a._oContents){PrepContents(a)}return a._oContents.childNodes}function GetIType(a){return a?a.getAttribute("type"):null}function FIsIType(b,a){return FIStringEquals(GetIType(b),a)}function SetIType(b,a){if(b){b.setAttribute("type",a)}}function FIStringEquals(b,a){return b!=null&&a!=null&&b.toLowerCase()==a.toLowerCase()}function RenderAccessibleMenu(c,b){if(b){c._oContents=null;c._oRoot=null;c._nLevel=0;c._arrPopup=new Array();c._arrSelected=new Array()}else{c._oRoot=c._oContents}if(!c._oContents){PrepContents(c)}if(!c._oContents){return}if(!c._oRoot){c._nLevel=0;c._oRoot=c._oContents}FixUpMenuStructure(c);var a=c._fIsRtL?"rtl":"ltr";g_menuHtc_html="<html dir='"+a+"'><head><title>"+L_AccessibleMenu_Text+"</title></head><body><ul id='root'>";RenderMenuLevel(c,c._oRoot,true);g_menuHtc_html=g_menuHtc_html+"</ul></body></html>";var d=window.open("/_layouts/blank.htm","_blank","status=no,toolbar=no,menubar=no,location=no");c._accessibleMenu=d;d.document.write(g_menuHtc_html);d.document.close();d.focus()}function CloseAccessibleMenu(a,b){if(b==null){b=0}if(a!=null){if(b==0||b==1){if(a._accessibleMenu!=null){a._accessibleMenu.close();a._accessibleMenu=null}}if(b==0||b==2){if(a._onDestroy!=null){a._onDestroy();a._onDestroy=null}}}}function GetMenuItemText(d,c,a){if(a==""){a=EvalAttributeValue(c,"text","textScript");var b=EvalAttributeValue(c,"description","descriptionScript");if(b!=null&&b!=""&&d._fLargeIconMode){if(a!=""){a=a+": "}a=a+b}}if(c.getAttribute("checked")=="true"){a="* "+a}if(c.title!=null&&c.title!=""){a=a+": "+c.title}return a}function GetMenuItemEnabled(b,a){if(!a){return false}if(b.getAttribute("enabled")=="false"){return false}if(b.getAttribute("disabled")!=null&&b.getAttribute("disabled")!=""){return false}return true}var g_menuHtc_html;function RenderMenuLevel(g,b,d){for(var a=0;a<b.childNodes.length;a++){var f=b.childNodes[a];if(f.nodeType!=1){continue}if(f.style.display=="none"){continue}if(FIsIType(f,"option")){var c=GetMenuItemText(g,f,f.innerHTML);if(!GetMenuItemEnabled(f,d)){g_menuHtc_html=g_menuHtc_html+'<li><span id="'+f.id+'">'+c+"</span></li>"}else{g_menuHtc_html=g_menuHtc_html+'<li><a href="#" id="'+f.id+'" onMenuClick="'+f.getAttribute("onMenuClick")+'" onclick="javascript:opener.ExecuteOnAccessibleClick(this.getAttribute(\'onMenuClick\')); return false;">'+c+"</a></li>"}}else{if(FIsIType(f,"submenu")){var c=GetMenuItemText(g,f,"");g_menuHtc_html=g_menuHtc_html+'<li><span id="'+f.id+'">'+c;for(var h=0;h<f.childNodes.length;h++){var e=f.childNodes[h];if(e.nodeType!=1){continue}if(e.style.display=="none"){continue}if(FIsIType(e,"label")){g_menuHtc_html=g_menuHtc_html+" "+e.innerHTML;break}}g_menuHtc_html=g_menuHtc_html+"</span><ul>";RenderMenuLevel(g,f,GetMenuItemEnabled(f,d));g_menuHtc_html=g_menuHtc_html+"</ul></li>"}}}}function ExecuteOnAccessibleClick(a){var b=g_menuHtc_lastMenu;if(b!=null){CloseAccessibleMenu(b,1);window.focus();ExecuteOnClick(a);CloseAccessibleMenu(b,2)}}function FIsIHidden(oItem){if(oItem){var hiddenFunc=oItem.getAttribute("hidden");if(!hiddenFunc){return false}return eval(hiddenFunc)}else{return false}}function EvalAttributeValue(oNode,sAttribute1,sAttribute2){var result=oNode.getAttribute(sAttribute2);if(result!=null&&result.toLowerCase().indexOf("javascript:")==0){result=eval(result.substring(11));if(result!=null&&result!=""){return result}}var result=oNode.getAttribute(sAttribute1);if(result==null){return""}return result}var flyoutsAllowed=false;function enableFlyoutsAfterDelay(){setTimeout("flyoutsAllowed=true;",25)}function overrideMenu_HoverStatic(b){if(!flyoutsAllowed){setTimeout(delayMenu_HoverStatic(b),50)}else{var a=Menu_HoverRoot(b);var c=Menu_GetData(b);if(!c){return}__disappearAfter=c.disappearAfter;Menu_Expand(a,c.horizontalOffset,c.verticalOffset)}}function delayMenu_HoverStatic(a){return(function(){overrideMenu_HoverStatic(a)})}var MMU_chDelim=",";var MMU_chDelimEnc="%2c";var MMU_postbackPrefix="javascript:__doPostBack(";var MMU_chDelim2="%";var MMU_chDelim2Enc="%25";function MHash_New(){var a=new Object();a._keys=new Array();a._values=new Array();return a}function MHash_Add(c,b,a){c._keys.push(b);c._values.push(a)}function MHash_Count(a){return a._keys.length}function MHash_Keys(a){return a._keys}function MHash_Values(a){return a._values}function MHash_Exists(c,b){for(var a=0;a<c._keys.length;a++){if(c._keys[a]==b){return true}}return false}function MHash_Item(c,b){for(var a=0;a<c._keys.length;a++){if(c._keys[a]==b){return c._values[a]}}return null}var MMU_reDelimEnc=new RegExp(MMU_chDelimEnc,"g");var MMU_reDelim2Enc=new RegExp(MMU_chDelim2Enc,"g");var MMU_reDelimDec=new RegExp(MMU_chDelim,"g");var MMU_reDelim2Dec=new RegExp(MMU_chDelim2,"g");function MMU_EncVal(a){return a.replace(MMU_reDelimDec,MMU_chDelimEnc).replace(MMU_reDelim2Dec,MMU_chDelim2Enc)}function MMU_DecVal(a){return a.replace(MMU_reDelim2Enc,MMU_chDelim2).replace(MMU_reDelimEnc,MMU_chDelim)}function MMU_ParseNV(g){var e=MHash_New();var b=g.split(MMU_chDelim);if(b!=null){var d;for(d=0;d<b.length;d++){var h=b[d];var a=h.indexOf("=");if(a==0){continue}var c=null;var f=null;if(a<0){c=h}else{c=h.substr(0,a);if(a<h.length-1){f=MMU_DecVal(h.substr(a+1))}else{f=""}}MHash_Add(e,c,f)}}return e}function MMU_ParseNVAttr(b,a){var c=b.getAttribute(a);if(c==null&&b.childNodes.length>0&&b.childNodes[0].nodeType==1){c=b.childNodes[0].getAttribute(a)}if(c==null){return MHash_New()}return MMU_ParseNV(c)}function MMU_ResetMenuState(a,c,k,h,b){var e;for(e=0;e<a.childNodes.length;e++){var d=a.childNodes[e];if(d.nodeType!=1){continue}var g=d.getAttribute("id");if((d!=null)&&(g!=null)&&(g.length>0)){if(d.childNodes.length>0){MMU_ResetMenuState(d,c,k,h,b);continue}if(MHash_Exists(k,g)){d.style.display="none"}else{d.style.display="";var f=d.getAttribute("enabledOverride");if((f!=null)&&(f.length>0)){d.setAttribute("enabled",f)}else{if(MHash_Exists(c,g)){d.setAttribute("enabled","false")}else{d.setAttribute("enabled","true");if(MHash_Exists(h,g)){d.setAttribute("checked","true")}else{d.setAttribute("checked","false")}}}}MMU_ReplTokValAttr(d,"onMenuClick",b);MMU_ReplTokValAttr(d,"text",b);MMU_ReplTokValAttr(d,"description",b);MMU_ReplTokValVal(d,b)}}}function MMU_ReplTokValAttr(c,a,e){var d=c.getAttribute(a);var f=c.getAttribute(a+"_Original");if((d!=null)&&(f==null)&&(MHash_Count(e)>0)){c.setAttribute(a+"_Original",d)}else{if((d!=null)&&(f!=null)&&(d!=f)){d=f}}if((d==null)||(d.length<=0)){return}var b=MMU_ReplTokVal(d,e);if(b!=d){c.setAttribute(a,b)}}function MMU_ReplTokValVal(b,d){if(b.nextSibling==null){return}var c=b.nextSibling.nodeValue;var e=b.getAttribute("valOrig");if((c!=null)&&(e==null)&&(MHash_Count(d)>0)){e=c;b.setAttribute("valOrig",e)}else{if((c!=null)&&(e!=null)&&(c!=e)){c=e}}var a=MMU_ReplTokVal(c,d);if((c!=null)&&(a!=null)&&(a!=c)){b.nextSibling.nodeValue=a}}function MMU_ReplTokVal(d,f){if((d!=null)&&(d.indexOf("%")>=0)&&(f!=null)&&(MHash_Count(f)>0)){var g=MHash_Keys(f);var c=MHash_Values(f);var b;for(b=0;b<g.length;b++){var a=g[b];var e=c[b];d=d.replace("%"+a+"%",e)}}return d}var g_MMU_HighlightedEcbTable=null;var g_MMU_HighlightedEcbTableOpen=null;var g_MMU_OpenTimeoutHandle=null;function MMU_Open(menu,ecbLink,e,fAlignRight,alignId,delay){try{if((menu==null)||(ecbLink==null)){return}if((ecbLink.getAttribute("suppressBubbleIfPostback")!=null)&&(e!=null)&&(e.srcElement!=null)&&(e.srcElement.href!=null)&&(e.srcElement.href.substr(0,MMU_postbackPrefix.length)==MMU_postbackPrefix)){event.cancelBubble=true;return}ClearHighlightedEcbTableOpen();if(fAlignRight==null){fAlignRight=true}MMU_ResetMenuState(menu,MMU_ParseNVAttr(ecbLink,"menuItemsDisabled"),MMU_ParseNVAttr(ecbLink,"menuItemsHidden"),MMU_ParseNVAttr(ecbLink,"menuItemsChecked"),MMU_ParseNVAttr(ecbLink,"menuTokenValues"));var elemAlign=null;if((alignId!=null)&&(alignId.length>0)){elemAlign=document.getElementById(alignId)}if(elemAlign==null){elemAlign=document.getElementById(ecbLink.id+"_t")}if(elemAlign==null){elemAlign=ecbLink}MMU_EcbHighlight(MMU_GetHighlightElement(ecbLink),true);var openMenuScript="MenuHtc_show(document.getElementById('"+menu.id+"'), document.getElementById('"+elemAlign.id+"'), true, "+fAlignRight+", null);";openMenuScript+="SetEcbMouseOutAndDestroy('"+menu.id+"');";if((delay!=null)&&(delay>0)){openMenuScript+=" g_MMU_OpenTimeoutHandle=null;";g_MMU_OpenTimeoutHandle=window.setTimeout(openMenuScript,delay,"javascript")}else{eval(openMenuScript)}if(e!=null){e.cancelBubble=true}}catch(ex){alert(L_Loading_Error_Text)}}function SetEcbMouseOutAndDestroy(a){if(g_MMU_HighlightedEcbTable!=null){g_MMU_HighlightedEcbTable.onmouseout=null;g_MMU_HighlightedEcbTableOpen=g_MMU_HighlightedEcbTable;document.getElementById(a)._onDestroy=ClearHighlightedEcbTableOpen}}function ClearHighlightedEcbTableOpen(){if(g_MMU_HighlightedEcbTableOpen!=null){MMU_EcbHighlight(g_MMU_HighlightedEcbTableOpen,false);g_MMU_HighlightedEcbTableOpen=null}}function MMU_EcbLinkOnFocusBlurDeferCall(c,d,b){if(b){d.onblur=b?new Function("MMU_EcbLinkOnFocusBlurDeferCall(null, this, false)"):null}if(g_MMU_HighlightedEcbTableOpen!=null){return}var a=document.getElementById(d.id+"_t");if(a!=null){MMU_EcbHighlight(a,b)}}function MMU_EcbLinkOnKeyDown(f,g,d){if(d==null){d=window.event;if(d==null){return}}var c=((g.href!=null)&&(g.href.length>0));if(((d.shiftKey||!c)&&(GetEventKeyCode(d)==13))||((d.altKey)&&(GetEventKeyCode(d)==40))){var b=byid(g.id+"_ti");if(b==null){var a=g.getAttribute("serverclientid");if((a!=null)&&(a.length>0)){b=byid(a+"_ti")}}if(b!=null){b.click()}else{g.click()}return false}else{return true}}function MMU_EcbTableMouseOverOutDeferCall(b,a){if(a){if(b==g_MMU_HighlightedEcbTableOpen){return}b.onmouseout=a?new Function("MMU_EcbTableMouseOverOut(this, false)"):null}MMU_EcbHighlight(b,a)}function MMU_EcbHighlight(b,f){if((b==null)&&(!f)){b=g_MMU_HighlightedEcbTableOpen}if(b==null){return}if(f==null){f=false}var e=b.getAttribute("hoverActive");var d=b.getAttribute("hoverInactive");if((e==null)){e="ms-selectedtitle"}if((d==null)){d="ms-unselectedtitle"}if(f){b.className=e;g_MMU_HighlightedEcbTable=b}else{b.className=d}var c=b.getAttribute("menuformat");var a=document.getElementById(b.id+"i");if(a!=null&&c!=null&&c=="ArrowOnHover"){a.style.visibility=f?"visible":"hidden"}if(!f){g_MMU_HighlightedEcbTable=null}}function MMU_PopMenuIfShowingDeferCall(b){if(!IsAccessibilityFeatureEnabledProxy()&&g_menuHtc_lastMenu){var a=g_menuHtc_lastMenu.getAttribute("type");if(a&&a=="ServerMenu"){b.onclick()}}}function MMU_HandleArrowSplitButtonKeyDown(d,f,b,c){if(!d.shiftKey&&!d.altKey&&!d.ctrlKey&&(GetEventKeyCode(d)==13)){c.parentNode.click();return}return MMU_EcbLinkOnKeyDown(byid(f),b,d)}function MMU_GetHighlightElement(b){var a=null;a=document.getElementById(b.id+"_t");if(a!=null){return a}else{return b}}function MMU_GetMenuFromClientId(a){return document.getElementById(a)}var g_MMU_theFormActionAtPageLoad=null;var g_MMU_theFormActionAtPreMenuOpen=null;var g_MMU_Form0ActionAtPageLoad=null;var g_MMU_Form0ActionAtPreMenuOpen=null;function MMU_CallbackPreMenuOpen(templateClientId,menuClientId,callbackEventReference,timeoutLength,timeoutMessage,e){try{g_MMU_theFormActionAtPreMenuOpen=(theForm!=null?theForm.action:"null");g_MMU_Form0ActionAtPreMenuOpen=(document.forms!=null&&document.forms.length>0?document.forms[0].action:"null");var menuTemplate=document.getElementById(templateClientId);var menuLink=document.getElementById(menuClientId);if((menuLink.getAttribute("suppressBubbleIfPostback")!=null)&&(e!=null)&&(e.srcElement!=null)&&(e.srcElement.href!=null)&&(e.srcElement.href.substr(0,MMU_postbackPrefix.length)==MMU_postbackPrefix)){event.cancelBubble=true;return}MMU_StopPendingTimerEventsFromCallback();MMU_RemoveCallbackItemsFromMenuTemplate(menuTemplate);var menu=document.getElementById(menuClientId);menu.setAttribute("callbackInProgress","true");var loadingMessageMenuItem=CAMOpt(menuTemplate,L_Loading_Text,"null");loadingMessageMenuItem.setAttribute("callbackitem","true");loadingMessageMenuItem.setAttribute("enabled","false");var callbackContext=templateClientId+";"+menuClientId+";"+timeoutMessage.replace(/;/g,"%semi%").replace(/\'/g,"%quot%");callbackEventReference=callbackEventReference.replace(/__CALLBACKCONTEXT__/g,callbackContext);eval(callbackEventReference);g_MMU_RequestTimeoutTimeoutHandle=window.setTimeout("MMU_CallbackErrHandler('timeout', '"+callbackContext+"')",timeoutLength,"javascript")}catch(ex){alert(L_Loading_Error_Text)}}var g_MMU_RequestTimeoutTimeoutHandle=null;function MMU_RemoveCallbackItemsFromMenuTemplate(d){try{for(var b=0;b<d.childNodes.length;b++){var a=d.childNodes[b];if((a.nodeType==1)&&(a.getAttribute("callbackitem")=="true")){d.removeChild(a);--b}}}catch(c){alert(L_Loading_Error_Text)}}function MMU_StopPendingTimerEventsFromCallback(){if(g_MMU_OpenTimeoutHandle!=null){window.clearTimeout(g_MMU_OpenTimeoutHandle);g_MMU_OpenTimeoutHandle=null}if(g_MMU_RequestTimeoutTimeoutHandle!=null){window.clearTimeout(g_MMU_RequestTimeoutTimeoutHandle);g_MMU_RequestTimeoutTimeoutHandle=null}}function MMU_UpdateMenuTemplateWithErrorItem(c,a){MMU_RemoveCallbackItemsFromMenuTemplate(c);var b=CAMOpt(c,a,"null");loadingMessageMenuItem.setAttribute("callbackitem","true");loadingMessageMenuItem.setAttribute("enabled","false")}function MMU_UpdateOpenedMenuWithErrorItem(c,b,a){MMU_UpdateMenuTemplateWithErrorItem(b,a);HideMenu(b);MMU_Open(b,c)}function MMU_CallbackHandler(n,g){MMU_StopPendingTimerEventsFromCallback();var a=MMU_ParseContext(g);var d=document.getElementById(a.TemplateClientId);if(d==null){alert(L_Loading_Error_Text);return}var b=document.getElementById(a.MenuClientId);if(b==null){alert(L_Loading_Error_Text);return}var l="";var h="";var c="";var f="";var k="";var e=n.split(MMU_chDelim);if((e==null)||(e.length!=5)){k=MMU_GenerateErrorMenuItem(L_Loading_Error_Text)}else{var m=new RegExp(MMU_chDelimEnc,"g");l=e[0].replace(m,MMU_chDelim);h=e[1].replace(m,MMU_chDelim);c=e[2].replace(m,MMU_chDelim);f=e[3].replace(m,MMU_chDelim);k=e[4].replace(m,MMU_chDelim)}b.setAttribute("menuItemsDisabled",l);b.setAttribute("menuItemsHidden",h);b.setAttribute("menuItemsChecked",c);b.setAttribute("menuTokenValues",f);MMU_RemoveCallbackItemsFromMenuTemplate(d);d.innerHTML=d.innerHTML+k;HideMenu(d);MMU_Open(d,b);b.setAttribute("callbackInProgress","")}function MMU_CallbackErrHandler(a,e){try{alert(L_Loading_Error_Text);var d=MMU_ParseContext(e);var f=document.getElementById(d.TemplateClientId);if(f==null){alert(L_Loading_Error_Text);return}var g=document.getElementById(d.MenuClientId);if(g==null){alert(L_Loading_Error_Text);return}g.setAttribute("callbackInProgress","");var b=L_Loading_Error_Text;if((a=="timeout")&&(d.TimeoutMessage!=null)&&(d.TimeoutMessage.length>0)){b=d.TimeoutMessage}MMU_UpdateOpenedMenuWithErrorItem(g,f,b)}catch(c){alert(L_Loading_Error_Text)}}function MMU_ParseContext(d){try{var c=new Object();var a=d.split(";");c.TemplateClientId=a[0];c.MenuClientId=a[1];c.TimeoutMessage=a[2].replace(/%semi%/g,";").replace(/%quot%/g,"'");return c}catch(b){alert(L_Loading_Error_Text)}}var L_NewFormLibTb3_Text="The document(s) could not be merged.\nThe required application may not be installed properly, or the template for this document library cannot be opened.\n\nPlease try the following:\n1. Check the General Settings for this document library for the name of the template, and install the application necessary for opening the template. If the application was set to install on first use, run the application and then try creating a new document again.\n\n2.  If you have permission to modify this document library, go to General Settings for the library and configure a new template.";var L_NewFormLibTb4_Text="Select the document(s) you want to merge, and then click 'Merge Selected Documents' on the toolbar.";function combineDocuments(d,c,a){fNewDoc=false;if((browseris.w3c)&&(!browseris.ie)){document.all=document.getElementsByTagName("*")}var h=true;var l;var k;try{var b=document.all.chkCombine;for(i=0;h&&i<b.length;i++){if(b[i].checked&&h){h=false;l=document.all.chkUrl[i].HREF;k=document.all.chkProgID[i].HREF}}}catch(g){}try{if(h&&document.all.chkCombine.checked){h=false;l=document.all.chkUrl.HREF;k=document.all.chkProgID.HREF}}catch(g){}if(!h){var m=false;try{NewDocumentButton=new ActiveXObject(k);fNewDoc=NewDocumentButton!=null}catch(g){}if(!fNewDoc){alert(L_NewFormLibTb3_Text)}else{try{m=NewDocumentButton.MergeDocuments(l,document.all.chkCombine,makeAbsUrl(a))}catch(f){}if(!m){alert(L_NewFormLibTb3_Text)}else{window.onfocus=RefreshOnFocus}}}else{alert(L_NewFormLibTb4_Text)}}var L_NewFormLibTb5_Text="Select the document(s) you want to relink, and then click 'Relink Selected Documents' on the toolbar.";var L_NewFormLibTb6_Text="Only 500 documents can be relinked at a time. Modify your selection and then try again.";function repairLinks(c,f,g){if((browseris.w3c)&&(!browseris.ie)){document.all=document.getElementsByTagName("*")}var e=0;var d=document.all.SubmitRepairDocs;d.value="";var a=document.getElementsByTagName("input");for(var b=0;b<a.length;b++){if(a[b].id=="chkRepair"){if(a[b].checked){d.value+=a[b].getAttribute("docID");d.value+=" ";e++}}}if(e>0&&e<=500){document.all.SubmitRepairRedirectList.value=f;document.all.SubmitRepairRedirectFolder.value=c;document.all.SubmitRepairDocsForm.action=g+"/submitrepair.aspx";document.all.SubmitRepairDocsForm.submit()}else{alert(e==0?L_NewFormLibTb5_Text:L_NewFormLibTb6_Text)}}function NavigateToManageCopiesPage(a,b){STSNavigate(a+"/_layouts/managecopies.aspx?ItemUrl="+b+"&Source="+GetSource())}var L_ViewVersion_Text="View";var L_RestoreVersion_Text="Restore";var L_DeleteVersion_Text="Delete";var L_DenyVersion_Text="Reject this version";var L_UnPublishVersion_Text="Unpublish this version";function AddVersionMenuItemsCore(a,d){if(currentItemID!=null){var h=currentItemID.toString();if(h.indexOf(".0.")>=0){return}}if(!HasRights(0,64)){return}var e;var c=itemTable.getAttribute("isCur");var b=itemTable.getAttribute("Level");var g=itemTable.getAttribute("canViewProperty");if(currentItemFSObjType==null){currentItemFSObjType=GetAttributeFromItemTable(itemTable,"OType","FSObjType")}if(g!="0"){e=CAMOpt(a,L_ViewVersion_Text,"javascript:ViewVersion()","");e.id="ID_ViewVersion"}if(HasRights(0,4)){e=CAMOpt(a,L_RestoreVersion_Text,"javascript:RestoreVersion()","");e.id="ID_RestoreVersion"}if(HasRights(0,128)&&c!="1"){e=CAMOpt(a,L_DeleteVersion_Text,"javascript:DeleteVersion()","");e.id="ID_DeleteVersion"}if(HasRights(0,16)&&HasRights(0,4)){if((d.isModerated||d.EnableMinorVersions)&&(currentItemFSObjType!=1)&&(b==1&&c=="1")){var f=L_DenyVersion_Text;if(d.EnableMinorVersions){f=L_UnPublishVersion_Text}e=CAMOpt(a,f,"javascript:TakeOfflineVersion()","");e.id="ID_TakeOfflineVersion"}}}function ViewVersion(){if(!IsContextSet()){return}STSNavigate(itemTable.getAttribute("verUrl"))}var L_Version_Restore_Confirm_Text="You are about to replace the current version with the selected version.";var 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.";var L_Version_NoRestore_Current_ERR="Cannot restore the current version.";function RestoreVersion(){if(!IsContextSet()){return}var a=currentCtx;if(itemTable.getAttribute("isMostCur")!="0"){alert(L_Version_NoRestore_Current_ERR)}else{var b=a.HttpPath+"&op=Restore&ver="+itemTable.getAttribute("verId");if(confirm(a.verEnabled?L_Version_Restore_Confirm_Text:L_Version_RestoreVersioningOff_Confirm_Text)){SubmitFormPost(b)}}}var L_Version_NoOffline_NonCurrent_ERR="You can only take offline the current published or approved version";var L_Version_unpublish_Confirm_Text="Are you sure you want to unpublish this version of the document?";var L_Version_deny_Confirm_Text="Are you sure you want to deny this version of the document?";function TakeOfflineVersion(){if(!IsContextSet()){return}var b=currentCtx;var a=L_Version_deny_Confirm_Text;if(b.EnableMinorVersions){a=L_Version_unpublish_Confirm_Text}if(itemTable.getAttribute("isCur")!="1"||itemTable.getAttribute("Level")!=1){alert(L_Version_NoOffline_NonCurrent_ERR)}else{if(confirm(a)){SubmitFormPost(b.HttpPath+"&op=TakeOffline")}}}var L_Version_Delete_Confirm_Text="Are you sure you want to delete this version?";var L_Version_Recycle_Confirm_Text="Are you sure you want to send this version to the site Recycle Bin?";var L_Version_NoDelete_Current_ERR="You cannot delete the current checked in version, major version, or approved version.";function DeleteVersion(){if(!IsContextSet()){return}var a=currentCtx;if(itemTable.getAttribute("isCur")!="0"){alert(L_Version_NoDelete_Current_ERR)}else{var b=a.HttpPath+"&op=Delete&ver="+itemTable.getAttribute("verId");if(confirm(a.RecycleBinEnabled?L_Version_Recycle_Confirm_Text:L_Version_Delete_Confirm_Text)){SubmitFormPost(b)}}}var L_Version_DeleteAll_Confirm_Text="Are you sure you want to delete all previous versions associated with this file?";var L_Version_RecycleAll_Confirm_Text="Are you sure you want to send all previous versions associated with this file to the site Recycle Bin?";var L_Version_DeleteAllMinor_Confirm_Text="Are you sure you want to delete all previous draft versions of this file?";var L_Version_RecycleAllMinor_Confirm_Text="Are you sure you want to send all previous draft versions of this file to the site Recycle Bin?";var 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(b.RecycleBinEnabled?L_Version_RecycleAll_Confirm_Text:L_Version_DeleteAll_Confirm_Text)){SubmitFormPost(b.HttpPath+"&op=DeleteAll")}}}function DeleteAllMinorVersions(a,b){if(a<=1){alert(L_Version_NoDeleteAll_None_ERR)}else{if(confirm(b.RecycleBinEnabled?L_Version_RecycleAllMinor_Confirm_Text:L_Version_DeleteAllMinor_Confirm_Text)){SubmitFormPost(b.HttpPath+"&op=DeleteAllMinor")}}}function EditInGrid(b,a){EnsureListControl();if(fListControl){encViewId=escapeProperly(a);strDocUrl=b+"?ShowInGrid=True&View="+encViewId;pageView=GetUrlKeyValue("PageView",true);if(pageView!=""){strDocUrl=strDocUrl+"&PageView="+pageView}showWebPart=GetUrlKeyValue("ShowWebPart",true);if(showWebPart!=""){strDocUrl=strDocUrl+"&ShowWebPart="+showWebPart}viewId=GetUrlKeyValue("View",true);if((viewId.toUpperCase()==a.toUpperCase())||(viewId.toUpperCase()==encViewId.toUpperCase())){rootFolder=GetUrlKeyValue("RootFolder",true);if(rootFolder!=""){strDocUrl=strDocUrl+"&RootFolder="+rootFolder}}SubmitFormPost(strDocUrl)}else{if(!fListErrorShown){alert(L_EditInGrid_Text);fListErrorShown=true}}}function ExitGrid(e){var c;var d;var b;var a;c=e;d=GetUrlKeyValue("PageView",true);b=GetUrlKeyValue("View",true);if(b!=""){c=c+"?View="+b;a=GetUrlKeyValue("RootFolder",true);if(a!=""){c=c+"&RootFolder="+a}if(d!=""){c=c+"&PageView="+d}showWebPart=GetUrlKeyValue("ShowWebPart",true);if(showWebPart!=""){c=c+"&ShowWebPart="+showWebPart}c=c+"&ShowInGrid=HTML"}else{c=c+"?ShowInGrid=HTML";if(d!=""){c=c+"&PageView="+d}showWebPart=GetUrlKeyValue("ShowWebPart",true);if(showWebPart!=""){c=c+"&ShowWebPart="+showWebPart}}SubmitFormPost(c)};
//init
function Browseris(){var c=navigator.userAgent.toLowerCase();this.osver=1;if(c){var a=c.substring(c.indexOf("windows ")+11);this.osver=parseFloat(a)}this.major=parseInt(navigator.appVersion);this.nav=((c.indexOf("mozilla")!=-1)&&((c.indexOf("spoofer")==-1)&&(c.indexOf("compatible")==-1)));this.nav6=this.nav&&(this.major==5);this.nav6up=this.nav&&(this.major>=5);this.nav7up=false;if(this.nav6up){var b=c.indexOf("netscape/");if(b>=0){this.nav7up=parseInt(c.substring(b+9))>=7}}this.ie=(c.indexOf("msie")!=-1);this.aol=this.ie&&c.indexOf(" aol ")!=-1;if(this.ie){var d=c.substring(c.indexOf("msie ")+5);this.iever=parseInt(d);this.verIEFull=parseFloat(d)}else{this.iever=0}this.ie4up=this.ie&&(this.major>=4);this.ie5up=this.ie&&(this.iever>=5);this.ie55up=this.ie&&(this.verIEFull>=5.5);this.ie6up=this.ie&&(this.iever>=6);this.winnt=((c.indexOf("winnt")!=-1)||(c.indexOf("windows nt")!=-1));this.win32=((this.major>=4)&&(navigator.platform=="Win32"))||(c.indexOf("win32")!=-1)||(c.indexOf("32bit")!=-1);this.mac=(c.indexOf("mac")!=-1);this.w3c=this.nav6up;this.safari=(c.indexOf("safari")!=-1);this.safari125up=false;if(this.safari&&this.major>=5){var b=c.indexOf("safari/");if(b>=0){this.safari125up=parseInt(c.substring(b+7))>=125}}}var browseris=new Browseris();var bis=browseris;function byid(a){return document.getElementById(a)}function newE(a){return document.createElement(a)}function wpf(){return document.forms[MSOWebPartPageFormName]}function startReplacement(){}function GetEventSrcElement(a){if(browseris.nav){return a.target}else{return a.srcElement}}function GetEventKeyCode(a){if(browseris.nav){return a.which}else{return a.keyCode}}function GetInnerText(a){if(browseris.safari){return a.innerHTML}else{if(browseris.nav){return a.textContent}else{return a.innerText}}}var UTF8_1ST_OF_2=192;var UTF8_1ST_OF_3=224;var UTF8_1ST_OF_4=240;var UTF8_TRAIL=128;var HIGH_SURROGATE_BITS=55296;var LOW_SURROGATE_BITS=56320;var SURROGATE_6_BIT=64512;var SURROGATE_ID_BITS=63488;var SURROGATE_OFFSET=65536;function escapeProperlyCoreCore(j,g,e,c){var k="";var f="";var d=0;var h=" \"%<>'&";if(typeof(j)=="undefined"){return""}for(d=0;d<j.length;d++){var l=j.charCodeAt(d);var a=j.charAt(d);if(g&&(a=="#"||a=="?")){k+=j.substr(d);break}if(e&&a=="&"){k+=a;continue}if(l<=127){if(c){k+=a}else{if((l>=97&&l<=122)||(l>=65&&l<=90)||(l>=48&&l<=57)||(g&&(l>=32&&l<=95)&&h.indexOf(a)<0)){k+=a}else{if(l<=15){k+="%0"+l.toString(16).toUpperCase()}else{if(l<=127){k+="%"+l.toString(16).toUpperCase()}}}}}else{if(l<=2047){f=UTF8_1ST_OF_2|(l>>6);k+="%"+f.toString(16).toUpperCase();f=UTF8_TRAIL|(l&63);k+="%"+f.toString(16).toUpperCase()}else{if((l&SURROGATE_6_BIT)!=HIGH_SURROGATE_BITS){f=UTF8_1ST_OF_3|(l>>12);k+="%"+f.toString(16).toUpperCase();f=UTF8_TRAIL|((l&4032)>>6);k+="%"+f.toString(16).toUpperCase();f=UTF8_TRAIL|(l&63);k+="%"+f.toString(16).toUpperCase()}else{if(d<j.length-1){var l=(l&1023)<<10;d++;var b=j.charCodeAt(d);l|=b&1023;l+=SURROGATE_OFFSET;f=UTF8_1ST_OF_4|(l>>18);k+="%"+f.toString(16).toUpperCase();f=UTF8_TRAIL|((l&258048)>>12);k+="%"+f.toString(16).toUpperCase();f=UTF8_TRAIL|((l&4032)>>6);k+="%"+f.toString(16).toUpperCase();f=UTF8_TRAIL|(l&63);k+="%"+f.toString(16).toUpperCase()}}}}}return k}function escapeProperly(a){return escapeProperlyCoreCore(a,false,false,false)}function escapeProperlyCore(b,a){return escapeProperlyCoreCore(b,a,false,false)}function escapeUrlForCallback(d){var b=d.indexOf("#");var c=d.indexOf("?");if((b>0)&&((c==-1)||(b<c))){var a=d.substr(0,b);if(c>0){a+=d.substr(c)}d=a}return escapeProperlyCoreCore(d,true,false,true)}function PageUrlValidation(a){if(a.substr(0,4)!="http"&&a.substr(0,1)!="/"){var b="Invalid page URL: ";alert(b);return""}else{return a}}function DeferCall(){if(arguments.length==0){return null}var args=arguments;var fn=null;if(browseris.ie5up||browseris.nav6up){eval("if (typeof("+args[0]+")=='function') { fn="+args[0]+"; }")}if(fn==null){return null}if(args.length==1){return fn()}else{if(args.length==2){return fn(args[1])}else{if(args.length==3){return fn(args[1],args[2])}else{if(args.length==4){return fn(args[1],args[2],args[3])}else{if(args.length==5){return fn(args[1],args[2],args[3],args[4])}else{if(args.length==6){return fn(args[1],args[2],args[3],args[4],args[5])}else{if(args.length==7){return fn(args[1],args[2],args[3],args[4],args[5],args[6])}else{if(args.length==8){return fn(args[1],args[2],args[3],args[4],args[5],args[6],args[7])}else{if(args.length==9){return fn(args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8])}else{if(args.length==10){return fn(args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8],args[9])}else{var L_TooManyDefers_Text="Too many arguments passed to DeferCall";alert(L_TooManyDefers_Text)}}}}}}}}}}return null}var L_ContainIllegalChar_Text="^1 contains illegal character '^2'.";var L_ContainIllegalString_Text="^1 contains illegal characters or substring.";var LegalUrlChars=new Array(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,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);function AdmBuildParam(a){var c;var b;for(b=1;b<AdmBuildParam.arguments.length;b++){c=new RegExp("\\^"+b);a=a.replace(c,AdmBuildParam.arguments[b])}return a}function IndexOfIllegalCharInUrlLeafName(c){for(var a=0;a<c.length;a++){var b=c.charCodeAt(a);if(c.charAt(a)=="."&&(a==0||a==(c.length-1))){return a}if(b<160&&(c.charAt(a)=="/"||!LegalUrlChars[b])){return a}}return -1}function IndexOfIllegalCharInUrlPath(c){for(var a=0;a<c.length;a++){var b=c.charCodeAt(a);if(b<160&&!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(c,a){var d="";if(typeof(c.MessagePrefix)=="string"){d=c.MessagePrefix}else{d=c.id}var b=IndexOfIllegalCharInUrlLeafName(a.Value);if(b>=0){if(typeof(c.errormessage)=="string"){c.errormessage=AdmBuildParam(L_ContainIllegalChar_Text,d,a.Value.charAt(b))}a.IsValid=false}else{if(UrlContainsIllegalStrings(a.Value)){if(typeof(c.errormessage)=="string"){c.errormessage=AdmBuildParam(L_ContainIllegalString_Text,d)}a.IsValid=false}else{a.IsValid=true}}}function UrlPathValidate(c,a){var d="";if(typeof(c.MessagePrefix)=="string"){d=c.MessagePrefix}else{d=c.id}var b=IndexOfIllegalCharInUrlPath(a.Value);if(b>=0){if(typeof(c.errormessage)=="string"){c.errormessage=AdmBuildParam(L_ContainIllegalChar_Text,d,a.Value.charAt(b))}a.IsValid=false}else{if(UrlContainsIllegalStrings(a.Value)){if(typeof(c.errormessage)=="string"){c.errormessage=AdmBuildParam(L_ContainIllegalString_Text,d)}a.IsValid=false}else{a.IsValid=true}}}function IsCheckBoxListSelected(c){if(c==null){return false}var a=c.length;if(a==null){return c.checked}else{for(var b=0;b<a;b++){if(c[b].checked){return true}}}return false}function STSValidatorEnable(d,c,b){var a=document.getElementById(d);if(a==null){return}if(b==true||(a.getAttribute("AlwaysEnableSilent")==true)){a.enabled=(c==true)}else{ValidatorEnable(a,c)}}function encodeScriptQuote(d){var c="";var a=0;for(a=0;a<d.length;a++){var b=d.charAt(a);if(b=="'"){c+="%27"}else{c+=b}}return c}function STSHtmlEncode(d){var c="";var a=0;for(a=0;a<d.length;a++){var b=d.charAt(a);switch(b){case"<":c+="&lt;";break;case">":c+="&gt;";break;case"&":c+="&amp;";break;case'"':c+="&quot;";break;case"'":c+="&#39;";break;default:c+=b;break}}return c}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 c="";var b=0;for(b=0;b<d.length;b++){var a=d.charCodeAt(b);if(a>4095){c+=("\\u"+a.toString(16).toUpperCase())}else{if(a>255){c+=("\\u0"+a.toString(16).toUpperCase())}else{if(a>127){c+=("\\u00"+a.toString(16).toUpperCase())}else{switch(d.charAt(b)){case"\n":c+="\\n";break;case"\r":c+="\\r";break;case'"':c+="\\u0022";break;case"%":c+="\\u0025";break;case"&":c+="\\u0026";break;case"'":c+="\\u0027";break;case"(":c+="\\u0028";break;case")":c+="\\u0029";break;case"+":c+="\\u002b";break;case"/":c+="\\u002f";break;case"<":c+="\\u003c";break;case">":c+="\\u003e";break;case"\\":c+="\\\\";break;default:c+=d.charAt(b)}}}}}return c}function STSScriptEncodeWithQuote(a){return'"'+STSScriptEncode(a)+'"'}var SPOnError_cachedOriginalOnError=window.onerror;var L_PleaseWaitForScripts_Text="Please wait while scripts are loaded...";var g_pageLoadComplete=false;var previousRSChange="";if(document.onreadystatechange!=null){previousRSChange=document.onreadystatechange}document.onreadystatechange=setLoadComplete;function setLoadComplete(){if(previousRSChange!=null&&previousRSChange!=""){eval(previousRSChange)}if(document.readyState=="complete"){g_pageLoadComplete=true;window.status="";window.onerror=SPOnError_cachedOriginalOnError}}function SPOnError_handleErrors(f,b,a){var d=false;if(!g_pageLoadComplete&&document.readyState!="complete"){d=true}if(d){try{window.status=L_PleaseWaitForScripts_Text}catch(c){}return true}else{if(typeof(SPOnError_cachedOriginalOnError)=="function"){window.onerror=SPOnError_cachedOriginalOnError;return SPOnError_cachedOriginalOnError(f,b,a)}else{window.onerror=null;return false}}}window.onerror=SPOnError_handleErrors;var L_Language_Text="1033";var 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?";var L_STSRecycleConfirm_Text="Are you sure you want to send this item to the site Recycle Bin?";var L_STSRecycleConfirm1_Text="Are you sure you want to send this folder and all its contents to the site Recycle Bin?";var L_STSDelConfirm_Text="Are you sure you want to delete this item?";var L_STSDelConfirm1_Text="Are you sure you want to delete this folder and all its contents?";var 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.";var L_NewDocLibTb2_Text="'New Document' requires a Windows SharePoint Services-compatible application and Microsoft Internet Explorer 6.0 or greater. To add a document to this document library, click the 'Upload Document' button.";var L_NewFormLibTb1_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.";var L_NewFormLibTb2_Text="This feature requires Microsoft Internet Explorer 6.0 or later and a Windows SharePoint Services-compatible XML editor such as Microsoft Office InfoPath.";var L_ConfirmCheckout_Text="You must check out this item before making changes.  Do you want to check out this item now?";var L_CheckOutRetry_Text="Check out failed, do you want to retry to check out from server?";var L_CannotEditPropertyForLocalCopy_Text="You cannot edit the properties of a document while it is checked out and being modified offline.";var L_CannotEditPropertyCheckout_Text="You cannot edit the properties of this document while it is checked out or locked for editing by another user.";var L_NewFormClickOnce1_Text="New Folder";var L_EnterValidCopyDest_Text="Please enter a valid folder URL and a file name.  Folder URLs must begin with 'http:' or 'https:'.";var L_ConfirmUnlinkCopy_Text="Because this item is a copy, it may still be receiving updates from its source.  You should make sure that this item is removed from the source's list of items to update, otherwise this item may continue to receive updates.  Are you sure that you want to unlink this item?";var L_CopyingOfflineVersionWarning_Text="You currently have this document checked out locally.  Only versions stored on the server can be copied.  To copy the most recent minor version, click OK.  To copy the currently checked out version, click Cancel, check in the document and then retry the copy operation.";var L_Loading_Text="Loading...";var L_Loading_Error_Text="An error has occurred with the data fetch.  Please refresh the page and retry.";var L_WarnkOnce_text="This item contains a custom recurrence pattern.  If you save your changes you will not be able to revert to the previous pattern.";var L_WebFoldersRequired_Text="Please wait while Explorer View is loaded. If Explorer View does not appear, your browser may not support it.";var L_WebFoldersError_Text="Your client does not support opening this list with Windows Explorer.";var L_AccessibleMenu_Text="Menu";var L_NewBlogPost_Text="This feature requires Microsoft Internet Explorer 6.0 or later and a Windows SharePoint Services-compatible blog editor such as Microsoft Office Word 2007 or later.";var L_NewBlogPostFailed_Text="Unable to connect to the blog program because it may be busy or missing. Check the program, and then try again.";var recycleBinEnabled=0;var bIsFileDialogView=false;var g_ViewIdToViewCounterMap=new Array();function UpdateAccessibilityUI(){var b=document.getElementById("TurnOnAccessibility");var a=document.getElementById("TurnOffAccessibility");if(IsAccessibilityFeatureEnabled()){if(b!=null){b.style.display="none"}if(a!=null){a.style.display=""}}else{if(b!=null){b.style.display=""}if(a!=null){a.style.display="none"}}}function SetIsAccessibilityFeatureEnabled(a){if(a){document.cookie="WSS_AccessibilityFeature=true;path=;"}else{document.cookie="WSS_AccessibilityFeature=false;path=;"}}function DeleteCookie(a){document.cookie=a+"=; expires=Thu, 01-Jan-70 00:00:01 GMT"}function GetCookie(d){var b=document.cookie.split("; ");for(var c=0;c<b.length;c++){var a=b[c].split("=");if(d==a[0]){if(a.length>1){return unescapeProperly(a[1])}else{return null}}}return null}function IsAccessibilityFeatureEnabled(){return GetCookie("WSS_AccessibilityFeature")=="true"}function escapeForSync(g){var f="";var c=0;var d=0;var b="\\&|[]";for(c=0;c<g.length;c++){var a=g.charCodeAt(c);var e=g.charAt(c);if(d&&a<=127){f+="]";d=0}if(!d&&a>127){f+="[";d=1}if(b.indexOf(e)>=0){f+="|"}if((a>=97&&a<=122)||(a>=65&&a<=90)||(a>=48&&a<=57)){f+=e}else{if(a<=15){f+="%0"+a.toString(16).toUpperCase()}else{if(a<=127){f+="%"+a.toString(16).toUpperCase()}else{if(a<=255){f+="00"+a.toString(16).toUpperCase()}else{if(a<=4095){f+="0"+a.toString(16).toUpperCase()}else{f+=a.toString(16).toUpperCase()}}}}}}if(d){f+="]"}return f}var g_rgdwchMinEncoded=new Array([0,128,2048,65536,2097152,67108864,2147483648]);function Vutf8ToUnicode(f){var d=0;var b="";var h,e,g;var a,c;while(d<f.length){if(f[d]<=127){b+=String.fromCharCode(f[d++])}else{g=f[d++];a=((g)&32)?(((g)&16)?3:2):1;h=g&(255>>>(2+a));while(a&&(d<f.length)){--a;g=f[d++];if(g==0){return b}if((g&192)!=128){b+="?";break}h=(h<<6)|((g)&63)}if(a){b+="?";break}if(h<g_rgdwchMinEncoded[c]){b+="?";break}else{if(h<=65535){b+=String.fromCharCode(h)}else{if(h<=1114111){h-=SURROGATE_OFFSET;b+=String.fromCharCode(HIGH_SURROGATE_BITS|h>>>10);b+=String.fromCharCode(LOW_SURROGATE_BITS|((h)&1023))}else{b+="?"}}}}}return b}function unescapeProperlyInternal(h){if(h==null){return"null"}var d=0,e=0;var a="";var g=new Array;var c=0;var b,f;while(d<h.length){if(h.charAt(d)=="%"){if(h.charAt(++d)=="u"){b="";for(e=0;e<4&&d<h.length;++e){b+=h.charAt(++d)}while(b.length<4){b+="0"}f=parseInt(b,16);if(isNaN(f)){a+="?"}else{a+=String.fromCharCode(f)}}else{b="";for(e=0;e<2&&d<h.length;++e){b+=h.charAt(d++)}while(b.length<2){b+="0"}f=parseInt(b,16);if(isNaN(f)){if(c){a+=Vutf8ToUnicode(g);c=0;g.length=c}a+="?"}else{g[c++]=f}}}else{if(c){a+=Vutf8ToUnicode(g);c=0;g.length=c}a+=h.charAt(d++)}}if(c){a+=Vutf8ToUnicode(g);c=0;g.length=c}return a}function unescapeProperly(b){var a=null;if((browseris.ie55up||browseris.nav6up)&&(typeof(decodeURIComponent)!="undefined")){a=decodeURIComponent(b)}else{a=unescapeProperlyInternal(b)}return a}function navigateMailToLink(d){var e="";for(ix=0;ix<d.length;ix++){var a=d.charAt(ix);var c;var b;if(a=="%"){c=d.charAt(ix+1);c+=d.charAt(ix+2);b=c.toLowerCase();if(b=="3a"||b=="2f"||b=="2e"||b=="2d"||b=="3d"){e+=a}else{e+=a;e+="25"}}else{e+=a}}window.location=e}function newBlogPostOnClient(g,d,b){var a;var c;a=StsOpenEnsureEx("SharePoint.OpenDocuments.3");if(a==null){alert(L_NewBlogPost_Text);return}try{c=a.NewBlogPost(g,d,b)}catch(f){alert(L_NewBlogPostFailed_Text)}}function GetUrlFromWebUrlAndWebRelativeUrl(b,c){var a=(b==null||b.length<=0)?"/":b;if(a.charAt(a.length-1)!="/"){a+="/"}a+=c;return a}var g_updateFormDigestPageLoaded=new Date();function UpdateFormDigest(n,d){try{if((g_updateFormDigestPageLoaded==null)||(typeof(g_updateFormDigestPageLoaded)!="object")){return}var b=new Date();if(b.getTime()-g_updateFormDigestPageLoaded.getTime()<d){return}if((n==null)||(n.length<=0)){return}var l=document.getElementsByName("__REQUESTDIGEST")[0];if((l==null)||(l.tagName.toLowerCase()!="input")||(l.type.toLowerCase()!="hidden")||(l.value==null)||(l.value.length<=0)){return}var g=null;try{g=new ActiveXObject("Msxml2.XMLHTTP")}catch(k){g=null}if(g==null){try{g=new XMLHttpRequest()}catch(k){g=null}}if(g==null){return}g.open("POST",GetUrlFromWebUrlAndWebRelativeUrl(n,"_vti_bin/sites.asmx"),false);g.setRequestHeader("Content-Type","text/xml");g.setRequestHeader("SOAPAction","http://schemas.microsoft.com/sharepoint/soap/GetUpdatedFormDigest");g.send('<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">  <soap:Body>    <GetUpdatedFormDigest xmlns="http://schemas.microsoft.com/sharepoint/soap/" />  </soap:Body></soap:Envelope>');var j=g.responseText;if((j==null)||(j.length<=0)){return}var m="<GetUpdatedFormDigestResult>";var f="</GetUpdatedFormDigestResult>";var h=j.indexOf(m);var e=j.indexOf(f,h+m.length);var c=null;if((h>=0)&&(e>h)){var c=j.substring(h+m.length,e)}if((c==null)||(c.length<=0)){return}var a=l.value;l.value=c}catch(k){}}function GetStssyncHandler(a){var c;try{c=new ActiveXObject("SharePoint.StssyncHandler"+a)}catch(b){c=null}return c}function GetStssyncAppNameForType(e,d){if(browseris.ie5up&&browseris.win32){var b;var f=null;if(e!=""){f=GetStssyncHandler(".3")}if(!f){if(e!=""&&e!="calendar"&&e!="contacts"){return false}f=GetStssyncHandler(".2");if(!f||!(b=f.GetStssyncAppName())){return false}}else{if(!(b=f.GetStssyncAppNameForType(e))){return false}}var a="Connect to ";var c="";return a+b+c}else{return d}}function GetStssyncIconPath(b,c){if(browseris.ie5up&&browseris.win32){var a;var f=null;f=GetStssyncHandler(".3");if(!f){return false}try{a=f.GetStssyncIconName();return c+a}catch(d){return b}}else{return b}}function GetStssyncAppName(a){return GetStssyncAppNameForType("",a)}function ExportHailStorm(l,f,m,c,o,h,r,s,b,q){var p=500;var g=20;var n="stssync://sts/?ver=1.1&type="+escapeProperly(l)+"&cmd=add-folder&base-url="+escapeForSync(f)+"&list-url="+escapeForSync("/"+makeAbsUrl(h).substr(f.length+1)+"/")+"&guid="+escapeProperly(m);var k="&site-name="+escapeForSync(c)+"&list-name="+escapeForSync(o);var d="";if(b){d+="&folder-url="+escapeForSync("/"+b.substr(s.length+1))}if(q){d+="&folder-id="+q}if(n.length+k.length+d.length>p&&(c.length>g||o.length>g)){if(c.length>g){c=c.substring(0,g-1)+"..."}if(o.length>g){o=o.substring(0,g-1)+"..."}k="&site-name="+escapeForSync(c)+"&list-name="+escapeForSync(o)}n=n+k+d;var a="The title of the site or list is too long. Shorten the title and try again.";if(n.length>p){alert(a)}else{try{window.location.href=n}catch(j){}}}function GetDiagramLaunchInstalled(){var c;var b=false;try{c=new ActiveXObject("DiagramLaunch.DiagramLauncher");var a;a=c.EnsureDiagramApplication()}catch(d){c=null}return a}var fSSImporter=false;var SSImporterObj;function EnsureSSImporter(){if(!fSSImporter){if(browseris.ie5up&&browseris.win32){var a='try{    SSImporterObj=new ActiveXObject("SharePoint.SpreadsheetLauncher.2");    if (SSImporterObj)        fSSImporter=true;} catch (e){try{    SSImporterObj=new ActiveXObject("SharePoint.SpreadsheetLauncher.1");    if (SSImporterObj)        fSSImporter=true;} catch (e){    fSSImporter=false;};};';var b=new Function(a);b()}}return fSSImporter}function ShowHideSection(c,a){var d=document.getElementById(c);var b=document.getElementById(a);if((d==null)){return}if(d.style.display!="none"){d.style.display="none";b.src="/_layouts/images/plus.gif"}else{d.style.display="";b.src="/_layouts/images/minus.gif"}}function ShowSection(c,a){var d=document.getElementById(c);var b=document.getElementById(a);if((d==null)){return}if(d.style.display=="none"){d.style.display="";b.src="/_layouts/images/minus.gif"}}function ShowHideInputFormSection(c,a){var d=document.getElementById(c);if(d!=null){d.style.display=a?"":"none"}for(var b=1;b<3;b++){d=document.getElementById(c+"_tablerow"+b);if(d!=null){d.style.display=a?"":"none"}}}function ShowHideInputFormControl(id,bHide,bDisableValidators,bSilent){var displaySetting="";if(bHide==true){displaySetting="none"}var validators=eval(id+"_validators");if(validators!=null){for(var i=0;i<validators.length;i++){STSValidatorEnable(validators[i],!bDisableValidators,bSilent)}}for(var i=1;i<=5;i++){var rowId=id+"_tablerow"+i;var row=document.getElementById(rowId);if((row!=null)&&!browseris.mac){row.style.display=displaySetting}}}function SetControlDisabledStatus(c,a){try{if(c.setAttribute){c.setAttribute("disabled",a)}if(!a&&c.removeAttribute){c.removeAttribute("disabled")}}catch(b){}}function SetControlDisabledStatusRecursively(d,a){if(d==null){return}SetControlDisabledStatus(d,a);var c=d.childNodes;for(var b=0;c.length>b;b++){SetControlDisabledStatusRecursively(c.item(b),a)}}function SetChildControlsDisabledStatus(d,a){var c=d.childNodes;for(var b=0;b<c.length;b++){SetControlDisabledStatusRecursively(c.item(b),a)}}var g_PNGImageIds;var g_PNGImageSources;function displayPNGImage(f,e,c,a,d){if(g_PNGImageIds==null){g_PNGImageIds=new Array()}if(g_PNGImageSources==null){g_PNGImageSources=new Array()}var b=null;document.write("<IMG id='"+f+"' ");if(c&&c>0){document.write("width='"+c+"' ")}if(a&&a>0){document.write("height='"+a+"' ")}document.write("alt='"+d+"' ");if(b){document.write("style='"+b+"' ")}document.write(" src='"+e+"' />");g_PNGImageIds.push(f);g_PNGImageSources.push(e)}function ProcessPNGImages(){var a=browseris.ie&&browseris.ie55up&&browseris.verIEFull<7;if(g_PNGImageIds!=null&&a){for(var c=0;c<g_PNGImageIds.length;c++){var b=document.getElementById(g_PNGImageIds[c]);if(b!=null&&g_PNGImageSources[c]!=null){b.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+g_PNGImageSources[c]+"),sizingMethod=scale);";b.src="/_layouts/images/blank.gif"}}}}var CTXTYPE_EDITMENU=0;var CTXTYPE_VIEWSELECTOR=1;function ContextInfo(){this.listBaseType=null;this.listTemplate=null;this.listName=null;this.view=null;this.listUrlDir=null;this.HttpPath=null;this.HttpRoot=null;this.serverUrl=null;this.imagesPath=null;this.PortalUrl=null;this.RecycleBinEnabled=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;this.CurrentUserId=null;this.isForceCheckout=false;this.EnableMinorVersions=false;this.ModerationStatus=0;this.verEnabled=0;this.isVersions=0;this.WorkflowsAssociated=false;this.ContentTypesEnabled=false;this.SendToLocationName="";this.SendToLocationUrl=""}function STSPageUrlValidation(a){return PageUrlValidation(a)}function GetSource(a){var b=GetUrlKeyValue("Source");if(b==""){if(a!=null&&a!=""){b=a}else{b=window.location.href}}return escapeProperly(STSPageUrlValidation(b))}function GetUrlKeyValue(d,c,b){var e="";if(b==null){b=window.location.href+""}var a=b.indexOf("&"+d+"=");if(a==-1){a=b.indexOf("?"+d+"=")}if(a!=-1){ndx2=b.indexOf("&",a+1);if(ndx2==-1){ndx2=b.length}e=b.substring(a+d.length+2,ndx2)}if(c){return e}else{return unescapeProperlyInternal(e)}}function LoginAsAnother(a,c){document.cookie="loginAsDifferentAttemptCount=0";if(c=="1"){GoToPage(a)}else{var b=a.indexOf("?")>=0?"&":"?";a+=b+"Source="+escapeProperly(window.location.href);STSNavigate(a)}}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 GoToPage(a){var b=a.indexOf("?")>=0?"&":"?";var c=GetSource();if(c!=null&&c!=""){a+=b+"Source="+c}STSNavigate(a)}function TrimSpaces(c){var d;var b;c=c.toString();var a=c.length;for(d=0;d<a;d++){if(c.charAt(d)!=" "){break}}if(d==a){return""}for(b=a-1;b>d;b--){if(c.charAt(b)!=" "){break}}b++;return c.substring(d,b)}function TrimWhiteSpaces(c){var d;var b;c=c.toString();var a=c.length;for(d=0;d<a;d++){ch=c.charAt(d);if(ch!=" "&&ch!="\t"&&ch!="\n"&&ch!="\r"&&ch!="\f"){break}}if(d==a){return""}for(b=a-1;b>d;b--){ch=c.charAt(b);if(ch!=" "&&ch!="\t"&&ch!="\n"&&ch!="\r"&&ch!="\f"){break}}b++;return c.substring(d,b)}function GetAttributeFromItemTable(d,a,c){var b=d!=null?d.getAttribute(a):null;if(b==null&&d!=null&&c!=null){b=d.getAttribute(c)}return b}function GetDiagramLaunchInstalled(){var c;var b=false;try{c=new ActiveXObject("DiagramLaunch.DiagramLauncher");var a;a=c.EnsureDiagramApplication()}catch(d){c=null}return a}function ShowMtgNavigatorPane(){document.getElementById("MeetingNavigatorPane").style.display="block"}function HideMtgNavigatorPane(){document.getElementById("MeetingNavigatorPane").style.display="none"}function GetMultipleUploadEnabled(){try{if(browseris.ie5up&&!browseris.mac&&(new ActiveXObject("STSUpld.UploadCtl"))){return true}}catch(a){}return false}function SetUploadPageTitle(){if(GetUrlKeyValue("Type")==1){document.title=L_NewFormClickOnce1_Text;if(browseris.ie||browseris.nav6up){var a=document.getElementById("onetidTextTitle");if(a!=null){a.innerHTML=L_NewFormClickOnce1_Text}}}}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 MtgShowTimeZone(){if(GetCookie("MtgTimeZone")=="1"){MtgToggleTimeZone()}}function FormatDate(g,b,a,e){var f="<b>Date:</b>";var d="<b>Time:</b>";var c=" - ";if(browseris.win32&&g==a){c=" -\u200e "}if(g==a){document.write(f+" "+g);if(b!=e){document.write(" "+d+" "+b+c+e)}else{document.write(" "+d+" "+b)}}else{document.write(f+" "+g+" ("+b+")"+c+a+" ("+e+")")}}function GetAlertText(a){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.";var j="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.";var b="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.";var k="This meeting series was canceled from your calendar and scheduling program.";var d="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.";var e="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.";var h="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.";var f="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.";var g="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.";var m=a&(16-1);var l=a-m;if(m){switch(m){case 1:return(g_meetingCount==1)?c:j;case 2:return k;case 3:return j;case 4:return(g_meetingCount==1)?c:b;case 5:return d;case 6:return e;case 7:return h;case 8:return g}}else{if(l){switch(l){case 16:return f}}}return null}function retrieveCurrentThemeLink(){var c;var b=document.getElementsByTagName("link");for(var d=0;d<b.length;d++){if((b[d].type=="text/css")&&(b[d].id=="onetidThemeCSS")){c=b[d]}}if(c){var e=/(\.\.\/)+/;var a=c.href;var f=a.replace(e,"/");return f}}function StBuildParam(a){var c;var b;for(b=1;b<StBuildParam.arguments.length;b++){c=new RegExp("\\^"+b);a=a.replace(c,StBuildParam.arguments[b])}return a}JSRequest={QueryString:null,FileName:null,PathName:null,EnsureSetup:function(){if(JSRequest.QueryString!=null){return}JSRequest.QueryString=new Array();var g=window.location.search.substring(1);var d=g.split("&");for(var b=0;b<d.length;b++){var f=d[b].indexOf("=");if(f>-1){var a=d[b].substring(0,f);var c=d[b].substring(f+1);JSRequest.QueryString[a]=c}}var e=JSRequest.PathName=window.location.pathname;var f=e.lastIndexOf("/");if(f>-1){JSRequest.FileName=e.substring(f+1)}else{JSRequest.PageName=e}}};var ExpGroupWPListName="WSS_ExpGroupWPList";var ExpGroupCookiePrefix="WSS_ExpGroup_";var ExpGroupCookieDelimiter="&";var ExpGroupMaxWP=11;var ExpGroupMaxCookieLength=3960;var g_ExpGroupQueue=new Array();var g_ExpGroupInProgress=false;var g_ExpGroupTable=new Array();var g_ExpGroupNeedsState=false;var g_ExpGroupParseStage=false;function ExpCollGroup(e,b){if(document.getElementById("titl"+e)==null){return}viewTable=document.getElementById("titl"+e).parentNode;if(viewTable==null){return}tbodyTags=viewTable.getElementsByTagName("TBODY");numElts=tbodyTags.length;len=e.length;img=document.getElementById(b);if(img==null){return}srcPath=img.src;index=srcPath.lastIndexOf("/");b=srcPath.slice(index+1);var c=false;if(b=="plus.gif"){c=true;displayStr="";img.src="/_layouts/images/minus.gif"}else{c=false;displayStr="none";img.src="/_layouts/images/plus.gif"}for(var a=0;a<numElts;a++){var d=tbodyTags[a];if((d.id!=null)&&(d.id.length>len+4)&&(e==d.id.slice(4).substr(0,len))){if(c){index=d.id.indexOf("_",len+4);if(index!=-1){index=d.id.indexOf("_",index+1);if(index!=-1){continue}}}d.style.display=displayStr;if(c&&d.id.substr(0,4)=="titl"){imgObj=document.getElementById("img_"+d.id.slice(4));imgObj.src="/_layouts/images/plus.gif"}}}if(!g_ExpGroupParseStage){if(g_ExpGroupNeedsState&&ExpGroupFetchWebPartID(e)!=null){if(c){AddGroupToCookie(e)}else{RemoveGroupFromCookie(e)}}if(c){tbody=document.getElementById("tbod"+e+"_");if(tbody!=null){isLoaded=tbody.getAttribute("isLoaded");if(isLoaded=="false"){ExpGroupFetchData(e)}}}}}function ExpGroupFetchData(c){var a='<tr><td></td><td class="ms-gbload">'+L_Loading_Text+"</td></tr>";ExpGroupRenderData(a,c,"false");if(!g_ExpGroupInProgress){var b=ExpGroupFetchGroupString(c);if(b==null){var a='<tr><td></td><td class="ms-gbload">'+L_Loading_Error_Text+"</td></tr>";ExpGroupRenderData(a,c,"false");if(g_ExpGroupQueue.length>0){ExpGroupFetchData(g_ExpGroupQueue.shift())}return}g_ExpGroupInProgress=true;if(!ExpGroupCallServer(b,c)){if(g_ExpGroupQueue.length>0){ExpGroupFetchData(g_ExpGroupQueue.shift())}}}else{g_ExpGroupQueue.push(c)}}function ExpGroupCallServer(groupString,groupName){var webPartID=ExpGroupFetchWebPartID(groupName);if(webPartID!=null){var functionName="ExpGroupCallServer"+webPartID;var functionCall=functionName+"('"+groupString+"','"+groupName+"')";eval(functionCall)}}function ExpGroupReceiveData(c,e){var d="ctx"+e.substring(0,e.indexOf("-"));var a=c.indexOf('CTXName="');if(a!=-1){if(d!="ctx1"){c=c.replace(/ CTXName=\"ctx1\" /g,' CTXName="'+d+'" ')}}var b=false;if(c.length<4){b=true}else{if(c.substring(0,3)!="<tr"){b=true}}if(b){c="<TR><TD>"+c+"</TD></TR>"}ExpGroupRenderData(c,e,"true");g_ExpGroupInProgress=false;if(g_ExpGroupQueue.length>0){ExpGroupFetchData(g_ExpGroupQueue.shift())}}function ExpGroupRenderData(d,e,a){var c=document.getElementById("tbod"+e+"_");var b=document.createElement("DIV");b.innerHTML='<TABLE><TBODY id="tbod'+e+'_" isLoaded="'+a+'">'+d+"</TBODY></TABLE>";c.parentNode.replaceChild(b.firstChild.firstChild,c)}function ExpGroupFetchGroupString(b){titlTbody=document.getElementById("titl"+b);if(titlTbody==null){return null}else{var a=titlTbody.getAttribute("groupString");return a}}function ExpGroupFetchWebPartID(c){var a=c.substring(0,c.indexOf("-"));var b=document.getElementById("GroupByWebPartID"+a);if(b==null){return null}return b.getAttribute("webPartID")}function RenderActiveX(a){document.write(a)}function OnItem(a){DeferCall("OnItemDeferCall",a)}function OnLink(a){DeferCall("OnLinkDeferCall",a)}function MMU_PopMenuIfShowing(a){DeferCall("MMU_PopMenuIfShowingDeferCall",a)}function OnMouseOverFilter(a){DeferCall("OnMouseOverFilterDeferCall",a)}function MMU_EcbTableMouseOverOut(b,a){DeferCall("MMU_EcbTableMouseOverOutDeferCall",b,a)}function OnMouseOverAdHocFilter(b,a){DeferCall("OnMouseOverAdHocFilterDeferCall",b,a)}function MMU_EcbLinkOnFocusBlur(b,c,a){DeferCall("MMU_EcbLinkOnFocusBlurDeferCall",b,c,a)}function FixTextAlignForBidi(c){if(!browseris.ie){return}var b=document.styleSheets;if(b!=null){for(var a=0;a<b.length;a++){if((b[a]!=null)&&(b[a].rules!=null)){for(var d=0;d<b[a].rules.length;d++){if(b[a].rules[d].selectorText==".ms-vh"||b[a].rules[d].selectorText==".ms-vh2"||b[a].rules[d].selectorText==".ms-vh-icon"||b[a].rules[d].selectorText==".ms-vh-icon-empty"||b[a].rules[d].selectorText==".ms-vh2-nograd"||b[a].rules[d].selectorText==".ms-vh2-nograd-icon"||b[a].rules[d].selectorText==".ms-vh2-nofilter"||b[a].rules[d].selectorText==".ms-vh2-nofilter-icon"||b[a].rules[d].selectorText==".ms-vhImage"){b[a].rules[d].style.textAlign=c}}}}}}var IMNControlObj=null;var bIMNControlInited=false;var IMNDictionaryObj=null;var bIMNSorted=false;var bIMNOnloadAttached=false;var IMNOrigScrollFunc=null;var bIMNInScrollFunc=false;var IMNSortableObj=null;var IMNHeaderObj=null;var IMNNameDictionaryObj=null;var IMNShowOfflineObj=null;function EnsureIMNControl(){if(!bIMNControlInited){if(browseris.ie5up&&browseris.win32){}bIMNControlInited=true;if(IMNControlObj){IMNControlObj.OnStatusChange=IMNOnStatusChange}}return IMNControlObj}function IMNImageInfo(){this.img=null;this.alt=""}var L_IMNOnline_Text="Available";var L_IMNOffline_Text="Offline";var L_IMNAway_Text="Away";var L_IMNBusy_Text="Busy";var L_IMNDoNotDisturb_Text="Do not disturb";var L_IMNIdle_Text="May be away";var L_IMNBlocked_Text="Blocked";var L_IMNOnline_OOF_Text="Available (OOF)";var L_IMNOffline_OOF_Text="Offline (OOF)";var L_IMNAway_OOF_Text="Away (OOF)";var L_IMNBusy_OOF_Text="Busy (OOF)";var L_IMNDoNotDisturb_OOF_Text="Do not disturb (OOF)";var L_IMNIdle_OOF_Text="May be away (OOF)";function IMNGetStatusImage(d,c){var a="blank.gif";var e="";switch(d){case 0:a="imnon.png";e=L_IMNOnline_Text;break;case 11:a="imnonoof.png";e=L_IMNOnline_OOF_Text;break;case 1:if(c){a="imnoff.png";e=L_IMNOffline_Text}else{a="blank.gif";e=""}break;case 12:if(c){a="imnoffoof.png";e=L_IMNOffline_OOF_Text}else{a="blank.gif";e=""}break;case 2:a="imnaway.png";e=L_IMNAway_Text;break;case 13:a="imnawayoof.png";e=L_IMNAway_OOF_Text;break;case 3:a="imnbusy.png";e=L_IMNBusy_Text;break;case 14:a="imnbusyoof.png";e=L_IMNBusy_OOF_Text;break;case 4:a="imnaway.png";e=L_IMNAway_Text;break;case 5:a="imnbusy.png";e=L_IMNBusy_Text;break;case 6:a="imnaway.png";e=L_IMNAway_Text;break;case 7:a="imnbusy.png";e=L_IMNBusy_Text;break;case 8:a="imnaway.png";e=L_IMNAway_Text;break;case 9:a="imndnd.png";e=L_IMNDoNotDisturb_Text;break;case 15:a="imndndoof.png";e=L_IMNDoNotDisturb_OOF_Text;break;case 10:a="imnbusy.png";e=L_IMNBusy_Text;break;case 16:a="imnidle.png";e=L_IMNIdle_Text;break;case 17:a="imnidleoof.png";e=L_IMNIdle_OOF_Text;break;case 18:a="imnblocked.png";e=L_IMNBlocked_Text;break;case 19:a="imnidlebusy.png";e=L_IMNBusy_Text;break;case 20:a="imnidlebusyoof.png";e=L_IMNBusy_OOF_Text;break}var b=new IMNImageInfo();b.img=a;b.alt=e;return b}function IMNGetHeaderImage(){var a=new IMNImageInfo();a.img="imnhdr.gif";a.alt="";return a}function IMNIsOnlineState(a){if(a==1){return false}return true}function IMNSortList(d,c,e){var b=null;var a=null;if(IMNSortableObj&&IMNSortableObj[d]){a=document.getElementById(d);while(a&&!(a.tagName=="TR"&&typeof(a.Sortable)!="undefined")){a=a.parentNode}b=a;while(b&&b.tagName!="TABLE"){b=b.parentNode}if(b!=null&&a!=null){if(b.rows[1].style.display=="none"){for(i=1;i<4;i++){b.rows[i].style.display="block"}}if(!IMNIsOnlineState(c)&&IMNIsOnlineState(e)){b.rows[2].style.display="none";i=3;while(b.rows[i].id!="Offline"&&b.rows[i].innerText<a.innerText){i++}b.moveRow(a.rowIndex,i);if(b.rows[b.rows.length-3].id=="Offline"){b.rows[b.rows.length-2].style.display="block"}}else{if(IMNIsOnlineState(c)&&!IMNIsOnlineState(e)){if(a.rowIndex==3&&b.rows[a.rowIndex+1].id=="Offline"){b.rows[2].style.display="block"}if(b.rows[b.rows.length-3].id=="Offline"){b.rows[b.rows.length-2].style.display="none"}i=b.rows.length-2;while(b.rows[i-1].id!="Offline"&&b.rows[i].innerText>a.innerText){i--}b.moveRow(a.rowIndex,i)}}}}}function IMNOnStatusChange(b,c,d){if(IMNDictionaryObj){var a=IMNGetStatusImage(c,IMNSortableObj[d]||IMNShowOfflineObj[d]);if(IMNDictionaryObj[d]!=c){if(bIMNSorted){IMNSortList(d,IMNDictionaryObj[d],c)}IMNUpdateImage(d,a);IMNDictionaryObj[d]=c}}}function IMNUpdateImage(b,j){var d=document.images(b);if(d){var e=j.img;var f=j.alt;var a=d.src;var h=a.lastIndexOf("/");var c=a.slice(0,h+1);c+=e;if(a==c&&e!="blank.gif"){return}if(d.altbase){d.alt=d.altbase}else{d.alt=f}var k=browseris.ie&&browseris.ie55up&&browseris.verIEFull<7;var g=(c.toLowerCase().indexOf(".png")>0);if(k){if(g){d.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+c+"),sizingMethod=scale,enabled=true);";d.src="/_layouts/images/blank.gif"}else{d.style.filter="";d.src=c}}else{d.src=c}}}function IMNHandleAccelerator(){if(IMNControlObj){if(event.altKey&&event.shiftKey&&event.keyCode==121){IMNControlObj.DoAccelerator()}}}function IMNImageOnClick(){if(IMNControlObj){IMNShowOOUIKyb();IMNControlObj.DoAccelerator()}}function IMNGetOOUILocation(g){var k=new Object;var b=g;var m=g;var j=0,h=0,c=0;var a=document.dir=="rtl";while(b&&b.tagName!="SPAN"&&b.tagName!="TABLE"){b=b.parentNode}if(b){var d=b.tagName=="TABLE"?b.rows(0).cells(0).childNodes:b.childNodes;var f;for(f=0;f<d.length;++f){if(d.item(f).tagName=="IMG"&&d.item(f).id){m=d.item(f);break}if(d.item(f).tagName=="A"&&d.item(f).childNodes.length>0&&d.item(f).childNodes.item(0).tagName=="IMG"&&d.item(f).childNodes.item(0).id){m=d.item(f).childNodes.item(0);break}}}g=m;while(g){if(a){if(g.scrollWidth>=g.clientWidth+g.scrollLeft){c=g.scrollWidth-g.clientWidth-g.scrollLeft}else{c=g.clientWidth+g.scrollLeft-g.scrollWidth}j+=g.offsetLeft+c}else{j+=g.offsetLeft-g.scrollLeft}h+=g.offsetTop-g.scrollTop;g=g.offsetParent}try{g=window.frameElement;while(g){if(a){if(g.scrollWidth>=g.clientWidth+g.scrollLeft){c=g.scrollWidth-g.clientWidth-g.scrollLeft}else{c=g.clientWidth+g.scrollLeft-g.scrollWidth}j+=g.offsetLeft+c}else{j+=g.offsetLeft-g.scrollLeft}h+=g.offsetTop-g.scrollTop;g=g.offsetParent}}catch(l){}k.objSpan=b;k.objOOUI=m;k.oouiX=j;k.oouiY=h;if(a){k.oouiX+=m.offsetWidth}return k}function IMNShowOOUIMouse(){IMNShowOOUI(0)}function IMNShowOOUIKyb(){IMNShowOOUI(1)}function IMNShowOOUI(c){if(browseris.ie5up&&browseris.win32){var g=window.event.srcElement;var h=g;var a=g;var f=0,e=0;if(EnsureIMNControl()&&IMNNameDictionaryObj){var d=IMNGetOOUILocation(g);h=d.objSpan;a=d.objOOUI;f=d.oouiX;e=d.oouiY;var b=IMNNameDictionaryObj[a.id];if(h){h.onkeydown=IMNHandleAccelerator}IMNControlObj.ShowOOUI(b,c,f,e)}}}function IMNHideOOUI(){if(IMNControlObj){IMNControlObj.HideOOUI();return false}return true}function IMNScroll(){if(!bIMNInScrollFunc){bIMNInScrollFunc=true;IMNHideOOUI()}bIMNInScrollFunc=false;if(IMNOrigScrollFunc==IMNScroll){return true}return IMNOrigScrollFunc?IMNOrigScrollFunc():true}var imnCount=0;var imnElems;var imnElemsCount=0;var imnMarkerBatchSize=4;var imnMarkerBatchDelay=40;function ProcessImn(){if(EnsureIMNControl()&&IMNControlObj.PresenceEnabled){imnElems=document.getElementsByName("imnmark");imnElemsCount=imnElems.length;ProcessImnMarkers()}}function ProcessImnMarkers(){for(i=0;i<imnMarkerBatchSize;++i){if(imnCount==imnElemsCount){return}IMNRC(imnElems[imnCount].sip,imnElems[imnCount]);imnCount++}setTimeout("ProcessImnMarkers()",imnMarkerBatchDelay)}function IMNRC(b,d){if(b==null||b==""){return}if(browseris.ie5up&&browseris.win32){var f=(d)?d:window.event.srcElement;var e=f;var c=f.id;var j=false;if(!IMNDictionaryObj){IMNDictionaryObj=new Object();IMNNameDictionaryObj=new Object();IMNSortableObj=new Object();IMNShowOfflineObj=new Object();if(!IMNOrigScrollFunc){IMNOrigScrollFunc=window.onscroll;window.onscroll=IMNScroll}}if(IMNDictionaryObj){if(!IMNNameDictionaryObj[c]){IMNNameDictionaryObj[c]=b;j=true}if(typeof(IMNDictionaryObj[c])=="undefined"){IMNDictionaryObj[c]=1}if(!IMNSortableObj[c]&&(typeof(f.Sortable)!="undefined")){IMNSortableObj[c]=f.Sortable;if(!bIMNOnloadAttached){if(EnsureIMNControl()&&IMNControlObj.PresenceEnabled){window.attachEvent("onload",IMNSortTable)}bIMNOnloadAttached=true}}if(!IMNShowOfflineObj[c]&&(typeof(f.ShowOfflinePawn)!="undefined")){IMNShowOfflineObj[c]=f.ShowOfflinePawn}if(j&&EnsureIMNControl()&&IMNControlObj.PresenceEnabled){var a=1,g;a=IMNControlObj.GetStatus(b,c);if(IMNIsOnlineState(a)||IMNSortableObj[c]||IMNShowOfflineObj[c]){g=IMNGetStatusImage(a,IMNSortableObj[c]||IMNShowOfflineObj[c]);IMNUpdateImage(c,g);IMNDictionaryObj[c]=a}}}if(j){var h=IMNGetOOUILocation(f);e=h.objSpan;if(e){e.onmouseover=IMNShowOOUIMouse;e.onfocusin=IMNShowOOUIKyb;e.onmouseout=IMNHideOOUI;e.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 b=window.event.srcElement;if(!IMNHeaderObj){IMNHeaderObj=new Object()}if(IMNHeaderObj){var c=b.id;if(!IMNHeaderObj[c]){IMNHeaderObj[c]=c;var a;a=IMNGetHeaderImage();IMNUpdateImage(c,a)}}}}var _spBodyOnLoadFunctionNames;if(_spBodyOnLoadFunctionNames==null){_spBodyOnLoadFunctionNames=new Array();_spBodyOnLoadFunctionNames.push("_spBodyOnLoad");_spBodyOnLoadFunctionNames.push("_spRestoreScrollForDiv_rscr")}var _spOriginalFormAction;var _spEscapedFormAction;var _spFormOnSubmitCalled=false;var _spBodyOnPageShowRegistered=false;function _spBodyOnPageShow(a){_spFormOnSubmitCalled=false}function _spResetFormOnSubmitCalledFlag(a,b){_spFormOnSubmitCalled=false}function _spBodyOnLoadWrapper(){if(!_spBodyOnPageShowRegistered&&typeof(browseris)!="undefined"&&!browseris.ie&&typeof(window.addEventListener)=="function"){window.addEventListener("pageshow",_spBodyOnPageShow,false);_spBodyOnPageShowRegistered=true}if(_spOriginalFormAction==null){if(document.forms.length>0){_spOriginalFormAction=document.forms[0].action;var c=window.location.href;var b=c.indexOf("://");if(b>=0){var a=c.substring(b+3);b=a.indexOf("/");if(b>=0){c=a.substring(b)}}_spEscapedFormAction=escapeUrlForCallback(c);document.forms[0].action=_spEscapedFormAction}}_spFormOnSubmitCalled=false;if(typeof(Sys)!="undefined"&&typeof(Sys.Net)!="undefined"&&typeof(Sys.Net.WebRequestManager)!="undefined"){Sys.Net.WebRequestManager.add_invokingRequest(_spResetFormOnSubmitCalledFlag)}ProcessDefaultOnLoad(_spBodyOnLoadFunctionNames)}var _spSuppressFormOnSubmitWrapper=false;function _spFormOnSubmitWrapper(){if(_spSuppressFormOnSubmitWrapper){return true}if(_spFormOnSubmitCalled){return false}if(typeof(_spFormOnSubmit)=="function"){var a=_spFormOnSubmit();var b=false;if(typeof(a)==typeof(b)&&a==b){return false}}RestoreToOriginalFormAction();_spFormOnSubmitCalled=true;return true}function RestoreToOriginalFormAction(){if(_spOriginalFormAction!=null){if(_spEscapedFormAction==document.forms[0].action){document.forms[0].action=_spOriginalFormAction}_spOriginalFormAction=null;_spEscapedFormAction=null}}function DefaultFocus(){if(typeof(_spUseDefaultFocus)!="undefined"){var c=document.getElementsByName("_spFocusHere");var b=null;if(c==null||c.length<=0){b=document.getElementById("_spFocusHere")}else{if(c!=null&&c.length>0){b=c[0]}}if(b!=null){var a=b.getElementsByTagName("a");if(a!=null&&a.length>0){try{a[0].focus()}catch(d){}}}}}function ProcessDefaultOnLoad(onLoadFunctionNames){ProcessPNGImages();UpdateAccessibilityUI();ProcessImn();for(var i=0;i<onLoadFunctionNames.length;i++){var expr="if(typeof("+onLoadFunctionNames[i]+")=='function'){"+onLoadFunctionNames[i]+"();}";eval(expr)}if(typeof(_spUseDefaultFocus)!="undefined"){DefaultFocus()}};
//mootools-core
var MooTools={version:"1.2.1",build:"0d4845aab3d9a4fdee2f0d4a6dd59210e4b697cf"};var Native=function(K){K=K||{};var A=K.name;var I=K.legacy;var B=K.protect;
var C=K.implement;var H=K.generics;var F=K.initialize;var G=K.afterImplement||function(){};var D=F||I;H=H!==false;D.constructor=Native;D.$family={name:"native"};
if(I&&F){D.prototype=I.prototype;}D.prototype.constructor=D;if(A){var E=A.toLowerCase();D.prototype.$family={name:E};Native.typize(D,E);}var J=function(N,L,O,M){if(!B||M||!N.prototype[L]){N.prototype[L]=O;
}if(H){Native.genericize(N,L,B);}G.call(N,L,O);return N;};D.alias=function(N,L,O){if(typeof N=="string"){if((N=this.prototype[N])){return J(this,L,N,O);
}}for(var M in N){this.alias(M,N[M],L);}return this;};D.implement=function(M,L,O){if(typeof M=="string"){return J(this,M,L,O);}for(var N in M){J(this,N,M[N],L);
}return this;};if(C){D.implement(C);}return D;};Native.genericize=function(B,C,A){if((!A||!B[C])&&typeof B.prototype[C]=="function"){B[C]=function(){var D=Array.prototype.slice.call(arguments);
return B.prototype[C].apply(D.shift(),D);};}};Native.implement=function(D,C){for(var B=0,A=D.length;B<A;B++){D[B].implement(C);}};Native.typize=function(A,B){if(!A.type){A.type=function(C){return($type(C)===B);
};}};(function(){var A={Array:Array,Date:Date,Function:Function,Number:Number,RegExp:RegExp,String:String};for(var G in A){new Native({name:G,initialize:A[G],protect:true});
}var D={"boolean":Boolean,"native":Native,object:Object};for(var C in D){Native.typize(D[C],C);}var F={Array:["concat","indexOf","join","lastIndexOf","pop","push","reverse","shift","slice","sort","splice","toString","unshift","valueOf"],String:["charAt","charCodeAt","concat","indexOf","lastIndexOf","match","replace","search","slice","split","substr","substring","toLowerCase","toUpperCase","valueOf"]};
for(var E in F){for(var B=F[E].length;B--;){Native.genericize(window[E],F[E][B],true);}}})();var Hash=new Native({name:"Hash",initialize:function(A){if($type(A)=="hash"){A=$unlink(A.getClean());
}for(var B in A){this[B]=A[B];}return this;}});Hash.implement({forEach:function(B,C){for(var A in this){if(this.hasOwnProperty(A)){B.call(C,this[A],A,this);
}}},getClean:function(){var B={};for(var A in this){if(this.hasOwnProperty(A)){B[A]=this[A];}}return B;},getLength:function(){var B=0;for(var A in this){if(this.hasOwnProperty(A)){B++;
}}return B;}});Hash.alias("forEach","each");Array.implement({forEach:function(C,D){for(var B=0,A=this.length;B<A;B++){C.call(D,this[B],B,this);}}});Array.alias("forEach","each");
function $A(C){if(C.item){var D=[];for(var B=0,A=C.length;B<A;B++){D[B]=C[B];}return D;}return Array.prototype.slice.call(C);}function $arguments(A){return function(){return arguments[A];
};}function $chk(A){return !!(A||A===0);}function $clear(A){clearTimeout(A);clearInterval(A);return null;}function $defined(A){return(A!=undefined);}function $each(C,B,D){var A=$type(C);
((A=="arguments"||A=="collection"||A=="array")?Array:Hash).each(C,B,D);}function $empty(){}function $extend(C,A){for(var B in (A||{})){C[B]=A[B];}return C;
}function $H(A){return new Hash(A);}function $lambda(A){return(typeof A=="function")?A:function(){return A;};}function $merge(){var E={};for(var D=0,A=arguments.length;
D<A;D++){var B=arguments[D];if($type(B)!="object"){continue;}for(var C in B){var G=B[C],F=E[C];E[C]=(F&&$type(G)=="object"&&$type(F)=="object")?$merge(F,G):$unlink(G);
}}return E;}function $pick(){for(var B=0,A=arguments.length;B<A;B++){if(arguments[B]!=undefined){return arguments[B];}}return null;}function $random(B,A){return Math.floor(Math.random()*(A-B+1)+B);
}function $splat(B){var A=$type(B);return(A)?((A!="array"&&A!="arguments")?[B]:B):[];}var $time=Date.now||function(){return +new Date;};function $try(){for(var B=0,A=arguments.length;
B<A;B++){try{return arguments[B]();}catch(C){}}return null;}function $type(A){if(A==undefined){return false;}if(A.$family){return(A.$family.name=="number"&&!isFinite(A))?false:A.$family.name;
}if(A.nodeName){switch(A.nodeType){case 1:return"element";case 3:return(/\S/).test(A.nodeValue)?"textnode":"whitespace";}}else{if(typeof A.length=="number"){if(A.callee){return"arguments";
}else{if(A.item){return"collection";}}}}return typeof A;}function $unlink(C){var B;switch($type(C)){case"object":B={};for(var E in C){B[E]=$unlink(C[E]);
}break;case"hash":B=new Hash(C);break;case"array":B=[];for(var D=0,A=C.length;D<A;D++){B[D]=$unlink(C[D]);}break;default:return C;}return B;}var Browser=$merge({Engine:{name:"unknown",version:0},Platform:{name:(window.orientation!=undefined)?"ipod":(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase()},Features:{xpath:!!(document.evaluate),air:!!(window.runtime),query:!!(document.querySelector)},Plugins:{},Engines:{presto:function(){return(!window.opera)?false:((arguments.callee.caller)?960:((document.getElementsByClassName)?950:925));
},trident:function(){return(!window.ActiveXObject)?false:((window.XMLHttpRequest)?5:4);},webkit:function(){return(navigator.taintEnabled)?false:((Browser.Features.xpath)?((Browser.Features.query)?525:420):419);
},gecko:function(){return(document.getBoxObjectFor==undefined)?false:((document.getElementsByClassName)?19:18);}}},Browser||{});Browser.Platform[Browser.Platform.name]=true;
Browser.detect=function(){for(var B in this.Engines){var A=this.Engines[B]();if(A){this.Engine={name:B,version:A};this.Engine[B]=this.Engine[B+A]=true;
break;}}return{name:B,version:A};};Browser.detect();Browser.Request=function(){return $try(function(){return new XMLHttpRequest();},function(){return new ActiveXObject("MSXML2.XMLHTTP");
});};Browser.Features.xhr=!!(Browser.Request());Browser.Plugins.Flash=(function(){var A=($try(function(){return navigator.plugins['Shockwave Flash'] ? navigator.plugins['Shockwave Flash'].description : 0;
},function(){return new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version");})||"0 r0").match(/\d+/g);return{version:parseInt(A[0]||0+"."+A[1]||0),build:parseInt(A[2]||0)};
})();function $exec(B){if(!B){return B;}if(window.execScript){window.execScript(B);}else{var A=document.createElement("script");A.setAttribute("type","text/javascript");
A[(Browser.Engine.webkit&&Browser.Engine.version<420)?"innerText":"text"]=B;document.head.appendChild(A);document.head.removeChild(A);}return B;}Native.UID=1;
var $uid=(Browser.Engine.trident)?function(A){return(A.uid||(A.uid=[Native.UID++]))[0];}:function(A){return A.uid||(A.uid=Native.UID++);};var Window=new Native({name:"Window",legacy:(Browser.Engine.trident)?null:window.Window,initialize:function(A){$uid(A);
if(!A.Element){A.Element=$empty;if(Browser.Engine.webkit){A.document.createElement("iframe");}A.Element.prototype=(Browser.Engine.webkit)?window["[[DOMElement.prototype]]"]:{};
}A.document.window=A;return $extend(A,Window.Prototype);},afterImplement:function(B,A){window[B]=Window.Prototype[B]=A;}});Window.Prototype={$family:{name:"window"}};
new Window(window);var Document=new Native({name:"Document",legacy:(Browser.Engine.trident)?null:window.Document,initialize:function(A){$uid(A);A.head=A.getElementsByTagName("head")[0];
A.html=A.getElementsByTagName("html")[0];if(Browser.Engine.trident&&Browser.Engine.version<=4){$try(function(){A.execCommand("BackgroundImageCache",false,true);
});}if(Browser.Engine.trident){A.window.attachEvent("onunload",function(){A.window.detachEvent("onunload",arguments.callee);A.head=A.html=A.window=null;
});}return $extend(A,Document.Prototype);},afterImplement:function(B,A){document[B]=Document.Prototype[B]=A;}});Document.Prototype={$family:{name:"document"}};
new Document(document);Array.implement({every:function(C,D){for(var B=0,A=this.length;B<A;B++){if(!C.call(D,this[B],B,this)){return false;}}return true;
},filter:function(D,E){var C=[];for(var B=0,A=this.length;B<A;B++){if(D.call(E,this[B],B,this)){C.push(this[B]);}}return C;},clean:function(){return this.filter($defined);
},indexOf:function(C,D){var A=this.length;for(var B=(D<0)?Math.max(0,A+D):D||0;B<A;B++){if(this[B]===C){return B;}}return -1;},map:function(D,E){var C=[];
for(var B=0,A=this.length;B<A;B++){C[B]=D.call(E,this[B],B,this);}return C;},some:function(C,D){for(var B=0,A=this.length;B<A;B++){if(C.call(D,this[B],B,this)){return true;
}}return false;},associate:function(C){var D={},B=Math.min(this.length,C.length);for(var A=0;A<B;A++){D[C[A]]=this[A];}return D;},link:function(C){var A={};
for(var E=0,B=this.length;E<B;E++){for(var D in C){if(C[D](this[E])){A[D]=this[E];delete C[D];break;}}}return A;},contains:function(A,B){return this.indexOf(A,B)!=-1;
},extend:function(C){for(var B=0,A=C.length;B<A;B++){this.push(C[B]);}return this;},getLast:function(){return(this.length)?this[this.length-1]:null;},getRandom:function(){return(this.length)?this[$random(0,this.length-1)]:null;
},include:function(A){if(!this.contains(A)){this.push(A);}return this;},combine:function(C){for(var B=0,A=C.length;B<A;B++){this.include(C[B]);}return this;
},erase:function(B){for(var A=this.length;A--;A){if(this[A]===B){this.splice(A,1);}}return this;},empty:function(){this.length=0;return this;},flatten:function(){var D=[];
for(var B=0,A=this.length;B<A;B++){var C=$type(this[B]);if(!C){continue;}D=D.concat((C=="array"||C=="collection"||C=="arguments")?Array.flatten(this[B]):this[B]);
}return D;},hexToRgb:function(B){if(this.length!=3){return null;}var A=this.map(function(C){if(C.length==1){C+=C;}return C.toInt(16);});return(B)?A:"rgb("+A+")";
},rgbToHex:function(D){if(this.length<3){return null;}if(this.length==4&&this[3]==0&&!D){return"transparent";}var B=[];for(var A=0;A<3;A++){var C=(this[A]-0).toString(16);
B.push((C.length==1)?"0"+C:C);}return(D)?B:"#"+B.join("");}});Function.implement({extend:function(A){for(var B in A){this[B]=A[B];}return this;},create:function(B){var A=this;
B=B||{};return function(D){var C=B.arguments;C=(C!=undefined)?$splat(C):Array.slice(arguments,(B.event)?1:0);if(B.event){C=[D||window.event].extend(C);
}var E=function(){return A.apply(B.bind||null,C);};if(B.delay){return setTimeout(E,B.delay);}if(B.periodical){return setInterval(E,B.periodical);}if(B.attempt){return $try(E);
}return E();};},run:function(A,B){return this.apply(B,$splat(A));},pass:function(A,B){return this.create({bind:B,arguments:A});},bind:function(B,A){return this.create({bind:B,arguments:A});
},bindWithEvent:function(B,A){return this.create({bind:B,arguments:A,event:true});},attempt:function(A,B){return this.create({bind:B,arguments:A,attempt:true})();
},delay:function(B,C,A){return this.create({bind:C,arguments:A,delay:B})();},periodical:function(C,B,A){return this.create({bind:B,arguments:A,periodical:C})();
}});Number.implement({limit:function(B,A){return Math.min(A,Math.max(B,this));},round:function(A){A=Math.pow(10,A||0);return Math.round(this*A)/A;},times:function(B,C){for(var A=0;
A<this;A++){B.call(C,A,this);}},toFloat:function(){return parseFloat(this);},toInt:function(A){return parseInt(this,A||10);}});Number.alias("times","each");
(function(B){var A={};B.each(function(C){if(!Number[C]){A[C]=function(){return Math[C].apply(null,[this].concat($A(arguments)));};}});Number.implement(A);
})(["abs","acos","asin","atan","atan2","ceil","cos","exp","floor","log","max","min","pow","sin","sqrt","tan"]);String.implement({test:function(A,B){return((typeof A=="string")?new RegExp(A,B):A).test(this);
},contains:function(A,B){return(B)?(B+this+B).indexOf(B+A+B)>-1:this.indexOf(A)>-1;},trim:function(){return this.replace(/^\s+|\s+$/g,"");},clean:function(){return this.replace(/\s+/g," ").trim();
},camelCase:function(){return this.replace(/-\D/g,function(A){return A.charAt(1).toUpperCase();});},hyphenate:function(){return this.replace(/[A-Z]/g,function(A){return("-"+A.charAt(0).toLowerCase());
});},capitalize:function(){return this.replace(/\b[a-z]/g,function(A){return A.toUpperCase();});},escapeRegExp:function(){return this.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1");
},toInt:function(A){return parseInt(this,A||10);},toFloat:function(){return parseFloat(this);},hexToRgb:function(B){var A=this.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);
return(A)?A.slice(1).hexToRgb(B):null;},rgbToHex:function(B){var A=this.match(/\d{1,3}/g);return(A)?A.rgbToHex(B):null;},stripScripts:function(B){var A="";
var C=this.replace(/<script[^>]*>([\s\S]*?)<\/script>/gi,function(){A+=arguments[1]+"\n";return"";});if(B===true){$exec(A);}else{if($type(B)=="function"){B(A,C);
}}return C;},substitute:function(A,B){return this.replace(B||(/\\?\{([^{}]+)\}/g),function(D,C){if(D.charAt(0)=="\\"){return D.slice(1);}return(A[C]!=undefined)?A[C]:"";
});}});Hash.implement({has:Object.prototype.hasOwnProperty,keyOf:function(B){for(var A in this){if(this.hasOwnProperty(A)&&this[A]===B){return A;}}return null;
},hasValue:function(A){return(Hash.keyOf(this,A)!==null);},extend:function(A){Hash.each(A,function(C,B){Hash.set(this,B,C);},this);return this;},combine:function(A){Hash.each(A,function(C,B){Hash.include(this,B,C);
},this);return this;},erase:function(A){if(this.hasOwnProperty(A)){delete this[A];}return this;},get:function(A){return(this.hasOwnProperty(A))?this[A]:null;
},set:function(A,B){if(!this[A]||this.hasOwnProperty(A)){this[A]=B;}return this;},empty:function(){Hash.each(this,function(B,A){delete this[A];},this);
return this;},include:function(B,C){var A=this[B];if(A==undefined){this[B]=C;}return this;},map:function(B,C){var A=new Hash;Hash.each(this,function(E,D){A.set(D,B.call(C,E,D,this));
},this);return A;},filter:function(B,C){var A=new Hash;Hash.each(this,function(E,D){if(B.call(C,E,D,this)){A.set(D,E);}},this);return A;},every:function(B,C){for(var A in this){if(this.hasOwnProperty(A)&&!B.call(C,this[A],A)){return false;
}}return true;},some:function(B,C){for(var A in this){if(this.hasOwnProperty(A)&&B.call(C,this[A],A)){return true;}}return false;},getKeys:function(){var A=[];
Hash.each(this,function(C,B){A.push(B);});return A;},getValues:function(){var A=[];Hash.each(this,function(B){A.push(B);});return A;},toQueryString:function(A){var B=[];
Hash.each(this,function(F,E){if(A){E=A+"["+E+"]";}var D;switch($type(F)){case"object":D=Hash.toQueryString(F,E);break;case"array":var C={};F.each(function(H,G){C[G]=H;
});D=Hash.toQueryString(C,E);break;default:D=E+"="+encodeURIComponent(F);}if(F!=undefined){B.push(D);}});return B.join("&");}});Hash.alias({keyOf:"indexOf",hasValue:"contains"});
var Event=new Native({name:"Event",initialize:function(A,F){F=F||window;var K=F.document;A=A||F.event;if(A.$extended){return A;}this.$extended=true;var J=A.type;
var G=A.target||A.srcElement;while(G&&G.nodeType==3){G=G.parentNode;}if(J.test(/key/)){var B=A.which||A.keyCode;var M=Event.Keys.keyOf(B);if(J=="keydown"){var D=B-111;
if(D>0&&D<13){M="f"+D;}}M=M||String.fromCharCode(B).toLowerCase();}else{if(J.match(/(click|mouse|menu)/i)){K=(!K.compatMode||K.compatMode=="CSS1Compat")?K.html:K.body;
var I={x:A.pageX||A.clientX+K.scrollLeft,y:A.pageY||A.clientY+K.scrollTop};var C={x:(A.pageX)?A.pageX-F.pageXOffset:A.clientX,y:(A.pageY)?A.pageY-F.pageYOffset:A.clientY};
if(J.match(/DOMMouseScroll|mousewheel/)){var H=(A.wheelDelta)?A.wheelDelta/120:-(A.detail||0)/3;}var E=(A.which==3)||(A.button==2);var L=null;if(J.match(/over|out/)){switch(J){case"mouseover":L=A.relatedTarget||A.fromElement;
break;case"mouseout":L=A.relatedTarget||A.toElement;}if(!(function(){while(L&&L.nodeType==3){L=L.parentNode;}return true;}).create({attempt:Browser.Engine.gecko})()){L=false;
}}}}return $extend(this,{event:A,type:J,page:I,client:C,rightClick:E,wheel:H,relatedTarget:L,target:G,code:B,key:M,shift:A.shiftKey,control:A.ctrlKey,alt:A.altKey,meta:A.metaKey});
}});Event.Keys=new Hash({enter:13,up:38,down:40,left:37,right:39,esc:27,space:32,backspace:8,tab:9,"delete":46});Event.implement({stop:function(){return this.stopPropagation().preventDefault();
},stopPropagation:function(){if(this.event.stopPropagation){this.event.stopPropagation();}else{this.event.cancelBubble=true;}return this;},preventDefault:function(){if(this.event.preventDefault){this.event.preventDefault();
}else{this.event.returnValue=false;}return this;}});var Class=new Native({name:"Class",initialize:function(B){B=B||{};var A=function(){for(var E in this){if($type(this[E])!="function"){this[E]=$unlink(this[E]);
}}this.constructor=A;if(Class.prototyping){return this;}var D=(this.initialize)?this.initialize.apply(this,arguments):this;if(this.options&&this.options.initialize){this.options.initialize.call(this);
}return D;};for(var C in Class.Mutators){if(!B[C]){continue;}B=Class.Mutators[C](B,B[C]);delete B[C];}$extend(A,this);A.constructor=Class;A.prototype=B;
return A;}});Class.Mutators={Extends:function(C,A){Class.prototyping=A.prototype;var B=new A;delete B.parent;B=Class.inherit(B,C);delete Class.prototyping;
return B;},Implements:function(A,B){$splat(B).each(function(C){Class.prototying=C;$extend(A,($type(C)=="class")?new C:C);delete Class.prototyping;});return A;
}};Class.extend({inherit:function(B,E){var A=arguments.callee.caller;for(var D in E){var C=E[D];var G=B[D];var F=$type(C);if(G&&F=="function"){if(C!=G){if(A){C.__parent=G;
B[D]=C;}else{Class.override(B,D,C);}}}else{if(F=="object"){B[D]=$merge(G,C);}else{B[D]=C;}}}if(A){B.parent=function(){return arguments.callee.caller.__parent.apply(this,arguments);
};}return B;},override:function(B,A,E){var D=Class.prototyping;if(D&&B[A]!=D[A]){D=null;}var C=function(){var F=this.parent;this.parent=D?D[A]:B[A];var G=E.apply(this,arguments);
this.parent=F;return G;};B[A]=C;}});Class.implement({implement:function(){var A=this.prototype;$each(arguments,function(B){Class.inherit(A,B);});return this;
}});var Chain=new Class({$chain:[],chain:function(){this.$chain.extend(Array.flatten(arguments));return this;},callChain:function(){return(this.$chain.length)?this.$chain.shift().apply(this,arguments):false;
},clearChain:function(){this.$chain.empty();return this;}});var Events=new Class({$events:{},addEvent:function(C,B,A){C=Events.removeOn(C);if(B!=$empty){this.$events[C]=this.$events[C]||[];
this.$events[C].include(B);if(A){B.internal=true;}}return this;},addEvents:function(A){for(var B in A){this.addEvent(B,A[B]);}return this;},fireEvent:function(C,B,A){C=Events.removeOn(C);
if(!this.$events||!this.$events[C]){return this;}this.$events[C].each(function(D){D.create({bind:this,delay:A,"arguments":B})();},this);return this;},removeEvent:function(B,A){B=Events.removeOn(B);
if(!this.$events[B]){return this;}if(!A.internal){this.$events[B].erase(A);}return this;},removeEvents:function(C){if($type(C)=="object"){for(var D in C){this.removeEvent(D,C[D]);
}return this;}if(C){C=Events.removeOn(C);}for(var D in this.$events){if(C&&C!=D){continue;}var B=this.$events[D];for(var A=B.length;A--;A){this.removeEvent(D,B[A]);
}}return this;}});Events.removeOn=function(A){return A.replace(/^on([A-Z])/,function(B,C){return C.toLowerCase();});};var Options=new Class({setOptions:function(){this.options=$merge.run([this.options].extend(arguments));
if(!this.addEvent){return this;}for(var A in this.options){if($type(this.options[A])!="function"||!(/^on[A-Z]/).test(A)){continue;}this.addEvent(A,this.options[A]);
delete this.options[A];}return this;}});var Element=new Native({name:"Element",legacy:window.Element,initialize:function(A,B){var C=Element.Constructors.get(A);
if(C){return C(B);}if(typeof A=="string"){return document.newElement(A,B);}return $(A).set(B);},afterImplement:function(A,B){Element.Prototype[A]=B;if(Array[A]){return ;
}Elements.implement(A,function(){var C=[],G=true;for(var E=0,D=this.length;E<D;E++){var F=this[E][A].apply(this[E],arguments);C.push(F);if(G){G=($type(F)=="element");
}}return(G)?new Elements(C):C;});}});Element.Prototype={$family:{name:"element"}};Element.Constructors=new Hash;var IFrame=new Native({name:"IFrame",generics:false,initialize:function(){var E=Array.link(arguments,{properties:Object.type,iframe:$defined});
var C=E.properties||{};var B=$(E.iframe)||false;var D=C.onload||$empty;delete C.onload;C.id=C.name=$pick(C.id,C.name,B.id,B.name,"IFrame_"+$time());B=new Element(B||"iframe",C);
var A=function(){var F=$try(function(){return B.contentWindow.location.host;});if(F&&F==window.location.host){var G=new Window(B.contentWindow);new Document(B.contentWindow.document);
$extend(G.Element.prototype,Element.Prototype);}D.call(B.contentWindow,B.contentWindow.document);};(window.frames[C.id])?A():B.addListener("load",A);return B;
}});var Elements=new Native({initialize:function(F,B){B=$extend({ddup:true,cash:true},B);F=F||[];if(B.ddup||B.cash){var G={},E=[];for(var C=0,A=F.length;
C<A;C++){var D=$.element(F[C],!B.cash);if(B.ddup){if(G[D.uid]){continue;}G[D.uid]=true;}E.push(D);}F=E;}return(B.cash)?$extend(F,this):F;}});Elements.implement({filter:function(A,B){if(!A){return this;
}return new Elements(Array.filter(this,(typeof A=="string")?function(C){return C.match(A);}:A,B));}});Document.implement({newElement:function(A,B){if(Browser.Engine.trident&&B){["name","type","checked"].each(function(C){if(!B[C]){return ;
}A+=" "+C+'="'+B[C]+'"';if(C!="checked"){delete B[C];}});A="<"+A+">";}return $.element(this.createElement(A)).set(B);},newTextNode:function(A){return this.createTextNode(A);
},getDocument:function(){return this;},getWindow:function(){return this.window;}});Window.implement({$:function(B,C){if(B&&B.$family&&B.uid){return B;}var A=$type(B);
return($[A])?$[A](B,C,this.document):null;},$$:function(A){if(arguments.length==1&&typeof A=="string"){return this.document.getElements(A);}var F=[];var C=Array.flatten(arguments);
for(var D=0,B=C.length;D<B;D++){var E=C[D];switch($type(E)){case"element":F.push(E);break;case"string":F.extend(this.document.getElements(E,true));}}return new Elements(F);
},getDocument:function(){return this.document;},getWindow:function(){return this;}});$.string=function(C,B,A){C=A.getElementById(C);return(C)?$.element(C,B):null;
};$.element=function(A,D){$uid(A);if(!D&&!A.$family&&!(/^object|embed$/i).test(A.tagName)){var B=Element.Prototype;for(var C in B){A[C]=B[C];}}return A;
};$.object=function(B,C,A){if(B.toElement){return $.element(B.toElement(A),C);}return null;};$.textnode=$.whitespace=$.window=$.document=$arguments(0);
Native.implement([Element,Document],{getElement:function(A,B){return $(this.getElements(A,true)[0]||null,B);},getElements:function(A,D){A=A.split(",");
var C=[];var B=(A.length>1);A.each(function(E){var F=this.getElementsByTagName(E.trim());(B)?C.extend(F):C=F;},this);return new Elements(C,{ddup:B,cash:!D});
}});(function(){var H={},F={};var I={input:"checked",option:"selected",textarea:(Browser.Engine.webkit&&Browser.Engine.version<420)?"innerHTML":"value"};
var C=function(L){return(F[L]||(F[L]={}));};var G=function(N,L){if(!N){return ;}var M=N.uid;if(Browser.Engine.trident){if(N.clearAttributes){var P=L&&N.cloneNode(false);
N.clearAttributes();if(P){N.mergeAttributes(P);}}else{if(N.removeEvents){N.removeEvents();}}if((/object/i).test(N.tagName)){for(var O in N){if(typeof N[O]=="function"){N[O]=$empty;
}}Element.dispose(N);}}if(!M){return ;}H[M]=F[M]=null;};var D=function(){Hash.each(H,G);if(Browser.Engine.trident){$A(document.getElementsByTagName("object")).each(G);
}if(window.CollectGarbage){CollectGarbage();}H=F=null;};var J=function(N,L,S,M,P,R){var O=N[S||L];var Q=[];while(O){if(O.nodeType==1&&(!M||Element.match(O,M))){if(!P){return $(O,R);
}Q.push(O);}O=O[L];}return(P)?new Elements(Q,{ddup:false,cash:!R}):null;};var E={html:"innerHTML","class":"className","for":"htmlFor",text:(Browser.Engine.trident||(Browser.Engine.webkit&&Browser.Engine.version<420))?"innerText":"textContent"};
var B=["compact","nowrap","ismap","declare","noshade","checked","disabled","readonly","multiple","selected","noresize","defer"];var K=["value","accessKey","cellPadding","cellSpacing","colSpan","frameBorder","maxLength","readOnly","rowSpan","tabIndex","useMap"];
Hash.extend(E,B.associate(B));Hash.extend(E,K.associate(K.map(String.toLowerCase)));var A={before:function(M,L){if(L.parentNode){L.parentNode.insertBefore(M,L);
}},after:function(M,L){if(!L.parentNode){return ;}var N=L.nextSibling;(N)?L.parentNode.insertBefore(M,N):L.parentNode.appendChild(M);},bottom:function(M,L){L.appendChild(M);
},top:function(M,L){var N=L.firstChild;(N)?L.insertBefore(M,N):L.appendChild(M);}};A.inside=A.bottom;Hash.each(A,function(L,M){M=M.capitalize();Element.implement("inject"+M,function(N){L(this,$(N,true));
return this;});Element.implement("grab"+M,function(N){L($(N,true),this);return this;});});Element.implement({set:function(O,M){switch($type(O)){case"object":for(var N in O){this.set(N,O[N]);
}break;case"string":var L=Element.Properties.get(O);(L&&L.set)?L.set.apply(this,Array.slice(arguments,1)):this.setProperty(O,M);}return this;},get:function(M){var L=Element.Properties.get(M);
return(L&&L.get)?L.get.apply(this,Array.slice(arguments,1)):this.getProperty(M);},erase:function(M){var L=Element.Properties.get(M);(L&&L.erase)?L.erase.apply(this):this.removeProperty(M);
return this;},setProperty:function(M,N){var L=E[M];if(N==undefined){return this.removeProperty(M);}if(L&&B[M]){N=!!N;}(L)?this[L]=N:this.setAttribute(M,""+N);
return this;},setProperties:function(L){for(var M in L){this.setProperty(M,L[M]);}return this;},getProperty:function(M){var L=E[M];var N=(L)?this[L]:this.getAttribute(M,2);
return(B[M])?!!N:(L)?N:N||null;},getProperties:function(){var L=$A(arguments);return L.map(this.getProperty,this).associate(L);},removeProperty:function(M){var L=E[M];
(L)?this[L]=(L&&B[M])?false:"":this.removeAttribute(M);return this;},removeProperties:function(){Array.each(arguments,this.removeProperty,this);return this;
},hasClass:function(L){return this.className.contains(L," ");},addClass:function(L){if(!this.hasClass(L)){this.className=(this.className+" "+L).clean();
}return this;},removeClass:function(L){this.className=this.className.replace(new RegExp("(^|\\s)"+L+"(?:\\s|$)"),"$1");return this;},toggleClass:function(L){return this.hasClass(L)?this.removeClass(L):this.addClass(L);
},adopt:function(){Array.flatten(arguments).each(function(L){L=$(L,true);if(L){this.appendChild(L);}},this);return this;},appendText:function(M,L){return this.grab(this.getDocument().newTextNode(M),L);
},grab:function(M,L){A[L||"bottom"]($(M,true),this);return this;},inject:function(M,L){A[L||"bottom"](this,$(M,true));return this;},replaces:function(L){L=$(L,true);
L.parentNode.replaceChild(this,L);return this;},wraps:function(M,L){M=$(M,true);return this.replaces(M).grab(M,L);},getPrevious:function(L,M){return J(this,"previousSibling",null,L,false,M);
},getAllPrevious:function(L,M){return J(this,"previousSibling",null,L,true,M);},getNext:function(L,M){return J(this,"nextSibling",null,L,false,M);},getAllNext:function(L,M){return J(this,"nextSibling",null,L,true,M);
},getFirst:function(L,M){return J(this,"nextSibling","firstChild",L,false,M);},getLast:function(L,M){return J(this,"previousSibling","lastChild",L,false,M);
},getParent:function(L,M){return J(this,"parentNode",null,L,false,M);},getParents:function(L,M){return J(this,"parentNode",null,L,true,M);},getChildren:function(L,M){return J(this,"nextSibling","firstChild",L,true,M);
},getWindow:function(){return this.ownerDocument.window;},getDocument:function(){return this.ownerDocument;},getElementById:function(O,N){var M=this.ownerDocument.getElementById(O);
if(!M){return null;}for(var L=M.parentNode;L!=this;L=L.parentNode){if(!L){return null;}}return $.element(M,N);},getSelected:function(){return new Elements($A(this.options).filter(function(L){return L.selected;
}));},getComputedStyle:function(M){if(this.currentStyle){return this.currentStyle[M.camelCase()];}var L=this.getDocument().defaultView.getComputedStyle(this,null);
return(L)?L.getPropertyValue([M.hyphenate()]):null;},toQueryString:function(){var L=[];this.getElements("input, select, textarea",true).each(function(M){if(!M.name||M.disabled){return ;
}var N=(M.tagName.toLowerCase()=="select")?Element.getSelected(M).map(function(O){return O.value;}):((M.type=="radio"||M.type=="checkbox")&&!M.checked)?null:M.value;
$splat(N).each(function(O){if(typeof O!="undefined"){L.push(M.name+"="+encodeURIComponent(O));}});});return L.join("&");},clone:function(O,L){O=O!==false;
var R=this.cloneNode(O);var N=function(V,U){if(!L){V.removeAttribute("id");}if(Browser.Engine.trident){V.clearAttributes();V.mergeAttributes(U);V.removeAttribute("uid");
if(V.options){var W=V.options,S=U.options;for(var T=W.length;T--;){W[T].selected=S[T].selected;}}}var X=I[U.tagName.toLowerCase()];if(X&&U[X]){V[X]=U[X];
}};if(O){var P=R.getElementsByTagName("*"),Q=this.getElementsByTagName("*");for(var M=P.length;M--;){N(P[M],Q[M]);}}N(R,this);return $(R);},destroy:function(){Element.empty(this);
Element.dispose(this);G(this,true);return null;},empty:function(){$A(this.childNodes).each(function(L){Element.destroy(L);});return this;},dispose:function(){return(this.parentNode)?this.parentNode.removeChild(this):this;
},hasChild:function(L){L=$(L,true);if(!L){return false;}if(Browser.Engine.webkit&&Browser.Engine.version<420){return $A(this.getElementsByTagName(L.tagName)).contains(L);
}return(this.contains)?(this!=L&&this.contains(L)):!!(this.compareDocumentPosition(L)&16);},match:function(L){return(!L||(L==this)||(Element.get(this,"tag")==L));
}});Native.implement([Element,Window,Document],{addListener:function(O,N){if(O=="unload"){var L=N,M=this;N=function(){M.removeListener("unload",N);L();
};}else{H[this.uid]=this;}if(this.addEventListener){this.addEventListener(O,N,false);}else{this.attachEvent("on"+O,N);}return this;},removeListener:function(M,L){if(this.removeEventListener){this.removeEventListener(M,L,false);
}else{this.detachEvent("on"+M,L);}return this;},retrieve:function(M,L){var O=C(this.uid),N=O[M];if(L!=undefined&&N==undefined){N=O[M]=L;}return $pick(N);
},store:function(M,L){var N=C(this.uid);N[M]=L;return this;},eliminate:function(L){var M=C(this.uid);delete M[L];return this;}});window.addListener("unload",D);
})();Element.Properties=new Hash;Element.Properties.style={set:function(A){this.style.cssText=A;},get:function(){return this.style.cssText;},erase:function(){this.style.cssText="";
}};Element.Properties.tag={get:function(){return this.tagName.toLowerCase();}};Element.Properties.html=(function(){var C=document.createElement("div");
var A={table:[1,"<table>","</table>"],select:[1,"<select>","</select>"],tbody:[2,"<table><tbody>","</tbody></table>"],tr:[3,"<table><tbody><tr>","</tr></tbody></table>"]};
A.thead=A.tfoot=A.tbody;var B={set:function(){var E=Array.flatten(arguments).join("");var F=Browser.Engine.trident&&A[this.get("tag")];if(F){var G=C;G.innerHTML=F[1]+E+F[2];
for(var D=F[0];D--;){G=G.firstChild;}this.empty().adopt(G.childNodes);}else{this.innerHTML=E;}}};B.erase=B.set;return B;})();if(Browser.Engine.webkit&&Browser.Engine.version<420){Element.Properties.text={get:function(){if(this.innerText){return this.innerText;
}var A=this.ownerDocument.newElement("div",{html:this.innerHTML}).inject(this.ownerDocument.body);var B=A.innerText;A.destroy();return B;}};}Element.Properties.events={set:function(A){this.addEvents(A);
}};Native.implement([Element,Window,Document],{addEvent:function(E,G){var H=this.retrieve("events",{});H[E]=H[E]||{keys:[],values:[]};if(H[E].keys.contains(G)){return this;
}H[E].keys.push(G);var F=E,A=Element.Events.get(E),C=G,I=this;if(A){if(A.onAdd){A.onAdd.call(this,G);}if(A.condition){C=function(J){if(A.condition.call(this,J)){return G.call(this,J);
}return true;};}F=A.base||F;}var D=function(){return G.call(I);};var B=Element.NativeEvents[F];if(B){if(B==2){D=function(J){J=new Event(J,I.getWindow());
if(C.call(I,J)===false){J.stop();}};}this.addListener(F,D);}H[E].values.push(D);return this;},removeEvent:function(C,B){var A=this.retrieve("events");if(!A||!A[C]){return this;
}var F=A[C].keys.indexOf(B);if(F==-1){return this;}A[C].keys.splice(F,1);var E=A[C].values.splice(F,1)[0];var D=Element.Events.get(C);if(D){if(D.onRemove){D.onRemove.call(this,B);
}C=D.base||C;}return(Element.NativeEvents[C])?this.removeListener(C,E):this;},addEvents:function(A){for(var B in A){this.addEvent(B,A[B]);}return this;
},removeEvents:function(A){if($type(A)=="object"){for(var C in A){this.removeEvent(C,A[C]);}return this;}var B=this.retrieve("events");if(!B){return this;
}if(!A){for(var C in B){this.removeEvents(C);}this.eliminate("events");}else{if(B[A]){while(B[A].keys[0]){this.removeEvent(A,B[A].keys[0]);}B[A]=null;}}return this;
},fireEvent:function(D,B,A){var C=this.retrieve("events");if(!C||!C[D]){return this;}C[D].keys.each(function(E){E.create({bind:this,delay:A,"arguments":B})();
},this);return this;},cloneEvents:function(D,A){D=$(D);var C=D.retrieve("events");if(!C){return this;}if(!A){for(var B in C){this.cloneEvents(D,B);}}else{if(C[A]){C[A].keys.each(function(E){this.addEvent(A,E);
},this);}}return this;}});Element.NativeEvents={click:2,dblclick:2,mouseup:2,mousedown:2,contextmenu:2,mousewheel:2,DOMMouseScroll:2,mouseover:2,mouseout:2,mousemove:2,selectstart:2,selectend:2,keydown:2,keypress:2,keyup:2,focus:2,blur:2,change:2,reset:2,select:2,submit:2,load:1,unload:1,beforeunload:2,resize:1,move:1,DOMContentLoaded:1,readystatechange:1,error:1,abort:1,scroll:1};
(function(){var A=function(B){var C=B.relatedTarget;if(C==undefined){return true;}if(C===false){return false;}return($type(this)!="document"&&C!=this&&C.prefix!="xul"&&!this.hasChild(C));
};Element.Events=new Hash({mouseenter:{base:"mouseover",condition:A},mouseleave:{base:"mouseout",condition:A},mousewheel:{base:(Browser.Engine.gecko)?"DOMMouseScroll":"mousewheel"}});
})();Element.Properties.styles={set:function(A){this.setStyles(A);}};Element.Properties.opacity={set:function(A,B){if(!B){if(A==0){if(this.style.visibility!="hidden"){this.style.visibility="hidden";
}}else{if(this.style.visibility!="visible"){this.style.visibility="visible";}}}if(!this.currentStyle||!this.currentStyle.hasLayout){this.style.zoom=1;}if(Browser.Engine.trident){this.style.filter=(A==1)?"":"alpha(opacity="+A*100+")";
}this.style.opacity=A;this.store("opacity",A);},get:function(){return this.retrieve("opacity",1);}};Element.implement({setOpacity:function(A){return this.set("opacity",A,true);
},getOpacity:function(){return this.get("opacity");},setStyle:function(B,A){switch(B){case"opacity":return this.set("opacity",parseFloat(A));case"float":B=(Browser.Engine.trident)?"styleFloat":"cssFloat";
}B=B.camelCase();if($type(A)!="string"){var C=(Element.Styles.get(B)||"@").split(" ");A=$splat(A).map(function(E,D){if(!C[D]){return"";}return($type(E)=="number")?C[D].replace("@",Math.round(E)):E;
}).join(" ");}else{if(A==String(Number(A))){A=Math.round(A);}}this.style[B]=A;return this;},getStyle:function(G){switch(G){case"opacity":return this.get("opacity");
case"float":G=(Browser.Engine.trident)?"styleFloat":"cssFloat";}G=G.camelCase();var A=this.style[G];if(!$chk(A)){A=[];for(var F in Element.ShortStyles){if(G!=F){continue;
}for(var E in Element.ShortStyles[F]){A.push(this.getStyle(E));}return A.join(" ");}A=this.getComputedStyle(G);}if(A){A=String(A);var C=A.match(/rgba?\([\d\s,]+\)/);
if(C){A=A.replace(C[0],C[0].rgbToHex());}}if(Browser.Engine.presto||(Browser.Engine.trident&&!$chk(parseInt(A)))){if(G.test(/^(height|width)$/)){var B=(G=="width")?["left","right"]:["top","bottom"],D=0;
B.each(function(H){D+=this.getStyle("border-"+H+"-width").toInt()+this.getStyle("padding-"+H).toInt();},this);return this["offset"+G.capitalize()]-D+"px";
}if((Browser.Engine.presto)&&String(A).test("px")){return A;}if(G.test(/(border(.+)Width|margin|padding)/)){return"0px";}}return A;},setStyles:function(B){for(var A in B){this.setStyle(A,B[A]);
}return this;},getStyles:function(){var A={};Array.each(arguments,function(B){A[B]=this.getStyle(B);},this);return A;}});Element.Styles=new Hash({left:"@px",top:"@px",bottom:"@px",right:"@px",width:"@px",height:"@px",maxWidth:"@px",maxHeight:"@px",minWidth:"@px",minHeight:"@px",backgroundColor:"rgb(@, @, @)",backgroundPosition:"@px @px",color:"rgb(@, @, @)",fontSize:"@px",letterSpacing:"@px",lineHeight:"@px",clip:"rect(@px @px @px @px)",margin:"@px @px @px @px",padding:"@px @px @px @px",border:"@px @ rgb(@, @, @) @px @ rgb(@, @, @) @px @ rgb(@, @, @)",borderWidth:"@px @px @px @px",borderStyle:"@ @ @ @",borderColor:"rgb(@, @, @) rgb(@, @, @) rgb(@, @, @) rgb(@, @, @)",zIndex:"@",zoom:"@",fontWeight:"@",textIndent:"@px",opacity:"@"});
Element.ShortStyles={margin:{},padding:{},border:{},borderWidth:{},borderStyle:{},borderColor:{}};["Top","Right","Bottom","Left"].each(function(G){var F=Element.ShortStyles;
var B=Element.Styles;["margin","padding"].each(function(H){var I=H+G;F[H][I]=B[I]="@px";});var E="border"+G;F.border[E]=B[E]="@px @ rgb(@, @, @)";var D=E+"Width",A=E+"Style",C=E+"Color";
F[E]={};F.borderWidth[D]=F[E][D]=B[D]="@px";F.borderStyle[A]=F[E][A]=B[A]="@";F.borderColor[C]=F[E][C]=B[C]="rgb(@, @, @)";});(function(){Element.implement({scrollTo:function(H,I){if(B(this)){this.getWindow().scrollTo(H,I);
}else{this.scrollLeft=H;this.scrollTop=I;}return this;},getSize:function(){if(B(this)){return this.getWindow().getSize();}return{x:this.offsetWidth,y:this.offsetHeight};
},getScrollSize:function(){if(B(this)){return this.getWindow().getScrollSize();}return{x:this.scrollWidth,y:this.scrollHeight};},getScroll:function(){if(B(this)){return this.getWindow().getScroll();
}return{x:this.scrollLeft,y:this.scrollTop};},getScrolls:function(){var I=this,H={x:0,y:0};while(I&&!B(I)){H.x+=I.scrollLeft;H.y+=I.scrollTop;I=I.parentNode;
}return H;},getOffsetParent:function(){var H=this;if(B(H)){return null;}if(!Browser.Engine.trident){return H.offsetParent;}while((H=H.parentNode)&&!B(H)){if(D(H,"position")!="static"){return H;
}}return null;},getOffsets:function(){if(Browser.Engine.trident){var L=this.getBoundingClientRect(),J=this.getDocument().documentElement;return{x:L.left+J.scrollLeft-J.clientLeft,y:L.top+J.scrollTop-J.clientTop};
}var I=this,H={x:0,y:0};if(B(this)){return H;}while(I&&!B(I)){H.x+=I.offsetLeft;H.y+=I.offsetTop;if(Browser.Engine.gecko){if(!F(I)){H.x+=C(I);H.y+=G(I);
}var K=I.parentNode;if(K&&D(K,"overflow")!="visible"){H.x+=C(K);H.y+=G(K);}}else{if(I!=this&&Browser.Engine.webkit){H.x+=C(I);H.y+=G(I);}}I=I.offsetParent;
}if(Browser.Engine.gecko&&!F(this)){H.x-=C(this);H.y-=G(this);}return H;},getPosition:function(K){if(B(this)){return{x:0,y:0};}var L=this.getOffsets(),I=this.getScrolls();
var H={x:L.x-I.x,y:L.y-I.y};var J=(K&&(K=$(K)))?K.getPosition():{x:0,y:0};return{x:H.x-J.x,y:H.y-J.y};},getCoordinates:function(J){if(B(this)){return this.getWindow().getCoordinates();
}var H=this.getPosition(J),I=this.getSize();var K={left:H.x,top:H.y,width:I.x,height:I.y};K.right=K.left+K.width;K.bottom=K.top+K.height;return K;},computePosition:function(H){return{left:H.x-E(this,"margin-left"),top:H.y-E(this,"margin-top")};
},position:function(H){return this.setStyles(this.computePosition(H));}});Native.implement([Document,Window],{getSize:function(){var I=this.getWindow();
if(Browser.Engine.presto||Browser.Engine.webkit){return{x:I.innerWidth,y:I.innerHeight};}var H=A(this);return{x:H.clientWidth,y:H.clientHeight};},getScroll:function(){var I=this.getWindow();
var H=A(this);return{x:I.pageXOffset||H.scrollLeft,y:I.pageYOffset||H.scrollTop};},getScrollSize:function(){var I=A(this);var H=this.getSize();return{x:Math.max(I.scrollWidth,H.x),y:Math.max(I.scrollHeight,H.y)};
},getPosition:function(){return{x:0,y:0};},getCoordinates:function(){var H=this.getSize();return{top:0,left:0,bottom:H.y,right:H.x,height:H.y,width:H.x};
}});var D=Element.getComputedStyle;function E(H,I){return D(H,I).toInt()||0;}function F(H){return D(H,"-moz-box-sizing")=="border-box";}function G(H){return E(H,"border-top-width");
}function C(H){return E(H,"border-left-width");}function B(H){return(/^(?:body|html)$/i).test(H.tagName);}function A(H){var I=H.getDocument();return(!I.compatMode||I.compatMode=="CSS1Compat")?I.html:I.body;
}})();Native.implement([Window,Document,Element],{getHeight:function(){return this.getSize().y;},getWidth:function(){return this.getSize().x;},getScrollTop:function(){return this.getScroll().y;
},getScrollLeft:function(){return this.getScroll().x;},getScrollHeight:function(){return this.getScrollSize().y;},getScrollWidth:function(){return this.getScrollSize().x;
},getTop:function(){return this.getPosition().y;},getLeft:function(){return this.getPosition().x;}});Native.implement([Document,Element],{getElements:function(H,G){H=H.split(",");
var C,E={};for(var D=0,B=H.length;D<B;D++){var A=H[D],F=Selectors.Utils.search(this,A,E);if(D!=0&&F.item){F=$A(F);}C=(D==0)?F:(C.item)?$A(C).concat(F):C.concat(F);
}return new Elements(C,{ddup:(H.length>1),cash:!G});}});Element.implement({match:function(B){if(!B||(B==this)){return true;}var D=Selectors.Utils.parseTagAndID(B);
var A=D[0],E=D[1];if(!Selectors.Filters.byID(this,E)||!Selectors.Filters.byTag(this,A)){return false;}var C=Selectors.Utils.parseSelector(B);return(C)?Selectors.Utils.filter(this,C,{}):true;
}});var Selectors={Cache:{nth:{},parsed:{}}};Selectors.RegExps={id:(/#([\w-]+)/),tag:(/^(\w+|\*)/),quick:(/^(\w+|\*)$/),splitter:(/\s*([+>~\s])\s*([a-zA-Z#.*:\[])/g),combined:(/\.([\w-]+)|\[(\w+)(?:([!*^$~|]?=)(["']?)([^\4]*?)\4)?\]|:([\w-]+)(?:\(["']?(.*?)?["']?\)|$)/g)};
Selectors.Utils={chk:function(B,C){if(!C){return true;}var A=$uid(B);if(!C[A]){return C[A]=true;}return false;},parseNthArgument:function(F){if(Selectors.Cache.nth[F]){return Selectors.Cache.nth[F];
}var C=F.match(/^([+-]?\d*)?([a-z]+)?([+-]?\d*)?$/);if(!C){return false;}var E=parseInt(C[1]);var B=(E||E===0)?E:1;var D=C[2]||false;var A=parseInt(C[3])||0;
if(B!=0){A--;while(A<1){A+=B;}while(A>=B){A-=B;}}else{B=A;D="index";}switch(D){case"n":C={a:B,b:A,special:"n"};break;case"odd":C={a:2,b:0,special:"n"};
break;case"even":C={a:2,b:1,special:"n"};break;case"first":C={a:0,special:"index"};break;case"last":C={special:"last-child"};break;case"only":C={special:"only-child"};
break;default:C={a:(B-1),special:"index"};}return Selectors.Cache.nth[F]=C;},parseSelector:function(E){if(Selectors.Cache.parsed[E]){return Selectors.Cache.parsed[E];
}var D,H={classes:[],pseudos:[],attributes:[]};while((D=Selectors.RegExps.combined.exec(E))){var I=D[1],G=D[2],F=D[3],B=D[5],C=D[6],J=D[7];if(I){H.classes.push(I);
}else{if(C){var A=Selectors.Pseudo.get(C);if(A){H.pseudos.push({parser:A,argument:J});}else{H.attributes.push({name:C,operator:"=",value:J});}}else{if(G){H.attributes.push({name:G,operator:F,value:B});
}}}}if(!H.classes.length){delete H.classes;}if(!H.attributes.length){delete H.attributes;}if(!H.pseudos.length){delete H.pseudos;}if(!H.classes&&!H.attributes&&!H.pseudos){H=null;
}return Selectors.Cache.parsed[E]=H;},parseTagAndID:function(B){var A=B.match(Selectors.RegExps.tag);var C=B.match(Selectors.RegExps.id);return[(A)?A[1]:"*",(C)?C[1]:false];
},filter:function(F,C,E){var D;if(C.classes){for(D=C.classes.length;D--;D){var G=C.classes[D];if(!Selectors.Filters.byClass(F,G)){return false;}}}if(C.attributes){for(D=C.attributes.length;
D--;D){var B=C.attributes[D];if(!Selectors.Filters.byAttribute(F,B.name,B.operator,B.value)){return false;}}}if(C.pseudos){for(D=C.pseudos.length;D--;D){var A=C.pseudos[D];
if(!Selectors.Filters.byPseudo(F,A.parser,A.argument,E)){return false;}}}return true;},getByTagAndID:function(B,A,D){if(D){var C=(B.getElementById)?B.getElementById(D,true):Element.getElementById(B,D,true);
return(C&&Selectors.Filters.byTag(C,A))?[C]:[];}else{return B.getElementsByTagName(A);}},search:function(I,H,N){var B=[];var C=H.trim().replace(Selectors.RegExps.splitter,function(Y,X,W){B.push(X);
return":)"+W;}).split(":)");var J,E,U;for(var T=0,P=C.length;T<P;T++){var S=C[T];if(T==0&&Selectors.RegExps.quick.test(S)){J=I.getElementsByTagName(S);
continue;}var A=B[T-1];var K=Selectors.Utils.parseTagAndID(S);var V=K[0],L=K[1];if(T==0){J=Selectors.Utils.getByTagAndID(I,V,L);}else{var D={},G=[];for(var R=0,Q=J.length;
R<Q;R++){G=Selectors.Getters[A](G,J[R],V,L,D);}J=G;}var F=Selectors.Utils.parseSelector(S);if(F){E=[];for(var O=0,M=J.length;O<M;O++){U=J[O];if(Selectors.Utils.filter(U,F,N)){E.push(U);
}}J=E;}}return J;}};Selectors.Getters={" ":function(H,G,I,A,E){var D=Selectors.Utils.getByTagAndID(G,I,A);for(var C=0,B=D.length;C<B;C++){var F=D[C];if(Selectors.Utils.chk(F,E)){H.push(F);
}}return H;},">":function(H,G,I,A,F){var C=Selectors.Utils.getByTagAndID(G,I,A);for(var E=0,D=C.length;E<D;E++){var B=C[E];if(B.parentNode==G&&Selectors.Utils.chk(B,F)){H.push(B);
}}return H;},"+":function(C,B,A,E,D){while((B=B.nextSibling)){if(B.nodeType==1){if(Selectors.Utils.chk(B,D)&&Selectors.Filters.byTag(B,A)&&Selectors.Filters.byID(B,E)){C.push(B);
}break;}}return C;},"~":function(C,B,A,E,D){while((B=B.nextSibling)){if(B.nodeType==1){if(!Selectors.Utils.chk(B,D)){break;}if(Selectors.Filters.byTag(B,A)&&Selectors.Filters.byID(B,E)){C.push(B);
}}}return C;}};Selectors.Filters={byTag:function(B,A){return(A=="*"||(B.tagName&&B.tagName.toLowerCase()==A));},byID:function(A,B){return(!B||(A.id&&A.id==B));
},byClass:function(B,A){return(B.className&&B.className.contains(A," "));},byPseudo:function(A,D,C,B){return D.call(A,C,B);},byAttribute:function(C,D,B,E){var A=Element.prototype.getProperty.call(C,D);
if(!A){return(B=="!=");}if(!B||E==undefined){return true;}switch(B){case"=":return(A==E);case"*=":return(A.contains(E));case"^=":return(A.substr(0,E.length)==E);
case"$=":return(A.substr(A.length-E.length)==E);case"!=":return(A!=E);case"~=":return A.contains(E," ");case"|=":return A.contains(E,"-");}return false;
}};Selectors.Pseudo=new Hash({checked:function(){return this.checked;},empty:function(){return !(this.innerText||this.textContent||"").length;},not:function(A){return !Element.match(this,A);
},contains:function(A){return(this.innerText||this.textContent||"").contains(A);},"first-child":function(){return Selectors.Pseudo.index.call(this,0);},"last-child":function(){var A=this;
while((A=A.nextSibling)){if(A.nodeType==1){return false;}}return true;},"only-child":function(){var B=this;while((B=B.previousSibling)){if(B.nodeType==1){return false;
}}var A=this;while((A=A.nextSibling)){if(A.nodeType==1){return false;}}return true;},"nth-child":function(G,E){G=(G==undefined)?"n":G;var C=Selectors.Utils.parseNthArgument(G);
if(C.special!="n"){return Selectors.Pseudo[C.special].call(this,C.a,E);}var F=0;E.positions=E.positions||{};var D=$uid(this);if(!E.positions[D]){var B=this;
while((B=B.previousSibling)){if(B.nodeType!=1){continue;}F++;var A=E.positions[$uid(B)];if(A!=undefined){F=A+F;break;}}E.positions[D]=F;}return(E.positions[D]%C.a==C.b);
},index:function(A){var B=this,C=0;while((B=B.previousSibling)){if(B.nodeType==1&&++C>A){return false;}}return(C==A);},even:function(B,A){return Selectors.Pseudo["nth-child"].call(this,"2n+1",A);
},odd:function(B,A){return Selectors.Pseudo["nth-child"].call(this,"2n",A);}});Element.Events.domready={onAdd:function(A){if(Browser.loaded){A.call(this);
}}};(function(){var B=function(){if(Browser.loaded){return ;}Browser.loaded=true;window.fireEvent("domready");document.fireEvent("domready");};if(Browser.Engine.trident){var A=document.createElement("div");
(function(){($try(function(){A.doScroll("left");return $(A).inject(document.body).set("html","temp").dispose();}))?B():arguments.callee.delay(50);})();
}else{if(Browser.Engine.webkit&&Browser.Engine.version<525){(function(){(["loaded","complete"].contains(document.readyState))?B():arguments.callee.delay(50);
})();}else{window.addEvent("load",B);document.addEvent("DOMContentLoaded",B);}}})();var JSON=new Hash({$specialChars:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},$replaceChars:function(A){return JSON.$specialChars[A]||"\\u00"+Math.floor(A.charCodeAt()/16).toString(16)+(A.charCodeAt()%16).toString(16);
},encode:function(B){switch($type(B)){case"string":return'"'+B.replace(/[\x00-\x1f\\"]/g,JSON.$replaceChars)+'"';case"array":return"["+String(B.map(JSON.encode).filter($defined))+"]";
case"object":case"hash":var A=[];Hash.each(B,function(E,D){var C=JSON.encode(E);if(C){A.push(JSON.encode(D)+":"+C);}});return"{"+A+"}";case"number":case"boolean":return String(B);
case false:return"null";}return null;},decode:function(string,secure){if($type(string)!="string"||!string.length){return null;}if(secure&&!(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(string.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,""))){return null;
}return eval("("+string+")");}});Native.implement([Hash,Array,String,Number],{toJSON:function(){return JSON.encode(this);}});var Cookie=new Class({Implements:Options,options:{path:false,domain:false,duration:false,secure:false,document:document},initialize:function(B,A){this.key=B;
this.setOptions(A);},write:function(B){B=encodeURIComponent(B);if(this.options.domain){B+="; domain="+this.options.domain;}if(this.options.path){B+="; path="+this.options.path;
}if(this.options.duration){var A=new Date();A.setTime(A.getTime()+this.options.duration*24*60*60*1000);B+="; expires="+A.toGMTString();}if(this.options.secure){B+="; secure";
}this.options.document.cookie=this.key+"="+B;return this;},read:function(){var A=this.options.document.cookie.match("(?:^|;)\\s*"+this.key.escapeRegExp()+"=([^;]*)");
return(A)?decodeURIComponent(A[1]):null;},dispose:function(){new Cookie(this.key,$merge(this.options,{duration:-1})).write("");return this;}});Cookie.write=function(B,C,A){return new Cookie(B,A).write(C);
};Cookie.read=function(A){return new Cookie(A).read();};Cookie.dispose=function(B,A){return new Cookie(B,A).dispose();};var Swiff=new Class({Implements:[Options],options:{id:null,height:1,width:1,container:null,properties:{},params:{quality:"high",allowScriptAccess:"always",wMode:"transparent",swLiveConnect:true},callBacks:{},vars:{}},toElement:function(){return this.object;
},initialize:function(L,M){this.instance="Swiff_"+$time();this.setOptions(M);M=this.options;var B=this.id=M.id||this.instance;var A=$(M.container);Swiff.CallBacks[this.instance]={};
var E=M.params,G=M.vars,F=M.callBacks;var H=$extend({height:M.height,width:M.width},M.properties);var K=this;for(var D in F){Swiff.CallBacks[this.instance][D]=(function(N){return function(){return N.apply(K.object,arguments);
};})(F[D]);G[D]="Swiff.CallBacks."+this.instance+"."+D;}E.flashVars=Hash.toQueryString(G);if(Browser.Engine.trident){H.classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";
E.movie=L;}else{H.type="application/x-shockwave-flash";H.data=L;}var J='<object id="'+B+'"';for(var I in H){J+=" "+I+'="'+H[I]+'"';}J+=">";for(var C in E){if(E[C]){J+='<param name="'+C+'" value="'+E[C]+'" />';
}}J+="</object>";this.object=((A)?A.empty():new Element("div")).set("html",J).firstChild;},replaces:function(A){A=$(A,true);A.parentNode.replaceChild(this.toElement(),A);
return this;},inject:function(A){$(A,true).appendChild(this.toElement());return this;},remote:function(){return Swiff.remote.apply(Swiff,[this.toElement()].extend(arguments));
}});Swiff.CallBacks={};Swiff.remote=function(obj,fn){var rs=obj.CallFunction('<invoke name="'+fn+'" returntype="javascript">'+__flash__argumentsToXML(arguments,2)+"</invoke>");
return eval(rs);};var Fx=new Class({Implements:[Chain,Events,Options],options:{fps:50,unit:false,duration:500,link:"ignore"},initialize:function(A){this.subject=this.subject||this;
this.setOptions(A);this.options.duration=Fx.Durations[this.options.duration]||this.options.duration.toInt();var B=this.options.wait;if(B===false){this.options.link="cancel";
}},getTransition:function(){return function(A){return -(Math.cos(Math.PI*A)-1)/2;};},step:function(){var A=$time();if(A<this.time+this.options.duration){var B=this.transition((A-this.time)/this.options.duration);
this.set(this.compute(this.from,this.to,B));}else{this.set(this.compute(this.from,this.to,1));this.complete();}},set:function(A){return A;},compute:function(C,B,A){return Fx.compute(C,B,A);
},check:function(A){if(!this.timer){return true;}switch(this.options.link){case"cancel":this.cancel();return true;case"chain":this.chain(A.bind(this,Array.slice(arguments,1)));
return false;}return false;},start:function(B,A){if(!this.check(arguments.callee,B,A)){return this;}this.from=B;this.to=A;this.time=0;this.transition=this.getTransition();
this.startTimer();this.onStart();return this;},complete:function(){if(this.stopTimer()){this.onComplete();}return this;},cancel:function(){if(this.stopTimer()){this.onCancel();
}return this;},onStart:function(){this.fireEvent("start",this.subject);},onComplete:function(){this.fireEvent("complete",this.subject);if(!this.callChain()){this.fireEvent("chainComplete",this.subject);
}},onCancel:function(){this.fireEvent("cancel",this.subject).clearChain();},pause:function(){this.stopTimer();return this;},resume:function(){this.startTimer();
return this;},stopTimer:function(){if(!this.timer){return false;}this.time=$time()-this.time;this.timer=$clear(this.timer);return true;},startTimer:function(){if(this.timer){return false;
}this.time=$time()-this.time;this.timer=this.step.periodical(Math.round(1000/this.options.fps),this);return true;}});Fx.compute=function(C,B,A){return(B-C)*A+C;
};Fx.Durations={"short":250,normal:500,"long":1000};Fx.CSS=new Class({Extends:Fx,prepare:function(D,E,B){B=$splat(B);var C=B[1];if(!$chk(C)){B[1]=B[0];
B[0]=D.getStyle(E);}var A=B.map(this.parse);return{from:A[0],to:A[1]};},parse:function(A){A=$lambda(A)();A=(typeof A=="string")?A.split(" "):$splat(A);
return A.map(function(C){C=String(C);var B=false;Fx.CSS.Parsers.each(function(F,E){if(B){return ;}var D=F.parse(C);if($chk(D)){B={value:D,parser:F};}});
B=B||{value:C,parser:Fx.CSS.Parsers.String};return B;});},compute:function(D,C,B){var A=[];(Math.min(D.length,C.length)).times(function(E){A.push({value:D[E].parser.compute(D[E].value,C[E].value,B),parser:D[E].parser});
});A.$family={name:"fx:css:value"};return A;},serve:function(C,B){if($type(C)!="fx:css:value"){C=this.parse(C);}var A=[];C.each(function(D){A=A.concat(D.parser.serve(D.value,B));
});return A;},render:function(A,D,C,B){A.setStyle(D,this.serve(C,B));},search:function(A){if(Fx.CSS.Cache[A]){return Fx.CSS.Cache[A];}var B={};Array.each(document.styleSheets,function(E,D){var C=E.href;
if(C&&C.contains("://")&&!C.contains(document.domain)){return ;}var F=E.rules||E.cssRules;Array.each(F,function(I,G){if(!I.style){return ;}var H=(I.selectorText)?I.selectorText.replace(/^\w+/,function(J){return J.toLowerCase();
}):null;if(!H||!H.test("^"+A+"$")){return ;}Element.Styles.each(function(K,J){if(!I.style[J]||Element.ShortStyles[J]){return ;}K=String(I.style[J]);B[J]=(K.test(/^rgb/))?K.rgbToHex():K;
});});});return Fx.CSS.Cache[A]=B;}});Fx.CSS.Cache={};Fx.CSS.Parsers=new Hash({Color:{parse:function(A){if(A.match(/^#[0-9a-f]{3,6}$/i)){return A.hexToRgb(true);
}return((A=A.match(/(\d+),\s*(\d+),\s*(\d+)/)))?[A[1],A[2],A[3]]:false;},compute:function(C,B,A){return C.map(function(E,D){return Math.round(Fx.compute(C[D],B[D],A));
});},serve:function(A){return A.map(Number);}},Number:{parse:parseFloat,compute:Fx.compute,serve:function(B,A){return(A)?B+A:B;}},String:{parse:$lambda(false),compute:$arguments(1),serve:$arguments(0)}});
Fx.Tween=new Class({Extends:Fx.CSS,initialize:function(B,A){this.element=this.subject=$(B);this.parent(A);},set:function(B,A){if(arguments.length==1){A=B;
B=this.property||this.options.property;}this.render(this.element,B,A,this.options.unit);return this;},start:function(C,E,D){if(!this.check(arguments.callee,C,E,D)){return this;
}var B=Array.flatten(arguments);this.property=this.options.property||B.shift();var A=this.prepare(this.element,this.property,B);return this.parent(A.from,A.to);
}});Element.Properties.tween={set:function(A){var B=this.retrieve("tween");if(B){B.cancel();}return this.eliminate("tween").store("tween:options",$extend({link:"cancel"},A));
},get:function(A){if(A||!this.retrieve("tween")){if(A||!this.retrieve("tween:options")){this.set("tween",A);}this.store("tween",new Fx.Tween(this,this.retrieve("tween:options")));
}return this.retrieve("tween");}};Element.implement({tween:function(A,C,B){this.get("tween").start(arguments);return this;},fade:function(C){var E=this.get("tween"),D="opacity",A;
C=$pick(C,"toggle");switch(C){case"in":E.start(D,1);break;case"out":E.start(D,0);break;case"show":E.set(D,1);break;case"hide":E.set(D,0);break;case"toggle":var B=this.retrieve("fade:flag",this.get("opacity")==1);
E.start(D,(B)?0:1);this.store("fade:flag",!B);A=true;break;default:E.start(D,arguments);}if(!A){this.eliminate("fade:flag");}return this;},highlight:function(C,A){if(!A){A=this.retrieve("highlight:original",this.getStyle("background-color"));
A=(A=="transparent")?"#fff":A;}var B=this.get("tween");B.start("background-color",C||"#ffff88",A).chain(function(){this.setStyle("background-color",this.retrieve("highlight:original"));
B.callChain();}.bind(this));return this;}});Fx.Morph=new Class({Extends:Fx.CSS,initialize:function(B,A){this.element=this.subject=$(B);this.parent(A);},set:function(A){if(typeof A=="string"){A=this.search(A);
}for(var B in A){this.render(this.element,B,A[B],this.options.unit);}return this;},compute:function(E,D,C){var A={};for(var B in E){A[B]=this.parent(E[B],D[B],C);
}return A;},start:function(B){if(!this.check(arguments.callee,B)){return this;}if(typeof B=="string"){B=this.search(B);}var E={},D={};for(var C in B){var A=this.prepare(this.element,C,B[C]);
E[C]=A.from;D[C]=A.to;}return this.parent(E,D);}});Element.Properties.morph={set:function(A){var B=this.retrieve("morph");if(B){B.cancel();}return this.eliminate("morph").store("morph:options",$extend({link:"cancel"},A));
},get:function(A){if(A||!this.retrieve("morph")){if(A||!this.retrieve("morph:options")){this.set("morph",A);}this.store("morph",new Fx.Morph(this,this.retrieve("morph:options")));
}return this.retrieve("morph");}};Element.implement({morph:function(A){this.get("morph").start(A);return this;}});Fx.implement({getTransition:function(){var A=this.options.transition||Fx.Transitions.Sine.easeInOut;
if(typeof A=="string"){var B=A.split(":");A=Fx.Transitions;A=A[B[0]]||A[B[0].capitalize()];if(B[1]){A=A["ease"+B[1].capitalize()+(B[2]?B[2].capitalize():"")];
}}return A;}});Fx.Transition=function(B,A){A=$splat(A);return $extend(B,{easeIn:function(C){return B(C,A);},easeOut:function(C){return 1-B(1-C,A);},easeInOut:function(C){return(C<=0.5)?B(2*C,A)/2:(2-B(2*(1-C),A))/2;
}});};Fx.Transitions=new Hash({linear:$arguments(0)});Fx.Transitions.extend=function(A){for(var B in A){Fx.Transitions[B]=new Fx.Transition(A[B]);}};Fx.Transitions.extend({Pow:function(B,A){return Math.pow(B,A[0]||6);
},Expo:function(A){return Math.pow(2,8*(A-1));},Circ:function(A){return 1-Math.sin(Math.acos(A));},Sine:function(A){return 1-Math.sin((1-A)*Math.PI/2);
},Back:function(B,A){A=A[0]||1.618;return Math.pow(B,2)*((A+1)*B-A);},Bounce:function(D){var C;for(var B=0,A=1;1;B+=A,A/=2){if(D>=(7-4*B)/11){C=A*A-Math.pow((11-6*B-11*D)/4,2);
break;}}return C;},Elastic:function(B,A){return Math.pow(2,10*--B)*Math.cos(20*B*Math.PI*(A[0]||1)/3);}});["Quad","Cubic","Quart","Quint"].each(function(B,A){Fx.Transitions[B]=new Fx.Transition(function(C){return Math.pow(C,[A+2]);
});});var Request=new Class({Implements:[Chain,Events,Options],options:{url:"",data:"",headers:{"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*"},async:true,format:false,method:"post",link:"ignore",isSuccess:null,emulation:true,urlEncoded:true,encoding:"utf-8",evalScripts:false,evalResponse:false},initialize:function(A){this.xhr=new Browser.Request();
this.setOptions(A);this.options.isSuccess=this.options.isSuccess||this.isSuccess;this.headers=new Hash(this.options.headers);},onStateChange:function(){if(this.xhr.readyState!=4||!this.running){return ;
}this.running=false;this.status=0;$try(function(){this.status=this.xhr.status;}.bind(this));if(this.options.isSuccess.call(this,this.status)){this.response={text:this.xhr.responseText,xml:this.xhr.responseXML};
this.success(this.response.text,this.response.xml);}else{this.response={text:null,xml:null};this.failure();}this.xhr.onreadystatechange=$empty;},isSuccess:function(){return((this.status>=200)&&(this.status<300));
},processScripts:function(A){if(this.options.evalResponse||(/(ecma|java)script/).test(this.getHeader("Content-type"))){return $exec(A);}return A.stripScripts(this.options.evalScripts);
},success:function(B,A){this.onSuccess(this.processScripts(B),A);},onSuccess:function(){this.fireEvent("complete",arguments).fireEvent("success",arguments).callChain();
},failure:function(){this.onFailure();},onFailure:function(){this.fireEvent("complete").fireEvent("failure",this.xhr);},setHeader:function(A,B){this.headers.set(A,B);
return this;},getHeader:function(A){return $try(function(){return this.xhr.getResponseHeader(A);}.bind(this));},check:function(A){if(!this.running){return true;
}switch(this.options.link){case"cancel":this.cancel();return true;case"chain":this.chain(A.bind(this,Array.slice(arguments,1)));return false;}return false;
},send:function(I){if(!this.check(arguments.callee,I)){return this;}this.running=true;var G=$type(I);if(G=="string"||G=="element"){I={data:I};}var D=this.options;
I=$extend({data:D.data,url:D.url,method:D.method},I);var E=I.data,B=I.url,A=I.method;switch($type(E)){case"element":E=$(E).toQueryString();break;case"object":case"hash":E=Hash.toQueryString(E);
}if(this.options.format){var H="format="+this.options.format;E=(E)?H+"&"+E:H;}if(this.options.emulation&&["put","delete"].contains(A)){var F="_method="+A;
E=(E)?F+"&"+E:F;A="post";}if(this.options.urlEncoded&&A=="post"){var C=(this.options.encoding)?"; charset="+this.options.encoding:"";this.headers.set("Content-type","application/x-www-form-urlencoded"+C);
}if(E&&A=="get"){B=B+(B.contains("?")?"&":"?")+E;E=null;}this.xhr.open(A.toUpperCase(),B,this.options.async);this.xhr.onreadystatechange=this.onStateChange.bind(this);
this.headers.each(function(K,J){try{this.xhr.setRequestHeader(J,K);}catch(L){this.fireEvent("exception",[J,K]);}},this);this.fireEvent("request");this.xhr.send(E);
if(!this.options.async){this.onStateChange();}return this;},cancel:function(){if(!this.running){return this;}this.running=false;this.xhr.abort();this.xhr.onreadystatechange=$empty;
this.xhr=new Browser.Request();this.fireEvent("cancel");return this;}});(function(){var A={};["get","post","put","delete","GET","POST","PUT","DELETE"].each(function(B){A[B]=function(){var C=Array.link(arguments,{url:String.type,data:$defined});
return this.send($extend(C,{method:B.toLowerCase()}));};});Request.implement(A);})();Element.Properties.send={set:function(A){var B=this.retrieve("send");
if(B){B.cancel();}return this.eliminate("send").store("send:options",$extend({data:this,link:"cancel",method:this.get("method")||"post",url:this.get("action")},A));
},get:function(A){if(A||!this.retrieve("send")){if(A||!this.retrieve("send:options")){this.set("send",A);}this.store("send",new Request(this.retrieve("send:options")));
}return this.retrieve("send");}};Element.implement({send:function(A){var B=this.get("send");B.send({data:this,url:A||B.options.url});return this;}});Request.HTML=new Class({Extends:Request,options:{update:false,evalScripts:true,filter:false},processHTML:function(C){var B=C.match(/<body[^>]*>([\s\S]*?)<\/body>/i);
C=(B)?B[1]:C;var A=new Element("div");return $try(function(){var D="<root>"+C+"</root>",G;if(Browser.Engine.trident){G=new ActiveXObject("Microsoft.XMLDOM");
G.async=false;G.loadXML(D);}else{G=new DOMParser().parseFromString(D,"text/xml");}D=G.getElementsByTagName("root")[0];for(var F=0,E=D.childNodes.length;
F<E;F++){var H=Element.clone(D.childNodes[F],true,true);if(H){A.grab(H);}}return A;})||A.set("html",C);},success:function(D){var C=this.options,B=this.response;
B.html=D.stripScripts(function(E){B.javascript=E;});var A=this.processHTML(B.html);B.tree=A.childNodes;B.elements=A.getElements("*");if(C.filter){B.tree=B.elements.filter(C.filter);
}if(C.update){$(C.update).empty().set("html",B.html);}if(C.evalScripts){$exec(B.javascript);}this.onSuccess(B.tree,B.elements,B.html,B.javascript);}});
Element.Properties.load={set:function(A){var B=this.retrieve("load");if(B){B.cancel();}return this.eliminate("load").store("load:options",$extend({data:this,link:"cancel",update:this,method:"get"},A));
},get:function(A){if(A||!this.retrieve("load")){if(A||!this.retrieve("load:options")){this.set("load",A);}this.store("load",new Request.HTML(this.retrieve("load:options")));
}return this.retrieve("load");}};Element.implement({load:function(){this.get("load").send(Array.link(arguments,{data:Object.type,url:String.type}));return this;
}});Request.JSON=new Class({Extends:Request,options:{secure:true},initialize:function(A){this.parent(A);this.headers.extend({Accept:"application/json","X-Request":"JSON"});
},success:function(A){this.response.json=JSON.decode(A,this.options.secure);this.onSuccess(this.response.json,A);}});
//mootools-more
Fx.Slide=new Class({Extends:Fx,options:{mode:"vertical"},initialize:function(B,A){this.addEvent("complete",function(){this.open=(this.wrapper["offset"+this.layout.capitalize()]!=0);
if(this.open&&Browser.Engine.webkit419){this.element.dispose().inject(this.wrapper);}},true);this.element=this.subject=$(B);this.parent(A);var C=this.element.retrieve("wrapper");
this.wrapper=C||new Element("div",{styles:$extend(this.element.getStyles("margin","position"),{overflow:"hidden"})}).wraps(this.element);this.element.store("wrapper",this.wrapper).setStyle("margin",0);
this.now=[];this.open=true;},vertical:function(){this.margin="margin-top";this.layout="height";this.offset=this.element.offsetHeight;},horizontal:function(){this.margin="margin-left";
this.layout="width";this.offset=this.element.offsetWidth;},set:function(A){this.element.setStyle(this.margin,A[0]);this.wrapper.setStyle(this.layout,A[1]);
return this;},compute:function(E,D,C){var B=[];var A=2;A.times(function(F){B[F]=Fx.compute(E[F],D[F],C);});return B;},start:function(B,E){if(!this.check(arguments.callee,B,E)){return this;
}this[E||this.options.mode]();var D=this.element.getStyle(this.margin).toInt();var C=this.wrapper.getStyle(this.layout).toInt();var A=[[D,C],[0,this.offset]];
var G=[[D,C],[-this.offset,0]];var F;switch(B){case"in":F=A;break;case"out":F=G;break;case"toggle":F=(this.wrapper["offset"+this.layout.capitalize()]==0)?A:G;
}return this.parent(F[0],F[1]);},slideIn:function(A){return this.start("in",A);},slideOut:function(A){return this.start("out",A);},hide:function(A){this[A||this.options.mode]();
this.open=false;return this.set([-this.offset,0]);},show:function(A){this[A||this.options.mode]();this.open=true;return this.set([0,this.offset]);},toggle:function(A){return this.start("toggle",A);
}});Element.Properties.slide={set:function(B){var A=this.retrieve("slide");if(A){A.cancel();}return this.eliminate("slide").store("slide:options",$extend({link:"cancel"},B));
},get:function(A){if(A||!this.retrieve("slide")){if(A||!this.retrieve("slide:options")){this.set("slide",A);}this.store("slide",new Fx.Slide(this,this.retrieve("slide:options")));
}return this.retrieve("slide");}};Element.implement({slide:function(D,E){D=D||"toggle";var B=this.get("slide"),A;switch(D){case"hide":B.hide(E);break;case"show":B.show(E);
break;case"toggle":var C=this.retrieve("slide:flag",B.open);B[(C)?"slideOut":"slideIn"](E);this.store("slide:flag",!C);A=true;break;default:B.start(D,E);
}if(!A){this.eliminate("slide:flag");}return this;}});Fx.Scroll=new Class({Extends:Fx,options:{offset:{x:0,y:0},wheelStops:true},initialize:function(B,A){this.element=this.subject=$(B);
this.parent(A);var D=this.cancel.bind(this,false);if($type(this.element)!="element"){this.element=$(this.element.getDocument().body);}var C=this.element;
if(this.options.wheelStops){this.addEvent("start",function(){C.addEvent("mousewheel",D);},true);this.addEvent("complete",function(){C.removeEvent("mousewheel",D);
},true);}},set:function(){var A=Array.flatten(arguments);this.element.scrollTo(A[0],A[1]);},compute:function(E,D,C){var B=[];var A=2;A.times(function(F){B.push(Fx.compute(E[F],D[F],C));
});return B;},start:function(C,H){if(!this.check(arguments.callee,C,H)){return this;}var E=this.element.getSize(),F=this.element.getScrollSize();var B=this.element.getScroll(),D={x:C,y:H};
for(var G in D){var A=F[G]-E[G];if($chk(D[G])){D[G]=($type(D[G])=="number")?D[G].limit(0,A):A;}else{D[G]=B[G];}D[G]+=this.options.offset[G];}return this.parent([B.x,B.y],[D.x,D.y]);
},toTop:function(){return this.start(false,0);},toLeft:function(){return this.start(0,false);},toRight:function(){return this.start("right",false);},toBottom:function(){return this.start(false,"bottom");
},toElement:function(B){var A=$(B).getPosition(this.element);return this.start(A.x,A.y);}});Fx.Elements=new Class({Extends:Fx.CSS,initialize:function(B,A){this.elements=this.subject=$$(B);
this.parent(A);},compute:function(G,H,I){var C={};for(var D in G){var A=G[D],E=H[D],F=C[D]={};for(var B in A){F[B]=this.parent(A[B],E[B],I);}}return C;
},set:function(B){for(var C in B){var A=B[C];for(var D in A){this.render(this.elements[C],D,A[D],this.options.unit);}}return this;},start:function(C){if(!this.check(arguments.callee,C)){return this;
}var H={},I={};for(var D in C){var F=C[D],A=H[D]={},G=I[D]={};for(var B in F){var E=this.prepare(this.elements[D],B,F[B]);A[B]=E.from;G[B]=E.to;}}return this.parent(H,I);
}});var Drag=new Class({Implements:[Events,Options],options:{snap:6,unit:"px",grid:false,style:true,limit:false,handle:false,invert:false,preventDefault:false,modifiers:{x:"left",y:"top"}},initialize:function(){var B=Array.link(arguments,{options:Object.type,element:$defined});
this.element=$(B.element);this.document=this.element.getDocument();this.setOptions(B.options||{});var A=$type(this.options.handle);this.handles=(A=="array"||A=="collection")?$$(this.options.handle):$(this.options.handle)||this.element;
this.mouse={now:{},pos:{}};this.value={start:{},now:{}};this.selection=(Browser.Engine.trident)?"selectstart":"mousedown";this.bound={start:this.start.bind(this),check:this.check.bind(this),drag:this.drag.bind(this),stop:this.stop.bind(this),cancel:this.cancel.bind(this),eventStop:$lambda(false)};
this.attach();},attach:function(){this.handles.addEvent("mousedown",this.bound.start);return this;},detach:function(){this.handles.removeEvent("mousedown",this.bound.start);
return this;},start:function(C){if(this.options.preventDefault){C.preventDefault();}this.fireEvent("beforeStart",this.element);this.mouse.start=C.page;
var A=this.options.limit;this.limit={x:[],y:[]};for(var D in this.options.modifiers){if(!this.options.modifiers[D]){continue;}if(this.options.style){this.value.now[D]=this.element.getStyle(this.options.modifiers[D]).toInt();
}else{this.value.now[D]=this.element[this.options.modifiers[D]];}if(this.options.invert){this.value.now[D]*=-1;}this.mouse.pos[D]=C.page[D]-this.value.now[D];
if(A&&A[D]){for(var B=2;B--;B){if($chk(A[D][B])){this.limit[D][B]=$lambda(A[D][B])();}}}}if($type(this.options.grid)=="number"){this.options.grid={x:this.options.grid,y:this.options.grid};
}this.document.addEvents({mousemove:this.bound.check,mouseup:this.bound.cancel});this.document.addEvent(this.selection,this.bound.eventStop);},check:function(A){if(this.options.preventDefault){A.preventDefault();
}var B=Math.round(Math.sqrt(Math.pow(A.page.x-this.mouse.start.x,2)+Math.pow(A.page.y-this.mouse.start.y,2)));if(B>this.options.snap){this.cancel();this.document.addEvents({mousemove:this.bound.drag,mouseup:this.bound.stop});
this.fireEvent("start",this.element).fireEvent("snap",this.element);}},drag:function(A){if(this.options.preventDefault){A.preventDefault();}this.mouse.now=A.page;
for(var B in this.options.modifiers){if(!this.options.modifiers[B]){continue;}this.value.now[B]=this.mouse.now[B]-this.mouse.pos[B];if(this.options.invert){this.value.now[B]*=-1;
}if(this.options.limit&&this.limit[B]){if($chk(this.limit[B][1])&&(this.value.now[B]>this.limit[B][1])){this.value.now[B]=this.limit[B][1];}else{if($chk(this.limit[B][0])&&(this.value.now[B]<this.limit[B][0])){this.value.now[B]=this.limit[B][0];
}}}if(this.options.grid[B]){this.value.now[B]-=(this.value.now[B]%this.options.grid[B]);}if(this.options.style){this.element.setStyle(this.options.modifiers[B],this.value.now[B]+this.options.unit);
}else{this.element[this.options.modifiers[B]]=this.value.now[B];}}this.fireEvent("drag",this.element);},cancel:function(A){this.document.removeEvent("mousemove",this.bound.check);
this.document.removeEvent("mouseup",this.bound.cancel);if(A){this.document.removeEvent(this.selection,this.bound.eventStop);this.fireEvent("cancel",this.element);
}},stop:function(A){this.document.removeEvent(this.selection,this.bound.eventStop);this.document.removeEvent("mousemove",this.bound.drag);this.document.removeEvent("mouseup",this.bound.stop);
if(A){this.fireEvent("complete",this.element);}}});Element.implement({makeResizable:function(A){return new Drag(this,$merge({modifiers:{x:"width",y:"height"}},A));
}});Drag.Move=new Class({Extends:Drag,options:{droppables:[],container:false},initialize:function(C,B){this.parent(C,B);this.droppables=$$(this.options.droppables);
this.container=$(this.options.container);if(this.container&&$type(this.container)!="element"){this.container=$(this.container.getDocument().body);}C=this.element;
var D=C.getStyle("position");var A=(D!="static")?D:"absolute";if(C.getStyle("left")=="auto"||C.getStyle("top")=="auto"){C.position(C.getPosition(C.offsetParent));
}C.setStyle("position",A);this.addEvent("start",function(){this.checkDroppables();},true);},start:function(B){if(this.container){var D=this.element,J=this.container,E=J.getCoordinates(D.offsetParent),F={},A={};
["top","right","bottom","left"].each(function(K){F[K]=J.getStyle("padding-"+K).toInt();A[K]=D.getStyle("margin-"+K).toInt();},this);var C=D.offsetWidth+A.left+A.right,I=D.offsetHeight+A.top+A.bottom;
var H=[E.left+F.left,E.right-F.right-C];var G=[E.top+F.top,E.bottom-F.bottom-I];this.options.limit={x:H,y:G};}this.parent(B);},checkAgainst:function(B){B=B.getCoordinates();
var A=this.mouse.now;return(A.x>B.left&&A.x<B.right&&A.y<B.bottom&&A.y>B.top);},checkDroppables:function(){var A=this.droppables.filter(this.checkAgainst,this).getLast();
if(this.overed!=A){if(this.overed){this.fireEvent("leave",[this.element,this.overed]);}if(A){this.overed=A;this.fireEvent("enter",[this.element,A]);}else{this.overed=null;
}}},drag:function(A){this.parent(A);if(this.droppables.length){this.checkDroppables();}},stop:function(A){this.checkDroppables();this.fireEvent("drop",[this.element,this.overed]);
this.overed=null;return this.parent(A);}});Element.implement({makeDraggable:function(A){return new Drag.Move(this,A);}});Hash.Cookie=new Class({Extends:Cookie,options:{autoSave:true},initialize:function(B,A){this.parent(B,A);
this.load();},save:function(){var A=JSON.encode(this.hash);if(!A||A.length>4096){return false;}if(A=="{}"){this.dispose();}else{this.write(A);}return true;
},load:function(){this.hash=new Hash(JSON.decode(this.read(),true));return this;}});Hash.Cookie.implement((function(){var A={};Hash.each(Hash.prototype,function(C,B){A[B]=function(){var D=C.apply(this.hash,arguments);
if(this.options.autoSave){this.save();}return D;};});return A;})());var Color=new Native({initialize:function(B,C){if(arguments.length>=3){C="rgb";B=Array.slice(arguments,0,3);
}else{if(typeof B=="string"){if(B.match(/rgb/)){B=B.rgbToHex().hexToRgb(true);}else{if(B.match(/hsb/)){B=B.hsbToRgb();}else{B=B.hexToRgb(true);}}}}C=C||"rgb";
switch(C){case"hsb":var A=B;B=B.hsbToRgb();B.hsb=A;break;case"hex":B=B.hexToRgb(true);break;}B.rgb=B.slice(0,3);B.hsb=B.hsb||B.rgbToHsb();B.hex=B.rgbToHex();
return $extend(B,this);}});Color.implement({mix:function(){var A=Array.slice(arguments);var C=($type(A.getLast())=="number")?A.pop():50;var B=this.slice();
A.each(function(D){D=new Color(D);for(var E=0;E<3;E++){B[E]=Math.round((B[E]/100*(100-C))+(D[E]/100*C));}});return new Color(B,"rgb");},invert:function(){return new Color(this.map(function(A){return 255-A;
}));},setHue:function(A){return new Color([A,this.hsb[1],this.hsb[2]],"hsb");},setSaturation:function(A){return new Color([this.hsb[0],A,this.hsb[2]],"hsb");
},setBrightness:function(A){return new Color([this.hsb[0],this.hsb[1],A],"hsb");}});function $RGB(C,B,A){return new Color([C,B,A],"rgb");}function $HSB(C,B,A){return new Color([C,B,A],"hsb");
}function $HEX(A){return new Color(A,"hex");}Array.implement({rgbToHsb:function(){var B=this[0],C=this[1],J=this[2];var G,F,H;var I=Math.max(B,C,J),E=Math.min(B,C,J);
var K=I-E;H=I/255;F=(I!=0)?K/I:0;if(F==0){G=0;}else{var D=(I-B)/K;var A=(I-C)/K;var L=(I-J)/K;if(B==I){G=L-A;}else{if(C==I){G=2+D-L;}else{G=4+A-D;}}G/=6;
if(G<0){G++;}}return[Math.round(G*360),Math.round(F*100),Math.round(H*100)];},hsbToRgb:function(){var C=Math.round(this[2]/100*255);if(this[1]==0){return[C,C,C];
}else{var A=this[0]%360;var E=A%60;var F=Math.round((this[2]*(100-this[1]))/10000*255);var D=Math.round((this[2]*(6000-this[1]*E))/600000*255);var B=Math.round((this[2]*(6000-this[1]*(60-E)))/600000*255);
switch(Math.floor(A/60)){case 0:return[C,B,F];case 1:return[D,C,F];case 2:return[F,C,B];case 3:return[F,D,C];case 4:return[B,F,C];case 5:return[C,F,D];
}}return false;}});String.implement({rgbToHsb:function(){var A=this.match(/\d{1,3}/g);return(A)?hsb.rgbToHsb():null;},hsbToRgb:function(){var A=this.match(/\d{1,3}/g);
return(A)?A.hsbToRgb():null;}});var Group=new Class({initialize:function(){this.instances=Array.flatten(arguments);this.events={};this.checker={};},addEvent:function(B,A){this.checker[B]=this.checker[B]||{};
this.events[B]=this.events[B]||[];if(this.events[B].contains(A)){return false;}else{this.events[B].push(A);}this.instances.each(function(C,D){C.addEvent(B,this.check.bind(this,[B,C,D]));
},this);return this;},check:function(C,A,B){this.checker[C][B]=true;var D=this.instances.every(function(F,E){return this.checker[C][E]||false;},this);if(!D){return ;
}this.checker[C]={};this.events[C].each(function(E){E.call(this,this.instances,A);},this);}});var Asset=new Hash({javascript:function(F,D){D=$extend({onload:$empty,document:document,check:$lambda(true)},D);
var B=new Element("script",{src:F,type:"text/javascript"});var E=D.onload.bind(B),A=D.check,G=D.document;delete D.onload;delete D.check;delete D.document;
B.addEvents({load:E,readystatechange:function(){if(["loaded","complete"].contains(this.readyState)){E();}}}).setProperties(D);if(Browser.Engine.webkit419){var C=(function(){if(!$try(A)){return ;
}$clear(C);E();}).periodical(50);}return B.inject(G.head);},css:function(B,A){return new Element("link",$merge({rel:"stylesheet",media:"screen",type:"text/css",href:B},A)).inject(document.head);
},image:function(C,B){B=$merge({onload:$empty,onabort:$empty,onerror:$empty},B);var D=new Image();var A=$(D)||new Element("img");["load","abort","error"].each(function(E){var F="on"+E;
var G=B[F];delete B[F];D[F]=function(){if(!D){return ;}if(!A.parentNode){A.width=D.width;A.height=D.height;}D=D.onload=D.onabort=D.onerror=null;G.delay(1,A,A);
A.fireEvent(E,A,1);};});D.src=A.src=C;if(D&&D.complete){D.onload.delay(1);}return A.setProperties(B);},images:function(D,C){C=$merge({onComplete:$empty,onProgress:$empty},C);
if(!D.push){D=[D];}var A=[];var B=0;D.each(function(F){var E=new Asset.image(F,{onload:function(){C.onProgress.call(this,B,D.indexOf(F));B++;if(B==D.length){C.onComplete();
}}});A.push(E);});return new Elements(A);}});var Sortables=new Class({Implements:[Events,Options],options:{snap:4,opacity:1,clone:false,revert:false,handle:false,constrain:false},initialize:function(A,B){this.setOptions(B);
this.elements=[];this.lists=[];this.idle=true;this.addLists($$($(A)||A));if(!this.options.clone){this.options.revert=false;}if(this.options.revert){this.effect=new Fx.Morph(null,$merge({duration:250,link:"cancel"},this.options.revert));
}},attach:function(){this.addLists(this.lists);return this;},detach:function(){this.lists=this.removeLists(this.lists);return this;},addItems:function(){Array.flatten(arguments).each(function(A){this.elements.push(A);
var B=A.retrieve("sortables:start",this.start.bindWithEvent(this,A));(this.options.handle?A.getElement(this.options.handle)||A:A).addEvent("mousedown",B);
},this);return this;},addLists:function(){Array.flatten(arguments).each(function(A){this.lists.push(A);this.addItems(A.getChildren());},this);return this;
},removeItems:function(){var A=[];Array.flatten(arguments).each(function(B){A.push(B);this.elements.erase(B);var C=B.retrieve("sortables:start");(this.options.handle?B.getElement(this.options.handle)||B:B).removeEvent("mousedown",C);
},this);return $$(A);},removeLists:function(){var A=[];Array.flatten(arguments).each(function(B){A.push(B);this.lists.erase(B);this.removeItems(B.getChildren());
},this);return $$(A);},getClone:function(B,A){if(!this.options.clone){return new Element("div").inject(document.body);}if($type(this.options.clone)=="function"){return this.options.clone.call(this,B,A,this.list);
}return A.clone(true).setStyles({margin:"0px",position:"absolute",visibility:"hidden",width:A.getStyle("width")}).inject(this.list).position(A.getPosition(A.getOffsetParent()));
},getDroppables:function(){var A=this.list.getChildren();if(!this.options.constrain){A=this.lists.concat(A).erase(this.list);}return A.erase(this.clone).erase(this.element);
},insert:function(C,B){var A="inside";if(this.lists.contains(B)){this.list=B;this.drag.droppables=this.getDroppables();}else{A=this.element.getAllPrevious().contains(B)?"before":"after";
}this.element.inject(B,A);this.fireEvent("sort",[this.element,this.clone]);},start:function(B,A){if(!this.idle){return ;}this.idle=false;this.element=A;
this.opacity=A.get("opacity");this.list=A.getParent();this.clone=this.getClone(B,A);this.drag=new Drag.Move(this.clone,{snap:this.options.snap,container:this.options.constrain&&this.element.getParent(),droppables:this.getDroppables(),onSnap:function(){B.stop();
this.clone.setStyle("visibility","visible");this.element.set("opacity",this.options.opacity||0);this.fireEvent("start",[this.element,this.clone]);}.bind(this),onEnter:this.insert.bind(this),onCancel:this.reset.bind(this),onComplete:this.end.bind(this)});
this.clone.inject(this.element,"before");this.drag.start(B);},end:function(){this.drag.detach();this.element.set("opacity",this.opacity);if(this.effect){var A=this.element.getStyles("width","height");
var B=this.clone.computePosition(this.element.getPosition(this.clone.offsetParent));this.effect.element=this.clone;this.effect.start({top:B.top,left:B.left,width:A.width,height:A.height,opacity:0.25}).chain(this.reset.bind(this));
}else{this.reset();}},reset:function(){this.idle=true;this.clone.destroy();this.fireEvent("complete",this.element);},serialize:function(){var C=Array.link(arguments,{modifier:Function.type,index:$defined});
var B=this.lists.map(function(D){return D.getChildren().map(C.modifier||function(E){return E.get("id");},this);},this);var A=C.index;if(this.lists.length==1){A=0;
}return $chk(A)&&A>=0&&A<this.lists.length?B[A]:B;}});var Tips=new Class({Implements:[Events,Options],options:{onShow:function(A){A.setStyle("visibility","visible");
},onHide:function(A){A.setStyle("visibility","hidden");},showDelay:100,hideDelay:100,className:null,offsets:{x:16,y:16},fixed:false},initialize:function(){var C=Array.link(arguments,{options:Object.type,elements:$defined});
this.setOptions(C.options||null);this.tip=new Element("div").inject(document.body);if(this.options.className){this.tip.addClass(this.options.className);
}var B=new Element("div",{"class":"tip-top"}).inject(this.tip);this.container=new Element("div",{"class":"tip"}).inject(this.tip);var A=new Element("div",{"class":"tip-bottom"}).inject(this.tip);
this.tip.setStyles({position:"absolute",top:0,left:0,visibility:"hidden"});if(C.elements){this.attach(C.elements);}},attach:function(A){$$(A).each(function(D){var G=D.retrieve("tip:title",D.get("title"));
var F=D.retrieve("tip:text",D.get("rel")||D.get("href"));var E=D.retrieve("tip:enter",this.elementEnter.bindWithEvent(this,D));var C=D.retrieve("tip:leave",this.elementLeave.bindWithEvent(this,D));
D.addEvents({mouseenter:E,mouseleave:C});if(!this.options.fixed){var B=D.retrieve("tip:move",this.elementMove.bindWithEvent(this,D));D.addEvent("mousemove",B);
}D.store("tip:native",D.get("title"));D.erase("title");},this);return this;},detach:function(A){$$(A).each(function(C){C.removeEvent("mouseenter",C.retrieve("tip:enter")||$empty);
C.removeEvent("mouseleave",C.retrieve("tip:leave")||$empty);C.removeEvent("mousemove",C.retrieve("tip:move")||$empty);C.eliminate("tip:enter").eliminate("tip:leave").eliminate("tip:move");
var B=C.retrieve("tip:native");if(B){C.set("title",B);}});return this;},elementEnter:function(B,A){$A(this.container.childNodes).each(Element.dispose);
var D=A.retrieve("tip:title");if(D){this.titleElement=new Element("div",{"class":"tip-title"}).inject(this.container);this.fill(this.titleElement,D);}var C=A.retrieve("tip:text");
if(C){this.textElement=new Element("div",{"class":"tip-text"}).inject(this.container);this.fill(this.textElement,C);}this.timer=$clear(this.timer);this.timer=this.show.delay(this.options.showDelay,this);
this.position((!this.options.fixed)?B:{page:A.getPosition()});},elementLeave:function(A){$clear(this.timer);this.timer=this.hide.delay(this.options.hideDelay,this);
},elementMove:function(A){this.position(A);},position:function(D){var B=window.getSize(),A=window.getScroll();var E={x:this.tip.offsetWidth,y:this.tip.offsetHeight};
var C={x:"left",y:"top"};for(var F in C){var G=D.page[F]+this.options.offsets[F];if((G+E[F]-A[F])>B[F]){G=D.page[F]-this.options.offsets[F]-E[F];}this.tip.setStyle(C[F],G);
}},fill:function(A,B){(typeof B=="string")?A.set("html",B):A.adopt(B);},show:function(){this.fireEvent("show",this.tip);},hide:function(){this.fireEvent("hide",this.tip);
}});var SmoothScroll=new Class({Extends:Fx.Scroll,initialize:function(B,C){C=C||document;var E=C.getDocument(),D=C.getWindow();this.parent(E,B);this.links=(this.options.links)?$$(this.options.links):$$(E.links);
var A=D.location.href.match(/^[^#]*/)[0]+"#";this.links.each(function(G){if(G.href.indexOf(A)!=0){return ;}var F=G.href.substr(A.length);if(F&&$(F)){this.useLink(G,F);
}},this);if(!Browser.Engine.webkit419){this.addEvent("complete",function(){D.location.hash=this.anchor;},true);}},useLink:function(B,A){B.addEvent("click",function(C){this.anchor=A;
this.toElement(A);C.stop();}.bind(this));}});var Slider=new Class({Implements:[Events,Options],options:{onTick:function(A){if(this.options.snap){A=this.toPosition(this.step);
}this.knob.setStyle(this.property,A);},snap:false,offset:0,range:false,wheel:false,steps:100,mode:"horizontal"},initialize:function(E,A,D){this.setOptions(D);
this.element=$(E);this.knob=$(A);this.previousChange=this.previousEnd=this.step=-1;this.element.addEvent("mousedown",this.clickedElement.bind(this));if(this.options.wheel){this.element.addEvent("mousewheel",this.scrolledElement.bindWithEvent(this));
}var F,B={},C={x:false,y:false};switch(this.options.mode){case"vertical":this.axis="y";this.property="top";F="offsetHeight";break;case"horizontal":this.axis="x";
this.property="left";F="offsetWidth";}this.half=this.knob[F]/2;this.full=this.element[F]-this.knob[F]+(this.options.offset*2);this.min=$chk(this.options.range[0])?this.options.range[0]:0;
this.max=$chk(this.options.range[1])?this.options.range[1]:this.options.steps;this.range=this.max-this.min;this.steps=this.options.steps||this.full;this.stepSize=Math.abs(this.range)/this.steps;
this.stepWidth=this.stepSize*this.full/Math.abs(this.range);this.knob.setStyle("position","relative").setStyle(this.property,-this.options.offset);C[this.axis]=this.property;
B[this.axis]=[-this.options.offset,this.full-this.options.offset];this.drag=new Drag(this.knob,{snap:0,limit:B,modifiers:C,onDrag:this.draggedKnob.bind(this),onStart:this.draggedKnob.bind(this),onComplete:function(){this.draggedKnob();
this.end();}.bind(this)});if(this.options.snap){this.drag.options.grid=Math.ceil(this.stepWidth);this.drag.options.limit[this.axis][1]=this.full;}},set:function(A){if(!((this.range>0)^(A<this.min))){A=this.min;
}if(!((this.range>0)^(A>this.max))){A=this.max;}this.step=Math.round(A);this.checkStep();this.end();this.fireEvent("tick",this.toPosition(this.step));return this;
},clickedElement:function(C){var B=this.range<0?-1:1;var A=C.page[this.axis]-this.element.getPosition()[this.axis]-this.half;A=A.limit(-this.options.offset,this.full-this.options.offset);
this.step=Math.round(this.min+B*this.toStep(A));this.checkStep();this.end();this.fireEvent("tick",A);},scrolledElement:function(A){var B=(this.options.mode=="horizontal")?(A.wheel<0):(A.wheel>0);
this.set(B?this.step-this.stepSize:this.step+this.stepSize);A.stop();},draggedKnob:function(){var B=this.range<0?-1:1;var A=this.drag.value.now[this.axis];
A=A.limit(-this.options.offset,this.full-this.options.offset);this.step=Math.round(this.min+B*this.toStep(A));this.checkStep();},checkStep:function(){if(this.previousChange!=this.step){this.previousChange=this.step;
this.fireEvent("change",this.step);}},end:function(){if(this.previousEnd!==this.step){this.previousEnd=this.step;this.fireEvent("complete",this.step+"");
}},toStep:function(A){var B=(A+this.options.offset)*this.stepSize/this.full*this.steps;return this.options.steps?Math.round(B-=B%this.stepSize):B;},toPosition:function(A){return(this.full*Math.abs(this.min-A))/(this.steps*this.stepSize)-this.options.offset;
}});var Scroller=new Class({Implements:[Events,Options],options:{area:20,velocity:1,onChange:function(A,B){this.element.scrollTo(A,B);}},initialize:function(B,A){this.setOptions(A);
this.element=$(B);this.listener=($type(this.element)!="element")?$(this.element.getDocument().body):this.element;this.timer=null;this.coord=this.getCoords.bind(this);
},start:function(){this.listener.addEvent("mousemove",this.coord);},stop:function(){this.listener.removeEvent("mousemove",this.coord);this.timer=$clear(this.timer);
},getCoords:function(A){this.page=(this.listener.get("tag")=="body")?A.client:A.page;if(!this.timer){this.timer=this.scroll.periodical(50,this);}},scroll:function(){var B=this.element.getSize(),A=this.element.getScroll(),E=this.element.getPosition(),D={x:0,y:0};
for(var C in this.page){if(this.page[C]<(this.options.area+E[C])&&A[C]!=0){D[C]=(this.page[C]-this.options.area-E[C])*this.options.velocity;}else{if(this.page[C]+this.options.area>(B[C]+E[C])&&B[C]+B[C]!=A[C]){D[C]=(this.page[C]-B[C]+this.options.area-E[C])*this.options.velocity;
}}}if(D.y||D.x){this.fireEvent("change",[A.x+D.x,A.y+D.y]);}}});var Accordion=new Class({Extends:Fx.Elements,options:{display:0,show:false,height:true,width:false,opacity:true,fixedHeight:false,fixedWidth:false,wait:false,alwaysHide:false},initialize:function(){var C=Array.link(arguments,{container:Element.type,options:Object.type,togglers:$defined,elements:$defined});
this.parent(C.elements,C.options);this.togglers=$$(C.togglers);this.container=$(C.container);this.previous=-1;if(this.options.alwaysHide){this.options.wait=true;
}if($chk(this.options.show)){this.options.display=false;this.previous=this.options.show;}if(this.options.start){this.options.display=false;this.options.show=false;
}this.effects={};if(this.options.opacity){this.effects.opacity="fullOpacity";}if(this.options.width){this.effects.width=this.options.fixedWidth?"fullWidth":"offsetWidth";
}if(this.options.height){this.effects.height=this.options.fixedHeight?"fullHeight":"scrollHeight";}for(var B=0,A=this.togglers.length;B<A;B++){this.addSection(this.togglers[B],this.elements[B]);
}this.elements.each(function(E,D){if(this.options.show===D){this.fireEvent("active",[this.togglers[D],E]);}else{for(var F in this.effects){E.setStyle(F,0);
}}},this);if($chk(this.options.display)){this.display(this.options.display);}},addSection:function(E,C,G){E=$(E);C=$(C);var F=this.togglers.contains(E);
var B=this.togglers.length;this.togglers.include(E);this.elements.include(C);if(B&&(!F||G)){G=$pick(G,B-1);E.inject(this.togglers[G],"before");C.inject(E,"after");
}else{if(this.container&&!F){E.inject(this.container);C.inject(this.container);}}var A=this.togglers.indexOf(E);E.addEvent("click",this.display.bind(this,A));
if(this.options.height){C.setStyles({"padding-top":0,"border-top":"none","padding-bottom":0,"border-bottom":"none"});}if(this.options.width){C.setStyles({"padding-left":0,"border-left":"none","padding-right":0,"border-right":"none"});
}C.fullOpacity=1;if(this.options.fixedWidth){C.fullWidth=this.options.fixedWidth;}if(this.options.fixedHeight){C.fullHeight=this.options.fixedHeight;}C.setStyle("overflow","hidden");
if(!F){for(var D in this.effects){C.setStyle(D,0);}}return this;},display:function(A){A=($type(A)=="element")?this.elements.indexOf(A):A;if((this.timer&&this.options.wait)||(A===this.previous&&!this.options.alwaysHide)){return this;
}this.previous=A;var B={};this.elements.each(function(E,D){B[D]={};var C=(D!=A)||(this.options.alwaysHide&&(E.offsetHeight>0));this.fireEvent(C?"background":"active",[this.togglers[D],E]);
for(var F in this.effects){B[D][F]=C?0:E[this.effects[F]];}},this);return this.start(B);}});
//swfobjects
var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return }if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return }}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return }var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return }var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return }AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();
//slide-show-core-more
var Slideshow=new Class({Implements:[Options],options:{hasFade:true,loop:true,showNav:false,frameDelay:8000,items:"li",height:400,width:400,duration:"normal",version:"1.2.03"},initialize:function(a,b){this.container=$(a);this.setOptions(b);this.container.setStyles({position:"absolute",overflow:"hidden",height:this.options.height,width:this.options.width});this.myElements=this.container.getElements(this.options.items);if(this.myElements.length>1){this.currentIndex=0;this.zIndex=this.myElements.length;this.initElements();this.myElements[this.currentIndex].setStyle("visibility","visible");this.myTimer=this.goTo.delay(this.options.frameDelay,this,this.myElements[this.currentIndex])}},initElements:function(){var a=this.zIndex;this.myElements.each(function(b){b.setStyles({zIndex:a,visibility:"hidden",position:"absolute",height:75,width:255});a--}.bind(this))},goTo:function(a){(this.currentIndex==(this.myElements.length-1)&&this.options.loop)?this.currentIndex=0:this.currentIndex++;this.zIndex++;var b=this.myElements[this.currentIndex];if($type(b)){b.setStyle("z-index",this.zIndex);if(this.options.hasFade){b.setStyle("opacity",0);new Fx.Tween(b,{transition:Fx.Transitions.Sine.easeOut,duration:this.options.duration,onStart:function(){if(this.options.showNav&&$type(this.onTransStart)=="function"){this.onTransStart()}}.bind(this),onComplete:function(){this.myTimer=this.goTo.delay(this.options.frameDelay,this,b)}.bind(this)}).start("opacity",0,1)}else{this.myElements[this.currentIndex].setStyle("visibility","visible");if(this.options.showNav&&$type(this.onTransStart)=="function"){this.onTransStart()}this.myTimer=this.goTo.delay(this.options.frameDelay,this,b)}}}});var ComplexSlideshow=new Class({Implements:[Options],Extends:Slideshow,options:{showNav:true},initialize:function(a,b){this.setOptions(b);this.parent(a,b);if(this.options.showNav&&this.myElements.length>0){this.initNav()}},initNav:function(){this.navContainer=new Element("ul",{"class":"slideshow-nav",styles:{position:"absolute",zIndex:2000000,bottom:4,right:22}}).inject(this.container);this.navContainerItems=new Array();this.myElements.each(function(b,c){var a=new Element("li",{styles:{"list-style":"none","float":"left",marginRight:2}}).inject(this.navContainer);var d=new Element("a",{styles:{cursor:"pointer"}}).inject(a);this.navContainerItems.push(a);if(c==0){a.addClass("active")}d.addEvent("click",function(e){$clear(this.myTimer);this.zIndex++;this.currentIndex=c;this.clearNavItems();this.navContainerItems[c].addClass("active");this.myElements[c].setStyles({zIndex:this.zIndex,visibility:"visible"});this.myTimer=this.goTo.delay(this.options.frameDelay*3,this,this.myElements[this.currentIndex])}.bind(this))}.bind(this))},onTransStart:function(){this.clearNavItems();this.navContainerItems[this.currentIndex].addClass("active")},clearNavItems:function(){this.navContainerItems.each(function(a,b){if(a.hasClass("active")){a.removeClass("active");return}}.bind(this))}});
//startup
function replaceAll(e,d,b){var a=e.indexOf(d);var f=e;while(a>-1){f=f.replace(d,b);a=f.indexOf(d)}return f}function getZipInputElement(){if(document.getElementById("docLocatorZipInput")){return document.getElementById("docLocatorZipInput")}else{return document.getElementById("zipInput")}}function mySubmitForm(){var a=getRelativeURL(window.location.href)+"?zip="+getZipInputElement().value+"&QuerySource="+document.getElementById("querySource").value;window.location.href=a}function EnterKey(b){var a;if(window.event){a=window.event.keyCode}else{a=b.which}if(a==13){mySubmitForm();return false}else{return false}}function getURLParam(a){hu=window.location.search.substring(1);gy=hu.split("&");for(i=0;i<gy.length;i++){ft=gy[i].split("=");if(ft[0]==a){return ft[1]}}}function getRelativeURL(b){var a="";for(i=0;i<getNumberOfChars(b.replace("http://",""),"/")-2;i++){a=a+"../"}a=a+"finddoc/pages/Results.aspx";return a}function SetInitialZipCode(){var a=getURLParam("zip");if(a!=null){getZipInputElement().value=a}}function getNumberOfChars(b,a){return(b.length-replaceAll(b,a,"").length)}var DEFAULT_TEXT="your zip code";function OnFocus(a){if(a.value==DEFAULT_TEXT){a.value=""}}function OnBlur(b){var a=b.value;if(a==DEFAULT_TEXT||a.length==0){b.value=DEFAULT_TEXT}}function RemoveNextPicture(){for(i=0;i<document.getElementsByTagName("li").length;i++){if(document.getElementsByTagName("li")[i].className=="next-page-provider"){if(document.getElementsByTagName("li")[i].getElementsByTagName("a").length>0&&document.getElementsByTagName("li")[i].getElementsByTagName("a")[0]&&document.getElementsByTagName("li")[i].getElementsByTagName("a")[0].innerHTML&&document.getElementsByTagName("li")[i].getElementsByTagName("a")[0].innerHTML.length==0){document.getElementsByTagName("li")[i].className=""}}}}String.format=function(d){if(arguments.length<=1){return d}var b=arguments.length-2;for(var a=0;a<=b;a++){d=d.replace(new RegExp("\\{"+a+"\\}","gi"),arguments[a+1])}return d};function AddFlash(){var a={};var e={wmode:"transparent",allowFullScreen:"true"};var b={id:"flashPlayer"};var d=(window.location.href.indexOf("C:")>-1?"":"../../Assets/")+"swf/main_v11.swf";if(flashinstalled==2){swfobject.embedSWF(d,"mainFlashObj","945","348","9.0.0",d,a,e,b)}else{document.getElementById("mainFlashObj").className="mainFlashObjWithBackground";document.getElementById("downloadFlash").className="downloadFlash";document.getElementById("downloadFlash").innerHTML='<p class="flashMessage">To see this video, you need<br />Adobe Flash Player.</p><a href="http://www.adobe.com/products/flashplayer/" target="_blank" title="DOWNLOAD FLASH PLAYER">DOWNLOAD FLASH PLAYER</a>'}}function AddYouTube(e,f,d,a,b){if(document.getElementById(e)&&flashinstalled==2){document.getElementById(e).innerHTML=String.format('<object width="{0}" height="{1}" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param name="movie" value="{2}"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="{2}" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="{0}" height="{1}" class="{3}"></embed></object>',d+"",a+"",f,b)}}function AddYouTubeLinks(){if(!$("vL")){return}var b=$("vL").getElements("a");var a=$("vL").getElements("li.vidInfo");b.each(function(d){d.addEvent("click",function(e){e.stop();vid="<object width='338' height='217' id='designed-teens' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'>";vid+="<param name='movie' value='"+d.rel+"'> </param>";vid+="<param name='allowFullScreen' value='true'> </param>";vid+="<param name='allowscriptaccess' value='always'> </param>";vid+="<embed src='"+d.rel+"' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='338' height='217'></embed>";vid+="</object>";if(flashinstalled==2){$("youTube").innerHTML=vid}b.each(function(f){f.setStyle("border","none")});$(d).setStyle("border","2px solid #F56D3A");a.each(function(f){f.set("class","vidInfo")});hiLiteLI=d.parentNode.parentNode.parentNode;hiLiteLI.set("class",hiLiteLI.className+" hiLite")})})}function AddGMap(){document.getElementsByTagName("BODY")[0].onunload=function(){GUnload()}}function AddNextPageFix(){if(document.getElementById("paging")){var a=document.getElementById("paging").getElementsByTagName("a");for(i=0;i<a.length;i++){a[i].onblur=DissalowSubmit;a[i].onmouseout=DissalowSubmit;a[i].onfocus=AllowSubmit;a[i].onmouseover=AllowSubmit}}a=document.getElementsByTagName("a");for(i=0;i<a.length;i++){if(a[i].innerHTML&&(a[i].innerHTML=="View Additional Locations"||a[i].innerHTML=="Hide Additional Locations")){a[i].onblur=DissalowSubmit;a[i].onmouseout=DissalowSubmit;a[i].onfocus=AllowSubmit;a[i].onmouseover=AllowSubmit}}}function AllowSubmit(){document.getElementsByTagName("form")[0].onsubmit=function(){return _spFormOnSubmitWrapper()}}function DissalowSubmit(){document.getElementsByTagName("form")[0].onsubmit=function(){return(window.location.href.indexOf("publishinvisalign")>-1)?_spFormOnSubmitWrapper():(_spFormOnSubmitWrapper()&&false)}}function AddClearlyDifferent(){var b=0;var a=$("clearlyDifferent").getElements("div");$$("a.seeAnother").addEvent("click",function(d){d.stop();c=b++;a.each(function(e,f){e.style.visibility="hidden"});if(b<a.length){a[b].style.visibility="visible"}else{b=0;a[b].style.visibility="visible"}})}function AddMov(d,e,b,a){if(document.getElementById(d)){document.getElementById(d).innerHTML=String.format('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab"  width="{0}" height="{1}"><param name="src" value="{2}"><param name="autoplay" value="false"><param name="type" value="video/quicktime"  width="{0}" height="{1}"><embed src="{2}"  width="{0}" height="{1}" autoplay="true" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></object>',b+"",a+"",e)}}function AddAdultsLink(){if(document.getElementById("adultsLink")){document.getElementById("adultsLink").href="http://www.invisalign.com/"}}function AddFormSubmissionFix(){if(window.location.href.indexOf("GetMoreInformation")>-1){document.getElementsByTagName("form")[0].onsubmit=function(){UpdateFormDigest("\u002fteen2\u002fRequestKit",1440000);if(typeof(ValidatorOnSubmit)=="function"&&ValidatorOnSubmit()==false){return false}return(true)?_spFormOnSubmitWrapper():(_spFormOnSubmitWrapper()&&false);return true}}}function AddAccordion(){var a=new Accordion($("accordion"),"h3.accordionHdr","div.element",{opacity:false,onActive:function(d,b){d.setStyle("background-position","0px 1px")},onBackground:function(d,b){d.setStyle("background-position","0px -25px")}})}function AddSlideShow(){if(document.getElementById("slideshow")){var a=new ComplexSlideshow("slideshow",{items:".fade-item",hasFade:true,width:323,height:245})}}function FillCommonContent(){document.getElementById("teenHeader").innerHTML=header_file.document.getElementsByTagName("body")[0].innerHTML;document.getElementById("teenCommonFooter").innerHTML=footer_file.document.getElementsByTagName("body")[0].innerHTML;document.getElementById("commonScripts").innerHTML=common_scripts_file.document.getElementsByTagName("body")[0].innerHTML;document.getElementById("secondaryContent").innerHTML=secondary_content_file.document.getElementsByTagName("body")[0].innerHTML;if(document.getElementById("slideshow")){document.getElementById("slideshow").innerHTML=straight_facts_slideshow_file.document.getElementsByTagName("body")[0].innerHTML}if(document.getElementById("factPact")){document.getElementById("factPact").innerHTML=fact_pact_link_file.document.getElementsByTagName("body")[0].innerHTML}if(document.getElementById("parentsBulletin")){document.getElementById("parentsBulletin").innerHTML=link_to_adult_file.document.getElementsByTagName("body")[0].innerHTML}if(document.getElementById("signUpNow")){document.getElementById("signUpNow").innerHTML=sign_up_now_file.document.getElementsByTagName("body")[0].innerHTML}}window.addEvent("domready",function(){if(window.location.href.indexOf("C:")>-1){FillCommonContent()}if(window.location.href.toLowerCase().indexOf("Welcome".toLowerCase())>-1||window.location.href.toLowerCase().indexOf("index".toLowerCase())>-1){AddFlash();AddClearlyDifferent()}if(window.location.href.toLowerCase().indexOf("FindDoc".toLowerCase())>-1||window.location.href.toLowerCase().indexOf("doc-locator".toLowerCase())>-1){AddGMap();SetInitialZipCode()}if(window.location.href.toLowerCase().indexOf("Buzz".toLowerCase())>-1){AddYouTubeLinks()}RemoveNextPicture();AddSlideShow();AddYouTube("youTube","http://www.youtube.com/v/_LC6t79bVHc&hl=en&fs=1&",338,217,"");AddYouTube("youtube_renzo","http://www.youtube.com/v/Cyq7xyRSnH8&hl=en&fs=1",340,220,"buzz-vid");AddYouTube("youtube_lisa","http://www.youtube.com/v/5IaOBWWslsU&hl=en&fs=1",298,243,"");AddNextPageFix();AddFormSubmissionFix();AddAccordion();AddAdultsLink()});