//	WebHelp 5.10.004
var gsFileName="";
var gsDivName="";
var xmlDoc=null;
var sdocPath=null;
var gsInsertBeforeEndHTML="";
var sReplaceStringsSrc=new Array();
var gsDivName="dataDiv";
var gnLoadDivNum=0;
var xmlHttp=null;
sReplaceStringsSrc[0]="&amp;";
sReplaceStringsSrc[1]="&gt;";
sReplaceStringsSrc[2]="&lt;";
sReplaceStringsSrc[3]="&quot;";
sReplaceStringsSrc[4]=String.fromCharCode(8364);
sReplaceStringsSrc[5]="&nbsp;";

var sReplaceStringsDst=new Array();
sReplaceStringsDst[0]="&";
sReplaceStringsDst[1]=">";
sReplaceStringsDst[2]="<";
sReplaceStringsDst[3]="\"";
sReplaceStringsDst[4]=String.fromCharCode(128);
sReplaceStringsDst[5]=" ";
var goHighLighted=null;
var c_sEnginePath='/robo/bin/robo.dll';	// roboengine path
var gbSearchPage=false;

var gIllegalTopicNameChars = "*?\'\"<>|[];" ;

function _getRelativePath(strParentPath,strCurrentPath)
{
	if(_isAbsPath(strCurrentPath)) return _getPath(strCurrentPath);
	strParentPath=_replaceSlash(strParentPath);
	strParentPath=_getPath(strParentPath);
	strCurrentPath=_replaceSlash(strCurrentPath);
	strCurrentPath=_getPath(strCurrentPath);
	for(var i=0;i<strParentPath.length&&i<strCurrentPath.length;i++)
	{
		if(strParentPath.charAt(i)!=strCurrentPath.charAt(i))
			break;
	}
	
	strParentPath=strParentPath.substring(i);
	strCurrentPath=strCurrentPath.substring(i);	
	
	var nPathPos=0;
	while(nPathPos!=-1)
	{
		nPathPos=strParentPath.indexOf("/");
		if(nPathPos!=-1)
		{
			strParentPath=strParentPath.substring(nPathPos+1);
			strCurrentPath="../"+strCurrentPath;
		}
	}
	return strCurrentPath;
}

function _getRelativeFileName(strParentPath,strCurrentPath)
{
	strParentPath=_replaceSlash(strParentPath);
	strParentPath=_getPath(strParentPath);
	strCurrentPath = _replaceSlash(strCurrentPath);
	var lastSlashIdx = 0;
	for(var i=0;i<strParentPath.length&&i<strCurrentPath.length;i++) {
	    if (strParentPath.charAt(i) != strCurrentPath.charAt(i)) {
	        break;
	    }
	    else {
	        if (strParentPath.charAt(i) == '/')
	            lastSlashIdx = i;
	    }
	}

	strParentPath = strParentPath.substring(lastSlashIdx+1);
	strCurrentPath = strCurrentPath.substring(lastSlashIdx+1);	
	
	var nPathPos=0;
	while(nPathPos!=-1)
	{
		nPathPos=strParentPath.indexOf("/");
		if(nPathPos!=-1)
		{
			strParentPath=strParentPath.substring(nPathPos+1);
			strCurrentPath="../"+strCurrentPath;
		}
	}
	return strCurrentPath;
}

function _isAbsPathToHost(sPath)
{
	return (sPath.indexOf("/")==0);
}

function _getHost(sPath)
{
	var nPos=sPath.indexOf("//");
	if(nPos>0)
	{
		var nPosx=sPath.indexOf("/",nPos+2);
		if(nPosx>0)
			return sPath.substring(0,nPosx);
		else
			return sPath;
	}
	return sPath;
}

function _getFullPath(sPath,sRelPath)
{
	if(_isAbsPath(sRelPath))
		return sRelPath;
	else if(_isAbsPathToHost(sRelPath))
		return _getHost(sPath)+sRelPath;
	else
	{
		var sFullPath=sPath;
		var nPathPos=0;
		while(nPathPos!=-1)
		{
			var nPathPos=sRelPath.indexOf("../");
			if(nPathPos!=-1)
			{
				sRelPath=sRelPath.substring(nPathPos+3);
				sFullPath=sFullPath.substring(0,sFullPath.length-1);
				var nPos2=sFullPath.lastIndexOf("/");
				if(nPos2!=-1)
					sFullPath=sFullPath.substring(0,nPos2+1);
				else
					break;
			}
		}
		sFullPath+=sRelPath;
		return sFullPath;
	}	
}

function _getFullPathInAIR( sSwfPath, sRelPath)
{
	var retPath = _getFullPath(_getPath(sSwfPath) , sRelPath);
	var retFile = new window.runtime.flash.filesystem.File(retPath);
	return retFile.nativePath;			
}

function _isAbsPath(strPath)
{
	var strUpper=strPath.toUpperCase();
	return (strUpper.indexOf(":")!=-1||strUpper.indexOf("\\\\")==0);
}

function _replaceSlash(strURL)
{	
	var re=new RegExp("\\\\","g");
	var strReplacedURL=strURL.replace(re,"/");
	return strReplacedURL;
}

function _getPath(strURL)
{
	// remove the search and hash string
	var n=0;
	var n1=strURL.indexOf('#');
	var n2=strURL.indexOf('?');
	if( n1>=0 )
	{
		if( n2>=0 )
				n=(n1>n2)?n2:n1;
		else	n=n1;
	}else
	{
		if( n2>=0 )
				n=n2;
		else	n=strURL.length;
	};
	strURL=strURL.substring(0, n);

	pathpos=strURL.lastIndexOf("/");
	if(pathpos>0)
		return strURL.substring(0,pathpos+1);
	else
		return "";
}

function _isHTTPUrl(strUrl)
{
    strUrl = strUrl.toUpperCase();
    str1 = strUrl.substring(0, 7);
    str2 = strUrl.substring(0, 8);
    if(str1 == "HTTP://" || str1 == "HTTP:\\\\" ||
    str2 == "HTTPS://" || str2 == "HTTPS:\\\\")
        return true;
	else 
	{
	    str3 = strUrl.substring(0, 4);
	    if(str3 == "WWW.")
	        return true;
	}
	return false;
}

function _isRemoteUrl(strUrl)
{
    strUrl.toUpperCase();
    if(_isHTTPUrl(strUrl)) return true;

    str1 = strUrl.substring(0, 7);
    if (str1 == "MAILTO:")	return true;
    if (str1 == "TELNET:")	return true;
    if (str1 == "GOPHER:")	return true;
    str1 = strUrl.substring(0, 5);
    if (str1 == "FTP://")	return true;
    if (str1 == "NEWS:")	return true;
    if (str1 == "FILE:")	return true;
    if (str1 == "FTP:\\\\") return true;

    return false;
}

