function IsIE8Browser(){var rv=-1;var ua=navigator.userAgent;var re=new RegExp("Trident\/([0-9]{1,}[\.0-9]{0,})");if(re.exec(ua)!=null){rv=parseFloat(RegExp.$1);}return(rv==4);};function IsIEBrowserZoomed(){var isZoomed=false;if(navigator.appVersion.indexOf("MSIE")>0){if(IsIE8Browser()){isZoomed=(window.screen.deviceYDPI!=96);}else if(navigator.appVersion.indexOf("MSIE 7")>0){var rect=document.body.getBoundingClientRect();var zoomLevel=Math.round((rect.right-rect.left)/document.body.clientWidth*100);isZoomed=(zoomLevel<95||zoomLevel>105);}}return isZoomed;};function SHV(hiddenInput,hiddenValue){FormTools.SetFormElementValue(hiddenInput,hiddenValue);};var AdditionalHiddenElementNamesToAppendToReturnUrl=null;var AdditionalHiddenElementNamesToAppendToHyperLink=null;var metafuseGlobalCancelAppendReturnUrl=false;var metafuseGlobalHttpProtocolAndServerName="";var metafuseGlobalLinkOpenInNewWindow=null;function L(scriptPath,excludeReturnUrl,openInNewWindow){var hyperLink=AppendAdditionalHiddenElementNamesToHyperLink(scriptPath);var hyperlinkToTest=hyperLink.toLowerCase();if(hyperlinkToTest.indexOf("http://",0)!=0&&hyperlinkToTest.indexOf("https://",0)!=0&&hyperlinkToTest.indexOf(Root.toLowerCase())!=0){hyperLink=metafuseGlobalHttpProtocolAndServerName+Root+hyperLink;}var url="";if(excludeReturnUrl||metafuseGlobalCancelAppendReturnUrl){url=hyperLink;}else{try{url=AppendReturnUrl(hyperLink);}catch(e){url=hyperLink;}}if(openInNewWindow){window.open(url,"_blank");}else{window.location.href=url;}return false;};function LI(scriptPath,id,optionalNameString,openInNewWindow){if(scriptPath.indexOf("?")>=0){scriptPath+="&";}else{scriptPath+="?";}if(!optionalNameString){optionalNameString="Id";}return L(scriptPath+optionalNameString+"="+id,false,openInNewWindow);};function ConfirmAndPostBack(confirmMessage,target,args){if(confirm(confirmMessage)){__doPostBack(target,args);}};function AppendReturnUrl(scriptPath,returnUrl){if(!returnUrl){returnUrl=ReturnUrl;}returnUrl=AppendScrollLocation(returnUrl);if(scriptPath.indexOf("?")>=0){scriptPath+="&";}else{scriptPath+="?";}scriptPath+="ReturnUrl="+escape(returnUrl);return scriptPath;};function AppendScrollLocation(returnUrl){var scrollX=GetElementById("__sx");var scrollY=GetElementById("__sy");if(scrollX&&scrollX.value!=""&&scrollX.value!="0"){if(returnUrl.indexOf("?")>=0){returnUrl+="&";}else{returnUrl+="?";}returnUrl+="_sx="+scrollX.value;}if(scrollY&&scrollY.value!=""&&scrollY.value!="0"){if(returnUrl.indexOf("?")>=0){returnUrl+="&";}else{returnUrl+="?";}returnUrl+="_sy="+scrollY.value;}if(AdditionalHiddenElementNamesToAppendToReturnUrl!=null){for(var i=0;i<AdditionalHiddenElementNamesToAppendToReturnUrl.length;i++){var elementName=AdditionalHiddenElementNamesToAppendToReturnUrl[i];var elementValue=FormTools.GetFormElementValue(elementName);if(elementValue&&elementValue!=""){if(returnUrl.indexOf("?")>=0){returnUrl+="&"}else{returnUrl+="?";}returnUrl+="_0"+elementName+"="+elementValue;}}}return returnUrl;};function AppendAdditionalHiddenElementNamesToHyperLink(hyperLink){if(AdditionalHiddenElementNamesToAppendToHyperLink!=null){for(var i=0;i<AdditionalHiddenElementNamesToAppendToHyperLink.length;i++){var elementName=AdditionalHiddenElementNamesToAppendToHyperLink[i];var elementValue=FormTools.GetFormElementValue(elementName);if(elementValue&&elementValue!=""){if(hyperLink.indexOf("?")>=0){hyperLink+="&"+"_0"+elementName+"="+elementValue;}else{hyperLink+="?"+"_0"+elementName+"="+elementValue;}}}}return hyperLink;};function CreateGuidStringFromCheckBoxIndexes(checkBoxName){f=document.forms[0];var ids="";if(f[checkBoxName]){if(f[checkBoxName].length){for(i=0;i<f[checkBoxName].length;i++){if(f[checkBoxName][i].checked){if(ids!=""){ids+=",";}ids+=GuidArray[f[checkBoxName][i].value];}}}else{if(f[checkBoxName].checked){ids=GuidArray[f[checkBoxName].value];}}}return ids;};function CreateGuidStringFromIndexArray(indexArray){var ids="";for(i=0;i<indexArray.length;i++){if(ids!=""){ids+=",";}if(GuidArray[indexArray[i]]){ids+=GuidArray[indexArray[i]];}}return ids;};function CreateCommaSeparatedStringFromArrayMembers(array){var s="";if(array){for(var i=0;i<array.length;i++){if(s!=""){s+=",";}var a=array[i];if(a!=null){s+=a;}}}return s;};var OnLoad={AddFunction:function(oFunctionPointer){var oldonload=window.onload;if(typeof window.onload=='function'){window.onload=function(){oldonload();oFunctionPointer();}}else{window.onload=oFunctionPointer;}}};var OnScrollFunctions={aFunctions:[],AddFunction:function(oFunctionPointer){if(!this.Loaded){this.aFunctions[this.aFunctions.length]=oFunctionPointer;}else{oFunctionPointer();}},CallFunctions:function(){for(oFunctionPointer in this.aFunctions){this.aFunctions[oFunctionPointer]();}this.Loaded=true;},Loaded:false};window.onscroll=function(){OnScrollFunctions.CallFunctions();};var OnWindowResizeFunctions={aFunctions:[],AddFunction:function(oFunctionPointer){if(!this.Loaded){this.aFunctions[this.aFunctions.length]=oFunctionPointer;}else{oFunctionPointer();}},CallFunctions:function(){for(oFunctionPointer in this.aFunctions){this.aFunctions[oFunctionPointer]();}this.Loaded=true;},Loaded:false};function WindowResize(){OnWindowResizeFunctions.CallFunctions();};window.onresize=function(){OnWindowResizeFunctions.CallFunctions();};var OnDocumentUnloadFunctions={aFunctions:[],AddFunction:function(oFunctionPointer){var dupe=false;for(var i=0;i<this.aFunctions.length;i++){if(this.aFunctions[i]==oFunctionPointer){dupe=true;}}if(dupe==false){this.aFunctions[this.aFunctions.length]=oFunctionPointer;}},CallFunctions:function(){for(oFunctionPointer in this.aFunctions){this.aFunctions[oFunctionPointer]();}}};function OnDocumentUnload(){OnDocumentUnloadFunctions.CallFunctions();};function GetElementById(elementId){if(typeof elementId=='string'){if(elementId==""){return null;}else{var element=document.getElementById(elementId)
if(!element){element=document.forms[0][elementId];}return element;}}else{return elementId;}};function NewGuid(){var g="";for(var i=0;i<32;i++){var chr=Math.floor(Math.random()*0xF).toString(0xF);if(chr==null||chr==""||chr.length>1){chr=="0";}if(i==7||i==11||i==15||i==19){chr+="-";}g+=chr;}return g;};function IsEnterKey(localEvent){if(navigator.appName=="Netscape"&&parseInt(navigator.appVersion)>=4){if(localEvent.which){return(localEvent.which==13)}else{return false;}}else{if(!localEvent){localEvent=window.event;}return(localEvent.keyCode==13);}};function EKH(localEvent,element){if(IsEnterKey(localEvent)){FormTools.FocusAndClickElementUsingSetTimeout(element);return false;}return true;};var metafuseBaseShowHelpFromDelayShowHelp=null;function DSHlp(localEvent,helpText,helpWidth){if(!localEvent){return false;}if(helpText!=""){var x;var y;if(navigator.appName=="Netscape"&&parseInt(navigator.appVersion)>=4){x=localEvent.pageX;y=localEvent.pageY;}else{x=event.clientX+document.body.scrollLeft;y=event.clientY+document.body.scrollTop;}x=x+20;y=y+20;var timestamp=new Date().valueOf();metafuseBaseShowHelpFromDelayShowHelp=timestamp;setTimeout("MetafuseBase_ShowContextHelp("+x+","+y+",'"+helpText.split("'").join("\\'")+"',"+helpWidth+", '"+timestamp+"')",750);}};function SHlp(localEvent,helpText,helpWidth,offsetX,offsetY){if(helpText!=""){var x;var y;if(navigator.appName=="Netscape"&&parseInt(navigator.appVersion)>=4){x=localEvent.pageX;y=localEvent.pageY;}else{x=event.clientX+UITools.GetScrollLeft();y=event.clientY+UITools.GetScrollTop();}x=x+20;y=y+20;MetafuseBase_ShowContextHelp(x,y,helpText,helpWidth);}};function MetafuseBase_ShowContextHelp(x,y,helpText,helpWidth,timestamp){if(timestamp!=null&&metafuseBaseShowHelpFromDelayShowHelp!=timestamp){return false;}if(helpText!=""){var contextHelp=GetElementById("ContextHelp_MetafuseBase_Div");if(contextHelp==null){InsertHTML('<div id="ContextHelp_MetafuseBase_Div" class="ContextHelp" style="position: absolute; z-index: 20000;display:none;width:300px;"></div>');contextHelp=GetElementById("ContextHelp_MetafuseBase_Div");}var helpHtml;if(helpWidth){helpHtml="<table width=\""+helpWidth+"\"><tr><td>"+helpText+"</td></tr></table>";}else{helpHtml="<table><tr><td>"+helpText+"</td></tr></table>";}contextHelp.innerHTML=helpHtml;UITools.ShowDivAndIFrameAtXY(x,y,contextHelp);if(helpWidth==null||helpWidth<=0){if(contextHelp.firstChild.offsetWidth>=300){contextHelp.style.width=300;var shim=UITools.GetElementShim("ContextHelp_MetafuseBase_Div");if(shim){shim.style.width=300;}}else{var shim=UITools.GetElementShim("ContextHelp_MetafuseBase_Div");if(shim){shim.style.width=contextHelp.firstChild.offsetWidth;}}}else{var shim=UITools.GetElementShim("ContextHelp_MetafuseBase_Div");if(shim){shim.style.width=contextHelp.firstChild.offsetWidth;}}}return true;};function HHlp(){metafuseBaseShowHelpFromDelayShowHelp=null;var contextHelp=GetElementById("ContextHelp_MetafuseBase_Div");if(contextHelp){UITools.HideDivAndIFrame(GetElementById("ContextHelp_MetafuseBase_Div"),UITools.GetElementShim("ContextHelp_MetafuseBase_Div"));}};function ParseBoolValueFromShortString(s){if(s){if(s.toString()=="1"){return true;}else if(s.toString()=="0"){return false;}}return s;};function EnsureWholeNumber(element){element=GetElementById(element);if(element){var elementId=element.id;var v=new Number();v=parseFloat(element.value);v=Round(v,0);if(v.toString()=="NaN"){SetValueUsingSetTimeout(elementId,"");}else if(v<0){var absNumber=Math.abs(v);SetValueUsingSetTimeout(elementId,absNumber.toString());}else if(v.toString()!=element.value.toString()){SetValueUsingSetTimeout(elementId,v.toString());}}};function EnsurePositiveDecimal(element,decimalPlaces,setNanToZero){element=GetElementById(element);if(element){var elementId=element.id;if(!decimalPlaces){decimalPlaces=2;}var v=new Number();v=parseFloat(element.value);if(v.toString()=="NaN"){if(setNanToZero){SetValueUsingSetTimeout(elementId,"0");}else{SetValueUsingSetTimeout(elementId,"");}return;}v=Round(v,decimalPlaces,true);if(v<0){var roundedValue=Round(Math.abs(v),decimalPlaces,true);SetValueUsingSetTimeout(elementId,roundedValue.toString());}else if(v.toString()!=element.value.toString()){SetValueUsingSetTimeout(elementId,v.toString());}}};function isAlien(a){return isObject(a)&&typeof a.constructor!='function';};function isArray(a){return isObject(a)&&a.constructor==Array;};function isBoolean(a){return typeof a=='boolean';};function isFunction(a){return typeof a=='function';};function isNull(a){return typeof a=='object'&&!a;};function isNumber(a){return typeof a=='number'&&isFinite(a);};function isObject(a){return((a!=null)&&typeof a=='object')||isFunction(a);};function isString(a){return typeof a=='string';};function isUndefined(a){return typeof a=='undefined';};function isEmpty(o){var i,v;if(isObject(o)){for(i in o){v=o[i];if(isUndefined(v)&&isFunction(v)){return false;}}}return true;};function isDefined(v){if(typeof(window[v.toString()])!="undefined"){return true;}return false;};function UpdateOuterHTML(elementId,outerHTML,insertElementIfNonExistent,outerElementId){var element=GetElementById(elementId);var outerElement=null;if(outerElementId){outerElement=GetElementById(outerElementId);if(outerElement){element=outerElement;}}if(element!=null){if(element.nodeName!=null&&element.nodeName=="TR"){alert("You cannot replace the outerHTML of a table row");}else{if(document.all){try{element.outerHTML=outerHTML;}catch(e){alert("Unable to update the outer HTML for the element supplied "+elementId+".  The error message will be dumped");__Dump(e);}}else{var $element=$(element);try{$element.replaceWith(outerHTML);}catch(e){alert("Unable to update the outer HTML for the element supplied "+elementId+".  The error message will be dumped");__Dump(e);}}}}else if(insertElementIfNonExistent){UITools.InsertHTML(outerHTML);}};function GetInnerHTMLRecursive(element){var html="";element=GetElementById(element);if(element!=null){if(element.outerHTML){html=element.innerHTML+"\n\n\n";if(element.childNodes!=null){for(var i=0;i<element.childNodes.length;i++){var cn=element.childNodes[i];html+=GetInnerHTMLRecursive(cn);}}}}return html;};function AddEventHandlerToElement(element,eventName,eventMethod,useCapture){element=GetElementById(element);if(element.addEventListener){if(useCapture==null){useCapture=false;}element.addEventListener(eventName.replace("on",""),eventMethod,useCapture);return true;}else if(element.attachEvent){return element.attachEvent(eventName,eventMethod);}return false;};function RemoveEventHandlerFromElement(element,eventName,eventMethod,useCapture){element=GetElementById(element);if(element.removeEventListener){element.removeEventListener(eventName.replace("on",""),eventMethod,useCapture);return true;}else if(element.detachEvent){return element.detachEvent(eventName,eventMethod);}return false;};function Delay(milliseconds){d=new Date()
while(1){mill=new Date()
diff=mill-d
if(diff>milliseconds){break;}}};function MenuConfirmAndPostBack(confirmMessage,target,args){if(confirm(confirmMessage)){__doPostBack(target,args);}};function HOn(element,arrayOfAdditionalRows){if(element){var element=GetElementById(element);if(element){var className=element.className;if(element.onmouseout==null){element.onmouseout=function(){element.onmouseout=null;element.className=element.className.replace(/ RowHighlight/gi,"");if(arrayOfAdditionalRows){for(var i=0;i<arrayOfAdditionalRows.length;i++){var row=GetElementById(arrayOfAdditionalRows[i]);if(row){row.onmouseout=null;row.className=row.className.replace(/ RowHighlight/gi,"");}}}};};if(element.className.indexOf(" RowHighlight")<0){element.className+=" RowHighlight";}if(arrayOfAdditionalRows){for(var i=0;i<arrayOfAdditionalRows.length;i++){var row=GetElementById(arrayOfAdditionalRows[i]);if(row){row.className+=" RowHighlight";if(row.onmouseout==null){row.onmouseout=element.onmouseout;}}}}}}};function HOnM(element,numberOfRowsBefore,numberOfRowsAfter){if((numberOfRowsBefore==null&&numberOfRowsAfter==null)||(numberOfRowsBefore==0&&numberOfRowsAfter==0)){HOn(element);}else{var className=element.className;var additionalRows=new Array();var additionalRowsClassName=new Array();var rowIndex=0;var previousSibling=GetPreviousSibling(element);var t=previousSibling.tagName;for(var i=1;i<=numberOfRowsBefore;i++){additionalRows[rowIndex]=previousSibling;additionalRowsClassName[rowIndex]=previousSibling.className;rowIndex++;previousSibling.className+=" RowHighlight";previousSibling=GetPreviousSibling(previousSibling);}var nextSibling=GetNextSibling(element);for(var k=1;k<=numberOfRowsAfter;k++){additionalRows[rowIndex]=nextSibling;additionalRowsClassName[rowIndex]=nextSibling.className;rowIndex++;nextSibling.className+=" RowHighlight";nextSibling=GetNextSibling(nextSibling);}if(element.onmouseout==null){element.onmouseout=function(){element.className=className;element.onmouseout=null;for(var j=0;j<rowIndex;j++){additionalRows[j].className=additionalRowsClassName[j];}};}element.className+=" RowHighlight";}};function GetPreviousSibling(element){if(element.previousSibling==null){return null;}if(element.previousSibling.nodeType==1){return element.previousSibling;}return GetPreviousSibling(element.previousSibling);};function GetNextSibling(element){if(element.nextSibling==null){return null;}if(element.nextSibling.nodeType==1){return element.nextSibling;}return GetNextSibling(element.nextSibling);};function UC(element,className){if(className==null){className="";}element.className=className;};function HOf(element,className){UC(element,className);};function DHTMLSelectListDisplayLoading(selectElement,keepSelected){selectElement=GetElementById(selectElement);if(selectElement){SelectOptionsClear(selectElement,keepSelected);if(selectElement.options.length==1){selectElement.options[0].text="Loading...";}else{selectElement.options[0]=new Option("Loading...","");}}};function DHTMLSelectListDisplayNoneSelected(selectElement,noneSelectedString){selectElement=GetElementById(selectElement);if(selectElement){if(!noneSelectedString){noneSelectedString="None Selected";}SelectOptionsClear(selectElement);selectElement.options[selectElement.options.length]=new Option(noneSelectedString,"");}};function DHTMLSelectListPopulateSelect(selectElement,selectListArray){selectElement=GetElementById(selectElement);if(selectElement){SelectOptionsClear(selectElement);if(selectListArray){for(var i=0;i<selectListArray.length;i++){var e=selectListArray[i];var o=new Option(e.Text,e.Value);if(e.Selected=="true"){o.selected=true;}selectElement.options[selectElement.options.length]=o;}}}};function MathTools(){this.CurrencySymbol="$"
this.CurrencySymbolAtEnd=false;this.CurrencyCommaDecimalReversed=false;this.CurrencyScale=2;this.CurrencyExcludeCommas=false;this.CurrencyExcludeLeadingZero=false;this.CurrencyExcludeTrailingZeros=false;this.DecimalScale=2;this.DecimalExcludeCommas=false;this.DecimalExcludeLeadingZero=false;this.DecimalExcludeTrailingZeros=false;this.DecimalCommaAndDecimalReversed=false;this.PercentScale=2;this.PercentExcludeLeadingZero=false;this.PercentExcludeTrailingZeros=false;this.IsNumeric=function(inputString){var sNumber;var fNumber;if(inputString!=null){sNumber=inputString.toString();fNumber=parseFloat(inputString);if(sNumber==fNumber&&fNumber!=Number.POSITIVE_INFINITY&&fNumber!=Number.NEGATIVE_INFINITY){return true;}}return false;};this.FormatDecimalString=function(stringValue,returnEmptyStringWhenNaN,excludeCommas,excludeLeadingZero,excludeTrailingZeros,scale,positiveOnly,commaAndDecimalReversed){if(excludeCommas==null){excludeCommas=this.DecimalExcludeCommas;}if(excludeLeadingZero==null){excludeLeadingZero=this.DecimalExcludeLeadingZero;}if(excludeTrailingZeros==null){excludeTrailingZeros=this.DecimalExcludeTrailingZeros;}if(scale==null){scale=this.DecimalScale;}if(commaAndDecimalReversed==null){commaAndDecimalReversed=this.DecimalCommaAndDecimalReversed;}var decimalValue=this.ParseFloat(stringValue,true,commaAndDecimalReversed);if(decimalValue==null){if(returnEmptyStringWhenNaN){return"";}else{decimalValue=0;}}decimalValue=this.Round(decimalValue,scale,commaAndDecimalReversed);var decimalString=new String(decimalValue.toString());if(decimalString.indexOf(".")<0){decimalString+=".";}var decimalStringArray=decimalString.split(".");var decimalLeftSide=new String(decimalStringArray[0]);var decimalRightSide=new String(decimalStringArray[1]);var decimalSign=new String("");if(decimalValue<0){if(!positiveOnly){decimalSign="-";}decimalLeftSide=decimalLeftSide.replace("-","");}if(scale>0&&decimalValue<1&&decimalValue>-1){if(excludeLeadingZero){if(decimalValue>0){decimalLeftSide="";}else{decimalLeftSide="-";}}else if(decimalLeftSide.length==0){decimalLeftSide="0";}}if(!excludeCommas&&(decimalValue>=1000||decimalValue<=-1000)){var start=decimalLeftSide.length;start-=3;while(start>=1){decimalLeftSide=decimalLeftSide.substring(0,start)+","+decimalLeftSide.substring(start,decimalLeftSide.length)
start-=3;}}if(!excludeTrailingZeros&&scale>0&&decimalRightSide.length<scale){for(var i=decimalRightSide.length;i<scale;i++){decimalRightSide+="0";}}var returnDecimalString=new String(decimalLeftSide);if(decimalRightSide.length>0){returnDecimalString=decimalLeftSide+"."+decimalRightSide;}if(commaAndDecimalReversed){if(!excludeCommas){returnDecimalString=returnDecimalString.replace(".","|");returnDecimalString=returnDecimalString.replace(",",".");returnDecimalString=returnDecimalString.replace("|",",");}else{returnDecimalString=returnDecimalString.replace(".",",");}}return decimalSign+returnDecimalString;};this.FormatCurrencyString=function(numberString,returnEmptyStringWhenNaN,excludeCommas,excludeLeadingZero,excludeTrailingZeros,scale,positiveOnly,currencySymbol,currencySymbolAtEnd,currencyCommaDecimalReversed){if(excludeCommas==null){excludeCommas=this.CurrencyExcludeCommas;}if(excludeCommas==null){excludeCommas=this.CurrencyExcludeCommas;}if(excludeLeadingZero==null){excludeLeadingZero=this.CurrencyExcludeLeadingZero;}if(excludeTrailingZeros==null){excludeTrailingZeros=this.CurrencyExcludeTrailingZeros;}if(scale==null){scale=this.CurrencyScale;}if(currencyCommaDecimalReversed==null){currencyCommaDecimalReversed=this.CurrencyCommaDecimalReversed;}var decimalString=this.FormatDecimalString(numberString,returnEmptyStringWhenNaN,excludeCommas,excludeLeadingZero,excludeTrailingZeros,scale,positiveOnly,currencyCommaDecimalReversed);if(decimalString==""){return decimalString;}if(currencySymbol==null){currencySymbol=this.CurrencySymbol;}if(currencySymbolAtEnd==null){currencySymbolAtEnd=this.CurrencySymbolAtEnd;}var symbolStart=currencySymbol;var symbolEnd="";if(currencySymbolAtEnd){symbolStart="";symbolEnd=currencySymbol;}var negativeSign="";if(decimalString.indexOf("-")>=0){negativeSign="-";decimalString=decimalString.replace("-","");}return negativeSign+symbolStart+decimalString+symbolEnd;};this.FormatPercentString=function(stringValue,returnEmptyStringWhenNaN,excludeLeadingZero,excludeTrailingZeros,scale){if(excludeLeadingZero==null){excludeLeadingZero=this.PercentExcludeLeadingZero;}if(excludeTrailingZeros==null){excludeTrailingZeros=this.PercentExcludeTrailingZeros;}if(scale==null){scale=this.PercentScale;}var decimalValue=this.ParseFloat(stringValue,true);if(decimalValue<0){decimalValue=0;}else if(decimalValue>100){decimalValue=100;}decimalValue=this.FormatDecimalString(decimalValue,returnEmptyStringWhenNaN,true,excludeLeadingZero,excludeTrailingZeros,scale);return decimalValue.toString()+"%";};this.ParseFloat=function(string,returnNullWhenNaN,commaAndDecimalReversed){if(string==null){if(returnNullWhenNaN){return null;}else{return 0;}}else if(isNumber(string)){return string;}else{var stringInput=string.toString();if(commaAndDecimalReversed==null){commaAndDecimalReversed=this.DecimalCommaAndDecimalReversed;}if(commaAndDecimalReversed==true&&stringInput&&stringInput!=""){if(stringInput.indexOf(".")<stringInput.indexOf(",")){stringInput=stringInput.replace(".","");stringInput=stringInput.replace(",",".");}else if(stringInput.indexOf(".")<0&&stringInput.indexOf(",")>=0){stringInput=stringInput.replace(",",".");}}var stripNotNumbers=/[^0-9.-]/g;stringInput=stringInput.replace(stripNotNumbers,"");var number=new Number();number=parseFloat(stringInput);if(number.toString()=="NaN"){if(returnNullWhenNaN){return null;}else{return 0;}}else{return number;}}};this.Round=function(number,scale,commaAndDecimalReversed){var inNum=number;var sign=1;if(inNum<0){sign=-1;}if(scale==null){scale=this.DecimalScale;}inNum=this.ParseFloat(inNum,false,commaAndDecimalReversed);inNum=Math.abs(inNum);scale=parseInt(scale);var n=new Number(sign*Math.round(inNum*Math.pow(10,scale))/Math.pow(10,scale));return n;};this.IsEven=function(integer){return(1-(integer%2));};};var MathTools=new MathTools();function UITools(){this.GlobalIsControlKeyDown=false;this.GlobalIsShiftKeyDown=false;this.GetPageXCoordinate=function(element){var elementId=element;element=GetElementById(element);if(element){var offsetParent=element;if(!offsetParent){alert("Able to find element, but unable to find the offsetParent for the element supplied to UITools.GetPageXCoordinate.  The next alert will dump the object");__Dump(element);}var offsetLeft=0;while(offsetParent!=null&&offsetParent.tagName!="BODY"&&offsetParent.tagName!="HTML"){offsetLeft+=offsetParent.offsetLeft-offsetParent.scrollLeft;if(offsetParent.parentNode&&offsetParent.parentNode!=offsetParent.offsetParent&&offsetParent.parentNode.scrollLeft&&offsetParent.parentNode.scrollLeft>0){offsetLeft-=offsetParent.parentNode.scrollLeft;}offsetParent=offsetParent.offsetParent;}return parseInt(offsetLeft);}else{alert("Unable to locate the element supplied to the UITools.GetPageXCoordinate");__Dump(elementId);}};this.GetPageYCoordinate=function(element){var elementId=element;element=GetElementById(element);if(element){var offsetTop=0;var offsetParent=element;if(offsetParent.offsetTop==0&&offsetParent.tagName=="TR"&&BrowserTools.IsSafari()&&offsetParent.firstChild!=null){offsetParent=offsetParent.firstChild;}if(!offsetParent){alert("Able to find element, but unable to find the offsetParent for the element supplied to UITools.GetPageYCoordinate.  The next alert will dump the object");__Dump(element);}while(offsetParent!=null&&offsetParent.tagName!="BODY"&&offsetParent.tagName!="HTML"){offsetTop+=offsetParent.offsetTop-offsetParent.scrollTop;if(offsetParent.parentNode&&offsetParent.parentNode!=offsetParent.offsetParent&&offsetParent.parentNode.scrollTop&&offsetParent.parentNode.scrollTop>0){offsetTop-=offsetParent.parentNode.scrollTop;}offsetParent=offsetParent.offsetParent;}return parseInt(offsetTop);}else{alert("Unable to locate the element supplied to the UITools.GetPageYCoordinate");__Dump(elementId);}};this.GetEventPageXCoordinate=function(localEvent){var x;if(navigator.appName=="Netscape"){x=parseInt(localEvent.pageX);}else{x=parseInt(localEvent.clientX+UITools.GetScrollLeft());}return x;};this.GetEventPageYCoordinate=function(localEvent){var y;if(navigator.appName=="Netscape"){y=parseInt(localEvent.pageY);}else{y=parseInt(localEvent.clientY+UITools.GetScrollTop());}return y;};this.GetWindowHeight=function(){if(IsSafari()){return parseInt(window.innerHeight);}else{return parseInt(document.body.clientHeight);}};this.GetWindowWidth=function(){if(IsSafari()){return parseInt(window.innerWidth);}else{return parseInt(document.body.clientWidth);}};this.GetScrollLeft=function(){if(navigator.appName=="Netscape"){return parseInt(window.pageXOffset);}else{var scrollLeft=document.body.scrollLeft;var scrollLeftDocElement=0;if(document.documentElement!=null){scrollTopDocElement=document.documentElement.scrollLeft;}return parseInt(Math.max(scrollLeft,scrollLeftDocElement));}};this.GetScrollTop=function(){if(navigator.appName=="Netscape"){return parseInt(window.pageYOffset);}else{var scrollTop=document.body.scrollTop;var scrollTopDocElement=0;if(document.documentElement!=null){scrollTopDocElement=document.documentElement.scrollTop;}return parseInt(Math.max(scrollTop,scrollTopDocElement));}};this.GetElementWidth=function(element){element=GetElementById(element);if(element==document){return $(document).width();}else if(element){return parseInt(element.offsetWidth);}else{alert("Unable to locate the element supplied to the UITools.GetElementWidth - 0 returned");}return 0;};this.GetElementHeight=function(element){element=GetElementById(element);if(element==document){return $(document).height();}else if(element){return parseInt(element.offsetHeight);}else{alert("Unable to locate the element supplied to the UITools.GetElementHeight - 0 returned");}return 0;};this.ShowDivAndIFrameAtEvent=function(localEvent,divElement,iframe,offsetX,offsetY){if(!localEvent){return false;}var x;var y;if(navigator.appName=="Netscape"&&parseInt(navigator.appVersion)>=4){x=localEvent.pageX;y=localEvent.pageY;}else{x=event.clientX+document.body.scrollLeft;y=event.clientY+document.body.scrollTop;}return this.ShowDivAndIFrameAtXY(x,y,divElement,iframe,offsetX,offsetY);};this.ShowDivAndIFrameAtCenterScreen=function(divElement,iframe,offsetX,offsetY,showVeil){var divElement=GetElementById(divElement);var x=0;var y=0;divElement.style.display="block";divElement.style.visibility="visible";var width=divElement.offsetWidth;var height=divElement.offsetHeight;divElement.style.display="none";divElement.style.visibility="";var windowWidth=UITools.GetWindowWidth();var windowHeight=UITools.GetWindowHeight();if(windowWidth>width){x=(windowWidth-width)/2;}x=x+UITools.GetScrollLeft();if(windowHeight>height){y=(windowHeight-height)/2;}y=y+UITools.GetScrollTop();if(offsetX){x+=offsetX;}if(offsetY){y+=offsetY;}return UITools.ShowDivAndIFrameAtXY(x,y,divElement,iframe,offsetX,offsetY,showVeil);};this.ShowDivAndIFrameAtElement=function(elementNear,divElement,iframe,offsetX,offsetY,showVeil,outofWindowAllowed){return this.ShowDivAndIFrameAtXY(this.GetPageXCoordinate(elementNear),this.GetPageYCoordinate(elementNear),divElement,iframe,offsetX,offsetY,showVeil,outofWindowAllowed);};this.ShowDivAndIFrameAtXY=function(x,y,divElement,iframe,offsetX,offsetY,showVeil,outofWindowAllowed){divElement=GetElementById(divElement);if(divElement){if(divElement.parentNode.tagName!="BODY"&&divElement.parentNode.tagName!="FORM"){divElement.parentNode.removeChild(divElement);document.forms[0].appendChild(divElement);}divElement.style.display="block";divElement.style.visibility="visible";if(!offsetX){offsetX=0;}if(!offsetY){offsetY=0;}x=x+offsetX;y=y+offsetY;if(!outofWindowAllowed){x=this.GetPageXCoordinateAdjustedElementWithinWindow(x,divElement);y=this.GetPageYCoordinateAdjustedElementWithinWindow(y,divElement);}divElement.style.left=x;divElement.style.top=y;if(iframe){iframe=GetElementById(iframe);}if(iframe==null){iframe=UITools.GetElementShim(divElement);}if(iframe!=null){this.ShowIFrameUnderDiv(divElement,iframe,x,y);}if(showVeil){metafuseVeil.ShowVeilUnderElement(divElement,iframe);}}else{alert("Unable to locate the div specified in the UITools.ShowDivAndIFrameAtXY function");}return false;};this.ShowIFrameUnderDiv=function(divElement,iframe,x,y){divElement=GetElementById(divElement);iframe=GetElementById(iframe);if(divElement&&iframe){iframe.display="";iframe.style.width=divElement.offsetWidth;iframe.style.height=divElement.offsetHeight;if(divElement.onresize==null){divElement.onresize=function(){iframe.style.width=divElement.offsetWidth;iframe.style.height=divElement.offsetHeight;};}if(y==null){y=this.GetPageYCoordinate(divElement);}if(x==null){x=this.GetPageXCoordinate(divElement);}iframe.style.top=y;iframe.style.left=x;if(divElement.style.zIndex){iframe.style.zIndex=divElement.style.zIndex-1;}iframe.style.display="";}else{alert("Unable to locate either the element or the div at specified in the UITools.ShowIFrameUnderDiv function");}};this.EnsureElementAndIFrameDisplayedWithinWindow=function(element,scrollToKeepInWindow){element=GetElementById(element);if(element){var x=this.GetPageXCoordinate(element);var y=this.GetPageYCoordinate(element);if(scrollToKeepInWindow&&isBoolean(scrollToKeepInWindow)){var sX=this.GetPageXScrollByForAdjustedElementWithinWindow(x,element);var sY=this.GetPageYScrollByForAdjustedElementWithinWindow(y,element);if(sX!=0||sY!=0){window.scrollBy(sX,sY);}}else{var xC=this.GetPageXCoordinateAdjustedElementWithinWindow(x,element);var yC=this.GetPageYCoordinateAdjustedElementWithinWindow(y,element);if(x!=xC){element.style.left=xC+"px";}if(y!=yC){element.style.top=yC+"px";}var iframe=this.GetElementShim(element);if(iframe){iframe.style.width=element.offsetWidth;iframe.style.height=element.offsetHeight;if(x!=xC){iframe.style.left=xC+"px";}if(y!=yC){iframe.style.top=yC+"px";}}}}};this.GetPageXCoordinateAdjustedElementWithinWindow=function(x,element){var scrollLeft=UITools.GetScrollLeft();var windowWidth=UITools.GetWindowWidth();var xOver=(x+element.offsetWidth)-(windowWidth+scrollLeft);if(xOver>0){x=x-xOver;}if(x<scrollLeft){x=scrollLeft;}return x;};this.GetPageYCoordinateAdjustedElementWithinWindow=function(y,element){var scrollTop=UITools.GetScrollTop();var windowHeight=UITools.GetWindowHeight();var yOver=(y+element.offsetHeight)-(windowHeight+scrollTop);if(yOver>0){y=y-yOver;}if(y<scrollTop){y=scrollTop;}return y;};this.GetPageXScrollByForAdjustedElementWithinWindow=function(x,element){var scrollLeft=UITools.GetScrollLeft();var windowWidth=UITools.GetWindowWidth();var xOver=(x+element.offsetWidth)-(windowWidth+scrollLeft);if(xOver>0){return xOver;}if(x<scrollLeft){return xOver;}return 0;};this.GetPageYScrollByForAdjustedElementWithinWindow=function(y,element){var scrollTop=UITools.GetScrollTop();var windowHeight=UITools.GetWindowHeight();var yOver=(y+element.offsetHeight)-(windowHeight+scrollTop);if(yOver>0){return yOver;}if(y<scrollTop){return yOver;}return 0;};this.HideDivAndIFrame=function(divElement,iframe){divElement=GetElementById(divElement);if(divElement){divElement.style.display="none";}if(BrowserTools.IsInternetExplorer()||this.AlwaysCreateShim){iframe=GetElementById(iframe);if(iframe==null){iframe=this.GetElementShim(divElement);}else{var iframeShim=this.GetElementShim(divElement);if(iframeShim){iframeShim.style.width=0;iframeShim.style.height=0;iframeShim.style.display="none";}}if(iframe){iframe.style.width=0;iframe.style.height=0;iframe.style.display="none";}}metafuseVeil.HideVeilUnderElement(divElement);};this.GetIFrameForShim=function(iframeId){var iframe=GetElementById(iframeId);if(iframe==null){this.InsertHTML("<iframe id=\""+iframeId+"\" scrolling=\"no\" frameborder=\"0\" style=\"position:absolute;top:0px; left:0px; display:none;color:#ffffff;font-size:1px;\"></iframe>");iframe=GetElementById(iframeId);}return iframe;};this.AlwaysCreateShim=false;this.GetElementShim=function(element){if((BrowserTools.IsInternetExplorer()&&BrowserTools.GetMajorVersion()<9)||this.AlwaysCreateShim){element=GetElementById(element);if(element==null){return null;}else{return UITools.GetIFrameForShim(element.id+"_Shim_erspw");}}else{return null;}};this.FocusOnElement=function(elementToFocus){var focusElement=GetElementById(elementToFocus);if(focusElement){if(focusElement.style){if(focusElement.style.display!="none"){try{focusElement.focus();}catch(e){}}}}};this.ClickElement=function(element){element=GetElementById(element);if(element){if(BrowserTools.IsInternetExplorer()||BrowserTools.IsSafari()){element.click();}else{var evt=document.createEvent('MouseEvents');try{evt.initMouseEvent('click',true,true,document.defaultView,1,0,0,0,0,false,false,false,false,0,null);element.dispatchEvent(evt);}catch(ex){try{element.click();}catch(ex2){};};}}};this.DisableElement=function(elementNameToDisable){this.ToggleElementDisable(elementNameToDisable,false);};this.EnableElement=function(elementNameToEnable){ToggleElementDisable(elementNameToEnable,true);};this.ToggleElementDisable=function(elementName,enable){var element=GetElementById(elementName);if(element){if(enable){if(element.tagName=="A"&&(BrowserTools.IsInternetExplorer()==false||isUndefined(element.disabled)==true)){var href_previous=element.getAttribute("href_previous");if(href_previous&&href_previous!=null&&href_previous!=""){element.setAttribute("href",href_previous);}var onclick_previous=element.getAttribute("onclick_previous");if(onclick_previous&&onclick_previous!=null&&onclick_previous!=""){element.setAttribute("onclick",onclick_previous);}var onmousedown_previous=element.getAttribute("onmousedown_previous");if(onmousedown_previous&&onmousedown_previous!=null&&onmousedown_previous!=""){element.setAttribute("onmousedown",onmousedown_previous);}var onmouseover_previous=element.getAttribute("onmouseover_previous");if(onmouseover_previous&&onmouseover_previous!=null&&onmouseover_previous!=""){element.setAttribute("onmouseover",onmouseover_previous);}var color_previous=element.getAttribute("color_previous");if(color_previous&&color_previous!=null&&color_previous!=""){element.style.color=color_previous;}else{element.style.color="";}}else{if(isUndefined(element.disabled)==false){element.disabled=false;$(element).removeAttr('disabled');}}}else{if(element.tagName=="A"&&(BrowserTools.IsInternetExplorer()==false||isUndefined(element.disabled)==true)){var href=element.getAttribute("href");if(href&&href!=null&&href!=""){element.setAttribute("href_previous",href);element.setAttribute("href","javascript:;");}var onclick=element.getAttribute("onclick");if(onclick&&onclick!=null&&onclick!=""){element.setAttribute("onclick_previous",onclick);element.setAttribute("onclick","void(0);");}var onmousedown=element.getAttribute("onmousedown");if(onmousedown&&onmousedown!=null&&onmousedown!=""){element.setAttribute("onmousedown_previous",onmousedown);element.setAttribute("onmousedown","return false;");}var onmouseover=element.getAttribute("onmouseover");if(onmouseover&&onmouseover!=null&&onmouseover!=""){element.setAttribute("onmouseover_previous",onmouseover);element.setAttribute("onmouseover","return false;");}if(element.style.color){element.setAttribute("color_previous",element.style.color);}element.style.color="gray";}else{if(isUndefined(element.disabled)==false){$(element).attr('disabled','disabled');element.disabled=true;}}}}};this.ToggleDisplay=function(element,hide){element=GetElementById(element);if(element){if(hide){if(element.style.display==""||element.style.display=="block"){element.style.display="none";}}else{if(element.style.display=="none"){element.style.display="";}}var type=FormTools.GetFormElementType(element);if(type=="checkbox"&&element.nextSibling&&element.nextSibling.tagName=="LABEL"){UITools.ToggleDisplay(element.nextSibling,hide);}}return false;};this.GetKeyDown=function(localEvent){var keyCode=document.layers?localEvent.which:document.all?event.keyCode:document.getElementById?localEvent.keyCode:0;return keyCode;};this.GetKeyUp=function(localEvent){var keyCode=document.layers?localEvent.which:document.all?event.keyCode:document.getElementById?localEvent.keyCode:0;return keyCode;};this.InsertHTML=function(html){if(html!=null&&html!=""){if(document.body&&document.body.insertAdjacentHTML){document.forms[0].insertAdjacentHTML('BeforeEnd',html);}else if(document.createRange){var range=document.createRange();if(range.createContextualFragment){range.selectNodeContents(document.body);var docFrag=range.createContextualFragment(html);document.forms[0].appendChild(docFrag);}}else if(document.layers){var layer=new Layer(window.innerWidth);layer.document.open();layer.document.write(html);layer.document.close();layer.top=document.height;document.height+=layer.document.height;layer.visibility='show';}}};this.UpdateInnerHTML=function(element,html){element=GetElementById(element);if(element){element.innerHTML=html;}};this.UpdateOuterHTML=function(elementId,html,insertElementIfNonExistent,outerElementId){UpdateOuterHTML(elementId,html,insertElementIfNonExistent,outerElementId);};this.RemoveElementFromDOM=function(element){element=GetElementById(element);if(element){$(element).remove();}};this.CancelBubble=function(localEvent){if(localEvent==null&&window.event){localEvent=window.event;}if(localEvent){localEvent.cancelBubble=true;localEvent.returnValue=false;if(localEvent.stopPropagation){localEvent.stopPropagation();localEvent.preventDefault();}}return false;};this.DragElement=function(localEvent,elementId){var element=GetElementById(elementId);if(localEvent.button){if(localEvent.button!="1"){return;}}else if(localEvent.which){if(localEvent.which!="1"){return;}}if(element.parentNode!="BODY"&&element.parentNode!="FORM"){this.ShowDivAndIFrameAtElement(element,element);element.parentNode.removeChild(element);document.forms[0].appendChild(element);}var dragObject=new MetafuseGenericDragObject();dragObject.StartDrag(localEvent,GetElementById(elementId));return false;};this.GetParentNodeByTagName=function(elementId,tagName){var element=GetElementById(elementId);var parentNode=element;while(parentNode!=null){if(parentNode.nodeName==tagName){return parentNode;}parentNode=parentNode.parentNode;}return null;};this.GetChildNodeByTagName=function(elementId,tagName){var element=GetElementById(elementId);if(element.nodeName==tagName){return element;}for(var i=0;i<element.childNodes.length;i++){var childNode=element.childNodes[i];if(childNode.nodeName!=null&&childNode.nodeName==tagName){return childNode;}}for(var i=0;i<element.childNodes.length;i++){var childNode=element.childNodes[i];var matchingNode=UITools.GetChildNodeByTagName(childNode,tagName);if(matchingNode!=null){return matchingNode;}}return null;};this.MoveElement=function(element,newParentNode){element=GetElementById(element);newParentNode=GetElementById(newParentNode);if(element&&newParentNode){if(element.parentNode!=newParentNode){element.parentNode.removeChild(element);newParentNode.appendChild(element);}}};};var UITools=new UITools();function GlobalF1KeyInvokeContextHelp(){};function GlobalKeyDown(event){var keyCode=UITools.GetKeyDown(event);if(keyCode==112){GlobalF1KeyInvokeContextHelp();return UITools.CancelBubble(event);}if(keyCode==16){UITools.GlobalIsShiftKeyDown=true;}if(keyCode==17){UITools.GlobalIsControlKeyDown=true;}};function GlobalKeyUp(event){var keyCode=UITools.GetKeyUp(event);if(keyCode==16){UITools.GlobalIsShiftKeyDown=false;}if(keyCode==17){metafuseGlobalLinkOpenInNewWindow=false;UITools.GlobalIsControlKeyDown=false;}};function GlobalAddKeyDownAndKeyUpEventsToDocument(){AddEventHandlerToElement(document,"onkeydown",GlobalKeyDown,false);AddEventHandlerToElement(document,"onkeyup",GlobalKeyUp,false);window.onhelp=function(event){return UITools.CancelBubble(event);};};OnLoad.AddFunction(GlobalAddKeyDownAndKeyUpEventsToDocument);function FormTools(){this.UpdateSelectOptions=function(selectClientID,selectListArray){var selectElement=GetElementById(selectClientID);if(selectElement){this.SelectOptionsClear(selectElement);if(selectListArray){for(var i=0;i<selectListArray.length;i++){var e=selectListArray[i];var o=new Option(e.Text,e.Value);if(e.Selected=="true"){o.selected=true;}selectElement.options[selectElement.options.length]=o;}}}};this.AddAdditionalHiddenElementNamesToAppendToReturnUrl=function(elementName){if(AdditionalHiddenElementNamesToAppendToReturnUrl==null){AdditionalHiddenElementNamesToAppendToReturnUrl=new Array();}var found=false;for(var i=0;i<AdditionalHiddenElementNamesToAppendToReturnUrl.length;i++){if(AdditionalHiddenElementNamesToAppendToReturnUrl[i]==elementName){found=true;break;}}if(!found){AdditionalHiddenElementNamesToAppendToReturnUrl[AdditionalHiddenElementNamesToAppendToReturnUrl.length]=elementName;}};this.SelectMultipleCheckNoneSelected=function(element){element=GetElementById(element);if(element){if(element.length){if(element[0].selected==true){for(var i=1;i<element.length;i++){element[i].selected=false;}}}}};this.SelectOptionsClear=function(selectElement,keepSelected){selectElement=GetElementById(selectElement);if(selectElement){var selectedExists=false;var i=0;while(selectElement.options&&selectElement.options.length>i){if(keepSelected==true&&selectElement.options[i].selected==true){i+=1;continue;}else{selectElement.options[i]=null;}}}};this.SelectOptionsRemoveOption=function(selectElement,optionValue){selectElement=GetElementById(selectElement);if(selectElement){for(var i=0;i<selectElement.options.length;i++){var option=selectElement.options[i];if(option.value==optionValue){selectElement.options[i]=null;return true;break;}}}return false;};this.GetFormElementType=function(element){var type=null;if(element){type=element.type;if(type==null){if(element.length){type=element[0].type;}else{if(element.className&&element.className=="MetafuseComboBox"){type=element.className;}}}}return type;};this.GetFormElementValue=function(element,multipleSelectionValueSeparator){var element=GetElementById(element);if(element){var type=this.GetFormElementType(element);if(type==null){elementForm=document.forms[0][element.id];type=this.GetFormElementType(elementForm);if(type==null){alert("Unable to detect the type of form element for element id: "+element.id+" in GetFormElementValue");}}if(type=="select-multiple"||type=="select-one"){var values="";if(element.options){var useValue=true;if(element.options.length>1){var option1=element.options[0];var option2=element.options[1];if((option1.value==null||option1.value=="")&&(option2.value==null||option2.value=="")){useValue=false;}}if(multipleSelectionValueSeparator==null||multipleSelectionValueSeparator==""){multipleSelectionValueSeparator=",";}for(var i=0;i<element.options.length;i++){if(element.options[i].selected==true){if(values.length>0){values+=multipleSelectionValueSeparator;}if(useValue){values+=element.options[i].value;}else{values+=element.options[i].text;}if(type=="select-one"){break;}}}}return values;}else if(type=="checkbox"){if(element.checked){if(element.value!=null&&element.value!=""){return element.value;}else{return"on";}}}else if(type=="radio"){var radio=null;if(element.name){var name=new String(element.name);radio=document.forms[0][name];}if(radio==null){radio=document.forms[0][element.id];}if(radio==null){if(element==null){return"";}else{radio=element;}}if(radio){if(radio.length==null){if(radio.checked){return radio.value;}}else{for(var i=0;i<radio.length;i++){var r=radio[i];if(r.checked){return r.value;}}}}}else if(type=="MetafuseComboBox"){return FormTools.GetFormElementValue(element.id+"_sv",multipleSelectionValueSeparator);}else{return element.value;}}return"";};this.GetFormElementText=function(clientId){element=GetElementById(clientId);if(element){var type=this.GetFormElementType(element);if(type==null){elementForm=document.forms[0][element.id];type=this.GetFormElementType(elementForm);if(type==null){alert("Unable to detect the type of form element for element id: "+element.id+" in GetFormElementText");}}if(type=="select-multiple"||type=="select-one"){var values="";if(element.options){for(var i=0;i<element.options.length;i++){if(element.options[i].selected==true){if(values.length>0){values+=", ";}values+=element.options[i].text;}}}return values;}else if(type=="checkbox"){if(element.checked){return"Yes";}else{return"No";}}else if(type=="radio"){var radio=null;if(element.name){var name=new String(element.name);radio=document.forms[0][name];}if(radio==null){radio=document.forms[0][element.id];}if(radio==null){if(element==null){return"";}else{radio=element;}}if(radio){var selectedRadio=null;if(radio.length==null){if(radio.checked){selectedRadio=radio;}}else{for(var i=0;i<radio.length;i++){var r=radio[i];if(r.checked){selectedRadio=r;}}}if(selectedRadio!=null&&selectedRadio.parentNode!=null){var parentNode=selectedRadio.parentNode;var labels=parentNode.getElementsByTagName('label');if(labels!=null&&labels.length>0){return labels[0].innerHTML;}else{return this.GetFormElementValue(element);}}else{return this.GetFormElementValue(element);}}}else if(type=="MetafuseComboBox"){var metafuseComboBoxElement=window[element.id+"_obj"];if(metafuseComboBoxElement){return metafuseComboBoxElement.GetFormElementText();}}else{return this.GetFormElementValue(element);}}return"";};this.GetFormElementOptionText=function(element,value){element=GetElementById(element);if(element){var type=this.GetFormElementType(element);if(type==null){elementForm=document.forms[0][element.id];type=this.GetFormElementType(elementForm);if(type==null){alert("Unable to detect the type of form element for element id: "+element.id+" in GetFormElementOptionText");}}if(type=="select-multiple"||"select-one"){if(element.options){for(var i=0;i<element.options.length;i++){if(element.options[i].value.toString()==value.toString()){return element.options[i].text;}}}}else{alert("Unable to get the form element option text for the element supplied "+element.id+" type not supported in GetFormElementOptionText");}}return"";};this.SetFormElementValue=function(clientId,value,text,valueSeparator,textSeparator,missionOptionArray,insertOptionsMissing,dropDownSelectWithMatchingValueOrTextOnOptions){if(value==null){return false;}if(valueSeparator==null){valueSeparator=",";}var element=GetElementById(clientId);var success=false;if(element){var type=this.GetFormElementType(element);if(type==null){elementForm=document.forms[0][element.id];type=this.GetFormElementType(elementForm);if(type==null){alert("Unable to detect the type of form element for element id: "+element.id+" in GetFormElementValue");}}if(type=="select-multiple"){var valueArray=null;var textArray=null;value=value.replace(valueSeparator+' ',valueSeparator);var valueArray=value.split(valueSeparator);if(text){text=text.replace(textSeparator+' ',textSeparator);textArray=text.split(textSeparator);}if(element.options.length){var useValue=true;if(element.options.length>1){var option1=element.options[0];var option2=element.options[1];if((option1.value==null||option1.value=="")&&(option2.value==null||option2.value=="")){useValue=false;}}for(var i=0;i<element.options.length;i++){var o=element.options[i];o.selected=false;for(var ii=0;ii<valueArray.length;ii++){var v=valueArray[ii];var foundMatch=false;if(useValue){if(o.value==v){o.selected=true;foundMatch=true;}else if(o.value==""&&v==""){o.selected=true;foundMatch=true;}else if(dropDownSelectWithMatchingValueOrTextOnOptions&&o.text==v){o.selected=true;foundMatch=true;}}else{if(o.text.toString()==v.toString()){o.selected=true;foundMatch=true;}else if(o.text==""&&v==""){o.selected=true;foundMatch=true;}}if(foundMatch){valueArray.splice(ii,1);if(textArray){textArray.splice(ii,1);}break;}}}}if(valueArray.length>0){if(missionOptionArray!=null||insertOptionsMissing){if(missionOptionArray==null){missionOptionArray=new Array();}for(var i=0;i<valueArray.length;i++){var v=valueArray[i];var t=v;if(textArray&&textArray.length>i){t=textArray[i];}var opt={text:t,value:v};missionOptionArray[missionOptionArray.length]=opt;}}if(insertOptionsMissing&&missionOptionArray.length>0){for(var i=missionOptionArray.length-1;i>=0;i--){var missingOption=missionOptionArray[i];FormTools.InsertFormElementValueAndText(element,missingOption.value,missingOption.text,true,0);}success=true;}}else{success=true;}}else if(type=="select-one"){if(element.options.length){var useValue=true;if(element.options.length>1){var option1=element.options[0];var option2=element.options[1];if((option1.value==null||option1.value=="")&&(option2.value==null||option2.value=="")){useValue=false;}}for(var i=0;i<element.options.length;i++){var o=element.options[i];if(useValue){if(o.value.toString()==value.toString()){o.selected=true;success=true;}else if(o.value==""&&value==""){o.selected=true;success=true;}else if(dropDownSelectWithMatchingValueOrTextOnOptions&&o.text==value){o.selected=true;success=true;}}else{if(o.text.toString()==value.toString()){o.selected=true;success=true;}else if(o.text==""&&value==""){o.selected=true;success=true;}}if(success){break;}}}if(!success){if(missionOptionArray){var opt={text:text,value:value};missionOptionArray[missionOptionArray.length]=opt;}if(insertOptionsMissing){FormTools.InsertFormElementValueAndText(element,value,text,true,0);success=true;}}}else if(type=="checkbox"){value=value.toLowerCase();if(value=="on"||value=="true"||value=="1"||value=="checked"||value=="yes"||value=="active"){element.checked=true
success=true;}else{element.checked=false;success=true;}}else if(type=="radio"){var radio=null;if(element.name){var name=new String(element.name);radio=document.forms[0][name];}if(radio==null){radio=document.forms[0][element.id];if(radio==null&&element!=null){radio=element;}}if(radio){if(radio.length==null){if(radio.value==value){radio.checked=true;success=true;}}else{for(var i=0;i<radio.length;i++){var r=radio[i];if(r.value==value){r.checked=true;success=true;}}}}}else if(type=="MetafuseComboBox"){var metafuseComboBoxElement=window[element.id+"_obj"];if(metafuseComboBoxElement){return metafuseComboBoxElement.SetFormElementValue(value,text,missionOptionArray,insertOptionsMissing);}}else{element.value=value;success=true;}}return success;};this.InsertFormElementValueAndText=function(elementId,value,text,defaultSelected,index){var element=GetElementById(elementId);if(element){var type=this.GetFormElementType(element);if(type==null){elementForm=document.forms[0][element.id];type=this.GetFormElementType(elementForm);if(type==null){alert("Unable to detect the type of form element for element id: "+element.id+" in GetFormElementValue");}}else if(type=="select-one"||type=="select-multiple"){var newOption=new Option(text,value);if(defaultSelected){newOption.selected=true;}if(element.length>0){if(index==null||index<0){index=0;}else if(index>element.length){index=element.options.length;}var existingOption=element.options[index];try{element.add(newOption,existingOption);}catch(ex){element.add(newOption,index);}}else{element.options[0]=newOption;}}else if(type=="MetafuseComboBox"){var metafuseComboBoxElement=window[element.id+"_obj"];if(metafuseComboBoxElement){metafuseComboBoxElement.AddAvailableRow(value,text,defaultSelected);}}else{alert("insert form field and text not implemented for element type: "+type+" id: "+element.id+" value: "+value+" text: "+text);}}return null;};this.RemoveFormElementValueAndText=function(elementId,value,text){var element=GetElementById(elementId);if(element){var type=this.GetFormElementType(element);if(type==null){elementForm=document.forms[0][element.id];type=this.GetFormElementType(elementForm);if(type==null){alert("Unable to detect the type of form element for element id: "+element.id+" in GetFormElementValue");}}else if(type=="select-one"||type=="select-multiple"){var start=element.options.length-1;for(var i=start;i>=0;i--){var o=element.options[i];if(o){if(value!=null){if(o.value!=null&&o.value==value){element.options[i]=null;}}else if(text!=null){if(o.text!=null&&o.text==text){element.options[i]=null;}}}}}else if(type=="MetafuseComboBox"){var metafuseComboBoxElement=window[element.id+"_obj"];if(metafuseComboBoxElement){metafuseComboBoxElement.RemoveAvailableRow(value,text);}}else{alert("remove form field and text not implemented for element type: "+type);}}};this.SetValueUsingSetTimeout=function(elementId,value){var element=GetElementById(elementId);if(element){var s=new String("");if(value){s=value.toString();}setTimeout("FormTools.SetFormElementValue('"+element.id+"',\""+s.replace(/\"/g,"\\\"")+"\")",0);}};this.FocusAndClickElementUsingSetTimeout=function(element){var element=GetElementById(element);if(element){setTimeout("GetElementById('"+element.id+"').focus()",0);setTimeout("UITools.ClickElement('"+element.id+"')",300);}};this.EnsureCurrency=function(element,blankNotAllowed,excludeCommas,excludeLeadingZero,excludeTrailingZeros,scale){var value=FormTools.GetFormElementValue(element);var currencyString=MathTools.FormatCurrencyString(value,!blankNotAllowed,excludeCommas,excludeLeadingZero,excludeTrailingZeros,scale);if(value!=currencyString){FormTools.SetValueUsingSetTimeout(element,currencyString);}};this.EnsurePositiveCurrency=function(element,blankNotAllowed,excludeCommas,excludeLeadingZero,excludeTrailingZeros,scale){var value=FormTools.GetFormElementValue(element);var currencyString=MathTools.FormatCurrencyString(value,!blankNotAllowed,excludeCommas,excludeLeadingZero,excludeTrailingZeros,scale,true);if(value!=currencyString){FormTools.SetValueUsingSetTimeout(element,currencyString);}};this.EnsureDecimal=function(element,blankNotAllowed,excludeCommas,excludeLeadingZero,excludeTrailingZeros,scale){var value=FormTools.GetFormElementValue(element);var decimalString=MathTools.FormatDecimalString(value,!blankNotAllowed,excludeCommas,excludeLeadingZero,excludeTrailingZeros,scale);if(value!=decimalString){FormTools.SetValueUsingSetTimeout(element,decimalString);}};this.EnsurePositiveDecimal=function(element,blankNotAllowed,excludeCommas,excludeLeadingZero,excludeTrailingZeros,scale){var value=FormTools.GetFormElementValue(element);var value=FormTools.GetFormElementValue(element);var decimalString=MathTools.FormatDecimalString(value,!blankNotAllowed,excludeCommas,excludeLeadingZero,excludeTrailingZeros,scale,true);if(value!=decimalString){FormTools.SetValueUsingSetTimeout(element,decimalString);}};this.EnsureInteger=function(element,blankNotAllowed,excludeCommas){var value=FormTools.GetFormElementValue(element);var integerString=MathTools.FormatDecimalString(value,!blankNotAllowed,excludeCommas,false,false,0);if(value!=integerString){FormTools.SetValueUsingSetTimeout(element,integerString);}};this.EnsurePositiveInteger=function(element,blankNotAllowed,excludeCommas){var value=FormTools.GetFormElementValue(element);var integerString=MathTools.FormatDecimalString(value,!blankNotAllowed,excludeCommas,false,false,0,true);if(value!=integerString){FormTools.SetValueUsingSetTimeout(element,integerString);}};this.EnsurePercent=function(element,blankNotAllowed,excludeLeadingZero,excludeTrailingZeros,scale){var value=FormTools.GetFormElementValue(element);var percentString=MathTools.FormatPercentString(value,!blankNotAllowed,excludeLeadingZero,excludeTrailingZeros,scale);if(value!=percentString){FormTools.SetValueUsingSetTimeout(element,percentString);}};this.SelectBoxMoveSelectedItemsUp=function(selectElement){selectElement=GetElementById(selectElement);var optionsToMove=new Array();var firstMoveOptionIndex=-1;var optionOrder=new Array();var optionMoved=false;for(var i=selectElement.options.length-1;i>=0;i--){var currentOption=selectElement.options[i];if(currentOption.selected==true&&(i>0)){if(optionsToMove.length==0){firstMoveOptionIndex=i;}optionsToMove[optionsToMove.length]=currentOption;}else if(optionsToMove.length>0){optionMoved=true;optionOrder[optionOrder.length]=currentOption;for(var ii=0;ii<optionsToMove.length;ii++){optionOrder[optionOrder.length]=optionsToMove[ii];}optionsToMove=new Array();}else{optionOrder[optionOrder.length]=currentOption;}}if(optionMoved==true){while(selectElement.options.length>0){selectElement.options[0]=null;}for(var i=optionOrder.length-1;i>=0;i--){selectElement.options[selectElement.options.length]=optionOrder[i];}}};this.SelectBoxMoveSelectedItemsDown=function(selectElement){selectElement=GetElementById(selectElement);var optionsToMove=new Array();var firstMoveOptionIndex=-1;var optionOrder=new Array();var optionMoved=false;for(var i=0;i<selectElement.options.length;i++){var currentOption=selectElement.options[i];if(currentOption.selected==true&&(i+1<selectElement.options.length)){if(optionsToMove.length==0){firstMoveOptionIndex=i;}optionsToMove[optionsToMove.length]=currentOption;}else if(optionsToMove.length>0){optionMoved=true;optionOrder[optionOrder.length]=currentOption;for(var ii=0;ii<optionsToMove.length;ii++){optionOrder[optionOrder.length]=optionsToMove[ii];}optionsToMove=new Array();}else{optionOrder[optionOrder.length]=currentOption}}if(optionMoved==true){while(selectElement.options.length>0){selectElement.options[0]=null;}for(var i=0;i<optionOrder.length;i++){selectElement.options[selectElement.options.length]=optionOrder[i];}}};this.SortSelectByTextAsString=function(selectElement){selectElement=GetElementById(selectElement);if(selectElement.options.length>1){var a=new Array();for(var i=0;i<selectElement.options.length;i++){a[a.length]=selectElement.options[i];}a.sort(FormTools.CompareSelectTextAsString);while(selectElement.options.length>0){selectElement.options[0]=null;}for(var i=0;i<a.length;i++){selectElement.options[selectElement.options.length]=a[i];}}};this.CompareSelectTextAsString=function(optionA,optionB){if(optionA.text==optionB.text){return 0;}else{if(optionA.text<optionB.text){return-1;}else{return 1;}}};this.SetCheckboxLabelText=function(checkbox,text){checkbox=GetElementById(checkbox);if(checkbox&&FormTools.GetFormElementType(checkbox)=="checkbox"&&checkbox.nextSibling&&checkbox.nextSibling.tagName=="LABEL"){checkbox.nextSibling.innerHTML=text;}};this.WindowOpenWithPost=function(url,params,name,windowoption){var form=document.createElement("form");form.setAttribute("method","post");form.setAttribute("action",url);if(name!=null){form.setAttribute("target",name);}if(params!=null){for(var i in params){if(params.hasOwnProperty(i)){var input=document.createElement('input');input.type='hidden';input.name=i;input.value=params[i];form.appendChild(input);}}}document.body.appendChild(form);if(name!=null){window.open(Root+"/post.htm",name,windowoption);}form.submit();document.body.removeChild(form);};this.Trim=function(stringToTrim){return Utils.Trim(stringToTrim);};this.LTrim=function(stringToTrim){return Utils.LTrim(stringToTrim);};this.RTrim=function(stringToTrim){return Utils.RTrim(stringToTrim);};};var FormTools=new FormTools();function Utils(){this.DateTime=new Utils.DateTime();this.Trim=function(stringToTrim){if(stringToTrim){return stringToTrim.replace(/^\s\s*/,'').replace(/\s\s*$/,'');}return stringToTrim;};this.LTrim=function(stringToTrim){if(stringToTrim){return stringToTrim.replace(/^\s\s*/,'');}return stringToTrim;};this.RTrim=function(stringToTrim){if(stringToTrim){return stringToTrim.replace(/\s\s*$/,'');}return stringToTrim;};this.GetNextTableRow=function(row){row=GetElementById(row);if(row!=null){var nextRow=row.nextSibling;while(nextRow!=null&&nextRow.nodeName!="TR"){nextRow=nextRow.nextSibling;}if(nextRow!=null&&nextRow.nodeName=="TR"){return nextRow;}}return null;};}Utils.DateTime=function(){this.GetDayOfWeekDescription=function(date){date=new Date(date);var day=date.getDay();if(day==0){return"Sunday";}else if(day==1){return"Monday";}else if(day==2){return"Tuesday";}else if(day==3){return"Wednesday";}else if(day==4){return"Thursday";}else if(day==5){return"Friday";}else{return"Saturday";}};this.AddDays=function(date,daysToAdd){date=new Date(date);date.setDate(date.getDate()+1);return date;};};var Utils=new Utils();function BrowserTools(){this.IsInternetExplorer=function(){if(navigator.userAgent.indexOf("MSIE")>=0){return true;}else{return false;}};this.IsNetscape=function(){if(this.IsSafari()){return false;}else if(this.IsFirefox()){return false;}else{if(navigator.appName.toLowerCase().indexOf("netscape")>-1){return true;}else{return false;}}};this.IsSafari=function(){if(navigator.userAgent.toLowerCase().indexOf("safari")>-1){return true;}else{return false;}};this.IsFirefox=function(){if(navigator.userAgent.indexOf("Firefox")>-1){return true;}else{return false;}};this.GetMajorVersion=function(){var userAgt=navigator.userAgent
if(this.IsInternetExplorer()){var verOffset=userAgt.indexOf("MSIE");return parseFloat(userAgt.substring(verOffset+5,userAgt.length));}else{alert("Unsupported for the browser");}return parseFloat(navigator.appVersion);};};var BrowserTools=new BrowserTools();function __Dump(object,insertIntoPage){if(insertIntoPage){InsertHTML("<p><textarea style=\"width:100%\" rows=\"10\">"+__GetObjectProperties(object)+"</textarea></p>");}else{alert(__GetObjectProperties(object));}}function __GetObjectProperties(obj){var properties=new String();if(isString(obj)){return obj;}for(var i in obj){var msg=i+": "+obj[i]+"\t";var msgString=new String();msgString=msg.toString()
msgString=msgString.substring(0,100);properties+=msgString;}return properties;}function MetafuseModalVeil(){this.ElementQueue=null;this.VeilElement=null;this.VeilElementShim=null;this.VeilZIndex=0;this.ShowVeilUnderElement=function(element,elementShim){element=GetElementById(element)
if(element){if(this.ElementQueue==null){this.ElementQueue=new Array();UITools.InsertHTML("<div id=\"metafuseVeilObjectDiv\" class=\"Veil\"></div>");this.VeilElement=GetElementById("metafuseVeilObjectDiv");var self=this;OnWindowResizeFunctions.AddFunction(function(){self.SetDimensions();});OnScrollFunctions.AddFunction(function(){self.SetDimensions();});this.SetDimensions();}if(this.VeilElement!=null&&this.VeilElement.style.zIndex>element.style.zIndex){var veilElementzIndex=this.VeilElement.style.zIndex+5;element.style.zIndex=veilElementzIndex;if(elementShim){elementShim.style.zIndex=veilElementzIndex-1;}}this.VeilElement.style.zIndex=element.style.zIndex-2;this.VeilElement.style.display="";if(this.VeilElementShim){this.VeilElementShim.style.zIndex=this.VeilElement.style.zIndex-1;this.VeilElementShim.style.display="";}this.ElementQueue[this.ElementQueue.length]=element;}};this.HideVeilUnderElement=function(element){if(this.ElementQueue!=null){var elementHadVeil=false;element=GetElementById(element);if(element){for(var i=0;i<this.ElementQueue.length;i++){var elementQueue=this.ElementQueue[i];if(elementQueue){if(elementQueue.id==element.id){this.ElementQueue.splice(i,1);elementHadVeil=true;break;}}}if(elementHadVeil){if(this.ElementQueue.length>0){var lastElement=this.ElementQueue[this.ElementQueue.length-1];this.VeilElement.style.zIndex=lastElement.style.zIndex-1;if(this.VeilElementShim){this.VeilElementShim.style.zIndex=this.VeilElement.style.zIndex-1;}}else{this.VeilElement.style.display="none";this.VeilElement.style.zIndex=0;if(this.VeilElementShim){this.VeilElementShim.style.display="none";this.VeilElementShim.style.zIndex=0;}}}}}};this.SetDimensions=function(){if(this.VeilElement!=null&&this.VeilElement.style.display==""){var docW=UITools.GetElementWidth(document);var docH=UITools.GetElementHeight(document);var w=UITools.GetWindowWidth()+UITools.GetScrollLeft();var h=UITools.GetWindowHeight()+UITools.GetScrollTop();w=Math.max(w,docW);h=Math.max(h,docH);this.VeilElement.style.width=w+'px';this.VeilElement.style.height=h+'px';if(this.VeilElementShim){this.VeilElementShim.style.width=w+'px';this.VeilElementShim.style.height=h+'px';}}};};var metafuseVeil=new MetafuseModalVeil();function SetValueUsingSetTimeout(elementId,value){FormTools.SetValueUsingSetTimeout(elementId,value);};function SelectOptionsClear(selectElement,keepSelected){FormTools.SelectOptionsClear(selectElement,keepSelected);};function ListBoxCheckNoneSelected(element){FormTools.SelectMultipleCheckNoneSelected(element);};function SubmitUsingSetTimeout(element){FormTools.FocusAndClickElementUsingSetTimeout(element);};function GetPageXCoordinate(element){return UITools.GetPageXCoordinate(element);};function GetPageYCoordinate(element){return UITools.GetPageYCoordinate(element);};function GetEventPageXCoordinate(localEvent){return UITools.GetEventPageXCoordinate(localEvent);};function GetEventPageYCoordinate(localEvent){return UITools.GetEventPageYCoordinate(localEvent);};function GetWindowHeight(){return UITools.GetWindowHeight();};function GetWindowWidth(){return UITools.GetWindowWidth();};function GetScrollLeft(){return UITools.GetScrollLeft();};function GetScrollTop(){return UITools.GetScrollTop();};function ShowDivAndIFrameAtEvent(localEvent,divElement,iframe,offsetX,offsetY){UITools.ShowDivAndIFrameAtEvent(localEvent,divElement,iframe,offsetX,offsetY);};function ShowDivAndIFrameAtXY(x,y,divElement,iframe,offsetX,offsetY){UITools.ShowDivAndIFrameAtXY(x,y,divElement,iframe,offsetX,offsetY);};function HideDivAndIFrame(divElement,iframe){UITools.HideDivAndIFrame(divElement,iframe);};function FocusOnElement(elementToFocus){UITools.FocusOnElement(elementToFocus);};function DisableElement(elementNameToDisable){UITools.DisableElement(elementNameToDisable);};function EnableElement(elementNameToEnable){UITools.EnableElement(elementNameToEnable);};function ToggleElementDisable(elementName,enable){UITools.ToggleElementDisable(elementName,enable);};function ToggleDisplay(element,hide){return UITools.ToggleDisplay(element,hide);};function InsertHTML(html){UITools.InsertHTML(html);};function IsNumeric(inputString){return MathTools.IsNumeric(inputString);};function FormatCurrency(num){return MathTools.FormatCurrencyString(num);};function Round(dNumber,iDecimalPlaces,includeTrailingZeros){if(iDecimalPlaces>0&&!includeTrailingZeros){alert("depricated functionality, check the function");}return MathTools.Round(dNumber,iDecimalPlaces);};function IsEven(integer){return MathTools.IsEven(integer);};function ConvertToFloat(value){return MathTools.ParseFloat(value);};function ParseFloatReturnsZeroIfNaN(inValue){return MathTools.ParseFloat(inValue);};function IsNetscape(){return IsBrowserNetscape();};function IsBrowserNetscape(){return BrowserTools.IsNetscape();};function IsSafari(){return IsBrowserSafari();};function IsBrowserSafari(){return BrowserTools.IsSafari();};function IsBrowserInternetExplorer(){return BrowserTools.IsInternetExplorer();};function EnsurePercent(element,decimalPlaces){element=GetElementById(element);if(element){var elementId=element.id;if(!decimalPlaces){decimalPlaces=2;}var v=new Number();v=parseFloat(element.value);if(v.toString()=="NaN"){SetValueUsingSetTimeout(elementId,"");return;}v=Round(v,decimalPlaces,true);if(v<0){SetValueUsingSetTimeout(elementId,"0");}else if(v>100){SetValueUsingSetTimeout(elementId,"100");}else if(v.toString()!=element.value.toString()){SetValueUsingSetTimeout(elementId,v.toString());}}};function ChangeElementClassName(element,className){element=GetElementById(element);if(element){element.className=className;}};function ChangeImage(sImageId,sImageName){if(document.images&&document[sImageId]&&eval("window."+sImageName)){document[sImageId].src=eval(sImageName+".src");}};function ChangeInputImage(inputImage,imgObjName){if(document.getElementById){inputImage.src=eval(imgObjName+".src");}};function HyperLinkSwapImage(element,imageUrl){element=GetElementById(element);if(element){element.src=imageUrl;}};function LO(scriptPath,guidArrayIndex,optionalNameString){if(scriptPath.indexOf("?")>=0){scriptPath+="&";}else{scriptPath+="?";}if(!optionalNameString){optionalNameString="Id";}return L(scriptPath+optionalNameString+"="+GuidArray[guidArrayIndex]);};function SID(hiddenInput,guidArrayIndex){SHV(hiddenInput,GuidArray[guidArrayIndex]);};function AnchorElementOnRight(elementName){var element=GetElementById(elementName);if(element){var scrollLeft;var elementWidth;if(navigator.appName=="Netscape"){element.style.position="fixed";}else{scrollLeft=document.body.scrollLeft;var windowWidth=GetWindowWidth();var left=(windowWidth-element.offsetWidth)+scrollLeft;element.style.position="absolute";element.style.left=left;}}};
