
var g_intSkinOffsetLeft=0;var g_intSkinOffsetTop=0;var g_strComponentResourceDirectory=null;if(document.pageform)
var g_doc=document.pageform.all;else
var g_doc=document.all;function removeString(strSource,strRemove)
{re=eval("/"+strRemove+"/g");return strSource.replace(re,"");}
function SetFormMethod(strFormMethod)
{var objForm=document.forms[0];if(objForm.__VIEWSTATE)
{objForm.__VIEWSTATE.name='NOVIEWSTATE';objForm.__VIEWSTATE.value='NONE';}
objForm.method=strFormMethod;}
function getFormElement(strFieldName)
{strFieldName=strFieldName.toLowerCase();for(var i=0;i<document.pageform.elements.length;i++)
{var objElement=findFormControl(document.pageform.elements[i],strFieldName);if(objElement)
return objElement;}
var arrElements=document.pageform.getElementsByTagName("INPUT");for(var i=0;i<arrElements.length;i++)
{var objElement=findFormControl(arrElements[i],strFieldName);if(objElement)
return objElement;}
arrElements=document.pageform.getElementsByTagName("A");strFieldNameAlt=strFieldName+"_link";for(var i=0;i<arrElements.length;i++)
{var objElement=findFormControl(arrElements[i],strFieldName);if(objElement)
return objElement;}
return null;}
function findFormControl(objElement,strFieldName)
{var strObjectName=objElement.name.toLowerCase();var intIndex=strObjectName.lastIndexOf(strFieldName)
var intAssumedIndex=strObjectName.length-strFieldName.length;var charBefore=strObjectName.substr(intIndex-1,1);if(intIndex>0&&intIndex==intAssumedIndex&&(charBefore=="$"||charBefore==":"||charBefore=="_"))
{return objElement;}
return null;}
function setDefaultFocus(strDefaultFocusField)
{if(!isBlank(strDefaultFocusField))
{var objFormElement=getFormElement(strDefaultFocusField);if(objFormElement!=null)
{objFormElement.focus();}}}
function clickButtonOnEnter(strName)
{if(event.keyCode==13)
{if(getFormElement(strName)!=null);{var objElement=getFormElement(strName);objElement.click();}
return false;}}
function submitFormOnEnter(strFormID)
{if(event.keyCode==13)
{var arrElements=document.pageform.getElementsByTagName("INPUT");for(var i=0;i<arrElements.length;i++)
{var objElement=arrElements[i];if(objElement.formID==strFormID+'_submit')
{objElement.click();}}
return false;}}
function submitFormOnEnterFF(strFormID,e)
{if(e.keyCode==13)
{var arrElements=document.pageform.getElementsByTagName("INPUT");for(var i=0;i<arrElements.length;i++)
{var objElement=arrElements[i];var formID=objElement.getAttribute('formID');if(formID==strFormID+'_submit')
{objElement.click();}}
return false;}}
function weldElement(obj,intIndex){var blnFound=false;var strTemp,strTemp2;if(intIndex<this.length){var intLength=this.length+1;for(var i=intIndex;i<(intLength);i++){if(i==intIndex){strTemp=this[i];this[i]=obj;blnFound=true;}else if(blnFound==true&&i<this.length){strTemp2=this[i];this[i]=strTemp;strTemp=strTemp2;}else if(blnFound==true&&i==this.length){this[i]=strTemp;}}}else{this[this.length]=obj;}}
Array.prototype.weld=weldElement;function isBlank(str)
{return((str==""||str==null)?true:false);}
function decodeGuid(str)
{if(str!=null)
return(str.replace(/_/g,"-"));else
return null;}
function encodeGuid(str)
{if(str!=null)
return(str.replace(/-/g,"_"));else
return null;}
function message(strText,blnAppend)
{var objMessage=document.getElementById("MessageWrite");if(objMessage==null)
{var msg=document.createElement("SPAN");msg.setAttribute("id","MessageWrite");msg.setAttribute("style","font-size:11px; color: #000000; font-family: Verdana");document.body.appendChild(msg);objMessage=document.getElementById("MessageWrite");}
if(objMessage.innerHTML=="")
objMessage.innerHTML="<br/>";if(!blnAppend)
{objMessage.innerHTML="<br/><br/>"+strText;}
else
{objMessage.innerHTML+="<br/>"+strText;}}
function trim(strValue)
{if(strValue){while(strValue.charCodeAt(0)==32||strValue.charCodeAt(0)==13||strValue.charCodeAt(0)==10){strValue=strValue.substring(1,strValue.length)}
while(strValue.charCodeAt(strValue.length-1)==32||strValue.charCodeAt(strValue.length-1)==13||strValue.charCodeAt(strValue.length-1)==10){strValue=strValue.substring(0,strValue.length-1)}}
return strValue;}
function getImage(str,strLookFor,strReplaceWith)
{re=eval("/"+strLookFor+"/g");return(str.replace(re,strReplaceWith));}
function changeImage(strOriginal,strNew)
{if(strNew!=null&&strNew!=""&&strNew!="[null]"&&strNew!="undefined")
return strNew;else
return strOriginal;}
function openSimpleWindow(strUrl,intHeight,intWidth,intLeft,intTop)
{if(window.screen){if(intWidth==null)
intWidth=Math.floor(screen.availWidth/3);if(intHeight==null)
intHeight=Math.floor(screen.availHeight/3);if(intLeft==null)
intLeft=Math.floor((screen.availWidth-intWidth)/2);if(intTop==null)
intTop=Math.floor((screen.availHeight-intHeight)/2);}
else{intWidth=640/3;intHeight=480/3;intLeft=intWidth/2;intTop=intHeight/2;}
return window.open(strUrl,"_blank","scrollbars=no,status=no,resizable=no,height="+intHeight+",location=0,width="+intWidth+",left="+intLeft+",top="+intTop);}
function openWindow(strUrl,sName,bScrollbars,bStatus,bResizable,intHeight,intWidth,intLeft,intTop)
{var scroll=0;var status=0;var resizable=0;if(bScrollbars)
scroll=1;if(bStatus)
status=1;if(bResizable)
resizable=1;return window.open(strUrl,sName,"scrollbars="+scroll+",status="+status+",resizable="+resizable+",height="+intHeight+",location=0,width="+intWidth+",left="+intLeft+",top="+intTop);}
function openCenteredWindow(strUrl,sName,bScrollbars,bStatus,bResizable,intHeight,intWidth)
{var thisWindow;var cw=intWidth/2,ch=intHeight/2;if(window.screen){cw=Math.floor((screen.availWidth-intWidth)/2);ch=Math.floor((screen.availHeight-intHeight)/2);}
return openWindow(strUrl,sName,bScrollbars,bStatus,bResizable,intHeight,intWidth,cw,ch)}
function toggleClick(id){var ToolTip=document.getElementById(id);if(ToolTip.style.visibility=="visible"){ToolTip.style.visibility="hidden";}else{ToolTip.style.visibility="visible";}
return;}
function toggleClickDisplay(id){var ToolTip=document.getElementById(id);if(ToolTip.style.display==""){ToolTip.style.display="none";}else{ToolTip.style.display="";}
return;}
function showDesignComponent(id)
{var div=eval("document.all."+id);if(div.id==id)
{div.originalColor=div.style.backgroundColor;div.style.backgroundColor="#EEEEEE";}
else
{for(i=0;i<div.length;i++)
{var divElement=div[i];divElement.originalColor=divElement.style.backgroundColor;divElement.style.backgroundColor="#EEEEEE";}}}
function hideDesignComponent(id)
{var div=eval("document.all."+id);if(div.id==id)
{div.style.backgroundColor=div.originalColor;}
else
{for(i=0;i<div.length;i++)
{var divElement=div[i];divElement.style.backgroundColor=divElement.originalColor;}}}
isIE=(document.all?true:false);isDOM=(document.getElementById?true:false);function getAbsX(elt){return(elt.x)?elt.x:getAbsPos(elt,"Left");}
function getAbsY(elt){return(elt.y)?elt.y:getAbsPos(elt,"Top");}
function getAbsPos(elt,which){iPos=0;while(elt!=null){iPos+=elt["offset"+which];elt=elt.offsetParent;}
return iPos;}
function getLayerObject(divname){var style;if(isDOM){style=document.getElementById(divname).style;}
else{style=isIE?document.all[divname].style:document.layers[divname];}
return style;}
function moveBy(elt,deltaX,deltaY){elt.left=parseInt(elt.left)+deltaX;elt.top=parseInt(elt.top)+deltaY;}
function setLayerPosition(elt,positionername,isPlacedUnder){var positioner;if(isIE)
{positioner=document.all[positionername];}
else
{if(isDOM)
{positioner=document.getElementById(positionername);}
else
{positioner=document.images[positionername];}}
elt.left=getAbsX(positioner);elt.top=getAbsY(positioner)+(isPlacedUnder?positioner.height:0);}
function deleteConfirmation(destination){if(confirm("Are you sure you wish to delete this?\nPress OK to continue.")){window.location=destination;}}
function CheckTags(){var coll=document.all.tags("a");var iCount;if(location.href.indexOf("check_link")<0){var sHostName=location.hostname;for(iCount=0;iCount<coll.length;iCount++){if(coll(iCount).href!=""&&coll(iCount).href.indexOf("mailto")<0&&coll(iCount).href.indexOf("javascript")<0&&coll(iCount).href.indexOf(sHostName)<0){coll(iCount).href="http://"+sHostName+location.pathname+"?action=check_link&moduleid=7476df34-317b-4bf0-8f65-2578c300bd78&mode=user&url="+escape(coll(iCount).href);}}}}