function removeItemFromArray(oArray,i)
{
	if(oArray.length&&i>=0&&i<oArray.length)
	{
		var len=oArray.length;
		for(var s=i;s<len-1;s++)
			oArray[s]=oArray[s+1];
		oArray.length=len-1;
	}
}

function insertItemIntoArray(oArray,i,obj)
{
	if(oArray.length&&i>=0&&i<=oArray.length)
	{
		var len=oArray.length;
		for(var s=len;s>i;s--)
			oArray[s]=oArray[s-1];
		oArray[i]=obj;		
	}
}

function loadData(sFileName)
{
	var i=gnLoadDivNum;
	var sName=gsDivName+gnLoadDivNum++;
	loadData_2(sFileName,sName);
}

function loadData_2(sFileName,sDivName)
{
	if(!getElement(sDivName))
	{
		if(!insertDataDiv(sDivName))
		{
			gsFileName=sFileName;
			gsDivName=sDivName;
			return;
		}
	}
	var sHTML="";
	if(gbMac)
		sHTML+="<iframe src=\""+sFileName+"\"></iframe>";
	else
		sHTML+="<iframe style=\"visibility:hidden;width:0;height:0\" src=\""+sFileName+"\"></iframe>";
	
	var oDivCon=getElement(sDivName);
	if(oDivCon)
	{
		if(gbNav6)
		{
			if(oDivCon.getElementsByTagName&&oDivCon.getElementsByTagName("iFrame").length>0)
			{
				oDivCon.getElementsByTagName("iFrame")[0].src=sFileName;
			}
			else
				oDivCon.innerHTML=sHTML;
		}
		else
			oDivCon.innerHTML=sHTML;
	}
}

function IsHTTPURL(sdocPath)
{
    var bRetVal = true;
    switch(window.location.protocol)
    {
        case "file:":
            bRetVal = false;
            break;
    }
    return bRetVal;
}



function WhQueue() {
    var container = new Array;
    var frontOffset = 0;
    this.getLength = function () {
        return (container.length - frontOffset);
    }
    this.isEmpty = function () {
        return (container.length == 0);
    }
    this.enqueue = function (elem) {
        container.push(elem);
    }
    this.dequeue = function () {
        if (this.isEmpty()) return undefined;
        var elem = container[frontOffset];
        frontOffset++;
        if (frontOffset * 2 >= container.length) {
            container = container.slice(frontOffset);
            frontOffset = 0;
        }
        return elem;
    }
    this.peek = function () {
        if (container.length > 0)
            return container[frontOffset];
        return undefined;
    }
}


var gXMLBuffer = null;
var gFileNameToXMLMap = new Object();
var xmlJsReader = new XmlJsReader();

function XmlInfo(xmlPath, oFunCallback, args) {
    this.sXmlPath = xmlPath;
    this.callback = oFunCallback;
    this.cbargs = args;
}

function XmlJsReader() {
    this.queue = new WhQueue();
    this.bLoading = false;

    this.getJsNameFromXmlName = function (xmlPath) {
        var indx = xmlPath.lastIndexOf(".xml");
        if (indx != -1) {
            var jsPath = xmlPath.substring(0, indx);
            jsPath += "_xml.js";
            return jsPath;
        }
    }
    /*use relative path for xmlPath*/
    this.loadFile = function (xmlPath, oFunCallback, args) {
        this.queue.enqueue(new XmlInfo(xmlPath, oFunCallback, args));
        this.loadFromQueue();
    }

    this.loadFromQueue = function () {
        if (this.queue.isEmpty() || this.bLoading) {
            return;
        }
        else {
            var xmlInfo = this.queue.peek();
            if (typeof (gFileNameToXMLMap[xmlInfo.sXmlPath]) == 'undefined') {
                var jsPath = this.getJsNameFromXmlName(xmlInfo.sXmlPath);
                this.loadScript(jsPath, this.onScriptLoaded);
            }
            else {
                this.onScriptLoaded();
            }
        }
    }

    this.trim = function(stringToTrim) {
	return stringToTrim.replace(/^\s+|\s+$/g,"");
    }

    this.onScriptLoaded = function () {
        var xmlInfo = xmlJsReader.queue.dequeue();
		setTimeout(function(){
			if (typeof(gFileNameToXMLMap[xmlInfo.sXmlPath]) == 'undefined' && gXMLBuffer != null) {
				xmlJsReader.trim(gXMLBuffer);   
				gFileNameToXMLMap[xmlInfo.sXmlPath] = gXMLBuffer;
			}
			var xmlDoc = null;
			if (typeof (gFileNameToXMLMap[xmlInfo.sXmlPath]) != 'undefined') {
				if (window.DOMParser) {
					var parser = new DOMParser();
					xmlDoc = parser.parseFromString(gFileNameToXMLMap[xmlInfo.sXmlPath], "text/xml");
				}
				else {
					xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
					xmlDoc.async = false;
					var indx = gFileNameToXMLMap[xmlInfo.sXmlPath].indexOf("<?xml");
					if (indx != -1) {
						indx = gFileNameToXMLMap[xmlInfo.sXmlPath].indexOf("?>", indx);
						if (indx != -1) {
							var strXML = gFileNameToXMLMap[xmlInfo.sXmlPath].substr(indx + 2);
							xmlDoc.loadXML(strXML);
						}
					}
					else {
						xmlDoc.loadXML(gFileNameToXMLMap[xmlInfo.sXmlPath]);
					}
				}
			}
			gXMLBuffer = null;
			xmlJsReader.bLoading = false;

			if (xmlInfo.callback)
				xmlInfo.callback(xmlDoc, xmlInfo.cbargs);

			xmlJsReader.loadFromQueue();
		}, 50);
    }

    this.loadScript = function (sScriptSrc, onScriptLoadedCB) {
        this.bLoading = true;
        var oHead = document.getElementsByTagName('head')[0];
        var oScript = document.createElement('script');
        oScript.type = 'text/javascript';
        oScript.charset = "utf-8";
		oScript.src = sScriptSrc;

        // IE 6 & 7
        if (oScript.readyState) {
            oScript.onreadystatechange = function () {
                if (oScript.readyState == 'loaded' ||
                    oScript.readyState == 'complete') {
                    onScriptLoadedCB();
                }
            }
        }
        //for firefox detecting script xml exist or not
        //as firefox does not support onerror for script loading for file://
        else if (navigator.product === 'Gecko' &&
        navigator.userAgent.indexOf('KHTML') === -1 &&
		navigator.userAgent.indexOf('Trident') === -1 &&
        window.location.protocol === 'file:') {
			var req = new XMLHttpRequest();
            var sCurrentPath = _getPath(document.location.href);
            var scriptURL = _getFullPath(sCurrentPath, sScriptSrc);
            req.open('GET', scriptURL, true);
            req.onreadystatechange = function () {
                if (req.readyState === 4) {
                    if (req.status === 0) {
                        //script exist
                        //script.textContent = req.responseText;
                    }
                    else
                        onScriptLoadedCB();
                }
            };
            try {
                req.send(null);
            }
            catch (e) {
                onScriptLoadedCB();
                return;
            }
            oScript.onload = onScriptLoadedCB;
        }
        else {
            oScript.onload = onScriptLoadedCB;
            oScript.onerror = onScriptLoadedCB;
        }

        oHead.appendChild(oScript);
    }
}

