
/*
    JS File generated on 9/8/2010 10:14:46 AM
    and took 00:00:00.2187556ms to run.
    Support JS? True
*/

var ACTION_PATH='Ajax.aspx';var m_blank='';var PARAM_CONTROL_GUID='controlguid';var PARAM_CONTROL_URL='controlurl';var PARAM_SLC_ID='SLC_ID';var PARAM_DATAVIEW='DataView';var PARAM_SOURCEID='SourceID';var PARAM_EVENTTYPE='EventType';var PARAM_EVENTNAME='EventName';var PARAM_VARIABLES='Variables';var oRequestArray=new Array();function processRequest(request,path){var requestAction=m_sProcessRequest.replace("%{orderedDictionary}","request");requestAction=requestAction.replace("getEventData(event)","m_sEventData");eval(requestAction);}
function historyChange(newLocation,historyData){xmlHTTP('dataView','toolbar','19',getEventData(null),newLocation);}
var m_oCurrentPage="";function setCurrentPage(sURL){m_oCurrentPage=sURL;}
var m_oPendingTitle=null;function setTitle(){if(m_oPendingTitle!=null){document.title=m_oPendingTitle;m_oPendingTitle=null;if(!m_bIsIE){var hash=decodeURIComponent(document.location.hash);if(hash!=""){var encodedHash=encodeURIComponent(dhtmlHistory.removeHash(hash));document.location.hash=encodedHash;}}}}
function cleanArray(){for(var i=0;i<oRequestArray.length;i++){if(oRequestArray[i].readyState==4){oRequestArray[i]=null;oRequestArray.splice(i,1);i=0;}}}
function getXMLHTTP(){if(typeof(oRequestArray)=="undefined"){return;}
return getXMLHTTP_Object();}
var ACTIVEX_ID=['Microsoft.XMLHTTP','MSXML2.XMLHTTP.3.0','MSXML2.XMLHTTP'];function getXMLHTTP_Object(){var A=null;for(var iLoop=0;iLoop<ACTIVEX_ID.length;iLoop++){try{A=new ActiveXObject(ACTIVEX_ID[iLoop]);break;}catch(e2){}}
if(A==null&&typeof(XMLHttpRequest)!="undefined"){A=new XMLHttpRequest();}
return A;}
function waitCursorUpdate(){var showWaitPanel=false;for(var iLoop=0;iLoop<oRequestQueue.length;iLoop++)
{if(oRequestQueue[iLoop].indexOf('dataViewBG')==-1)
{showWaitPanel=true;break;}}
setWaitPanel(showWaitPanel);}
var m_WaitPanel;function getWaitPanel()
{if(!m_WaitPanel){m_WaitPanel=getElementById("wait_panel");}
return m_WaitPanel;}
var m_HoverArrow;function getHoverArrow()
{if(!m_HoverArrow){m_HoverArrow=getElementById("hover_arrow");}
return m_HoverArrow;}
function setWaitPanel(bEnable)
{if(bEnable){fullScreen(getWaitPanel());show(getWaitPanel());switchStatus("wait");}else{hide(getWaitPanel());switchStatus();}}
function resetAjaxQueue()
{oRequestQueue=new Array();m_bQueueCleared=true;}
var oRequestQueue=new Array();var m_oXmlHttp=getXMLHTTP();var bRunning=false;var m_bQueueCleared=false;var iTimer=null;function executeXmlHTTP(){setTimeout(function(){waitCursorUpdate();},30);if(!bRunning&&oRequestQueue.length>0){if(bAnimatin==true){setTimeout(function(){executeXmlHTTP();},10);}
bRunning=true;oOnAjaxCall.fire(oRequestQueue[0]);if(m_oXmlHttp.readyState!=0){m_oXmlHttp.abort();}
var startTime=0;if(m_debugMode)
{startTime=getTimeStamp();}
m_oXmlHttp.open("POST",ACTION_PATH,true);m_oXmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");if(m_bIsIE)
{m_oXmlHttp.setRequestHeader("Content-length",oRequestQueue[0].length);}
m_oXmlHttp.onreadystatechange=function(){if(m_oXmlHttp.readyState==4){if(m_oXmlHttp.responseText!=null){var iAjaxLoop=0;try
{var preRenderingTime=0;if(m_debugMode)
{preRenderingTime=getTimeStamp();}
var sResponse=m_oXmlHttp.responseText;eval(sResponse);if(m_debugMode)
{log("Rendering time: "+(getTimeStamp()-preRenderingTime)+"ms");log("total round trip time: "+(getTimeStamp()-startTime)+"ms");m_startTime=0;}}
catch(oError){if(m_oXmlHttp.status=="200")
{handleException(sResponse,oError,iAjaxLoop);}
else
{jsError(sResponse,false,iAjaxLoop);showErrorPanel();}}}
if(!m_bQueueCleared)
{oRequestQueue[0]=null;oRequestQueue.splice(0,1);}
else
{m_bQueueCleared=false;}
waitCursorUpdate();bRunning=false;executeXmlHTTP();}};iTimer=getTimeStamp();m_oXmlHttp.send(oRequestQueue[0]);}}
function xmlHTTP(sAction,sItem1,sItem2,sItem3,sItem4,sItem5,sItem6,sItem7,sItem8){var sXmlHttpRequest='xmlaction='+sAction;sXmlHttpRequest+="&_wn="+m_sWindowName;if(sItem1!=null){sXmlHttpRequest+='&sItem1='+escape(sItem1);}
if(sItem2!=null){sXmlHttpRequest+='&sItem2='+escape(sItem2);}
if(sItem3!=null){sXmlHttpRequest+='&sItem3='+escape(sItem3);}
if(sItem4!=null){sXmlHttpRequest+='&sItem4='+escape(sItem4);}
if(sItem5!=null){sXmlHttpRequest+='&sItem5='+escape(sItem5);}
if(sItem6!=null){sXmlHttpRequest+='&sItem6='+escape(sItem6);}
if(sItem7!=null){sXmlHttpRequest+='&sItem7='+escape(sItem7);}
if(sItem8!=null){sXmlHttpRequest+='&sItem8='+escape(sItem8);}
sXmlHttpRequest+='&time='+getTimeStamp();sXmlHttpRequest=sXmlHttpRequest.replace(new RegExp("\\+","g"),"%2B");oRequestQueue.push(sXmlHttpRequest);executeXmlHTTP();}
function encodeHtml(sValue){var encodedHtml=escape(sValue);encodedHtml=encodedHtml.replace(/\//g,"%2F");encodedHtml=encodedHtml.replace(/\?/g,"%3F");encodedHtml=encodedHtml.replace(/=/g,"%3D");encodedHtml=encodedHtml.replace(/&/g,"%26");encodedHtml=encodedHtml.replace(/@/g,"%40");encodedHtml=encodedHtml.replace(/@/g,"%40");encodedHtml=encodedHtml.replace(new RegExp("\\+","g"),"%2B");return encodedHtml;}
function getSelectedText()
{var sSelectedText='';if(window.getSelection)
{sSelectedText=window.getSelection();}
else if(document.getSelection)
{sSelectedText=document.getSelection();}
else if(document.selection)
{sSelectedText=document.selection.createRange().text;}
return sSelectedText;}
function checkForContext(e){if(!e)e=window.event;if(!e.target){e.target=e.srcElement;}
if(e.target.nodeName!="INPUT"&&e.target.nodeName!="TEXTAREA"&&e.target!=getHoverPanel()){return false;}
else{return true;}}
if(!Array.prototype.indexOf)
{Array.prototype.indexOf=function(x){for(var i=0;i<this.length;i++){if(this[i]==x)return i;}
return-1;}}
Array.prototype.find=function(x){for(var i=0;i<this.length;i++){if(this[i]==x)return this[i];}
return null;}
Array.prototype.exists=function(x){for(var i=0;i<this.length;i++){if(this[i]==x)return true;}
return false;}
Array.prototype.existsByID=function(x){for(var i=0;i<this.length;i++){if(this[i].ID==x.ID)return true;}
return false;}
Array.prototype.removeItem=function(x){for(var i=0;i<this.length;i++){if(this[i]===x)this.splice(i,1);}}
var m_oHoverTarget=null;var m_oHoverTimer=null;var m_oMonitorHover=function(event){monitorHoverValidity(event);};var PARAM_HOVER_DELAY=1500;var m_oHoverPanel=null;function getHoverPanel()
{if(!m_oHoverPanel){m_oHoverPanel=getElementById('hover_panel');}
return m_oHoverPanel;}
var m_oHoverArrow=null;function getHoverArrow()
{if(!m_oHoverArrow){m_oHoverArrow=getElementById('hover_arrow');}
return m_oHoverArrow;}
var m_oHoverContent=null;function getHoverContent()
{if(!m_oHoverContent){m_oHoverContent=getElementById('hover_content');}
return m_oHoverContent;}
function prepareHover(oTarget,sShowHoverAction,event)
{if(m_oHoverTarget==oTarget)
{return;}
if(m_bDraggingOn)
{return;}
removeHover();var fShowHoverCall=function(){fireHoverRequest(sShowHoverAction);};m_oHoverTimer=setTimeout(fShowHoverCall,PARAM_HOVER_DELAY);m_oHoverTarget=oTarget;document.onmousemove=m_oMonitorHover;document.onmouseout=m_oMonitorHover;getHoverPanel().onOffClick=m_oMonitorHover;oOffClick.subscribe(getHoverPanel());getHoverPanel().onAjaxCall=m_oMonitorHover;oOnAjaxCall.subscribe(getHoverPanel());}
function fireHoverRequest(sShowHoverAction)
{eval(sShowHoverAction);}
function monitorHoverValidity(event)
{if(!event)event=window.event;var mouseMovementEvent=(event.type=="mousemove"||event.type=="mouseout");if(mouseMovementEvent)
{if(eventOnObject(event,m_oHoverTarget))
{return;}}
var ajaxCall=(typeof(event)=="string");if(ajaxCall&&event.indexOf("ElementHover")>-1)
{return;}
if(!ajaxCall)
{if(eventOnObject(event,getHoverPanel())||eventOnObject(event,getHoverArrow()))
{return;}}
removeHover();}
function removeHover()
{cancelHoverDelay();hideHover();}
function cancelHoverDelay()
{clearTimeout(m_oHoverTimer);m_oHoverTarget=null;if(!m_bDraggingOn)
{document.onmousemove=null;document.onmouseout=null;}
oOffClick.unsubscribe(getHoverPanel());oOnAjaxCall.unsubscribe(getHoverPanel());}
function hideHover()
{var oPanelArrow=getElementById('hover_arrow');getHoverPanel().style.display="none";oPanelArrow.style.display="none";}
function receiveHoverContent(sID,sContent)
{if(m_oHoverTarget==null||m_oHoverTarget.id!=sID||m_oHoverTarget.offsetWidth==0)
{return;}
showHover(sContent);}
function showHover(sContent)
{var bStaticAppearance=false;var oPanel=getHoverPanel();var oPanelArrow=getHoverArrow();var oContent=getHoverContent();var hoverObjectX=getPageX(m_oHoverTarget);var hoverObjectY=getPageY(m_oHoverTarget);oContent.innerHTML=sContent;oPanel.style.width="auto";oPanel.style.visibility="hidden";oPanel.style.display="block";oPanelArrow.style.visibility="hidden";oPanelArrow.style.display="block";if(oPanel.offsetWidth<25){oPanel.style.width="25px";}
if(oPanel.offsetWidth/m_iOriginalWidth>.5){oPanel.style.width=Math.floor(m_iOriginalWidth/2)+"px";}
if(bStaticAppearance){moveToLocation(oPanel,(hoverObjectX+(m_oHoverTarget.offsetWidth/2)-(oPanel.offsetWidth/2)),hoverObjectY-oPanel.offsetHeight-3);}else{moveToLocation(oPanel,hoverObjectX,hoverObjectY+m_oHoverTarget.offsetHeight,(hoverObjectX-oPanel.offsetWidth+25),hoverObjectY-oPanel.offsetHeight);}
var iWinHeight=document.body.clientHeight+document.body.scrollTop;var oPanelArrowUp=getElementById('hover_arrow_up');var oPanelArrowDown=getElementById('hover_arrow_down');iOffset=0;if(m_bIsFF){iOffset=3;}
if(getPageY(oPanel)+oPanel.offsetHeight<hoverObjectY+m_oHoverTarget.offsetHeight){hide(oPanelArrowUp);show(oPanelArrowDown);moveToLocation(oPanelArrow,getPageX(oPanel)+(Math.ceil(oPanel.offsetWidth/2)-Math.ceil(oPanelArrowDown.offsetWidth/2))+iOffset,getPageY(oPanel)+oPanel.offsetHeight-15);}else{show(oPanelArrowUp);hide(oPanelArrowDown);moveToLocation(oPanelArrow,hoverObjectX,getPageY(oPanel)-15);}
oPanelArrow.style.visibility="visible";if(!bStaticAppearance){oPanel.whenDone="oItem.style.height='auto';";startDropDown(oPanel.id);}else{oPanel.style.height='auto';oPanel.style.visibility="visible";}}
var m_iMouseXPosition=null;var m_iMouseYPosition=null;function setMouseXY(event){if(!event){event=window.event;}
var IE=document.all?true:false;if(IE){m_iMouseXPosition=event.clientX+oHTML.scrollLeft;m_iMouseYPosition=event.clientY+oHTML.scrollTop;}else{if(event){m_iMouseXPosition=event.pageX;m_iMouseYPosition=event.pageY;}}}
function switchStatus(m,oFrom){m=(m)?m:"default";document.body.style.cursor=m;}
function isVisible(oObj){if(typeof(oObj)=="string"){oObj=document.getElementById(oObj);}
var oDisplay="";if(oObj!=null){oDisplay=oObj.style.display;if(oDisplay==""){oDisplay=getActualStyle(oObj,"display");}}
if(oObj==null||oDisplay=='none'){return false;}else{return true;}}
function cancelEvent(event){if(!event){event=window.event;}
event.returnValue=false;if(event.cancelBubble){event.cancelBubble=true;}
if(event.stopPropagation){event.stopPropagation();}
if(event.preventDefault){event.preventDefault();}
if(window.event){window.event.cancelBubble=true;}
return false;}
function moveBelowAnchor(oObject,oAnchor){var parentOffsetTop=0;var parentOffsetLeft=0;var altY;if(oObject.className=="dateTimePanel")
{parentOffsetTop=oObject.parentNode.offsetTop;if(oObject.offsetParent.className=="verticalHolder")
{parentOffsetTop+=oAnchor.offsetHeight;}
altY=getPageY(oAnchor)-parentOffsetTop;parentOffsetLeft=oObject.parentNode.offsetLeft+(oObject.offsetWidth-oAnchor.offsetWidth);}
else
{altY=getPageY(oAnchor);}
moveToLocation(oObject,getPageX(oAnchor)-parentOffsetLeft,getPageY(oAnchor)+oAnchor.offsetHeight-parentOffsetTop,getPageX(oAnchor)-oAnchor.offsetWidth,altY);}
function moveToAnchor(oObject,oAnchor){moveToLocation(oObject,getPageX(oAnchor)+oAnchor.offsetWidth,getPageY(oAnchor),getPageX(oAnchor)-oAnchor.offsetWidth,getPageY(oAnchor)-oAnchor.offsetHeight);}
function moveToLocation(oObject,x,y,altX,altY){var iWinHeight=document.documentElement.clientHeight+oHTML.scrollTop;var iWinWidth=document.documentElement.clientWidth+oHTML.scrollLeft;if((x+oObject.offsetWidth)>iWinWidth){x=(altX)?altX:(x-oObject.offsetWidth>0?x-oObject.offsetWidth:x);if((x+oObject.offsetWidth)>iWinWidth){var iDiff=(x+oObject.offsetWidth)-iWinWidth;x-=iDiff;}}
if(oObject.className=="dateTimePanel")
{var positionTest=y+oObject.offsetHeight+oObject.parentNode.offsetTop;if(positionTest>iWinHeight)
{if(oObject.parentNode.className=="verticalHolder")
{oObject.style.bottom="0px";}
else
{oObject.style.top=altY-(getHeight(oObject))+"px";}}
else
{oObject.style.top=y+"px";}}
else
{if((y+oObject.offsetHeight)>iWinHeight){y=(altY)?altY:(y-oObject.offsetHeight>0?y-oObject.offsetHeight:y);if((y+oObject.offsetHeight)>iWinHeight){var iDiff=(y+oObject.offsetHeight)-iWinHeight;y-=iDiff;}}
oObject.style.top=y+"px";}
oObject.style.left=x+"px";}
function clickNavigationMenu(sMenuID,x,y,oButton){if(oButton!=null){buttonMouseOver(oButton);}
var oPopup=document.getElementById('popupmenu');if(oPopup.openTimer!=null){clearTimeout(oPopup.openTimer);}
showPopupMenu(sMenuID,x,y,oButton);}
function showNavigationMenu(sMenuID,x,y,oButton){if(oButton!=null){if(oButton.mouseoutOLD==null){oButton.onmouseout=function(event){if(!event)event=window.event;var oRelatedTarget=event.relatedTarget;if(!oRelatedTarget){oRelatedTarget=event.toElement;}
if(!isChild(oButton,oRelatedTarget)){buttonMouseOut(oButton);if(oPopup.openTimer!=null){clearTimeout(oPopup.openTimer);}}};buttonMouseOver(oButton);}}
var oPopup=document.getElementById('popupmenu');if(oPopup.style.visibility=="visible"){if(oPopup.destroyFunctionTimer!=null){clearTimeout(oPopup.destroyFunctionTimer);}
showPopupMenu(sMenuID,x,y,oButton);}else{if(oPopup.openTimer!=null){clearTimeout(oPopup.openTimer);}
oPopup.openTimer=setTimeout(function(){showPopupMenu(sMenuID,x,y,oButton);},500);}}
function showDropDownMenu(sMenuID,oButton,oArrow){oArrow.onmouseout=function(){};buttonMouseDown(oArrow);showPopupMenu(sMenuID,getPageX(oButton)+1,getPageY(oButton)+oButton.offsetHeight,oArrow);}
function showPopupMenu(sMenuID,x,y,oButton){var oPopup=document.getElementById('popupmenu');if(oButton!=null){if(oPopup.activeButton==oButton){return true;}}
if(oPopup.collapseFunction!=null){oPopup.collapseFunction();}
if(oPopup.destroyFunctionTimer!=null){clearTimeout(oPopup.destroyFunctionTimer);}
var oMenu=document.getElementById(sMenuID);if(oMenu!=null&&!isChild(oPopup,oMenu)){oPopup.appendChild(oMenu);}
if(oButton!=null){oPopup.activeButton=oButton;}
if(oMenu!=null){oMenu.style.position="absolute";oMenu.style.display="block";oMenu.style.width="auto";if(m_bIsIE6){var iMenuHeight=oMenu.offsetHeight;oMenu.style.width="50px";while(oMenu.offsetHeight>iMenuHeight){oMenu.style.width=(parseInt(oMenu.offsetWidth)+10)+"px";}}
oMenu.style.width=(oMenu.offsetWidth+10)+"px";if(oButton!=null&&oMenu.offsetWidth<oButton.offsetWidth){oMenu.style.width=oButton.offsetWidth+"px";}
moveToLocation(oMenu,parseInt(x),parseInt(y));oMenu.style.visibility="visible";oMenu.style.overflow="hidden";oMenu.whenDone="oItem.style.height='';oItem.style.overflow='';";startDropDown(oMenu.id);oPopup.collapseFunction=function(){hideAllSub(sMenuID);oMenu.onmouseout=null;clearTimeout(oPopup.destroyFunctionTimer);oPopup.destroyFunctionTimer=null;if(oPopup.activeButton!=null){buttonResetClass(oPopup.activeButton);if(oPopup.activeButton.mouseoutOLD!=null){oPopup.activeButton.onmouseout=oPopup.activeButton.mouseoutOLD;oPopup.activeButton.mouseoutOLD=null;}
oPopup.activeButton=null;}
oPopup.style.height="100%";oPopup.collapseFunction=null;oPopup.onmousedown=null;};oMenu.onmouseout=function(){oPopup.destroyFunctionTimer=setTimeout(oPopup.collapseFunction,2000);};oMenu.onmouseover=function(){clearTimeout(oPopup.destroyFunctionTimer);};if(oButton!=null){if(oButton.mouseoutOLD==null){oButton.mouseoutOLD=oButton.onmouseout;}
oButton.onmouseout=function(event){if(!event)event=window.event;var oRelatedTarget=event.relatedTarget;if(!oRelatedTarget){oRelatedTarget=event.toElement;}
if(!isChild(oButton,oRelatedTarget)){if(oPopup.destroyFunctionTimer==null){oPopup.destroyFunctionTimer=setTimeout(oPopup.collapseFunction,2000);}
oButton.onmouseout=oButton.mouseoutOLD;oButton.mouseoutOLD=null;}};}
oPopup.onOffClick=function(event){oPopup.collapseFunction();}
oPopup.onmousedown=function(e){if(!e)e=window.event;if(!e.target){e.target=e.srcElement;}
if(e.target==this){oPopup.collapseFunction();}};oPopup.destroyFunctionTimer=setTimeout(oPopup.collapseFunction,6000);oOffClick.subscribe(oPopup);document.onkeypress=function(e){handleKeyPress(e,sMenuID);};oPopup.style.visibility="visible";if(oButton!=null){oPopup.style.height="auto";}}}
function collapsePopupMenu(){var oPopup=document.getElementById('popupmenu');if(oPopup!=null){oPopup.collapseFunction();}}
function hideAllSub(sMenuID){hideSub(sMenuID);var oPopup=document.getElementById('popupmenu');oPopup.style.visibility="hidden";document.onkeypress=null;oPopup.onOffClick=null;oOffClick.unsubscribe(oPopup);}
function showPanel(sID,x,y){var oMenu=document.getElementById(sID);oMenu.style.position="absolute";oMenu.style.display="block";moveToLocation(oMenu,oHTML.scrollLeft+parseInt(x),oHTML.scrollTop+parseInt(y));oMenu.myOn=true;oMenu.onOffClick=function(event){hidePanel(sID,event);cancelEvent(event);};}
function hidePanel(sID){var oMenu=document.getElementById(sID);oMenu.myOn=false;oMenu.style.display='none';document.onkeypress=null;oMenu.onOffClick=null;oOffClick.subscribe(oMenu);}
function showSub(oParentLink,sSubID,event){var oSub=document.getElementById(sSubID);if(oSub!=null){if(oSub.activeLink){var oDeeperLink=document.getElementById(oSub.activeLink);hideSub(oDeeperLink.subMenu);oSub.activeLink=null;}
oSub.style.display="block";oSub.style.width="auto";if(m_bIsIE6){var iSubHeight=oSub.offsetHeight;oSub.style.width="50px";while(oSub.offsetHeight>iSubHeight){oSub.style.width=(parseInt(oSub.offsetWidth)+10)+"px";}}
oSub.style.width=(oSub.offsetWidth+10)+"px";var oPopup=document.getElementById('popupmenu');if(!isChild(oPopup,oSub)){oPopup.appendChild(oSub);}
if(oSub.offsetWidth<oParentLink.offsetWidth){oSub.style.width=oParentLink.offsetWidth+"px";}
moveToAnchor(oSub,oParentLink);oSub.style.visibility="visible";oParentLink.parentNode.parentNode.activeLink=oParentLink.id;oParentLink.subMenu=sSubID;oParentLink.onmouseout=function(){};buttonMouseOver(oParentLink);oSub.parentLink=oParentLink;oSub.onmouseout=function(){if(oPopup.collapseFunction!=null){oPopup.destroyFunctionTimer=setTimeout(oPopup.collapseFunction,2000);}};oSub.onmouseover=function(){clearTimeout(oPopup.destroyFunctionTimer);};}}
function hideSub(sMenuID){var oSub=document.getElementById(sMenuID);if(oSub!=null){if(oSub.parentLink!=null){oSub.parentLink.onmouseout=null;buttonResetClass(oSub.parentLink);}
if(oSub.activeLink!=null){var oDeeperLink=document.getElementById(oSub.activeLink);if(oDeeperLink!=null){hideSub(oDeeperLink.subMenu);}
oSub.activeLink=null;}
oSub.style.visibility="hidden";oSub.style.display="none";}}
function clearSub(oMousedOverHolder,event){if(!event){event=window.event;}
if(!event.target){event.target=event.srcElement;}
oMousedOverHolder=oMousedOverHolder.parentNode.parentNode;if(oMousedOverHolder.activeLink!=null&&oMousedOverHolder.activeLink!="null"){var oTarget=event.target;while(oTarget.nodeName!="A"){oTarget=oTarget.parentNode;}
if(oTarget.id!=oMousedOverHolder.activeLink){var oPreviousLink=document.getElementById(oMousedOverHolder.activeLink);hideSub(oPreviousLink.subMenu);oMousedOverHolder.activeLink=null;}}}
function handleKeyPress(e,sMenuID){var kC=(window.event)?event.keyCode:e.keyCode;var Esc=(window.event)?27:e.DOM_VK_ESCAPE;if(kC==Esc){hideSub(sMenuID);document.onkeypress=null;}}
function getTimeStamp(){var now1=new Date();return now1.getTime();}
var m_debugMode=false;var m_startTime=0;function setDebugMode(bDebug)
{m_debugMode=false;}
function setStartTime(value)
{if(m_startTime==0)
{m_startTime=value;}}
function debugMessage(message)
{if(m_debugMode)
{log(message);}}
function handleException(sData,exception,iAjaxLoop)
{if(typeof exception=='string')
exception=new Error(exception)
if(exception.name=='NS_ERROR_NOT_AVAILABLE')return;var fullMessage;var uri=''
var stack=''
var line=''
try
{fullMessage='Error at line '+iAjaxLoop+':'+exception.name+': '+exception.message
uri=exception.fileName
stack=exception.stack
line=exception.lineNumber}
catch(e)
{}
fullMessage+="\n at "+uri+": "+line+"\n"+stack+"\n\n"+sData;jsError(fullMessage,true,iAjaxLoop);}
function handleWindowOnError(err,file,line){alert('The following error occured!: '+err+'\n'+'In file: '+file+'\n'+'At line: '+line);return true;}
function showErrorPanel(){var oJSPanel=document.getElementById('javascriptErrorPanel');oJSPanel.style.display="block";}
function hideErrorPanel(){var oJSPanel=document.getElementById('javascriptErrorPanel');oJSPanel.style.display="none";oJSPanel.innerHTML="none";var oErrorIcon=document.getElementById('error_icon');oErrorIcon.style.display="none";}
function jsError(sString,bParse,sLine){var oJSPanel=document.getElementById('javascriptErrorPanel');if(bParse){sString=replaceAll(sString,"<","&#60;");sString=replaceAll(sString,">","&#62;");sString=sString.replace("iAjaxLoop="+sLine,"<hr/><span style='color: red;'>Line "+sLine+"</span>");sString=replaceAll(sString,"iAjaxLoop=","<hr/><span style='color: blue;'>Line </span>");}
oJSPanel.innerHTML=sString;var oErrorIcon=document.getElementById('error_icon');oErrorIcon.style.display="block";}
function replaceAll(sString,from,to){var iIndex=sString.indexOf(from);while(iIndex>-1){sString=sString.replace(from,to);iIndex=sString.indexOf(from);}
return sString;}
function getEventData(event){if(typeof(event)!='undefined'&&event!=null){var sReturn="EventType="+event.type;if(typeof(event.ctrlKey)!='undefined'){sReturn=sReturn+"&ControlKey="+event.ctrlKey;}
if(typeof(event.altKey)!='undefined'){sReturn=sReturn+"&AltKey="+event.altKey;}
if(typeof(event.shiftKey)!='undefined'){sReturn=sReturn+"&ShiftKey="+event.shiftKey;}
if((typeof(event.clientX)!='undefined')&&(event.clientX!=null)){sReturn=sReturn+"&ClientX="+event.clientX;}
if((typeof(event.clientY)!='undefined')&&(event.clientY!=null)){sReturn=sReturn+"&ClientY="+event.clientY;}
if((typeof(event.button)!='undefined')&&(event.button!=null)){var sButton="0";if(event.button=="2"||(event.type=='contextmenu'&&event.button=="0")){sButton="2";}
sReturn=sReturn+"&Button="+sButton;}
if(window.event){if((typeof(event.keyCode)!='undefined')&&(event.keyCode!=null)){sReturn=sReturn+"&KeyCode="+String.fromCharCode(event.keyCode);}}else{sReturn=sReturn+"&KeyCode="+String.fromCharCode(event.which);}
return sReturn;}
else
{return m_sEventData;}}
function getWidth(oObj){var iWidth=0;if(oObj!=null){iWidth=oObj.offsetWidth+getCSSPropertyWidths(oObj);}
return iWidth;}
function getCSSPropertyWidths(oObj)
{if(oObj!=null){var iWidth=0;var oStyles=getActualStyle(oObj,["border-left-width","border-right-width","margin-left","margin-right","padding-left","padding-right"]);var oBorderLeftWidth=oStyles["border-left-width"];if(!isNaN(parseInt(oBorderLeftWidth))){iWidth+=parseInt(oBorderLeftWidth);}
var oBorderRightWidth=oStyles["border-right-width"];if(!isNaN(parseInt(oBorderRightWidth))){iWidth+=parseInt(oBorderRightWidth);}
var oMarginLeft=oStyles["margin-left"];if(!isNaN(parseInt(oMarginLeft))){iWidth+=parseInt(oMarginLeft);}
var oMarginRight=oStyles["margin-right"];if(!isNaN(parseInt(oMarginRight))){}
var oPaddingLeft=oStyles["padding-left"];if(!isNaN(parseInt(oPaddingLeft))){iWidth+=parseInt(parseInt(oPaddingLeft));}
var oPaddingRight=oStyles["padding-right"];if(!isNaN(parseInt(oPaddingRight))){iWidth+=parseInt(oPaddingRight);}}
return iWidth;}
function getHeight(oObj){var iHeight=0;if(oObj!=null)
{iHeight=oObj.offsetHeight-getCSSPropertyHeights(oObj);}
return iHeight;}
function getCSSPropertyHeights(oObj)
{var iHeight=0;if(oObj!=null){var oStyles=getActualStyle(oObj,["border-top-width","border-bottom-width","margin-top","margin-bottom","padding-top","padding-bottom"]);var oBorderTopWidth=oStyles['border-top-width'];if(!isNaN(parseInt(oBorderTopWidth))){iHeight+=parseInt(oBorderTopWidth);}
var oBorderBottomWidth=oStyles['border-bottom-width'];if(!isNaN(parseInt(oBorderBottomWidth))){iHeight+=parseInt(oBorderBottomWidth);}
var oMarginTop=oStyles['margin-top'];if(!isNaN(parseInt(oMarginTop))){iHeight+=parseInt(oMarginTop);}
var oMarginBottom=oStyles['margin-bottom'];if(!isNaN(parseInt(oMarginBottom))){iHeight+=parseInt(oMarginBottom);}
var oPaddingTop=oStyles['padding-top'];if(!isNaN(parseInt(oPaddingTop))){iHeight+=parseInt(oPaddingTop);}
var oPaddingBottom=oStyles['padding-bottom'];if(!isNaN(parseInt(oPaddingBottom))){iHeight+=parseInt(oPaddingBottom);}}
return iHeight;}
function getPageX(o,oObjecttoStopAt){var oOriginal=o;if(oOriginal.getBoundingClientRect){return oOriginal.getBoundingClientRect().left-2;}
var x=0;var iBorders=0;var iScroll=0;while(eval(o)&&o!=null&&o!=oObjecttoStopAt){if(o.scrollLeft!=null&&o.scrollLeft>0){iScroll+=o.scrollLeft;}
var oLeftWidth=parseInt(getActualStyle(o,'border-left-width'));if(!isNaN(oLeftWidth)&&oOriginal!=o){iBorders+=oLeftWidth;}
x+=o.offsetLeft;o=o.offsetParent;}
if(o!=null&&o==oObjecttoStopAt){return(x+iBorders+o.scrollLeft);}
else return(x+iBorders-iScroll);}
function getPageY(o,oObjecttoStopAt){var oOriginal=o;if(oOriginal.getBoundingClientRect){return oOriginal.getBoundingClientRect().top-2;}
var y=0;var iBorders=0;var iScroll=0;while(eval(o)&&o!=null&&o!=oObjecttoStopAt){if(o.scrollTop!=null&&o.scrollTop>0){iScroll+=o.scrollTop;}
if(oOriginal!=o){var oTopWidth=parseInt(getActualStyle(o,'border-top-width'));if(!isNaN(oTopWidth)){iBorders+=oTopWidth;}}
y+=o.offsetTop;o=o.offsetParent;}
if(o!=null&&o==oObjecttoStopAt){return(y+iBorders+o.scrollTop);}
else{return(y+iBorders-iScroll);}}
function isChild(oParent,oChild){var bReturn=false;var oObj=oChild;while(oObj!=null&&oParent!=null){if(oObj==oParent){bReturn=true;break;}
try{oObj=oObj.parentNode;}catch(e){break;}}
return bReturn;}
function findAttribute(oObj,sAttribute){var oReturn=null;while(oObj!=null){if(oObj.getAttribute(sAttribute)!=null){oReturn=oObj;break;}
oObj=oObj.parentNode;}
return oReturn;}
function getInlineStyle(oObject,sStyle){return oObject.style[rzCC(sStyle)];}
function getActualStyle(oObject,sStyle){var oStyle=null;if(sStyle instanceof Array){oStyle={};}
if(oObject!=null){if(oObject.currentStyle){var oObjStyle=oObject.currentStyle;if(sStyle instanceof Array){for(var iLoop=0;iLoop<sStyle.length;iLoop++){oStyle[sStyle[iLoop]]=oObjStyle[rzCC(sStyle[iLoop])];if(oStyle[sStyle[iLoop]]=='undefined'||oStyle[sStyle[iLoop]]==''){oStyle[sStyle[iLoop]]=getInlineStyle(oObject,sStyle[iLoop]);}}}else{oStyle=oObjStyle[rzCC(sStyle)];if(oStyle=='undefined'||oStyle==''){oStyle=getInlineStyle(oObject,sStyle);}}}else if(window.getComputedStyle){var oObjStyle=GetComputedStyleObject(oObject);if(sStyle instanceof Array){for(var iLoop=0;iLoop<sStyle.length;iLoop++){oStyle[sStyle[iLoop]]=GetStyleValue(oObjStyle,sStyle[iLoop]);if(oStyle[sStyle[iLoop]]=='undefined'||oStyle[sStyle[iLoop]]==''){oStyle[sStyle[iLoop]]=getInlineStyle(oObject,sStyle[iLoop]);}}}else{oStyle=GetStyleValue(oObjStyle,sStyle);if(oStyle=='undefined'||oStyle==''){oStyle=getInlineStyle(oObject,sStyle);}}}}
return oStyle;}
function GetComputedStyleObject(oObject){return document.defaultView.getComputedStyle(oObject,null);}
function GetStyleValue(oObjStyle,sValue){return oObjStyle.getPropertyValue(sValue);}
var m_CamelCache=new Array();function rzCC(s){if(m_CamelCache[sLookup]){return m_CamelCache[sLookup];}
var sLookup=s;for(var exp=/-([a-z])/;exp.test(s);s=s.replace(exp,RegExp.$1.toUpperCase()));m_CamelCache[sLookup]=s;return s;}
function resizeTo(sFrom,sTo){var oFrom=document.getElementById(sFrom);var oTo=document.getElementById(sTo);oFrom.style.width=oTo.offsetWidth+'px';oFrom.style.height=oTo.offsetHeight+'px';}
var m_bDoubleClick=false;var m_sFunction=null;var m_sEventData="";var dcTime=200;var dcDelay=2;var dcAt=0;var savEvent=null;var savEvtTime=0;var m_savTO=null;function hadDoubleClick(){var d=new Date();var now=d.getTime();if((now-dcAt)<dcDelay){return true;}
return false;}
function handleClick(event,sFunction){m_sEventData=getEventData(event);m_sFunction=sFunction;switch(event.type){case"click":case"mouseup":case"mousedown":case"contextmenu":if(hadDoubleClick())return false;savEvent=event;d=new Date();savEvtTime=d.getTime();m_savTO=setTimeout("doClick(savEvent)",dcTime);break;case"dblclick":doDoubleClick(event);break;default:}}
function doClick(event){m_savTO=null;if(savEvtTime-dcAt<=0){return false;}
if(!isChild(oHTML,event.target)){return false;}
m_bDoubleClick=false;eval(m_sFunction);}
function doDoubleClick(event){var d=new Date();dcAt=d.getTime();if(m_savTO!=null){clearTimeout(m_savTO);m_savTO=null;}
m_bDoubleClick=true;clearSelection();eval(m_sFunction);}
function log(sMsg,sColour){var oLoggingMessage=document.getElementById('loggingMessage');oLoggingMessage.innerHTML="<div style='COLOR: "+sColour+";'>"+sMsg+"</div>"+oLoggingMessage.innerHTML;oLoggingMessage.style.display="block";}
function openLog(){var oLoggingMessage=document.getElementById('loggingMessage');oLoggingMessage.style.height="200px";oLoggingMessage.style.backgroundColor="#FFF";oLoggingMessage.ondblclick=function(){this.style.height="15px";};oLoggingMessage.oncontextmenu=function(){this.innerHTML='Cleared.';};}
function printContent(sDiv){var oDivContent=document.getElementById(sDiv);var oIFrame=document.getElementById('printIFrame');var sContentHTML=oDivContent.innerHTML;frames["printIFrame"].document.open();frames["printIFrame"].document.write("<html><head><style>.pagebreak{page-break-before: always;}</style></head><body>");frames["printIFrame"].document.write(sContentHTML);frames["printIFrame"].document.write('</body></html>');frames["printIFrame"].document.close();oIFrame.style.display="block";frames["printIFrame"].focus();setTimeout('frames["printIFrame"].print();document.getElementById("printIFrame").style.display = "none";frames["printIFrame"].document.open();frames["printIFrame"].document.close();',10);}
function getElementById(sId){var oObject=document.getElementById(sId);return oObject;}
function buttonArrowMouseOver(oButton,e){buttonMouseOver(oButton);if(!e)e=window.event;return cancelEvent(event);}
function buttonMouseOver(oButton){if(typeof(oButton.originalClassName)=='undefined'){oButton.originalClassName=oButton.className;}
if(oButton.originalClassName.indexOf("_mouseover")==-1){oButton.className=oButton.originalClassName+"_mouseover";}
if(oButton.onmouseout==null){oButton.onmouseout=function(event){buttonMouseOut(oButton,event);};}}
function buttonMouseOut(oButton,e){if(!e)e=window.event;if(e){var oTargetElement=e.relatedTarget||e.toElement;if(oTargetElement==null||(oTargetElement.parentNode!=oButton&&oTargetElement!=oButton)){buttonResetClass(oButton);}}else{buttonResetClass(oButton);}}
function setButtonMouseDown(oButton){if(typeof(oButton.originalClassName)=='undefined'){oButton.originalClassName=oButton.className;}
if(oButton.className!=oButton.originalClassName+"_mousedown"){oButton.className=oButton.originalClassName+"_mousedown";}}
function buttonMouseDown(oButton){setButtonMouseDown(oButton);if((oButton.realOnmouseup==null&&oButton.onmouseup!=null)||oButton.realOnmouseup!=oButton.onmouseup){oButton.realOnmouseup=oButton.onmouseup;}
oButton.onmouseup=function(){buttonResetClass(oButton);getWaitPanel().onmouseup=null;oButton.onmouseup=null;};getWaitPanel().onmouseup=function(){oButton.onmouseup();};oButton.onmouseout=function(){if(oButton.realOnmouseup!=null)
{oButton.onmouseup=oButton.realOnmouseup;oButton.realOnmouseup=null;}
buttonResetClass(oButton);oButton.onmouseout=null;};}
function buttonResetClass(oButton){oButton.className=oButton.originalClassName;}
var oSteps;if(m_bIsFF){oSteps=[18,25,31,12,8,4,2];}else{oSteps=[1,2,3,4,5,6,7,8,9,10,9,8,7,6,5,4,3,2,1];}
function startDropDown(sItem){var iInterval=10;var oItem=getElementById(sItem);if(oDropTimer!=null){clearInterval(oDropTimer);oDropTimer=null;}
if(oItem!=null){oItem.style.height="auto";var iEndHeight=getHeight(oItem);oItem.style.height="0px";oItem.style.visibility="visible";oItem.oHeightArray=new Array();var tmpH=0;for(var i=0;i<oSteps.length;i++){tmpH+=iEndHeight*oSteps[i]*0.01;oItem.oHeightArray.push(tmpH);}
oItem.oHeightArray.push(iEndHeight);oItem.animationFrame=0;if(bRunning){setTimeout(function(){drop(oItem,iInterval);},100);}else{drop(oItem,iInterval);}}}
var oDropTimer=null;function drop(oItem,iInterval){if(oDropTimer==null){oDropTimer=setInterval(function(){drop(oItem,iInterval);},iInterval);}
bAnimatin=true;oItem.style.height=oItem.oHeightArray[oItem.animationFrame]+"px";oItem.scrollTop=oItem.scrollHeight;oItem.animationFrame++;if(oItem.oHeightArray.length==oItem.animationFrame){clearInterval(oDropTimer);oDropTimer=null;bAnimatin=false;if(oItem.whenDone!=null){eval(oItem.whenDone);oItem.whenDone=null;}}}
function startRaiseUp(sItem){var iInterval=10;var oItem=getElementById(sItem);if(oItem!=null){oItem.style.height="auto";var iStartHeight=getHeight(oItem);oItem.style.visibility="visible";oItem.oHeightArray=new Array();var tmpH=iStartHeight;for(var i=0;i<oSteps.length;i++){tmpH-=iStartHeight*oSteps[i]*0.01;oItem.oHeightArray.push(Math.floor(tmpH));}
oItem.oHeightArray.push(0);oItem.animationFrame=0;if(bRunning){setTimeout(function(){raise(oItem,iInterval);},100);}else{raise(oItem,iInterval);}}}
var oRaiseTimer=null;function raise(oItem,iInterval){if(oRaiseTimer==null){oRaiseTimer=setInterval(function(){raise(oItem,iInterval);},iInterval);}
bAnimatin=true;oItem.style.height=oItem.oHeightArray[oItem.animationFrame]+"px";oItem.scrollTop=oItem.scrollHeight;oItem.animationFrame++;if(oItem.oHeightArray.length==oItem.animationFrame){clearInterval(oRaiseTimer);oRaiseTimer=null;bAnimatin=false;if(oItem.whenDone!=null){eval(oItem.whenDone);oItem.whenDone=null;}}}
function moveToLocationOverTime(oItem,x,y){var iInterval=10;if(oItem!=null){if(x!=null){oItem.oLeftArray=new Array();var iStartPoint=oItem.offsetLeft;var iDestination=x;var iTravelPixels=iStartPoint-iDestination;var iTmpX=0;for(var i=0;i<oSteps.length-1;i++){iTmpX+=iTravelPixels*oSteps[i]*0.01;oItem.oLeftArray.push(iStartPoint-iTmpX);}
oItem.oLeftArray.push(x);}
if(y!=null){oItem.oTopArray=new Array();var iStartPoint=oItem.offsetTop;var iDestination=y;var iTravelPixels=iStartPoint-iDestination;var iTmpY=0;for(var i=0;i<oSteps.length-1;i++){iTmpY+=iTravelPixels*oSteps[i]*0.01;oItem.oTopArray.push(iStartPoint-iTmpY);}
oItem.oTopArray.push(y);}
oItem.animationFrame=0;moveOverTime(oItem,iInterval);}}
function moveOverTime(oItem,iInterval){if(oItem.oDropTimer==null){oItem.oDropTimer=setInterval(function(){moveOverTime(oItem,iInterval);},iInterval);}
if(oItem.oLeftArray!=null){oItem.style.left=oItem.oLeftArray[oItem.animationFrame]+"px";}
if(oItem.oTopArray!=null){oItem.style.top=oItem.oTopArray[oItem.animationFrame]+"px";}
oItem.animationFrame++;if((oItem.oLeftArray!=null&&oItem.oLeftArray.length==oItem.animationFrame)||(oItem.oTopArray!=null&&oItem.oTopArray.length==oItem.animationFrame)){clearInterval(oItem.oDropTimer);oItem.oDropTimer=null;if(oItem.whenDone!=null){eval(oItem.whenDone);oItem.whenDone=null;}}}
var bAnimatin=false;var oAnimationPause=null;function startGrow(oItem,oSource,oDestination,iInterval){if(typeof(oItem)=="string"){oItem=getElementById(oItem);}
if(typeof(oSource)=="string"){oSource=getElementById(oSource);}
if(typeof(oDestination)=="string"){oDestination=getElementById(oDestination);}
if(iInterval==null){iInterval=1;}
if(oSource!=null){oItem.sourceWidth=oSource.offsetWidth;oItem.sourceHeight=oSource.offsetHeight;oItem.sourceX=getPageX(oSource);oItem.sourceY=getPageY(oSource);}else{oItem.sourceWidth=10;oItem.sourceHeight=10;oItem.sourceX=(m_iOriginalWidth/2);oItem.sourceY=(m_iOriginalHeight/2);}
if(oDestination==null){oDestination=oItem;oItem.destinationWidth=oDestination.offsetWidth;oItem.destinationHeight=oDestination.offsetHeight;oItem.destinationX=getPageX(oDestination);oItem.destinationY=getPageY(oDestination);}else{if(!isVisible(oDestination)){oDestination=oItem;}
oItem.destinationWidth=10;oItem.destinationHeight=10;oItem.destinationX=getPageX(oDestination)+(oDestination.offsetWidth/2);oItem.destinationY=getPageY(oDestination);}
oItem.oWidthArray=new Array();oItem.oHeightArray=new Array();oItem.oLeftArray=new Array();oItem.oTopArray=new Array();var iWidthDiff=(oItem.destinationWidth-oItem.sourceWidth);var iHeightDiff=(oItem.destinationHeight-oItem.sourceHeight);var iLeftDiff=(oItem.destinationX-oItem.sourceX);var iTopDiff=(oItem.destinationY-oItem.sourceY);var tmpH=0;var tmpW=0;var tmpY=0;var tmpX=0;for(var i=0;i<oSteps.length;i++){tmpH+=iHeightDiff*oSteps[i]*0.01;tmpW+=iWidthDiff*oSteps[i]*0.01;tmpY+=iTopDiff*oSteps[i]*0.01;tmpX+=iLeftDiff*oSteps[i]*0.01;oItem.oHeightArray.push(Math.floor(oItem.sourceHeight+tmpH)+"px");oItem.oWidthArray.push(Math.floor(oItem.sourceWidth+tmpW)+"px");oItem.oTopArray.push(Math.floor(oItem.sourceY+tmpY)+"px");oItem.oLeftArray.push(Math.floor(oItem.sourceX+tmpX)+"px");}
oItem.animationFrame=0;grow(oItem,iInterval);var oDisplayPanelTimer=null;oItem.style.width=oItem.sourceWidth+"px";oItem.style.height=oItem.sourceHeight+"px";oItem.style.left=oItem.sourceX+"px";oItem.style.top=oItem.sourceY+"px";}
function grow(oItem,iInterval){bAnimatin=true;if(oItem.oHeightArray.length>oItem.animationFrame){oItem.style.height=oItem.oHeightArray[oItem.animationFrame];oItem.style.width=oItem.oWidthArray[oItem.animationFrame];oItem.style.top=oItem.oTopArray[oItem.animationFrame];oItem.style.left=oItem.oLeftArray[oItem.animationFrame];}
oItem.animationFrame++;if(oItem.oTopArray.length==oItem.animationFrame){if(oItem.whenDone!=null){eval(oItem.whenDone);oItem.whenDone=null;bAnimatin=false;onerror=null;}}else{setTimeout(function(){grow(oItem,iInterval);},iInterval);}}
function toggleLabel(oObj,visible)
{var oObjChildren=getChildren(oObj);if(visible=="True")
{oObj.style.display="none";for(var i=0;i<oObjChildren.length;i++)
{oObjChildren[i].style.display="none";}}
else
{oObj.style.display="block";for(var i=0;i<oObjChildren.length;i++)
{oObjChildren[i].style.display="block";}}}
function toggleShow(oObj){if(isVisible(oObj)){hide(oObj);}else{show(oObj);}}
function hide(oObj){oObj=getObj(oObj);if(oObj!=null){oObj.style.display="none";}}
function show(oObj){oObj=getObj(oObj);if(oObj!=null){oObj.style.display="block";}}
function showInlineBlock(oObj){oObj=getObj(oObj);if(oObj!=null){oObj.style.display="inline-block";}}
function clearDisplay(oObj){oObj=getObj(oObj);if(oObj!=null){oObj.style.display="";}}
function visible(oObj){oObj=getObj(oObj);oObj.style.visibility="visible";}
function hidden(oObj){oObj=getObj(oObj);oObj.style.visibility="hidden";}
function setContent(oObj,sContent){oObj.innerHTML=sContent;}
function clearContent(oObj){oObj.innerHTML="";}
function setInputValue(oObjID,sValue){getElementById(oObjID).value=sValue;}
function setInputClean(oObjID){var oInput=getElementById(oObjID);oInput.dirty=null;}
function destroy(oObjID){var oObj=getElementById(oObjID);if(oObj!=null){destroyObj(oObj);}}
function destroyObj(oObj){oObj.parentNode.removeChild(oObj);oObj=null;}
function changeID(sOld,sNew){var oObj=document.getElementById(sOld);if(oObj!=null){oObj.id=sNew;}}
function addOrReplace(oObj,sContent,sID){var oID=document.getElementById(sID);if(oID!=null){oObj.removeChild(oID);}
oObj.innerHTML+=sContent;}
function getObj(oObj)
{if(typeof(oObj)=="string"){oObj=getElementById(oObj);}
return oObj;}
function replaceContent(oObj,sContent){oObj=getObj(oObj);if(oObj!=null){var oNewObj=oObj.cloneNode(false);oNewObj.innerHTML=sContent;oObj.parentNode.replaceChild(oNewObj,oObj);oObj=null;}}
function replaceObj(oObj,sContent){oObj=getObj(oObj);if(oObj!=null){var oParentNode=oObj.parentNode;var oDiv=document.createElement("DIV");oDiv.innerHTML=sContent;var firstChild=getChildren(oDiv)[0];oParentNode.replaceChild(firstChild,oObj);oDiv=null;oObj=null;}}
function replaceObjWithObj(oOldObj,oNewObj){if(oOldObj!=null){var oParentNode=oOldObj.parentNode;oParentNode.replaceChild(oNewObj,oOldObj);oOldObj=null;}}
function appendOrReplaceHTML(oObj,sHTML,sID)
{oObj=getObj(oObj);var oID=document.getElementById(sID);if(oID!=null){oObj.removeChild(oID);}
appendHTML(oObj,sHTML);}
function appendHTML(oObj,sHTML){var oDiv=document.createElement("DIV");oDiv.innerHTML=sHTML;oObj.appendChild(oDiv.childNodes[0]);oDiv=null;}
function removeHTML(oObj,sNode,sID)
{if(sNode!=null)
{oObj.removeChild(sNode);}}
function prefixHTML(oObj,sHTML){var oDiv=document.createElement("DIV");oDiv.innerHTML=sHTML;oObj.insertBefore(oDiv.childNodes[0],oObj.childNodes[0]);oDiv=null;}
function isImage(oObj){if(oObj.nodeName=="SPAN"&&oObj.className!=null&&oObj.className.indexOf('ImageSprite')>-1){return true;}else{return false;}}
function checkForResize(e){if(!e){e=window.event};if(!e.target){e.target=e.srcElement;}
oObj=e.target;setMouseXY(e);}
var m_bDraggingOn=false;function startDrag(e){if(!e){e=window.event;}
if(e.button&&e.button!=1){return false;}
if(!e.target){e.target=e.srcElement;}
var oObj=e.target;while(oObj.DragObject==null){oObj=oObj.parentNode;}
if(document.captureEvents){e.preventDefault();document.captureEvents(Event.MOUSEMOVE);document.captureEvents(Event.MOUSEUP);}
setMouseXY(e);oObj.DragObject.startMouseX=m_iMouseXPosition;oObj.DragObject.startMouseY=m_iMouseYPosition;oObj.DragObject.startDivX=parseInt(oObj.DragObject.offsetLeft);oObj.DragObject.startDivY=parseInt(oObj.DragObject.offsetTop);document.onmousemove=function(e){dragDiv(e,oObj.DragObject);};document.onselectstart=function(){return false;};document.onmouseover=function(){return false;};document.onmouseup=function(e){endDrag(e);if(CranManager.getWidget(oObj.DragObject.id).ajaxReturnXY!=null)
{CranManager.getWidget(oObj.DragObject.id).ajaxReturnXY(e);}};document.body.onmouseout=function(e)
{if(!e){e=window.event;}
if(e.clientX<0||e.clientY<0)
{try
{endDrag(e);if(CranManager.getWidget(oObj.DragObject.id).ajaxReturnXY!=null)
{CranManager.getWidget(oObj.DragObject.id).ajaxReturnXY(e);}}
catch(error)
{document.body.onmouseout=null;}}};m_bDraggingOn=true;}
function dragDiv(e,oObj){setMouseXY(e);var iLeft=(oObj.startDivX+m_iMouseXPosition-oObj.startMouseX);var iRight=(oObj.startDivX+m_iMouseXPosition-oObj.startMouseX)+oObj.offsetWidth;var iTop=(oObj.startDivY+m_iMouseYPosition-oObj.startMouseY);var iBottom=(oObj.startDivY+m_iMouseYPosition-oObj.startMouseY)+(oObj.offsetHeight-(oObj.offsetHeight*.9));var oDragWidget=CranManager.getWidget(oObj.id);oConstraintParent=getElementById(oDragWidget.PositionParent);if(oDragWidget.LeftConstrained||oDragWidget.RightConstrained){if(oDragWidget.LeftConstrained&&oDragWidget.RightConstrained){if(iLeft+(oObj.offsetWidth*.9)>=0&&(iLeft+(oObj.offsetWidth*.1))<oConstraintParent.offsetWidth){oObj.style.left=iLeft+"px";}}
else if(oDragWidget.LeftConstrained){if(iLeft+(oObj.offsetWidth*.9)>=0){oObj.style.left=iLeft+"px";}}
else{if((iLeft+(oObj.offsetWidth*.1))<oConstraintParent.offsetWidth){oObj.style.left=iLeft+"px";}}}
else{oObj.style.left=iLeft+"px";}
if(oDragWidget.TopConstrained||oDragWidget.BottomConstrained){if(oDragWidget.TopConstrained&&oDragWidget.BottomConstrained){if(iTop>=0&&iBottom<oConstraintParent.offsetHeight){oObj.style.top=iTop+"px";}}
else if(oDragWidget.TopConstrained){if(iTop>=0){oObj.style.top=iTop+"px";}}
else{if(iBottom<oConstraintParent.offsetHeight){oObj.style.top=iTop+"px";}}}
else{oObj.style.top=iTop+"px";}}
function endDrag(e,oObj,oBorder){document.onmousemove=null;document.onmouseup=null;document.onselectstart=null;document.body.onmouseout=null;if(document.releaseEvents){document.releaseEvents(Event.MOUSEMOVE);document.releaseEvents(Event.MOUSEUP);}
m_bDraggingOn=false;}
var POSITION_TOP="TOP",POSITION_MIDDLE="MIDDLE",POSITION_BOTTOM="BOTTOM";function scrollTo(oHolder,oTo,sPosition){oHolder=getObj(oHolder);oTo=getObj(oTo);if(isVisible(oHolder)&&isVisible(oTo)){var iHolderBottom=oHolder.offsetHeight+oHolder.scrollTop;var iToBottom=oTo.offsetTop+oTo.offsetHeight;if(iToBottom>iHolderBottom){var iDifference=iToBottom-iHolderBottom;if(sPosition==POSITION_MIDDLE){iDifference+=(oHolder.clientHeight/2);}
oHolder.scrollTop+=(iDifference);}
var iHolderTop=oHolder.scrollTop;var iToTop=oTo.offsetTop;if(iToTop<iHolderTop){var iDifference=iToTop-iHolderTop;oHolder.scrollTop+=(iDifference);}}}
function getByString(oElementArray,sString){for(var iLoop=0;iLoop<oElementArray.length;iLoop++){var sInnerHTML=oElementArray[iLoop].innerHTML;sInnerHTML=sInnerHTML.replace("&nbsp;"," ");if(sInnerHTML.substring(0,sString.length).toUpperCase()==sString.toUpperCase()){return oElementArray[iLoop];}}}
function fullScreen(oObj){oObj.style.width=document.documentElement.clientWidth+'px';oObj.style.height=(document.documentElement.clientHeight-23)+'px';}
function getStyle(){}
var m_oSelectedButtonAction=null;function buttonClick(oButton){m_oSelectedButtonAction=oButton.id;}
function getChildren(oObject){var oArray=new Array();for(var iLoop=0;iLoop<oObject.childNodes.length;iLoop++){if(oObject.childNodes[iLoop].nodeType==1){oArray.push(oObject.childNodes[iLoop]);}}
return oArray;}
function getPreviousSibling(oObject){do{oObject=oObject.previousSibling;if(oObject&&oObject.nodeType==1){return oObject;}}while(oObject);}
function getNextSibling(oObject){do{oObject=oObject.nextSibling;if(oObject&&oObject.nodeType==1){return oObject;}}while(oObject);}
var m_oUserDefined;function replaceUserDefinedStyleSheet(){if(m_oUserDefined==null){var oNodes=document.getElementsByTagName("head")[0].childNodes;for(var iLoop=0;iLoop<oNodes.length;iLoop++){if(oNodes[iLoop].title!=null&&oNodes[iLoop].title=="userDefined"){m_oUserDefined=oNodes[iLoop];}}}
var cssNode=document.createElement('link');cssNode.type='text/css';cssNode.rel='stylesheet';cssNode.href='StyleSheets/Enhanced/userDefined.aspx?'+m_sWindowParameter+'='+m_sWindowName+'&time='+getTimeStamp();cssNode.media='screen';cssNode.title='userDefined';replaceObjWithObj(m_oUserDefined,cssNode);m_oUserDefined=cssNode;}
function getMaximumChildWidth(aArrayOfChildren){var childNodes=aArrayOfChildren;var iMaxWidth=0;for(var i=0;i<childNodes.length;i++){var child=childNodes[i];if(getActualStyle(child,"position")!="absolute"){var childNodes2=getChildren(child);var iRecursiveWidth=0;if(childNodes2){iRecursiveWidth=getMaximumChildWidth(childNodes2);}
if(iRecursiveWidth>iMaxWidth){iMaxWidth=iRecursiveWidth;}
if(child.offsetWidth>iMaxWidth){iMaxWidth=child.scrollWidth;}}}
return iMaxWidth;}
function getMaximumChildHeight(aArrayOfChildren){var childNodes=aArrayOfChildren;var maxHeight=0;for(var i=0;i<childNodes.length;i++){var child=childNodes[i];var childNodes2=getChildren(child);var recursiveHeight=0;if(childNodes2){recursiveHeight=getMaximumChildHeight(childNodes2);}
if(recursiveHeight>maxHeight){maxHeight=recursiveHeight;}
if(child.offsetHeight>maxHeight){maxHeight=child.offsetHeight;}}
return maxHeight;}
function getTotalChildHeight(aArrayOfChildren){var childNodes=aArrayOfChildren;var totalHeight=0;for(var i=0;i<childNodes.length;i++){var child=childNodes[i];var childNodes2=getChildren(child);var iMaxHeight=getMaximumChildHeight(childNodes2);totalHeight+=iMaxHeight;}
return totalHeight;}
function getTotalChildWidth(aArrayOfChildren){var childNodes=aArrayOfChildren;var totalWidth=0;for(var i=0;i<childNodes.length;i++){var child=childNodes[i];var childNodes2=getChildren(child);var iMaxWidth=getMaximumChildWidth(childNodes2);totalWidth+=iMaxWidth;}
return totalWidth;}
function logChildNodeHeights(aArrayOfChildren){var childNodes=aArrayOfChildren;var totalHeight=0;for(var i=0;i<childNodes.length;i++){var child=childNodes[i];totalHeight+=parseInt(child.offsetHeight);var childNodes2=getChildren(child);if(childNodes2&&!child.style.height){logChildNodeHeights(childNodes2);}}
if(totalHeight>0){log("returning totalHeight: "+totalHeight);}}
function openNewWindow(sURL,sOptions){var oNewWindow=window.open(sURL,'',sOptions);if(!oNewWindow){oNewWindow=window.open('','',sOptions);if(oNewWindow){oNewWindow.location.href=sURL;}}}
function clearSelection(){var sel;try{if(document.selection&&document.selection.empty){document.selection.empty();}else if(window.getSelection){sel=window.getSelection();if(sel&&sel.removeAllRanges){sel.removeAllRanges();}}}catch(e){}}
var m_oTimers=new Array();var m_oTimerNames=new Array();function getTimerFromArray(sName){for(i=0;i<m_oTimerNames.length;i++){if(m_oTimerNames[i]==sName){return m_oTimers[i];}}
return null;}
function addTimerToArray(sName,oTimer){if(m_oTimerNames.exists(sName)){removeTimerFromArray(sName);}
m_oTimers.push(oTimer);m_oTimerNames.push(sName);}
function removeTimerFromArray(sName){for(i=0;i<m_oTimerNames.length;i++){if(m_oTimerNames[i]==sName){m_oTimerNames.splice(i,1);m_oTimers.splice(i,1);}}}
function crawlForViewAttribute(oObject,sAttribute){var oView=oObject;while(oView!=null&&oView.getAttribute(sAttribute)==null){oView=oView.parentNode;}
return oView.getAttribute(sAttribute);}
function MCV_KU(event,oMasterContentView){if(!event)event=window.event;if(!event.target){event.target=event.srcElement;}
var sKeyList=oMasterContentView.getAttribute("keyList");var kC=getKeyString(event);if(sKeyList.indexOf(","+kC+",")>-1){if(event.target.dirty!=null&&event.target.dirty==true){OC(event.target,event);}
if(event.target.skipOne!=null)
{event.target.skipOne=null;return;}
var oKeyDownEvent=oMasterContentView.getAttribute("keydownevent");oKeyDownEvent=oKeyDownEvent.replace("%{keyString}","kC");oKeyDownEvent=oKeyDownEvent.replace("%{controlid}","event.target.parentNode.id");eval(oKeyDownEvent);}}
function MCV_KD(event,oMasterContentView){if(!event)event=window.event;if(!event.target){event.target=event.srcElement;}
var sKeyList=oMasterContentView.getAttribute("keyList");var kC=getKeyString(event);if(sKeyList.indexOf(","+kC+",")>-1){if(event.target.nodeName!="TEXTAREA"){return cancelEvent(event);}}}
var m_ControlPressed=false;var m_ShiftPressed=false;var m_AltPressed=false;var KEY_DELAY=500;function getKeyString(e)
{var kC="";if(e.altKey||m_AltPressed){kC+="*";m_AltPressed=true;setTimeout(function(){m_AltPressed=false;},KEY_DELAY);}
if(e.ctrlKey||m_ControlPressed){kC+="^";m_ControlPressed=true;setTimeout(function(){m_ControlPressed=false;},KEY_DELAY);}
if(e.shiftKey||m_ShiftPressed){kC+="#";m_ShiftPressed=true;setTimeout(function(){m_ShiftPressed=false;},KEY_DELAY);}
kC+=(window.event)?event.keyCode:e.keyCode;return kC;}
function focusDGC(cell)
{cell.focus();if(cell.type!="checkbox"&&cell.type!="button"){if(cell.createTextRange){var range=cell.createTextRange();range.moveStart("character",-1);range.moveEnd("character",cell.value.length);range.select();}else if(cell.setSelectionRange){cell.setSelectionRange(cell.value.length,cell.value.length);}}}
function DGC_Input(cell)
{if(typeof(cell)=="string"){cell=document.getElementById(cell);}
var children=getChildren(cell);return children[0];}
function DHV(oCell,event)
{if(!event)event=window.event;if(!event.target){event.target=event.srcElement;}
var sDGC_Secondary_Action="";if(!IsDataGridCell(event.target))
{sDGC_Secondary_Action=GetDataGridCellSecondaryAction(event,event.target)||"";}
var oViewElementHoverEvent=crawlForViewAttribute(oCell,"elementhoverevent");oViewElementHoverEvent=oViewElementHoverEvent.replace("%{controlid}","'"+oCell.id+"'");oViewElementHoverEvent=oViewElementHoverEvent.replace("%{dgc_secondary_action}","'"+sDGC_Secondary_Action+"'");oViewElementHoverEvent=oViewElementHoverEvent.replace("getEventData(event)","m_sEventData");prepareHover(oCell,oViewElementHoverEvent,event);}
function getNextDOMElement(aChildNodesArray,index)
{var node=aChildNodesArray[index];while(node.nodeType==3)
{index++;node=aChildNodesArray[index];}
return node;}
function enforceMaximumHeight(object,maximumHeight)
{if(object.scrollHeight>maximumHeight)
{object.style.height=maximumHeight+"px";object.style.overflowY="auto";object.style.overflowX="hidden";}}
function eventOnObject(event,object)
{if(!event){event=window.event};if(!event.target){event.target=event.srcElement;}
return isChild(getObj(object),event.target);}
function eventToObject(event,object)
{if(!event){event=window.event};var relatedTarget=event.relatedTarget;if(!relatedTarget){relatedTarget=event.toElement;}
return isChild(getObj(object),relatedTarget);}
var m_ResizeTimer;var m_oHTMLWidth;var m_oHTMLHeight;function windowResize(oFunction)
{if(m_ResizeTimer!=null)
{clearTimeout(m_ResizeTimer);}
if(m_oHTMLWidth!=oHTML.offsetWidth||m_oHTMLHeight!=oHTML.offsetHeight)
{m_oHTMLWidth=oHTML.offsetWidth;m_oHTMLHeight=oHTML.offsetHeight;m_ResizeTimer=setTimeout(oFunction,750);window.onresize=null;}}
function installResize()
{setTimeout(function(){m_oHTMLWidth=oHTML.offsetWidth;window.onresize=function(){windowResize(m_oResizeFunction);};},750);}
function showConfirmation(message)
{return confirm(message);}
function showMessage(message)
{alert(message);}
var w="";var pa=false;var _oldInputFieldValue=new Array();var da=false;var _currentInputFieldValue=new Array();var G="";var _eventKeycode="";var _eventCtrlPressed=false;var _eventAltPressed=false;var _highlightedSuggestionIndex=-1;var _selectionListFirstItem=null;var _selectionListFirstItemDestination=null;var _highlightedSuggestionDiv=null;var _completeDivRows=-1;var _completeDivDivList=null;var _completeDivRows2=5;var q="";var _divTag="div";var _spanTag="span";var _documentForm=null;var _inputField=new Array();var _completeDiv=new Array();var _submitButton=new Array();var mb=null;var X=null;var _enString=null;var _cursorUpDownPressed=false;var kc=null;var hc=null;var _resultCache=new Object();var ca=1;var Aa=1;var Y=false;var _lastKeyCode=-1;var Va=(new Date()).getTime();var _hasXMLHTTP=false;var _xmlHttp=null;var _completeSearchEnString=null;var _completeSearchString=null;var B=new Array();var aa=null;var Ba=false;var Ka=false;var p=60;var _searchString=null;var ya=null;var _timeoutAdjustment=0;var _suggestWidth=0;var _inputFieldArray=-1;var _tmpOnBlur=new Array();var _activeInput=null;InstallAC=function(fld,sb,pn,ad,rl,hd,sm,ufn){_inputFieldArray=0;fld.FieldArray=_inputFieldArray;_inputField[_inputFieldArray]=fld;if(_completeDiv[0]!=null)
{_completeDiv[0].innerHTML="";}
_submitButton[_inputFieldArray]=sb;if(!pn)
{pn="nulls";}
_inputField[_inputFieldArray].codetable=pn;if(ad!=null)
{_inputField[_inputFieldArray].dependents=ad;}
var Kb="en|";var Jb="zh-CN|zh-TW|ja|ko|vi|";if(!rl||Kb.indexOf(rl+"|")==-1)
{rl="en";}
_enString=escapeURI(rl);if(Jb.indexOf(_enString+"|")==-1)
{X=true;Y=false;Ba=false}
else
{X=false;if(_enString.indexOf("zh")==0)
{Y=false;}
else
{Y=true;}
Ba=true}
if(!hd)
{hd=false;}
ya=hd;if(!sm)
{sm="query";}
w=sm;mb=ufn;installACPartTwo();};function blurThenGetFocus(){_cursorUpDownPressed=true;_inputField[_inputFieldArray].blur();setTimeout("setInputFieldFocus();",10);return}
function setupKeydown1(){if(document.createEventObject){var y=document.createEventObject();y.ctrlKey=true;y.keyCode=70;document.fireEvent("onkeydown",y)}}
function setupKeydown2(vb){var y=document.createEventObject();y.ctrlKey=true;y.keyCode=vb;document.fireEvent("onkeydown",y)}
function gc(event){}
function ic(event){}
function keyDownHandler(event){if(!event&&window.event)
{event=window.event;}
if(event)
{_lastKeyCode=event.keyCode;}
if(event&&event.keyCode==8)
{if(X&&(_inputField[_inputFieldArray].createTextRange&&(event.srcElement==_inputField[_inputFieldArray]&&(bb(_inputField[_inputFieldArray])==0&&lb(_inputField[_inputFieldArray])==0))))
{cc(_inputField[_inputFieldArray]);event.cancelBubble=true;event.returnValue=false;return false;}}
else if((_lastKeyCode==9||_lastKeyCode==13)&&_highlightedSuggestionIndex==-1)
{if(_selectionListFirstItemDestination!=null&&_selectionListFirstItem!=null)
{_selectionListFirstItemDestination.value=_selectionListFirstItem;var fakeEvent=new Object({type:"change",srcElement:_selectionListFirstItemDestination});OC(_selectionListFirstItemDestination,fakeEvent);}}}
function mc(){}
function resizeHandler(){if(w=="url"){setInputFieldSize()}
setCompleteDivSize()}
function setCompleteDivSize(){if(_completeDiv[_inputFieldArray]){if(_inputField[_inputFieldArray].parentNode!=null){_completeDiv[_inputFieldArray].style.width=(calculateWidth()-2)+"px";moveBelowAnchor(_completeDiv[_inputFieldArray],_inputField[_inputFieldArray].parentNode);}}}
function calculateWidth(){var iSpanWidth=findWidestSpan(_completeDiv[_inputFieldArray],"cAutoComplete")+15;var iWidth=0;if(navigator&&navigator.userAgent.toLowerCase().indexOf("msie")==-1){iWidth=_inputField[_inputFieldArray].parentNode.parentNode.offsetWidth-ca*2}else{iWidth=_inputField[_inputFieldArray].parentNode.parentNode.offsetWidth}
return(iSpanWidth>iWidth)?iSpanWidth:iWidth;}
function installACPartTwo(){if(getXMLHTTP()){_hasXMLHTTP=true}else{_hasXMLHTTP=false}
_activeInput=_inputField[_inputFieldArray];_inputField[_inputFieldArray].autocomplete="off";_tmpOnBlur[_inputFieldArray]=_inputField[_inputFieldArray].onblur;var onBlurFunction=function(event){onBlurHandler();this.onblur=function(){DGC_B(this);};this.onblur();};if(_tmpOnBlur[_inputFieldArray]!=null){_inputField[_inputFieldArray].onblur=onBlurFunction;}else{_inputField[_inputFieldArray].onblur=new Function("onBlurHandler();");}
if(_inputField[_inputFieldArray].createTextRange){_inputField[_inputFieldArray].onkeyup=new Function("return okuh(event);");}else{_inputField[_inputFieldArray].onkeyup=okuh;}
_inputField[_inputFieldArray].onkeydown=keyDownHandler;_currentInputFieldValue[_inputFieldArray]=_inputField[_inputFieldArray].value;_oldInputFieldValue[_inputFieldArray]=_currentInputFieldValue[_inputFieldArray];if(_completeDiv[_inputFieldArray]==null){_completeDiv[_inputFieldArray]=document.createElement("DIV");_completeDiv[_inputFieldArray].id="completeDiv"+_inputFieldArray;ca=1;Aa=1;_completeDiv[_inputFieldArray].style.borderRight="#7f9db9 "+ca+"px solid";_completeDiv[_inputFieldArray].style.borderLeft="#7f9db9 "+ca+"px solid";_completeDiv[_inputFieldArray].style.borderTop="#7f9db9 "+Aa+"px solid";_completeDiv[_inputFieldArray].style.borderBottom="#7f9db9 "+Aa+"px solid";_completeDiv[_inputFieldArray].style.zIndex="200";_completeDiv[_inputFieldArray].style.paddingRight="0";_completeDiv[_inputFieldArray].style.paddingLeft="0";_completeDiv[_inputFieldArray].style.paddingTop="0";_completeDiv[_inputFieldArray].style.paddingBottom="0";setCompleteDivSize();_completeDiv[_inputFieldArray].style.visibility="hidden";_completeDiv[_inputFieldArray].style.position="absolute";_completeDiv[_inputFieldArray].style.backgroundColor="white";document.body.appendChild(_completeDiv[_inputFieldArray]);}
cacheResults("",new Array(),new Array());Gb(_completeDiv[_inputFieldArray]);if(w=="url"){setInputFieldSize();setCompleteDivSize()}
setupKeydown1();}
function onBlurHandler(event){if(!event&&window.event){event=window.event;}
if(!_cursorUpDownPressed){hideCompleteDiv();_activeInput=null;if(_lastKeyCode==9){_lastKeyCode=-1}}
_cursorUpDownPressed=false;}
okuh=function(e){_eventKeycode=e.keyCode;_eventCtrlPressed=e.ctrlKey;_eventAltPressed=e.altKey;for(var i=0;i<_inputField.length;i++){var source=e.target||e.srcElement;if(_inputField[i]==source){_inputFieldArray=i;break;}}
aa=_inputField[_inputFieldArray].value;Oa()};function setSubmitButtonFocus(){}
setInputFieldFocus=function(){_inputField[_inputFieldArray].focus()};function stripCRFromString(va){for(var f=0,oa="",zb="\n\r";f<va.length;f++){if(zb.indexOf(va.charAt(f))==-1){oa+=va.charAt(f);}else{oa+=" ";}}
return oa}
function findWidestSpan(i,dc){var iWidth=0;var ga=i.getElementsByTagName(_spanTag);if(ga){for(var f=0;f<ga.length;++f){if(ga[f].className==dc){if(ga[f].offsetWidth>iWidth){iWidth=ga[f].offsetWidth;}}}}
return iWidth;}
function findSpanValueStringForClass(i,dc){var ga=i.getElementsByTagName(_spanTag);if(ga){for(var f=0;f<ga.length;++f){if(ga[f].className==dc){var value=ga[f].getAttribute("valueString");return stripCRFromString(value);}}}else{return""}}
function findSpanValueForClass(i,dc){var ga=i.getElementsByTagName(_spanTag);if(ga){for(var f=0;f<ga.length;++f){if(ga[f].className==dc){var value=ga[f].innerHTML;if(value=="&nbsp;"){return"";}else{var z=stripCRFromString(value);return z}}}}else{return""}}
function valueOfCAutoComplete(i){if(!i){return null;}
return findSpanValueStringForClass(i,"cAutoComplete")}
function valueOfDAutoComplete(i){if(!i){return null;}
return findSpanValueForClass(i,"dAutoComplete")}
function hideCompleteDiv(){document.getElementById("completeDiv"+_inputFieldArray).style.visibility="hidden";}
function showCompleteDiv(){document.getElementById("completeDiv"+_inputFieldArray).style.visibility="visible";setCompleteDivSize()}
function cacheResults(is,cs,ds){if(is==""){_resultCache[is]=new Array(cs,ds);}}
sendRPCDone=function(id,fr,is,cs,ds,pr,vs){if(_timeoutAdjustment>0){_timeoutAdjustment--;}
if(_inputField[id]!=_activeInput){return false;}
_inputFieldArray=id;var lc=(new Date()).getTime();cacheResults(is,cs,ds);var b=_completeDiv[_inputFieldArray];b.completeStrings=cs;b.displayStrings=ds;b.prefixStrings=pr;b.valueStrings=vs;displaySuggestedList(b,b.completeStrings,b.displayStrings,b.valueStrings);Pa(b,valueOfCAutoComplete);if(_completeDivRows2>0){b.height=16*_completeDivRows2+4;}else{hideCompleteDiv();}}
function Oa(){if(_eventKeycode==40||_eventKeycode==38){}
var N=lb(_inputField[_inputFieldArray]);var v=bb(_inputField[_inputFieldArray]);var V=_inputField[_inputFieldArray].value;if(X&&_eventKeycode!=0){if(N>0&&v!=-1){V=V.substring(0,v);}
if(_eventKeycode==3||_eventKeycode==16||_eventKeycode==36){return;}
else if(_eventKeycode==17||_eventCtrlPressed||_eventAltPressed)
{if(document.getElementById("completeDiv"+_inputFieldArray).style.visibility=="visible"){document.getElementById("completeDiv"+_inputFieldArray).style.visibility="hidden";}
return;}
else
{var sLetter=String.fromCharCode(_eventKeycode);var rAlphaNumeric=/^\w+$/i;if(_inputField[_inputFieldArray].value!=V&&(rAlphaNumeric.test(sLetter)||sLetter==" "))
{selectEntry(V);}}}
_selectionListFirstItemDestination=null;_selectionListFirstItem=null;_currentInputFieldValue[_inputFieldArray]=V;da=false;if(handleCursorUpDownEnter(_eventKeycode)&&_eventKeycode!=0){Pa(_completeDiv[_inputFieldArray],valueOfCAutoComplete);}
if(_eventKeycode==13){hideCompleteDiv();da=true;_oldInputFieldValue[_inputFieldArray]=V;}}
function Fa(){var d=_inputField[_inputFieldArray];if(d.createTextRange){var t=d.createTextRange();t.moveStart("character",d.value.length);t.select()}else if(d.setSelectionRange){d.setSelectionRange(d.value.length,d.value.length)}
hideCompleteDiv();if(document.getElementById("completeDiv"+_inputFieldArray).style.visibility!="visible"){return true;}
return false;}
function xb(eb){da=true;if(!_hasXMLHTTP){setCookie("qu","",0,_completeSearchString,null,null)}
hideCompleteDiv();if(eb=="url"){var R="";if(_highlightedSuggestionIndex!=-1&&h){R=valueOfCAutoComplete(_highlightedSuggestionDiv);}
if(R==""){R=_inputField[_inputFieldArray].value;}
if(q==""){document.title=R;}else{document.title=q;}
var Tb="window.frames['"+mb+"'].location = \""+R+'";';setTimeout(Tb,10);return false}else if(eb=="query"){return true}}
idkc=function(e){if(Ba){var Ta=_inputField[_inputFieldArray].value;if(Ta!=aa){_eventKeycode=0;Oa()}
aa=Ta;setTimeout("idkc()",10)}};setTimeout("idkc()",10);function escapeURI(La){if(encodeURIComponent){return encodeURIComponent(La);}
if(escape){return escape(La)}}
function recalculateTimeout(Mb){var H=100;for(var o=1;o<=(Mb-2)/2;o++){H=H*2}
H=H+50;return H}
mainLoop=function(){if(_oldInputFieldValue[_inputFieldArray]!=_currentInputFieldValue[_inputFieldArray]){if(!da){var Za=escapeURI(_currentInputFieldValue[_inputFieldArray]);var ma=_resultCache[_currentInputFieldValue[_inputFieldArray]];if(ma){Va=-1;sendRPCDone(_inputFieldArray,B,_currentInputFieldValue[_inputFieldArray],ma[0],ma[1],_completeDiv[_inputFieldArray].prefixStrings)}else{_timeoutAdjustment++;Va=(new Date()).getTime();if(_currentInputFieldValue[_inputFieldArray]!=""){if(_hasXMLHTTP){callServer(Za)}else{setCookie("qu",Za,null,_completeSearchString,null,null);}}}}
da=false}
_oldInputFieldValue[_inputFieldArray]=_currentInputFieldValue[_inputFieldArray];setTimeout("mainLoop();",recalculateTimeout(_timeoutAdjustment));return true};setTimeout("mainLoop()",10);var Cb=function(){selectEntry(valueOfCAutoComplete(this),valueOfDAutoComplete(this));q=valueOfDAutoComplete(this);da=true;Fa()};var pb=function(){if(_highlightedSuggestionDiv){setStyleForElement(_highlightedSuggestionDiv,"aAutoComplete");ye}
setStyleForElement(this,"bAutoComplete")};var ec=function(){setStyleForElement(this,"aAutoComplete")};function highlightNewValue(C){_currentInputFieldValue[_inputFieldArray]=G;selectEntry(G,valueOfDAutoComplete(_highlightedSuggestionDiv));q=G;if(!_completeDivDivList||_completeDivRows<=0){return;}
showCompleteDiv();if(C>=_completeDivRows){C=_completeDivRows-1}
if(_highlightedSuggestionIndex!=-1&&C!=_highlightedSuggestionIndex){setStyleForElement(_highlightedSuggestionDiv,"aAutoComplete");_highlightedSuggestionIndex=-1}
if(C<0){_highlightedSuggestionIndex=-1;_inputField[_inputFieldArray].focus();return}
_highlightedSuggestionIndex=C;_highlightedSuggestionDiv=_completeDivDivList.item(C);setStyleForElement(_highlightedSuggestionDiv,"bAutoComplete");_currentInputFieldValue[_inputFieldArray]=G;q=valueOfDAutoComplete(_highlightedSuggestionDiv);selectEntry(valueOfCAutoComplete(_highlightedSuggestionDiv),q)}
function handleCursorUpDownEnter(eventCode){if(eventCode==40){highlightNewValue(_highlightedSuggestionIndex+1);return false}else if(eventCode==38){highlightNewValue(_highlightedSuggestionIndex-1);return false}else if(eventCode==13||eventCode==3){return false}
return true}
function Pa(localCompleteDiv,ib){var localInputField=_inputField[_inputFieldArray];var T=false;_highlightedSuggestionIndex=-1;var J=localCompleteDiv.getElementsByTagName(_divTag);var O=J.length;_completeDivRows=O;_completeDivDivList=J;_completeDivRows2=O;G=_currentInputFieldValue[_inputFieldArray];if(_currentInputFieldValue[_inputFieldArray]==""||O==0){hideCompleteDiv()}else{showCompleteDiv()}
var Ab="";if(_currentInputFieldValue[_inputFieldArray].length>0){var f;var o;for(var f=0;f<O;f++){for(o=0;o<localCompleteDiv.prefixStrings.length;o++){var Ib=localCompleteDiv.prefixStrings[o]+_currentInputFieldValue[_inputFieldArray];if(Y||ib(J.item(f)).toUpperCase().indexOf(Ib.toUpperCase())==0){Ab=localCompleteDiv.prefixStrings[o];T=true;break}}
if(T){break}}}
if(T){_highlightedSuggestionIndex=f;}
for(var f=0;f<O;f++){setStyleForElement(J.item(f),"aAutoComplete");}
if(T){_highlightedSuggestionDiv=J.item(_highlightedSuggestionIndex);q=valueOfDAutoComplete(_highlightedSuggestionDiv)}else{q=_currentInputFieldValue[_inputFieldArray];_highlightedSuggestionIndex=-1;_highlightedSuggestionDiv=null}
var ab=false;switch(_eventKeycode){case 8:case 33:case 34:case 35:case 35:case 36:case 37:case 39:case 45:case 46:ab=true;break;default:break;}
if(!ab&&_highlightedSuggestionDiv){var Da=_currentInputFieldValue[_inputFieldArray];setStyleForElement(_highlightedSuggestionDiv,"bAutoComplete");var z;if(T){z=ib(_highlightedSuggestionDiv).substr(localCompleteDiv.prefixStrings[o].length);}else{z=Da;}
if(z!=localInputField.value){if(localInputField.value!=_currentInputFieldValue[_inputFieldArray]){return;}
if(X){if(localInputField.createTextRange||localInputField.setSelectionRange){var oValue=valueOfDAutoComplete(_highlightedSuggestionDiv);selectEntry(z,oValue);}
if(localInputField.createTextRange){var t=localInputField.createTextRange();t.moveStart("character",Da.length);t.select()}else if(localInputField.setSelectionRange){localInputField.setSelectionRange(Da.length,localInputField.value.length)}}}
if(_eventKeycode==13){hideCompleteDiv();}}else{if(_completeDivRows>0)
{_selectionListFirstItem=J[0].childNodes[0].childNodes[0].childNodes[0].valueString;_selectionListFirstItemDestination=localInputField;}
_highlightedSuggestionIndex=-1;q=_currentInputFieldValue[_inputFieldArray]}}
function calculateOffsetLeft(r){return Ya(r,"offsetLeft")+3}
function calculateOffsetTop(r){return getPageY(r)-5;}
function Ya(r,attr){var kb=0;while(r){kb+=r[attr];r=r.offsetParent}
return kb}
function setCookie(name,value,Ra,hb,fb,Sb){var Nb=name+"="+value+(Ra?";expires="+Ra.toGMTString():"")+(hb?";path="+hb:"")+(fb?";domain="+fb:"")+(Sb?";secure":"");document.cookie=Nb}
function setInputFieldSize(){var xa=document.body.scrollWidth-220;xa=0.73*xa;_inputField[_inputFieldArray].size=Math.floor(xa/6.18)}
function lb(n){var N=-1;if(n.createTextRange){var fa=document.selection.createRange().duplicate();N=fa.text.length}else if(n.setSelectionRange){N=n.selectionEnd-n.selectionStart}
return N}
function bb(n){var v=0;if(n.createTextRange){var fa=document.selection.createRange().duplicate();fa.moveEnd("textedit",1);v=n.value.length-fa.text.length}else if(n.setSelectionRange){v=n.selectionStart}else{v=-1}
return v}
function cc(d){if(d.createTextRange){var t=d.createTextRange();t.moveStart("character",d.value.length);t.select()}else if(d.setSelectionRange){d.setSelectionRange(d.value.length,d.value.length)}}
function jc(Zb,Ea){if(!Ea)Ea=1;if(pa&&pa<=Ea){var Ia=document.createElement("DIV");Ia.innerHTML=Zb;document.getElementById("console").appendChild(Ia)}}
function setStyleForElement(c,name){db();c.className=name;if(Ka){return}
switch(name.charAt(0)){case"m":c.style.fontSize="8pt";c.style.fontFamily="verdana,arial,helvetica,sans-serif";c.style.overflow="visible";break;case"l":c.style.display="block";c.style.paddingLeft="3";c.style.paddingRight="3";c.style.overflow="hidden";c.style.height="16px";break;case"a":c.style.backgroundColor="white";c.style.color="black";if(c.displaySpan){c.displaySpan.style.color="green"}
break;case"b":c.style.backgroundColor="#3366cc";c.style.color="white";if(c.displaySpan){c.displaySpan.style.color="white"}
break;case"c":c.style.cssFloat="left";c.style.overflow="visible";break;case"d":c.style.padding="5px 5px 5px 5px";c.style.overflow="visible";if(w=="query"){c.style.display="none";c.style.fontSize="8pt";c.style.textAlign="right";c.style.color="green";c.style.paddingTop="3px";c.style.fontFamily="verdana,arial,helvetica,sans-serif";}else{c.style.color="#696969";c.style.fontFamily="verdana,arial,helvetica,sans-serif";}
break}}
function db(){p=65;if(w=="query"){var wb=110;var Sa=calculateWidth();var tb=(Sa-wb)/Sa*100;p=tb}else{p=65}
if(ya){p=99.99}}
function Gb(i){db();var Ub="font-size: 8pt; font-family:tahoma, arial, helvetica, sans-serif; font-weight: 700; word-wrap:break-word;";var Vb="display: block; padding-left: 3; padding-right: 3; height: 16px; overflow: hidden;";var bc="background-color: white;";var qb="background-color: #3366cc; color: white ! important;";var ub="display: block; margin-left: 0%; width: "+p+"%; float: left;";var Ga="display: block; margin-left: "+p+"%;";if(w=="query"){Ga+="font-size: 8pt; text-align: right; color: green; padding-top: 3px;"}else{Ga+="color: #696969;"}
D(".mAutoComplete",Ub);D(".lAutoComplete",Vb);D(".aAutoComplete *",bc);D(".bAutoComplete *",qb);D(".cAutoComplete",ub);D(".dAutoComplete",Ga);setStyleForElement(i,"mAutoComplete")}
function displaySuggestedList(i,cs,Hb,vs){while(i.childNodes.length>0){i.removeChild(i.childNodes[0]);}
for(var f=0;f<cs.length;++f){var u=document.createElement("DIV");setStyleForElement(u,"aAutoComplete");u.onmousedown=Cb;u.onmouseover=pb;u.onmouseout=ec;var ka=document.createElement("SPAN");setStyleForElement(ka,"lAutoComplete");var nobr=document.createElement("NOBR");var ua=document.createElement("SPAN");ua.innerHTML=cs[f];ua.setAttribute("valueString",vs[f]);setStyleForElement(ua,"cAutoComplete");if(!ya){if(Hb[f]&&Hb[f].length>0){var ea=document.createElement("SPAN");setStyleForElement(ea,"dAutoComplete");u.displaySpan=ea;ea.innerHTML=Hb[f];}}
nobr.appendChild(ua);if(ea){nobr.appendChild(ea);}
ka.appendChild(nobr);u.appendChild(ka);i.appendChild(u)}}
function D(name,gb){if(Ka){var I=document.styleSheets[0];if(I.addRule){I.addRule(name,gb)}else if(I.insertRule){I.insertRule(name+" { "+gb+" }",I.cssRules.length)}}}
function getXMLHTTP(){var A=null;try{A=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{A=new ActiveXObject("Microsoft.XMLHTTP")}catch(oc){A=null}}
if(!A&&typeof XMLHttpRequest!="undefined"){A=new XMLHttpRequest()}
return A}
function callServer(Rb){var event=null;var field=_inputField[_inputFieldArray];if(_inputField[_inputFieldArray]!=null)
{if(_inputField[_inputFieldArray].offsetHeight==0)
{return;}}
if(field.ViewAutoCompleteEvent==null)
{var oViewAutoCompleteEvent=crawlForViewAttribute(field,"autocompleteevent");oViewAutoCompleteEvent=oViewAutoCompleteEvent.replace("%{controlid}","field.parentNode.id");oViewAutoCompleteEvent=oViewAutoCompleteEvent.replace("%{_inputFieldArray}","_inputFieldArray");oViewAutoCompleteEvent=oViewAutoCompleteEvent.replace("%{value}","Rb");oViewAutoCompleteEvent=oViewAutoCompleteEvent.replace("xmlHTTP('dataView'","xmlHTTP('dataViewBG'");field.ViewAutoCompleteEvent=oViewAutoCompleteEvent;}
eval(field.ViewAutoCompleteEvent);}
function selectEntry(Wa,sIdentifier){_inputField[_inputFieldArray].value=Wa;_inputField[_inputFieldArray].identifier=sIdentifier;aa=Wa;if(_inputField[_inputFieldArray]!=null)
{if(_inputField[_inputFieldArray].offsetHeight>0)
{var fakeEvent=new Object({type:"change",srcElement:_inputField[_inputFieldArray]});OC(_inputField[_inputFieldArray],fakeEvent);}}}
var oIE=false;var oFFMac=false;var agt=navigator.userAgent.toLowerCase();if(agt.indexOf('msie')!=-1){oIE=true;}else if(agt.indexOf('mac')!=-1&&agt.indexOf('firefox')!=-1){oFFMac=true;}
var oHTML=document.getElementsByTagName("HTML")[0];var m_iOriginalWidth=0;var m_iOriginalHeight=0;function resize()
{var iHeight=document.documentElement.clientHeight;var iWidth=document.documentElement.clientWidth;if(iHeight==m_iOriginalHeight&&iWidth==m_iOriginalWidth){return false;}else{m_iOriginalHeight=iHeight;m_iOriginalWidth=iWidth;}
var oToolbar=document.getElementById('toolbar');var oContent=document.getElementById('content');if(oContent!=null){oContent.style.width=iWidth+"px";oContent.style.height=iHeight+"px";fullScreen(getElementById("wait_panel"));fullScreen(getElementById("animation_helper"));oResize.fire();}}
function isVisible(oObj){if(typeof(oObj)=="string"){oObj=document.getElementById(oObj);}
var oDisplay="";if(oObj!=null){oDisplay=oObj.style.display;if(oDisplay==""){oDisplay=getActualStyle(oObj,"display");}}
if(oObj==null||oDisplay=='none'){return false;}else{return true;}}
function centerPosition(oObject,sParentNode,iOffsetTop,iOffsetLeft){if(sParentNode==null)
{oParentNode=getElementById("workspace");var height=oParentNode.offsetHeight;var width=oParentNode.offsetWidth;var top=((height/2)-(oObject.getObj().offsetHeight/2));if(top<0)
{top=((oObject.getObj().offsetHeight/2)-(height/2));}
oObject.getObj().style.left=((width/2)-(oObject.getObj().offsetWidth/2))+"px";oObject.getObj().style.top=top-iOffsetTop+"px";}
else
{oParentNode=getElementById(sParentNode);var top=oParentNode.offsetTop;var left=oParentNode.offsetLeft;var height=oParentNode.offsetHeight;var width=oParentNode.offsetWidth;oObject.getObj().style.left=left+((width/2)-(oObject.getObj().scrollWidth/2))+"px";oObject.getObj().style.top=top+((height/2)-(oObject.getObj().offsetHeight/2))-iOffsetTop+"px";}}
function verifyVerticalScrollability(oObj){if(oObj==null){return;}
if(requiresTopScrollability(oObj)){if(!oObj.topScroller){createTopScroller(oObj);}
positionTopScroller(oObj);}else{clearTopScroller(oObj);}
var oContent=oObj.childNodes[0];if(requiresBottomScrollability(oObj,oContent)){if(!oObj.bottomScroller){createBottomScroller(oObj,oContent);}
positionBottomScroller(oObj);}else{clearBottomScroller(oObj);}}
function verifyHorizontalScrollability(oObj){if(oObj==null){return;}
if(requiresLeftScrollability(oObj)){if(!oObj.leftScroller){createLeftScroller(oObj);}
positionLeftScroller(oObj);}else{clearLeftScroller(oObj);}
var oContent=oObj.childNodes[0];if(requiresRightScrollability(oObj,oContent)){if(!oObj.rightScroller){createRightScroller(oObj,oContent);}
positionRightScroller(oObj);}else{clearRightScroller(oObj);}}
function requiresTopScrollability(oObj){if(isVisible(oObj)){return(oObj.scrollTop!=0);}
return false;}
function requiresBottomScrollability(oObj,oContent){if(isVisible(oObj)){if(oContent!=null){return(oContent.offsetHeight>oObj.clientHeight+oObj.scrollTop);}}
return false;}
function createTopScroller(oObj,oContent){var oScrollerTop=document.createElement("A");oScrollerTop.href="javascript:void(0);"
oScrollerTop.className="ScrollerTop";oScrollerTop.innerHTML="&#9650;";oScrollerTop.id=oObj.id+"_topScroller";oScrollerTop.style.width=(oObj.offsetWidth-2)+"px";oScrollerTop.style.top=oObj.offsetTop+"px";oScrollerTop.onclick=function(){clearInterval(oObj.scrollTimer);oObj.scrollTop=0;verifyVerticalScrollability(oObj);};oScrollerTop.onmouseover=function(){oObj.scrollTimer=setInterval(function(){oObj.scrollTop-=5;},10);};oScrollerTop.onmouseout=function(){clearInterval(oObj.scrollTimer);verifyVerticalScrollability(oObj);};oObj.parentNode.appendChild(oScrollerTop);oObj.topScroller=oScrollerTop;}
function createBottomScroller(oObj,oContent){var oScrollerBottom=document.createElement("A");oScrollerBottom.href="javascript:void(0);"
oScrollerBottom.className="ScrollerBottom";oScrollerBottom.innerHTML="&#9660;";oScrollerBottom.id=oObj.id+"_bottomScroller";oScrollerBottom.style.width=(oObj.offsetWidth-2)+"px";oScrollerBottom.onclick=function(){clearInterval(oObj.scrollTimer);clearBottomScroller(oObj);oObj.scrollTop=oObj.scrollHeight;verifyVerticalScrollability(oObj);oObj.scrollTop=oObj.scrollHeight;verifyVerticalScrollability(oObj);};oScrollerBottom.onmouseover=function(){oObj.scrollTimer=setInterval(function(){oObj.scrollTop+=5;},10);};oScrollerBottom.onmouseout=function(){clearInterval(oObj.scrollTimer);verifyVerticalScrollability(oObj);};oObj.parentNode.appendChild(oScrollerBottom);oObj.bottomScroller=oScrollerBottom;}
function positionTopScroller(oObj){oObj.topScroller.style.top=(oObj.offsetTop+2)+"px";touchWidth(oObj.topScroller);var leftOffset=m_bIsIE?3:1;oObj.topScroller.style.left=(getPageX(oObj)-leftOffset)+"px";}
function positionBottomScroller(oObj){oObj.bottomScroller.style.top=(oObj.offsetTop+oObj.offsetHeight-16)+"px";touchWidth(oObj.bottomScroller);var leftOffset=m_bIsIE?3:1;oObj.bottomScroller.style.left=(getPageX(oObj)-leftOffset)+"px";}
function clearTopScroller(oObj){if(oObj!=null&&oObj.topScroller!=null){oObj.parentNode.removeChild(oObj.topScroller);oObj.topScroller=null;}}
function clearBottomScroller(oObj){if(oObj!=null&&oObj.bottomScroller!=null){oObj.parentNode.removeChild(oObj.bottomScroller);oObj.bottomScroller=null;}}
function touchWidth(oObj)
{var tempHolder=parseInt(oObj.style.width);oObj.style.width=150+"px";oObj.style.width=tempHolder+"px";}
function touchHeight(oObj)
{var tempHolder=parseInt(oObj.style.height);oObj.style.height=1+"px";oObj.style.height=tempHolder+"px";}
function requiresLeftScrollability(oObj){if(isVisible(oObj)){return(oObj.scrollLeft!=0);}
return false;}
function requiresRightScrollability(oObj,oContent){if(isVisible(oObj)){if(oContent!=null){return(oContent.offsetWidth>oObj.clientWidth+oObj.scrollLeft);}}
return false;}
function createLeftScroller(oObj,oContent){var oScrollerLeft=document.createElement("A");oScrollerLeft.href="javascript:void(0);"
oScrollerLeft.className="ScrollerLeft";oScrollerLeft.innerHTML="<div>&#9650;</div>";oScrollerLeft.id=oObj.id+"_LeftScroller";oScrollerLeft.style.height=(oObj.offsetHeight-7)+"px";oScrollerLeft.style.left="0px";oScrollerLeft.onclick=function(){clearInterval(oObj.scrollTimer);oObj.scrollLeft=0;verifyHorizontalScrollability(oObj);};oScrollerLeft.onmouseover=function(){oObj.scrollTimer=setInterval(function(){oObj.scrollLeft-=5;},10);};oScrollerLeft.onmouseout=function(){clearInterval(oObj.scrollTimer);verifyHorizontalScrollability(oObj);};oObj.parentNode.appendChild(oScrollerLeft);oObj.leftScroller=oScrollerLeft;}
function createRightScroller(oObj,oContent){var oScrollerRight=document.createElement("A");oScrollerRight.href="javascript:void(0);"
oScrollerRight.className="ScrollerRight";oScrollerRight.innerHTML="<div>&#9660;</div>";oScrollerRight.id=oObj.id+"_RightScroller";oScrollerRight.style.height=(oObj.offsetHeight-7)+"px";oScrollerRight.onclick=function(){clearInterval(oObj.scrollTimer);oObj.scrollLeft=oObj.scrollWidth;verifyHorizontalScrollability(oObj);};oScrollerRight.onmouseover=function(){oObj.scrollTimer=setInterval(function(){oObj.scrollLeft+=5;},10);};oScrollerRight.onmouseout=function(){clearInterval(oObj.scrollTimer);verifyHorizontalScrollability(oObj);};oObj.parentNode.appendChild(oScrollerRight);oObj.rightScroller=oScrollerRight;}
function positionLeftScroller(oObj){oObj.leftScroller.style.top=oObj.offsetTop+"px";touchHeight(oObj.leftScroller);oObj.leftScroller.style.left=(oObj.offsetLeft-12)+"px";}
function positionRightScroller(oObj){oObj.rightScroller.style.top=oObj.offsetTop+"px";touchHeight(oObj.rightScroller);oObj.rightScroller.style.left=(oObj.offsetLeft+oObj.clientWidth-10)+"px";}
function clearLeftScroller(oObj){if(oObj!=null&&oObj.leftScroller!=null){oObj.parentNode.removeChild(oObj.leftScroller);oObj.leftScroller=null;}}
function clearRightScroller(oObj){if(oObj!=null&&oObj.rightScroller!=null){oObj.parentNode.removeChild(oObj.rightScroller);oObj.rightScroller=null;}}
var m_sActiveRowWebID;function setActiveRow(activeRowWebID)
{var oldRowWebID=m_sActiveRowWebID;m_sActiveRowWebID=activeRowWebID;var oldRow=getObj(oldRowWebID);if(oldRow!=null)
{if(oldRow.offsetHeight==0)
{oldRow=null;}
else
{setRowStyle(oldRow);}}
if(oldRowWebID==null||oldRowWebID!=m_sActiveRowWebID)
{var activeRow=getObj(m_sActiveRowWebID);if(activeRow!=null)
{setRowStyle(activeRow);}}}
function setRowStyle(row)
{var className="";if(row.id==m_sActiveRowWebID)
{className+="DTS";}
var allRows=getChildren(row.parentNode);if(allRows.indexOf(row)%2==0)
{className+=" DTO";}
else
{className+=" DTE";}
row.className=className;}
function bindScroll(oScroll,oData){oScroll=getObj(oScroll);oData=getObj(oData);if(oData!=null){if(oData.scrollTop!=oScroll.scrollTop){oData.scrollTop=oScroll.scrollTop;}}}
function RC(event){if(!event)event=window.event;if(!event.target){event.target=event.srcElement;}
var oTarget=event.target;while(oTarget.nodeName!="TR"){oTarget=oTarget.parentNode;}
setActiveRow(oTarget.id);var oDGCTarget=GetDataGridCellTarget(event);var oViewElementClickEvent=crawlForViewAttribute(oTarget,"rowclick");oViewElementClickEvent=oViewElementClickEvent.replace("%{rowid}","'"+oTarget.id+"'");oViewElementClickEvent=oViewElementClickEvent.replace("%{controlid}","'"+oDGCTarget.id+"'");oViewElementClickEvent=oViewElementClickEvent.replace("getEventData(event)","m_sEventData");if(event.type=="click"){oViewElementClickEvent=oViewElementClickEvent.replace("xmlHTTP('dataView'","xmlHTTP('dataViewBG'");}
handleClick(event,oViewElementClickEvent);if(event.target.nodeName!="A"&&event.target.type!="checkbox"&&event.target.type!="button"&&event.target.nodeName!="IMG"&&event.target.type!="file"){cancelEvent(event);}}
function replaceRow(sOldRowID,sNewRowID){var oOldRow=document.getElementById(sOldRowID);var oNewRow=document.getElementById(sNewRowID);var oTBody=oOldRow.parentNode;oTBody.replaceChild(oNewRow,oOldRow);var oOldValidationRow=document.getElementById(sOldRowID+"_error");var oNewValidationRow=document.getElementById(sNewRowID+"_error");if(oNewValidationRow!=null){if(oOldValidationRow!=null){oTBody.replaceChild(oNewValidationRow,oOldValidationRow);}else{var oNextRow=oNewRow.nextSibling;oTBody.insertBefore(oNewValidationRow,oNextRow);}}else if(oOldValidationRow!=null){destroy(oOldValidationRow.id);}}
function popupEditor(objField){document.body.style.cursor="wait";_objModalDialog.fieldPlaceHolder=objField;_objModalDialog.Show("ClientScripts/Editor.aspx?homepath="+escape(_datagridConstantHomepath)+"&infield="+escape(objField.parentNode.id),580,794,'popupEditorCallback()',0);}
function popupEditorCallback(){var displayField=_objModalDialog.fieldPlaceHolder.nextSibling.nextSibling.nextSibling;if(''+_objModalDialog.resultVal!='undefined'&&''+_objModalDialog.resultVal!='null'){_objModalDialog.fieldPlaceHolder.value=_objModalDialog.resultVal;displayField.innerHTML=_objModalDialog.resultVal;}
document.body.style.cursor="auto";var fakeEvent=new Object({type:"change",srcElement:_objModalDialog.fieldPlaceHolder});OC(_objModalDialog.fieldPlaceHolder,fakeEvent);_objModalDialog.setFieldToResult();}
function findDownloadAction(cell,action)
{var parentView=cell.parentNode;while(parentView.getAttribute("downloadaction")==null&&parentView.parentNode!=null)
{parentView=parentView.parentNode;}
var hrefToSetTo=parentView.getAttribute("downloadaction");var idCell=cell;while((idCell.getAttribute("id")==null||idCell.getAttribute("id")=="")&&parentView.parentNode!=null)
{idCell=idCell.parentNode;}
hrefToSetTo=hrefToSetTo.replace("CELLID",idCell.id);cell.setAttribute('href',hrefToSetTo);}
function findUploadAction(cell,action)
{if(cell.action!=m_blank)
{return;}
var parentView=cell.parentNode;while(parentView.getAttribute("uploadaction")==null&&parentView.parentNode!=null)
{parentView=parentView.parentNode;}
var hrefToSetTo=parentView.getAttribute("uploadaction");var idCell=cell;while(idCell.id==""&&parentView.parentNode!=null)
{idCell=idCell.parentNode;}
hrefToSetTo=hrefToSetTo.replace("CELLID",idCell.id);cell.action=hrefToSetTo;cell.onmouseover=null;}
var EVENT_RESIZE=1,EVENT_KEYDOWN=2,EVENT_OFFCLICK=3,EVENT_AJAXCALL=4;function abstractEvent(){this.eventType=null;this.subscribers=new Array();this.fire=function(event){for(var i=0;i<this.subscribers.length;i++){this.subscribers[i].listen(this.eventType,event);}};this.subscribe=function(oSubscriber){if(!this.subscribers.exists(oSubscriber)){this.subscribers.push(oSubscriber);if(oSubscriber.events!=null){oSubscriber.events.push(this);}};};this.unsubscribe=function(oSubscriber){this.subscribers.removeItem(oSubscriber);};this.clearSubscribers=function(){this.subscribers=new Array();};this.toString=function(){return'Event'+this.eventType;};}
function event_Resize(){this.eventType=EVENT_RESIZE;}
event_Resize.prototype=new abstractEvent();oResize=new event_Resize();function event_keyDown(){this.eventType=EVENT_KEYDOWN;this.fire=function(event){for(var i=this.subscribers.length-1;i>=0;i--){var bReturn=this.subscribers[i].listen(this.eventType,event);if(bReturn==false){break;}}
if(!event)event=window.event;var kC=event.keyCode;if(kC==33||kC==34||kC==38||kC==40){if(!event)event=window.event;if(!event.target){event.target=event.srcElement;}
if(event.target.nodeName!="TEXTAREA"){return false;}}};}
event_keyDown.prototype=new abstractEvent();oKeyDown=new event_keyDown();function event_offClick(){this.eventType=EVENT_OFFCLICK;this.fire=function(event){if(!event)event=window.event;if(!event.target){event.target=event.srcElement;}
for(var i=this.subscribers.length-1;i>=0;i--){if(this.subscribers[i].listen!=null){if(!isChild(this.subscribers[i].getObj(),event.target)){var bReturn=this.subscribers[i].listen(this.eventType,event);if(bReturn==false){break;}}}else{if(!isChild(this.subscribers[i],event.target)){this.subscribers[i].onOffClick(event);}else{break;}}}};}
event_offClick.prototype=new abstractEvent();oOffClick=new event_offClick();function event_onAjaxCall(){this.eventType=EVENT_AJAXCALL;this.fire=function(ajaxCallUsed){for(var i=this.subscribers.length-1;i>=0;i--){this.subscribers[i].onAjaxCall(ajaxCallUsed);}};}
event_onAjaxCall.prototype=new abstractEvent();oOnAjaxCall=new event_onAjaxCall();
function ResizeableColumnView(sID){this.ID=sID;}
function Overlay(sID){this.Identifier=CranManager.Identifier++;this.ID=sID;this.Type=WIDGET_OVERLAY;this.boundTo=null;this.offClickAction=null;this.WidgetChildren=new Array();this.events=new Array();this.baseShow=this.show;this.show=function(){this.baseShow();oKeyDown.subscribe(this);var iIndex=CranManager.getNextZIndex();this.getObj().style.zIndex=iIndex;moveBelowAnchor(this.getObj(),getElementById(this.boundTo));this.getObj().style.left=(this.getObj().offsetLeft-3)+"px";visible(this.getObj());for(var i=0;i<this.WidgetChildren.length;i++){this.WidgetChildren[i].show();}
var oAnimationHelper=getElementById('animation_helper');show(oAnimationHelper);this.getObj().AnimationHelper=oAnimationHelper;this.getObj().whenDone="hide(oItem.AnimationHelper);oItem.style.height = 'auto';";startDropDown(this.getObj().id);if(this.getObj().getAttribute("offclick")!=null){this.offClickAction=this.getObj().getAttribute("offclick");oOffClick.subscribe(this);}};this.baseHide=this.hide;this.hide=function(){this.baseHide();oOffClick.unsubscribe(this);oKeyDown.unsubscribe(this);};this.bindTo=function(sBoundTo){this.boundTo=sBoundTo;};this.onOffClick=function(event){eval(this.offClickAction);oOffClick.unsubscribe(this);};this.onKeyDown=function(e){if(!e)e=window.event;var kC=(window.event)?event.keyCode:e.keyCode;if(m_sEventData==null){m_sEventData=getEventData(e);}
xmlHTTP('dataView',this.getObj().getAttribute("ajax_id"),'6008',m_sEventData+','+m_bDoubleClick,0,kC);return false;};this.slideOutContentLeft=function(sContentID){var oContent=document.getElementById(sContentID);if(oContent!=null){oContent.style.position="absolute";var x=-getWidth(oContent);oContent.whenDone="destroy(oItem.id);";moveToLocationOverTime(oContent,x);}};this.slideInContentLeft=function(sContentID){var oContent=document.getElementById(sContentID);if(oContent!=null){oContent.style.position="relative";oContent.style.left=getWidth(oContent)+"px";oContent.whenDone="oItem.style.position='';";moveToLocationOverTime(oContent,0);}};this.slideOutContentRight=function(sContentID){var oContent=document.getElementById(sContentID);if(oContent!=null){oContent.style.position="absolute";var x=getWidth(oContent);oContent.whenDone="destroy(oItem.id);";moveToLocationOverTime(oContent,x);}};this.slideInContentRight=function(sContentID){var oContent=document.getElementById(sContentID);if(oContent!=null){oContent.style.position="relative";oContent.style.left=-getWidth(oContent)+"px";oContent.whenDone="oItem.style.position='';";moveToLocationOverTime(oContent,0);}};}
function SqlWindow(sID){this.ID=sID;this.Type=WIDGET_SQL_WINDOW;this.subtotal=0;this.WidgetChildren=new Array();this.events=new Array();this.iMinimumPaneSize=20;this.getHolderWidget().addWidgetChild(this);this.calculateSubtotal=function(iSizeAddition){this.subtotal+=iSizeAddition;};this.setNewHeight=function(sID,iValue){for(var i=0;i<this.WidgetChildren.length;i++){if(this.WidgetChildren[i].getObj().id==sID)
{this.WidgetChildren[i].HeightPercentage=Math.ceil(iValue/this.ContentHeight*100);}}};this.onResize=function(){this.resizeContent();};this.resizeContent=function(){var iFirstOneHit=0;var iResizeModifier=0;this.ContentHeight=(this.getHolderWidget().ContentHeight-32);var aVisiblePanes=new Array();for(var i=0;i<this.WidgetChildren.length;i++){if(isVisible(this.WidgetChildren[i].getObj()))
{aVisiblePanes.push(this.WidgetChildren[i]);}}
var iDrawnPanes=aVisiblePanes.length;for(var i=0;i<this.WidgetChildren.length;i++){if(isVisible(this.WidgetChildren[i].getObj()))
{if(iFirstOneHit==0&&iDrawnPanes>1)
{var oPane=this.WidgetChildren[i].getObj();var oDivider=getNextSibling(oPane);this.ContentHeight-=(oDivider.offsetHeight*(iDrawnPanes-1));this.getObj().calculatedHeight=this.ContentHeight;iFirstOneHit=1;}
var iHeight=Math.ceil(this.ContentHeight*(this.WidgetChildren[i].HeightPercentage/100))+3;if(iDrawnPanes>1){if(this.lessThanMinimumSize(iHeight))
{iResizeModifier+=Math.abs(iHeight)+20;iHeight=this.iMinimumPaneSize;}
else
{iHeight-=iResizeModifier;iResizeModifier=0;}
this.WidgetChildren[i].getObj().style.height=iHeight+"px";this.calculateSubtotal(this.WidgetChildren[i].getObj().offsetHeight);iDrawnPanes--;}
else
{if(this.lessThanMinimumSize(this.ContentHeight-this.subtotal))
{iResizeModifier=Math.abs(this.ContentHeight-this.subtotal);for(var j=this.WidgetChildren.length-2;j>=0;j--)
{if(this.WidgetChildren[j].getObj().offsetHeight>iResizeModifier+20)
{this.WidgetChildren[j].getObj().innerHTML+=" ***";this.WidgetChildren[j].getObj().style.height=this.WidgetChildren[j].getObj().offsetHeight-iResizeModifier-20+"px";break;}}
this.WidgetChildren[i].getObj().style.height=20+"px";}
else
{this.WidgetChildren[i].getObj().style.height=this.ContentHeight-this.subtotal+"px";}
this.subtotal=0;}}}
this.updatePanePercentages();for(var i=0;i<this.WidgetChildren.length;i++){this.WidgetChildren[i].onResize();}};this.lessThanMinimumSize=function(iValueToCheck){if(iValueToCheck<this.iMinimumPaneSize){return true;}
else return false;};this.updatePanePercentages=function(){this.ContentHeight=(this.getHolderWidget().ContentHeight-32);var aVisiblePanes=new Array();for(i=0;i<this.WidgetChildren.length;i++){if(isVisible(this.WidgetChildren[i].getObj())){this.WidgetChildren[i].HeightPercentage=Math.ceil((this.WidgetChildren[i].getObj().offsetHeight/this.ContentHeight)*100);}}};this.ajaxNewPanelSize=function(event){var sReturnString="";for(i=0;i<this.WidgetChildren.length;i++){sReturnString+=this.WidgetChildren[i].returnSizeString();if(i!=this.WidgetChildren.length-1){sReturnString+=",";}}
eval(this.getObj().getAttribute("ajaxNewPanelSize"));};oResize.subscribe(this);}
function SqlPane(sID,iHeightPercentage){this.ID=sID;this.Type=WIDGET_SQL_PANE;this.HeightPercentage=iHeightPercentage;this.getHolderWidget().addWidgetChild(this);this.WidgetChildren=new Array();this.events=new Array();this.ContentHeight=getElementById(this.ID).offsetHeight;this.returnSizeString=function(){return this.ID+"*"+this.HeightPercentage;};this.onResize=function(){this.ContentHeight=this.getObj().offsetHeight;for(var i=0;i<this.WidgetChildren.length;i++){this.WidgetChildren[i].onResize();}};}
function selectionListClickDropDownList(sID,e,sNullValue){var oSelectTag=getElementById('selectTag');var oDown=getElementById(sID+'_down');var oHolder=getElementById(sID);if(!e)e=window.event;if(e!=null){if(!e.target){e.target=e.srcElement;}
if(e.target!=oHolder){oHolder.focus();}}
if(isVisible(oSelectTag)){var bReturning=false;if(oDown==oSelectTag.activeDown){bReturning=true;}
selectionListHideDropDownList('selectTag',e);if(bReturning){return;}}
if(oDown.innerHTML==""){EC(e);cancelEvent(e);return false;}
if(sNullValue!=null){oHolder.nullValue=sNullValue;}
oSelectTag.appendChild(oDown);oSelectTag.activeHolder=oHolder;oSelectTag.activeDown=oDown;oSelectTag.setAttribute("selectParent",oDown.getAttribute("selectParent"));oSelectTag.onmousedown=function(){var oSelectionList=getElementById(this.getAttribute("selectParent"));oSelectionList.typedLetters="";};hidden(oDown);hidden(oSelectTag);show(oDown);show(oSelectTag);if(m_bIsIE6){var iSelectTagHeight=oSelectTag.offsetHeight;oSelectTag.style.width="50px";while(oSelectTag.offsetHeight>iSelectTagHeight){oSelectTag.style.width=(parseInt(oSelectTag.offsetWidth)+10)+"px";}}else{oSelectTag.style.width="auto";}
var bCut=false;if(oSelectTag.offsetHeight>=200){bCut=true;oSelectTag.style.height="200px";}
var iWidth=oSelectTag.offsetWidth;var iScrollbarWidth=-2;if(bCut){iScrollbarWidth=20;}
var iBonus=(m_bIsIE?5:5);if(iWidth+iScrollbarWidth<oHolder.offsetWidth){oSelectTag.style.width=(oHolder.offsetWidth+iScrollbarWidth+iBonus)+"px";}else{oSelectTag.style.width=(iWidth+iScrollbarWidth+iBonus)+"px"}
oSelectTag.scrollTop="0";oSelectTag.onkeydown=function(event){return selectionListKeyDown(event,oHolder);};moveToLocation(oSelectTag,getPageX(oHolder.parentNode),getPageY(oHolder.parentNode)+oHolder.offsetHeight+1);oSelectTag.scrollTop="0";if(oHolder.outstandingLetter!=null){selectionListLetterPress(oHolder,oHolder.outstandingLetter,e);oHolder.outstandingLetter=null;}
if(oHolder.getAttribute("selectedItemID")==null){var oElements=oDown.getElementsByTagName("A");for(var iLoop=0;iLoop<oElements.length;iLoop++){if(oElements[iLoop].className=="selectTag_selected"){setSelectionList(oHolder,parseInt(oElements[iLoop].getAttribute("selectionIndex")));oHolder.setAttribute("originalValue",oElements[iLoop].getAttribute("selectionIndex"));break;}}}
if(oHolder.getAttribute("selectedItemID")!=null){scrollTo(oSelectTag,getSelectedItem(oHolder),POSITION_MIDDLE);}
visible(oDown);visible(oSelectTag);show(oDown);show(oSelectTag);oSelectTag.onOffClick=function(event)
{if(!event.target){event.target=event.srcElement;}
if(event.target.id!=sID){selectionListHideDropDownList('selectTag',event);}};oOffClick.subscribe(oSelectTag);if(e){cancelEvent(e);}
return false;}
function selectionListKeyDown(e,oSelectionList){if(!e)e=window.event;var kC=(window.event)?event.keyCode:e.which;var Esc=(window.event)?27:e.DOM_VK_ESCAPE;var kDown=(window.event)?40:e.DOM_VK_DOWN;var kUp=(window.event)?38:e.DOM_VK_UP;var kEnter=(window.event)?13:e.DOM_VK_ENTER;var kPgDn=(window.event)?34:e.DOM_VK_PAGE_DOWN;var kPgUp=(window.event)?33:e.DOM_VK_PAGE_UP;var kTab=(window.event)?9:e.DOM_VK_TAB;var kF5="t";var sLetter=String.fromCharCode(kC);var oSelectTag=getElementById('selectTag');var oDown=oSelectTag.activeDown;var bReturn=true;if(sLetter==kF5&&!e.shiftKey){bReturn=true;}else if(kC==Esc){if(oDown!=null)
{selectionListHideDropDownList('selectTag');oSelectionList.skipOne=true;bReturn=false;}}else if(kC==kDown||kC==kUp){if(oDown==null)
{selectionListClickDropDownList(oSelectionList.id,e);}
else
{var iChange;if(kC==kDown){iChange=1;}else if(kC==kUp){iChange=-1;}
var iIndex=-1;if(oSelectionList.getAttribute("selectedItemID")!=null){iIndex=parseInt(getSelectedItem(oSelectionList).getAttribute("selectionIndex"))+iChange;}
if(iIndex<0){iIndex=0;}else if(iIndex>=getChildren(oDown).length){iIndex=getChildren(oDown).length-1;}
setSelectionList(oSelectionList,iIndex);oSelectionList.setAttribute("SelectionListIsDirty","true");selectionListOnChange(e,oSelectionList);oSelectionList.typedLetters="";scrollTo(oSelectTag,getSelectedItem(oSelectionList));}
bReturn=false;}else if(kC==kTab){if(getElementById('selectTag').style.visiblity=="visible")
{selectionListClickDropDownList(oSelectionList.id,e);}
else
{selectionListHideDropDownList('selectTag',e);}
bReturn=true;}else if(kC==kEnter){selectionListClickDropDownList(oSelectionList.id,e);oSelectionList.skipOne=true;bReturn=false;}else if(e.ctrlKey||e.altKey){if(oDown!=null)
{selectionListHideDropDownList('selectTag');bReturn=true;}}else{selectionListLetterPress(oSelectionList,sLetter,e);bReturn=false;}
if(!bReturn){if(!e)e=window.event;if(e){cancelEvent(e);}}
return bReturn;}
function setSelectedItem(oSelectionList,sSelectedItemID){oSelectionList.setAttribute("selectedItemID",sSelectedItemID);var oSelectedItem=getElementById(sSelectedItemID);oSelectionList.setAttribute("selectedItemIndex",oSelectedItem.getAttribute('selectionIndex'));}
function getSelectedItem(oSelectionList){return getElementById(oSelectionList.getAttribute("selectedItemID"));}
function getSelectedValue(oSelectionList){return oSelectionList.getAttribute("selectedItemIndex")}
function selectionListLetterPress(oSelectionList,sLetter,e){var oSelectTag=getElementById('selectTag');var oDown=oSelectTag.activeDown;var rAlphaNumeric=/^\w+$/i;if(rAlphaNumeric.test(sLetter)||sLetter==" "){if(oDown==null){oSelectionList.outstandingLetter=sLetter;selectionListClickDropDownList(oSelectionList.id,e);}else{if(oSelectionList.typedOn!=null&&(getTimeStamp()-oSelectionList.typedOn)>1500){oSelectionList.typedLetters="";}
oSelectionList.typedLetters=(oSelectionList.typedLetters?oSelectionList.typedLetters:"")+sLetter;oSelectionList.typedOn=getTimeStamp();var oSelection=getByString(getChildren(oDown),oSelectionList.typedLetters);if(oSelection!=null){setSelectionList(oSelectionList,parseInt(oSelection.getAttribute("selectionIndex")));oSelectionList.setAttribute("SelectionListIsDirty","true");selectionListOnChange(e,oSelectionList);scrollTo(oSelectTag,getSelectedItem(oSelectionList));}}}}
function selectionListHideDropDownList(sID,e){var oSelectTag=getElementById(sID);var oDown=oSelectTag.activeDown;if(oDown!=null){hide(oSelectTag);hidden(oSelectTag);oSelectTag.style.height='auto';oSelectTag.onkeydown=null;var oSelectionList=getElementById(oSelectTag.getAttribute("selectParent"));oSelectionList.typedLetters="";oSelectionList.typedOn=null;if(oSelectTag.activeDown!=null){hide(oSelectTag.activeDown);}
clearContent(oSelectTag.activeDown);oSelectTag.activeHolder.parentNode.appendChild(oSelectTag.activeDown);oSelectTag.activeDown=null;oSelectTag.onOffClick=null;oOffClick.unsubscribe(oSelectTag);selectionListOnChange(e,oSelectionList);}}
function selectionListOnChange(e,oSelectionList)
{if(e!=null&&oSelectionList.getAttribute("SelectionListIsDirty")=="true")
{var event=new Object({target:oSelectionList,type:"mousedown"});eval(oSelectionList.getAttribute("onchange"));}}
function setSelectionList(oSelectTag,oSelectedItem){if(typeof(oSelectTag)=="string"){oSelectTag=getElementById(oSelectTag);}
setSelectedItem(oSelectTag,oSelectTag.id+"_down"+oSelectedItem)
refreshSelectionList(oSelectTag);}
function clearSelectionList(oSelectTag){if(oSelectTag.getAttribute("selectedItemID")!=null)
{oSelectTag.removeAttribute("selectedItemID");}
if(oSelectTag.getAttribute("selectedItemIndex")!=null)
{oSelectTag.removeAttribute("selectedItemIndex");}}
function refreshSelectionList(oSelectTag){var sInnerHTML="";var oHolder=getElementById(oSelectTag.id+"_down");var oChild=getChildren(oHolder)[0];var oSelected=getSelectedItem(oSelectTag);if(oSelected!=null){while(oChild!=null){if(oSelected.id==oChild.id){oChild.className="selectTag_selected";sInnerHTML=oChild.innerHTML;}else if(oChild.className=="selectTag_selected"){oChild.className="";}
oChild=oChild.nextSibling;}}
if(replaceAll(sInnerHTML," ","")==""){sInnerHTML="&nbsp;";}
var nobrTag=document.createElement("nobr");nobrTag.innerHTML=sInnerHTML;getChildren(oSelectTag)[0].innerHTML="";getChildren(oSelectTag)[0].appendChild(nobrTag);}
function doubleClickSelectionList(oSelectionItem){selectionListHideDropDownList('selectTag');}
function changeSelectionList(oSelectionItem,e){if(!e)e=window.event;if(typeof(oSelectionItem)=="string"){oSelectionItem=getElementById(oSelectionItem);}
var oSelectionList=getElementById(oSelectionItem.parentNode.getAttribute("selectParent"));setSelectionList(oSelectionList,parseInt(oSelectionItem.getAttribute("selectionIndex")));selectionListHideDropDownList('selectTag',e);oSelectionList.setAttribute("SelectionListIsDirty","true");oSelectionList.focus();selectionListOnChange(e,oSelectionList);cancelEvent(e);return false;}
function selectInput(e){if(!e)e=window.event;var oSource=e.target||e.srcElement;if(oSource.nodeName=="INPUT"||oSource.nodeName=="TEXTAREA"||oSource.nodeName=="SPAN"){return true;}else{return false;}}
var oBorderFakeLine=null;function borderMouseDown(e,oBorder,oContainer,oChanged){if(!e)e=window.event;if(e.button&&e.button!=1){return;}
if(document.captureEvents){e.preventDefault();document.captureEvents(Event.MOUSEMOVE);document.captureEvents(Event.MOUSEUP);}
document.onmousemove=function(e){borderMouseMove(e,oBorder,oContainer);};document.onmouseup=function(e){borderMouseUp(e,oBorder,oContainer,oChanged);};}
function borderMouseMove(e,oBorder,oContainer){if(!e)e=window.event;if(oBorderFakeLine==null){oBorderFakeLine=oBorder.cloneNode(true);oBorderFakeLine.onmousedown=null;oBorderFakeLine.className=oBorder.className+"_drag";oBorderFakeLine.style.width=oBorder.offsetWidth+"px";oBorderFakeLine.style.left=getPageX(oBorder)+"px";oBorderFakeLine.id=oBorder.id+"_fakeLine";document.body.appendChild(oBorderFakeLine);var oInnerDiv=document.createElement("DIV");oInnerDiv.innerHTML="<img src='Images/Icon/resize.gif' border='0'>";onerror=function(){log("errored object:"+oBorderFakeLine);};oBorderFakeLine.appendChild(oInnerDiv);onerror=null;switchStatus("s-resize",oContainer);}
var eventX=0;var eventY=0;if(e.pageX||e.pageY){eventX=e.pageX;eventY=e.pageY;}else if(e.clientX||e.clientY){eventX=e.clientX+document.body.scrollLeft-document.body.clientLeft;eventY=e.clientY+document.body.scrollTop-document.body.clientTop;}
var oContainerTop=getPageY(oContainer);var oContainerBottom=oContainerTop+oContainer.offsetHeight-10;if(oContainerTop>eventY){oBorderFakeLine.style.top=oContainerTop+"px";}else if(oContainerBottom<eventY){oBorderFakeLine.style.top=oContainerBottom+"px";}else{oBorderFakeLine.style.top=eventY-2+"px";}}
function borderMouseUp(e,oBorder,oContainer,oChanged){if(!e)e=window.event;if(oBorder.onchange!=null)
{oBorder.onchange();}
switchStatus(null,oContainer);document.body.removeChild(oBorderFakeLine);oBorderFakeLine=null;document.onmousemove=null;document.onmouseup=null;}
function queueFocus(sID){m_oFocus=sID;}
function setFocus(){if(m_oFocus!=null){try{var oElement=getElementById(m_oFocus);var oFocusElement=null;if(oElement!=null){if((oElement.className.indexOf("selectTag")==-1)&&(oElement.nodeName!="INPUT"&&oElement.nodeName!='TEXTAREA')){var oInputElements=oElement.getElementsByTagName("INPUT");for(var iLoop=0;iLoop<oInputElements.length;iLoop++){if(oInputElements[iLoop].offsetHeight>0&&oInputElements[iLoop].type!="checkbox"&&oInputElements[iLoop].type!="button"){oFocusElement=oInputElements[iLoop];break;}}
if(oFocusElement==null){oInputElements=oElement.getElementsByTagName("TEXTAREA");if(oInputElements.length>0){oFocusElement=oInputElements[0];}}
if(oFocusElement==null){oInputElements=oElement.getElementsByTagName("A");for(var iLoop=0;iLoop<oInputElements.length;iLoop++){if(oInputElements[iLoop].className.indexOf("selectTag")>-1){oFocusElement=oInputElements[iLoop];break;}}}
oFocusElement.focus();oFocusElement.blur();oElement=oFocusElement;}
oElement.focus();oElement.select();}}catch(ex){}
m_oFocus=null;}}
function validateKey(sType){e=event||window.event;var key;if(e.keyCode){key=e.keyCode;}else{key=e.which;}
if(key==13||key==8)return true;key=String.fromCharCode(key);switch(sType){case"MONEY":var strCheck='-$.,0123456789';if(strCheck.indexOf(key)==-1){return false;}
break;case"POSTALCODE":var strCheck=/^[A-Za-z0-9\s]+$/;if(!strCheck.test(key)){return false;}
break;case"DATE":var strCheck=/^[-/.0-9\s]+$/;if(!strCheck.test(key)){return false;}
break;case"NUMERIC":var strCheck=/\d/;if(!strCheck.test(key)){return false;}
break;case"DOUBLE":var strCheck='.,0123456789';if(strCheck.indexOf(key)==-1){return false;}
break;case"TIME":var strCheck=':0123456789';if(strCheck.indexOf(key)==-1){return false;}
break;case"UPPERCASE":e.keyCode=key.toUpperCase().charCodeAt();return true;case"LOWERCASE":e.keyCode=key.toLowerCase().charCodeAt();return true;case"READONLY":return false;}};var MONTH=0;var DAY=1;var YEAR=2;function validateField(sType){e=event||window.event;if(!e.srcElement){e.srcElement=e.target;}
var sValue=e.srcElement.value;var sTime=null;var sDate=null;var objMoney=/^((\$\d*)|(\$\d*\.\d{2})|(\d*)|(\d*\.\d{2}))$/;var objPostalCode=/^\D{1}\d{1}\D{1}\s?\d{1}\D{1}\d{1}$/;switch(sType){case"MONEY":if(objMoney.test(removeCurrency(sValue))){sValue=addCurrency(removeCurrency(sValue));if(/-?[0-9]+\.[0-9]{2}$/.test(sValue)){e.srcElement.value=sValue;e.srcElement.style.color='black';return true;}else{e.srcElement.style.color='red';return false;}}else{e.srcElement.style.color='red';return false;}
break;case"POSTALCODE":if(objPostalCode.test(sValue)){if(sValue.indexOf(" ")==-1){e.srcElement.value=sValue.substring(0,3).toUpperCase()+" "+sValue.substring(3,6).toUpperCase();}else{e.srcElement.value=sValue.toUpperCase();}
e.srcElement.style.color='black';}else{e.srcElement.style.color='red';}
break;case"TIME":if(sValue.indexOf(":")==-1){if(sValue.length==4){sValue=sValue.substring(0,2)+":"+sValue.substring(2,4);e.srcElement.value=sValue;}}
sTime=sValue;var timePat=/^(\d{1,2}):(\d{2})(:(\d{2}))?(\s?(AM|am|PM|pm))?$/;var matchArray=sTime.match(timePat);if(matchArray==null){e.srcElement.style.color='red';return false;}
hour=matchArray[1];minute=matchArray[2];second=matchArray[4];ampm=matchArray[6];if(second==""){second="00";}
if(ampm==""){if(hour<=12){ampm="AM";}}
if(hour<0||hour>23){e.srcElement.style.color='red';return false;}
if(hour>12&&ampm!=""){e.srcElement.style.color='red';return false;}
if(minute<0||minute>59){e.srcElement.style.color='red';return false;}
if(second!=null&&(second<0||second>59)){e.srcElement.style.color='red';return false;}
e.srcElement.style.color='black';break;case"DATE":if(validateDate(sValue)){var strSeparator=sValue.substring(1,2)
var strCheck=/\d/;if(strCheck.test(strSeparator)){strSeparator=sValue.substring(2,3)}
var arrayDate=sValue.split(strSeparator);if(arrayDate[DAY].length==1){arrayDate[DAY]="0"+arrayDate[DAY];}
if(arrayDate[MONTH].length==1){arrayDate[MONTH]="0"+arrayDate[MONTH];}
e.srcElement.style.color='';return true;}else{if(sValue!=""){e.srcElement.style.color='#982222';return false;}else{e.srcElement.style.color='';return true;}}
break;case"UPPERCASE":e.srcElement.value=e.srcElement.value.toUpperCase();break;case"LOWERCASE":e.srcElement.value=e.srcElement.value.toLowerCase();break;}
return true;};function addCurrency(strValue){var objRegExp=/-?[0-9]+\.[0-9]{2}$/;var objRegExpNoDecimal=/-?[0-9]/;if(objRegExp.test(strValue)){objRegExp.compile('^-');strValue=addCommas(strValue);if(objRegExp.test(strValue)){strValue='('+strValue.replace(objRegExp,'')+')';}
return'$'+strValue;}else{if(objRegExpNoDecimal.test(strValue)){return addCurrency(strValue+'.00');}
return strValue;}}
function removeCurrency(strValue){var objRegExp=/\(/;var strMinus='';if(objRegExp.test(strValue)){strMinus='-';}
objRegExp=/\)|\(|[,]/g;strValue=strValue.replace(objRegExp,'');if(strValue.indexOf('$')>=0){strValue=strValue.substring(1,strValue.length);}
return strMinus+strValue;}
function addCommas(strValue){var objRegExp=new RegExp('(-?[0-9]+)([0-9]{3})');while(objRegExp.test(strValue)){strValue=strValue.replace(objRegExp,'$1,$2');}
return strValue;}
function validateDate(strValue){var objRegExp=/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{4}$/;if(!objRegExp.test(strValue)){return false;}else{var strSeparator=strValue.substring(1,2)
var strCheck=/\d/;if(strCheck.test(strSeparator)){strSeparator=strValue.substring(2,3)}
var arrayDate=strValue.split(strSeparator);var arrayLookup={'01':31,'03':31,'04':30,'05':31,'06':30,'07':31,'08':31,'09':30,'10':31,'11':30,'12':31}
var DAY=1;var MONTH=0;var YEAR=2;var intDay=arrayDate[DAY];if(arrayDate[MONTH].length==1)
arrayDate[MONTH]="0"+arrayDate[MONTH];if(arrayDate[DAY].length==1)
arrayDate[DAY]="0"+arrayDate[DAY];if(arrayLookup[arrayDate[MONTH]]!=null){if(intDay<=arrayLookup[arrayDate[MONTH]]&&intDay!=0)
return true;}else if(arrayDate[MONTH]>12){return false;}
var intYear=parseInt(arrayDate[YEAR]);var intMonth=parseInt(arrayDate[MONTH]);var booLeapYear=(intYear%4==0&&(intYear%100!=0||intYear%400==0));if(((booLeapYear&&intDay<=29)||(!booLeapYear&&intDay<=28))&&intDay!=0){return true;}}
return false;}
function validateTime(strValue){var objRegExp=/^[0-9]{1,2}:[0-9]{1,2}(:[0-9]{1,2})*\s*([aApP]+[mM]+)*$/;log('weee');if(!objRegExp.test(strValue)){return false;}else{return true;}
return false;}
function selectTagFocus(oSelectionList){getNextSibling(oSelectionList).focus();}
function OC(oInput,event){if(!event)event=window.event;if(!event.target){event.target=event.srcElement;}
var oTarget=event.target;var oViewOnChangeEvent=crawlForViewAttribute(oTarget,"onchangeevent");var bKeyUp=(event.type=="keyup");oViewOnChangeEvent=oViewOnChangeEvent.replace("%{iskeyupevent}",bKeyUp);oViewOnChangeEvent=oViewOnChangeEvent.replace("%{controlid}","oTarget.parentNode.id");if(oTarget.getAttribute('forceForeground')!=null){oViewOnChangeEvent=oViewOnChangeEvent.replace("xmlHTTP('dataViewBG'","xmlHTTP('dataView'");}
var value;if(oTarget.type=="checkbox"){value="oTarget.checked";}else if(oTarget.type=="text"||oTarget.type=="textarea"||oTarget.type=="password"){value="encodeHtml(oTarget.value)";}else if(oTarget.nodeName=="A"){value="getSelectedValue(oTarget)";}else if(oTarget.type=="radio"){value="encodeHtml(oTarget.value)";}
oViewOnChangeEvent=oViewOnChangeEvent.replace("%{value}",value);eval(oViewOnChangeEvent);}
function KU(oTextBox,event){if(oTextBox.value!=oTextBox.originalValue&&oTextBox.dirty==null){TryOnChange(oTextBox,event);oTextBox.dirty=true;}else if(oTextBox.value==oTextBox.originalValue&&oTextBox.dirty==true){TryOnChange(oTextBox,event);oTextBox.dirty=null;}}
function TryOnChange(oElement,event){if(oElement.onchange!=null){oElement.onchange(event);}}
function Set_DGC_F(oInput){try{oInput=getObj(oInput);var children=getChildren(oInput);for(var i=0;i<children.length;i++)
{if(CanGetFocus(children[i])){children[i].focus();if(children[i].nodeName=="INPUT")
{if(children[i].type=="text"||children[i].type=="password")
{children[i].select();}}}}}catch(e){}}
function CanGetFocus(oElement)
{if(oElement.nodeName=="A"||oElement.nodeName=="INPUT"||oElement.nodeName=='TEXTAREA')
{return true;}
return false;}
function DGC_F(oInput){if(oInput.originalValue==null){oInput.originalValue=oInput.value;}
oInput.parentNode.backgroundColorOLD=oInput.parentNode.style.backgroundColor;oInput.parentNode.style.backgroundColor="gray";if(oInput.parentNode.className.indexOf("SLC")!=-1)
{getPreviousSibling(oInput).tabIndex=-1;}}
function DGC_B(oInput,event){if(oInput.value==oInput.originalValue&&oInput.dirty==true){TryOnChange(oInput,event);}
oInput.dirty=null;oInput.parentNode.style.backgroundColor=oInput.parentNode.backgroundColorOLD;oInput.parentNode.backgroundColorOLD=null;if(oInput.parentNode.className.indexOf("SLC")!=-1)
{getPreviousSibling(oInput).tabIndex=null;}}
function EC(event){if(!event)event=window.event;if(!event.target){event.target=event.srcElement;}
var oTarget=GetDataGridCellTarget(event);var sDGC_Secondary_Action="";if(!IsDataGridCell(event.target))
{sDGC_Secondary_Action=GetDataGridCellSecondaryAction(event,event.target);}
var oViewElementClickEvent=crawlForViewAttribute(oTarget,"elementclickevent");oViewElementClickEvent=oViewElementClickEvent.replace("%{controlid}","oTarget.id");oViewElementClickEvent=oViewElementClickEvent.replace("%{dgc_secondary_action}","sDGC_Secondary_Action");eval(oViewElementClickEvent);}
function GetDataGridCellTarget(event)
{if(!event)event=window.event;if(!event.target){event.target=event.srcElement;}
var oTarget=event.target;if(oTarget.nodeName=="TD")
{var DGC_H=getChildren(oTarget)[0];if(DGC_H!=null&&DGC_H.className=="DGC_H"){var oDGC=getChildren(DGC_H)[0];oTarget=oDGC;}}
while(oTarget!=oHTML&&!IsDataGridCell(oTarget))
{oTarget=oTarget.parentNode;if(!IsDataGridCell(oTarget))
{if(IsDataGridCell(oTarget.previousSibling))
{oTarget=oTarget.previousSibling;}}}
if(!IsDataGridCell(oTarget))
{oTarget=event.target;}
return oTarget;}
function GetDataGridCellSecondaryAction(event,oTarget)
{while(oTarget!=oHTML&&!IsDataGridCell(oTarget))
{if(oTarget.getAttribute("DGC_Action")!=null)
{return oTarget.getAttribute("DGC_Action");}
oTarget=oTarget.parentNode;if(!IsDataGridCell(oTarget))
{if(IsDataGridCell(oTarget.previousSibling))
{oTarget=oTarget.previousSibling;}}}}
function IsDataGridCell(oCell)
{if(oCell!=null)
{if(oCell.getAttribute)
{if(oCell.getAttribute("DGC")=="true")
{return true;}}}
return false;}
function ModalDialogMaintainFocus(objModal)
{try
{if(objModal.modalWindow.closed)
{window.clearInterval(objModal.timerObject);eval(objModal.eventHandler);return;}}
catch(everything){}}
function ModalDialog(objName){this.modalWindow=null;this.interval=5
this.timerObject=null;this.resultVal=null;this.eventHandler='';this.name=objName
this.fieldPlaceHolder=null
this.setFieldToResult=setFieldToResult;function setFieldToResult()
{if(this.fieldPlaceHolder!=null)
{if(this.resultVal!=null)
{this.fieldPlaceHolder.value=this.resultVal;}}
var HTMLElementNodes=getChildren(this.fieldPlaceHolder.parentNode);if(HTMLElementNodes[2]!=null&&this.resultVal!=null)
{HTMLElementNodes[2].innerHTML=this.resultVal;}
this.fieldPlaceHolder=null;}
this.RemoveWatch=RemoveWatch;function RemoveWatch()
{this.resultVal=null;this.eventHandler=null;}
this.Show=Show;function Show(url,height,width,EventHandler,resizable,showMenus,scrollable)
{if(typeof showMenus=="undefined"){showMenus=false;}
if(typeof scrollable=="undefined"){scrollable=1;}
this.RemoveWatch();this.eventHandler=EventHandler;var args;var parentTop=window.screenTop?window.screenTop:window.screenY;var parentLeft=window.screenLeft?window.screenLeft:window.screenX;if(typeof parentTop=="undefined"){parentTop=0;}
if(typeof parentLeft=="undefined"){parentLeft=0;}
var topMargin=(parentTop%screen.height);var leftMargin=(parentLeft%screen.width);var screenTop=parentTop-topMargin;var screenLeft=parentLeft-leftMargin;var top=((screen.height-height)/2)+screenTop;var left=((screen.width-width)/2)+screenLeft;args='width='+width+',height='+height+',left='+left+',top='+top;args+=',location=0,status=0,toolbar=0,scrollbars='+scrollable+',resizable='+resizable;args+=',dependent=1,minimizable=0';if(showMenus){args+=",menubar=1";}else{args+=",menubar=0";}
this.modalWindow=window.open(url,"",args);this.modalWindow.focus();var functionBody="this.opener."+this.name+".resultVal = this.returnValue";this.modalWindow.functionBody=new Function(functionBody);this.timerObject=window.setInterval("ModalDialogMaintainFocus("+this.name+")",this.interval);}}
var _objModalDialog;_objModalDialog=new ModalDialog('_objModalDialog');
function Manager(){this.WidgetArray=new Array();this.Identifier=0;this.LastZIndex=100;this.getNextZIndex=function(){this.LastZIndex=this.LastZIndex+10;return this.LastZIndex;};this.getWidget=function(sWidgetID){for(var i=0;i<this.WidgetArray.length;i++){if(this.WidgetArray[i].ID==sWidgetID){return this.WidgetArray[i];}}
return null;};this.addWidget=function(oWidget){if(this.getWidget(oWidget.ID)){this.removeWidget(oWidget.ID);}
this.WidgetArray.push(oWidget);return oWidget;};this.removeWidget=function(oWidget){if(oWidget!=null){if(typeof(oWidget)=="string"){oWidget=this.getWidget(oWidget);}
if(oWidget!=null){for(var i=0;i<this.WidgetArray.length;i++){if(this.WidgetArray[i].ID==oWidget.ID){for(var j=0;j<this.WidgetArray[i].events.length;j++){this.WidgetArray[i].events[j].unsubscribe(this.WidgetArray[i]);}
this.WidgetArray[i].events=null;this.WidgetArray[i].remove();this.WidgetArray.removeItem(this.WidgetArray[i]);break;}}}}};this.toString=function(){return'Manager with'+this.WidgetArray.length+' widgets.';};}
CranManager=new Manager();
var WIDGET_GRID=1,WIDGET_DIALOG=2,WIDGET_WINDOW=3,WIDGET_FORM=4,WIDGET_DISABLED_SCREEN=5,WIDGET_DROP_DOWN=6,WIDGET_DROP_DOWN_ITEM=7,WIDGET_WORKSPACE=9,WIDGET_SQL_WINDOW=10,WIDGET_SQL_PANE=11,WIDGET_CRAN_DOCK=12,WIDGET_UTILITY_PANEL=13;WIDGET_TREE_VIEW=14;WIDGET_TEXT_VIEW=15;WIDGET_DATETIME_PANEL=16;function Widget(){this.getObj=function(){if(this.Obj==null){this.Obj=getElementById(this.ID);this.Obj.WidgetType=this.Type;}
return this.Obj;};this.remove=function(){};this.hide=function(){hide(this.getObj());};this.show=function(){show(this.getObj());};this.visible=function(){visible(this.getObj());};this.hidden=function(){hidden(this.getObj());};this.setContent=function(sContent){setContent(this.getObj(),sContent);};this.clearContent=function(){clearContent(this.getObj());};this.events=new Array();this.Identifier="Identifer:"+getTimeStamp();this.disablePanelOn=function(){if(CranManager.getWidget(this.ID+"_disabledScreen")==null){var oDisabled=CranManager.addWidget(new DisabledScreen(this));this.disabledScreen=oDisabled;}
CranManager.getWidget(this.ID+"_disabledScreen").show();};this.disablePanelOff=function(){if(CranManager.getWidget(this.ID+"_disabledScreen")!=null){CranManager.getWidget(this.ID+"_disabledScreen").hide();CranManager.removeWidget(CranManager.getWidget(this.ID+"_disabledScreen"));this.disabledScreen=null;}};this.ID=null;this.Obj=null;this.Type=null;this.HolderWidget=null;this.disabledScreen=CranManager.getWidget(this.ID+"_disabledScreen");this.WidgetChildren=null;this.listen=function(iEventType,event){switch(iEventType){case EVENT_RESIZE:if(this.onResize!=null){return this.onResize();}
break;case EVENT_KEYDOWN:if(this.onKeyDown!=null){return this.onKeyDown(event);}
break;case EVENT_OFFCLICK:if(this.onOffClick!=null){return this.onOffClick(event);}
break;}};this.getHolderWidget=function(){if(this.HolderWidget==null){var oObject=this.getObj();if(oObject){oObject=oObject.parentNode;}
while(eval(oObject)){if(CranManager.getWidget(oObject.id)!=null){this.HolderWidget=CranManager.getWidget(oObject.id);break;}
oObject=oObject.parentNode;}}
return this.HolderWidget;}
this.addWidgetChild=function(oChild){if(!this.WidgetChildren.existsByID(oChild)){this.WidgetChildren.push(oChild);}};this.toString=function(){return this.Identifier+'Widget with ID ['+this.ID+']';};}
function CranDock(sID){this.ID=sID;this.Type=WIDGET_CRAN_DOCK;this.Icons=null;this.BG=null;this.BGLeft=null;this.BGRight=null;this.Activator=null;this.Expanded=true;this.AutoHide=false;this.initialize=function(bAutoHide){this.BG=getElementById(this.ID+"_BG");this.BGLeft=getElementById(this.ID+"_BGLeft");this.BGRight=getElementById(this.ID+"_BGRight");this.Icons=getElementById(this.ID+"_icons");this.Icons.onmouseover=this.mouseOverIcons;this.Activator=getElementById(this.ID+"_Activator");this.Icons.ParentWidget=this;this.Activator.ParentWidget=this;this.Activator.onmouseover=function(event){this.ParentWidget.mouseOver(event);cancelEvent(event);};this.BG.onmouseover=function(event){cancelEvent(event);};this.postShowAnimation();};this.allowHide=function(){this.AutoHide=true;document.body.onmouseover=function(event){CranManager.getWidget("crandock").bodyMouseOver(event);};};this.forceVisible=function(){this.AutoHide=false;if(!this.Expanded){this.show();}};this.show=function(){this.onResize();this.Icons.whenDone="CranManager.getWidget( '"+this.ID+"' ).postShowAnimation();";moveToLocationOverTime(this.Icons,null,0);if(this.BG.orgTop==null){this.BG.orgTop=parseInt(this.BG.offsetTop);}
this.BG.whenDone=null;moveToLocationOverTime(this.BG,null,this.BG.orgTop);moveToLocationOverTime(this.BGLeft,null,this.BG.orgTop);moveToLocationOverTime(this.BGRight,null,this.BG.orgTop);this.Activator.style.height="140%";this.Activator.style.zIndex="1";this.getObj().style.zIndex=999;}
this.hide=function(){this.Icons.whenDone=null;moveToLocationOverTime(this.Icons,null,this.Icons.offsetHeight+4);if(this.BG.orgTop==null){this.BG.orgTop=parseInt(this.BG.offsetTop);}
this.BG.whenDone="CranManager.getWidget( '"+this.ID+"' ).getObj().style.zIndex = 1;";moveToLocationOverTime(this.BG,null,(this.BG.orgTop+23));moveToLocationOverTime(this.BGLeft,null,(this.BG.orgTop+23));moveToLocationOverTime(this.BGRight,null,(this.BG.orgTop+23));this.Activator.style.height="25px";this.Activator.style.zIndex="4";}
this.postShowAnimation=function(){document.body.onmouseover=function(event){CranManager.getWidget("crandock").bodyMouseOver(event);};this.Expanded=true;if(this.Icons.Active!=null){m_oHoverObject=this.Icons.Active;showHover("<b>"+this.Icons.Active.getAttribute("label")+"</b>",true);}};this.mouseOver=function(e){if(this.AutoHide&&!this.Expanded){this.show();}};this.bodyMouseOver=function(e){hideHover();m_oHoverObject=null;this.Icons.Active=null;if(this.AutoHide&&this.Expanded){this.Expanded=false;this.hide();}
document.body.onmouseover=null;};this.mouseOverIcons=function(e){if(!e)e=window.event;if(!e.target){e.target=e.srcElement;}
var oTarget=e.target;while(oTarget!=this&&oTarget.className.indexOf("DockIcon")==-1){oTarget=oTarget.parentNode;}
if(oTarget.className.indexOf("DockIcon")>-1&&(this.Active!=oTarget||m_oHoverObject==null)){this.Active=oTarget;if(this.ParentWidget.Expanded){m_oHoverObject=this.Active;showHover("<b>"+this.Active.getAttribute("label")+"</b>",true);document.body.onmouseover=function(event){CranManager.getWidget("crandock").bodyMouseOver(event);};}}
cancelEvent(e);};this.onResize=function(){if(this.Activator!=null){this.getObj().style.height="auto";this.Activator.style.height="100%";this.getObj().style.height=this.getObj().offsetHeight+"px";}};oResize.subscribe(this);}
function DateTimePanel(sID){this.ID=sID;this.Type=WIDGET_UTILITY_PANEL;this.WidgetChildren=new Array();this.events=new Array();this.Initialize=function(sDateCell)
{moveBelowAnchor(this.getObj(),getElementById(sDateCell));this.getObj().style.left=(this.getObj().offsetLeft-3)+"px";visible(this.getObj());var oAnimationHelper=getElementById('animation_helper');show(oAnimationHelper);this.getObj().AnimationHelper=oAnimationHelper;this.getObj().whenDone="hide(oItem.AnimationHelper);oItem.style.height = 'auto';";startDropDown(this.getObj().id);var oObjID=this.getObj().id;var oWidget=this;document.onclick=function(event){if(!eventOnObject(event,oObjID)){oWidget.remove();}};if(this.getObj().getAttribute("offclick")!=null){this.offClickAction=this.getObj().getAttribute("offclick");oOffClick.subscribe(this);}}
this.Resize=function()
{}
this.remove=function(){destroy(this.ID);};this.baseShow=this.show;this.show=function(){this.baseShow();};this.baseHide=this.hide;this.hide=function(){this.baseHide();};}
DateTimePanel.prototype=new Widget();
function DisabledScreen(oWidget){this.ID=oWidget.ID+"_disabledScreen";this.Type=WIDGET_DISABLED_SCREEN;var oObj=document.createElement("DIV");oObj.id=this.ID;oObj.className="disable_panel";var oParentNode=oWidget.getObj().parentNode;oParentNode.insertBefore(oObj,oWidget.getObj());if(this.getObj().parentNode.className!="workAreaVer")
{this.getObj().style.height=getHeight(this.getObj().parentNode)+"px";this.getObj().style.width=getWidth(this.getObj().parentNode)+"px";this.getObj().style.top="0px";this.getObj().style.zIndex=parseInt(oWidget.getObj().style.zIndex);}
this.Initialize=function()
{}
this.Resize=function()
{}
this.remove=function(){destroy(this.ID);};this.baseHide=this.hide;this.hide=function(){if(document.getElementById(this.ID)!=null){this.baseHide();}};}
DisabledScreen.prototype=new Widget();
function Form(sID){this.Identifier=CranManager.Identifier++;this.ID=sID;this.Type=WIDGET_FORM;this.ContentHolder=null;this.Content=null;this.Toolbar=null;this.TabArea=null;this.MaxLabelWidth=0;this.MaxTableWidth=0;this.setReferences=function()
{this.Obj=null;this.Toolbar=getPreviousSibling(this.getObj());if(this.Toolbar!=null){this.DynamicSubtitle=getPreviousSibling(this.Toolbar);}
this.Content=this.getObj();this.ContentHolder=this.getObj().parentNode;}
this.Initialize=function()
{this.setReferences();}
this.Resize=function()
{var marginRightWidth=parseInt(getActualStyle(this.ContentHolder,"margin-right"));if(marginRightWidth){this.ContentHolder.style.width=this.ContentHolder.offsetWidth-marginRightWidth+"px";}
var dynamicSubtitleHeight=0;if(this.DynamicSubtitle!=null)
{enforceMaximumHeight(this.DynamicSubtitle,(getHeight(this.ContentHolder)*0.3))+12;dynamicSubtitleHeight=getHeight(this.DynamicSubtitle)+12;}
var CONTENT_HOLDER_BORDER=(2*2);var iFormHeight=getHeight(this.ContentHolder)-getHeight(this.Toolbar)-CONTENT_HOLDER_BORDER-dynamicSubtitleHeight;this.getObj().style.height=iFormHeight+"px";if(this.Toolbar!=null)
{this.Toolbar.style.width=getWidth(this.getObj())+"px";this.resizeToolbar();}
this.resizeTabArea();if(this.MaxLabelWidth==0&&this.ContentHolder.className=="gridArea")
{this.resizeTables();}}
this.resizeToolbar=function()
{var oChildrenArray=getChildren(this.Toolbar);var counter;var totalWidth=0;for(var i=0;i<oChildrenArray.length;i++)
{counter=0;var toolbarHeight=0;if(m_bIsIE6)
{toolbarHeight=22;}
else
{toolbarHeight=oChildrenArray[i].offsetHeight;}
while((oChildrenArray[i].scrollHeight)>toolbarHeight+4&&counter<50)
{oChildrenArray[i].style.width=getWidth(oChildrenArray[i])+50+"px";counter++;}
oChildrenArray[i].style.overflow="hidden";var toolbarMenuChildren=getChildren(oChildrenArray[i]);if(i==oChildrenArray.length-1&&i>0)
{oChildrenArray[i].style.textAlign="right";}
totalWidth+=getWidth(oChildrenArray[i]);}
if(totalWidth>this.Toolbar.offsetWidth)
{this.Toolbar.style.overflow="auto";toolbarHeight=this.Toolbar.offsetHeight;counter=0;while(this.Toolbar.scrollHeight>toolbarHeight+1&&counter<50)
{this.Toolbar.style.width=getWidth(this.Toolbar)+20+"px";counter++;}
this.Toolbar.style.overflow="hidden";}}
this.resizeTabArea=function()
{this.TabArea=this.Content.childNodes[0];if(this.TabArea.className=="navTabDiv"||this.TabArea.className=="loginTable")
{this.TabArea.style.width=this.TabArea.scrollWidth+8+"px";var counter=0;while(this.TabArea.scrollHeight>this.TabArea.offsetHeight+2&&counter<300)
{this.TabArea.style.width=this.TabArea.offsetWidth+20+"px";counter++;}}}
this.resizeTables=function()
{var tabHolderChildNodes=getChildren(this.Content);for(var i=0;i<tabHolderChildNodes.length;i++)
{if(tabHolderChildNodes[i].className!="datagridTableVer")
{continue;}
var oldVisibility=tabHolderChildNodes[i].style.visibility;var oldDisplay=tabHolderChildNodes[i].style.display;tabHolderChildNodes[i].style.visibility="hidden";tabHolderChildNodes[i].style.display="block";var tableRows=tabHolderChildNodes[i].getElementsByTagName("TR");for(var j=0;j<tableRows.length;j++)
{if(tableRows[j].className!="VerticalFormViewVerticalTabTitle")
{var TDs=getChildren(tableRows[j]);this.MaxLabelWidth=Math.max(this.MaxLabelWidth,TDs[0].offsetWidth);break;}}
var tbody=getChildren(tabHolderChildNodes[i])[1];this.MaxTableWidth=Math.max(this.MaxTableWidth,getWidth(tbody)+10);tabHolderChildNodes[i].style.display=oldDisplay;tabHolderChildNodes[i].style.visibility=oldVisibility;}
for(var i=0;i<tabHolderChildNodes.length;i++)
{if(tabHolderChildNodes[i].className!="datagridTableVer")
{continue;}
var rowDataColGroup=tabHolderChildNodes[i].getElementsByTagName("colgroup")[0];if(rowDataColGroup!=null&&this.MaxLabelWidth>0)
{var colElement=getChildren(rowDataColGroup)[0];colElement.width=this.MaxLabelWidth;}
tabHolderChildNodes[i].width=this.MaxTableWidth;}};}
Form.prototype=new Widget();
function Grid(sID){this.ID=sID;this.Type=WIDGET_GRID;this.ContentHolder=null;this.Toolbar=null;this.DynamicSubtitle=null;this.StaticPage=null;this.DataGridHolder=null;this.ColumnHeaders=null;this.DataTableDiv=null;this.DataTableScroller=null;this.DataTableElement=null;this.DataTableFooter=null;this.GridScrollTop=0;this.GridScrollLeft=0;this.monitoredColumns=null;this.monitorCount=0;this.MONITOR_WAIT_DELAY=2000;this.SetReferences=function()
{this.Obj=null;this.ContentHolder=this.getObj().parentNode;this.Toolbar=getPreviousSibling(this.getObj());this.SetConditionalReferences();this.DataGridHolder=this.getObj().childNodes[0];this.ColumnHeaders=this.DataGridHolder.childNodes[0];this.DataTableDiv=this.DataGridHolder.childNodes[1];this.DataTableScroller=this.DataGridHolder.nextSibling;this.DataTableElement=getChildren(this.DataTableDiv)[0];this.DataTableFooter=getChildren(this.DataTableDiv)[1];this.DataTableDiv.onscroll=function(){bindScroll(this,this.parentNode.nextSibling);};this.DataTableScroller.onscroll=function(){bindScroll(this,this.previousSibling.childNodes[1]);};};this.SetConditionalReferences=function()
{if(getPreviousSibling(this.Toolbar)!=null)
{var node=getPreviousSibling(this.Toolbar);if(node.className=="dynamicTitle")
{this.DynamicSubtitle=getPreviousSibling(this.Toolbar);}
else
{this.StaticPage=getPreviousSibling(this.Toolbar);}
if(getPreviousSibling(node)!=null)
{this.DynamicSubtitle=getPreviousSibling(node);}}};this.Initialize=function(gridScrollTop,gridScrollLeft)
{this.GridScrollTop=gridScrollTop;this.GridScrollLeft=gridScrollLeft;this.SetReferences();};this.Resize=function()
{var marginRightWidth=parseInt(getActualStyle(this.ContentHolder,"margin-right"));if(marginRightWidth){this.ContentHolder.style.width=this.ContentHolder.offsetWidth-marginRightWidth+"px";}
var dynamicSubtitleHeight=0;if(this.DynamicSubtitle!=null)
{enforceMaximumHeight(this.DynamicSubtitle,(getHeight(this.ContentHolder)*0.3));}
if(this.StaticPage!=null)
{enforceMaximumHeight(this.StaticPage,(getHeight(this.ContentHolder)*0.3));}
this.Toolbar.style.width=getWidth(this.getObj())-4+"px";var SCROLLBAR_WIDTH=this.DataTableScroller.offsetWidth;var sizingHeader=this.DataTableElement.getElementsByTagName("TR")[0];if(this.DataTableElement.getElementsByTagName("TR").length>1&&this.DataTableElement.style.tableLayout!="fixed")
{var headerItems=getChildren(this.ColumnHeaders.getElementsByTagName("TR")[0]);var tableColumns=getChildren(this.DataTableElement.getElementsByTagName("TR")[1]);var columnHeaderColGroup=this.ColumnHeaders.getElementsByTagName("colgroup")[0].cloneNode(true);var headerColElements=columnHeaderColGroup.getElementsByTagName("col");var tableColGroup=this.DataTableElement.getElementsByTagName("colgroup")[0].cloneNode(true);var tableColElements=tableColGroup.getElementsByTagName("col");var totalWidth=0;var returnMessage="";for(var iLoop=0;iLoop<tableColumns.length;iLoop++)
{var iTableCellOffset=m_bIsFF?0:2;var tableColumnWidth=tableColumns[iLoop].offsetWidth-iTableCellOffset;var firstColumn=(iLoop==0)?2:0;var lastColumn=(iLoop==tableColumns.length-1)?1:0;var iIEOffset=m_bIsIE?4:0;headerColElements[iLoop+iLoop].width=(tableColumnWidth-3-iIEOffset+firstColumn+lastColumn);tableColElements[iLoop].width=tableColumnWidth;totalWidth+=tableColumnWidth;}
if(sizingHeader.className=="sizingHeader")
{destroyObj(sizingHeader);}
replaceObjWithObj(this.ColumnHeaders.getElementsByTagName("colgroup")[0],columnHeaderColGroup);replaceObjWithObj(this.DataTableElement.getElementsByTagName("colgroup")[0],tableColGroup);if(this.ColumnHeaders.width!=totalWidth)
{this.ColumnHeaders.width=totalWidth;}
if(this.DataTableElement.width!=totalWidth)
{this.DataTableElement.width=totalWidth;}
this.ColumnHeaders.style.tableLayout="fixed";this.DataTableElement.style.tableLayout="fixed";if(this.DataTableElement.className=="datagridTableHor")
{this.DataTableElement.className+=" gridSizingComplete";}}
else
{if(sizingHeader!=null&&sizingHeader.className=="sizingHeader")
{destroyObj(sizingHeader);}}
if(this.ContentHolder.offsetWidth>50&&(this.DataTableElement.offsetWidth+SCROLLBAR_WIDTH)>this.ContentHolder.offsetWidth){this.DataTableDiv.style.width=(this.DataTableElement.offsetWidth+SCROLLBAR_WIDTH)+"px";}else{this.DataTableDiv.style.width="auto";if(this.DataTableDiv.offsetHeight==0)
{this.DataTableDiv.style.overflowY="hidden";}}
var availableWidth=this.getObj().offsetWidth;if(this.ColumnHeaders.offsetWidth<availableWidth)
{var marginLeft=(availableWidth-this.ColumnHeaders.offsetWidth-SCROLLBAR_WIDTH)/2;this.ColumnHeaders.style.marginLeft=marginLeft+"px";this.DataTableElement.style.marginLeft=marginLeft+"px";}else{this.ColumnHeaders.style.marginLeft="0px";this.DataTableElement.style.marginLeft="0px";}
var availableHeight=getHeight(this.ContentHolder)-this.getObj().offsetTop;if(availableHeight>0)
{this.getObj().style.height=availableHeight+"px";}
this.DataTableFooter.style.position="absolute";this.DataTableFooter.style.bottom="5px";this.DataTableFooter.style.marginLeft=(this.ContentHolder.offsetWidth-getChildren(this.DataTableFooter)[0].offsetWidth)/2+"px";var heightOfGridContents=this.DataTableElement.offsetHeight+getHeight(this.DataTableFooter)+this.ColumnHeaders.offsetHeight+getHeight(this.Toolbar)+10;if(heightOfGridContents>availableHeight)
{this.DataTableFooter.style.paddingTop="10px";this.DataTableFooter.style.position="relative";this.DataTableFooter.style.textAlign="left";}
if(availableHeight-this.ColumnHeaders.offsetHeight<17){availableHeight=300;}
this.DataTableDiv.style.height=availableHeight-this.ColumnHeaders.offsetHeight-16+"px";this.DataTableScroller.style.top=this.getObj().offsetTop+"px";this.DataTableScroller.style.height=availableHeight-16+"px";this.DataTableScroller.childNodes[0].style.height=this.DataTableDiv.scrollHeight+32+"px";this.DataTableScroller.childNodes[0].offsetHeight;this.DataTableDiv.scrollTop=this.GridScrollTop;this.DataTableScroller.scrollTop=this.GridScrollTop;this.DataGridHolder.scrollLeft=this.GridScrollLeft;}
this.monitorSize=function(monitoredCellIndexes){this.monitoredColumns=monitoredCellIndexes.split(",");this.monitorSizeTimeout();};this.monitorSizeTimeout=function(){var oObj=this;var height=oObj.DataTableElement.offsetHeight;setTimeout(function(){oObj.verifySize(height);},this.MONITOR_WAIT_DELAY);};this.verifySize=function(lastGridHeight){var gridHeight=this.DataTableElement.offsetHeight;if(gridHeight==0)
{return;}
var needsResize=false;if(lastGridHeight!=gridHeight)
{needsResize=true;}
var oTR=this.DataTableElement.getElementsByTagName("TR");var tableColGroup=this.DataTableElement.getElementsByTagName("colgroup")[0];var tableColElements=tableColGroup.getElementsByTagName("col");var columnHeaderColGroup=this.ColumnHeaders.getElementsByTagName("colgroup")[0];var headerColElements=columnHeaderColGroup.getElementsByTagName("col");var iDGCOffset=m_bIsIE?2:0;iDGCOffset=m_bIsFF?4:iDGCOffset;for(var iLoop=1;iLoop<this.monitoredColumns.length;iLoop++)
{var columnIndex=parseInt(this.monitoredColumns[iLoop]);for(var iRow=0;iRow<oTR.length;iRow++)
{var oTDs=getChildren(oTR[iRow]);var DGC_H=getChildren(oTDs[columnIndex])[0];var DGC=getChildren(DGC_H)[0];var cellWidth=DGC.scrollWidth+iDGCOffset;if(cellWidth>tableColElements[columnIndex].width)
{var iTableCellOffset=m_bIsFF?-2:4;tableColElements[columnIndex].width=cellWidth+iTableCellOffset+iDGCOffset;headerColElements[columnIndex+columnIndex].width=cellWidth;needsResize=true;}}}
if(needsResize)
{this.Resize();this.monitorCount=0;}
if(this.monitorCount<5)
{this.monitorSizeTimeout();this.monitorCount++;}};}
Grid.prototype=new Widget();
function TreeView(sID){this.ID=sID;this.Type=WIDGET_TREE_VIEW;this.WidgetChildren=new Array();this.events=new Array();this.ContentArea=null;this.Holder=null;this.Initialize=function()
{this.Holder=this.getObj().parentNode;if(this.getObj().nextSibling!=null)
{this.ContentArea=this.getObj().nextSibling;}}
this.Resize=function()
{}
this.alertID=function(e){if(!e)e=window.event;if(!e.target){e.target=e.srcElement;}
var oTargetElement=e.target;while(oTargetElement.nodeName!="DIV")
{oTargetElement=oTargetElement.parentNode;}
if(oTargetElement.nextSibling)
{if(oTargetElement.nextSibling.style.display=="block"){oTargetElement.nextSibling.style.display="none";}
else{oTargetElement.nextSibling.style.display="block";}}}
this.ajaxTreeViewAction=function(event){if(!event)event=window.event;if(!event.target){event.target=event.srcElement;}
var oTargetElement=event.target;while(oTargetElement.nodeName!="DIV")
{oTargetElement=oTargetElement.parentNode;if(oTargetElement==this){break;}}
if(oTargetElement.id==""||oTargetElement.id=="treeNavHolder"){}
else{var sReturnString=oTargetElement.id;eval(this.getObj().getAttribute("ajaxTreeViewAction"));}};}
TreeView.prototype=new Widget();
function UtilityPanel(sID){this.ID=sID;this.Type=WIDGET_UTILITY_PANEL;this.WidgetChildren=new Array();this.events=new Array();this.TopConstrained=false;this.BottomConstrained=false;this.LeftConstrained=false;this.RightConstrained=false;this.IsCentered=false;this.PositionParent=null;this.TopOffset=null;this.LeftOffset=null;this.MaximizedHeight=0;this.MaximizedWidth=0;this.MaxLabelWidth=0;this.MaxValueWidth=0;this.TitleBar=null;this.TitleBarTopLine=null;this.Content=null;this.ContentToolbar=null;this.ErrorPanel=null;this.WindowHeightExceededOffset=60;this.Initialize=function(windowWidth,windowX,windowY)
{if(windowWidth!=null&&windowWidth!='')
{this.MaximizedWidth=windowWidth;this.TopOffset=windowY;this.LeftOffset=windowX;}
this.getObj().style.visibility="hidden";if(getChildren(this.getObj()).length>0)
{this.setReferences();if(this.Content!=null&&this.Content.id!=null)
{this.dragListenOn(this.TitleBar.id);if(this.getObj().parentNode.className!="MCV")
{this.PositionParent=this.getObj().parentNode.parentNode.id;}
else
{this.PositionParent=this.getObj().parentNode.id;}
this.setConstraints(true,true,true,true);var iIndex=CranManager.getNextZIndex();this.getObj().style.zIndex=iIndex;this.disablePanelOn();}}};this.setReferences=function()
{var mainChildren=getChildren(this.getObj());var contentAreaChildren=getChildren(mainChildren[1]);if(contentAreaChildren.length>0)
{this.TitleBar=mainChildren[0];var titleChildren=getChildren(this.TitleBar);if(titleChildren[1]!=null)
{this.TitleBarTopLine=titleChildren[1].childNodes[0].childNodes[0];}
if(contentAreaChildren[0].className=='ExceptionPanel')
{this.Content=mainChildren[1];}
else if(contentAreaChildren[0].nodeType!="3")
{var verticalHolder=mainChildren[1];var verticalHolderChildren=getChildren(verticalHolder);if(verticalHolderChildren[0].className=="confirmationPanelContent")
{this.Content=verticalHolderChildren[0];this.ContentToolbar=verticalHolderChildren[2];}
else if(verticalHolderChildren[0].className=="helpPane")
{this.Content=verticalHolderChildren[0];}
else if(verticalHolderChildren[0].className=='electronicSignatureContent')
{this.Content=verticalHolderChildren[0];}
else
{this.ContentToolbar=verticalHolderChildren[0];this.Content=verticalHolderChildren[1];}}
else
{this.Content=mainChildren[1];}
if(mainChildren[2]!=null)
{this.ErrorPanel=mainChildren[2];}}};this.Resize=function()
{if(this.Content!=null&&this.Content.id!=null)
{this.setReferences();this.adjustTable();this.setMaxWidth();this.setMaxHeight();var widthPadding=0;var heightPadding=0;if(this.MaximizedWidth>this.getObj().offsetParent.offsetWidth*0.9)
{this.MaximizedWidth=((this.getObj().offsetParent.offsetWidth*0.9));this.Content.style.overflowX="scroll";heightPadding=20;}
if(this.MaximizedHeight+getHeight(this.ErrorPanel)>this.getObj().offsetParent.offsetHeight-this.WindowHeightExceededOffset)
{this.MaximizedHeight=(this.getObj().offsetParent.offsetHeight-this.WindowHeightExceededOffset)-getHeight(this.ErrorPanel);this.Content.style.overflowY="scroll";widthPadding=16;}
this.setElementWidths(this.MaximizedWidth+widthPadding,widthPadding);this.setElementHeights(this.MaximizedHeight+heightPadding,heightPadding);if(this.TopOffset==null&&this.LeftOffset==null)
{centerPosition(this,this.PositionParent,this.getObj().offsetParent.offsetTop+10,0);this.TopOffset=this.getObj().offsetTop;this.LeftOffset=this.getObj().offsetLeft;}
else
{this.getObj().style.top=this.TopOffset+"px";this.getObj().style.left=this.LeftOffset+"px";}
var contentWidget=CranManager.getWidget(this.Content.id);if(contentWidget!=null&&contentWidget.DataTableDiv!=null){contentWidget.Resize();}
this.storePosition();this.getObj().style.visibility="visible";}};this.adjustTable=function()
{var toolbarAndContentHolder=getChildren(this.getObj())[1];var contentHolder=getChildren(toolbarAndContentHolder)[1];if(contentHolder!=null)
{var tabHolderChildNodes=getChildren(contentHolder);contentHolder.style.width=oHTML.offsetWidth+"px";for(var i=0;i<tabHolderChildNodes.length;i++)
{if(tabHolderChildNodes[i].className!="datagridTableVer")
{continue;}
var oldVisibility=tabHolderChildNodes[i].style.visibility;var oldDisplay=tabHolderChildNodes[i].style.display;tabHolderChildNodes[i].style.visibility="hidden";tabHolderChildNodes[i].style.display="block";var tableRows=tabHolderChildNodes[i].getElementsByTagName("TR");var rowDataColGroup=tabHolderChildNodes[i].getElementsByTagName("colgroup")[0];if(rowDataColGroup!=null)
{getChildren(rowDataColGroup)[0].width=null;}
for(var j=0;j<tableRows.length;j++)
{if(tableRows[j].className!="VerticalFormViewVerticalTabTitle")
{var TDs=getChildren(tableRows[j]);this.MaxLabelWidth=Math.max(this.MaxLabelWidth,TDs[0].offsetWidth);this.MaxValueWidth=Math.max(this.MaxValueWidth,TDs[1].offsetWidth+10);break;}}
tabHolderChildNodes[i].style.display=oldDisplay;tabHolderChildNodes[i].style.visibility=oldVisibility;}
contentHolder.style.width="auto";}};this.storePosition=function()
{var returnMessage=this.MaximizedWidth+"*"+this.LeftOffset+"*"+this.TopOffset;var oSetViewValueEvent=crawlForViewAttribute(this.Obj,"setviewvalueevent");oSetViewValueEvent=oSetViewValueEvent.replace("%{key}","'verticalPosition'");oSetViewValueEvent=oSetViewValueEvent.replace("%{value}","'"+returnMessage+"'");oSetViewValueEvent=oSetViewValueEvent.replace("getEventData(event)","m_sEventData");eval(oSetViewValueEvent);};this.setMaxWidth=function()
{var mainChildNodes=getChildren(this.getObj());var specificNodeSet=getChildren(mainChildNodes[1]);var maxWidth=0;if(specificNodeSet[1]!=null)
{if(CranManager.getWidget(specificNodeSet[1].id)!=null)
{var titleWidth=this.findMaxTitleWidth();var titleBarWidth=Math.max(titleWidth,this.Content.scrollWidth-16);var contentWidth=this.findMaxContentWidth();maxWidth=Math.max(titleBarWidth,contentWidth);}
else
{if(specificNodeSet[0].className=='ExceptionPanel'||specificNodeSet[0].className=='electronicSignatureContent')
{if(specificNodeSet[0].className=='ExceptionPanel')
{var exceptionPanelNodes=getChildren(specificNodeSet[0]);maxWidth=getWidth(exceptionPanelNodes[0]);if(getChildren(specificNodeSet[0])[0].id=="exception-container")
{maxWidth+=300;}}
else
{maxWidth=getWidth(this.Content);}}
else if(specificNodeSet[0].nodeType!="3")
{if(specificNodeSet[0].className=="confirmationPanelContent")
{var confirmationChildren=getChildren(specificNodeSet[0]);if(confirmationChildren[0]!=null)
{specificNodeSet[0].style.width="10px";if(confirmationChildren[0].nodeName=="SPAN")
{this.getObj().style.width="auto";specificNodeSet[0].style.width="auto";}
else if(confirmationChildren[0].nodeName!="UL")
{if(getWidth(specificNodeSet[0])>300)
{specificNodeSet[0].style.width=getWidth(specificNodeSet[0])+"px";}
else
{specificNodeSet[0].style.width="300px";}}
else
{specificNodeSet[0].style.width="350px";}}
specificNodeSet[0].style.overflowY="hidden";specificNodeSet[0].style.overflowX="auto";maxWidth=specificNodeSet[0].scrollWidth;}
else
{maxWidth=document.documentElement.clientWidth*0.7;}}}}
else
{maxWidth=this.getObj().offsetParent.offsetWidth*0.9;}
this.MaximizedWidth=Math.max(this.MaximizedWidth,maxWidth);};this.setElementWidths=function(widthToSetTo,contentPadding)
{if(this.TitleBar.childNodes.length>1)
{var titleBarChildren=getChildren(this.TitleBar);this.TitleBar.style.width=widthToSetTo+4+"px";var titleBarBorderLeftWidth=parseInt(getActualStyle(titleBarChildren[1],"border-left-width"));titleBarBorderLeftWidth=4-(titleBarBorderLeftWidth*2);titleBarChildren[1].style.width=widthToSetTo+titleBarBorderLeftWidth+"px";}
else
{var titleBarChildren=getChildren(this.TitleBar);this.TitleBar.style.width=widthToSetTo+"px";titleBarChildren[0].style.width=widthToSetTo+"px";}
if(this.TitleBarTopLine!=null)
{var closeButtonWidth=30;var ellipsisOffet=25;if(this.TitleBarTopLine.scrollWidth>this.TitleBarTopLine.offsetWidth)
{this.TitleBarTopLine.style.width=widthToSetTo-closeButtonWidth-ellipsisOffet-8+"px";this.TitleBarTopLine.style.whiteSpace="nowrap";var TitleBarTopLineChildren=getChildren(this.TitleBarTopLine);TitleBarTopLineChildren[TitleBarTopLineChildren.length-1].style.display="block";}
else
{this.TitleBarTopLine.style.width=widthToSetTo-closeButtonWidth+"px";}}
this.Content.parentNode.style.width=widthToSetTo+"px";this.Content.style.width=widthToSetTo+"px";var contentChildNodes=getChildren(this.Content);if(contentChildNodes[0]!=null)
{var marginWidths=4;if(contentChildNodes[0].className=='ExceptionPanel')
{this.Content.style.overflowY="hidden";this.Content.style.overflowX="hidden";contentChildNodes[0].style.width=widthToSetTo+"px";if(getChildren(contentChildNodes[0])[0].id=="exception-container")
{getChildren(contentChildNodes[0])[0].style.width=widthToSetTo-25+"px";}}
else if(this.Content.className=='helpPane')
{this.Content.style.width=widthToSetTo+"px";this.TitleBar.style.width=widthToSetTo+marginWidths+"px";this.getObj().style.width=widthToSetTo+"px";contentChildNodes[1].style.width=widthToSetTo-getWidth(contentChildNodes[0])+"px";}
else if(this.Content.className=='electronicSignatureContent'||this.Content.className=='confirmationPanelContent')
{var widthAdjustment=0;if(contentPadding>0)
{widthAdjustment=4;}
this.Content.style.width=widthToSetTo-widthAdjustment-marginWidths+"px";this.getObj().style.width=widthToSetTo+"px";}
else if(contentChildNodes[0].nodeType!="3")
{var contentWidget=CranManager.getWidget(this.Content.id);if(contentWidget!=null)
{contentWidget.Toolbar.style.width=widthToSetTo-marginWidths+"px";if(contentWidget.Content!=null)
{var tableWidth=widthToSetTo-contentPadding-marginWidths;for(var i=0;i<contentWidget.Content.childNodes.length;i++)
{var tabbedTable=getChildren(contentWidget.Content)[i];var rowDataColGroup=tabbedTable.getElementsByTagName("colgroup")[0];if(rowDataColGroup!=null&&this.MaxLabelWidth>0)
{getChildren(rowDataColGroup)[0].width=this.MaxLabelWidth;}
tabbedTable.style.width=tableWidth+"px";}}
if(this.ErrorPanel!=null)
{this.ErrorPanel.style.width=widthToSetTo+"px";}
this.getObj().style.width=widthToSetTo+"px";}
else
{var oContentHolder=getElementById(this.Content.id);var oChildrenArray=getChildren(oContentHolder);if(oChildrenArray.length==2)
{oChildrenArray[0].style.width=widthToSetTo+"px";oChildrenArray[1].style.width=widthToSetTo+"px";}}}}
this.checkForEllipsis();};this.setMaxHeight=function()
{var mainChildNodes=getChildren(this.getObj());var specificChildNodes=getChildren(mainChildNodes[1]);if(specificChildNodes[1]!=null)
{var tabHolder=specificChildNodes[1];var tabHolderChildNodes=getChildren(tabHolder);}
var contentWidget=CranManager.getWidget(this.Content.id);if(contentWidget==null&&specificChildNodes[0].nodeType!="3")
{if(specificChildNodes[0].className=='electronicSignatureContent')
{this.MaximizedHeight=mainChildNodes[1].scrollHeight;}
else if(this.Content.className=='helpPane')
{this.MaximizedHeight=this.getObj().offsetParent.offsetHeight*0.9;}
else if(specificChildNodes[0].className=="confirmationPanelContent")
{var contentChildNodes=getChildren(this.Content);var toolbarHeight=getHeight(this.ContentToolbar);specificChildNodes[0].style.width="auto";if(contentChildNodes[0].className=="validationDetailDescription")
{var contentHeight=getHeight(contentChildNodes[0])+getHeight(contentChildNodes[1]);this.MaximizedHeight=contentHeight+toolbarHeight;}
else
{this.Content.style.width=this.MaximizedWidth+"px";this.MaximizedHeight=Math.max(getHeight(this.Content)+16,this.Content.scrollHeight+16);}}
else if(this.MaximizedHeight==0)
{mainChildNodes[1].style.height="auto";this.MaximizedHeight=mainChildNodes[1].offsetHeight;}}
else if(contentWidget!=null&&contentWidget.DataTableDiv==null&&tabHolderChildNodes.length>=1)
{if(this.MaximizedHeight==0)
{var titleBarHeight=getHeight(mainChildNodes[0]);var toolbarHeight=getHeight(specificChildNodes[0]);var maxContentHeight=0;if(tabHolderChildNodes[0]!=null&&tabHolderChildNodes[0].className!="navTabDiv"&&tabHolderChildNodes[0].className!="formDynamicTitle")
{var contentHolder=specificChildNodes[1];contentHolder.style.width=oHTML.offsetWidth+"px";contentHolder.style.height="10px";tabHolderChildNodes[0].style.width="auto";this.MaximizedHeight=getHeight(tabHolderChildNodes[0])+5;contentHolder.style.width="auto";if(getWidth(tabHolderChildNodes[0])>this.MaximizedWidth)
{this.MaximizedWidth=getWidth(tabHolderChildNodes[0]);}}
else if(tabHolderChildNodes[0].className=="formDynamicTitle")
{this.MaximizedHeight=getHeight(this.Content);}
else
{this.MaximizedHeight=getHeight(tabHolderChildNodes[0]);var contentHolder=specificChildNodes[1];contentHolder.style.width=oHTML.offsetWidth+"px";contentHolder.style.height="10px";for(var i=1;i<tabHolderChildNodes.length;i++)
{var oldVisibility=tabHolderChildNodes[i].style.visibility;var oldDisplay=tabHolderChildNodes[i].style.display;tabHolderChildNodes[i].style.visibility="hidden";tabHolderChildNodes[i].style.display="block";maxContentHeight=Math.max(maxContentHeight,getHeight(tabHolderChildNodes[i]));tabHolderChildNodes[i].style.display=oldDisplay;tabHolderChildNodes[i].style.visibility=oldVisibility;}
contentHolder.style.width="auto";this.MaximizedHeight=titleBarHeight+maxContentHeight;}
if(this.ErrorPanel!=null)
{this.MaximizedHeight+=getHeight(this.ErrorPanel);}}}
else if(contentWidget!=null&&contentWidget.DataTableDiv!=null)
{var titleBarHeight=getHeight(mainChildNodes[0]);var toolbarHeight=getHeight(contentWidget.Toolbar);var gridHeight=getHeight(contentWidget.DataTableDiv);this.MaximizedHeight=titleBarHeight+toolbarHeight+gridHeight+50;}
else
{var titleBarHeight=getHeight(mainChildNodes[0]);var contentHeight=getHeight(mainChildNodes[1]);this.MaximizedHeight=titleBarHeight+contentHeight;}};this.setElementHeights=function(heightToSetTo,padForScrollbar)
{var mainChildNodes=getChildren(this.getObj());var specificChildNodes=getChildren(mainChildNodes[1]);if(specificChildNodes[1]!=null)
{var tabHolder=specificChildNodes[1];var tabHolderChildNodes=getChildren(tabHolder);}
var contentWidget=CranManager.getWidget(this.Content.id);var contentChildNodes=getChildren(this.Content);if(contentChildNodes[0]!=null)
{if(contentChildNodes[0].className=='ExceptionPanel')
{contentChildNodes[0].style.height=heightToSetTo-this.TitleBar.offsetHeight+"px";}
else if(this.Content.className=='helpPane')
{contentChildNodes[0].style.height=heightToSetTo+"px";contentChildNodes[1].style.height=heightToSetTo+"px";this.Content.parentNode.style.height=heightToSetTo+"px";}
else if(this.Content.className=='electronicSignatureContent')
{var toolbarHeight=this.Content.nextSibling.offsetHeight;this.Content.style.height=heightToSetTo+"px";this.Content.parentNode.style.height=heightToSetTo+toolbarHeight+"px";this.getObj().style.height=heightToSetTo+4+"px";contentChildNodes[0].style.height=heightToSetTo+"px";}
else if(this.Content.className=='confirmationPanelContent')
{var titleBarHeight=getHeight(this.TitleBar);var toolbarHeight=0;if(this.ContentToolbar!=null)
{toolbarHeight=getHeight(this.ContentToolbar);}
if(contentChildNodes[0]!=null)
{if(contentChildNodes[0].nodeName!="UL"&&contentChildNodes[0].className!="validationDetailDescription")
{contentChildNodes[0].style.height=heightToSetTo-titleBarHeight+"px";}}
if(contentChildNodes[0].className=="validationDetailDescription")
{this.Content.style.height=heightToSetTo+"px";this.Content.parentNode.style.height=heightToSetTo+titleBarHeight+"px";}
else
{if(heightToSetTo==(this.getObj().offsetParent.offsetHeight-this.WindowHeightExceededOffset)-getHeight(this.ErrorPanel)+padForScrollbar)
{this.Content.style.height=heightToSetTo-toolbarHeight-titleBarHeight+"px";this.Content.parentNode.style.height=heightToSetTo-titleBarHeight+8+"px";this.getObj().style.height=heightToSetTo+"px";}
else
{this.Content.style.height=heightToSetTo+"px";this.Content.parentNode.style.height=heightToSetTo+toolbarHeight+8+"px";this.getObj().style.height=heightToSetTo+"px";this.Content.style.overflowY="auto";}}}
else if(contentWidget==null&&specificChildNodes[0].nodeType!="3")
{this.getObj().style.height=heightToSetTo+"px";var toolbarHeight=0;if(this.Content.nextSibling.nextSibling!=null)
{toolbarHeight=this.Content.nextSibling.nextSibling.offsetHeight;}
this.Content.style.height=heightToSetTo-this.TitleBar.offsetHeight-toolbarHeight+"px";}
else if(contentWidget!=null&&contentWidget.DataTableDiv==null&&tabHolderChildNodes.length>=1)
{if(this.ErrorPanel!=null)
{this.ErrorPanel.style.width=getWidth(this.Content)-4+"px";}
if(heightToSetTo==this.getObj().offsetParent.offsetHeight-this.WindowHeightExceededOffset||heightToSetTo==this.getObj().offsetParent.offsetHeight-20)
{heightToSetTo-=getHeight(this.ContentToolbar)+getHeight(this.TitleBar);}
var oldScrolling=this.Content.style.overflowY;this.Content.style.overflowY="scroll";if(this.Content.scrollHeight>heightToSetTo&&this.Content.scrollHeight<this.getObj().offsetParent.offsetHeight-this.WindowHeightExceededOffset)
{heightToSetTo=this.Content.scrollHeight+5;}
this.Content.style.overflowY=oldScrolling;this.Content.style.height=heightToSetTo-getHeight(this.ErrorPanel)+"px";this.getObj().style.height=heightToSetTo+getHeight(this.ErrorPanel)+getHeight(this.ContentToolbar)+getHeight(this.TitleBar)+"px";}
else if(contentWidget!=null&&contentWidget.DataTableDiv!=null)
{this.getObj().style.height=heightToSetTo+"px";this.Content.style.height=heightToSetTo-this.Content.offsetTop+"px";}}
else
{if(specificChildNodes[0].className=='electronicSignatureContent')
{this.getObj().style.height=heightToSetTo+getHeight(this.TitleBar)+"px";mainChildNodes[1].style.height=heightToSetTo+"px";}
else
{specificChildNodes[0].style.height=heightToSetTo-getHeight(this.TitleBar)+"px";specificChildNodes[0].style.overflow="auto";}}};this.findMaxTitleWidth=function()
{var titleArea=this.TitleBar.childNodes[1];var iLoop=0;if(this.TitleBarTopLine!=null)
{while(this.TitleBarTopLine.scrollWidth>this.TitleBarTopLine.offsetWidth&&iLoop<40)
{this.TitleBarTopLine.style.width=this.TitleBarTopLine.offsetWidth+20+"px";iLoop++;}
titleArea.style.width=this.TitleBarTopLine.offsetWidth+"px";}
if(titleArea.offsetHeight<titleArea.scrollHeight)
{iLoop=0;while(titleArea.offsetHeight<titleArea.scrollHeight&&iLoop<40)
{titleArea.style.width=titleArea.offsetWidth+20+"px";iLoop++;}}
var closeButton=getChildren(titleArea)[getChildren(titleArea).length-1];return getWidth(titleArea)+getWidth(closeButton);};this.findMaxContentWidth=function()
{var max2=0;var contentChildren=getChildren(this.Content);if(contentChildren[0].nodeType!="3")
{var contentWidget=CranManager.getWidget(this.Content.id);if(contentWidget==null){var oContentHolder=getElementById(this.Content.id);var oChildrenArray=getChildren(oContentHolder);for(var i=0;i<oChildrenArray.length;i++)
{max2=Math.max(max2,oChildrenArray[i].scrollWidth);}
return max2;}
var tabsWidth=0;if(contentWidget.TabArea!=null)
{tabsWidth=contentWidget.TabArea.scrollWidth;}
var contentWidth=0;if(contentWidget.Content!=null)
{this.Content.style.width="auto";contentWidth=this.MaxLabelWidth+this.MaxValueWidth;if(this.Content.getAttribute("description")=="Download.View")
{contentWidth=500;}}
else
{contentWidth=this.getObj().offsetParent.offsetWidth*0.65;contentWidth=Math.max(contentWidth,contentWidget.DataTableDiv.offsetWidth+100);}
var contentToolbarWidth=0;if(contentWidget.Toolbar!=null)
{contentToolbarWidth=getWidth(contentWidget.Toolbar)+10;}
var max1=Math.max(tabsWidth,contentWidth);max2=Math.max(max1,contentToolbarWidth);}
return max2;};this.dragListenOn=function(sDragDiv){this.DragDiv=getElementById(sDragDiv);this.DragDiv.DragObject=this.getObj();this.DragDiv.onmousedown=function(event){startDrag(event);};};this.minimize=function(){this.MaximizedHeight=getElementById(this.ID).offsetHeight-2;getElementById(this.ID).style.height=getElementById(this.ID+"TitleBar").offsetHeight+"px";};this.maximize=function(){getElementById(this.ID).style.height=this.MaximizedHeight+"px";};this.remove=function(){this.disablePanelOff();};this.setConstraints=function(bTopConstrained,bBottomConstrained,bLeftConstrained,bRightConstrained){this.TopConstrained=bTopConstrained;this.BottomConstrained=bBottomConstrained;this.LeftConstrained=bLeftConstrained;this.RightConstrained=bRightConstrained;};this.ajaxReturnXY=function(event){this.TopOffset=this.getObj().offsetTop;this.LeftOffset=this.getObj().offsetLeft;this.storePosition();this.IsCentered=false;};this.checkForEllipsis=function(){if(this.TitleBarTopLine!=null)
{if(this.TitleBarTopLine.scrollWidth-1>getChildren(this.TitleBar)[1].offsetWidth||(m_bIsIE6&&this.TitleBarTopLine.scrollWidth>this.TitleBar.offsetWidth))
{var closeButtonWidth=30;var ellipsisOffet=25;this.TitleBarTopLine.style.width=(this.TitleBar.childNodes[1].offsetWidth-10)-(closeButtonWidth+ellipsisOffet)+"px";this.TitleBarTopLine.style.whiteSpace="nowrap";var TitleBarTopLineChildren=getChildren(this.TitleBarTopLine);TitleBarTopLineChildren[TitleBarTopLineChildren.length-1].style.display="block";if(m_bIsIE6)
{this.TitleBarTopLine.style.width=this.TitleBarTopLine.offsetWidth-12+"px";TitleBarTopLineChildren[0].style.overflow="hidden";TitleBarTopLineChildren[0].style.width=this.TitleBarTopLine.offsetWidth-TitleBarTopLineChildren[0].offsetLeft-(closeButtonWidth+ellipsisOffet)+"px";TitleBarTopLineChildren[0].style.display="inline-block";}}}};oResize.subscribe(this);}
UtilityPanel.prototype=new Widget();
function Window(sID,sContent){this.ID=sID;this.Type=WIDGET_WINDOW;this.TitleBar=null;this.TitleBarTopLine=null;this.Content=null;this.ApplicationImage=null;this.Footer=null;this.Initialize=function()
{this.setReferences();};this.Resize=function()
{if(getChildren(this.getObj())[0].className=='staticPage'||getWidth(this.getObj())==0)
{if(getWidth(this.getObj())>0)
{getChildren(this.getObj())[0].style.height="100%";}
this.getObj().style.height="100%";this.getObj().style.width="100%";this.getObj().parentNode.style.margin="0px";}
else
{var iTitleBarOffset=150-this.getObj().offsetLeft;this.TitleBar.style.marginLeft=iTitleBarOffset+"px";this.TitleBar.style.width=getWidth(this.getObj())-iTitleBarOffset+"px";var titleBarBorderLeftWidth=parseInt(getActualStyle(this.TitleBar.childNodes[1],"border-left-width"));var titleBarBorderRightWidth=parseInt(getActualStyle(this.TitleBar.childNodes[1],"border-right-width"))
this.ResizeTitleBar();if(this.TitleBar.childNodes[1].offsetWidth!=this.TitleBar.offsetWidth)
{this.TitleBar.childNodes[1].style.width=this.TitleBar.childNodes[1].offsetWidth-8+"px";}
var CONTENT_BORDER=(2*2);var availableHeight=parseInt(this.getObj().parentNode.style.height)-this.getObj().offsetTop-CONTENT_BORDER;this.getObj().style.height=availableHeight+"px";availableHeight=availableHeight-getHeight(this.TitleBar);this.Content.style.overflow="hidden";this.Content.style.height=availableHeight+"px";if(getChildren(this.Content).length==2&&getChildren(this.Content)[0].className=="dynamicTitle")
{var heightReduction=0;if(getChildren(getChildren(this.Content)[1]).length>0)
{getChildren(this.Content)[1].style.height="50%";}
heightReduction+=getHeight(getChildren(this.Content)[1]);if(this.Footer!=null)
{heightReduction+=getHeight(this.Footer)+25;}
getChildren(this.Content)[0].style.height=getHeight(this.Content)-heightReduction+"px";getChildren(this.Content)[0].style.overflowY="auto";}
if(this.ApplicationImage!=null&&this.ApplicationImage.offsetHeight>0){this.ApplicationImage.style.top=this.Content.offsetTop-getHeight(this.ApplicationImage)+"px";}
if(this.Footer!=null)
{this.Footer.style.left=this.getObj().offsetWidth/2-(this.Footer.offsetWidth/2)+this.getObj().offsetLeft+"px";}}};this.setReferences=function()
{var children=getChildren(this.getObj());if(children[0].className!='staticPage')
{this.TitleBar=children[0];this.Content=children[1];if(children[2]!=null)
{this.ApplicationImage=getChildren(children[2])[0];}
if(children[children.length-1].className=="dataGridFooter")
{this.Footer=children[children.length-1];}}}
this.ResizeTitleBar=function()
{this.TitleBarTopLine=this.TitleBar.childNodes[1].childNodes[0].childNodes[0];var iLoop=0;while(this.TitleBarTopLine.offsetHeight<this.TitleBarTopLine.scrollHeight&&iLoop<50)
{this.TitleBarTopLine.style.width=this.TitleBarTopLine.offsetWidth+20+"px";iLoop++;}
this.checkForEllipsis();}
this.checkForEllipsis=function()
{if(this.TitleBarTopLine.scrollWidth-1>getChildren(this.TitleBar)[1].offsetWidth||(m_bIsIE6&&this.TitleBarTopLine.scrollWidth>this.TitleBar.offsetWidth))
{var closeButtonWidth=30;var ellipsisOffet=25;this.TitleBarTopLine.style.width=(this.TitleBar.childNodes[1].offsetWidth-8)-(closeButtonWidth+ellipsisOffet)+"px";this.TitleBarTopLine.style.whiteSpace="nowrap";var TitleBarTopLineChildren=getChildren(this.TitleBarTopLine);TitleBarTopLineChildren[TitleBarTopLineChildren.length-1].style.display="block";if(m_bIsIE6)
{this.TitleBarTopLine.style.width=this.TitleBarTopLine.offsetWidth-12+"px";TitleBarTopLineChildren[0].style.overflow="hidden";TitleBarTopLineChildren[0].style.width=this.TitleBarTopLine.offsetWidth-TitleBarTopLineChildren[0].offsetLeft-(closeButtonWidth+ellipsisOffet)+"px";TitleBarTopLineChildren[0].style.display="inline-block";}}}}
Window.prototype=new Widget();
function Workspace(sID){this.ID=sID;this.Toolbar=null;this.Content=null;this.MCV=null;this.Type=WIDGET_WORKSPACE;this.Initialize=function()
{this.setReferences();};this.setReferences=function()
{this.Obj=null;this.Toolbar=getPreviousSibling(this.getObj());this.ContentArray=getChildren(this.getObj());this.MCV=this.getObj().parentNode;};this.Resize=function()
{this.setReferences();var width=document.documentElement.clientWidth;var height=document.documentElement.clientHeight;this.MCV.style.height=height+"px";this.MCV.style.width=width+"px";var iToolbarHeight=0;if(this.Toolbar!=null)
{var toolbarPaddingLeft=parseInt(getActualStyle(this.Toolbar,"padding-left"));var toolbarPaddingRight=parseInt(getActualStyle(this.Toolbar,"padding-right"));var toolbarPadding=toolbarPaddingLeft+toolbarPaddingRight;this.Toolbar.style.width=width-toolbarPadding+"px";iToolbarHeight=this.Toolbar.offsetHeight;}
var iWorkspaceHeight=height-iToolbarHeight;this.getObj().style.width=width+"px";this.getObj().style.height=iWorkspaceHeight+"px";for(var i=0;i<this.ContentArray.length;i++)
{this.HandleWorkArea(this.ContentArray[i],width,iWorkspaceHeight);}}
this.HandleWorkArea=function(oWorkArea,availableWidth,availableHeight){var SURROUND_MARGIN=5;availableWidth=availableWidth-(SURROUND_MARGIN*2);availableHeight=availableHeight-(SURROUND_MARGIN*2);oWorkArea.style.width=availableWidth+"px";oWorkArea.style.height=availableHeight+"px";var oChildren=getChildren(oWorkArea);if(oChildren.length==1||(oChildren.length==2&&oChildren[0].className=="disable_panel")){var oHolder=oChildren[0];oWorkArea.style.width=availableWidth+(SURROUND_MARGIN*2)+"px";oWorkArea.style.height=availableHeight+(SURROUND_MARGIN*2)+"px";return;}
var TOPBAR_PADDING=10;var SIDEBAR_BORDER=4;if(oChildren.length==2){var oTopBar=oChildren[0];var oHolder=oChildren[1];oTopBar.style.width=availableWidth-oTopBar.offsetLeft-TOPBAR_PADDING+"px";verifyHorizontalScrollability(oTopBar);oHolder.style.width=availableWidth+"px";oHolder.style.height=availableHeight-oHolder.offsetTop+"px";return;}
if(oChildren.length==3){var oTopBar=oChildren[0];var oSideBar=oChildren[1];var oHolder=oChildren[2];oTopBar.style.width=availableWidth-oTopBar.offsetLeft-TOPBAR_PADDING+"px";verifyHorizontalScrollability(oTopBar);var iSidebarWidth=oSideBar.offsetWidth;oSideBar.style.height=availableHeight-oSideBar.offsetTop-SIDEBAR_BORDER+"px";verifyVerticalScrollability(oSideBar);if(oHolder.nodeName!="A")
{var iOffsetTop=oHolder.offsetTop;oHolder.style.width=availableWidth-iSidebarWidth+"px";oHolder.style.height=(availableHeight-iOffsetTop)+"px";}
return;}};}
Workspace.prototype=new Widget();

