// DO NOT EDIT THIS FILE !!!!!
// Start include: EPASS_Compatibility.js
function EPASSCompatibility(  ){
_DOM = (document.getElementById) ? true : false;
_IE = (document.all) ? true : false;
_IE4 = _IE && !_DOM;
_IE5 = _IE && _DOM;
_Mac = (navigator.appVersion.indexOf("Mac") != -1);
_IE5M = _IE5 && _Mac;
_IEW = _IE && !_Mac;
_IE4W = _IE4 && _IEW;
_IE5W = _IE5 && _IEW;
_NS = navigator.appName == ("Netscape");
_NS4 = (document.layers) ? true : false;
_NS6 = ( _NS && (!_NS4) );
if(_IE5M) {
_DOM = false;
_IE4 = true
}
_dbg = true;
}
EPASSCompatibility.prototype.debug = function( str ){
if ( _dbg ){
alert( str );
}
}
EPASSCompatibility.prototype.isNN = function(  ){
return _NS4 || _NS6;
}
EPASSCompatibility.prototype.isNN4 = function(  ){
return _NS4;
}
EPASSCompatibility.prototype.isNN6 = function(  ){
return _NS6;
}
EPASSCompatibility.prototype.isIE = function(  ){
return _IE;
}
EPASSCompatibility.prototype.isIE5 = function(  ){
return _IE5;
}
EPASSCompatibility.prototype.hasDocALL = function(  ){
return _IE;
}
EPASSCompatibility.prototype.hasGetElementById = function(  ){
return _DOM;
}
EPASSCompatibility.prototype.hasDOM = function(  ){
return _DOM;
}
function enHex( aDigit ){
return("0123456789ABCDEF".substring(aDigit, aDigit+1))
}
function deHex( aDigit ){
return("0123456789ABCDEF".indexOf(aDigit))
}
function toHex( n )
{
return (enHex((0xf00000 & n) >> 20) +
enHex((0x0f0000 & n) >> 16) +
enHex((0x00f000 & n) >> 12) +
enHex((0x000f00 & n) >>  8) +
enHex((0x0000f0 & n) >>  4) +
enHex((0x00000f & n) >>  0))
}
function toDecimal( hexNum )
{
var tmp = ""+hexNum.toUpperCase()
while( tmp.length < 6 ){
tmp = "0"+tmp
}
return ((deHex(tmp.substring(0,1)) << 20) +
(deHex(tmp.substring(1,2)) << 16) +
(deHex(tmp.substring(2,3)) << 12) +
(deHex(tmp.substring(3,4)) << 8) +
(deHex(tmp.substring(4,5)) << 4) +
(deHex(tmp.substring(5,6))))
}
EPASSCompatibility.prototype.GetElementById = function( str ){
if ( this.hasGetElementById()){
return document.getElementById( str );
}
if ( this.hasDocALL() ){
return document.all[ str ];
}
if ( document.layers ){
return document.layers[ str ];
}
this.debug("Get Element By Id called for browser that doesnt support it");
return null;
}
EPASSCompatibility.prototype.GetElementsByTagName = function( str ){
if ( document.all ){
var rslt = new Array();
str = str.toUpperCase();
for ( var x=0; x<document.all.length; x++ ){
if ( str == document.all[x].tagName ){
rslt[rslt.length] = document.all[x];
}
}
return rslt;
}
if ( this.hasGetElementById()){
return document.getElementsByTagName( str );
}
this.debug("Get Elements By Tagname called for browser that doesnt support it");
return null;
}
EPASSCompatibility.prototype.GetElementFromArray = function( arry, str ){
for ( var x=0 ; x<arry.length; x++ ){
if ( arry[x].id ){
if ( arry[x].id == str ){
return arry[x];
}
}
}
return null;
}
EPASSCompatibility.prototype.GetAttribute = function( obj, str ){
if ( this.isNN6() ){
return obj.getAttribute( str );
}
return obj[str];
}
EPASSCompatibility.prototype.SetAttribute = function( obj, str, val ){
if ( this.isNN6() ){
obj.setAttribute( str, val );
} else {
obj[str] = val;
}
}
EPASSCompatibility.prototype.HandleResize = function( ){
if ( this.isNN4() ){
window.location.reload();
}
}
EPASSCompatibility.prototype.getLeftOffsetFromWindow = function( ele ){
var tot = 0;
while ( ele != null ){
tot += ele.offsetLeft;
ele = ele.offsetParent;
}
return tot;
}
var ec = new EPASSCompatibility();
var basePath = "/en/";
// End inlude
// Start include: nav.js
var NAV_DEBUG = false;
function NAV_SETDEBUG(v){
NAV_DEBUG = v;
return false;
}
var lastVal = "";
var EPASS_FRAMES_MAINMENU = "mainMenu";
var EPASS_FRAMES_MAINDATA = "mainData";
var EPASS_FRAMES_CONTROLPANEL = "controlPanel";
var EPASS_FRAMES_DUMMYPANEL = "dummyPanel";
var EPASS_FRAMES_USER_PANEL = "userPanel";
var EPASS_SREE_EXT = "portal";
var EPASS_NAV_NCX = "ncx";
var EPASS_NAV_NCK = "nck";
var EPASS_NAV_NMN = "nmn";
var EPASS_NAV_NAV = "nav";
var EPASS_NAV_IMAGE = "nmi";
var EPASS_NAV_COLOR = "nmc";
var EPASS_NAV_OBJECTTYPE_AREA = "are";
var EPASS_NAV_OBJECTTYPE_MENU = "mnu";
var EPASS_POPUPHELP = "0";
var controlWindow = null;
var NAV_IE4 = (document.all);
var NAV_IE5 = (NAV_IE4 && navigator.appVersion.indexOf("5.")!=-1);
var NAV_isMac = (navigator.appVersion.indexOf("Mac") != -1);
var NAV_INCLUDE_MAINFRAMES = true;
var NAV_DONT_CLOSE_POPUPS = false;
var GET_REUQEST_URL_LENGTH_LIMIT = 1500;
function NAV_needsEscape(inStr){
if (inStr.indexOf('%') > -1) return false;
if (inStr.indexOf('+') > -1) return true;
if (inStr.indexOf(' ') > -1) return true;
return false;
}
function _NAV_GetHRef( wind ){
var wLoc = '';
if ( wind != null && typeof (wind.PAGE_HREF ) != "undefined" ){
wLoc = wind.PAGE_HREF;
var nEps =   wLoc.indexOf('_eps_=Y?');
if(nEps > -1 && nEps < wLoc.length-1){
wLoc = wLoc.substring(0,nEps+7) + '&' + wLoc.substring(nEps+9, wLoc.length);
}
else if(nEps > -1){
wLoc = wLoc.substring(0,nEps+7);
}
}
else {
if ( ec.isIE5() == false && wind != null ){ // this stuff needs to be looked at again
wLoc = wind.location.href;
} else {
if ( wind != null ) // this stuff needs to be looked at again
wLoc = wind.location.href;
}
}
return wLoc;
}
function NAV_IS_PAGE_VOLATILE( wind ){
if (typeof(wind.NAV_VOLATILE) == "undefined"){
return false;
}
var volSeconds = wind.NAV_VOLATILE;
if (typeof(wind.NAV_LOADED_AT) == "undefined"){
return true;
}
var pageLoadTime = wind.NAV_LOADED_AT;
var refreshAt = new Date(pageLoadTime.setSeconds( pageLoadTime.getSeconds() + volSeconds));
if (new Date().valueOf() < refreshAt.valueOf()){
return false;
}
return true;
}
function NAV_removeHREF( sS ){
sS = NAV_FixExtension( sS );
if (sS[ sS.length-1 ] == '#'){
sS = sS.substring( 0, sS.length-1 );
} else {
var idxPound = sS.lastIndexOf( "#");
if (idxPound > -1){
sS = sS.substring( 0, idxPound );
}
}
return sS;
}
function NAV_RemoveTableModifiedUrl(sURL, sLoc){
if (sURL.length < sLoc.length) return sURL;
var idxPound = sURL.lastIndexOf( sLoc);
if (idxPound > -1){
if (sURL.length - idxPound == sLoc.length){
sURL = sURL.substring( 0, idxPound );
}
}
return sURL;
}
/* private */ function NAV_CLEAN_URL( sURL ){
sURL = NAV_removeHREF( sURL );
var sPars = sURL.split('?');
if (sPars.length == 1){
sPars[1]="";
}
var sS=sPars[0];
var parms = sPars[1].split("&");
var ss = "";
for (var x=0;x< parms.length;x++){
if (
(parms[x].indexOf(EPASS_NAV_IMAGE+"=",0) > -1) ||
(parms[x].indexOf(EPASS_NAV_COLOR+"=",0) > -1) ||
(parms[x].indexOf(EPASS_NAV_NCX+"=",0) > -1) ||
(parms[x].indexOf(EPASS_NAV_NCK+"=",0) > -1) ||
(parms[x].indexOf(EPASS_NAV_NMN+"=",0) > -1) ||
(parms[x].indexOf(EPASS_NAV_OBJECTTYPE_AREA+"=",0) > -1) ||
(parms[x].indexOf(EPASS_NAV_NAV+"=",0) > -1) )  {
} else {
sS = NAV_addParam(sS, parms[x]);
}
}
return sS;
}
function NAV_ModifyUrl(sURL, sContext, sType, sMenu, sClear, sColor, sImage, wind, additionalPars){
if ( typeof( sURL ) == "undefined" )
{
return sURL;
}
var sPars = sURL.split('?');
var sS = NAV_removeHREF(sPars[0]);
if (sPars.length == 1){
sPars[1]="";
}
if (sPars[1].length > 0){
if (wind != null){
if ( typeof( wind.EPASS_TableRepositionOnLoad )  != "undefined"){
if (wind.EPASS_TableRepositionOnLoad != null){
sPars[1] = NAV_RemoveTableModifiedUrl( sPars[1], wind.EPASS_TableRepositionOnLoad);
}
}
}
}
if (wind != null){
if (sPars[1].length == 0){
if ("undefined"==(""+wind.NAV_PARMS)){
} else {
sPars[1]=wind.NAV_PARMS;
}
}
}
var parms = sPars[1].split("&");
var ss = "";
for (var x=0;x< parms.length;x++){
if (
(parms[x].indexOf(EPASS_NAV_IMAGE+"=",0) > -1) ||
(parms[x].indexOf(EPASS_NAV_COLOR+"=",0) > -1) ||
(parms[x].indexOf(EPASS_NAV_NCX+"=",0) > -1) ||
(parms[x].indexOf(EPASS_NAV_NCK+"=",0) > -1) ||
(parms[x].indexOf(EPASS_NAV_NMN+"=",0) > -1) ||
(parms[x].indexOf(EPASS_NAV_OBJECTTYPE_AREA+"=",0) > -1) ||
(parms[x].indexOf(EPASS_NAV_NAV+"=",0) > -1)  ||
(parms[x].indexOf("old_visible=",0) > -1) ||
(parms[x].indexOf("pid",0) > -1) )  {
} else {
var foundInAdditional = false;
if(additionalPars != null){
var p = parms[x].split("=");
for(var i = 0; i < additionalPars.length; i++){
var nameValuePair = additionalPars[i].split(",");
if ( nameValuePair[0] == p[0] ){
foundInAdditional = true;
}
}
}
if (foundInAdditional == false ){
sS = NAV_addParam(sS, parms[x]);
}
}
}
if (sContext != ""){
sS = NAV_addParam2(sS, EPASS_NAV_NCX, sContext);
}
if ("Y" == sMenu){
sS = NAV_addParam2(sS, EPASS_NAV_NMN, sMenu);
}
sS = NAV_addParam2(sS, EPASS_NAV_NAV, sType);
sS = NAV_addParam2(sS, EPASS_NAV_NCK, sClear);
sS = NAV_addParam2(sS, EPASS_NAV_IMAGE, sImage);
sS = NAV_addParam2(sS, EPASS_NAV_COLOR, sColor);
if(additionalPars != null){
for(var i = 0; i < additionalPars.length; i++){
var nameValuePair = additionalPars[i].split(",");
sS = NAV_addParam2(sS, nameValuePair[0], nameValuePair[1]);
}
}
if (NAV_DEBUG){
alert("URL becomes: " + sS );
}
return sS;
}
function NAV_findMainWindow(wind){
while ( true ){
if (typeof(wind.top) == "undefined" || typeof(wind.top) == "unknown"){
} else {
wind = wind.top;
}
if (typeof(wind.opener) == "unknown"){
break;
}
if (null == wind.opener){
break;
}
if ("undefined" == (""+wind.opener)){
break;
}
if (wind.frames.length > 0){
for (var x=0;x<wind.frames.length;x++){
if (wind && wind.frames[x] && wind.frames[x].name
&& wind.frames[x].name == EPASS_FRAMES_CONTROLPANEL)
{
return wind;
}
}
}
wind = wind.opener;
}
return wind;
}
function NAV_ClosePopupsIfContextIsUnwanted(wind, contextString){
if (NAV_DONT_CLOSE_POPUPS) return;
var obj = contextString.split(',');
mainWind = NAV_findMainWindow(wind);
if (mainWind == null) return -1;        // Just in case we couldnt find the main window
NAV_findControlWindow(mainWind);
if (controlWindow == null) return;      // Just in case we couldnt find the main window
var allPopups = controlWindow.getAllOpenPopups();
var fms = new Array();
for (var x=0;x<allPopups.length;x++){
fms[ fms.length ] = allPopups[x];       // Get the window
NAV_recurseFill(allPopups[x], fms);
}
for (var x=0;x<fms.length;x++){
if ( (""+_NAV_GetHRef(fms[x])).indexOf("ViewAttachmentServlet") > -1){
continue;
}
var thisWindow = fms[x];
var vNAV_KEEPCONTEXT = "";
if ("undefined" == (""+fms[x].NAV_KEEPCONTEXT)){
} else {
vNAV_KEEPCONTEXT = fms[x].NAV_KEEPCONTEXT;
for (var ctIdx=0;ctIdx<obj.length;ctIdx++){
if ( vNAV_KEEPCONTEXT.indexOf( obj[ctIdx].substring(0,3) ) > -1){
if (vNAV_KEEPCONTEXT.indexOf( obj[ctIdx] ) < 0){
fms=null;
allPopups=null;
NAV_CloseNonHelpPopups(wind);
return true;    // No need to continue!
}
}
}
}
}
return false;
}
function NAV_recurseFill(wind, fms){
var x;
try{
if (typeof(wind) == "undefined" || !wind || typeof(wind.frames) == "unknown" || typeof(wind.frames) == 'undefined' || wind.frames == null ){
return;
}
for (x=0;x<wind.frames.length;x++){
if (NAV_INCLUDE_MAINFRAMES == false){
try{
if (EPASS_FRAMES_MAINDATA==wind.frames[x].name){
continue;
}
}catch(e){
continue;
}
}
fms[ fms.length ] = wind.frames[x];
if ( typeof( wind.frames[x] ) == "undefined" ) {
continue;
}
if (typeof( wind.frames[x].frames ) != "undefined" && wind.frames[x].frames.length > 0){
NAV_recurseFill(wind.frames[x], fms);
}
}
}catch(e){
}
}
var nameTest = null;
if (NAV_IE5){
nameTest = new Function( "fms", "nme",  " try { return (nme == fms.name) } catch (er) { return false; } " );
} else {
nameTest = new Function( "fms", "nme",  " return nme == fms.name " );
}
function NAV_findWindow(wind, nam){
var fms = new Array(0);
if ( typeof(wind) == "undefined" || !wind || typeof(wind.top) == "undefined" || typeof(wind.top) == "unknown"){
} else {
wind = wind.top;
}
NAV_recurseFill(wind, fms);
var x;
for (x=0;x<fms.length;x++){
if (NAV_IE5){
if (nameTest(fms[x], nam)){
return fms[x];
}
} else {
if (fms[x].name == nam) return fms[x];
}
}
return null;
}
function NAV_addParam2(sUrl, sPName, sPValue){
if (null == sPValue){
return sUrl;
}
if (isUndefined(sPValue)) return sUrl;
var pref = "?";
if (sUrl.indexOf("?",0) > -1){
pref = "&";
}
return sUrl + pref + sPName + "=" + encodeURI(sPValue);//PR-24262 encodeURI() is used for encoding instead of escape() since escape() is depricated.
}
function NAV_addParam(sUrl, sPName){
if (sPName.length == 0) return sUrl;
var pref = "?";
if (sUrl.indexOf("?",0) > -1){
pref = "&";
}
var splitUp = sPName.split("=");
if (splitUp.length == 1){
return sUrl + pref + sPName;
}
if (NAV_needsEscape(splitUp[1])){
return sUrl + pref + splitUp[0] + "=" + escape(splitUp[1]);
}
return sUrl + pref + sPName;
}
function NAV_findControlWindow(wind){
if (controlWindow != null){
return;
}
controlWindow = NAV_findWindow(wind, EPASS_FRAMES_CONTROLPANEL);
}
function NAV_CloseNonHelpPopups(wind){
NAV_findControlWindow(wind);
if (controlWindow != null){
if ("undefined" != (""+controlWindow.closeNonHelpPopups)){
controlWindow.closeNonHelpPopups(wind);
}
}
}
function isUndefined(myVar){
if (null == myVar) return true;
if ("undefined" == myVar) return true;
return false;
}
function notify_updatedFiltered( wind, contextString, sType){
var obj = contextString.split(',');
var objTypes = new Array();
var windReqNames = new Array();
for (var x=0;x<obj.length;x++){
if (obj[x].charAt(0) == ":"){
windReqNames[windReqNames.length] = obj[x].substring(1);
} else {
objTypes[objTypes.length] = obj[x].substring(0,3);
}
}
var fms = new Array(0);
fms[0]=wind;                         // Add the window to the list
NAV_recurseFill(wind, fms);
if (fms.length == 0){
fms[0] = wind;
}
var modFms = new Array();
for (var x=0;x<fms.length;x++){
if ( !fms[x] || !fms[x].NAV_LIST || "undefined" == (""+fms[x].NAV_LIST)){
if (fms[x].name == EPASS_FRAMES_USER_PANEL){
modFms[ modFms.length ] = fms[x];
}
} else {
for (var y=0;y<objTypes.length;y++){
if (fms[x].NAV_LIST.indexOf(objTypes[y]) > -1){
modFms[ modFms.length ] = fms[x];
break;
}
}
}
}
if (windReqNames.length > 0){
for (var y=0;y<windReqNames.length;y++){
var explicitFrame = NAV_findWindow(wind, windReqNames[y])
if (explicitFrame != null){
var needAdd = true;
for (var z=0;z<modFms.length;z++){
if (modFms[z].name == windReqNames[y]){
needAdd = false;
break;
}
}
if (needAdd){
modFms[modFms.length] = explicitFrame;
}
}
}
}
if (modFms.length != 0){
var sMenu  = '';
for (var x=0;x<modFms.length;x++){
modFms[x].NAV_SERVER_CTX="";
NAV_SetDynamicPageReposition( modFms[x] );
NAV_NotifyClientOfrefresh( modFms[x], sType );
if( modFms[x].pollRefreshMode == 'submit'){
modFms[x].submitAutoRefresh();
} else {
var urlMod = NAV_ModifyUrl(
_NAV_GetHRef(modFms[x]),
'',
sType,
sMenu,
null,
null,
null,
modFms[x]
);
if(typeof modFms[x].NAV_LIST_PROCESSOR != 'undefined'){
modFms[x].NAV_LIST_PROCESSOR(contextString, urlMod);
}
else{
if(urlMod.length < GET_REUQEST_URL_LENGTH_LIMIT){
modFms[x].setTimeout("location.replace('" + urlMod + "');", 1);
}
else{
modFms[x].setTimeout("NAV_refreshPageByPost('" + urlMod + "');", 1);
}
}
sMenu = '';
}
}
}
}
function isPrintWindow(wind){
var isPW = (typeof(window.NAV_PRINTPAGE) != "undefined");
if (isPW){
}
return isPW;
}
function NAV_Popup_NoReturn( srcwind, index, url , height, width ){
NAV_Popup( srcwind, index, url , height, width );
}
function NAV_PopupParams( params ){
return NAV_Popup(
params.srcwind || top,
params.index || 1,
params.url ,
params.height || null,
params.width || null,
params.openerFrame || null,
params.left || null,
params.top || null,
params.keepDimensions || null
);
}
function getCookie(c_name)
{
var retValue = "";
try
{
if (document.cookie.length>0)
{
c_start=document.cookie.indexOf(c_name + "=");
if (c_start!=-1)
{
c_start=c_start + c_name.length+1;
c_end=document.cookie.indexOf(";",c_start);
if (c_end==-1) c_end=document.cookie.length;
retValue = unescape(document.cookie.substring(c_start,c_end));
}
}
}
catch (err)
{
return retValue;
}
return retValue;
}
function NAV_Popup( srcwind, index, url , height, width, openerFrame, lft, tp, keepDimensions ){
var resWnd = null;
var isInLogin = ( (typeof(window.NAV_LOGIN) != "undefined") || (window.opener != null && typeof(window.opener.NAV_LOGIN) != "undefined") );
if (isPrintWindow(window)){
return;
}
url = NAV_FixExtension( url );
if  (""+window.toggleStick != "undefined"){
toggleStick();
}
wind = NAV_findMainWindow(srcwind);
NAV_findControlWindow(wind);
if (window.opener==null) //PR 28620
{
}
else
{
var isSurveyOnlyUser = false;
var roleId = getCookie('ROLE_ID');
if(  roleId!= '' && eval(roleId)==8900 )
{
isSurveyOnlyUser = true;
}
if (isInLogin==false && isSurveyOnlyUser==false){
if (controlWindow == null){
alert("This function cannot be performed at this time");
return;
}
}
}
try
{
var tempMenu = eval( "wind." + EPASS_FRAMES_MAINMENU );
if (tempMenu != null){
if ( typeof( tempMenu.closeDropDownMenu ) != "undefined" ){
tempMenu.closeDropDownMenu();
}
}
}
catch(err)
{
}
if ("undefined" == typeof height || height == null){
height = (screen.availHeight * .8);
}
if ("undefined" == typeof width || width == null){
width = (screen.availWidth * .5);
}
if (height.length > 0){
if (height.charAt( height.length-1 ) == "%"){
var hPerc = height.substring(0,height.length-1);
hPerc = hPerc * 1;
if (hPerc > 100){
hPerc = 100;
} else {
height = screen.availHeight * (hPerc / 100);
}
}
}
if (height == -2){
height = (screen.availHeight * .8);
}
if (height == -3){
height = (screen.availHeight * .8);
}
if (width.length > 0){
if (width.charAt( width.length-1 ) == "%"){
var wPerc = width.substring(0,width.length-1);
wPerc = wPerc * 1;
if (wPerc > 100){
wPerc = 100;
} else {
width = screen.availWidth * (wPerc / 100);
}
}
}
if (width == -2){
width = (screen.availWidth * .5);
}
if (width == -3){
width = (screen.availWidth * .8);
}
if (height == -1){
height = screen.availHeight;
}
if (height > screen.availHeight){
height = screen.availHeight;
}
if (width == -1){
width = screen.availWidth;
}
if (width > screen.availWidth){
width = screen.availWidth;
}
var vTop = 0, vLeft = 0;
if(lft){
vLeft = lft
}
else if (width != screen.availWidth){
vLeft = (screen.availWidth - width) / 2;
}
if(tp){
vTop = tp;
}
else if (height != screen.availHeight){
vTop = (screen.availHeight - height) / 2;
}
if (controlWindow == null){
if ( window.name == 'epassReg' ) {
resWnd = window.open( url, 'epassRegHelp',
'width=' + width + ',height=' + height +',resizable=yes,scrollbars=yes'+
',screenX=0,screenY=0,top='+vTop+',left='+vLeft+"'" );
} else {
resWnd = window.open( url, 'epassReg',
'width=' + width + ',height=' + height +',resizable=yes,scrollbars=yes'+
',screenX=0,screenY=0,top='+vTop+',left='+vLeft+"'" );
}
}
else
{
if( typeof openerFrame  != 'undefined' && openerFrame != null){
controlWindow.document.openerFrame = openerFrame;
}
if (url.length < GET_REUQEST_URL_LENGTH_LIMIT ){
resWnd = controlWindow.openPopup( wind, srcwind, index, url, height, width, vTop, vLeft, window, keepDimensions );
}
else{
resWnd = NAV_POPUPByPost(wind,srcwind, index, url, height, width, vTop, vLeft, window, keepDimensions);
}
if( ""+window.toggleStick != "undefined" )
{
toggleStick();
}
}
if( typeof openerFrame  != 'undefined' && openerFrame != null){
resWnd.openerFrame = openerFrame;
}
return resWnd;
}
function NAV_ReloadMain(wind, sURL){
wind = NAV_findMainWindow(wind);
var workMain = NAV_findWindow(wind, EPASS_FRAMES_MAINDATA);
if (workMain == null) return;
sURL = NAV_FixExtension( sURL );
workMain.setTimeout( "location.replace( '" + sURL + "')", 1 );
}
function NAV_NewWork(wind, sURL, sArea, sClear, sColor, sImage, confirmationMsg){
if(typeof confirmationMsg != 'undefined' && confirmationMsg != null){
if(!confirm(confirmationMsg)) return;
}
var mnu = null;
wind = NAV_findMainWindow(wind);
var workMain = NAV_findWindow(wind, EPASS_FRAMES_MAINDATA);
if (workMain == null){
var tempMenu = eval( "wind." + EPASS_FRAMES_MAINMENU ); //wind.mainMenu
var x=0;
for ( x=0;x<wind.frames.length;x++){
if (wind.frames[x] == tempMenu){
workMain = wind.frames[x+1];
break;
}
}
}
if ( workMain != null ) {
var codedArea = null;
if (!isUndefined(sArea)){
codedArea = EPASS_NAV_OBJECTTYPE_AREA + sArea;
}
mnu = NAV_findWindow(wind, EPASS_FRAMES_MAINMENU);
sURL = NAV_ModifyUrl(sURL, codedArea, "MENU", "Y", sClear, sColor, sImage, null);
var currentUrl = workMain.location.toString();
var urlMtch = currentUrl.match("^http://[^/]+(/[\\w\\d]{2}/.+)$");
if(urlMtch != null){
currentUrl = urlMtch[1];
}
workMain.NAV_SERVER_CTX="";
if(currentUrl == sURL)
workMain.location.reload(true);
else
workMain.location = sURL;
}
}
function NAV_AddImplicitPages(updatePages){
var wind = self;
if (wind.name == EPASS_FRAMES_MAINDATA){
return;
}
var pWind = wind.parent;
if (pWind == wind){
return; // This is a top level.  Most likely a popup window with no frames.
}
for (var x=0;x<pWind.frames.length;x++){
if (pWind[x] == wind){
} else {
var reloadIt = false;
if ("undefined" == (""+pWind[x].NAV_DEP)){
reloadIt=true;
}
if ("undefined" == (""+pWind[x].NAV_LIST)){
reloadIt=true;
}
if (reloadIt){
updatePages[ updatePages.length ] = pWind[x];
}
}
}
}
function NAV_Ctx( wind, contextString){
if (isPrintWindow(window)){
return;
}
this.NAV_VOLATILE=0;
var popsClosed = NAV_ClosePopupsIfContextIsUnwanted(wind, contextString);
var obj = contextString.split(',');
wind = NAV_findMainWindow(wind);
NAV_findControlWindow(wind);
if (controlWindow == null){
alert("This function cannot be performed at this time");
return;
}
var tempMenu = eval( "wind." + EPASS_FRAMES_MAINMENU );
if (tempMenu != null){
if ( typeof( tempMenu.closeDropDownMenu ) != "undefined" ){
tempMenu.closeDropDownMenu();
}
if (NAV_DEBUG == false){
NAV_DEBUG = tempMenu.NAV_DEBUG;
}
}
var objTypes = new Array();
var windReqNames = new Array();
for (var x=0;x<obj.length;x++){
if (obj[x].charAt(0) == ":"){
windReqNames[windReqNames.length] = obj[x].substring(1);
} else {
objTypes[objTypes.length] = obj[x].substring(0,3);
}
}
var fms = new Array(0);
NAV_recurseFill(wind, fms);
var allPopups = new Array();
if (controlWindow != null){
allPopups = controlWindow.getAllOpenPopups();
}
for (var x=0;x<allPopups.length;x++){
fms[ fms.length ] = allPopups[x];       // Get the window
NAV_recurseFill(allPopups[x], fms);
}
var modFms = new Array();
for (var x=0;x<fms.length;x++){
if ( (""+_NAV_GetHRef(fms[x])).indexOf("ViewAttachmentServlet") > -1){
continue;
}
if ("undefined" == (""+fms[x].NAV_DEP)){
if (fms[x].name == EPASS_FRAMES_USER_PANEL){
modFms[ modFms.length ] = fms[x];
}
}
else {
var nav_dep_list = fms[x].NAV_DEP;
if ("undefined" != (""+fms[x].NAV_LIST)){
if (this != fms[x]){
nav_dep_list = nav_dep_list + "," + fms[x].NAV_LIST;
}
}
if (NAV_DEBUG){
alert("Possible: " + fms[x].name + " " + fms[x].NAV_DEP );
}
var bIsVolatile = NAV_IS_PAGE_VOLATILE(fms[x]);
var serverContextString = "";
if ( typeof(fms[x].NAV_SERVER_CTX) != "undefined" ){
serverContextString = fms[x].NAV_SERVER_CTX;
}
for (var y=0;y<objTypes.length;y++){
if (nav_dep_list.indexOf(objTypes[y]) > -1){
if (NAV_DEBUG){
alert("YES: " + fms[x].name );
}
if (bIsVolatile == false){
if (serverContextString.indexOf( ","+obj[y]+"," ) > -1){
if (NAV_DEBUG){
alert("Found: " + ","+obj[y]+"," + " in : " + serverContextString);
}
} else {
if (NAV_DEBUG){
alert("Not Found: " + ","+obj[y]+"," + " in : " + serverContextString);
}
modFms[ modFms.length ] = fms[x];
break;
}
} else {
modFms[ modFms.length ] = fms[x];
break;
}
}
}
}
}
if (windReqNames.length > 0){
for (var y=0;y<windReqNames.length;y++){
var explicitFrame = NAV_findWindow(wind, windReqNames[y])
if (explicitFrame != null){
var needAdd = true;
for (var z=0;z<modFms.length;z++){
if (modFms[z].name == windReqNames[y]){
needAdd = false;
break;
}
}
if (needAdd){
modFms[modFms.length] = explicitFrame;
}
}
}
}
NAV_AddImplicitPages( modFms);
if (modFms.length == 0){
var dummyFrame = NAV_findWindow(wind, EPASS_FRAMES_DUMMYPANEL);
if (dummyFrame != null){
modFms[ modFms.length ] = dummyFrame;
}
}
if (modFms.length == 0){
alert("This function cannot be performed at this time");
}
else {
var sMenu  = 'Y';
for (var x=0;x<modFms.length;x++){
if (NAV_DEBUG){
alert("Ctx change: " + _NAV_GetHRef(modFms[x]) );
}
NAV_NotifyClientOfrefresh( modFms[x], "CTX" );
modFms[x].NAV_SERVER_CTX="";
var urlMod = NAV_ModifyUrl(
_NAV_GetHRef(modFms[x]),
contextString,
"CTX",
sMenu,
null,
null,
null,
modFms[x]
);
if(typeof modFms[x].NAV_DEP_PROCESSOR != 'undefined'){
modFms[x].NAV_DEP_PROCESSOR(contextString, urlMod);
}
else{
if(urlMod.length < GET_REUQEST_URL_LENGTH_LIMIT){
modFms[x].setTimeout("location.replace('" + urlMod + "');", 1);
}
else{
modFms[x].setTimeout("NAV_refreshPageByPost('" + urlMod + "');", 1);
}
}
}
sMenu  = '';
}
}
function NAV_NotifyClientOfrefresh( wind, reason ){
try{
var shouldNotifyReload = false;
shouldNotifyReload = ((typeof(wind) != "undefined") && (typeof(wind.NAV_NotifyOnReload) != "undefined"));
if(shouldNotifyReload){
wind.NAV_NotifyOnReload(reason);
}
}catch(e){
}
}
function NAV_CtxAndUpdate( wind, contextString){
if (isPrintWindow(window)){
return;
}
NAV_ClosePopupsIfContextIsUnwanted(wind, contextString);    // KILL POPUPS THAT USE CONTEXT BETWEEN LOADS
var obj = contextString.split(',');
wind = NAV_findMainWindow(wind);
NAV_findControlWindow(wind);
var tempMenu = eval( "wind." + EPASS_FRAMES_MAINMENU );
if (tempMenu != null){
if ( typeof( tempMenu.closeDropDownMenu ) != "undefined" ){
tempMenu.closeDropDownMenu();
}
}
var objTypes = new Array();
var windReqNames = new Array();
for (var x=0;x<obj.length;x++){
if (obj[x].charAt(0) == ":"){
windReqNames[windReqNames.length] = obj[x].substring(1);
} else {
objTypes[objTypes.length] = obj[x].substring(0,3);
}
}
var fms = new Array(0);
NAV_recurseFill(wind, fms);
var allPopups = new Array();
if (controlWindow != null){
allPopups = controlWindow.getAllOpenPopups();
}
for (var x=0;x<allPopups.length;x++){
fms[ fms.length ] = allPopups[x];       // Get the window
NAV_recurseFill(allPopups[x], fms);
}
var modFms = new Array();
for (var x=0;x<fms.length;x++){
var vDEP = "";
var vLIST = "";
if ("undefined" == (""+fms[x].NAV_DEP)){
} else {
vDEP = fms[x].NAV_DEP;
}
if ("undefined" == (""+fms[x].NAV_LIST)){
} else {
vLIST = fms[x].NAV_LIST;
}
for (var y=0;y<objTypes.length;y++){
if (vDEP.indexOf(objTypes[y]) > -1){
modFms[ modFms.length ] = fms[x];
break;
}
if (vLIST.indexOf(objTypes[y]) > -1){
modFms[ modFms.length ] = fms[x];
break;
}
}
}
if (windReqNames.length > 0){
for (var y=0;y<windReqNames.length;y++){
var explicitFrame = NAV_findWindow(wind, windReqNames[y])
if (explicitFrame != null){
var needAdd = true;
for (var z=0;z<modFms.length;z++){
if (modFms[z].name == windReqNames[y]){
needAdd = false;
break;
}
}
if (needAdd){
modFms[modFms.length] = explicitFrame;
}
}
}
}
NAV_AddImplicitPages( modFms);
if (modFms.length == 0){
var dummyFrame = NAV_findWindow(wind, EPASS_FRAMES_DUMMYPANEL);
if (dummyFrame != null){
modFms[ modFms.length ] = dummyFrame;
}
}
if (modFms.length == 0){
alert("This function cannot be performed at this time");
}
else {
var sMenu  = 'Y';
for (var x=0;x<modFms.length;x++){
modFms[x].NAV_SERVER_CTX="";
NAV_NotifyClientOfrefresh( modFms[x], "CTX" );
if (typeof(_NAV_GetHRef(modFms[x])) != "undefined") {
var modUrl = NAV_ModifyUrl(
_NAV_GetHRef(modFms[x]),
contextString,
"CTX",
sMenu,
null,
null,
null,
modFms[x]
);
if(typeof modFms[x].NAV_DEP_PROCESSOR != 'undefined'){
modFms[x].NAV_DEP_PROCESSOR(contextString, modUrl);
}
else{
modFms[x].setTimeout("location.replace('" + modUrl + "');", 1);
}
}
sMenu = '';
}
}
}
function NAV_Updated( wind, contextString){
if (isPrintWindow(window)){
return;
}
var objTypes = contextString.split(',');
wind = NAV_findMainWindow(wind);
NAV_findControlWindow(wind);
var tempMenu = null;
try{
tempMenu = eval( "wind." + EPASS_FRAMES_MAINMENU );
}catch(e){ return;}
if (tempMenu != null){
if ( typeof( tempMenu.closeDropDownMenu ) != "undefined" ){
tempMenu.closeDropDownMenu();
}
}
var allPopups = new Array();
if (controlWindow != null){
allPopups = controlWindow.getAllOpenPopups();
}
if (wind != null) notify_updatedFiltered( wind, contextString, "UPDATE");
for (var x=0;x<allPopups.length;x++){
notify_updatedFiltered( allPopups[x], contextString, "UPDATE");
}
}
function NAV_FilterChange( wind, contextString){
if (isPrintWindow(window)){
return;
}
var objTypes = contextString.split(',');
wind = NAV_findMainWindow(wind);
NAV_findControlWindow(wind);
var tempMenu = eval( "wind." + EPASS_FRAMES_MAINMENU );
if (tempMenu != null){
if ( typeof( tempMenu.closeDropDownMenu ) != "undefined" ){
tempMenu.closeDropDownMenu();
}
}
var allPopups = new Array();
if (controlWindow != null){
allPopups = controlWindow.getAllOpenPopups();
}
if (wind != null) notify_updatedFiltered( wind, contextString, "FILTER");
for (var x=0;x<allPopups.length;x++){
notify_updatedFiltered( allPopups[x], contextString, "FILTER");
}
}
function NAV_SetMenu( wind, mlevel){
wind = NAV_findMainWindow(wind);
menuWind = NAV_findWindow(wind, EPASS_FRAMES_MAINMENU);
if (menuWind == null) return; // Shouldnt happen
menuWind.NAV_SERVER_CTX="";
var modUrl = NAV_ModifyUrl( _NAV_GetHRef(menuWind),EPASS_NAV_OBJECTTYPE_MENU+mlevel,"CTX","",null,null,null,menuWind);
menuWind.setTimeout("location.replace('"+ modUrl + "');", 1);
}
function NAV_MenuContextUpdate( wind, contextString){
var workMain = NAV_findWindow(wind, EPASS_FRAMES_MAINMENU);
if (workMain == null){
return;
}
workMain.EPASS_MENU_ENABLED = contextString;
}
function NAV_GetTopPanel(wind){
wind = NAV_findMainWindow(wind);
var workMain = NAV_findWindow(wind, EPASS_FRAMES_MAINMENU);
if (workMain == null){
return top;
}
return workMain.parent;
}
function NAV_ExecuteMenu( wind, menuItem ){
if (isPrintWindow(window)){
return;
}
wind = NAV_findMainWindow(wind);
var menuWind = NAV_findWindow(wind, EPASS_FRAMES_MAINMENU);
if (menuWind == null) return; // Shouldnt happen
if ( typeof( menuWind.closeDropDownMenu ) != "undefined" ){
menuWind.closeDropDownMenu();
}
if ("undefined" == (""+menuWind.menuIDCode)) return;
var menuIDCount = menuWind.menuIDCode.length / 3;
var itemNum = 0;
var index = 0;
while (itemNum < menuIDCount){
index = (itemNum * 3);
if (menuWind.menuIDCode[index] == menuItem){
var mCode = menuWind.menuIDCode[index+1];
if (menuWind.EPASS_MENU_ENABLED.indexOf(","+mCode+",") > -1){
menuWind.executeMenuFunction( menuWind.menuIDCode[index+2] , null, null, null );
return;
} else {
return;
}
}
itemNum++;
}
}
function NAV_IsMenuLoaded(wind){
wind = NAV_findMainWindow(wind);
var menuWind = NAV_findWindow(wind, EPASS_FRAMES_MAINMENU);
if (menuWind == null) return false; // Shouldnt happen
if ("undefined" == typeof(menuWind.menuIDCode)) return false;
if ("undefined" == typeof(menuWind.menuIDCode.length)) return false;
if ("undefined" == typeof(menuWind.MENULOADED)) return false;
return true;
}
function NAV_ISMenuItemActive( wind, menuItem ){
wind = NAV_findMainWindow(wind);
var menuWind = NAV_findWindow(wind, EPASS_FRAMES_MAINMENU);
if (menuWind == null) return false; // Shouldnt happen
if ("undefined" == typeof(menuWind.menuIDCode)) return false;
if ("undefined" == typeof(menuWind.menuIDCode.length)) return false;
var menuIDCount = menuWind.menuIDCode.length / 3;
var itemNum = 0;
var index = 0;
while (itemNum < menuIDCount){
index = (itemNum * 3);
if (menuWind.menuIDCode[index] == menuItem){
var mCode = menuWind.menuIDCode[index+1];
if (menuWind.EPASS_MENU_ENABLED.indexOf(","+mCode+",") > -1){
return true;
} else {
return false;
}
}
itemNum++;
}
return false;
}
function NAV_FireEvent( wind, eventName, eventData, handlingFunctionName){
if(typeof handlingFunctionName == 'undefined' || handlingFunctionName == '' ){
handlingFunctionName = 'NAV_HandleEvent';
}
var extendedFunctionName = handlingFunctionName + "_" + eventName;
if (isPrintWindow(window)){
return;
}
wind = NAV_findMainWindow(wind);
NAV_findControlWindow(wind);
var fms = new Array(0);
NAV_recurseFill(wind, fms);         // Gets the main window
var allPopups = new Array();
if( controlWindow != null
&&
typeof(controlWindow) != 'undefined'
&&
typeof(controlWindow.getAllOpenPopups) != 'undefined'
)
{
allPopups = controlWindow.getAllOpenPopups();
}
for (var x=0;x<allPopups.length;x++){
fms[ fms.length ] = allPopups[x];       // Get the window
NAV_recurseFill(allPopups[x], fms);
}
if (fms.length == 0){
return;
}
if ( typeof(eventData) != 'undefined' && eventData != null && typeof(eventData.replace) != 'undefined' ) {
eventData = eventData.replace(RegExp("'", "g"), "\\'");
}
if ( typeof(eventName) != 'undefined' && typeof(eventName.replace) != 'undefined' ) {
eventName = eventName.replace(RegExp("'", "g"), "\\'");
}
for (var x=0;x<fms.length;x++){
try {
if ( typeof fms[x]  == 'undefined'){
continue;
}
var handlingFunction = fms[x][handlingFunctionName];
var extendedFunction = fms[x][extendedFunctionName];
if (typeof  extendedFunction != 'undefined' ) {
extendedFunction(eventData);
}
if (typeof handlingFunction != 'undefined' ) {
handlingFunction(eventName,eventData);
}
}catch(e){}
}
}
function NAV_SendSearchResult( wind, eventName, eventData){
wind = NAV_findMainWindow(wind);
NAV_findControlWindow(wind);
var fms = new Array(0);
NAV_recurseFill(wind, fms);         // Gets the main window
var allPopups = new Array();
if (controlWindow != null){
allPopups = controlWindow.getAllOpenPopups();
}
for (var x=0;x<allPopups.length;x++){
fms[ fms.length ] = allPopups[x];       // Get the window
NAV_recurseFill(allPopups[x], fms);
}
if (fms.length == 0){
return;
}
for (var x=0;x<fms.length;x++){
if (""+fms[x].NAV_HandleSearchResult == "undefined"){
} else {
fms[x].NAV_HandleSearchResult(eventName, eventData);
}
}
}
function NAV_CENTER( wind, color, image, areaID){
wind = NAV_findMainWindow(wind);
NAV_findControlWindow(wind);
var mnu = NAV_findWindow(wind, EPASS_FRAMES_MAINMENU);
if (mnu != null){
if  (""+mnu.changeBar != "undefined"){
mnu.changeBar(color);
}
if  (""+mnu.setAreaImage != "undefined"){
mnu.setAreaImage(image);
}
if ( ""+mnu.setAreaId != "undefined"){
mnu.setAreaId(areaID);
}
}
}
function checkAndSwitch( val, imgOn, imgOff ){
if( lastVal != "" ){
if( document.images[lastVal] ){
document.images[lastVal].src = imgOff;
}
}
if( document.images[val] ){
document.images[val].src = imgOn;
}
lastVal = val;
}
var list_oldclass = "";
var list_highrow  = "";
function highlightRow(rowid){
if( document.all ){  // only IE - 9-5-08: this style of IE checking is depricated. most browsers support document.all
if( list_highrow != "" && document.all[list_highrow] ){  // set back previous row's class
eval("document.all('" + list_highrow + "').className = '" + list_oldclass + "'") ;
}
if( document.all[rowid] ){
list_oldclass = eval("document.all('" + rowid + "').className");
eval("document.all('" + rowid + "').className = 'highrow'") ;
}
list_highrow = rowid;
} else {
if (list_highrow != ""){
list_highrow.className = list_oldclass;
}
var theRow = document.getElementById(rowid);
if (typeof(theRow) != 'undefined' && theRow != null ) {
list_oldclass = theRow.className;
theRow.className = "highrow";
list_highrow = theRow;
}
}
}
function highlightRowByElem(elem, isHilite){
var parentRow = elem.parentNode;
var nn = 0;
while(parentRow.tagName.toLowerCase() != 'tr' && nn++ < 25){
parentRow = parentRow.parentNode;
}
if(parentRow.tagName.toLowerCase() != 'tr'){
alert("Could not find row to highlight.");
return;
}
if(isHilite){
list_oldclass = parentRow.className;
parentRow.className = "highrow"
}
else if(list_oldclass != ""){
parentRow.className = list_oldclass;
}
}
function NAV_GetIndexOfPopup(wind){
mainWind = NAV_findMainWindow(wind);
if (mainWind == null) return -1;        // Just in case we couldnt find the main window
NAV_findControlWindow(mainWind);
var allPopups = new Array();
if (controlWindow == null) return -1;       // Just in case we couldnt find the main window
return controlWindow.findIndexOfWindow(wind);
}
function NAV_RemoveWindowFromOpenList(wind, index){
if (index == -1) return;
mainWind = NAV_findMainWindow(wind);
if (mainWind == null) return;       // Just in case we couldnt find the main window
NAV_findControlWindow(mainWind);
if (controlWindow == null) return;      // Just in case we couldnt find the main window
controlWindow.clearPopupIndex(wind,index);
}
function NAV_AddWindowToOpenList(wind){
mainWind = NAV_findMainWindow(wind);
if (mainWind == null) return;       // Just in case we couldnt find the main window
NAV_findControlWindow(mainWind);
if (controlWindow == null) return;      // Just in case we couldnt find the main window
controlWindow.addWindowToPopupList(wind);
}
function NAV_getPureHref(sURL){
var url = sURL + '';
var index = url.indexOf('?');
if(index>0){
url = url.substring(0, index);
}
return url;
}
function NAV_GetMenuFrame(wind){
wind = NAV_findMainWindow(wind);
if (wind == null){
return null;
}
return  NAV_findWindow(wind, EPASS_FRAMES_MAINMENU);
}
function NAV_Reload(wind,additionalPars){
try {
if (""+wind.NAV_ReloadVeto == "undefined"){
} else {
var rslt = wind.NAV_ReloadVeto();
if ( rslt == false ){
return false;       // No reload being performed.
}
}
}catch(e){}
var sUrl = _NAV_GetHRef(wind);
if ( wind != null )
wind.NAV_SERVER_CTX="";
NAV_NotifyClientOfrefresh( wind, "RELOAD" );
var modUrl = NAV_ModifyUrl( sUrl, "", "RELOAD", null, null, null, null, wind, additionalPars);
if ( wind != null )
wind.setTimeout(function() {wind.location.href=modUrl;}, 1);
return true;
}
function NAV_DeamonReload(wind,additionalPars){
var _dc = 0;    // deamon count
NAV_findControlWindow(top);
if (controlWindow != null) {
_dc = controlWindow.getDeamonCount();
}
var parms = null;
if ( additionalPars != null ){
parms = additionalPars;
} else {
parms = new Array();
}
parms[parms.length]="_DEAMON_," + _dc;
NAV_Reload( wind, parms );
}
function NAV_PollRefresh(wind,additionalPars){
if( wind.pollRefreshMode == 'submit'){
wind.submitAutoRefresh();
}
else{
NAV_SetDynamicPageReposition( wind );
wind.EPASS_POLL_COMMANDS = "";      // So it wont do it again
var sUrl = _NAV_GetHRef(wind);
wind.NAV_SERVER_CTX="";
var modUrl = NAV_ModifyUrl( sUrl, "", "POLL", null, null, null, null, wind, additionalPars);
wind.setTimeout("location.href='" + modUrl + "';", 1);
}
}
function NAV_NewWorkAndCtx(wind, ctx, sURL, sArea, sClear, sColor, sImage, confirmationMsg){
if (isPrintWindow(window)){
return;
}
NAV_Disable_MainWindow(wind);
NAV_Ctx( wind, ctx);
NAV_Enable_MainWindow(wind);
if ( ctx ){
sArea = sArea + "," + ctx;
}
NAV_NewWork(wind, sURL, sArea, sClear, sColor, sImage, confirmationMsg);
}
function NAV_NewWorkAndCtxAndUpdate(wind, ctx, sURL, sArea, sClear, sColor, sImage, confirmationMsg){
if (isPrintWindow(window)){
return;
}
NAV_Disable_MainWindow(wind);
NAV_CtxAndUpdate( wind, ctx);
NAV_Enable_MainWindow(wind);
if ( ctx ){
sArea = sArea + "," + ctx;
}
NAV_NewWork(wind, sURL, sArea, sClear, sColor, sImage, confirmationMsg);
}
function NAV_Disable_MainWindow(wind){
NAV_INCLUDE_MAINFRAMES = false;
}
function NAV_Enable_MainWindow(wind){
NAV_INCLUDE_MAINFRAMES = true;
}
function NAV_Status( sts ){
if (typeof(sts) != "undefined"){
sts = sts.replace( "&nbsp;", " ");
window.status = sts;
} else {
window.status = "";
}
return true;
}
function NAV_URL_CB(sUrl){
NAV_LOAD_CB(this, sUrl);
}
function NAV_LOAD_CB(wind, sUrl){
if (isPrintWindow(window)){
return;
}
if (""+wind.NAV_ReloadVeto == "undefined"){
} else {
var rslt = wind.NAV_ReloadVeto();
if ( rslt == false ){
return false;       // No reload being performed.
}
}
var frm = null;
var frmResolver = !( typeof(_NAV_ResolveCheckboxId) == "undefined" );
for (var x=0;x<wind.document.forms.length;x++){
var cForm = wind.document.forms[x];
for (var ele=0;ele<cForm.elements.length;ele++){
var cEle=cForm.elements[ele];
if (cEle.name == "EPASS_SEL_OBJ"){
frm = cForm;
break;
}
}
}
if (frm == null){
var modUrl = NAV_ModifyUrl( sUrl, "", null, null, null, null, null, this, null);
if(modUrl.length < GET_REUQEST_URL_LENGTH_LIMIT)
this.setTimeout("location.href='" + modUrl + "';", 1);
else
this.setTimeout("NAV_refreshPageByPost('" + modUrl + "')", 10);
return;
}
var checkBoxes = new Array();
checkBoxes = EPASSCheckbox.getValues(frm.EPASS_SEL_OBJ);
var selectedIds = "";
for(var i = 0; i < checkBoxes.length; i++){
if (selectedIds != ""){
selectedIds += '+';
}
if (frmResolver){
selectedIds += _NAV_ResolveCheckboxId(checkBoxes[i]);
} else {
selectedIds += checkBoxes[i];
}
}
var additionalParams = new Array();
if (selectedIds.length > 0){
additionalParams[0] = "_CB_," + selectedIds;
}
var modUrl = NAV_ModifyUrl( sUrl, "", null, null, null, null, null, this, additionalParams);
if(modUrl.length < GET_REUQEST_URL_LENGTH_LIMIT)
this.setTimeout("location.href = '" + modUrl + "';", 1);
else
this.setTimeout("NAV_refreshPageByPost('" + modUrl + "')", 10);
}
function NAV_refreshPageByPost(refreshUrl){
var urlParts =  refreshUrl.split('?');
var refreshUri = urlParts[0];
var refreshParams = urlParts[1].split('&');
var postForm = document.createElement('form');
postForm.method = 'POST';
postForm.action = refreshUri;
for(var i = 0; i < refreshParams.length; i++){
if(refreshParams[i] == '') continue;
var nameVal = refreshParams[i].split('=');
var fld = document.createElement('input');
fld.type = 'hidden';
fld.name = nameVal[0];
var val = nameVal[1];
val = val.replace(/\+/g," ");
fld.value = unescape(val);
postForm.appendChild(fld);
}
document.body.appendChild(postForm);
postForm.submit();
}
function NAV_POPUPByPost(wind,srcwind, index, url, height, width, vTop, vLeft, window, keepDimensions){
var urlParts =  url.split('?');
var refreshUri = urlParts[0];
var refreshParams = urlParts[1].split('&');
var newWindow = controlWindow.openPopup( wind, srcwind, index, '/blank.html', height, width, vTop, vLeft, window, keepDimensions );
if (!newWindow)
return false;
newWindow.document.write("<html><head></head><body></body></html>");
var postForm = newWindow.document.createElement('form');
postForm.method = 'POST';
postForm.action = refreshUri;
postForm.id='postFormId'
for(var i = 0; i < refreshParams.length; i++){
if(refreshParams[i] == '') continue;
var nameVal = refreshParams[i].split('=');
var fld = newWindow.document.createElement('input');
fld.type = 'hidden';
fld.name = nameVal[0];
var val = nameVal[1];
val = val.replace(/\+/g," ");
fld.value = decodeURIComponent(val);
postForm.appendChild(fld);
}
newWindow.document.body.appendChild(postForm);
newWindow.document.write("<script type='text/javascript'>document.getElementById(\"postFormId\").submit()</script>");
return newWindow;
}
function NAV_forcePriorRowsDisplay(forceDisplay){
var loc = window.location.toString();
var pUri = loc.split('?')[0];
var parms = window.NAV_PARMS;
if(parms.indexOf("QUERY_INPUT") > -1){
parms += "&jspAction=25";
}
if(parms.charAt(0) == '&') parms = parms.substring(1,parms.length);
var cbPattern = new RegExp(/(_CB_=[^&]+[&]*)/);
var mtch = parms.match(cbPattern)
if(mtch != null){
parms = parms.replace(mtch[1],'')
}
if(parms.indexOf( "SELECT_ALL_ROWS") > -1){
parms = parms.replace(/[&]?SELECT_ALL_ROWS=true/,"");
}
if(forceDisplay){
if(parms.indexOf( "DISPLAY_PRIOR_SELECTED") < 0){
parms += "&DISPLAY_PRIOR_SELECTED=true"
}
}
else{
if(parms.indexOf( "DISPLAY_PRIOR_SELECTED") > -1){
parms = parms.replace(/[&]?DISPLAY_PRIOR_SELECTED=true/,"");
}
}
var fullViewUrl = pUri + '?' + parms;
NAV_LOAD_CB(window, fullViewUrl);
}
function NAV_getServerTime(){
NAV_findControlWindow( NAV_findMainWindow( top )  );
if (controlWindow == null) return new Date();       // Just in case we couldnt find the main window
if (typeof( controlWindow.getServerTime ) == "undefined" ){
return new Date();
}
return new Date(controlWindow.getServerTime());
}
function X_NAV_SetClock( timeMillis ){
NAV_findControlWindow(top);
if (controlWindow == null) return 1000;     // Just in case we couldnt find the main window
var ctlPanel = controlWindow;
if (ctlPanel.TIMERINITAT == 0){
return 1000;    // we havent done one yet
}
var errorReset = false;
var currTime = (new Date()).getTime();
if ( typeof(ctlPanel.TIMERINITAT) == "undefined" ) {
return 1000;
}
ctlPanel.TIMERCALLS = ctlPanel.TIMERCALLS + 1;
var error = (currTime - ctlPanel.TIMERINITAT)/2;
if (ctlPanel.TIMERERROR == -1){
ctlPanel.TIMERERROR = error;
errorReset = true;
} else {
if (ctlPanel.TIMERERROR > error){
ctlPanel.TIMERERROR = error;
errorReset = true;
}
}
if (errorReset == true){
ctlPanel.resetServerTime(  timeMillis );
} else {
ctlPanel.TIMERCALLSSINCEFASTEST = ctlPanel.TIMERCALLSSINCEFASTEST + 1;
}
if (ctlPanel.TIMERCALLSSINCEFASTEST > ctlPanel.TIMESHUTDOWNWHEN){
return -1;
}
return 15000;
}
function NAV_SetClock( timeMillis ){
var QUICKRELOAD = 1000; // 1 sec
var NORMALRELOAD = 15000; // 15 sec
var SLOWRELOAD = 60000; // 1 min
var TOLERANCE = 1000;   // 1 second
var CTL_LEN_MAX = 5;
var DO_TIMER_ADJUST = true;
NAV_findControlWindow(top);
if (controlWindow == null) return QUICKRELOAD;      // Just in case we couldnt find the main window
var ctlPanel = controlWindow;
if ( typeof(ctlPanel.NAV_PARMS) == "undefined" ) {
return QUICKRELOAD;
}
if ( typeof(ctlPanel.TIMERINITAT) == "undefined" ) {
return QUICKRELOAD;
}
if ( typeof(ctlPanel.resetServerTime) == "undefined"){
return QUICKRELOAD;
}
if (ctlPanel.TIMERINITAT == 0){
return QUICKRELOAD; // we havent done one yet
}
var currTime = (new Date()).getTime();
var error = (currTime - ctlPanel.TIMERINITAT)/2;
ctlPanel.TIMERERROR = error;
ctlPanel.resetServerTime(  timeMillis );
ctlPanel.TIMERRECEIVED = currTime;
if (DO_TIMER_ADJUST){
if ( typeof(ctlPanel.TIMERHISTORY) == "undefined" ) {
ctlPanel.TIMERHISTORY = new Array();
}
if ( ctlPanel.TIMERHISTORY.length < CTL_LEN_MAX ){
ctlPanel.TIMERHISTORY[ctlPanel.TIMERHISTORY.length ] = ( ctlPanel.SERVER_OFFSET + ctlPanel.TIMERERROR );
} else {
var x;
for ( x=1;x<ctlPanel.TIMERHISTORY.length;x++){
ctlPanel.TIMERHISTORY[x-1] = ctlPanel.TIMERHISTORY[x];
}
ctlPanel.TIMERHISTORY[ctlPanel.TIMERHISTORY.length - 1] = ( ctlPanel.SERVER_OFFSET + ctlPanel.TIMERERROR );
}
if ( ctlPanel.TIMERHISTORY.length == CTL_LEN_MAX){
for (var x=1;x<ctlPanel.TIMERHISTORY.length;x++){
if ( Math.abs( ctlPanel.TIMERHISTORY[x-1] -  ctlPanel.TIMERHISTORY[x] ) > TOLERANCE ){
return NORMALRELOAD;
}
}
if ( Math.abs( ctlPanel.TIMERHISTORY[0] -  ctlPanel.TIMERHISTORY[ CTL_LEN_MAX - 1]) > TOLERANCE){
return NORMALRELOAD;
}
return SLOWRELOAD;
}
}
return NORMALRELOAD;
}
function NAV_CtlPanelTimeInfo(){
NAV_findControlWindow(top);
if (controlWindow == null) return;      // Just in case we couldnt find the main window
var cp = controlWindow;
if ( typeof(cp.TIMERINITAT) == "undefined" ) {
return "N/A";
}
return "CP: TimeError:" + cp.TIMERERROR + " SO:" + cp.SERVER_OFFSET;
}
function NAV_PopupSpecificHelp(top, helpPageName ){
var helpRouterUrl = basePath + 'help_router.jsp?H=' + helpPageName;
NAV_Popup( top , 0 , helpRouterUrl  ,-2, -2);
}
function NAV_PopupSpecificHelpGuest(top, helpPageName ){
var helpRouterUrl = basePath + 'help_router.jsp?guest=true&H=' + helpPageName;
NAV_Popup( top , 0 , helpRouterUrl  ,-2, -2);
}
function NAV_PopupHelp( wind, cmd, isMainArea ){
if ( "HELP_AUTODETECT" == cmd ){
cmd = NAV_removeHREF( _NAV_GetHRef( wind.top )  );
}
NAV_findControlWindow( NAV_findMainWindow( wind.top ));
var page = basePath + 'help_router.jsp';
if ( typeof(isMainArea)=="undefined"){
isMainArea = false;
}
if (controlWindow != null){
if (isMainArea == false){
var sPars = cmd.split('?');
var lastSlash = sPars[0].lastIndexOf("/");
if (lastSlash > -1){
sPars[0]=sPars[0].substring( lastSlash+1 );
}
if (sPars.length == 1){
sPars[1]="";
}
sPars[0] = NAV_removeHREF( sPars[0] );
if (sPars[1].length == 0){
if ("undefined"==(""+wind.NAV_PARMS)){
} else {
sPars[1]=wind.NAV_PARMS;
}
}
var sArgs = sPars[1].split("&");
var appendChar = "?";
for (var x=0;x<sArgs.length;x++){
if ( (sArgs[x].length - sArgs[x].indexOf("=") ) < 5 ){
sPars[0]=sPars[0] + appendChar + sArgs[x];
appendChar="&";
}
}
cmd = sPars[0];
}
page = controlWindow.addSessionToUrl( page );
}
if (page.lastIndexOf('_session_') < 0) {
if(page.lastIndexOf('?') < 0) {
page = page + '?_session_=null';
} else {
page = page + '&_session_=null';
}
}
if (isMainArea){
NAV_Popup( top , 0 , page + "&LC=Y",-2, -2);
} else {
NAV_Popup( top , 0 , page + "&F=" + escape(cmd)   ,-2, -2);
}
}
function NAV_PopupHelpGuest( wind, cmd, isMainArea ){
if ( "HELP_AUTODETECT" == cmd ){
cmd = NAV_removeHREF( _NAV_GetHRef( wind.top )  );
}
NAV_findControlWindow( NAV_findMainWindow( wind.top ));
var page = basePath + 'help_router.jsp';
if ( typeof(isMainArea)=="undefined"){
isMainArea = false;
}
if (controlWindow != null){
if (isMainArea == false){
var sPars = cmd.split('?');
var lastSlash = sPars[0].lastIndexOf("/");
if (lastSlash > -1){
sPars[0]=sPars[0].substring( lastSlash+1 );
}
if (sPars.length == 1){
sPars[1]="";
}
sPars[0] = NAV_removeHREF( sPars[0] );
if (sPars[1].length == 0){
if ("undefined"==(""+wind.NAV_PARMS)){
} else {
sPars[1]=wind.NAV_PARMS;
}
}
var sArgs = sPars[1].split("&");
var appendChar = "?";
for (var x=0;x<sArgs.length;x++){
if ( (sArgs[x].length - sArgs[x].indexOf("=") ) < 5 ){
sPars[0]=sPars[0] + appendChar + sArgs[x];
appendChar="&";
}
}
cmd = sPars[0];
}
page = controlWindow.addSessionToUrl( page );
}
var idx = page.lastIndexOf('/');
page = page.substr(idx + 1);
if ( page.indexOf('?') == -1 ) {
page += '?';
}
if (isMainArea){
NAV_Popup( top , 0 , page + "&guest=true&LC=Y",-2, -2);
} else {
NAV_Popup( top , 0 , page + "&guest=true&F=" + escape(cmd)   ,-2, -2);
}
}
function NAV_Load( wind, page ){
NAV_findControlWindow( NAV_findMainWindow( wind.top ));
if (controlWindow != null){
page = controlWindow.addSessionToUrl( page );
}
setTimeout("location.href=page;",1);
}
function NAV_ReloadMainArea( wind, replaceArgs ){
if (isPrintWindow(window)){
return;
}
wind = NAV_findMainWindow( wind.top );
NAV_findControlWindow( wind);
var mainWindow = NAV_findWindow(wind, EPASS_FRAMES_MAINDATA);
if (mainWindow == null){
alert("Unable to find main window");
return;
}
var mainUrl = NAV_removeHREF( _NAV_GetHRef(mainWindow) );
var argList = replaceArgs.split("&");
var splitUrl = mainUrl.split("?");
var urlArgs = splitUrl[1].split("&");
for (var x=0;x<argList.length;x++){
var argData = argList[x].split("=")[0] + "=";
var foundIdx = -1;
for (var y=0;y<urlArgs.length;y++){
if (urlArgs[y].indexOf( argData ) > -1 ){
foundIdx = y;
break;
}
}
if (foundIdx == -1){
foundIdx = urlArgs.length;
}
urlArgs[foundIdx] = argList[x]; // place the arg
}
var newUrl = splitUrl[0];
if (urlArgs.length > 0){
newUrl = newUrl + "?" + urlArgs.join("&");
}
var modUrl = NAV_ModifyUrl( newUrl , null, null, null, null, null, null, null, null);
mainWindow.setTimeout("location.href='" + modUrl + "';", 1);
}
function NAV_PrintDHTMLTable(includeRfxInfo){
var printWin = window.open(basePath+"list_page_print.jsp?includeRfxInfo=" + includeRfxInfo, "", "left=100, top=200, width=800, height=400, menubar");
}
function NAV_Print( wind, additionalParams, h, w ){
var sUrl = _NAV_GetHRef(wind);
var sPars = sUrl.split ( '?' );
if ( sPars.length == 1 )
{
sPars [ 1 ] = "";
}
if ( wind != null
&& sPars [ 1 ].length == 0
&& "undefined" != ( "" + wind.NAV_PARMS ) )
{
sUrl=sPars [ 0 ];
sPars [ 1 ]=wind.NAV_PARMS;
var parms = sPars [ 1 ].split ( "&" );
for ( var x = 0; x < parms.length; x++ )
{
sUrl = NAV_addParam ( sUrl, parms [ x ] );
}
}
sUrl = NAV_CLEAN_URL( sUrl );
if( wind != null && additionalParams != null){
var parms = additionalParams.split ( "&" );
for ( var x = 0; x < parms.length; x++ ){
sUrl = NAV_addParam ( sUrl, parms [ x ] );
}
}// PR-22108.
var prefix = '&';
if ( sUrl.indexOf('?') < 0){
prefix = '?';
}
sUrl = sUrl + prefix + "printPage=Y";
if(w == null) w = -3;
if(h == null) h = -3;
NAV_Popup( wind.top, -1, sUrl , h,w );
}
function NAV_IsPollerRunning(wind){
NAV_findControlWindow( NAV_findMainWindow( wind.top ));
if (controlWindow != null){
if ( typeof( controlWindow.isPollerRunning ) != "undefined" ){
return controlWindow.isPollerRunning();
}
}
return false;
}
function NAV_setPollingStatus( wind,st ){
if ( window.location.href .indexOf("dummy_panel.jsp") > -1 ){
return;
}
if ( window.location.href .indexOf("/frames_") > -1 ){
return;
}
if ( window.location.href .indexOf("_frames.jsp") > -1 ){
return;
}
NAV_findControlWindow( NAV_findMainWindow( wind.top ));
if (controlWindow != null){
if ( typeof( controlWindow.setPollingStatus ) != "undefined" ){
controlWindow.setPollingStatus( st );
}
}
}
function NAV_setNumberOfNewMessages( wind, count ){
wind = NAV_findMainWindow(wind);
var mnu = NAV_findWindow(wind, EPASS_FRAMES_MAINMENU);
if ( mnu != null ){
if ( count > 0 ){
mnu.setMessageImage( count );
} else {
mnu.clearMessageImage();
}
}
}
function NAV_ReloadWithFilter( wind , control, additionalsStr ){
var val = control.options[control.selectedIndex].value;
var args = new Array();
args[0] = control.name + "," + val;
if(typeof additionalsStr != 'undefined' && additionalsStr != '' && additionalsStr != null){
var additionalArgs = additionalsStr.split(',');
for(var i =0; i < additionalArgs.length;i+=2){
args[(i+2)/2] = additionalArgs[i] + ',' + additionalArgs[i+1];
}
}
if (NAV_Reload( wind, args ) == false){
var x = 0;
for (x=0;x<control.options.length;x++){
var opt = control.options[x];
if ( opt.defaultSelected ){
opt.selected = true;
}
}
}
}
function NAV_TREECHECK( ctl ){
if( typeof TREE_VIS_COUNT == 'undefined') return;
var on = ctl.checked;
if(typeof TREE_FORCED_ON == 'undefined') TREE_FORCED_ON = "";
var TFO = TREE_FORCED_ON + ",";
var sID = ctl.value;
if (typeof(ctl.TRVALUE) == "undefined"){
} else {
sID = ctl.TRVALUE;
}
if (typeof(TREE_FORCED_CHILD_ON) != "undefined")
{
checkIt ( ctl );
NAV_TREECHECKDOWN( sID, ctl.form, ctl.checked );
}
else
{
while (true){
if ( TFO.indexOf( ","+sID+",") < 0 ){
if (typeof(TREE_VIS_COUNT[ "I"+sID ])=="undefined" ){
TREE_VIS_COUNT[ "I"+sID ] = 0;
}
}
if (typeof(TREE_VIS_COUNT[ "I"+sID ])!="undefined" ){
var cc = TREE_VIS_COUNT[ "I"+sID ];
if (on){
cc=cc+1;
} else {
cc=cc-1;
}
TREE_VIS_COUNT[ "I"+sID ]=cc;
if (typeof(document["vcb_" + sID])=="undefined" ){
} else {
if (TREE_VIS_COUNT[ "I"+sID ]==0){
document["vcb_" + sID].src = TREE_CHKIMG_OFF;
} else {
document["vcb_" + sID].src = TREE_CHKIMG_ON;
}
}
}
if ( TREE_VIS_RELATIONS[ "I"+sID ] ){
sID = TREE_VIS_RELATIONS[ "I"+sID ] ;
} else {
return;
}
}
}
}
function checkIt( ctl )
{
var on = ctl.checked;
var TFO = TREE_FORCED_ON + ",";
var sID = ctl.value;
if (typeof(ctl.TRVALUE) == "undefined"){
} else {
sID = ctl.TRVALUE;
}
var TFO = TREE_FORCED_ON + ",";
while (true){
if ( TFO.indexOf( ","+sID+",") < 0 ){
if (typeof(TREE_VIS_COUNT[ "I"+sID ])=="undefined" ){
TREE_VIS_COUNT[ "I"+sID ] = 0;
}
}
if (typeof(TREE_VIS_COUNT[ "I"+sID ])!="undefined" ){
var cc = TREE_VIS_COUNT[ "I"+sID ];
if (on){
cc=cc+1;
} else {
cc=cc-1;
}
TREE_VIS_COUNT[ "I"+sID ]=cc;
if (typeof(document["vcb_" + sID])=="undefined" ){
} else {
if (TREE_VIS_COUNT[ "I"+sID ]==0){
document["vcb_" + sID].src = TREE_CHKIMG_OFF;
} else {
document["vcb_" + sID].src = TREE_CHKIMG_ON;
}
}
}
if ( TREE_VIS_RELATIONS[ "I"+sID ] ){
sID = TREE_VIS_RELATIONS[ "I"+sID ] ;
} else {
return;
}
}
}
function NAV_TREECHECKDOWN ( sID, frm, valueToSet )
{
var elms = frm.elements;
var i;
for ( i = 0; i < frm.elements.length; i++ )
{
if ( elms [ i ].type == 'checkbox' )
{
var v =  elms [ i ].value;
if ( elms [ i ].TRVALUE != "undefined" )
{
v = elms [ i ].TRVALUE;
}
if ( typeof ( TREE_VIS_RELATIONS [ "I" + v ] ) != "undefined" && TREE_VIS_RELATIONS [ "I" + v ] == sID )
{
if ( elms [ i ].checked != valueToSet )
{
elms [ i ].checked = valueToSet;
checkIt( elms [ i ] );
}
NAV_TREECHECKDOWN ( v, frm, valueToSet );
}
}
}
}
function Nav_findObjectFromOtherFrames(frame, objectName){
for(var i=0;i<frame.frames.length;i++){
if(eval('frame.frames[i].' + objectName) != null){
return eval('frame.frames[i].' + objectName);
}else{
var object = Nav_findObjectFromOtherFrames(frame.frames[i], objectName);
if(object != null){
return object;
}
}
}
return null;
}
function NAV_IsTheatreReloadOn( wind ){
var mainWind = NAV_findMainWindow(wind);
if (mainWind == null) return true;
NAV_findControlWindow(mainWind);
if (controlWindow != null){
if ("undefined" != (""+controlWindow.theatreReload)){
return controlWindow.theatreReload;
}
}
return true;
}
function NAV_SetTheatreReload( wind, val ){
var mainWind = NAV_findMainWindow(wind);
if (mainWind == null) return;
NAV_findControlWindow(mainWind);
if (controlWindow != null){
controlWindow.theatreReload = val;
}
}
function NAV_SetDynamicPageReposition( wind ){
if ( ! NAV_IE4 ){
return;
}
var pName = wind.NAV_DYNAMIC_POSITION_NAME;
if ( typeof(pName) == "undefined") {
return;
}
var pPos = wind.document.body.scrollTop;
var mainWind = NAV_findMainWindow(wind);
if (mainWind == null) return;
NAV_findControlWindow(mainWind);
if (controlWindow != null){
controlWindow.EP_ListPagePositions[  pName ] = pPos;
}
}
function NAV_RestoreDynamicPageReposition( wind ){
if ( ! NAV_IE4 ){
return;
}
var pName = wind.NAV_DYNAMIC_POSITION_NAME;
if ( typeof(pName) == "undefined") {
return;
}
var mainWind = NAV_findMainWindow(wind);
if (mainWind == null) return;
NAV_findControlWindow(mainWind);
if (controlWindow != null){
var pPos = controlWindow.EP_ListPagePositions[  pName ];
if ( typeof( pPos ) == "undefined" ) return;
if ( typeof( pPos ) == -1 ) return;
wind.document.body.scrollTop = pPos;
controlWindow.EP_ListPagePositions[  pName ] = -1;  // Reset to false
}
}
function scrollToNewStart(sURL, linkNumber, siz){
strt = (firstPage + linkNumber - 1)*siz + 1;
if(strt > totalRows) return false;
if(typeof(displayWaitScreenCSSDefault) != "undefined"){
displayWaitScreenCSSDefault();
}
if(sURL.match(/START=\d*/))
sURL = sURL.replace(/START=\d*/,'START=' + strt);
else
sURL = sURL  + '&START=' + strt;
if(sURL.match(/SIZE=\d*/))
sURL = sURL.replace(/SIZE=\d*/,'SIZE=' + siz);
else
sURL = sURL + '&SIZE=' + siz;
NAV_URL_CB(sURL );
}
function updateScrollerLinks(step){
firstPage += (step*batch);
window.setTimeout("updateArrows()",1)
}
var imageBasePath = "img/";
function updateArrows(){
var lnk = document.getElementsByName( 'scrollLink' );//document.all['scrollLink'];
var lnkToolTip;
for(var i = 0; i < lnk.length && i < batch; i++){
if(firstPage + i < nPages){
var newLink = firstPage + i + 1;
lnk[i].innerHTML = newLink;
lnkToolTip = document.getElementById('pageStart' + i);
if(lnkToolTip){
if (pageStarts != null && typeof(pageStarts) != "undefined" ) {
lnkToolTip.innerHTML = pageStarts[newLink-1];
}
}
if(newLink == displayPage+1){
lnk[i].style.color = 'red'
}
else{
lnk[i].style.color = 'blue';
}
if(lnk.length == 2*batch){
lnk[i+batch].innerHTML = newLink;
if(newLink == displayPage+1)
lnk[i+batch].style.color = 'red'
else
lnk[i+batch].style.color = '#0000FF';
}
}
else{
lnk[i].innerHTML = '';
if(lnk.length == 2*batch)
lnk[i+batch].innerHTML = '';
}
}
var leftArrows = document.getElementsByName( 'arrowLeft' ); //document.all['arrowLeft'];
var rightArrows = document.getElementsByName( 'arrowRight' ); //document.all['arrowRight'];
if ( typeof(leftArrows[0]) != "undefined" ) {
if ( typeof(leftArrows[0]) != 'undefined' )
leftArrows[0].src = firstPage > 0 ?
imageBasePath+'arrow_right.gif' : imageBasePath+'blank.gif';
if ( typeof(leftArrows[1]) != 'undefined' )
leftArrows[1].src = firstPage > 0 ?
imageBasePath+'arrow_right.gif' : imageBasePath+'blank.gif';
if ( typeof(rightArrows[0]) != 'undefined' )
rightArrows[0].src = firstPage + batch >= nPages ?
imageBasePath+'blank.gif' : imageBasePath+'arrow_left.gif';
if ( typeof(rightArrows[1]) != 'undefined' )
rightArrows[1].src = firstPage + batch >= nPages ?
imageBasePath+'blank.gif' : imageBasePath+'arrow_left.gif';
} else {
leftArrows.src = firstPage > 0 ?
imageBasePath+'arrow_right.gif' : imageBasePath+'blank.gif';
rightArrows.src = firstPage + batch >= nPages ?
imageBasePath+'blank.gif' : imageBasePath+'arrow_left.gif';
}
}
function NAV_GetServerExtension(){
var allCookies = document.cookie;
var defPage = "jsp";
var cookieName = "ep_srv=";
var pos=allCookies.indexOf( cookieName );
if ( pos < 0){
return defPage;
}
var start = pos + cookieName.length;
var end = allCookies.indexOf( ";", start );
var val = "";
if ( end == -1 ){
val = allCookies.substring( start );
} else {
val = allCookies.substring( start, end );
}
return val;
}
function NAV_FixExtension( sS ){
if ( _cluster_use_vp == 0 ){
return sS;
}
if ( sS.indexOf( "http" ) == 0 ){
return sS;
}
var _pathPrefix = "/" + _AppPath;
if ( sS.indexOf( _pathPrefix ) == 0 ){
return sS;
}
if ( sS.charAt(0) == "/" ){
} else {
sS = "/" + sS;
}
sS = _pathPrefix + sS;
return sS;
if ( _cluster == 0 ){
return sS;
}
if ( _cluster_by_proxy == 1 ){
return sS;
}
var server = NAV_GetServerExtension();
var parmIdx = sS.indexOf("?");
var uri = "";
var parmCodes = "";
if ( parmIdx > -1 ){
parmCodes = sS.substring( parmIdx );
uri = sS.substring( 0, parmIdx );
}else{
uri = sS;
}
if ( uri.indexOf( ":" ) > -1 ){
return sS;
}
var dotIdx = uri.indexOf( "." + server );
if ( dotIdx > -1 ){
var ext = uri.substring( dotIdx+1 );
if ( EPASS_SREE_EXT == ext ){
return sS;
}
}
dotIdx = uri.lastIndexOf( "." );
if ( uri.indexOf("WebInterface") > -1 || uri.indexOf(EPASS_SREE_EXT) > -1 ){
return sS;
}
uri = uri.substring( 0, dotIdx ) + "." + server + parmCodes;
var prefix = "";
if ( _cluster_use_vp == 1 ){
if ( server == "jsp" ){
if ( _cluster_use_vpJSP == 1 ){
prefix = server;
}
} else {
prefix = server;
}
}
if ( prefix != "" ){
if ( uri[0] == "/" ){
prefix = "/" + prefix;
if ( uri.indexOf( prefix ) != 0 ){
uri = prefix + uri;
}
}
}
return uri;
}
function NAV_MarkUnload(){
window.EPASS_POLL_ID="";
window.NAV_SERVER_CTX="";
}
function NAV_FixupReportingWindowOpener()
{
NAV_findControlWindow(window);
if (controlWindow != null)
{
window.opener.close();
window.opener = controlWindow;
}
}
function getTempStorage( key ){
NAV_findControlWindow(window);
if (controlWindow != null) {
return controlWindow.getTempStorage( key );
}
return null;
}
function setTempStorage( key, val ){
NAV_findControlWindow(window);
if (controlWindow != null){
controlWindow.setTempStorage( key, val );
}
}
// End inlude
// Start include: parse_string.js
function ParseString(str) {
this.name = "ParseString";
this.str = str.toString();
this.pos = 0;
this.error=null;
}
ParseString.prototype.trimSpaces =  function (){
if (this.pos != 0){
alert("trimSpaces can only be used before parsing starts");
return;
}
while ( this.str.length > 0 && this.str.charAt(0) == ' '){
this.str = this.str.substring(1);
}
while ( this.str.length > 0 && this.str.charAt( this.str.length - 1) == ' '){
this.str = this.str.substring(0,this.str.length-1);
}
}
ParseString.prototype.enforceCharOrder =  function ( c1, c2 ){
if (this.pos != 0){
alert("enforceCharOrder can only be used before parsing starts");
return;
}
var idx1 = this.str.indexOf( c1 );
var idx2 = this.str.indexOf( c2 );
if (idx1== -1){
return true;
}
if (idx2 > idx1){
this.setError("Invalid order of characters");
return false;
}
return true;
}
ParseString.prototype.removeAll =  function (chr){
if (this.pos != 0){
alert("removeAll can only be used before parsing starts");
return;
}
var splits = this.str.split( chr );
this.str = splits.join('');
}
ParseString.prototype.removeIfStartsWith =  function (chr){
if (this.pos != 0){
alert("removeIfStartsWith can only be used before parsing starts");
return false;
}
if (this.str.length == 0) return false;
if (this.str.charAt(0) == chr ){
this.str = this.str.substring(1);
return true;
}
return false;
}
ParseString.prototype.removeIfEndsWith =  function (chr){
if (this.pos != 0){
alert("removeIfEndsWith can only be used before parsing starts");
return false;
}
if (this.str.length == 0) return false;
if (this.str.charAt( this.str.length-1) == chr ){
this.str = this.str.substring(0,this.str.length-1);
return true;
}
return false;
}
ParseString.prototype.removeIfStartsOrEndsWith =  function (chr){
if (this.removeIfStartsWith( chr ) ){
return true;
}
return this.removeIfEndsWith( chr );
}
ParseString.prototype.hasMore =  function (){
return this.str.length > this.pos;
}
ParseString.prototype.getError =  function (){
return this.error;
}
ParseString.prototype.isError =  function (){
return this.error != null;
}
ParseString.prototype.setError =  function (err ){
this.error = err;
}
ParseString.prototype.advance =  function(){
if (this.hasMore() == false){
return;
}
this.pos ++;
}
ParseString.prototype.skipSpaces =  function(){
while ( this.hasMore() && this.nextChr() == ' '){
this.advance();
}
}
ParseString.prototype.nextChr =  function (){
if (this.hasMore() == false ){
return null;
}
return this.str.charAt( this.pos );
}
ParseString.prototype.isGroupingCorrect =
function( groupSep, decSep )
{
var res    = true;
var str    = this.getRemainingCharacters();
var groups = null;//str.split( groupSep );
if( str.indexOf( groupSep ) >= 0 )
{
var pos = str.indexOf( decSep );
if( pos >= 0 )
{
str = str.substring( 0, pos );
}
groups = str.split( groupSep );
if( groups.length == 1 && groups[0].length != 3 )
{
res = false;
}
else if( groups.length > 1 )
{
for( var i = 1; i < groups.length; i++ )
{
res = (groups[i].length == 3);
if( !res ) break;
}
}
}
return res;
}
ParseString.prototype.getRealNumber = function( decSep ){
if (typeof(decSep ) == 'undefined'){
decSep = ".";
}
var splitter = this.getRemainingCharacters().split( decSep );
if (splitter.length > 2 ){
this.setError("Invalid number format");
return null;
}
var n = new Number( splitter.join(".") );
if (isNaN(n)){
this.setError("Invalid number entered");
return null;
}
return n;
}
ParseString.prototype.getIntNumber =  function ( mmin, mmax, benforce ){
if (typeof(benforce) == 'undefined'){
benforce = false;
}
if (typeof(mmax) == 'undefined'){
mmax = 9999;
}
if (typeof(mmin) == 'undefined'){
mmin = 1;
}
this.numCharCount = 0;
this.skipSpaces();
var myNumbs = '';
while ( myNumbs.length < mmax && this.hasMore() ){
if (this.nextChr().match('[0-9]') == null){
break;
}
myNumbs = myNumbs + this.nextChr();
this.advance();
}
if (myNumbs.length < mmin || myNumbs.length == 0){
this.error =  'Not enough characters in number' ;
return null;
}
this.numCharCount = myNumbs.length;
return new Number( myNumbs );
}
ParseString.prototype.getNumberCharacterCount =  function(){
return this.numCharCount;
}
ParseString.prototype.getRemainingCharacters =  function(){
if (this.hasMore() == false) return "";
if (this.pos == 0) return this.str;
return this.str.substring( this.pos );
}
ParseString.prototype.getSameCharGroup =  function(){
var cChar = this.nextChr();
this.advance();
while ( this.hasMore() ){
if (this.nextChr() != cChar.charAt(0)){
break;
}
cChar = cChar + this.nextChr();
this.advance();
}
return cChar;
}
// End inlude
// Start include: i18n.js
function I18N(){
this.name = "i18n";
this.eMsg = null;
if ( typeof(i18n_date_input_pattern) == 'undefined' ){
i18n_date_input_pattern = new Array(
"MM/dd/yyyy HH:mm", "MM/dd/yyyy HH:mm", "MM-dd-yyyy HH:mm", "MM-dd-yyyy HH:mm",
"MM/dd/yyyy", "MM/dd/yyyy", "MM-dd-yyyy", "MM-dd-yyyy" )
};
this.datePatterns = i18n_date_input_pattern;
this.rdate = null;
if ( typeof(i18n_dateYearAdjust) == 'undefined' ){
i18n_dateYearAdjust = 2000;
}
this.yearAdjust = i18n_dateYearAdjust;
if ( typeof(i18n_dateViewPattern) == 'undefined' ){
i18n_dateViewPattern = "MM/dd/yyyy HH:mm;MM/dd/yyyy";
}
this.dateViewPattern = i18n_dateViewPattern;
if ( typeof(i18n_n_dec_symbol) == 'undefined' ){ i18n_n_dec_symbol = "."; 	}
this.decSymbol = i18n_n_dec_symbol;
if ( typeof(i18n_n_dec_pos) == 'undefined' ){ i18n_n_dec_pos = 3; 	}
this.decPos = i18n_n_dec_pos;
if ( typeof(i18n_n_sep_symbol) == 'undefined' ){ i18n_n_sep_symbol = ","; 	}
this.groupSepSymbol = i18n_n_sep_symbol;
if ( typeof(i18n_n_grouping_count) == 'undefined' ){ i18n_n_grouping_count = 3; 	}
this.groupCount = i18n_n_grouping_count;
this.groupSepSymbol_fr = i18n_n_fr_sep_symbol;
if ( typeof(i18n_n_percent_symbol) == 'undefined' ){ i18n_n_percent_symbol = "%"; 	}
this.percentSymbol = i18n_n_percent_symbol;
this.percentMultiplier = 100;
if ( typeof(i18n_n_neg_symbol) == 'undefined' ){ i18n_n_neg_symbol = "-"; 	}
this.negativeSymbol = i18n_n_neg_symbol;
if ( typeof(i18n_n_neg_pos) == 'undefined' ){ i18n_n_neg_pos = "B"; 	}
this.negativePos = i18n_n_neg_pos;
}
I18N.prototype.getRealCharacters = function(){
return i18n_n_percent_symbol + "+"+"-"+i18n_n_dec_symbol;//Added i18n_n_percent_symbol for PR 39212
}
I18N.prototype.getNumberCharacters  = function(){
return ".+-,eE";
}
I18N.prototype.getPercentCharacters  = function(){
return i18n_n_dec_symbol + i18n_n_percent_symbol  + "+-";
}
I18N.prototype.getCurrencyCharacters  = function(){
return "+"+"-"+i18n_n_dec_symbol;
}
I18N.prototype.getDateCharacters  = function(){
return "-/: ";
}
I18N.prototype.getGroupSeparator = function(){
return i18n_n_sep_symbol;
}
I18N.prototype.getGroupSeparator_fr = function(){
return i18n_n_fr_sep_symbol;
}
I18N.prototype.isError = function () { return this.eMsg != null; }
I18N.prototype.getError = function () { return this.eMsg; }
I18N.prototype.setError = function (msg) { this.eMsg = msg ; }
I18N.prototype.getDateViewPattern = function( ){
return this.dateViewPattern
}
I18N.prototype.setDateViewPattern = function( patt ){
this.dateViewPattern = patt;
}
I18N.prototype.getAdjustYear = function( ){
return this.yearAdjust;
}
I18N.prototype.setAdjustYear = function( value ){
this.yearAdjust = value;
}
I18N.prototype.dateToText = function( d, pattern ){
return this.dateFieldsToText(d.getYear(), d.getMonth(), d.getDate(), d.getHours(), d.getMinutes(), d.getSeconds(), pattern);
}
I18N.prototype.dateFieldsToText = function( iYear, iMonth, iDay, iHr, iMin, iSec, pattern ){
if ( typeof(pattern) == 'undefined'){
pattern = i18n_dateViewPattern;
}
if (pattern.indexOf(';') > -1){
var splitter = pattern.split(';');
if (iHr + iMin + iSec == 0) {
pattern = splitter[1];
} else {
pattern = splitter[0];
}
}
var output = "";
var pat = new ParseString( pattern );
while ( pat.hasMore() && this.isError() == false ){
var pblock = pat.getSameCharGroup();
switch (pblock.charAt(0)){
case 'y':  // YEAR
if ( pblock.length > 2){
var yr = iYear;
if (yr < 200){
yr += 1900;
}
output = output + this._formatInt( yr , 4, 4 );
} else {
output = output + this._formatInt( yr , 2, 2 );
}
break;
case 'M':	// month
output = output + this._formatInt( iMonth + 1, 2, 2 );
break;
case 'd':	// day
output = output + this._formatInt( iDay, 2, 2 );
break;
case 'H':	// hour 0-11
output = output + this._formatInt( iHr, 2, 2 );
break;
case 'm':	// min 0-59
output = output + this._formatInt( iMin, 2, 2 );
break;
case 's':	// sec 0-50
output = output + this._formatInt( iSec, 2, 2 );
break;
default:
output = output + pblock;
}
}
return output;
}
I18N.prototype.textToDate = function( str, pattern ){
this.setError( null );
this.rdate = null;
var saveError = null;
if (typeof(pattern) != 'undefined'){
if (pattern != ''){
return this._toDate( str , pattern );
}
}
for ( var x = 0; x< this.datePatterns.length; x++){
this.textToDate( str, this.datePatterns[x] );
if ( this.isError()  ){
saveError = this.getError();
} else {
if (this.rDate != null){
return this.rDate;
}
}
}
this.setError( saveError );	// Set error as last one seen
}
I18N.prototype._toDate = function( str, pattern ){
var user = new ParseString( str );
user.trimSpaces();
var pat = new ParseString( pattern );
var iYear = 0;
var iMonth = 0;
var iDay = 0;
var iHr = 0;
var iMin = 0;
var iSec = 0;
while ( pat.hasMore() && this.isError() == false ){
var pblock = pat.getSameCharGroup();
var isNum = true;	// Get a number?
var nMaxDigit = 32;		// max digit..
var nMinDigit = 1;		// min req digit..
var bForceSize = false;
if ( pat.hasMore() ){
if ( this._isDatePatType( pat.nextChr() )){
nMinDigit = pblock.length;
nMaxDigit = pblock.length;
bForceSize = true;
}
}
switch (pblock.charAt(0)){
case 'y':  // YEAR
if (bForceSize == false){
if (pblock.length > 2){
nMinDigit = pblock.length;
nMaxDigit = pblock.length;
}
}
break;
case 'M':	// month
break;
case 'd':	// day
break;
case 'H':	// hour 0-11
break;
case 'm':	// min 0-59
break;
case 's':	// sec 0-50
break;
default:
isNum = false;
}
if (isNum){
var rnum = user.getIntNumber( nMinDigit, nMaxDigit );
} else {
for (var y=0;y<pblock.length;y++){
if ( user.hasMore() == false ){
this.setError("end of input");
return null;
}
if ( user.nextChr() != pblock.charAt(y)) {
this.setError("expected: " + pblock.charAt(y) + " found: " +  user.nextChr() );
return null;
}
user.advance();
}
}
switch (pblock.charAt(0)){
case 'y':  // YEAR
if (user.getNumberCharacterCount() < 3){
rnum = rnum + this.yearAdjust;
}
iYear = rnum;
break;
case 'M':	// month
iMonth = rnum;
break;
case 'd':	// day
iDay = rnum;
break;
case 'H':	// hour 0-11
iHr = rnum;
break;
case 'm':	// min 0-59
iMin = rnum;
break;
case 's':	// sec 0-50
iSec = rnum;
break;
}
if (pat.isError){
this.setError( 	pat.getError() );
}
if (user.isError){
this.setError( 	user.getError() );
}
}
if (this.isError()){
return null;
}
if (user.hasMore()){
this.setError("Too much input for format");
return null;
}
if (iMonth > 0){
iMonth = iMonth - 1;
}
var d = new Date( iYear, iMonth, iDay ,iHr ,iMin ,iSec );
var tYear = d.getYear();
if (tYear < 200) tYear += 1900;
if (iYear != (tYear)
|| iMonth != d.getMonth()
|| iDay != d.getDate()
|| iHr != d.getHours()
|| iMin != d.getMinutes()
|| iSec != d.getSeconds()
){
this.setError("Invalid date entered");
return;
}
this.rDate = d;
return this.rDate;
}
I18N.prototype._isDatePatType = function( chr ){
return chr.match( "[a-z]|[A-Z]" ) != null;
}
I18N.prototype._formatInt = function( num, minDig, maxDig ){
var output = ""+num;
while (output.length < minDig){
output = "0" + output;
}
while (output.length > maxDig){
output = output.substring(1);
}
return output;
}
I18N.prototype.getDecSymbol = function(  ){ return this.decSymbol; }
I18N.prototype.setDecSymbol = function( sym ){ this.decSymbol = sym; }
I18N.prototype.getDecPos = function(  ){ return this.decPos; }
I18N.prototype.setDecPos = function( sym ){ this.decPos = sym; }
I18N.prototype.getGroupSepSymbol = function(  ){ return this.groupSepSymbol; }
I18N.prototype.setGroupSepSymbol = function( sym ){ this.groupSepSymbol = sym; }
I18N.prototype.getGroupCount = function(  ){ return this.groupCount; }
I18N.prototype.setGroupCount = function( sym ){ this.groupCount = sym; }
I18N.prototype.getPercentSymbol = function(  ){ return this.percentSymbol; }
I18N.prototype.setPercentSymbol = function( sym ){ this.percentSymbol = sym; }
I18N.prototype.getNegativeSymbol = function(  ){ return this.negativeSymbol; }
I18N.prototype.setNegativeSymbol = function( sym ){ this.negativeSymbol = sym; }
I18N.prototype.getNegativePos = function(  ){ return this.negativePos; }
I18N.prototype.setNegativePos = function( sym ){ this.negativePos = sym; }
I18N.prototype.textToNumber = function( inNum ){
this.setError( null );
var user = new ParseString( inNum );
user.trimSpaces();
user.enforceCharOrder(  this.getDecSymbol(), this.groupSepSymbol );
this.setError( user.getError() );
if (this.isError() ){
return Number.NaN;
}
user.removeAll( this.groupSepSymbol );	// Just blindly remove these
if(this.groupSepSymbol == this.groupSepSymbol_fr){
user.removeAll(' ');
}
var isNegative = false;
var isPercent = false;
if (user.removeIfEndsWith( this.getPercentSymbol() ) ){
isPercent = true;
}
if (user.removeIfStartsOrEndsWith( this.getNegativeSymbol() ) ){
isNegative = true;
}
var n = user.getRealNumber( this.getDecSymbol() );
this.setError( user.getError() );
if (this.isError() ){
return Number.NaN;
}
if (isPercent ){
n = n / this.percentMultiplier;
}
if (isNegative){
n = -n;
}
return new Number( n );
}
I18N.prototype.numberToText = function( inNum, precision )
{
var str;
if( typeof(precision) == 'undefined' || typeof(inNum.toFixed) == 'undefined' )
{
str = this.customToFixed( inNum );
}
else
{
str = inNum.toFixed( precision );
}
str = str.replace( ".",  this.getDecSymbol() );
return str;
}
I18N.prototype.customToFixed = function( inNum )
{
var res = '';
var str = inNum.toString();
if( (inNum >= 0 && inNum < 0.000001)
||
(inNum < 0 && inNum > -0.000001)
)
{
var parts = str.split( 'e' );
if( parts.length == 2 )
{
if( inNum < 0 )
{
res = '-';
}
res = res + '0.';
var decCount = new Number( parts[1].substring( 1 ) ) - 1;
for( var i = 0; i < decCount; i++ )
{
res += '0';
}
var decVal = parts[0].substring( ((inNum > 0)? 0: 1) );
decVal = decVal.replace( '.', '' );
res += decVal;
}
else
{
res = str;
}
}
else
{
res = str;
}
return res;
}
I18N.prototype.formatMessage = function()
{
var msg = arguments[0];
var currVal;
for( var i = 1; i < arguments.length; i++ )
{
currVal = arguments[i];
msg = msg.replace( "{"+(i-1)+"}", currVal );
}
return msg;
}
// End inlude
// Start include: poll.js
var EPASS_POLL_COMMANDS = "";
function _EPASS_POLL_ADD_NL(){
if (EPASS_POLL_COMMANDS != ""){
EPASS_POLL_COMMANDS = EPASS_POLL_COMMANDS + "\n";
}
}
function EPASS_POLL_ADD_CTX( ctx ){
_EPASS_POLL_ADD_NL();
EPASS_POLL_COMMANDS = EPASS_POLL_COMMANDS + "CTX:" + ctx;
}
function EPASS_POLL_ADD_KEY( key, id ){
_EPASS_POLL_ADD_NL();
EPASS_POLL_COMMANDS = EPASS_POLL_COMMANDS + "K:" + key + ":" + id;
}
// End inlude
// Start include: listSearch.js
var firstPopUp;
var resultsCount;
var lblInstructions = "Instructions";
var lblUseWildcards = "Use Wildcards";
var lblSearchBy = "Search By";
var lblSearchFor = "Search For";
var lblSearch = "Search";
var lblCancel = "Cancel";
var lblSearchResults = "Search Results";
var lblSelect = "Select";
var lblRepeat = "Repeat";
var popupTopUpperpart =
"<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" height=\"26\">"									+
"<tr>"																													+
"<td colspan=\"1\" width=\"110\" height=\"26\" valign=\"top\" background=\"img/2x26_popups.gif\"><img src=\""	+
EPASS_BRANDING	+
"\"width=\"158\" height=\"26\">"																						+
"</td>"																													+
"<td width=\"100%\" valign=\"top\" background=\"img/2x26_popups.gif\"> "												+
"<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" height=\"26\">"								+
"<tr>"																												+
"<td rowspan=\"1\" height=\"26\" width=\"100%\" background=\"img/2x26_popups.gif\"><img src=\"img/1x1_trans.gif\" width=\"10\" height=\"26\"></td>"							+
"</tr>"																												+
"</table>"																											+
"</td>"																													+
"</tr>"																													+
"</table>"	;
var popupTopPrintImage =
"<td rowspan=\"1\" colspan=\"1\" width=\"139\" height=\"31\">" 																+
"<img name=\"img/popups/pop_help_print\"  src=\"img/popups/popwrap-1x4.gif\" border=\"0\" width=\"139\" height=\"31\" " 	+
"onclick = \"javascript:self.print(); this.blur(); self.focus();\" ></td>" 												;
var popupTopNoPrintImage =
"<td rowspan=\"1\" colspan=\"1\" width=\"139\" height=\"31\"></td>" 														;
var popupTopLowerPart =
"<table width=\"100%\" height=\"55\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">"			+
"<tr>"			+
"<td height=\"55\" width=\"100%\">"			+
"<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"			+
"<tr>"			+
"<td height=\"55\" width=\"80\"><img src=\"img/popups/grnlines_left.gif\" width=\"80\" height=\"55\"></td>"			+
"<td height=\"55\" width=\"60%\" background=\"img/popups/grnlines_mid.gif\">&nbsp;</td>"			+
"<td height=\"55\" width=\"48\"><img src=\"img/popups/grnlines_right.gif\" width=\"48\" height=\"55\"></td>"			+
"<td valign=\"top\" nowrap>"			+
"<b>&nbsp;</b>"			+
"</td>"			+
"<td width=\"40%\"><img src=\"img/blank.gif\" width=\"80\" height=\"8\"></td>"			+
"<td>&nbsp;</td>"			+
"</tr>"			+
"</table>"			+
"</td>"			+
"</tr>"			+
"</table>";
var popupBottom =
"\n</td>" +
"\n<td><img src=\"img/blank.gif\" width=\"25\"></td>" +
"\n</tr>" +
"</table>";
var rel = "\n .instr {position:relative;visibility:visible;}";
var style =
"\n <style type=\"text/css\">																	 " +
rel +
"\n .instrTitle {font-family: verdana, arial, helvetica; font-size: 8pt;						 " +
"\n   text-decoration: underline; textAlign: right; color: blue; background-color: #A5B5DE; }	 " +
"\n .searchTitle {font-family: verdana, arial, helvetica; font-size: 8pt;						 " +
"\n   font-weight: bold; textAlign: left; color: black; background-color: #A5B5DE; }			 " +
"\n .searchWarn { font-family: verdana, arial, helvetica; font-size: 8pt; font-weight: normal;	 " +
"\n   textAlign: left; color: #BF2727; background-color: white ;}								 " +
"\n .standardButton { text-align: center; background-color: #ffffff; }						  	 " +
"\n .divider     { background-color: white; valign: middle; }									 " +
"\n .border      { background-color: #cccccc; }												 " +
"\n .oddrow      { font-family: verdana, arial, helvetica; font-size: 9pt; font-weight: normal; " +
"\n   color: black; background-color: #EFEFEF; }												 " +
"\n .evenrow     { font-family: verdana, arial, helvetica; font-size: 9pt; font-weight: normal; " +
"\n   color: black; background-color: white ;}													 " +
"\n .popcolorcell { background-color: #ffffff;}												 " +
"\n body{ background-color: #ffffff; margin:0; } 											 	 " +
"\n </style>																					 " ;
var funShow =
"\n function show(obj) { 	 																	" +
"\n     if (document.getElementById && document.getElementById(obj) != null) { 	 			" +
"\n          document.getElementById(obj).style.visibility='visible'; 	 						" +
"\n          document.getElementById(obj).style.display='block'; 	 							" +
"\n    } 	 																					" +
"\n     else if (document.layers && document.layers[obj] != null) 	 							" +
"\n         document.layers[obj].visibility = 'visible'; 	 									" +
"\n } 	 																						" ;
var funHide =
"\n function hide(obj) { 	 																	" +
"\n     if (document.getElementById && document.getElementById(obj) != null) { 				" +
"\n         document.getElementById(obj).style.visibility='hidden'; 							" +
"\n          document.getElementById(obj).style.display='none'; 	 							" +
"\n     } 													 									" +
"\n     else if (document.layers && document.layers[obj] != null){ 	 						" +
"\n         document.layers[obj].visibility = 'hidden'; 	 									" +
"\n 	} 	 																					" +
"\n } 		 																					" ;
var funCancelSearch =
"\n function cancelSearch(){																 " +
"\n    window.close();																		 " +
"\n    return false;																		 " +
"\n }																						 " ;
var tableTop =
"\n <tr><td align=\"center\"><div align=\"center\"><center>									 " +
"\n <table border=\"0\" cellspacing=\"0\" width=\"90%\"><tr>								 " +
"\n <td class=\"border\"><table border=\"0\" cellspacing=\"0\" width=\"100%\">				 " ;
var initiateHide =
"\n if (document.getElementById) { document.write('<style>.instr{position:relative;visibility:visible;display:none}</style>'); }		" ;
var tableBottom =
"\n </table></td></tr></table></center></div></td></tr>										 ";
var searchForHeader =
"\n <tr><th class = \"oddrow\" align = \"left\">"+lblSearchFor+"</th>											 	 " +
"\n <td class = \"oddrow\"><input type = \'text\' name = \'searchPhrase'></td></tr>			 " ;
var instructionsStart = "In the box marked 'Search For' enter the phrase you want to find.";
var singleFieldInstructions = "In the box marked 'Search For' enter the phrase you want to find.";
var multiFieldInstructions = "You can select in which part of the table to do the search by selecting the corresponding table header in the part marked by 'Search by'.";
var wildcardInstructions = "If the wildcards option is selected, the search is for the exact match to the search phrase, while * can be used as a wildcard substituting for any number of characters.  If the wildcards option is not selected the search will return all entries that include the search phrase.";
function searchSelectControl(frmName, selectName){
var count = 0;
var mtch;
var selectBox = eval('document.' + frmName + '.' + selectName);
var currentSelection = selectBox.selectedIndex;
var srch =prompt("Enter a search string. The search will return all entries in the list box that include the string.","");
if(srch == null || srch.length == 0){
return false;
}
srch = convertToRegEx(srch.toLowerCase(), false);
var firstResult = -1;
var result = "";
var evenOdd = false;
for(var i = 0; i < selectBox.options.length; i++){
var sel =  selectBox.options[i].text;
var lowerSel = sel.toLowerCase();
mtch = lowerSel.match(srch);
if(mtch != null ){
rowClass = evenOdd ? "oddrow" : "evenrow";
evenOdd = !evenOdd;
result +=
"<tr>" +
"<td class=\"" + rowClass + "\" align=\"left\" width=\"33%\">" +
"<input type=\"radio\" value=\"" + i + "\" name=\"choice\" " +
" onclick = \"return selectInParent(this)\"></td>" +
"<td class=\"" + rowClass + "\" width=\"1%\">&nbsp;</td>" +
"<td class=\"" + rowClass + "\" width=\"66\">" + sel + "</td>" +
"</tr>";
if(count++ == 0){
firstResult = i;
}
}
}
if (count == 1){
selectBox.selectedIndex = firstResult;
}
else{
showChoices(result,count,currentSelection, frmName, selectBox.name )
}
return false;
}
function showChoices(result, count, currentSelection, frmName, selName, searchSelectMessage){
var height = ((200 + count*30) > 500) ? 500 :(250 + count*30);
var myBars = 'directories=no, location=no,menubar=no,status=no,titlebar=no,toolbar=no'
var myOptions = 'scrollbars=yes,width=400,height=' + height +',resizable=yes'
var myFeatures = myBars + ',' + myOptions;
var title = "";
var btnClose = "";
var btnCancel = "";
if(count >= 1){
title = count + " " + "match(s) were found in the list.  Please select one item and click the 'Select' button";
}
else{
title = "No match was found in the list";
}
var scrpt = '';
scrpt =
"\n <script>" +
"\n 	var selCaller = opener.document." + frmName + "." + selName 	  +
"\n 	function selectInParent(btn){									" +
"\n 		selCaller.selectedIndex = parseInt(btn.value)				" +
"\n 	}																" +
"\n 	function selectItem(){											" +
"\n 		window.close();												" +
"\n 	}																" +
"\n 	function cancelSelection(){										" +
"\n 		selCaller.selectedIndex = " +  currentSelection + ";		" +
"\n 		window.close();												" +
"\n 	}																" +
"\n <" +"/" + "script>													";
btnClose =
"\n <input type = 'button' name = 'myButton' value = '"+lblSelect+"' " +
"onclick = selectItem()>";
btnCancel =
"\n <input type = 'button' name = 'myButton' value = '"+lblCancel+"' " +
"onclick = cancelSelection()>";
var htmlTop =
"<html>" +
"<head>" ;
var htmlBottom =
"<" + "/" + "head>" +
popupTopUpperpart + popupTopNoPrintImage + popupTopLowerPart +
"<body marginwidth=\"0\" marginheight=\"0\" leftmargin=\"0\" topmargin=\"0\">" +
"<table border=\"0\" cellpadding=\"12\" cellspacing=\"0\" width=\"100%\" align=\"center\">" +
"<form name = \"results\">" +
"<tr><td class=\"searchTitle\">"+lblSearchResults+"</td></tr>" +
"<tr><td class=\"searchWarn\">" + title + "</td></tr>" +
"<tr><td><hr width = \"100%\" height = \"1\" color = \"black\" ></td></tr>" +
tableTop +
btnClose + btnCancel + "<p>" +
result +
tableBottom +
"\n</form></table>" +
popupBottom +
"\n</body>" +
"\n</html>";
newWin = window.open('img/blank.gif','myDoc',myFeatures);
newWin.document.writeln(htmlTop);
newWin.document.writeln(scrpt);
newWin.document.writeln(style);
newWin.document.writeln(htmlBottom);
newWin.document.close();
}
function searchListPage(idMessage,searchFormTitle, fieldNames){
return searchListPage(idMessage,searchFormTitle,fieldNames,null);
}
function searchListPage(idMessage,searchFormTitle, fieldNames, scope ){
var myBars = 'directories=no, location=no,menubar=no,status=no,titlebar=no,toolbar=no'
var myOptions = 'scrollbars=yes,width=470,height=500'
var myFeatures = myBars + ',' + myOptions;
var nFields = fieldNames.length;
firstPopUp = window.open('img/blank.gif','firstListSearch',myFeatures);
firstPopUp.document.writeln("\n<html><head>");
firstPopUp.document.writeln(listSearchScript(nFields, fieldNames, idMessage));
firstPopUp.document.writeln(style);
firstPopUp.document.writeln(listSearchBody(nFields,searchFormTitle, fieldNames, idMessage,scope));
firstPopUp.document.close();
return false;
}
function listSearchScript(nFields, fieldNames, idMessage ){
var variables =
"\nvar searchBy = '" + fieldNames[0] + "';";
var funSetSearch =
"\n function setSearch(val){													" +
"\n    searchBy = val;															" +
"\n }																			" ;
var funGetListSearchResults =
"\n function getResults(){														" +
"\n 	var searchArray = new Array();											" +
"\n 	var idsArray = new Array();												" +
"\n 	var searchPhrase = document.openedForm.searchPhrase.value;				" +
"\n 	if(searchPhrase.length == 0){											" +
"\n 		alert(\"Please enter a search phrase.\");							" +
"\n 		return false;														" +
"\n 	}																		" +
"\n 	opener.getListsearchResults(searchPhrase,searchBy, wildCard); 			" +
"\n }																			" ;
var funWildCard =
"\n var wildCard = false;														" +
"\n function setWildcard(){														" +
"\n 	wildCard = !wildCard;													" +
"\n }																			" ;
var scrpt =
"\n<script>" +
variables +
funSetSearch +
funCancelSearch +
funGetListSearchResults +
funWildCard +
funShow +
funHide +
initiateHide +
"\n<" + "/" + "script>";
return scrpt;
}
function cvt(fieldName){
return cvt(fieldName,null);
}
function cvt(fieldName,scope){
if (fieldName=="name") return "name";
if (fieldName=="code") return "code";
if (fieldName=="id") return "id";
if (fieldName=="description") return "description";
if (fieldName=="subject") return "subject";
if (fieldName=="lastName") return "lastName";
if (fieldName=="firstName") return "firstName";
if (fieldName=="first_label") {
if ( scope == "user" ) {
return "lastName";
} else if ( scope == "org" ) {
return "name";
}
}
if (fieldName=="second_label") {
if ( scope == "user" ) {
return "firstName";
} else if ( scope == "org" ) {
return "description";
}
}
return "";
}
function listSearchBody(nFields, searchFormTitle, fieldNames, idMessage, scope){
var searchBy = "";
var searchFormInstructions= "<IMG SRC=\"/en/img/wizard/happy_help_icon.gif\">&nbsp;&nbsp;&nbsp";
if(nFields == 1){
searchFormInstructions += instructionsStart //+ "<br>" + singleFieldInstructions;
searchBy += "\n<tr><th align = \'left\' class = \"evenrow\">"+lblSearchBy+"</th><th  align = \'left\' class = \"evenrow\">" + cvt(fieldNames[0], scope) + "</th>"
}
else{
searchFormInstructions += instructionsStart + multiFieldInstructions;
searchBy += "\n<tr><th colspan = \'2\' align = \'left\' class = \"evenrow\">"+lblSearchBy+"</th><tr>";
for (var i = 0; i < nFields ; i++){
if(i == 0){
searchBy +=
"\n<tr><th class = \"evenrow\">" + cvt(fieldNames[i],scope) +
"</th><td class = \"evenrow\"><input type = \"radio\" name = \"searchBy\" checked onClick =" +
"\"setSearch('" + fieldNames[i] + "')\"></td></tr>";
}
else{
searchBy +=
"\n<tr><th class = \"evenrow\">" + cvt(fieldNames[i],scope) +
"</th><td class = \"evenrow\"><input type = \"radio\" name = \"searchBy\"  onClick =" +
"\"setSearch('" + fieldNames[i] + "')\"></td></tr>";
}
}
}
var wildCard = "\n<tr><th align = \'left\' class = \"oddrow\">"+lblUseWildcards+"</th>" +
"<td class = \"oddrow\"><input type = \"checkbox\" name = \"wildcard\"  onClick =" +
"\"setWildcard()\"></td></tr>";
searchFormInstructions += "&nbsp;&nbsp;" + wildcardInstructions;
var searchButton =
"\n <input type = \'button\' name = \'myButton\' value = \'"+lblSearch+"\' onclick = \'return getResults()\'>";
var cancelButton =
"\n <input type = \'button\' name = \'myButton\' value = \'"+lblCancel+"\' onclick = \'return cancelSearch()\'>";
var instructionsLink = "<td class=\"instrTitle\"><a " +
((navigator.appName == 'Netscape')?  "href = '#'" : "") +
" onMouseOver=\"show('instructions')\" onMouseOut=\"hide('instructions')\">"+lblInstructions+"</a></td></tr>";
var html =
"\n</head>" +
"<body marginwidth=\"0\" marginheight=\"0\" leftmargin=\"0\" topmargin=\"0\" onload = \"hide('instructions')\">" +
popupTopUpperpart + popupTopNoPrintImage + popupTopLowerPart +
"<table border=\"0\" cellpadding=\"12\" cellspacing=\"0\" width=\"100%\" align=\"center\">" +
"<tr><td class=\"searchTitle\">" + searchFormTitle + "</td>" +
"</table>" +
"<table border=\"0\" cellpadding=\"12\" cellspacing=\"0\" width=\"100%\" align=\"center\">" +
"<form name = \"openedForm\" onsubmit = \"javascript:return false;\">" +
"<tr><td><hr width = \"100%\" height = \"1\" color = \"black\" ></td></tr>" +
tableTop +
wildCard +
searchBy +
searchForHeader +
tableBottom +
"<tr><th>" + searchButton + cancelButton + "</th></tr>" +
"<tr><td>"		+
"<br>" + searchFormInstructions	+
"</td></tr>"	+
"\n</form></table>" +
popupBottom +
"</body></html>";
return html;
}
function getListsearchResults(searchPhrase,searchBy,  wildCard){
var myBars = 'directories=no, location=no,menubar=no,status=no,titlebar=no,toolbar=no'
var myOptions = 'scrollbars=yes,width=470,height=500'
var myFeatures = myBars + ',' + myOptions;
var searchResults = getSearchResults(searchPhrase,searchBy,  wildCard);
newWin1 = window.open('img/blank.gif','myResultsDoc',myFeatures);
newWin1.document.writeln("\n<html><head>");
newWin1.document.writeln(searchResultsScript( idMessage));
newWin1.document.writeln(style);
newWin1.document.writeln(searchResultsBody(searchResults,  resultsCount, idMessage));
newWin1.document.close();
return false;
}
function searchResultsScript(){
var scrpt =
"\n <script>" +
"\n	var selectedId = null;															" +
"\n	function selectInParent(btn){													" +
"\n		selectedId = parseInt(btn.value)											" +
"\n	}																				" +
"\n	function sendSelectedId(){														" +
"\n		if(selectedId != null){														" +
"\n			opener.NAV_SendSearchResult (top, '" + idMessage + "', selectedId);		" +
"\n 		window.close();																" +
"\n		}																			" +
"\n		else{																		" +
"\n			alert('Please select an item');											" +
"\n		}																			" +
"\n	}																				" +
"\n function cancelSearch(){														" +
"\n     if ( typeof ( opener ) != 'undefined' && typeof ( opener.firstPopUp ) != 'undefined' ){	" +
"\n 		opener.firstPopUp.close(); 												" +
"\n 	}																			" +
"\n 	window.close();																" +
"\n }																				" +
"\n function repeatSearch(){														" +
"\n 	window.close();																" +
"\n }																				" +
funShow +
funHide +
initiateHide +
"\n <" +"/" + "script>																";
return scrpt;
}
function searchResultsBody(searchResult, resultsCount){
var resultsHeader = "";
var btnClose = "";
var btnCancel = "";
var selectInsructions =  "To apply results, select an item by clicking the 'Radio' button next to it.  When you click the 'Select' button, the search and results windows will close and the item will be selected in the main window.";
var generalInstructions = "To try a different search, click the 'Repeat' button.  To close the search and ignore results, click the 'Cancel' button.";
var instructions = "<IMG SRC=\"/en/img/wizard/happy_help_icon.gif\">&nbsp;&nbsp;&nbsp;";
switch (resultsCount){
case 0:
resultsHeader = "No match was found in the list<br><br>";
instructions += generalInstructions;
break;
case 1:
resultsHeader = resultsCount + " " + "match(s) were found in the list.<br><br>";
instructions += selectInsructions + "&nbsp;&nbsp;" + generalInstructions;
break;
default:
resultsHeader =  resultsCount + " " + "match(s) were found in the list.<br><br>" ;
instructions += selectInsructions + "&nbsp;&nbsp;" + generalInstructions;
}
btnClose = (resultsCount > 0 )?
"<input type='button' name='btnS' value='"+lblSelect+"' onclick=sendSelectedId()>":
"";
btnRepeat = "<input type='button' name='btnR' value='"+lblRepeat+"' onclick=repeatSearch()>";
btnCancel = "<input type='button' name='btnC' value='"+lblCancel+"' onclick=cancelSearch()>";
var instructionsLink = "<td class=\"instrTitle\"><a " +
((navigator.appName == 'Netscape')?  "href = '#'" : "" ) +
" onMouseOver=\"show('instructions')\" onMouseOut=\"hide('instructions')\">"+lblInstructions+"</a></td></tr>";
var html =
"\n</head>" +
"<body marginwidth=\"0\" marginheight=\"0\" leftmargin=\"0\" topmargin=\"0\" onload = \"hide('instructions')\">" +
popupTopUpperpart + popupTopNoPrintImage + popupTopLowerPart +
"<table border=\"0\" cellpadding=\"12\" cellspacing=\"0\" width=\"100%\" align=\"center\">" +
"<tr><td class=\"searchTitle\">"+lblSearchResults+"</td>" +
"</table>" +
"<table border=\"0\" cellpadding=\"12\" cellspacing=\"0\" width=\"100%\" align=\"center\">" +
"<tr><td><hr width = \"100%\" height = \"1\" color = \"black\" ></td></tr>" +
"<form name = \"results\">" +
"<tr><td>" + resultsHeader + "</td></tr>" +
"<tr><td class=\"standardButton\">" +
btnClose + '&nbsp;' + btnRepeat + '&nbsp;' +   btnCancel + "<p>" +
"</tr></td>" +
"<tr><td>" +
"<table border=\"0\" cellpadding=\"12\" cellspacing=\"0\" width=\"100%\" align=\"center\">" +
"<tr><td align=\"center\">" +
"<table border=\"0\" cellspacing=\"0\" width=\"90%\"><tr>" +
"<td class=\"border\"><table border=\"0\" cellspacing=\"0\" width=\"100%\">" +
searchResult +
"</table></td></tr></table></td></tr>" +
"</table></td></tr>" +
"<tr><td>"		+
"<br>" + instructions	+
"</td></tr>"	+
"\n</form></table>" +
popupBottom +
"\n</body></html>";
return html;
}
function getSearchResults(searchPhrase,searchBy,  wildCard){
if(typeof(wildCard) == 'undefined'){
wildCard = false;
}
resultsCount = 0;
var mtch;
var searchResult = "";
var searchArray = eval(searchBy + '_list');
searchPhrase = convertToRegEx(searchPhrase.toLowerCase(), wildCard);
var evenOdd = true;
var rowClass;
for(var i = 0; i < searchArray.length; i++){
var sel =  searchArray[i];
var lowerSel = sel.toLowerCase();
mtch = lowerSel.match(searchPhrase);
if(mtch != null ){
resultsCount++;
rowClass = evenOdd ? "oddrow" : "evenrow";
evenOdd = !evenOdd;
searchResult +=
"<tr>" +
"<td class=\"" + rowClass + "\" align=\"left\" width=\"33%\">" +
"<input type=\"radio\" value=\"" + id_list[i] + "\" name=\"R1\" " +
" onclick = \"return selectInParent(this)\"></td>" +
"<td class=\"" + rowClass + "\" width=\"1%\">&nbsp;</td>" +
"<td class=\"" + rowClass + "\" width=\"66\">" + sel + "</td>" +
"</tr>";
}
}
return searchResult;
}
function toolTipDisplay(toolTip){
var myBars = 'directories=no, location=no,menubar=no,status=no,titlebar=no,toolbar=no'
var myOptions = 'scrollbars=yes,width=550,height=300'
var myFeatures = myBars + ',' + myOptions;
var html = "\n<html><head></head>" +
popupTopUpperpart + popupTopPrintImage + popupTopLowerPart +
"<body marginwidth=\"0\" marginheight=\"0\" leftmargin=\"0\" topmargin=\"0\">" +
"<table border=\"0\" cellpadding=\"12\" cellspacing=\"0\" width=\"100%\" align=\"center\">" +
"<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>" +
"<td align = \"left\">" +
toolTip +
"</td></tr>" +
"\n</table>" +
popupBottom +
"\n</body>" +
"\n</html>";
firstPopUp = window.open('img/blank.gif','toolTipDisplay',myFeatures);
firstPopUp.document.writeln("\n<html><head><" + "/" + "head>");
firstPopUp.document.writeln(html);
firstPopUp.document.close();
return false;
}
function dispatch_compound_query_results( formObj, captureFunctionVar1, isMulti, searchFormId, inSeparator )
{
var itemsList = new Array();
itemsList = EPASSCheckbox.getValues( formObj.EPASS_SEL_OBJ );
if(itemsList.length == 0){
alert( 'Please make a selection' );
return false;
}
else if(!isMulti && itemsList.length > 1){
alert( 'Please select only one checkbox' );
return false;
}
var selectedItems = '';
for (var i = 0; i < itemsList.length; i++){
selectedItems += itemsList[i];
if(i < itemsList.length -1) selectedItems += inSeparator;
}
selectedItems = _substituteString("'","\\'",selectedItems);
NAV_FireEvent (top, captureFunctionVar1, selectedItems, 'processDispatchedResults' + searchFormId);
window.parent.close();
return true;
}
// End inlude
// Start include: eprocess.js
function EPASSProcess(  ){
}
var eProcess = new EPASSProcess();
EPASSProcess.prototype.add = function( processObject ){
var bootIt = false;
if ( this.processList ){
} else {
this.processList = new Array();
this.tableProcessList = new Array();
bootIt = true;
}
if ( processObject.isTableColumnProcessor ){
this.tableProcessList[ this.tableProcessList.length ] = processObject;
} else {
this.processList[ this.processList.length ] = processObject;
}
if ( bootIt ){
setTimeout( "eProcess.process()", 5000 );
}
}
EPASSProcess.prototype.doProcess = function(){
var tableColProcess = new Array();
var x;
if(this.processList != null){
for ( x=0; x< this.processList.length ; x++ ){
this.processList[x].process();
}
}
if(this.tableProcessList != null){
if ( this.tableProcessList.length > 0 ){
for ( var pL = 0; pL < this.tableProcessList.length; pL++ ){
this.tableProcessList[pL].processTable();
}
this.resizeActionBar();
}
}
}
EPASSProcess.prototype.process = function(  ){
this.doProcess();
setTimeout( "eProcess.process()", 5000 );
}
EPASSProcess.prototype.resizeActionBar = function(  ){
if ( typeof(rulerNames) == "undefined") return;
var actionBarRow = ec.GetElementById("action_bar_spacers");
if ( actionBarRow != null ){
var allImages = rulerNames.length;
for( i = 0; i < allImages; i++ ){
var thisImgWidth = eval("document.images['" + rulerNames[i] + "'].width");
var actionBarRowCell = ec.GetElementById("dtable_ruler_" + i );
if (actionBarRowCell != null && typeof(actionBarRowCell) != "undefined" && thisImgWidth >0)
{
actionBarRowCell.width = thisImgWidth;
}
}
}
}
// End inlude
// Start include: dtable.js
function EPASSDeltaTableHandler( pName ){
this._pageName = pName;
this.pageRef = _NAV_FindPage( pName ); // In pollintenal
this._doUpdate = NAV_IsTheatreReloadOn( window );
}
EPASSDeltaTableHandler.prototype.setRow = function( rowId ){
if ( ! this._doUpdate ) return;
if ( this.pageRef ){
if ( this.pageRef.ec ){
this.cRow = this.pageRef.ec.GetElementById('ID_'+rowId);
}
}
}
EPASSDeltaTableHandler.prototype.c1 = function( structId, cColNum, cValue ){
if ( ! this._doUpdate ) return;
if ( this.pageRef ) {
if ( this.pageRef.ec ) {
var cN = (cColNum)-1;
var nobr = '<nobr>';
var nobrEnd = '</nobr>';
var cellObj = this.pageRef.ec.GetElementById('TD_' + structId + '_' + cN);
if(cellObj != null) {
cellObj.innerHTML = nobr + this.sqUnescape(cValue) + nobrEnd;
}
}
}
}
EPASSDeltaTableHandler.prototype.c2 = function( structId, cColNum, cValue ){
if ( ! this._doUpdate ) return;
if ( this.pageRef ) {
if ( this.pageRef.ec ) {
var cN = (cColNum)-1;
var nobr = '<nobr>';
var nobrEnd = '</nobr>';
var cellObj = this.pageRef.ec.GetElementById('TD_' + structId + '_' + cN);
if(cellObj != null) {
for ( var x = 3; x< arguments.length; x+=2 ){
ec.SetAttribute( cellObj, arguments[x], arguments[x+1] );
}
cellObj.innerHTML = nobr + this.sqUnescape(cValue) + nobrEnd;
}
}
}
}
EPASSDeltaTableHandler.prototype.setDate = function( newDate ){
if ( this._doUpdate ){
_NAV_JSUPDATE( this._pageName, newDate );
}
}
EPASSDeltaTableHandler.prototype.sqUnescape = function( src ){
if ( src == "~3n~" ){
return "&nbsp; &nbsp; &nbsp;";
}
var re = new RegExp( "~sq~", "g" );
src = src.replace ( re, "'" );
re =new RegExp( "~dq~", "g" );
src = src.replace ( re, '"' );
return src;
}
// End inlude
// Start include: epass_map.js
function EPASSJSMap(allowDuplicates){ try {
if(typeof allowDuplicates == 'undefined') allowDuplicates = false;
this.KEYS = new Array();
this.VALUES = new Array();
this.ALLOW_DUPLICATES = allowDuplicates;
}catch(e){}}
EPASSJSMap.prototype.get = function(key){ try {
key = key.toString();
var keyVal = this.VALUES[key];
if(typeof keyVal == 'undefined'){
return null;
}
else{
return  keyVal;
}
}catch(e){}}
EPASSJSMap.prototype.put = function(key, val){ try {
key = key.toString();
if(!this.containsKey(key)){
this.KEYS[this.KEYS.length] = key;
}
if(this.ALLOW_DUPLICATES){
var keyValues = this.VALUES[key];
if(typeof keyValues == 'undefined' || keyValues == null){
keyValues = new Array();
}
keyValues[keyValues.length] = val;
this.VALUES[key] = keyValues;
}
else{
this.VALUES[key] = val;
}
}catch(e){}}
EPASSJSMap.prototype.putAll = function(map){ try {
var keys = map.keySet();
for(var i = 0; i < keys.length; i++){
var val = map.get(keys[i]);
if(this.ALLOW_DUPLICATES){
for(j = 0; j < val.length; j++){
this.put(keys[i], val[j]);
}
}
else{
this.put(keys[i], val);
}
}
}catch(e){}}
EPASSJSMap.prototype.size = function(){ try {
return this.KEYS.length;
}catch(e){}}
EPASSJSMap.prototype.isEmpty = function(){ try {
return this.KEYS.length == 0;
}catch(e){}}
EPASSJSMap.prototype.keySet = function(){ try {
return this.KEYS;
}catch(e){}}
EPASSJSMap.prototype.values = function(){ try {
var ret = new Array();
for(var i = 0; i < this.KEYS.length; i++) ret[i] = this.VALUES[this.KEYS[i]]
return ret;
}catch(e){}}
EPASSJSMap.prototype.entrySet = function(){ try {
var result = new Array(this.KEYS.length);
for(var i = 0; i < this.KEYS.length; i++){
result[i] = new MapEntry(this.KEYS[i],this.VALUES[i]);
}
return result;
}catch(e){}}
EPASSJSMap.prototype.containsKey = function(key){ try {
key = key.toString();
for(var i = 0; i < this.KEYS.length; i++){
if(key == this.KEYS[i]) return true;
}
return false;
}catch(e){}}
EPASSJSMap.prototype.containsValue = function(val){ try {
for(var i = 0; i < this.KEYS.length; i++){
var vals = this.VALUES[this.KEYS[i]];
if(this.ALLOW_DUPLICATES){
for(var j = 0; j < vals.length; j++){
if(val == vals[j]) return true;
}
}
else{
if(vals == val) return true;
}
}
return false;
}catch(e){}}
EPASSJSMap.prototype.remove = function(key){ try {
key = key.toString();
var newKeys = new Array();
for(var i = 0; i < this.KEYS.length; i++){
if(key == this.KEYS[i]){
this.VALUES[key] = null;
}
else{
newKeys[newKeys.length] =  this.KEYS[i];
}
}
this.KEYS = newKeys;
}catch(e){}}
EPASSJSMap.prototype.clear = function(){ try {
this.KEYS = new Array();
this.VALUES = new Array();
}catch(e){}}
EPASSJSMap.prototype.copy = function(){ try {
var newMap = new EPASSJSMap(this.ALLOW_DUPLICATES);
for(var i = 0; i < this.KEYS.length; i++){
newMap.put(this.KEYS[i],this.get(this.KEYS[i]));
}
return newMap;
}catch(e){}}
EPASSJSMap.createMap = function(){ try {
var args = this.createMap.arguments;
if(args[0][0].NAME != 'undefined' && args[0][0].NAME == 'MapEntry')
return this.createMapFromEntries(args[0],args[1]);
else
return this.createMapFromKeyValuePairs(args[0],args[1],args[2]);
}catch(e){}}
EPASSJSMap.createMapFromKeyValuePairs = function(keys, values, allowDuplicates){ try {
if(typeof allowDuplicates == 'undefined') allowDuplicates = false;
var newMap = new EPASSJSMap(allowDuplicates);
for(var i = 0; i < keys.length; i++){
newMap.put(keys[i],values[i]);
}
return newMap;
}catch(e){}}
EPASSJSMap.createMapFromEntries = function(mapEntries, allowDuplicates){ try {
if(typeof allowDuplicates == 'undefined') allowDuplicates = false;
var newMap = new EPASSJSMap(allowDuplicates);
for(var i = 0; i < mapEntries.length; i++){
newMap.put(mapEntries[i].KEY,mapEntries[i].VALUE);
}
return newMap;
}catch(e){}}
EPASSJSMap.createMapVariable = function(variableName, keys, values, allowDuplicates){ try {
var args = this.createMapVariable.arguments;
if(args[1][0].NAME != 'undefined' && args[1][0].NAME == 'MapEntry')
this.createMapVariableFromEntries(args[0],args[1],args[2]);
else
this.createMapVariableFromKeyValuePairs(args[0],args[1],args[2],args[3]);
}catch(e){}}
EPASSJSMap.createMapVariableFromKeyValuePairs = function(variableName, keys, values, allowDuplicates){ try {
if(typeof allowDuplicates == 'undefined') allowDuplicates = false;
var newMap = new EPASSJSMap(allowDuplicates);
for(var i = 0; i < keys.length; i++){
newMap.put(keys[i],values[i]);
}
eval(variableName + ' = newMap');
}catch(e){}}
EPASSJSMap.createMapVariableFromEntries = function(variableName,mapEntries, allowDuplicates){ try {
if(typeof allowDuplicates == 'undefined') allowDuplicates = false;
var newMap = new EPASSJSMap(allowDuplicates);
for(var i = 0; i < mapEntries.length; i++){
newMap.put(mapEntries[i].KEY,mapEntries[i].VALUE);
}
eval(variableName + ' = newMap');
}catch(e){}}
EPASSJSMap.prototype.getReverseMap = function(){ try {
var reverseMap = new EPASSJSMap();
if(this.ALLOW_DUPLICATES) return null;
for(var i = 0; i < this.KEYS.length; i++){
reverseMap.put(this.VALUES[i], this.KEYS[i]);
}
return reverseMap;
}catch(e){}}
EPASSJSMap.prototype.print = function(n){ try {
if(typeof n == 'undefined') n= this.KEYS.length;
var str = '';
for(var i = 0; i < n; i++){
str+= 'key = ' + this.KEYS[i] + ', value = ' + this.VALUES[this.KEYS[i]] + '\n';
}
alert(str)
}catch(e){}}
function MapEntry(key,val){ try {
this.NAME = 'MapEntry';
this.KEY = key;
this.VALUE = val;
}catch(e){}}
MapEntry.prototype.getKey = function(){ try {
return this.KEY;
}catch(e){}}
MapEntry.prototype.getValue = function(){ try {
return this.VALUE;
}catch(e){}}
function EPASSQueue(maxSize){ try {
this.queue = new Array();
this.maxSize = typeof maxSize != 'undefined' && maxSize != null ? maxSize : Infinity;
}catch(e){}}
EPASSQueue.prototype.isEmpty = function(){ try {
return this.queue.length == 0;
}catch(e){}}
EPASSQueue.prototype.size = function(){ try {
return this.queue.length;
}catch(e){}}
EPASSQueue.prototype.offer = function(element){ try {
if(this.queue.length < this.maxSize){
this.queue.push(element);
}
return false;
}catch(e){}}
EPASSQueue.prototype.poll = function(){ try {
if(!this.isEmpty()){
return this.queue.shift();
}
else
return null;
}catch(e){}}
EPASSQueue.prototype.remove = function(){ try {
if(!this.isEmpty()){
return this.queue.shift();
}
else
throw "empty";
}catch(e){}}
EPASSQueue.prototype.peek = function(){ try {
if(!this.isEmpty()){
return this.queue[0];
}
else
return null;
}catch(e){}}
EPASSQueue.prototype.element = function(){ try {
if(!this.isEmpty()){
return this.queue[0];
}
else
throw "empty";
}catch(e){}}
// End inlude
// Start include: dhtmllib.js
var isMinNS4 = (navigator.appName.indexOf("Netscape") >= 0 &&
parseFloat(navigator.appVersion) >= 4) ? 1 : 0;
var isMinIE4 = (document.all) ? 1 : 0;
var isMinIE5 = (isMinIE4 && navigator.appVersion.indexOf("5.") >= 0) ? 1 : 0;
if ( ec.isNN6() ){
isMinIE4 = true;
isMinNS4 = false;
}
function hideLayer(layer) {
if (isMinNS4)
layer.visibility = "hide";
if (isMinIE4)
layer.style.visibility = "hidden";
}
function showLayer(layer) {
if (isMinNS4)
layer.visibility = "show";
if (isMinIE4)
layer.style.visibility = "visible";
}
function inheritLayer(layer) {
if (isMinNS4)
layer.visibility = "inherit";
if (isMinIE4)
layer.style.visibility = "inherit";
}
function getVisibility(layer) {
if (isMinNS4) {
if (layer.visibility == "show")
return "visible";
if (layer.visibility == "hide")
return "hidden";
return layer.visibility;
}
if (isMinIE4)
return layer.style.visibility;
return "";
}
function moveLayerTo(layer, x, y) {
if (isMinNS4)
layer.moveTo(x, y);
if (isMinIE4) {
layer.style.left = x;
layer.style.top  = y;
}
}
function moveLayerBy(layer, dx, dy) {
if (isMinNS4)
layer.moveBy(dx, dy);
if (isMinIE4) {
layer.style.pixelLeft += dx;
layer.style.pixelTop  += dy;
}
}
function getLeft(layer) {
if (isMinNS4)
return layer.left;
if (isMinIE4)
return layer.style.pixelLeft;
return -1;
}
function getTop(layer) {
if (isMinNS4)
return layer.top;
if (isMinIE4)
return layer.style.pixelTop;
return -1;
}
function getRight(layer) {
if (isMinNS4)
return layer.left + getWidth(layer);
if (isMinIE4)
return layer.style.pixelLeft + getWidth(layer);
return -1;
}
function getBottom(layer) {
if (isMinNS4)
return layer.top + getHeight(layer);
if (isMinIE4)
return layer.style.pixelTop + getHeight(layer);
return -1;
}
function getPageLeft(layer) {
var x;
if (isMinNS4)
return layer.pageX;
if (isMinIE4) {
x = 0;
while (layer.offsetParent != null) {
x += layer.offsetLeft;
layer = layer.offsetParent;
}
x += layer.offsetLeft;
return x;
}
return -1;
}
function getPageTop(layer) {
var y;
if (isMinNS4)
return layer.pageY;
if (isMinIE4) {
y = 0;
while (layer.offsetParent != null) {
y += layer.offsetTop;
layer = layer.offsetParent;
}
y += layer.offsetTop;
return y;
}
return -1;
}
function getWidth(layer) {
if (isMinNS4) {
if (layer.document.width)
return layer.document.width;
else
return layer.clip.right - layer.clip.left;
}
if (isMinIE4) {
if (layer.style.pixelWidth)
return layer.style.pixelWidth;
else
return layer.clientWidth;
}
return -1;
}
function getHeight(layer) {
if (isMinNS4) {
if (layer.document.height)
return layer.document.height;
else
return layer.clip.bottom - layer.clip.top;
}
if (isMinIE4) {
if (layer.style.pixelHeight)
return layer.style.pixelHeight;
else
return layer.clientHeight;
}
return -1;
}
function getzIndex(layer) {
if (isMinNS4)
return layer.zIndex;
if (isMinIE4)
return layer.style.zIndex;
return -1;
}
function setzIndex(layer, z) {
if (isMinNS4)
layer.zIndex = z;
if (isMinIE4)
layer.style.zIndex = z;
}
function clipLayer(layer, clipleft, cliptop, clipright, clipbottom) {
if (isMinNS4) {
layer.clip.left   = clipleft;
layer.clip.top    = cliptop;
layer.clip.right  = clipright;
layer.clip.bottom = clipbottom;
}
if (isMinIE4)
layer.style.clip = 'rect(' + cliptop + ' ' +  clipright + ' ' + clipbottom + ' ' + clipleft +')';
}
function getClipLeft(layer) {
if (isMinNS4)
return layer.clip.left;
if (isMinIE4) {
var str =  layer.style.clip;
if (!str)
return 0;
var clip = getIEClipValues(layer.style.clip);
return(clip[3]);
}
return -1;
}
function getClipTop(layer) {
if (isMinNS4)
return layer.clip.top;
if (isMinIE4) {
var str =  layer.style.clip;
if (!str)
return 0;
var clip = getIEClipValues(layer.style.clip);
return clip[0];
}
return -1;
}
function getClipRight(layer) {
if (isMinNS4)
return layer.clip.right;
if (isMinIE4) {
var str =  layer.style.clip;
if (!str)
return layer.style.pixelWidth;
var clip = getIEClipValues(layer.style.clip);
return clip[1];
}
return -1;
}
function getClipBottom(layer) {
if (isMinNS4)
return layer.clip.bottom;
if (isMinIE4) {
var str =  layer.style.clip;
if (!str)
return layer.style.pixelHeight;
var clip = getIEClipValues(layer.style.clip);
return clip[2];
}
return -1;
}
function getClipWidth(layer) {
if (isMinNS4)
return layer.clip.width;
if (isMinIE4) {
var str = layer.style.clip;
if (!str)
return layer.style.pixelWidth;
var clip = getIEClipValues(layer.style.clip);
return clip[1] - clip[3];
}
return -1;
}
function getClipHeight(layer) {
if (isMinNS4)
return layer.clip.height;
if (isMinIE4) {
var str =  layer.style.clip;
if (!str)
return layer.style.pixelHeight;
var clip = getIEClipValues(layer.style.clip);
return clip[2] - clip[0];
}
return -1;
}
function getIEClipValues(str) {
var clip = new Array();
var i;
i = str.indexOf("(");
clip[0] = parseInt(str.substring(i + 1, str.length), 10);
i = str.indexOf(" ", i + 1);
clip[1] = parseInt(str.substring(i + 1, str.length), 10);
i = str.indexOf(" ", i + 1);
clip[2] = parseInt(str.substring(i + 1, str.length), 10);
i = str.indexOf(" ", i + 1);
clip[3] = parseInt(str.substring(i + 1, str.length), 10);
return clip;
}
function scrollLayerTo(layer, x, y, bound) {
var dx = getClipLeft(layer) - x;
var dy = getClipTop(layer) - y;
scrollLayerBy(layer, -dx, -dy, bound);
}
function scrollLayerBy(layer, dx, dy, bound) {
var cl = getClipLeft(layer);
var ct = getClipTop(layer);
var cr = getClipRight(layer);
var cb = getClipBottom(layer);
if (bound) {
if (cl + dx < 0)
dx = -cl;
else if (cr + dx > getWidth(layer))
dx = getWidth(layer) - cr;
if (ct + dy < 0)
dy = -ct;
else if (cb + dy > getHeight(layer))
dy = getHeight(layer) - cb;
}
clipLayer(layer, cl + dx, ct + dy, cr + dx, cb + dy);
moveLayerBy(layer, -dx, -dy);
}
function setBgColor(layer, color) {
if (isMinNS4)
layer.bgColor = color;
if (isMinIE4)
layer.style.backgroundColor = color;
}
function setBgImage(layer, src) {
if (isMinNS4)
layer.background.src = src;
if (isMinIE4)
layer.style.backgroundImage = "url(" + src + ")";
}
function getLayer(name) {
if (isMinNS4)
return findLayer(name, document);
if (isMinIE4)
return ec.GetElementById( name );
return null;
}
function findLayer(name, doc) {
var i, layer;
for (i = 0; i < doc.layers.length; i++) {
layer = doc.layers[i];
if (layer.name == name)
return layer;
if (layer.document.layers.length > 0)
if ((layer = findLayer(name, layer.document)) != null)
return layer;
}
return null;
}
function getImage(name) {
if (isMinNS4) {
return findImage(name, document);
}
if (isMinIE4)
return ec.GetElementById( name );
return null;
}
function findImage(name, doc) {
var i, img;
for (i = 0; i < doc.images.length; i++)
if (doc.images[i].name == name)
return doc.images[i];
for (i = 0; i < doc.layers.length; i++)
if ((img = findImage(name, doc.layers[i].document)) != null) {
img.container = doc.layers[i];
return img;
}
return null;
}
function getImagePageLeft(img) {
var x, obj;
if (isMinNS4) {
if (img.container != null)
return img.container.pageX + img.x;
else
return img.x;
}
if (isMinIE4) {
x = 0;
obj = img;
while (obj.offsetParent != null) {
x += obj.offsetLeft;
obj = obj.offsetParent;
}
x += obj.offsetLeft;
return x;
}
return -1;
}
function getImagePageTop(img) {
var y, obj;
if (isMinNS4) {
if (img.container != null)
return img.container.pageY + img.y;
else
return img.y;
}
if (isMinIE4) {
y = 0;
obj = img;
while (obj.offsetParent != null) {
y += obj.offsetTop;
obj = obj.offsetParent;
}
y += obj.offsetTop;
return y;
}
return -1;
}
function getWindowWidth() {
if ( ec.isNN6() || window.innerWidth){
return window.innerWidth;
}
if (isMinNS4)
return window.innerWidth;
if (isMinIE4)
return document.body.clientWidth;
return -1;
}
function getWindowHeight() {
if ( ec.isNN6() || window.innerHeight){
return window.innerHeight;
}
if (isMinNS4)
return window.innerHeight;
if (isMinIE4)
return document.body.clientHeight;
return -1;
}
function getPageWidth() {
if ( ec.isNN6() ){
return document.width;
}
if (isMinNS4)
return document.width;
if (isMinIE4)
return document.body.scrollWidth;
return -1;
}
function getPageHeight() {
if ( ec.isNN6() ){
return document.height;
}
if (isMinNS4)
return document.height;
if (isMinIE4)
return document.body.scrollHeight;
return -1;
}
function getPageScrollX() {
if ( ec.isNN6() ){
return window.pageXOffset;
}
if (isMinNS4)
return window.pageXOffset;
if (isMinIE4)
return document.body.scrollLeft;
return -1;
}
function getPageScrollY() {
if ( ec.isNN6() ){
return window.pageYOffset;
}
if (isMinNS4)
return window.pageYOffset;
if (isMinIE4)
return document.body.scrollTop;
return -1;
}
var dh_isNS = navigator.appName == 'Netscape';
function getEvent(evt){
return dh_isNS ? ((evt)?evt:null) : event;
}
function getXMLHttpRequest(){
return dh_isNS ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP");
}
function getEventSource(evt){
return dh_isNS ? ((evt)?evt.currentTarget :document) : event.srcElement;
}
function getEventLeft(evt){
if ( !evt && !event ) return 0;
return getEvent(evt).clientX;
}
function getEventTop(evt){
if ( !evt && !event) return 0;
return getEvent(evt).clientY;
}
function getScrollLeft(){
return dh_isNS ?  window.pageXOffset :  document.body.scrollLeft;
}
function getScrollTop(){
return dh_isNS ?  window.pageYOffset :  document.body.scrollTop;
}
function getElemScrollLeft(elem){
return dh_isNS ?  elem.pageXOffset :  elem.scrollLeft;
}
function getElemScrollTop(elem){
return dh_isNS ?  elem.pageYOffset :  elem.scrollTop;
}
function setElemScrollLeft(elem, v){
if(dh_isNS)
elem.pageXOffset = v;
else
elem.scrollLeft = v;
}
function setElemScrollTop(elem, v){
if(dh_isNS)
elem.pageYOffset = v;
else
elem.scrollTop = v;
}
function getElementLeft(elem, container){
return etElementLeft(elem, container.id)
}
function getElementLeft(elem, containerId){
var lft = elem.offsetLeft;
var prnt = elem.parentNode;
while(prnt.id != containerId){
lft += prnt.offsetLeft;
prnt = prnt.parentNode;
}
return lft;
}
function getElementTop(elem, container){
return etElementTop(elem, container.id)
}
function getElementTop(elem, containerId){
var tp = elem.offsetTop;
var prnt = elem.parentNode;
while(prnt.id != containerId){
tp += prnt.offsetTop;
prnt = prnt.parentNode;
}
return tp;
}
function setPercentOpacity(elem, percentOpacity){
if(percentOpacity > 100) percentOpacity = 100;
if(percentOpacity < 0) percentOpacity = 0;
if(dh_isNS)
elem.style.MozOpacity = (percentOpacity/100);
else
elem.style.filter = "alpha(opacity=" + percentOpacity;
}
function getKeyValue(evt){
return dh_isNS ? evt.which : event.keyCode;
}
function getElementProperty(elem, proprtyName){
var result;
if(dh_isNS){
var curStyle = document.defaultView.getComputedStyle(elem,"");
result = curStyle.getPropertyValue(proprtyName);
}
else{
result = elem.currentStyle[proprtyName];
}
return result;
}
function getPhraseHeightInContainer(phrase, availableWidth, container){
var fSize = parseInt(getElementProperty(container, 'fontSize'));
var fFamily = getElementProperty(container, 'fontFamily');
var fWeight = getElementProperty(container, 'fontWeight');
return getPhraseHeight(phrase, availableWidth, fFamily,fSize, fWeight);
}
function getPhraseHeight(phrase, availableWidth , fntFamily, fntSize, fntWeight){
if(phrase.length == 0) return null;
if(typeof fntWeight == 'undefined') fntWeight = 'normal';
var testDiv = document.getElementById('hEiGhTeStDiV');
if(testDiv == null){
testDiv = document.createElement('div');
testDiv.style.position = 'absolute';
testDiv.style.visibility = 'hidden';
testDiv.id = 'hEiGhTeStDiV';
document.body.appendChild(testDiv);
}
testDiv.style.width = availableWidth;
testDiv.style.fontFamily = fntFamily;
testDiv.style.fontSize = fntSize;
testDiv.style.fontWeight = fntWeight;
testDiv.innerHTML= phrase;
return testDiv.offsetHeight+2;
}
function getPhraseWidthInContainer(phrase, container){
var fSize = parseInt(getElementProperty(container, 'fontSize'));
var fFamily = getElementProperty(container, 'fontFamily');
var fWeight = getElementProperty(container, 'fontWeight');
return getPhraseWidth(phrase, fFamily,fSize, fWeight);
}
function getPhraseWidth(phrase, fntFamily, fntSize, fntWeight){
var dimension =  getPhraseDimension(phrase, fntFamily, fntSize, fntWeight);
if(dimension != null)
return dimension[0];
else
return null;
}
function getPhraseDimensionInContainer(phrase, container){
var fSize = parseInt(getElementProperty(container, 'fontSize'));
var fFamily = getElementProperty(container, 'fontFamily');
var fWeight = getElementProperty(container, 'fontWeight');
return getPhraseDimension(phrase, fFamily,fSize, fWeight);
}
function getPhraseDimension(phrase, fntFamily, fntSize, fntWeight){
if(phrase.length == 0) return null;
if(typeof fntWeight == 'undefined') fntWeight = 'normal';
var testDiv = document.getElementById('wIdThTeStDiV');
if(testDiv == null){
testDiv = document.createElement('div');
testDiv.style.position = 'absolute';
testDiv.style.visibility = 'hidden';
testDiv.style.whiteSpace = 'nowrap';
testDiv.id = 'wIdThTeStDiV';
document.body.appendChild(testDiv);
}
testDiv.style.fontFamily = fntFamily;
testDiv.style.fontSize = fntSize;
testDiv.style.fontWeight = fntWeight;
testDiv.innerHTML= phrase;
return [testDiv.offsetWidth+2, testDiv.offsetHeight+2];
}
function getTruncatedDisplay(txt, elem, availableWidth){
var fSize;
var fFamily;
var fWeight ;
if(typeof elem == 'undefined' || elem == null){
fSize = 12;
fFamily = 'arial, helvetica, sans-serif';
fWeight = 'normal';
}
else{
if(navigator.appName == 'Netscape'){
var curStyle = document.defaultView.getComputedStyle(elem,"");
fSize = curStyle.getPropertyValue('font-size');
fFamily = curStyle.getPropertyValue('font-family');
fWeight = curStyle.getPropertyValue('font-weight');
}
else{
fSize = elem.currentStyle.fontSize;
fFamily = elem.currentStyle.fontFamily;
fWeight = elem.currentStyle.fontWeight;
}
}
if(typeof availableWidth == 'undefined' || availableWidth == null){
availableWidth = elem.offsetWidth - 5; //Allocate smaller space as a seafety precaution
}
else{
availableWidth -=5;
}
var fullTextWidth = getPhraseWidth(txt, fFamily, fSize, fWeight);
if(availableWidth > fullTextWidth){
return null;
}
var nTrunc = parseInt( availableWidth* txt.length/fullTextWidth);
var elipsis = '...';
var truncated = txt.substring(0, nTrunc) + elipsis;
var truncWidth = getPhraseWidth(truncated, fFamily, fSize, fWeight);
var c = 0;
if(truncWidth < availableWidth){
while(truncWidth < availableWidth){
truncated = txt.substring(0, nTrunc++) + elipsis;
truncWidth = getPhraseWidth(truncated, fFamily, fSize, fWeight);
if(c++ > 100)break;
}
}
else{
while(truncWidth > availableWidth){
truncated = txt.substring(0, nTrunc--) + elipsis;
truncWidth = getPhraseWidth(truncated, fFamily, fSize, fWeight);
if(c++ > 100)break;
}
}
return truncated;
}
function addEvent(eventTarget,eventName,handler){
if(typeof eventTarget.addEventListener != 'undefined' && eventTarget.addEventListener != null) {
eventTarget.addEventListener(eventName,handler,false);
}
else if(typeof eventTarget.attachEvent != 'undefined' && eventTarget.attachEvent != null){
eventTarget["e"+eventName+handler]=handler;
eventTarget[eventName+handler]=function(){eventTarget["e"+eventName+handler](window.event);}
eventTarget.attachEvent("on"+eventName,eventTarget[eventName+handler]);
}
}
function removeEvent(eventTarget,eventName,handler){
if(typeof eventTarget.removeEventListener != 'undefined' &&  eventTarget.removeEventListener != null ){
eventTarget.removeEventListener(eventName,handler,false);
}
else if(typeof eventTarget.detachEvent != 'undefined' &&  eventTarget.detachEvent != null){
eventTarget.detachEvent("on"+eventName,eventTarget[eventName+handler]);
eventTarget[eventName+handler]=null;
eventTarget["e"+eventName+handler]=null;
}
}
// End inlude
function IncludeJavaScript(jsFile)
{
document.write('<script type="text/javascript" src="'
+ jsFile + '"></scr' + 'ipt>');
}
IncludeJavaScript('/dhtml_lib/js/patch.js');