function loadDataXML(sFileName, bAsync)
{
try
{
    var bAsyncReq = true;
    if (bAsync != 'undefined')
        bAsyncReq = bAsync;

    var sCurrentDocPath = _getPath(document.location.href);
    sdocPath = _getFullPath(sCurrentDocPath, sFileName);

    var fileName = _getRelativeFileName(sCurrentDocPath, sdocPath);
    xmlJsReader.loadFile(fileName, function (a_xmlDoc, args) {
        if (a_xmlDoc != null)
            putDataXML(a_xmlDoc, sdocPath);
        else
            onLoadXMLError();
    });
    
    //xmlDoc = xmlReader.xmlDoc;
    //alert(xmlDoc);
    //initializeData();
	
//	if(gbIE5)
//	{
//		// use xmlhttp for 304 support, xmldom doesn't support it, IE5 or later
//		var bIsHTTPURL = false;
//		if(gbAIRSSL)
//		{
//		    bIsHTTPURL = IsHTTPURL(sdocPath);
//		}
//		else
//		    bIsHTTPURL = mrIsOnEngine();

//	    if( bIsHTTPURL )
//	    {
//		    xmlDoc=new ActiveXObject("Microsoft.XMLHTTP");
//		    xmlDoc.onreadystatechange=checkState;
//		    if(document.body!=null)
//		    {
//			    xmlDoc.Open("get", sdocPath, bAsyncReq);
//			    xmlDoc.Send("");
//		    };
//	    }else
//	    {
//		    xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
//		    xmlDoc.onreadystatechange=checkState;
//		    xmlDoc.async=bAsyncReq;
//		    if(document.body!=null)
//			    xmlDoc.load(sdocPath);
//	    };
//	}
//	else if(gbNav6 && !gbAIR)
//	{
//		/*xmlDoc=document.implementation.createDocument("","",null);
//		xmlDoc.addEventListener("load",initializeData,false);
//		xmlDoc.load(sdocPath,"text/xml");*/

//		var req=new XMLHttpRequest();
//     		req.open("GET", sdocPath, false);   
//		req.send(null);   
//		xmlDoc = req.responseXML;
//		initializeData();
//	}
//	else if(gbSafari || gbAIR)
//	{
//	        if(window.XMLHttpRequest && !(window.ActiveXObject)) 
//        	{
//        	    	xmlHttp = new XMLHttpRequest();
//            		if(xmlHttp)
//            		{
//  	            		xmlHttp.onreadystatechange=onXMLResponse;
//		        	xmlHttp.open("GET", sdocPath, false);
//		        	xmlHttp.send(null);
//	        	}
//        	}
//	}
}catch(e)
{
    //Do nothing
}
}

function onXMLResponse()
{
    if(xmlHttp)
    {
      if(xmlHttp.readyState == 4)
      {
        xmlDoc = xmlHttp.responseXML;
        if(xmlDoc!=null)
        {
	        putDataXML(xmlDoc,sdocPath);
	    }
	    else
	    {
	        onLoadXMLError();
	    }
      }
    }
}

function initializeData()
{
	if(xmlDoc!=null)
		putDataXML(xmlDoc,sdocPath);
}

function checkState()
{
	if(xmlDoc!=null)
	{
		var state=xmlDoc.readyState;
		if(state==4)
		{
			// engine version uses xmlhttp, xml data in the responseXML
			if( xmlDoc.responseXML!=null )
				xmlDoc=xmlDoc.responseXML;

			var err=xmlDoc.parseError;
			if(err.errorCode==0)
				putDataXML(xmlDoc,sdocPath);
			else
				onLoadXMLError();
		}
	}
}

function insertDataDiv(sName)
{
	var sHTML="";
	if(gbMac)
		sHTML+="<div id="+sName+" style=\"display:none;\"></div>";
	else
		sHTML+="<div id="+sName+" style=\"visibility:hidden\"></div>";
	if((gbIE5||gbNav6||gbSafari3)&&document.body)
		document.body.insertAdjacentHTML("beforeEnd",sHTML);
	else
	{
		gsInsertBeforeEndHTML=sHTML;
		setTimeout("insertWhenBodyReady();",100);
		return false;
	}
	return true;
}

function insertWhenBodyReady()
{
	if(gsInsertBeforeEndHTML=="") return;
	if(document.body)
	{
		document.body.insertAdjacentHTML("beforeEnd",gsInsertBeforeEndHTML);
		gsInsertBeforeEndHTML="";
		loadData_2(gsFileName,gsDivName);
	}
	else
	{
		setTimeout("insertWhenBodyReady();",100);
	}
}

function window_BUnload()
{
	for(var i=0;i<gnLoadDivNum;i++)
	{
		var oDivCon=getElement(gsDivName+i);
		if(oDivCon)
			oDivCon.innerHTML="";
	}
}

function removeThis(obj)
{
	if(obj.parentNode)
		obj.parentNode.removeChild(obj);
	else
		obj.outerHTML="";
}

function getParentNode(obj)
{
	if(obj.parentNode)
		return obj.parentNode;
	else if(obj.parentElement)
		return obj.parentElement;
	return null;
}

function getElement(sID)
{
	if(document.getElementById)
		return document.getElementById(sID);
	else if(document.all)
		return document.all(sID);
	return null;
}

function getChildrenByTag(obj,sTagName)
{
	if(obj.getElementsByTagName)
	{
		var aChildren=new Array();
		var aElements=getElementsByTag(obj,sTagName);
		if(aElements!=null)
		{
			for(var i=0;i<aElements.length;i++)
			{
				if(aElements[i].parentNode==obj)
					aChildren[aChildren.length]=aElements[i];
			}
			return aChildren;
		}
		else
			return new Array();
	}
	else if(obj.children)
		return obj.children.tags(sTagName);
}

function getElementsByTag(obj,sTagName)
{
	if(obj.getElementsByTagName)
		return obj.getElementsByTagName(sTagName);
	else if(obj.all)
		return obj.all.tags(sTagName);
	return null;
}

