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&&getCurrentStyle(d,"position")=="static";){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 false;xmlhttp.open("GET",a,true);xmlhttp.onreadystatechange=function(){xmlhttp.readyState==4&&b&&b(xmlhttp.responseText)};xmlhttp.send(null)}
function getElementsByClassName(a,b,c){if(!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(f){return f.nodeName==strTagNameUpper});else{c=[];a=d.length;for(b=0;b<a;b++)d[b].nodeName==strTagNameUpper&&c.push(d[b]);return c}else 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}
var isIE=navigator.appName.indexOf("Microsoft")!=-1,isIE5=navigator.userAgent.indexOf("MSIE 5.0")>0,isIE7=navigator.userAgent.indexOf("MSIE 7")!=-1,isOpera=navigator.userAgent.indexOf("Opera")!=-1,isSafari=navigator.userAgent.indexOf("AppleWebKit")!=-1,isFirefox=navigator.userAgent.indexOf("Firefox/")!=-1,isNetscape=navigator.userAgent.indexOf("Netscape/")!=-1,lastMouseX,lastMouseY,curPopupWindow=null,closeOnParentUnloadWindow=null,helpWindow=null,win=null,editPage=false,currentEntityId="",currentEntityId2=
"",picklistNAMarker="_\u0001_",beenFocused=false;document.onmousedown=markFocused;function markFocused(){beenFocused=true}var textAreaTimer=null,focusedElement=null;if(document.addEventListener)document.addEventListener("focus",trackFocused,false);else document.attachEvent&&document.attachEvent("onFocus",trackFocused);function trackFocused(a){focusedElement=window.event?window.event.target:a.target}
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){currentEntityId=d;currentEntityId2=g;g=self.getAccessibleParentWindow?getAccessibleParentWindow(self):self;editPage=e;if(f)if(g){g.sendCTIMessage&&g.sendCTIMessage("ADD_LOG_OBJECT?ID="+d+"&OBJECT_LABEL="+escape(b)+"&ENTITY_NAME="+c+"&OBJECT_NAME="+escape(a));g.cleanupClickToDial&&g.cleanupClickToDial()}}function setLastMousePosition(a){if(navigator.appName.indexOf("Microsoft")!=-1)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="+b+",height="+c+",dependent=no,resizable=yes,toolbar=yes,status=yes,directories=yes,menubar=yes,scrollbars=1",false)}function openIntegration(a,b,c){a=window.open(a,"_blank",b,false);if(c==2)a.moveTo(0,0);else if(c==0){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,true)}
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,k){closePopup();if(f){if(lastMouseX-c<0)lastMouseX=c;if(lastMouseY+d>screen.height)lastMouseY-=lastMouseY+d+50-screen.height;lastMouseX-=c;lastMouseY+=10;e+=",screenX="+lastMouseX+",left="+lastMouseX+",screenY="+lastMouseY+",top="+lastMouseY}if(g){curPopupWindow=window.open(a,b,e,false);curPopupWindow.focus()}else{win=window.open(a,b,e,false);win.focus()}if(k)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=navigator.userAgent.indexOf("MSIE 9")>=0;function closePopupOnBodyFocus(){if(ie9){closetimer&&clearTimeout(closetimer);closetimer=window.setTimeout(function(){closetimer=null;closePopup()},500)}else closePopup()}
function closePopup(){if(closetimer){clearTimeout(closetimer);closetimer=null}if(curPopupWindow!=null){try{if(curPopupWindow.confirmOnClose)if(curPopupWindow.confirm(curPopupWindow.confirmOnCloseLabel)){curPopupWindow.confirmOnClose=false;curPopupWindow.focus();return false}curPopupWindow.close()}catch(a){}curPopupWindow=null}}var modalWindow=null;function ignoreModalEvents(){return false}
function handleModalFocus(){if(modalWindow)if(modalWindow.closed){window.top.releaseEvents(Event.CLICK|Event.FOCUS);window.top.onclick=""}else modalWindow.focus();return false}function invokeResultFunc(){(window.dialogArguments?window.dialogArguments:window.opener.resultFunc)()}
function openPopupModal(a,b,c,d,e,f,g){if(window.showModalDialog)window.showModalDialog(a,f==null?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=yes");if(f)window.resultFunc=f}else{if(g)return g();return openPopup(a,b,c,d,e,false)}}var clickedLink,warningText;
function confirmPopup(a,b,c,d,e,f){clickedLink=e.href?e.href:e;warningText=f;e=new Function("window.location = clickedLink");e.window=window;openPopupModal(a,"_blank",b,c,d,e,new Function("return confirm(warningText)"));return false}function openLookup(a,b,c,d){if(c=="1")a+=d;openPopup(a,"lookup",350,480,"width="+b+",height=480,toolbar=no,status=no,directories=no,menubar=no,resizable=yes,scrollable=no",true)}
function pick(a,b,c,d){document.getElementById(a)[b].value=c;if(d)document.getElementById(a)[b].onchange();closePopup();return false}function pickSubmit(a,b,c,d){document.getElementById(a)[b].value=c;if(d)document.getElementById(a)[b].onchange();document.getElementById(a).submit();closePopup();if(!hiddenOrDisabled(document.getElementById(a)[b])){document.getElementById(a)[b].focus();document.getElementById(a)[b].select()}return false}
function hiddenOrDisabled(a){do{if(a==null||a.type=="hidden"||a.disabled||getCurrentStyle(a,"display")=="none"||getCurrentStyle(a,"visibility")=="hidden")return true;a=a.parentNode}while(a!=null&&a.tagName!="BODY");return false}function hiddenOrDisabledOrReadOnly(a){do{if(a==null||a.type=="hidden"||a.readOnly||a.disabled||getCurrentStyle(a,"display")=="none"||getCurrentStyle(a,"visibility")=="hidden")return true;a=a.parentNode}while(a!=null&&a.tagName!="BODY");return false}
function pickcolor(a,b,c){var d=parseInt(c,16);a=document.getElementById(a)[b];if(a.setValue)a.setValue(d);else a.value=d;document.getElementById(b+"cell").style.backgroundColor="#"+c;closePopup();return false}function comboBoxPick(a,b,c,d){a=document.getElementById(a)[b];if(a!=null){c=eval(c);if(c!=null)if(d>=0&&d<c.length){a.value=c[d];if(!hiddenOrDisabled(a)){a.focus();a.select()}}}closePopup();return false}
function attachEventToElement(a,b,c){if(a.addEventListener)a.addEventListener(b,c,false);else a.attachEvent&&a.attachEvent("on"+b,c)}function navigateToUrl(a){window.location=a}
function hitUrl(a){var b=document.getElementsByTagName("body")[0],c=document.getElementById("goToUrlFrame");if(!c){c=document.createElement("div");c.style.display="none";b.appendChild(c);c.innerHTML='<iframe src="javascript:false" style="display:none;" id="goToUrlFrame" name="goToUrlFrame"></iframe>';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,k,l){var j=b.parentIdElement,h=b.parentEditElement,m=h.name,n=b.parentEditOldValueElement;if(j.type=="select-one"){e=false;for(i=0;i<j.options.length;i++)if(j.options[i].value==c){j.selectedIndex=i;e=true;break}if(!e){j.options[j.options.length]=new Option(d,c);j.selectedIndex=j.options.length-1}h.value=d;n.value=d;if(!hiddenOrDisabled(j)&&typeof j.onchange=="function"){c=j.value;XBrowser.fireEvent&&XBrowser.fireEvent(j,"change");j.value=c;h.value=d}}else{if(b.extraNameElement)if(f){if(typeof b.extraNameElement.value!==
"undefined"&&(b.extraNameElement.value.length==0||b.extraNameElement.value==h.value))b.extraNameElement.value=d}else if(e||b.extraNameElement.value==null||b.extraNameElement.value=="")if(k!=null&&k!=""){b.extraNameElement.value=k;if(b.extraIdElement)b.extraIdElement.value=l;if(b.extraEditOldValueElement)b.extraEditOldValueElement.value=k}j.value=c;h.value=d;n.value=d;window.ForeignKeyInputElement&&ForeignKeyInputElement.dispatchLookupChange(h.name);if(window.sfdcPage&&sfdcPage.getFieldById)(n=sfdcPage.getFieldById(h.name))&&
n.lookupPickCalled();if(!hiddenOrDisabled(h)&&typeof h.onchange=="function"){window.XBrowser.fireEvent&&XBrowser.fireEvent(h,"change");j.value=c;h.value=d}}if(b.relatedFieldElement)b.relatedFieldElement.value=g;var o=getElementByIdCS(m+"_onpk");o&&o.value!=""&&setTimeout(function(){eval(o.value)},1);if((d=getElementsByNameCS(m+"_lspf")[0])&&d.value=="1"){if(m=getElementsByNameCS(m+"_lspfsub")[0])m.value="1";document[a].submit()}if(b.modElement)b.modElement.value="1";closePopup();if(!hiddenOrDisabled(h)){h.focus();
h.select()}return false}
function lookupPick(a,b,c,d,e,f,g,k){var l=document.forms[a];b={parentIdElement:Sfdc.select(Sfdc.String.format("input[name='{name}'], select[name='{name}']",{name:b}),l)[0],parentEditElement:Sfdc.select(Sfdc.String.format("input[name='{name}'], select[name='{name}']",{name:c}),l)[0],parentEditOldValueElement:Sfdc.select(Sfdc.String.format("input[name='{name}'], select[name='{name}']",{name:c+"_lkold"}),l)[0],relatedFieldElement:getElementsByNameCS(d)[0],extraNameElement:getElementsByNameCS(k)[0],modElement:getElementsByNameCS(c+
"_mod")[0]};return doLookupPick(a,b,e,f,false,true,g)}
function lookupPick2(a,b,c,d,e,f,g,k,l,j){var h=document.forms[a];b={parentIdElement:Sfdc.select(Sfdc.String.format("input[name='{name}'], select[name='{name}']",{name:b}),h)[0],parentEditElement:Sfdc.select(Sfdc.String.format("input[name='{name}'], select[name='{name}']",{name:c}),h)[0],parentEditOldValueElement:Sfdc.select(Sfdc.String.format("input[name='{name}'], select[name='{name}']",{name:c+"_lkold"}),h)[0],extraNameElement:getElementsByNameCS(f)[0],extraIdElement:getElementsByNameCS(k)[0],
extraEditOldValueElement:getElementsByNameCS(f+"_lkold")[0],modElement:getElementsByNameCS(c+"_mod")[0]};return doLookupPick(a,b,d,e,j,false,null,g,l)}function searchEntityTwo(a,b,c){b=document.getElementById(b);if(a){b.checked=true;if(a=document.getElementsByName(c))for(i=0;i<a.length;++i)if(a[i]!=b)a[i].checked=false}else b.checked=false}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;a<5;a++)for(var b=a,c=0;c<document.forms.length;c++)for(var d=0;d<document.forms[c].elements.length;d++){var e=document.forms[c].elements[d];if(e.tabIndex==b)if((e.type=="text"||e.type=="textarea"||e.type=="password")&&!hiddenOrDisabledOrReadOnly(e)&&e.name!="sbstr"&&e.name.indexOf("owner")!=0&&e.name.indexOf("tsk1")!=0&&e.name.indexOf("evt1")!=0){e.focus();e.type=="text"&&!hiddenOrDisabledOrReadOnly(e)&&e.select();return true}else{b++;d=0}}for(c=0;c<document.forms.length;c++)if(document.forms[c].name!=
"sbsearch"&&document.forms[c].name!="srch_solution_sbar"&&document.forms[c].name!="srch_product_sbar"&&document.forms[c].name!="srch_document_sbar"&&document.forms[c].name!="srch_article_sbar")for(d=0;d<document.forms[c].elements.length;d++){e=document.forms[c].elements[d];if((e.type=="text"||e.type=="textarea"||e.type=="password")&&!hiddenOrDisabledOrReadOnly(e)&&e.name.indexOf("owner")!=0&&!hiddenOrDisabledOrReadOnly(e)){e.focus();e.type=="text"&&!hiddenOrDisabledOrReadOnly(e)&&e.select();return true}}return true}
function setNamedFocus(a){for(var b=0;b<document.forms.length;b++)for(var c=0;c<document.forms[b].elements.length;c++){var d=document.forms[b].elements[c];if(d.name==a&&!hiddenOrDisabled(d)){d.focus();d.type=="text"&&!hiddenOrDisabled(d)&&d.select();return true}}return true}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;if("1"==b.charAt(0))b=b.substring(1,b.length);for(i=0;i<b.length;i++){var f=b.charAt(i);if(f>="0"&&f<="9"){if(e==0)c+="(";else if(e==3)c+=") ";else if(e==6)c+="-";c+=f;e++}if(!(f>="0"&&f<="9")&&f!=" "&&f!="-"&&f!="."&&f!="("&&f!=")"){d=i;break}}if(d>=0)c+=" "+b.substring(d,b.length);if(e==10&&c.length<=40)a.value=c}return true}
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.name=="c"||c.name.substring(0,2)=="c_")c.checked=false}}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.name=="c"||c.name.substring(0,2)=="c_")c.checked=true}}
function setUsername(a,b,c,d){if(a.value.length==0)a.value=b.value.substring(0,1).toLowerCase()+c.value.toLowerCase()+"@"+d.value}function setAlias(a,b,c){if(a.value.length==0)a.value=b.value.substring(0,1).toLowerCase()+c.value.substring(0,4).toLowerCase()}function popWin(a){closePopup();curPopupWindow=window.open(a,"win","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=550,height=300",false)}
function popWin2(a){win=window.open(a,"win","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=720,height=500",false)}function adminWin(a){win=window.open(a,"win","toolbar=1,location=1,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=800,height=600",false)}function printWin(a){popWin=window.open(a,"win","dependent=no,toolbar=1,directories=0,location=0,status=1,menubar=1,scrollbars=1,resizable=1,width=705,height=400",false);popWin.focus()}
function moveSelectElement3(a,b,c,d,e){if(a.selectedIndex>-1){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;if(b.options.length>0&&b.options[0].text==d){b.options[0]=g;b.selectedIndex=0}else{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;if(b.length==1&&b[0].text==e){b[0]=g;b[0].selected=true}else b[b.length]=g}if(!d){c=c.sort(sortOrderNumericReverse);for(i=0;i<c.length;i++)a.options[c[i]]=null;if(a.length==0){c=new Option(e,e);a.options[0]=c}}}}function moveOption(a,b,c,d,e,f,g,k,l){DuelingListBoxesElement.moveOption(a,b,c,d,e,f,g,k,l)}
function removeSelectElement3(a,b){if(a.selectedIndex>-1){for(i=a.length-1;i>-1;i--)if(a.options[i].selected)a.options[i]=null;if(a.length==0){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(c>0)for(var d=0;d<b.length;d++){var e=getElementByIdCS(b[d]);if(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=a.value=="all";document.getElementById(c).disabled=!a;for(var d=0;d<b.length;d++){var e=getElementByIdCS(b[d]);if(e)e.disabled=a;if(a){var f=getElementByIdCS(c).selectedIndex;if(f>0)e.selectedIndex=f-1}}}
function openwizard(a,b,c){b=window.open("",b,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable="+c+",width=700,height=550,screenx=50,screeny=10,left=50,top=10",false);if(b.document.URL==""||b.document.URL=="about:blank")b.location=a;b.focus()}function openwizard2(a,b,c){window.open(a,b,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable="+c+",width=700,height=550,screenx=50,screeny=10,left=50,top=10",false)}
function escapeUTF(a){var b="";for(i=0;i<a.length;i++){var c=a.charCodeAt(i);if(c<=127)b+=escape(a.charAt(i));else if(c<=2047)b+="%"+(c>>6|192).toString(16)+"%"+(c&63|128).toString(16);else if(c>=2048)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=no,toolbar=no,status=no,directories=no,scrollbars=yes,width=420,height=500",false)}
function changeOpenerWindowLocation(a){if(window.top.opener==null||window.top.opener.closed)window.top.open(a);else{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)if(++e>c){alert(d);return false}return true}function verifyChecked(a,b,c){for(i=0;i<a.elements.length;i++)if(a.elements[i].name==b&&a.elements[i].checked)return true;alert(c);return false}
function verifyCheckedByPrefix(a,b,c){for(i=0;i<a.elements.length;i++)if(a.elements[i].name.indexOf(b)==0&&a.elements[i].checked)return true;alert(c);return false}function verifySingleCheckedByPrefix(a,b,c){var d=0;for(i=0;i<a.elements.length;i++)a.elements[i].name.indexOf(b)==0&&a.elements[i].checked&&d++;if(d==1)return true;alert(c);return false}
function verifyCheckedWarning(a,b,c){var d=false;for(i=0;i<a.elements.length;i++)if(a.elements[i].name==b&&a.elements[i].checked)d=true;if(d)return window.confirm(c);return true}function submitFormActionURL(a,b){a.action=b;a.submit()}function updateToggleAllBox(a,b,c){var d=null;if(typeof c!="undefined")d=document.getElementById(c);else if(a.allBox)d=a.allBox;if(d!=null)d.checked=allChecked(a,b)}
function allChecked(a,b){var c=0;for(c=0;c<a.elements.length;c++){var d=a.elements[c];if(d.name==b&&d.type=="checkbox"&&d.checked==false)return false}return true}function SelectChecked(a,b,c){var d=0;for(d=0;d<a.elements.length;d++)if(a.elements[d].name==b&&a.elements[d].disabled==false)a.elements[d].checked=c}function SelectAllOrNoneByCheckbox(a,b,c){for(var d=c.parentNode;d&&d.tagName!=="form";)d=d.parentNode;if(d!=null)a=d;SelectChecked(a,b,c.checked)}
function getLoginCookieValue(){var a=document.cookie,b=a.indexOf("login=");if(b==-1)return"";b+=6;var c=a.indexOf(";",b);if(c==-1)c=a.length;return a.substring(b,c)}function loader(){var a=getLoginCookieValue();if(a.length>0){document.login_noop.un_noop.value=a;document.login.un.value=a;document.login.pw.focus()}else 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]);if(d)d.checked=a.checked}}function getObjX(a){for(var b=0;a!=null;){b+=a.offsetLeft;a=a.offsetParent}return b}function getObjY(a){for(var b=0;a!=null;){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){if(a.pageX)return a.pageX;return getScrollX()+a.clientX}function getMouseY(a){if(a.pageY)return a.pageY;return getScrollY()+a.clientY}function getSrcElement(a){a=getEvent(a);if(a.srcElement)return a.srcElement;return 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){if(a&&a.replace){a=a.replace(/&/g,"&amp;");a=a.replace(/</g,"&lt;");a=a.replace(/>/g,"&gt;")}return a}function unescapeHTML(a){if(a&&a.replace){a=a.replace(/\&amp;/g,"&");a=a.replace(/&lt;/g,"<");a=a.replace(/&gt;/g,">")}return a}function unescapeJsInHtml(a){if(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){if(a&&a.replace){a=a.replace(/\&amp;/g,"&");a=a.replace(/&lt;/g,"<");a=a.replace(/&gt;/g,">");a=a.replace(/&quot;/g,'"');a=a.replace(/&apos;/g,"'")}return a}
function isValidEmail(a,b){if(!a)return false;a=a.toLowerCase();var c=a.split("@");if(c.length!=2)return false;if(c[1].indexOf(".")<0)return false;if(b){for(var d=b.split(","),e=0;e<d.length;e++){var f=d[e];if(c[1]==f)return true;if(c[1].indexOf(f,c[1].length-f.length)>0&&c[1].charAt(c[1].length-f.length-1)==".")return true}return false}return true}
function isValidDomain(a){if(!/^[a-zA-Z0-9\-\.]+$/.test(a))return false;if(a.indexOf(".")<0)return false;if(a.indexOf("..")>=0)return false;if(a.indexOf(".-")>=0||a.indexOf("-.")>=0)return false;if(a.charAt(0)=="."||a.charAt(0)=="-")return false;if(a.charAt(a.length-1)=="."||a.charAt(a.length-1)=="-")return false;if(a.toLowerCase()=="localhost.localdomain")return false;a=a.split(".");if(!a||a.length<2||a[0].length==0||a[1].length<=1)return false;return true}
function setCookie(a,b,c,d,e){document.cookie=a+"="+(e?encodeURIComponent:escape)(b)+(c?"; expires="+c.toGMTString():"")+(d?"; path="+d:"; path=/")}function getCookie(a){var b=document.cookie;a+="=";var c=b.indexOf("; "+a);if(c==-1){c=b.indexOf(a);if(c!=0)return null}else c+=2;var d=document.cookie.indexOf(";",c);if(d==-1)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+"=-deleted-"+(b?"; path="+b:"; path=/")+"; expires="+c.toGMTString()}}function addTwistCookie(a,b,c){var d=getCookie(a);c=b+":"+(c?"1":"0")+",";if(d){for(var e=d.indexOf(b);e>-1;){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){textAreaTimer&&clearTimeout(textAreaTimer);textAreaTimer=setTimeout(function(){var e=document.getElementById(a),f=document.getElementById(a+"_counter");if(!e||!f)return b;var g=e.value.length;if(g>0&&!(isIE||isIE5))if(e=e.value.match(/\n/g))g+=e.length;g=b-g;if(g<0){f.parentNode.className="textCounterMiddle over";f.innerHTML=-1*g+" "+d}else if(g<50){f.parentNode.className="textCounterMiddle warn";f.innerHTML=g+" "+c}else f.parentNode.className="textCounterMiddle"},
500)}var filterLookupValueElem;
function openFilterLookupWindow(a,b,c,d){filterLookupValueElem=d;c=document.getElementById(c);c=typeof c.selectedIndex=="number"?c.options[c.selectedIndex]:c;if(a!=null||b==null){a=document.getElementById(a);d=a.action;var e=a.target,f=a.lookup.value;if(b!=null)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=b.indexOf("?")>=0?"&":"?";curPopupWindow.location.href=b+a+"lookup="+c.value+"&workflow=1"}}
function submitCalcAgg(a,b){var c=document.report;if(!c)c=opener.document.report;c.target="aggcalc_popup";c.calcagg_request.value=a;c.calcagg_index.value=b;if(a=="new")clearCalcAgg(c,"_v");else if(a=="edit")copyCalcaggParams(c,b,c,"_v");else if(a=="done"||a=="validate"){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"];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;if(a.contentDocument)b=a.contentDocument.body.offsetHeight;else{b=document.frames&&document.frames(a.id)?document.frames(a.id).document.body:a.document.body;b=b.children.length<=0?0:b.scrollHeight}var c=a.height-b;if(c<0)c=-c;if(c>15)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(XBrowser.userAgent.isIE7)if(a.width===0){setTimeout(function(){scaleImage(a,b,c)},10);return}var d=a.width*b/a.height,e=b;if(d>c){d=c;e=a.height*c/a.width}if(d<a.width||e<a.height){a.width=d;a.height=e}if(XBrowser.userAgent.isIE7)a.style.visibility="visible"}function refreshWizardPage(a){var b=document.getElementById("goRefresh");if(b.value!="goRefresh"){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(typeof window.innerWidth=="number")return window.innerWidth;else if(document.documentElement&&document.documentElement.clientWidth)return document.documentElement.clientWidth;else if(document.body&&document.body.clientWidth)return document.body.clientWidth}
function getWindowHeight(){if(typeof window.innerHeight=="number")return window.innerHeight;else if(document.documentElement&&document.documentElement.clientHeight)return document.documentElement.clientHeight;else if(document.body&&document.body.clientHeight)return document.body.clientHeight}
function getScrollTop(){if(self.pageYOffset)return self.pageYOffset;else if(document.documentElement&&document.documentElement.scrollTop)return document.documentElement.scrollTop;else if(document.body)return document.body.scrollTop}function getScrollLeft(){if(self.pageXOffset)return self.pageYOffset;else if(document.documentElement&&document.documentElement.scrollLeft)return document.documentElement.scrollLeft;else if(document.body)return document.body.scrollLeft}
function hasStyleClass(a,b){return(" "+a.className+" ").indexOf(" "+b+" ")>=0}function addStyleClass(a,b){if((" "+a.className+" ").indexOf(" "+b+" ")<0)a.className+=a.className&&a.className.length>0?" "+b:b}function delStyleClass(a,b){var c=" "+a.className+" ",d=b.length,e=c.indexOf(" "+b+" ");if(e>=0){d=e+d+1;a.className=trim(c.substring(0,e)+c.substring(d,c.length))}}function hiOn(a){a!=null&&addStyleClass(a,"highlight")}function hiOff(a){a!=null&&delStyleClass(a,"highlight")}
function toggleVis(a){a.style.visibility=a.style.visibility=="hidden"?"visible":"hidden"}function toggleVisWithPositionAbsolute(a){if(a=document.getElementById(a)){toggleVis(a);a.style.position=a.style.position=="absolute"?"static":"absolute"}}function setVis(a,b){a.style.visibility=b?"visible":"hidden"}
function toggleVisWIframe(a){var b=document.getElementById(a.id+"_iframe");if(typeof b!="undefined")if(a.style.visibility=="hidden"){b.style.left=a.offsetLeft;if(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"}}else b.style.display="none";toggleVis(a)}function formatMessage(a){var b=arguments;return a.replace(/\{([0-9]*)\}/g,function(c,d){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="+b+"&section=none"}
function deepCopy(a,b){var c=b.createElement(a.tagName);if(typeof a.attributes!="undefined"&&a.attributes!=null)for(var d=0;d<a.attributes.length;d++)c.setAttribute(a.attributes[d].name,a.attributes[d].value);a.nodeValue!=null&&c.appendChild(b.createTextNode(a.nodeValue));if(typeof a.childNodes!="undefined"&&a.childNodes!=null)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;if(b!=null)a.action=b;if(c!=null)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(c!=null){for(;c!=null&&c.tagName!="TR";)c=c.parentNode;toggleDisplay(c,b)}}function setRowVis(a,b){var c=document.getElementById(a);if(c!=null){for(;c!=null&&c.tagName!="TR";)c=c.parentNode;c!=null&&setVis(c,b)}}
function toggleDisplay(a,b){if(a!=null)a.style.display=isIE&&!isOpera?b?"block":"none":b?"table-row":"none"}function toggleDisplayWithDisplayType(a,b,c){var d=document.getElementById(a);if(d){b||(b="block");if(c)d.style.display=="none"?Animation.rollIn(d,function(){d.style.display=b}):Animation.rollOut(d);else d.style.display=d.style.display=="none"?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);if(c==null||c.id==b)return c;if(a.all)return a.all[b];return null}function EventData(a,b,c,d){this.element=a;this.type=b;this.handler=c;this.useCapture=d}
var eventRegistry,addEvent=function(){if(window.addEventListener)return function(a,b,c,d){a.addEventListener(b,c,d);if(!eventRegistry){eventRegistry=[];window.addEventListener("unload",cleanupEvents,false)}eventRegistry.push(new EventData(a,b,c,d))};else if(window.attachEvent)return function(a,b,c){var d=a.attachEvent("on"+b,c);if(!eventRegistry){eventRegistry=[];window.attachEvent("onunload",cleanupEvents)}eventRegistry.push(new EventData(a,b,c));return d};return function(){return null}}(),removeEvent=
function(){if(window.removeEventListener)return function(a,b,c,d){a.removeEventListener(b,c,d)};else if(window.detachEvent)return function(a,b,c){a.detachEvent("on"+b,c)};return 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,false)}}
function mouseExited(a,b){for(var c=getEventToElement(a);c&&c!=document.body;){if(c==b)return false;c=c.parentNode}return true}function getEvent(a){return a||window.event}function getEventTarget(a){return window.event?a.srcElement:a.target}function getEventToElement(a){return a.relatedTarget?a.relatedTarget:a.toElement}function eventCancelBubble(a){a.cancelBubble=true;a.stopPropagation&&a.stopPropagation()}function dashify(a){return a.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}
function getCurrentStyle(a,b){var c;if(a.currentStyle)c=a.currentStyle[b];else if(document.defaultView&&document.defaultView.getComputedStyle)c=(c=document.defaultView.getComputedStyle(a,null))?c.getPropertyValue(dashify(b)):null;else c=null;return c}
function copyAddr(a,b,c,d,e,f,g,k,l,j,h,m){document.getElementById(f).value=document.getElementById(a).value;document.getElementById(g).value=document.getElementById(b).value;document.getElementById(k).value=document.getElementById(c).value;document.getElementById(l).value=document.getElementById(d).value;if(h&&m)document.getElementById(j).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 assureInt(a){var b;return isNaN(b=parseInt(a))?0:b}
function setElementsEnabledBasedOnCheckbox(a,b){function c(f,g){var k=document.getElementById(g);if(k)k.style.display=f.checked?"":"none"}var d=document.getElementById(a);if(d!=null&&b!=null)for(var e=0;e<b.length;e++)c(d,b[e])}
function registerClickToDial(a,b){var c;if(self.getAccessibleParentWindow)c=getAccessibleParentWindow(self);else if(self.location.pathname==="/"+IFrameElement.EmptyRelatedListDoc)try{c=self.parent}catch(d){c=null}else c=self;if(c&&c.registerClickToDialEnabled)b?c.registerClickToDialEnabled(a):c.registerClickToDialDisabled(a)}function stripDomainFromUrl(a){var b=a.indexOf("://");if(-1!=b){a=a.substring(b+3);a=a.substring(a.indexOf("/"))}return a}function bodyOnFocus(){}
function showDebugLog(a,b){if(a){setCookie("showDebugLog","PROFILING");setCookie("showExecute",b);XBrowser.createDynamicScript("/apexdebug/log4javascript.js",function(){XBrowser.createDynamicScript("/apexdebug/apexdebuglog.js",function(){initSystemLogUi(true)})})}else{deleteCookie("showDebugLog");b||deleteCookie("showExecute")}}var debugLogWindow;function getDebugLogWindow(){return debugLogWindow&&!debugLogWindow.closed?debugLogWindow:null}function setDebugLogWindow(a){debugLogWindow=a}
function checkDebugLogWindowExists(){var a=debugLogWindow&&debugLogWindow.open&&!debugLogWindow.closed;if(!a&&getCookie("showDebugLog")){deleteCookie("showDebugLog");deleteCookie("showExecute")}return a}isIE7&&window.attachEvent("onunload",function(){for(var a=document.body.getElementsByTagName("iframe"),b=0;b<a.length;b++)if(a[b].id&&a[b].id.substring(0,3)==="066"){a[b].src="javascript:false";a[b].parentNode.removeChild(a[b])}});
