function copyInnerHTML(a,b){b.innerHTML=a.innerHTML}function listProperties(a){var b="",c;for(c in a)b+=c+", ";alert(b)}function getLocalOffsetTop(a){return getLocalOffset(a,"Top")}function getLocalOffsetLeft(a){return getLocalOffset(a,"Left")}function getLocalOffset(a,b){var c=a["offset"+b],d;try{d=a.offsetParent}catch(e){return c}for(;d&&"static"==getCurrentStyle(d,"position");){c+=d["offset"+b];try{d=d.offsetParent}catch(f){break}}return c}
function makeAjaxRequest(a,b){if(window.XMLHttpRequest)xmlhttp=new XMLHttpRequest;else if(window.ActiveXObject)xmlhttp=new ActiveXObject("MSXML2.XMLHTTP");else return!1;xmlhttp.open("GET",a,!0);xmlhttp.onreadystatechange=function(){4==xmlhttp.readyState&&b&&b(xmlhttp.responseText)};xmlhttp.send(null)}
function getElementsByClassName(a,b,c){b||(b=document.body);if(b.getElementsByClassName){var d=b.getElementsByClassName(a);if(strTagNameUpper=c?c.toUpperCase():null){if(Array.filter)return Array.filter(d,function(a){return a.nodeName==strTagNameUpper});c=[];a=d.length;for(b=0;b<a;b++)d[b].nodeName==strTagNameUpper&&c.push(d[b]);return c}return d}c||(c="*");d="*"==c&&b==document.body&&document.all?document.all:b.getElementsByTagName(c);c=[];a=a.replace(/\-/g,"\\-");var e=RegExp("\\b"+a+"\\b");a=d.length;
for(b=0;b<a;b++)e.test(d[b].className)&&c.push(d[b]);return c}function getLoginCookieValue(){var a=document.cookie,b=a.indexOf("login\x3d");if(-1==b)return"";var b=b+6,c=a.indexOf(";",b);-1==c&&(c=a.length);return a.substring(b,c)}function assureInt(a){var b;return isNaN(b=parseInt(a))?0:b}
var isIE=-1!=navigator.appName.indexOf("Microsoft"),isIE5=0<navigator.userAgent.indexOf("MSIE 5.0"),isIE7=-1!=navigator.userAgent.indexOf("MSIE 7"),isOpera=-1!=navigator.userAgent.indexOf("Opera"),isSafari=-1!=navigator.userAgent.indexOf("AppleWebKit"),isFirefox=-1!=navigator.userAgent.indexOf("Firefox/"),isNetscape=-1!=navigator.userAgent.indexOf("Netscape/"),lastMouseX,lastMouseY,curPopupWindow=null,closeOnParentUnloadWindow=null,helpWindow=null,win=null,editPage=!1,currentEntityId="",currentEntityId2=
"",picklistNAMarker="_\u0001_",encryptionHeaderBytes=16,encryptionIVSize=16,encryptionEndControlBytes=3,encryptionAESBlockSize=16;function EventData(a,b,c,d){this.element=a;this.type=b;this.handler=c;this.useCapture=d}
var eventRegistry,addEvent=function(){return window.addEventListener?function(a,b,c,d){a.addEventListener(b,c,d);eventRegistry||(eventRegistry=[],window.addEventListener("unload",cleanupEvents,!1));eventRegistry.push(new EventData(a,b,c,d))}:window.attachEvent?function(a,b,c,d){d=a.attachEvent("on"+b,c);eventRegistry||(eventRegistry=[],window.attachEvent("onunload",cleanupEvents));eventRegistry.push(new EventData(a,b,c));return d}:function(){return null}}(),removeEvent=function(){return window.removeEventListener?
function(a,b,c,d){a.removeEventListener(b,c,d)}:window.detachEvent?function(a,b,c,d){a.detachEvent("on"+b,c)}:function(){return null}}();function cleanupEvents(){if(eventRegistry){for(var a=0;a<eventRegistry.length;a++){var b=eventRegistry[a];removeEvent(b.element,b.type,b.handler,b.useCapture)}eventRegistry=null;removeEvent(window,"unload",cleanupEvents,!1)}}function mouseExited(a,b){for(var c=getEventToElement(a);c&&c!=document.body;){if(c==b)return!1;c=c.parentNode}return!0}
function getEvent(a){return a||window.event}function getEventTarget(a){return a.target||a.srcElement}function getEventToElement(a){return a.relatedTarget?a.relatedTarget:a.toElement}function eventCancelBubble(a){a.cancelBubble=!0;a.stopPropagation&&a.stopPropagation()}var beenFocused=!1,focusedElement=null,textAreaTimer=null;function markFocused(){beenFocused=!0}addEvent(document,"mousedown",markFocused);function trackFocused(a){a||(a=window.event);focusedElement=a&&a.target||null}
addEvent(document,"focus",trackFocused);function reFocus(){if(focusedElement&&focusedElement.focus){var a=focusedElement.id;if(a){for(var b=reFocus.arguments,c=0;c<b.length;c+=2)if(a==b[c]){a=document.getElementById(b[c+1]);hiddenOrDisabled(a)||a.focus();focusedElement=a;return}if((a=document.getElementById(a))&&a.focus&&!hiddenOrDisabled(a))a.focus(),focusedElement=a}}}
function setEntityInformation(a,b,c,d,e,f,g,m){currentEntityId=d;currentEntityId2=g;var h;h=self.getAccessibleParentWindow?getAccessibleParentWindow(self):self;editPage=e;f&&h&&(h.sendCTIMessage&&h.sendCTIMessage("ADD_LOG_OBJECT?ID\x3d"+d+"\x26OBJECT_LABEL\x3d"+escape(b)+"\x26ENTITY_NAME\x3d"+c+"\x26OBJECT_NAME\x3d"+escape(a)),h.cleanupClickToDial&&h.cleanupClickToDial());if(h&&h.Sfdc&&(b=h.Sfdc.ns("Sfdc.support.api"),b.pageInfo=b.pageInfo||{},e=b.pageInfo[d]?b.pageInfo[d].url:null,f=g&&b.pageInfo[g]?
b.pageInfo[g].url:null,b.pageInfo[d]={objectId:d,objectName:a,object:c,displayName:m},g?(b.pageInfo[d].personAccountId=g,e&&0<e.indexOf(d)?b.pageInfo[d].url=e:b.pageInfo[d].url=location.href,b.pageInfo[g]={objectId:d,objectName:a,object:c,personAccountId:g,displayName:m},f&&0<f.indexOf(g)?b.pageInfo[g].url=f:b.pageInfo[g].url=location.href):b.pageInfo[d].url=location.href,h.Sfdc.interaction&&(h.Sfdc.interaction.currentEntityId=d,h.Sfdc.interaction.isListenerEnabled.onFocus&&h.Sfdc.support.api.pageInfo[d])))h.Sfdc.interaction.onFocus(window.name)}
function setLastMousePosition(a){-1!=navigator.appName.indexOf("Microsoft")&&(a=window.event);lastMouseX=a.screenX;lastMouseY=a.screenY}function openClickout(a){openClickoutWithSize(a,640,480)}function openClickoutWithSize(a,b,c){window.open(a,"_blank","width\x3d"+b+",height\x3d"+c+",dependent\x3dno,resizable\x3dyes,toolbar\x3dyes,status\x3dyes,directories\x3dyes,menubar\x3dyes,scrollbars\x3d1",!1)}
function openIntegration(a,b,c){a=window.open(a,"_blank",b,!1);2==c?a.moveTo(0,0):0==c&&(a.moveTo(0,0),a.resizeTo(self.screen.width,self.screen.height))}function openPopup(a,b,c,d,e,f){openPopupFocus(a,b,c,d,e,f,!0)}function openPopupFocusEscapePounds(a,b,c,d,e,f,g){openPopupFocus(a.replace("#","%23"),b,c,d,e,f,g)}
function openPopupFocus(a,b,c,d,e,f,g,m){closePopup();f&&(0>lastMouseX-c&&(lastMouseX=c),lastMouseY+d>screen.height&&(lastMouseY-=lastMouseY+d+50-screen.height),lastMouseX-=c,lastMouseY+=10,e+=",screenX\x3d"+lastMouseX+",left\x3d"+lastMouseX+",screenY\x3d"+lastMouseY+",top\x3d"+lastMouseY);g?(curPopupWindow=window.open(a,b,e,!1),curPopupWindow.focus()):(win=window.open(a,b,e,!1),win.focus());m&&(closeOnParentUnloadWindow=win)}
function openPopupFocusWithOffset(a,b,c,d){win=window.open(a,"",b);win.moveTo(window.pageXOffset+c,window.pageYOffset+d);win.focus()}var closetimer,ie9=0<=navigator.userAgent.indexOf("MSIE 9");function closePopupOnBodyFocus(){ie9?(closetimer&&clearTimeout(closetimer),closetimer=window.setTimeout(function(){closetimer=null;closePopup()},500)):closePopup()}
function closePopup(){closetimer&&(clearTimeout(closetimer),closetimer=null);if(null!=curPopupWindow){try{if(curPopupWindow.confirmOnClose&&curPopupWindow.confirm(curPopupWindow.confirmOnCloseLabel))return curPopupWindow.confirmOnClose=!1,curPopupWindow.focus(),!1;curPopupWindow.close()}catch(a){}curPopupWindow=null}}var modalWindow=null;function ignoreModalEvents(a){return!1}
function handleModalFocus(){modalWindow&&(modalWindow.closed?(window.top.releaseEvents(Event.CLICK|Event.FOCUS),window.top.onclick=""):modalWindow.focus());return!1}function invokeResultFunc(){(window.dialogArguments?window.dialogArguments:window.opener.resultFunc)()}
function openPopupModal(a,b,c,d,e,f,g){try{if(window.showModalDialog)window.showModalDialog(a,null==f?window:f,e);else if(window.top.captureEvents)window.top.captureEvents(Event.CLICK|Event.FOCUS),window.top.onclick=ignoreModalEvents,window.top.onfocus=handleModalFocus,modalWindow=window.open(a,b,e+",modal\x3dyes"),f&&(window.resultFunc=f);else return g?g():openPopup(a,b,c,d,e,!1)}catch(m){modalWindow=window.open(a,b,e+",modal\x3dyes"),f&&(window.resultFunc=f),Sfdc.log(m)}}var clickedLink,warningText;
function confirmPopup(a,b,c,d,e,f){clickedLink=e.href?e.href:e;warningText=f;e=new Function("window.location \x3d clickedLink");e.window=window;openPopupModal(a,"_blank",b,c,d,e,new Function("return confirm(warningText)"));return!1}function openLookup(a,b,c,d){"1"==c&&(a+=d);openPopup(a,"lookup",350,480,"width\x3d"+b+",height\x3d480,toolbar\x3dno,status\x3dno,directories\x3dno,menubar\x3dno,resizable\x3dyes,scrollable\x3dno",!0)}
function pick(a,b,c,d){document.getElementById(a)[b].value=c;if(d)document.getElementById(a)[b].onchange();closePopup();return!1}function pickSubmit(a,b,c,d){document.getElementById(a)[b].value=c;if(d)document.getElementById(a)[b].onchange();document.getElementById(a).submit();closePopup();hiddenOrDisabled(document.getElementById(a)[b])||(document.getElementById(a)[b].focus(),document.getElementById(a)[b].select());return!1}
function hiddenOrDisabled(a){do{if(null==a||"hidden"==a.type||a.disabled||"none"==getCurrentStyle(a,"display")||"hidden"==getCurrentStyle(a,"visibility"))return!0;a=a.parentNode}while(null!=a&&"BODY"!=a.tagName);return!1}function hiddenOrDisabledOrReadOnly(a){do{if(null==a||"hidden"==a.type||a.readOnly||a.disabled||"none"==getCurrentStyle(a,"display")||"hidden"==getCurrentStyle(a,"visibility"))return!0;a=a.parentNode}while(null!=a&&"BODY"!=a.tagName);return!1}
function pickcolor(a,b,c){var d=parseInt(c,16);a=document.getElementById(a)[b];a.setValue?a.setValue(d):a.value=d;document.getElementById(b+"cell").style.backgroundColor="#"+c;closePopup();return!1}function comboBoxPick(a,b,c,d){a=document.getElementById(a)[b];null!=a&&(c=eval(c),null!=c&&(0<=d&&d<c.length)&&(a.value=c[d],hiddenOrDisabled(a)||(a.focus(),a.select())));closePopup();return!1}
function attachEventToElement(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c)}function navWithToken(a,b){var c=document.createElement("form");c.method="POST";c.action=b;var d=document.createElement("input");d.type="hidden";d.name="_CONFIRMATIONTOKEN";d.value=a;c.appendChild(d);document.body.appendChild(c);c.submit()}function navigateToUrl(a){"undefined"!==typeof sforce&&"undefined"!==typeof sforce.one?sforce.one.navigateToURL(a):window.location=a}
function hitUrl(a){var b=document.getElementsByTagName("body")[0],c=document.getElementById("goToUrlFrame");c||(c=document.createElement("div"),c.style.display="none",b.appendChild(c),c.innerHTML='\x3ciframe src\x3d"javascript:false" style\x3d"display:none;" id\x3d"goToUrlFrame" name\x3d"goToUrlFrame"\x3e\x3c/iframe\x3e',c=document.getElementById("goToUrlFrame"),c.title="blank - ignore");c=document.createElement("form");b.appendChild(c);c.target="goToUrlFrame";c.method="POST";c.action=a;c.submit();
b.removeChild(c)}
function doLookupPick(a,b,c,d,e,f,g,m,h){var l=b.parentIdElement,k=b.parentEditElement,n=k.name,p=b.parentEditOldValueElement;if("select-one"==l.type){e=!1;for(i=0;i<l.options.length;i++)if(l.options[i].value==c){l.selectedIndex=i;e=!0;break}e||(l.options[l.options.length]=new Option(d,c),l.selectedIndex=l.options.length-1);k.value=d;p.value=d;!hiddenOrDisabled(l)&&"function"==typeof l.onchange&&(c=l.value,window.Sfdc&&(Sfdc.Event&&Sfdc.Event.fireEvent)&&Sfdc.Event.fireEvent(l,"change"),l.value=c,
k.value=d)}else{if(b.extraNameElement)if(f){if("undefined"!==typeof b.extraNameElement.value&&(0==b.extraNameElement.value.length||b.extraNameElement.value==k.value))b.extraNameElement.value=d}else if((e||null==b.extraNameElement.value||""==b.extraNameElement.value)&&null!=m&&""!=m)b.extraNameElement.value=m,b.extraIdElement&&(b.extraIdElement.value=h),b.extraEditOldValueElement&&(b.extraEditOldValueElement.value=m);l.value=c;k.value=d;p.value=d;window.ForeignKeyInputElement&&ForeignKeyInputElement.dispatchLookupChange(k.name);
window.sfdcPage&&sfdcPage.getFieldById&&(p=sfdcPage.getFieldById(k.name))&&p.lookupPickCalled();!hiddenOrDisabled(k)&&"function"==typeof k.onchange&&(window.Sfdc&&(Sfdc.Event&&Sfdc.Event.fireEvent)&&Sfdc.Event.fireEvent(k,"change"),l.value=c,k.value=d)}b.relatedFieldElement&&(b.relatedFieldElement.value=g);var q=getElementByIdCS(n+"_onpk");q&&""!=q.value&&setTimeout(function(){eval(q.value)},1);if((d=getElementsByNameCS(n+"_lspf")[0])&&"1"==d.value){if(n=getElementsByNameCS(n+"_lspfsub")[0])n.value=
"1";document[a].submit()}b.modElement&&(b.modElement.value="1");closePopup();hiddenOrDisabled(k)||(k.focus(),k.select());return!1}
function lookupPick(a,b,c,d,e,f,g,m){function h(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c].getAttribute("name")===b)return a[c]}var l=document.forms[a];b={parentIdElement:h(Sfdc.select(Sfdc.String.format("input[name\x3d'{name}'], select[name\x3d'{name}']",{name:b}),l),b),parentEditElement:h(Sfdc.select(Sfdc.String.format("input[name\x3d'{name}'], select[name\x3d'{name}']",{name:c}),l),c),parentEditOldValueElement:h(Sfdc.select(Sfdc.String.format("input[name\x3d'{name}'], select[name\x3d'{name}']",
{name:c+"_lkold"}),l),c+"_lkold"),relatedFieldElement:getElementsByNameCS(d)[0],extraNameElement:getElementsByNameCS(m)[0],modElement:getElementsByNameCS(c+"_mod")[0]};return doLookupPick(a,b,e,f,!1,!0,g)}
function lookupPick2(a,b,c,d,e,f,g,m,h,l){function k(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c].getAttribute("name")===b)return a[c]}var n=document.forms[a];b={parentIdElement:k(Sfdc.select(Sfdc.String.format("input[name\x3d'{name}'], select[name\x3d'{name}']",{name:b}),n),b),parentEditElement:k(Sfdc.select(Sfdc.String.format("input[name\x3d'{name}'], select[name\x3d'{name}']",{name:c}),n),c),parentEditOldValueElement:k(Sfdc.select(Sfdc.String.format("input[name\x3d'{name}'], select[name\x3d'{name}']",
{name:c+"_lkold"}),n),c+"_lkold"),extraNameElement:getElementsByNameCS(f)[0],extraIdElement:getElementsByNameCS(m)[0],extraEditOldValueElement:getElementsByNameCS(f+"_lkold")[0],modElement:getElementsByNameCS(c+"_mod")[0]};return doLookupPick(a,b,d,e,l,!1,null,g,h)}function searchEntityTwo(a,b,c){b=document.getElementById(b);if(a){if(b.checked=!0,a=document.getElementsByName(c))for(i=0;i<a.length;++i)a[i]!=b&&(a[i].checked=!1)}else b.checked=!1}
function lookupPhonePick(a,b){var c=document.getElementById(a);c.value=b;closePopup();c.focus();c.select()}function setFocusOnLoad(){beenFocused||setFocus()}function elementFocus(a){hiddenOrDisabled(a)||a.focus()}function elementSelect(a){hiddenOrDisabled(a)||a.select()}
function setFocus(){for(var a=1;5>a;a++)for(var b=a,c=0;c<document.forms.length;c++)for(var d=document.forms[c],e=0;e<d.elements.length;e++){var f=d.elements[e];if(f.tabIndex==b){if(("text"==f.type||"textarea"==f.type||"password"==f.type)&&!hiddenOrDisabledOrReadOnly(f)&&"sbstr"!=f.name&&0!=f.name.indexOf("owner")&&0!=f.name.indexOf("tsk1")&&0!=f.name.indexOf("evt1")&&"tsid"!==f.name)return f.focus(),"text"==f.type&&f.select(),!0;b++;e=0}}for(c=0;c<document.forms.length;c++)if(d=document.forms[c],
a=d.name,"sbsearch"!=a&&"srch_solution_sbar"!=a&&"srch_product_sbar"!=a&&"srch_document_sbar"!=a&&"srch_article_sbar"!=a)for(e=0;e<d.elements.length;e++)if(f=d.elements[e],"true"!=f.getAttribute("data-skipFocus")&&("text"==f.type||"textarea"==f.type||"password"==f.type)&&!hiddenOrDisabledOrReadOnly(f)&&0!=f.name.indexOf("owner")&&"tsid"!==f.name)return f.focus(),"text"==f.type&&f.select(),!0;return!0}
function setNamedFocus(a){for(var b=0;b<document.forms.length;b++)for(var c=document.forms[b],d=0;d<c.elements.length;d++){var e=c.elements[d];if(e.name==a&&!hiddenOrDisabled(e))return e.focus(),"text"==e.type&&!hiddenOrDisabled(e)&&e.select(),!0}return!0}function formatPhoneOnEnter(a,b){getEvent(b).keyCode==KEY_ENTER&&formatPhone(a)}
function formatPhone(a){a.value=trim(a.value);var b=a.value,c="",d=-1;if(0<b.length&&"+"!=b.charAt(0)){var e=0;"1"==b.charAt(0)&&(b=b.substring(1,b.length));for(i=0;i<b.length;i++){var f=b.charAt(i);"0"<=f&&"9">=f&&(0==e?c+="(":3==e?c+=") ":6==e&&(c+="-"),c+=f,e++);if(!("0"<=f&&"9">=f)&&" "!=f&&"-"!=f&&"."!=f&&"("!=f&&")"!=f){d=i;break}}0<=d&&(c+=" "+b.substring(d,b.length));10==e&&40>=c.length&&(a.value=c)}return!0}
function clearcols(){for(var a=0;a<document.forms.length;a++)for(var b=0;b<document.forms[a].elements.length;b++){var c=document.forms[a].elements[b];if("c"==c.name||"c_"==c.name.substring(0,2))c.checked=!1}}function setcols(){for(var a=0;a<document.forms.length;a++)for(var b=0;b<document.forms[a].elements.length;b++){var c=document.forms[a].elements[b];if("c"==c.name||"c_"==c.name.substring(0,2))c.checked=!0}}
function setUsername(a,b,c,d){0==a.value.length&&(a.value=b.value.substring(0,1).toLowerCase()+c.value.toLowerCase()+"@"+d.value)}function setAlias(a,b,c){0==a.value.length&&(a.value=b.value.substring(0,1).toLowerCase()+c.value.substring(0,4).toLowerCase())}function popWin(a){closePopup();curPopupWindow=window.open(a,"win","toolbar\x3d0,location\x3d0,directories\x3d0,status\x3d0,menubar\x3d0,scrollbars\x3d1,resizable\x3d0,width\x3d550,height\x3d300",!1)}
function popWin2(a){win=window.open(a,"win","toolbar\x3d0,location\x3d0,directories\x3d0,status\x3d0,menubar\x3d0,scrollbars\x3d1,resizable\x3d0,width\x3d720,height\x3d500",!1)}function adminWin(a){win=window.open(a,"win","toolbar\x3d1,location\x3d1,directories\x3d0,status\x3d1,menubar\x3d1,scrollbars\x3d1,resizable\x3d1,width\x3d800,height\x3d600",!1)}
function printWin(a){popWin=window.open(a,"win","dependent\x3dno,toolbar\x3d1,directories\x3d0,location\x3d0,status\x3d1,menubar\x3d1,scrollbars\x3d1,resizable\x3d1,width\x3d705,height\x3d400",!1);popWin.focus()}
function moveSelectElement3(a,b,c,d,e){if(-1<a.selectedIndex){for(i=0;i<a.length;++i){var f=a.options[i];if(f.selected)if(f.text!=c){var g=new Option(f.text,f.value);g.title=f.title;0<b.options.length&&b.options[0].text==d?(b.options[0]=g,b.selectedIndex=0):(b.options[b.options.length]=g,b.selectedIndex=b.options.length-1)}else a.selectedIndex=-1}e||removeSelectElement3(a,c)}}function sortOrderNumeric(a,b){return a-b}function sortOrderNumericReverse(a,b){return b-a}
function moveSelectElementIds(a,b,c,d,e){if(c){b=b.options;for(i=0;i<c.length;i++){var f=a.options[c[i]],g=new Option(f.text,f.value);g.title=f.title;1==b.length&&b[0].text==e?(b[0]=g,b[0].selected=!0):b[b.length]=g}if(!d){c=c.sort(sortOrderNumericReverse);for(i=0;i<c.length;i++)a.options[c[i]]=null;0==a.length&&(c=new Option(e,e),a.options[0]=c)}}}function moveOption(a,b,c,d,e,f,g,m,h){DuelingListBoxesElement.moveOption(a,b,c,d,e,f,g,m,h)}
function removeSelectElement3(a,b){if(-1<a.selectedIndex){for(i=a.length-1;-1<i;i--)a.options[i].selected&&(a.options[i]=null);if(0==a.length){var c=new Option(b,b);a.options[0]=c}}}function moveUp(a,b,c,d,e){return DuelingListBoxesElement.moveUp(a,b,c,d,e)}function moveDown(a,b,c,d,e){return DuelingListBoxesElement.moveDown(a,b,c,d,e)}function moveTop(a,b){return DuelingListBoxesElement.moveTop(a,b)}function moveBottom(a,b){DuelingListBoxesElement.moveBottom(a,b)}
function saveAllSelected(a,b,c,d,e){DuelingListBoxesElement.saveAllSelected(a,b,c,d,e)}function ddChangeAllElements(a,b){var c=a.selectedIndex;if(0<c)for(var d=0;d<b.length;d++){var e=getElementByIdCS(b[d]);e&&(e.selectedIndex=c-1)}}function ddElementChange(a,b,c){a=getElementByIdCS(b[0]).selectedIndex;for(var d=1;d<b.length;d++)if(getElementByIdCS(b[d]).selectedIndex!=a){a=-1;break}getElementByIdCS(c).selectedIndex=a+1}
function ddRadioClicked(a,b,c){a="all"==a.value;document.getElementById(c).disabled=!a;for(var d=0;d<b.length;d++){var e=getElementByIdCS(b[d]);e&&(e.disabled=a);if(a){var f=getElementByIdCS(c).selectedIndex;0<f&&(e.selectedIndex=f-1)}}}
function openwizard(a,b,c){b=window.open("",b,"toolbar\x3d0,location\x3d0,directories\x3d0,status\x3d0,menubar\x3d0,scrollbars\x3d1,resizable\x3d"+c+",width\x3d700,height\x3d550,screenx\x3d50,screeny\x3d10,left\x3d50,top\x3d10",!1);if(""==b.document.URL||"about:blank"==b.document.URL)b.location=a;b.focus()}
function openwizard2(a,b,c){window.open(a,b,"toolbar\x3d0,location\x3d0,directories\x3d0,status\x3d0,menubar\x3d0,scrollbars\x3d1,resizable\x3d"+c+",width\x3d700,height\x3d550,screenx\x3d50,screeny\x3d10,left\x3d50,top\x3d10",!1)}
function escapeUTF(a){var b="";for(i=0;i<a.length;i++){var c=a.charCodeAt(i);127>=c?b+=escape(a.charAt(i)):2047>=c?b+="%"+(c>>6|192).toString(16)+"%"+(c&63|128).toString(16):2048<=c&&(b+="%"+(c>>12|224).toString(16)+"%"+(c>>6&63|128).toString(16)+"%"+(c&63|128).toString(16))}return b}function openRefer(a){window.open(a,"referv2","resizable\x3dno,toolbar\x3dno,status\x3dno,directories\x3dno,scrollbars\x3dyes,width\x3d420,height\x3d500",!1)}
function changeOpenerWindowLocation(a){null==window.top.opener||window.top.opener.closed?window.top.open(a):(window.top.opener.location.href=a,window.top.opener.focus())}function verifyUnderLimit(a,b,c,d){var e=0;for(i=0;i<a.elements.length;i++)if(a.elements[i].name==b&&a.elements[i].checked&&++e>c)return alert(d),!1;return!0}function verifyChecked(a,b,c){for(i=0;i<a.elements.length;i++)if(a.elements[i].name==b&&a.elements[i].checked)return!0;alert(c);return!1}
function verifyCheckedByPrefix(a,b,c){for(i=0;i<a.elements.length;i++)if(0==a.elements[i].name.indexOf(b)&&a.elements[i].checked)return!0;alert(c);return!1}function verifySingleCheckedByPrefix(a,b,c){var d=0;for(i=0;i<a.elements.length;i++)0==a.elements[i].name.indexOf(b)&&a.elements[i].checked&&d++;if(1==d)return!0;alert(c);return!1}function verifyCheckedWarning(a,b,c){var d=!1;for(i=0;i<a.elements.length;i++)a.elements[i].name==b&&a.elements[i].checked&&(d=!0);return d?window.confirm(c):!0}
function submitFormActionURL(a,b){a.action=b;a.submit()}function updateToggleAllBox(a,b,c){var d=null;"undefined"!=typeof c?d=document.getElementById(c):a.allBox&&(d=a.allBox);null!=d&&(d.checked=allChecked(a,b))}
function toggleAddRemoveButtons(a,b,c,d){c=document.getElementsByName(c);d=document.getElementsByName(d);if(null!=c&&null!=d){a=anyChecked(a,b);for(b=0;b<c.length;b++)a?(c[b].disabled&&(c[b].disabled=!1,c[b].className="btn"),d[b].disabled||(d[b].disabled=!0,d[b].className="btnDisabled")):(c[b].disabled||(c[b].disabled=!0,c[b].className="btnDisabled"),d[b].disabled&&(d[b].disabled=!1,d[b].className="btn"))}}
function allChecked(a,b){for(var c=0,c=0;c<a.elements.length;c++){var d=a.elements[c];if(d.name==b&&"checkbox"==d.type&&!1==d.checked)return!1}return!0}function anyChecked(a,b){for(var c=0,c=0;c<a.elements.length;c++){var d=a.elements[c];if(d.name==b&&"checkbox"==d.type&&!0==d.checked)return!0}return!1}function SelectChecked(a,b,c){for(var d=0,d=0;d<a.elements.length;d++)a.elements[d].name==b&&!1==a.elements[d].disabled&&(a.elements[d].checked=c)}
function SelectAllOrNoneByCheckbox(a,b,c){for(var d=c.parentNode;d&&"form"!==d.tagName;)d=d.parentNode;null!=d&&(a=d);SelectChecked(a,b,c.checked)}function loader(){var a=getCookie("login");0<a.length?(document.login_noop.un_noop.value=a,document.login.un.value=a,document.login.pw.focus()):document.login_noop.un_noop.focus();document.login.width.value=screen.width;document.login.height.value=screen.height}
function handleSelectAllNoneCheckboxClick(a,b){for(var c=0;c<b.length;c++){var d=document.getElementById(b[c]);d&&(d.checked=a.checked)}}function getObjX(a){for(var b=0;null!=a;)b+=a.offsetLeft,a=a.offsetParent;return b}function getObjY(a){for(var b=0;null!=a;)b+=a.offsetTop,a=a.offsetParent;return b}
function getScrollX(){if(window.pageXOffset)return window.pageXOffset;if(document.documentElement&&document.documentElement.scrollLeft)return document.documentElement.scrollLeft;if(document.body.scrollHeight)return document.body.scrollLeft}function getScrollY(){if(window.pageYOffset)return window.pageYOffset;if(document.documentElement&&document.documentElement.scrollTop)return document.documentElement.scrollTop;if(document.body.scrollWidth)return document.body.scrollTop}
function getMouseX(a){return a.pageX?a.pageX:getScrollX()+a.clientX}function getMouseY(a){return a.pageY?a.pageY:getScrollY()+a.clientY}function getSrcElement(a){a=getEvent(a);return a.srcElement?a.srcElement:a.currentTarget}function ltrim(a){return a.replace(/^\s*/,"")}function rtrim(a){return a.replace(/\s*$/,"")}function trim(a){return rtrim(ltrim(a))}function escapeHTML(a){a&&a.replace&&(a=a.replace(/&/g,"\x26amp;"),a=a.replace(/</g,"\x26lt;"),a=a.replace(/>/g,"\x26gt;"));return a}
function unescapeHTML(a){a&&a.replace&&(a=a.replace(/\&amp;/g,"\x26"),a=a.replace(/&lt;/g,"\x3c"),a=a.replace(/&gt;/g,"\x3e"));return a}function unescapeJsInHtml(a){a&&a.replace&&(a=a.replace(/\\\\/g,"\\"),a=a.replace(/\\'/g,"'"),a=a.replace(/\\n/g,"\n"),a=a.replace(/&quot;/g,'"'));return a}function unescapeXML(a){a&&a.replace&&(a=a.replace(/\&amp;/g,"\x26"),a=a.replace(/&lt;/g,"\x3c"),a=a.replace(/&gt;/g,"\x3e"),a=a.replace(/&quot;/g,'"'),a=a.replace(/&apos;/g,"'"));return a}
function isValidEmail(a,b){if(!a)return!1;a=a.toLowerCase();var c=a.split("@");if(2!=c.length||0>c[1].indexOf("."))return!1;if(b){for(var d=b.split(","),e=0;e<d.length;e++){var f=d[e];if(c[1]==f||0<c[1].indexOf(f,c[1].length-f.length)&&"."==c[1].charAt(c[1].length-f.length-1))return!0}return!1}return!0}
function isValidDomain(a){if(!/^[a-zA-Z0-9\-\.]+$/.test(a)||0>a.indexOf(".")||0<=a.indexOf("..")||(0<=a.indexOf(".-")||0<=a.indexOf("-."))||("."==a.charAt(0)||"-"==a.charAt(0))||("."==a.charAt(a.length-1)||"-"==a.charAt(a.length-1))||"localhost.localdomain"==a.toLowerCase())return!1;a=a.split(".");return!a||2>a.length||0==a[0].length||1>=a[1].length?!1:!0}
function setCookie(a,b,c,d,e){document.cookie=a+"\x3d"+(e?encodeURIComponent:escape)(b)+(c?"; expires\x3d"+c.toGMTString():"")+(d?"; path\x3d"+d:"; path\x3d/")}function getCookie(a){var b=document.cookie;a+="\x3d";var c=b.indexOf("; "+a);if(-1==c){if(c=b.indexOf(a),0!=c)return null}else c+=2;var d=document.cookie.indexOf(";",c);-1==d&&(d=b.length);return unescape(b.substring(c+a.length,d))}
function deleteCookie(a,b){if(getCookie(a)){var c=new Date((new Date).getTime()+-1E4);document.cookie=a+"\x3d-deleted-"+(b?"; path\x3d"+b:"; path\x3d/")+"; expires\x3d"+c.toGMTString()}}function addTwistCookie(a,b,c){var d=getCookie(a);c=b+":"+(c?"1":"0")+",";if(d){for(var e=d.indexOf(b);-1<e;){var f=e+18;d.substring(e,f);d=d.substring(0,e)+d.substring(f,d.length);e=d.indexOf(b)}c=d+c}setCookie(a,c)}
function handleTextAreaElementChange(a,b,c,d){handleTextAreaElementChangeWithByteCheck(a,b,0,c,d)}
function handleTextAreaElementChangeWithByteCheck(a,b,c,d,e,f){textAreaTimer&&clearTimeout(textAreaTimer);textAreaTimer=setTimeout(function(){var g=document.getElementById(a),m=document.getElementById(a+"_counter"),h=0,l=Sfdc.userAgent||{};if(!g||!m)return b;var k=b;if(0<g.value.length&&(!isIE5&&!l.isIE6&&!l.isIE7&&!l.isIE8)&&(k=g.value.match(/\n/g)))h=k.length;f?(k=unescape(encodeURIComponent(g.value)).length+h,h=Math.min(k,2*(g.value.length+h)+2),g=encryptionHeaderBytes+4*Math.floor((encryptionIVSize+
Math.floor(h/encryptionAESBlockSize+1)*encryptionAESBlockSize+2)/3)+encryptionEndControlBytes,h%=encryptionAESBlockSize,g<c&&(g=g+encryptionAESBlockSize>c?c-encryptionAESBlockSize+h+1:g+h),g=Math.max(k,g),k=c-g):(l=g.value.length+h,k=b-l,50<k&&0<c&&(l=unescape(encodeURIComponent(g.value)).length,g=c-(l+h),50>g&&(k=g)));Sfdc.Dom.addClass(m.parentNode,"textCounterMiddle");0>k?(Sfdc.Dom.addClass(m.parentNode,"over"),Sfdc.Dom.removeClass(m.parentNode,"warn"),m.innerHTML=f?e:-1*k+" "+e):50>k?(Sfdc.Dom.removeClass(m.parentNode,
"over"),Sfdc.Dom.addClass(m.parentNode,"warn"),m.innerHTML=k+" "+d):Sfdc.Dom.removeClass(m.parentNode,["over","warn"])},500)}var filterLookupValueElem;
function openFilterLookupWindow(a,b,c,d){filterLookupValueElem=d;c=document.getElementById(c);c="number"==typeof c.selectedIndex?c.options[c.selectedIndex]:c;if(null!=a||null==b){a=document.getElementById(a);d=a.action;var e=a.target,f=a.lookup.value;null!=b&&(a.action=b);a.target="filter_lookup";a.lookup.value=c.value;a.submit();a.action=d;a.target=e;a.lookup.value=f}else a=0<=b.indexOf("?")?"\x26":"?",curPopupWindow.location.href=b+a+"lookup\x3d"+c.value+"\x26workflow\x3d1"}
function submitCalcAgg(a,b){var c=document.report;c||(c=opener.document.report);c.target="aggcalc_popup";c.calcagg_request.value=a;c.calcagg_index.value=b;if("new"==a)clearCalcAgg(c,"_v");else if("edit"==a)copyCalcaggParams(c,b,c,"_v");else if("done"==a||"validate"==a){var d=document.getElementById("calcagg_form");copyCalcaggParams(d,"_v",c,"_v")}c.nav.value="agg";c.submit();c.calcagg_request.value="";c.target=""}
function finishValidCalcAgg(a){var b=opener.document.getElementById("report"),c=document.getElementById("calcagg_form");b.calcagg_index.value=a;copyCalcaggParams(c,"_v",b,a);b.calcagg_active_v.value=c.calcagg_name_v.value;b.nav.value="agg";b.submit();self.close()}var calcagg_params="calcagg_label calcagg_name calcagg_formula calcagg_type calcagg_desc calcagg_scale".split(" ");function clearCalcAgg(a,b){for(var c in calcagg_params)a[calcagg_params[c]+b].value=""}
function deleteCalcAgg(a){var b=document.getElementById("report");clearCalcAgg(b,a);b.nav.value="agg";b.submit()}function copyCalcaggParams(a,b,c,d){for(var e in calcagg_params)c[calcagg_params[e]+d].value=a[calcagg_params[e]+b].value}function getIframeContents(a){return(a.contentDocument||a.contentWindow.document).body.innerHTML}
function adjustIFrameSize(a){if(a){var b;a.contentDocument?b=a.contentDocument.body.offsetHeight:(b=document.frames&&document.frames(a.id)?document.frames(a.id).document.body:a.document.body,b=0>=b.children.length?0:b.scrollHeight);var c=a.height-b;0>c&&(c=-c);15<c&&(a.height=b)}}function showTextStateField(a,b){a.style.display="";b.style.display="none"}
function showPicklistStateField(a,b,c){var d=a[0];a=a[1];c.options.length=1;for(i=0;i<d.length;i++)c.options[i+1]=new Option(d[i],a[i]);b.style.display="none";c.style.display=""}function showStateListForCountry(a,b,c,d){a=b[a];c.value="";a?showPicklistStateField(a,c,d):showTextStateField(c,d)}
function scaleImage(a,b,c){if(Sfdc.userAgent.isIE7&&0===a.width)setTimeout(function(){scaleImage(a,b,c)},10);else{var d=a.width*b/a.height,e=b;d>c&&(d=c,e=a.height*c/a.width);if(d<a.width||e<a.height)a.width=d,a.height=e;Sfdc.userAgent.isIE7&&(a.style.visibility="visible")}}function refreshWizardPage(a){var b=document.getElementById("goRefresh");"goRefresh"!=b.value&&(b.value="goRefresh",b=document.getElementById("stageForm"),b.action+=a,b.submit())}
function getOffsetLeft(a){if(!a)return 0;for(var b=a.offsetLeft;a.offsetParent;)a=a.offsetParent,b+=a.offsetLeft;return b}function getWindowWidth(){if("number"==typeof window.innerWidth)return window.innerWidth;if(document.documentElement&&document.documentElement.clientWidth)return document.documentElement.clientWidth;if(document.body&&document.body.clientWidth)return document.body.clientWidth}
function getWindowHeight(){if("number"==typeof window.innerHeight)return window.innerHeight;if(document.documentElement&&document.documentElement.clientHeight)return document.documentElement.clientHeight;if(document.body&&document.body.clientHeight)return document.body.clientHeight}
function getScrollTop(){if(self.pageYOffset)return self.pageYOffset;if(document.documentElement&&document.documentElement.scrollTop)return document.documentElement.scrollTop;if(document.body)return document.body.scrollTop}function getScrollLeft(){if(self.pageXOffset)return self.pageYOffset;if(document.documentElement&&document.documentElement.scrollLeft)return document.documentElement.scrollLeft;if(document.body)return document.body.scrollLeft}
function hasStyleClass(a,b){return 0<=(" "+a.className+" ").indexOf(" "+b+" ")}function addStyleClass(a,b){0>(" "+a.className+" ").indexOf(" "+b+" ")&&(a.className+=a.className&&0<a.className.length?" "+b:b)}function delStyleClass(a,b){var c=" "+a.className+" ",d=b.length,e=c.indexOf(" "+b+" ");0<=e&&(d=e+d+1,a.className=trim(c.substring(0,e)+c.substring(d,c.length)))}function hiOn(a){null!=a&&addStyleClass(a,"highlight")}function hiOff(a){null!=a&&delStyleClass(a,"highlight")}
function toggleVis(a){a.style.visibility="hidden"==a.style.visibility?"visible":"hidden"}function toggleVisWithPositionAbsolute(a){if(a=document.getElementById(a))toggleVis(a),a.style.position="absolute"==a.style.position?"static":"absolute"}function setVis(a,b){a.style.visibility=b?"visible":"hidden"}
function toggleVisWIframe(a){var b=document.getElementById(a.id+"_iframe");"undefined"!=typeof b&&("hidden"==a.style.visibility?(b.style.left=a.offsetLeft,b.style.left==a.offsetLeft+"px"&&(b.style.top=a.offsetTop,b.style.width=a.offsetWidth,b.style.height=a.offsetHeight,b.style.display="block")):b.style.display="none");toggleVis(a)}function formatMessage(a){var b=arguments;return a.replace(/\{([0-9]*)\}/g,function(a,d,e,f){return b[parseInt(d)+1]})}
function highlightToc(a,b){top.frames.frames.body&&top.frames.body.frames.toc&&top.frames.body.frames.toc.document.getElementById("fullyLoadedDiv")&&top.frames.body.frames.toc.HTMLTreeNode.prototype.openHTMLTree(a,b)}function loadToc(a){var b=top.frames.body.frames.content.location.href,b=b.substring(b.lastIndexOf("/")+1,b.indexOf(".htm"));top.frames.body.frames.toc.location.href=a+"?item\x3d"+b+"\x26section\x3dnone"}
function deepCopy(a,b){var c=b.createElement(a.tagName);if("undefined"!=typeof a.attributes&&null!=a.attributes)for(var d=0;d<a.attributes.length;d++)c.setAttribute(a.attributes[d].name,a.attributes[d].value);null!=a.nodeValue&&c.appendChild(b.createTextNode(a.nodeValue));if("undefined"!=typeof a.childNodes&&null!=a.childNodes)for(d=0;d<a.childNodes.length;d++)c.appendChild(deepCopy(a.childNodes[d],b));return c}
function borrowForm(a,b,c){a=document.getElementById(a);var d=a.action,e=a.target;null!=b&&(a.action=b);null!=c&&(a.target=c);if(a.onsubmit)a.onsubmit();a.submit();a.action=d;a.target=e}function toggleRow(a,b){var c=document.getElementById(a);if(null!=c){for(;null!=c&&"TR"!=c.tagName;)c=c.parentNode;toggleDisplay(c,b)}}function setRowVis(a,b){var c=document.getElementById(a);if(null!=c){for(;null!=c&&"TR"!=c.tagName;)c=c.parentNode;null!=c&&setVis(c,b)}}
function toggleDisplay(a,b){null!=a&&(a.style.display=isIE&&!isOpera?b?"block":"none":b?"table-row":"none")}function toggleDisplayWithDisplayType(a,b,c){var d=document.getElementById(a);d&&(b||(b="block"),c?"none"==d.style.display?Sfdc.Effects.rollIn(d,function(){d.style.display=b}):Sfdc.Effects.rollOut(d):d.style.display="none"==d.style.display?b:"none")}function getElementsByNameCS(a){for(var b=document.getElementsByName(a),c=[],d=0;d<b.length;d++)b[d].name==a&&c.push(b[d]);return c}
function getElementByIdCS(a){return getElementByIdCSWithDoc(document,a)}function getElementByIdCSWithDoc(a,b){var c=a.getElementById(b);return null==c||c.id==b?c:a.all?a.all[b]:null}function dashify(a){return a.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function getCurrentStyle(a,b){var c;c=a.currentStyle?a.currentStyle[b]:document.defaultView&&document.defaultView.getComputedStyle?(c=document.defaultView.getComputedStyle(a,null))?c.getPropertyValue(dashify(b)):null:null;return c}
function copyAddr(a,b,c,d,e,f,g,m,h,l,k,n,p){document.getElementById(f).value=document.getElementById(a).value;document.getElementById(g).value=document.getElementById(b).value;document.getElementById(m).value=document.getElementById(c).value;document.getElementById(h).value=document.getElementById(d).value;if(p)document.getElementById(h).onchange();k&&n&&(document.getElementById(l).value=document.getElementById(e).value)}
function showMoreList(a,b,c){Sfdc.warn("Legacy Function showMoreList was called, use RelatedList.get(listId).showMoreList() instead.");RelatedList.get(c).showMoreList(a,b)}function callRelatedListAction(a,b,c,d,e,f){Sfdc.warn("Legacy Function callRelatedListAction was called, use RelatedList.get(listId).callRelatedListAction() instead.");RelatedList.get(d).callRelatedListAction(a,b,c,null,null,e,f)}
function setElementsEnabledBasedOnCheckbox(a,b){var c=document.getElementById(a);if(null!=c&&null!=b)for(var d=0;d<b.length;d++){var e=c,f=document.getElementById(b[d]);f&&(f.style.display=e.checked?"":"none")}}function stripDomainFromUrl(a){var b=a.indexOf("://");-1!=b&&(a=a.substring(b+3),a=a.substring(a.indexOf("/")));return a}function bodyOnFocus(){}
isIE7&&window.attachEvent("onunload",function(){for(var a=document.body.getElementsByTagName("iframe"),b=0;b<a.length;b++)a[b].id&&"066"===a[b].id.substring(0,3)&&(a[b].src="javascript:false",a[b].parentNode.removeChild(a[b]))});