function _htmlToText(sHTML)
{
	if(sHTML==null) return null;
	var sText=sHTML;
	for(var i=0;i<sReplaceStringsSrc.length;i++)
	{
		var re=new RegExp(sReplaceStringsSrc[i],"g");
		sText=sText.replace(re,sReplaceStringsDst[i]);
	}	
	return sText;
}

function _textToHtml_nonbsp(sText)
{
	if(sText==null) return null;
	var sHTML=sText;
	for(var i=0;i<sReplaceStringsSrc.length-1;i++)
	{
		var re=new RegExp(sReplaceStringsDst[i],"g");
		sHTML=sHTML.replace(re,sReplaceStringsSrc[i]);
	}	
	return sHTML;
}

function _textToHtml(sText)
{
	if(sText==null) return null;
	var sHTML=sText;
	for(var i=0;i<sReplaceStringsSrc.length;i++)
	{
		var re=new RegExp(sReplaceStringsDst[i],"g");
		sHTML=sHTML.replace(re,sReplaceStringsSrc[i]);
	}	
	return sHTML;
}


function getInnerText(obj)
{
	var renbsp2sp=new RegExp("\xa0","g");
	if(obj.innerText)
	{
		var sText=obj.innerText;
		sText=sText.replace(renbsp2sp," ");
		return sText;
	}
	else
	{
		if(obj.nodeValue)
		{
			var sValue=obj.nodeValue;
			sValue=sValue.replace(renbsp2sp," ");
			return sValue;
		}
		else
		{
			var sText="";
			var oChild=obj.firstChild;
			while(oChild!=null)
			{
				sText+=getInnerText(oChild);
				oChild=oChild.nextSibling;
			}
			return sText;
		}
	}
		
}

function HighLightElement(obj,sHighLightColor,sNormalColor)
{
	if(obj!=null)
	{
		resetHighLight(sNormalColor);
		if (obj.style)
			obj.style.backgroundColor=sHighLightColor;
		goHighLighted=obj;
	}
}

function resetHighLight(sNormalColor)
{
	if(goHighLighted!=null)
	{
		if (goHighLighted.style)
			goHighLighted.style.backgroundColor=sNormalColor;
		goHighLighted=null;
	}
}

function whFont(sName,sSize,sColor,sStyle,sWeight,sDecoration)
{
	this.sName=sName;
	this.sSize=sSize;
	this.sColor=sColor;
	this.sStyle=sStyle;
	this.sWeight=sWeight;
	this.sDecoration=sDecoration;
}

function getFontStyle(oFont)
{
	var sStyle="";
	if(oFont)
	{
		sStyle+="font-family:"+oFont.sName+";";
		sStyle+="font-size:"+oFont.sSize+";";
			
		sStyle+="font-style:"+oFont.sStyle+";";
		sStyle+="font-weight:"+oFont.sWeight+";";
		sStyle+="text-decoration:"+oFont.sDecoration+";";
		sStyle+="color:"+oFont.sColor+";";
	}
	return sStyle;
}

function _browserStringToText(sBStr)
{
	var sText="";
	// change %xxx back to the real char.
	var nPos=sBStr.indexOf('%');
	while(nPos!=-1)
	{
		sText+=sBStr.substring(0,nPos);
		sBStr=sBStr.substring(nPos+1);
		var sNum="";
		var i=0;
		while(sBStr.charAt(i)>='0'&&sBStr.charAt(i)<='9')
		{
			sNum+=sBStr.charAt(i++);	
		}
		if(sNum!=""){
			var nNum=parseInt(sNum,16);
			sText+=String.fromCharCode(nNum);
			sBStr=sBStr.substring(i);
		}
		nPos=sBStr.indexOf('%');
	}
	sText+=sBStr;
	return sText;
}

function IsInternal(urlName)
{
	// first pass: check raw urlName
	if(!IsValidInternalTopicURL(urlName))
		return false;
	// second pass: check unescape'd urlName
	var unescapedUrlName = unescape(urlName);
	if(!IsValidInternalTopicURL(unescapedUrlName))
		return false;
	// third pass: check decodeUri'd urlName
	var decodedUrlName = decodeURI(urlName);
	if(!IsValidInternalTopicURL(decodedUrlName))
		return false;

	// looks good
	return true;

}

function IsValidInternalTopicURL(urlName)
{
	if(urlName.indexOf(":") != -1 || urlName.indexOf("//")  != -1 || urlName.indexOf("&#")  != -1 || (!IsValidTopicURL(urlName)))
		return false;
		
	return true;	
		
}

function IsValidTopicURL(topicURL)
{
	for (var i = 0 ; i < gIllegalTopicNameChars.length ; i++)
	{
		if (topicURL.indexOf(gIllegalTopicNameChars.charAt(i)) != -1 )
			return false ;
	}
	return true ;
}

function IsNonAscii(szWord)
{
    var temp;
    for(var iCount=0; iCount<szWord.length;iCount++)
    {
        temp = szWord.charCodeAt(iCount);
        if(temp>128)
            return true;
    }
    return false;

}

function excapeSingleQuotandSlash(str)
{
	if(str==null) return null;
	var nPos=0;
	var sRes="";
	var nPosNew=str.indexOf("\\",nPos);
	while(nPosNew!=-1){
		sRes+=str.substring(nPos,nPosNew+1)+"\\";
		nPos=nPosNew+1;
		nPosNew=str.indexOf("\\",nPos);
	}
	if(nPos<str.length)
		sRes+=str.substring(nPos);
	var re=new RegExp("'","g");
	sRes=sRes.replace(re,"\\'");
	return sRes;
}

// used by roboengine
function mrGetRootWindow() {
    if (isChromeLocal())
        return null;
        
	var cWnd=window;
	while(cWnd!=null)
	{
		if( cWnd.cMRServer!=null && String(cWnd.cMRServer)!='undefined' )
		{
			return cWnd;
		};
		cWnd=cWnd.parent;
	};
	return null;
};

function mrGetProjName()
{
	var cRoot=mrGetRootWindow();
	if( cRoot==null ) return '';

	var sTags=unescape(cRoot.location.search);
	if( sTags=='' )
		sTags=unescape(cRoot.location.hash);

	var nStart, nEnd1, nEnd2;
	var sName='';

	if( (nStart=sTags.indexOf('prj='))>=0 )
	{
		if( (nEnd=sTags.indexOf('&', nStart))<0 ) nEnd=sTags.length;
		if( (nEnd1=sTags.indexOf('>', nStart))<0 ) nEnd1=sTags.length;
		if( nEnd>nEnd1 ) nEnd=nEnd1;
		sName=sTags.substring(nStart+4, nEnd);
	};

	return sName;
};

function mrInitialize() {
    if (isChromeLocal())
        return;
	var sProjName=mrGetProjName();
	var cRoot=mrGetRootWindow();

	if( sProjName!='' && cRoot!=null )
	{
		cRoot.cMRServer.m_bEngine=true;
		cRoot.cMRServer.m_sProjName=sProjName;
	};
};

function mrIsOnEngine() {
    if (isChromeLocal()) 
        return false;
    else{
        var cRoot = mrGetRootWindow();
        return cRoot && cRoot.cMRServer && cRoot.cMRServer.m_bEngine == true;
    }
};

function mrGetEngineUrl()
{
	return c_sEnginePath;
};

function    getClientHeight()
{
    if(gbSafari3)
    {
        return innerHeight;   //this is for safari
    }
    return document.body.clientHeight;
    
}

function PatchParametersForEscapeChar(sParam)
{
	var sresult = sParam;
	if(gbSafari)
	{
		sresult = sresult.replace(/%3c/gi,"<");
		sresult = sresult.replace(/%3e/gi,">");
	}
	return sresult;
}
function SeeForSearch(strProjectDir) 
{
	if(gbAIRSSL && gbSearchPage)
	{
	    loadFts_context(strProjectDir);
	}
}
var RH_BreadCrumbDataStringVariable="";
function RH_Document_Write(szText)
{
	RH_BreadCrumbDataStringVariable+=szText;
}

function RH_AddMasterBreadcrumbs(relHomePage,styleInfo, separator, strHome, strHomePath) {
    if (typeof (gBreadCrumbInfo) != 'undefined') {
        RH_Document_Write("__brseq__");
        gBreadCrumbInfo[gBCId] = new BreadCrumbInfo(relHomePage, styleInfo, separator, strHome, strHomePath);
        gBCId++;
    }
}

function isChromeLocal() {
    if (window.chrome)
        if (document.location.protocol.substring(0, 4) == "file")
        return true;
    return false;
}


//Added by Peter Allan Nov 2015. Enables Help to open forms in ESM.
function openFormInSystemToolInline( formId )
{
  top.postMessage( { cmd: "OpenForm", formId: formId }, window.location.protocol + '//' + window.location.host );
}

function openFormInSystemTool( formId )
{
  if ( top.UWIMessages != null )
  {
  	openFormInSystemToolInline( formId );
  }
  else  
  {
  	try
  	{
  		var doc = top.opener.document;
  		top.opener.postMessage( { cmd: "OpenForm", formId: formId }, window.location.protocol + '//' + window.location.host );
  		top.opener.focus();

  	}
  	catch( e )
  	{
  		alert( "Link failed. Either the System Administration Tool session that opened this Help window has been terminated or the Help is installed locally (i.e., on a computer not the switch). For a terminated session, restarting the tool does not restore the links; you must open a new Help window to get them working again." );
  	}    	
  }
}



function getFormIdFromHelpLink( href )
{
  var formData = [];
/*
  formData[ "license_and_option_selection.html" ] = "License and Option Selection";
  formData[ "network_element_assignment.html" ] = "Network Elements";
  formData[ "system_ip_port_assignment.html" ] = "System IP Ports";
  formData[ "sip_peers.html" ] = "SIP Peer Profile";
  formData[ "sip_peer_profile_for_incoming.html" ] = "SIP Peer Profile Assignment by Incoming DID";
  formData[ "trunk_service_assignment.html" ] = "Trunk Attributes";
  formData[ "route_assignment.html" ] = "ARS Routes";
  formData[ "class_of_service_options_assignment.html" ] = "Class of Service Options";

  formData[ "cpn_substitution_table_setup.html" ] = "DID Ranges for CPN Substitution";
  formData[ "associated_dn_assignment.html" ] = "Associated Directory Numbers";
  formData[ "inward_dialing_mod.html" ] = "Inward Dialing Modification";
  formData[ "sip_peer_profile_calling.html" ] = "SIP Peer Profile Calling Party Inward Dialing Modification";
  formData[ "sip_devices_capabilities_assignment.html" ] = "SIP Device Capabilities";
  formData[ "compression_zone_assignment.html" ] = "Network Zones";
  formData[ "user_configuration_rdn.html" ] = "User and Services Configuration";
*/


  formData[ "license_and_option_selection.html" ] = "License and Option Selection";
  formData[ "system_capacity_display.html" ] = "System Capacity";
  formData[ "dimension_selection.html" ] = "Dimension Selection";
  formData[ "application_group_licensing.html" ] = "Application Group Licensing";
  formData[ "ip_configuration.html" ] = "System IP Properties";
  formData[ "lan_policy.html" ] = "LAN Policy (QoS)";
  formData[ "network_element_assignment.html" ] = "Network Elements";
  formData[ "cluster_element_assignment.html" ] = "Cluster Elements";
  formData[ "administrative_group_assignment.html" ] = "Admin Groups";
  formData[ "fax_configuration.html" ] = "Fax Service Profiles";
  formData[ "fax_advanced_settings.html" ] = "Fax Advanced Settings";
  formData[ "compression_zone_assignment.html" ] = "Network Zones";
  formData[ "network_topology.html" ] = "Network Zone Topology";
  formData[ "bandwidth_management_configuration.html" ] = "Bandwidth Management";
  formData[ "codec_settings.html" ] = "Codec Settings";
  formData[ "sntp_configuration.html" ] = "Date and Time";
  formData[ "registry_config.html" ] = "Controller Registry";
  formData[ "system_port_assignment.html" ] = "System Ports";
  formData[ "application_logical_port_assignment.html" ] = "Application Logical Ports";
  formData[ "system_options_assignment.html" ] = "System Options";
  formData[ "shared_system_options.html" ] = "Shared System Options";
  formData[ "class_of_service_options_assignment.html" ] = "Class of Service Options";
  formData[ "sip_devices_capabilities_assignment.html" ] = "SIP Device Capabilities";
  formData[ "class_of_restriction_group_assignment.html" ] = "Class of Restriction Groups";
  formData[ "miscellaneous_assignment.html" ] = "System Access Points";
  formData[ "feature_access_code_assignment.html" ] = "Feature Access Codes";
  formData[ "independent_account_code_definition.html" ] = "Independent Account Codes";
  formData[ "default_account_code_definition.html" ] = "Default Account Codes";
  formData[ "system_account_code_definition.html" ] = "System Account Codes";
  formData[ "system_speed_call_assignment.html" ] = "System Speed Calls";
  formData[ "tenant_assignment.html" ] = "Tenants";
  formData[ "smdr_options_assignment.html" ] = "SMDR Options";
  formData[ "traffic_options_assignment.html" ] = "Traffic Report Options";
  formData[ "inward_dialing_mod.html" ] = "Inward Dialing Modification";
  formData[ "outward_dialing_modification.html" ] = "Outward Dialing Modification";
  formData[ "system_ip_port_assignment.html" ] = "System IP Ports";
  formData[ "location_based_numbers.html" ] = "Location Based Numbers";
  formData[ "shared_forms_configuration.html" ] = "SDS Form Sharing";
  formData[ "form_comparison.html" ] = "SDS Form Comparison";
  formData[ "system_admin_policy_config.html" ] = "Admin Policies";
  formData[ "system_security_management.html" ] = "System Security Management";
  formData[ "user_authorization_profiles_rdn.html" ] = "User Authorization Profiles";
  formData[ "snmp_configuration_assignment.html" ] = "SNMP Configuration";
  formData[ "snmp_trap_community_assignment.html" ] = "SNMP Trap Forwarding";
  formData[ "multi_node_management_fault_config.html" ] = "Admin Group Management";
  formData[ "mixml_applications.html" ] = "MiXML Applications";
  formData[ "modules.html" ] = "Hardware Modules";
  formData[ "compute_card.html" ] = "Hardware Compute Cards";
  formData[ "trunk_service_assignment.html" ] = "Trunk Attributes";
  formData[ "icp_pbx_assignment.html" ] = "ICP/PBX Networking";
  formData[ "xnet_trunk_profile_assignment.html" ] = "IP/XNET Trunk Profiles";
  formData[ "xnet_trunk_group_assignment.html" ] = "IP/XNET Trunk Groups";
  formData[ "cpn_substitution_table_setup.html" ] = "DID Ranges for CPN Substitution";
  formData[ "sip_peers.html" ] = "SIP Peer Profile";
  formData[ "sip_peer_profile_for_incoming.html" ] = "SIP Peer Profile Assignment by Incoming DID";
  formData[ "sip_peer_profile_called_party.html" ] = "SIP Peer Profile Called Party Inward Dialing Modification";
  formData[ "sip_peer_profile_calling.html" ] = "SIP Peer Profile Calling Party Inward Dialing Modification";
  formData[ "user_configuration_rdn.html" ] = "User and Services Configuration";
  formData[ "ip_console_configuration.html" ] = "IP Consoles";
  formData[ "ip_console_softkey_assignment.html" ] = "Console Softkeys";
  formData[ "agent_id_assignment.html" ] = "ACD Agent IDs";
  formData[ "agent_group_assignment.html" ] = "ACD Agent Skill Groups";
  formData[ "acd_express_group_assignment.html" ] = "ACD Express Groups";
  formData[ "path_assignment.html" ] = "ACD Paths";
  formData[ "path_interflow_dialist_assign_path_i.html" ] = "ACD Path Interflow Dialing Lists";
  formData[ "remote_agent_subgroup_assignment.html" ] = "ACD Remote Agent Subgroups";
  formData[ "personal_ring_group_assignment.html" ] = "Personal Ring Groups";
  formData[ "multi-device_user_groups.html" ] = "Multi-device User Groups";
  formData[ "hunt_group_assignment.html" ] = "Hunt Groups";
  formData[ "ring_group_assignment.html" ] = "Ring Groups";
  formData[ "pickup_group_assignment.html" ] = "Pickup Groups";
  formData[ "page_group_assignment.html" ] = "Page Groups";
  formData[ "remote_busy_lamp_assignment.html" ] = "Remote Busy Lamps";
  formData[ "associated_dn_assignment.html" ] = "Associated Directory Numbers";
  formData[ "call_recognition_service_form.html" ] = "Call Recognition Service";
  formData[ "department_assignment.html" ] = "Departments";
  formData[ "location_assignment.html" ] = "Locations";
  formData[ "local_only_directory_number_list.html" ] = "Local-only Directory Number List";
  formData[ "remote_directory_number_assignment.html" ] = "Remote Directory Numbers";
  formData[ "telephone_directory.html" ] = "Telephone Directory";
  formData[ "multiline_ip_set_key_assignment.html" ] = "Multiline Set Keys";
  formData[ "multiline_set_group_assignment.html" ] = "Multiline Appearance Groups";
  formData[ "change_attribute_assignment.html" ] = "User and Device Attributes";
  formData[ "station_service_assignment.html" ] = "Station Attributes";
  formData[ "multiline_set_status_message_assignment.html" ] = "Multiline Advisory Messages";
  formData[ "multiline_ip_set_configuration.html" ] = "Multiline IP Sets";
  formData[ "single_line_ip_set_config.html" ] = "Single Line IP Sets";
  formData[ "wireless_ip_set_config.html" ] = "Wireless IP Sets";
  formData[ "ip_turret_master_slave_association.html" ] = "5560 IPT Master/Slave Association";
  formData[ "idle_softkey_assignment.html" ] = "5235 Idle Softkeys";
  formData[ "online_services_config.html" ] = "5140/5240 Web Services";
  formData[ "personal_speed_call_directory.html" ] = "Personal Speed Calls";
  formData[ "personal_speed_call_assignment.html" ] = "Personal Speed Call Allocation";
  formData[ "call_forwarding_profile.html" ] = "Call Forwarding Profile";
  formData[ "dnd.html" ] = "DND";
  formData[ "location_specification.html" ] = "Location Specification";
  formData[ "user_roles.html" ] = "User Roles";
  formData[ "user_and_device_templates.html" ] = "User and Service Templates";
  formData[ "key_template.html" ] = "Key Templates";
  formData[ "ids_connection.html" ] = "IDS Connection";
  formData[ "user_service_data_to_ldap.html" ] = "User Service Data to LDAP Attributes Mapping";
  formData[ "ids_data_management.html" ] = "IDS Data Management";
  formData[ "voicemail_port_capacity.html" ] = "VM Port Capacity";
  formData[ "voice_mail_port_assignment.html" ] = "VM Ports";
  formData[ "prompt_language_form.html" ] = "VM Prompt Languages";
  formData[ "fax_detection_form.html" ] = "VM Fax Detection";
  formData[ "voice_mail_options_form.html" ] = "VM Options";
  formData[ "business_hours_form.html" ] = "VM Business Hours Settings";
  formData[ "embedded_um_settings.html" ] = "Embedded UM Settings";
  formData[ "greeting_definitions_form.html" ] = "VM Greetings Definition";
  formData[ "greetings_assignment_form.html" ] = "VM Greetings";
  formData[ "rad_greeting_configuration.html" ] = "VM RAD Greetings";
  formData[ "voice_mailboxes_forms.html" ] = "VM Mailboxes";
  formData[ "mlaa_configuration.html" ] = "VM Multi-Level Auto Attendants";
  formData[ "distribution_lists_form.html" ] = "VM Distribution Lists";
  formData[ "networked_voice_mail_servers.html" ] = "VM Network Servers";
  formData[ "networked_voice_mail_users.html" ] = "VM Network Users";
  formData[ "external_vvm_server.html" ] = "External Visual VM";
  formData[ "call_progress_tone_detection_plan_assignment.html" ] = "ARS Call Progress Tone Detection";
  formData[ "digit_modification_assignment.html" ] = "ARS Digit Modification Plans";
  formData[ "maximum_dialed_digits.html" ] = "ARS Maximum Dialed Digits";
  formData[ "route_assignment.html" ] = "ARS Routes";
  formData[ "route_list_assignment.html" ] = "ARS Route Lists";
  formData[ "route_plan_assignment.html" ] = "ARS Route Plans";
  formData[ "ars_digits_dialed_assignment.html" ] = "ARS Digits Dialed";
  formData[ "ars_leading_digits_assignment.html" ] = "ARS Leading Digits";
  formData[ "day_and_time_zone_assignment.html" ] = "ARS Day and Time Zones";
  formData[ "node_identity_assignment.html" ] = "ARS Node Identities";
  formData[ "interconnect_restriction_table.html" ] = "Interconnect Restriction";
  formData[ "intercept_handling_assignment.html" ] = "Intercept Handling";
  formData[ "call_coverage_services.html" ] = "Call Coverage Services";
  formData[ "call_rerouting_always_alternative_assignment.html" ] = "Call Rerouting Always Alternatives";
  formData[ "call_rerouting_first_alternative_assignment.html" ] = "Call Rerouting First Alternatives";
  formData[ "call_rerouting_second_alternative_assignment.html" ] = "Call Rerouting Second Alternatives";
  formData[ "call_rerouting_assignment.html" ] = "Call Rerouting";
  formData[ "call_park_paging_assignment.html" ] = "Call Park";
  formData[ "direct_inward_dialing_service.html" ] = "Direct Inward Dialing Service";
  formData[ "system_audio_files_update.html" ] = "System Audio Files Update";
  formData[ "embedded_media_sources.html" ] = "Embedded Media Sources";
  formData[ "customer_emerg_serv_id_assign_default.html" ] = "Default CESID";
  /* Start > Forms in Category view that differ from Alpha view */
  formData[ "customer_emerg_serv_id_assign_default.html" ] = "CESID - Default";
  /* < End */ 
  formData[ "l2_to_cesid_mapping.html" ] = "L2 to CESID Mapping";
  formData[ "customer_emergency_services_id_assignment.html" ] = "CESID Assignment";
  formData[ "hotel_options_assignment.html" ] = "Hotel Options";
  formData[ "suite_assignment.html" ] = "Suites";
  formData[ "multi-device_suites.html" ] = "Multi-device Suites";
  formData[ "guest_room_assignment.html" ] = "Guest Rooms";
  formData[ "linked_suite_assignment.html" ] = "Linked Suites";
  formData[ "maintenance_information/alarm_details.html" ] = "Alarm Details";
  formData[ "multi_node_management_alarms_summary.html" ] = "Admin Group Alarm Summary";
  formData[ "alarm_email_notification.html" ] = "Alarm Email Notification";
  formData[ "maintenance_information/maint-soft_logs.html" ] = "All Maintenance/Software Logs";
  /* Start > Forms in Category view that differ from Alpha view */
  //formData[ "maintenance_information/maint-soft_logs.html" ] = "Maintenance/Software Logs - All";
  /* < End */ 
  formData[ "audit_trail_logs.html" ] = "Audit Trail Logs";
  formData[ "maintenance_information/maint-soft_logs.html" ] = "All Maintenance Logs";
  /* Start > Forms in Category view that differ from Alpha view */
  //formData[ "maintenance_information/maint-soft_logs.html" ] = "Maintenance Logs - All";
  /* < End */ 
  formData[ "maintenance_information/maint-soft_logs.html" ] = "Error";
  /* Start > Forms in Category view that differ from Alpha view */
  //formData[ "maintenance_information/maint-soft_logs.html" ] = "Software Logs - Error";
  /* < End */ 
  formData[ "maintenance_information/maint-soft_logs.html" ] = "Warning";
  /* Start > Forms in Category view that differ from Alpha view */
  //formData[ "maintenance_information/maint-soft_logs.html" ] = "Maintenance Logs � Warning";
  /* < End */ 
    formData[ "maintenance_information/maint-soft_logs.html" ] = "Info";
  /* Start > Forms in Category view that differ from Alpha view */
  //formData[ "maintenance_information/maint-soft_logs.html" ] = "Maintenance Logs - Info";
  /* < End */ 
  formData[ "maintenance_information/maint-soft_logs.html" ] = "All Software Logs";
  /* Start > Forms in Category view that differ from Alpha view */
  //formData[ "maintenance_information/maint-soft_logs.html" ] = "Software Logs - All";
  /* < End */ 
  formData[ "maintenance_information/maint-soft_logs.html" ] = "Error";
  /* Start > Forms in Category view that differ from Alpha view */
  //formData[ "maintenance_information/maint-soft_logs.html" ] = "Maintenance Logs - Error";
  /* < End */ 
  formData[ "maintenance_information/maint-soft_logs.html" ] = "Warning";
  /* Start > Forms in Category view that differ from Alpha view */
 // formData[ "maintenance_information/maint-soft_logs.html" ] = "Software Logs - Warning";
  /* < End */ 
  formData[ "maintenance_information/maint-soft_logs.html" ] = "Info";
  /* Start > Forms in Category view that differ from Alpha view */
  //formData[ "maintenance_information/maint-soft_logs.html" ] = "Software Logs - Info";
  /* < End */ 
  formData[ "features_optional/cesid_logs.html" ] = "CESID Logs";
  formData[ "all_ip_telephones.html" ] = "All IP Telephones";
  formData[ "programmed_telephones.html" ] = "Programmed IP Telephones";
  formData[ "unprogrammed_telephones.html" ] = "Unprogrammed IP Telephones";
  /* Start > Forms in Category view that differ from Alpha view */
  formData[ "all_ip_telephones.html" ] = "IP Telephones - All";
  formData[ "programmed_telephones.html" ] = "IP Telephones - Programmed";
  //formData[ "unprogrammed_telephones.html" ] = "IP Telephones - Unprogrammed";
  /* < End */ 
  formData[ "device_connectivity_moved.html" ] = "Device Connectivity - Moved";
  formData[ "device_connectivity_all.html" ] = "Device Connectivity - All";
  formData[ "voice_quality_configuration.html" ] = "Voice Quality Monitoring";
  formData[ "voice_quality_statistics.html" ] = "Voice Quality Statistics";
  formData[ "current_bandwidth_statistics.html" ] = "Current Bandwidth Statistics";
  formData[ "bandwidth_historical_15_minute.html" ] = "15 Minute Historical Bandwidth Statistics";
  formData[ "hourly_historical_bandwidth_statistics.html" ] = "Hourly Historical Bandwidth Statistics";
  formData[ "shared_data_updates.html" ] = "SDS Distribution Errors - All";
  formData[ "shared_data_updates.html" ] = "SDS Distribution Errors - System";
  formData[ "shared_data_updates.html" ] = "SDS Distribution Errors - User";
  formData[ "external_ftp_server_parameters.html" ] = "External FTP Server";
  formData[ "maintenance_procedures/backup_procedure.html" ] = "Backup";
  formData[ "maintenance_procedures/restore_procedure.html" ] = "Restore";
  formData[ "maintenance_commands/commands.html" ] = "Maintenance Commands";
  formData[ "maintenance_procedures/scheduler.html" ] = "Scheduler";
  formData[ "maintenance_procedures/obtaining_system_diag_info.html" ] = "System Diagnostics Reporting";
  formData[ "trunk_group_assignment.html" ] = "Trunk Groups";
  formData[ "trunk_circuit_descriptor_co.html" ] = "Trunk Circuit Descriptor - CO";
  formData[ "trunk_circuit_descriptor_did.html" ] = "Trunk Circuit Descriptor - DID";
  formData[ "trunk_circuit_descriptor_digital_did.html" ] = "Trunk Circuit Descriptor - Digital DID";
  formData[ "trunk_circuit_descriptor_digital_co.html" ] = "Trunk Circuit Descriptor - Digital CO"; 
  formData[ "trunk_circuit_descriptor_digital_e_and_m.html" ] = "Trunk Circuit Descriptor - Digital E and M"; 
  formData[ "trunk_circuit_descriptor_e_and_m.html" ] = "Trunk Circuit Descriptor - E and M"; 
  formData[ "trunk_circuit_descriptor_loop_tie.html" ] = "Trunk Circuit Descriptor - Loop Tie";
  formData[ "trunk_circuit_descriptor_msdn_dpnss_dassii.html" ] = "Trunk Circuit Descriptor - MSDN-DPNSS-DASSII"; 
  /* Start > Forms in Category view that differ from Alpha view */
  /*formData[ "trunk_circuit_descriptor_co.html" ] = "CO Trunk Circuit Descriptors";
  formData[ "trunk_circuit_descriptor_did.html" ] = "DID Trunk Circuit Descriptors";
  formData[ "trunk_circuit_descriptor_digital_did.html" ] = "Digital DID Trunk Circuit Descriptors";
  formData[ "trunk_circuit_descriptor_digital_co.html" ] = "Digital CO Trunk Circuit Descriptors"; 
  formData[ "trunk_circuit_descriptor_digital_e_and_m.html" ] = "Digital E and M Trunk Circuit Descriptors"; 
  formData[ "trunk_circuit_descriptor_e_and_m.html" ] = " - E and M Trunk Circuit Descriptors"; 
  formData[ "trunk_circuit_descriptor_loop_tie.html" ] = "Loop Tie Trunk Circuit Descriptors";
  formData[ "trunk_circuit_descriptor_msdn_dpnss_dassii.html" ] = "MSDN-DPNSS-DASSII Trunk Circuit Descriptors"; */
  /* < End */ 
  formData[ "digital_trunk_assignment.html" ] = "Digital Trunks"; 
  formData[ "ons_ops_circuit_descriptor_assignment.html" ] = "ONS/OPS Circuit Descriptors"; 
  formData[ "nsu_configuration.html" ] = "Network Services Unit"; 
  formData[ "link_descriptor_assignment.html" ] = "Digital Link Descriptors"; 
  formData[ "digital_link_assignment.html" ] = "Digital Link"; 
  formData[ "isdn_called_num_inward_dial_num_mod.html" ] = "ISDN Called Party Inward Dialing Modification"; 
  formData[ "isdn_calling_num_inward_dial_num_mod.html" ] = "ISDN Calling Party Inward Dialing Modification"; 
  formData[ "isdn_calling_party_outward_dialing_number_modification.html" ] = "ISDN Calling Party Outward Dialing Modification"; 
  formData[ "protocol_assignment.html" ] = "ISDN Protocol"; 
  formData[ "mlpp_assignment.html" ] = "MLPP"; 
  formData[ "ip_port_filter.html.html" ] = "IP Port Filter"; 
  formData[ "ldap_client_configuration.html" ] = "LDAP Client Configuration"; 
  formData[ "online_service_urls.html" ] = "Online Service URLs"; 
  formData[ "phone_applications_update.html" ] = "Phone Applications Update"; 
  formData[ "web_server_certificate.html" ] = "Web Server Certificate"; 
  

  var index = href.substring( href.indexOf( "forms/" ) + 6 );

console.log( "getFormIdFromHelpLink  " + index + " --> " + formData[ index ] );
  return formData[ index ];
}

function onFormJumpClickTasks()
{
  openFormInSystemToolTask( this.formId );
  return false;
}

function replaceFormJumpTags( fn )
{
  var aElements = getElementsByTag( document, "a" );
  var numElements = aElements.length;
  var i = 0;

  for ( i = 0; i < numElements; i++ )
  {
    var ele = aElements[ i ];
    if ( ele.href.indexOf( "forms/" ) > -1 )
    {
      var formId = getFormIdFromHelpLink( ele.href );

      if ( typeof formId !== "undefined" )
      {
        ele.formId = formId;
        ele.onclick = onFormJumpClickTasks;
        ele.href = "";
        ele.innerHTML = "<span class='OpenFormIcon'></span>" + ele.innerHTML;
      }
    }
  }


  // href='#' onclick='openFormInSystemToolTask( "License and Option Selection" ); return false;'><span class='OpenFormIcon'></span>
}

var gbWhUtil=true;

//Adds scroll to top button 
function scrollToTopOffboardHelp() {
   // var isInIFrame = (window.name);
    //if (isInIFrame == "TaskListWindow") {
        $.scrollUp({
            scrollName: 'scrollUp', // Element ID
            scrollDistance: 300, // Distance from top/bottom before showing element (px)
            scrollFrom: 'top', // 'top' or 'bottom'
            scrollSpeed: 300, // Speed back to top (ms)
            easingType: 'linear', // Scroll to top easing (see http://easings.net/)
            animation: 'fade', // Fade, slide, none
            animationSpeed: 999, // Animation speed (ms)
            scrollTrigger: false, // Set a custom triggering element. Can be an HTML string or jQuery object
            scrollTarget: false, // Set a custom target element for scrolling to. Can be element or number
            scrollText: '<img title="Scroll to Top" src="../tasklistscrolltotop.png">', // Text for element, can contain HTML
            scrollTitle: false, // Set a custom <a> title if required.
            scrollImg: false, // Set true to use image
            activeOverlay: false, // Set CSS color to display scrollUp active point, e.g '#00FFFF'
            zIndex: 2147483647 // Z-Index for the overlay
        });
   // } else {
    //    return false;
   // }
};