// WebHelp 5.10.005
var gaProj=new Array();
var gnChecked=0;
var gsProjName="";
var gbReady=false;
var goMan=null;
var gbXML=false;
var gsFirstPane="";
var gServerEnabled=false;
var gsPath="";
var gbWhPHost=false;
var goDiv = null;
var gsHTML = "";
var gsPageDir="ltr"
if (navigator.currentNavPen)
gsFirstPane = navigator.currentNavPen;
function delayLoad()
{
if (goDiv&&gsHTML)
{
goDiv.innerHTML=gsHTML;
goDiv=null;
gsHTML="";
}
}
function whCom(sName,sComFile)
{
var alignment = (gsPageDir == "rtl")?"right":"left"
this.msName=sName;
this.msDivId=sName+"Div";
this.msIFrameId=sName+"IFrame";
this.msComFile=sComFile;
this.mbloaded=false;
this.mbShow=false;
this.show=function(bShow)
{
if(this.mbShow!=bShow)
{
if(bShow&&!this.mbloaded)
{
this.load();
}
var oDiv=getElement(this.msDivId);
if(oDiv)
{
if(gbIE55||(gbIE5&&gbMac))
{
var oIframe=getElement(this.msIFrameId);
if(oIframe)
{
if(bShow)
{
oDiv.style.zIndex=3;
if(oIframe!=null)
{
oIframe.style.zIndex=3;
if (!gbIE55)
oIframe.style.visibility="visible";
}
}
else
{
oDiv.style.zIndex=2;
if(oIframe!=null)
{
oIframe.style.zIndex=2;
if (!gbIE55)
oIframe.style.visibility="hidden";
}
}
}
}
if (!gbIE55)
oDiv.style.visibility=(bShow==true)?'visible':'hidden';
this.mbShow=bShow;
}
}
}
this.load=function()
{
if(!this.mbloaded)
{
if(this.msComFile.length>0){
var strFile= _getFullPath(getPath(), this.msComFile);
var oDiv=getElement(this.msDivId);
if(oDiv){
if(gbIE4||gbOpera7){
var nIFrameHeight=oDiv.style.pixelHeight;
var nIFrameWidth=oDiv.style.pixelWidth;
var sHTML="";
}else{
sHTML+="100%; height:100%;\">";
}
oDiv.innerHTML=sHTML;
}else if(gbNav6 || gbSafari){
gsHTML = "";
goDiv = oDiv;
setTimeout("delayLoad()", 100);
}
this.mbloaded=true;
}
}
}
}
this.unload=function()
{
var oDiv=getElement(this.msDivId);
if(oDiv)
oDiv.innerHTML="";
}
this.getDivHTML=function()
{
var sHTML="";
if(gbMac&&gbIE4)
sHTML+="
";
else if(gbIE5)
sHTML+="
";
else if(gbIE4||gbWindows)
sHTML+="
";
else if(gbMac && (gbNav6 || gbChrome))
sHTML+="
";
else if(gbUnixOS)
sHTML+="
";
else
sHTML+="
";
sHTML+="
";
return sHTML;
}
}
function whComMan()
{
this.sName="";
this.maCom=new Array();
this.addCom=function(sName,sComFile)
{
var owhCom=new whCom(sName,sComFile);
this.maCom[this.maCom.length]=owhCom;
}
this.init=function()
{
var sHTML="";
for(var i=0;i
0) {
if (oMsg.oParam == 1)
gsFirstPane = "toc";
else if (oMsg.oParam == 2)
gsFirstPane = "idx";
else if (oMsg.oParam == 3)
gsFirstPane = "fts";
else if (oMsg.oParam == 4)
gsFirstPane = "glo";
}
else if (oMsg.oParam == 0) {
bHidePane = true;
}
}
goMan.init();
if (gsProjName != "")
loadData2(gsProjName);
if (bHidePane) {
gsFirstPane = "";
var oMsg1 = new whMessage(WH_MSG_HIDEPANE, null, null)
notify(oMsg1);
}
else {
if (gsFirstPane != "")
goMan.show(gsFirstPane);
else
goMan.showById(0);
}
}
function SendGetCmd() {
if (goMan && goMan.maCom.length > 0) {
var oMsg = new whMessage(WH_MSG_GETCMD, null, null);
request(oMsg, onGetCmd);
}
else {
setTimeout("SendGetCmd();", 1);
}
}
function window_OnLoad() {
SendGetCmd();
}
function setServerEnabled()
{
gServerEnabled = true;
}
function loadData2(strFile)
{
if(gbXML)
loadDataXML(strFile);
else
loadData(strFile);
}
function addProject(bPreferXML,sXMLName,sHTMLName)
{
var bLoadXML=bPreferXML;
if(!gbIE4&&!gbNav6&&!gbOpera7&&!gbSafari3)
return;
if(gbIE4&&!gbIE5)
bLoadXML=false;
if (gbIE5&&!gbMac)
bLoadXML=true;
if(gbIE55||gbNav6||gbSafari3)
bLoadXML=true;
if(gbOpera7)
bLoadXML=false;
if(bLoadXML)
addProjectXML(sXMLName);
else
addProjectHTML(sHTMLName);
}
function addProjectHTML(sName)
{
gbXML=false;
gsProjName=sName;
}
function mrAlterProjUrl(sProjUrl)
{
if( mrIsOnEngine()==true )
{
var sProjName=mrGetProjName();
if( sProjName!='' )
{
// now build the server url
sProjUrl=mrGetEngineUrl()+'?mgr=sys&cmd=prjinf&prj='+sProjName;
};
};
return sProjUrl;
};
function addProjectXML(sName)
{
// intialize the roboengine varialbes
mrInitialize();
gbXML=true;
gsProjName=mrAlterProjUrl(sName);
}
function window_MyBunload()
{
goMan.unload();
window_BUnload();
}
function putDataXML(xmlDoc,sdocPath)
{
if(xmlDoc!=null)
{
var projectNode=xmlDoc.getElementsByTagName("project")[0];
if(projectNode)
{
var aRProj=new Array();
aRProj[0]=new Object();
aRProj[0].sPPath=_getPath(sdocPath);
// server serves the full path, so we don't need the project path anymore
if( mrIsOnEngine()==true )
aRProj[0].sPPath="";
var sLangId=projectNode.getAttribute("langid");
if(sLangId)
{
aRProj[0].sLangId=sLangId;
}
var sDPath=projectNode.getAttribute("datapath");
if(sDPath)
{
if(sDPath.lastIndexOf("/")!=sDPath.length-1)
sDPath+="/";
aRProj[0].sDPath=sDPath;
}
else
aRProj[0].sDPath="";
aRProj[0].sToc=projectNode.getAttribute("toc");
aRProj[0].sIdx=projectNode.getAttribute("index");
aRProj[0].sFts=projectNode.getAttribute("fts");
aRProj[0].sGlo=projectNode.getAttribute("glossary");
var RmtProject=projectNode.getElementsByTagName("remote");
var nCount=1;
for (var i=0;i gnChecked)
{
setTimeout("cancelProj("+gnChecked+");",10000);
loadData2(gaProj[gnChecked].sPPath+gsProjName);
}
else{
var oMsg=new whMessage(WH_MSG_PROJECTREADY,null,null);
gbReady=true;
notify(oMsg);
}
}
function cancelProj(i)
{
if(i==gnChecked)
{
gnChecked++;
setTimeout("checkRemoteProject();", 1);
}
}
function window_resize()
{
for(var i=0;i 1 && document.body.clientHeight>1)
{
var oMsg = new whMessage(WH_MSG_RESIZEPANE, null, null);
notify(oMsg);
}
}
}
function window_unload()
{
unregisterListener2(WH_MSG_GETPROJINFO);
unregisterListener2(WH_MSG_SHOWTOC);
unregisterListener2(WH_MSG_SHOWIDX);
unregisterListener2(WH_MSG_SHOWFTS);
unregisterListener2(WH_MSG_SHOWGLO);
unregisterListener2(WH_MSG_GETPANEINFO);
unregisterListener2(WH_MSG_GETHIGHLIGHTINFO);
//unregisterListener2(WH_MSG_GETSEARCHSTR);
//unregisterListener2(WH_MSG_HILITESEARCH);
//unregisterListener2(WH_MSG_GETNUMRSLT);
}
function onReceiveRequest(oMsg) {
if (oMsg) {
var nMsgId = oMsg.msgId;
if (nMsgId == WH_MSG_GETPROJINFO) {
if (gbReady) {
var oProj = new Object();
oProj.aProj = gaProj;
oProj.bXML = gbXML;
oMsg.oParam = oProj;
reply(oMsg);
}
return false;
}
else if (nMsgId == WH_MSG_GETPANEINFO) {
oMsg.oParam = goMan.getCurrent();
reply(oMsg);
return false;
}
else if (oMsg.msgId == WH_MSG_GETHIGHLIGHTINFO) {
var ftsElem = getElement("ftsIFrame");
if (ftsElem) {
try {
if (typeof (ftsElem.contentWindow.document) != 'undefined' &&
typeof (ftsElem.contentWindow.document.forms[0]) != "undefined") {
oMsg.oParam.bHighlight = true;
var str1 = ftsElem.contentWindow.document.forms[0].quesn.value;
if (ftsElem.contentWindow.document.forms[0].quesnsyn) {
var str2 = ftsElem.contentWindow.document.forms[0].quesnsyn.value;
if (str2 != "")
str1 += str2;
}
oMsg.oParam.strTerms = str1;
var tbl = ftsElem.contentWindow.document.getElementById("FtsRslt");
if (tbl)
oMsg.oParam.nResults = tbl.rows.length;
else
oMsg.oParam.nResults = 0;
reply(oMsg);
return false;
}
}
catch (e) {
return true;
}
}
return true;
}
/*else if (nMsgId == WH_MSG_HILITESEARCH) {
oMsg.oParam = true;
reply(oMsg);
return true;
}
else if (nMsgId == WH_MSG_GETSEARCHSTR) {
var ftsElem = getElement("ftsIFrame");
if (ftsElem) {
if (typeof (ftsElem.contentWindow.document.forms[0]) != "undefined") {
var str1 = ftsElem.contentWindow.document.forms[0].quesn.value;
if (ftsElem.contentWindow.document.forms[0].quesnsyn) {
var str2 = ftsElem.contentWindow.document.forms[0].quesnsyn.value;
if (str2 != "")
str1 += str2;
}
oMsg.oParam = str1;
}
}
reply(oMsg);
return true;
}
else if (nMsgId == WH_MSG_GETNUMRSLT) {
var ftsElem = getElement("ftsIFrame");
if (ftsElem) {
var tbl = ftsElem.contentWindow.document.getElementById("FtsRslt");
if (tbl)
oMsg.oParam = tbl.rows.length;
else
oMsg.oParam = 0;
}
else
oMsg.oParam = 0;
reply(oMsg);
return true;
}*/
}
return true;
}
function onReceiveNotification(oMsg)
{
if(oMsg)
{
var nMsgId=oMsg.msgId;
if(nMsgId==WH_MSG_SHOWTOC)
{
if(goMan)
goMan.show("toc");
var onMsg=new whMessage(WH_MSG_PANEINFO, "toc", null);
notify(onMsg);
onMsg = new whMessage(WH_MSG_SHOWPANE, null, null);
notify(onMsg);
}
else if(nMsgId==WH_MSG_SHOWIDX)
{
if(goMan)
goMan.show("idx");
var onMsg=new whMessage(WH_MSG_PANEINFO, "idx", null);
notify(onMsg);
onMsg = new whMessage(WH_MSG_SHOWPANE, null, null);
notify(onMsg);
}
else if(nMsgId==WH_MSG_SHOWFTS)
{
if(goMan)
goMan.show("fts");
var onMsg=new whMessage(WH_MSG_PANEINFO, "fts", null);
notify(onMsg);
onMsg = new whMessage(WH_MSG_SHOWPANE, null, null);
notify(onMsg);
}
else if(nMsgId==WH_MSG_SHOWGLO)
{
if(goMan)
goMan.show("glo");
var onMsg=new whMessage(WH_MSG_PANEINFO, "glo", null);
notify(onMsg);
onMsg = new whMessage(WH_MSG_SHOWPANE, null, null);
notify(onMsg);
}
}
return true;
}
if(window.gbWhUtil&&window.gbWhMsg&&window.gbWhVer&&window.gbWhProxy)
{
registerListener2(WH_MSG_GETPROJINFO);
registerListener2(WH_MSG_SHOWTOC);
registerListener2(WH_MSG_SHOWIDX);
registerListener2(WH_MSG_SHOWFTS);
registerListener2(WH_MSG_SHOWGLO);
registerListener2(WH_MSG_GETPANEINFO);
registerListener2(WH_MSG_GETHIGHLIGHTINFO);
//registerListener2(WH_MSG_GETSEARCHSTR);
//registerListener2(WH_MSG_HILITESEARCH);
//registerListener2(WH_MSG_GETNUMRSLT);
if((gbMac&&gbIE4)||(gbSunOS&&gbIE5)||gbOpera7)
{
window.onresize=window_resize;
}
else if(gbIE4)
{
window.onresize=window_resize2;
}
window.onload=window_OnLoad;
window.onbeforeunload=window_MyBunload;
window.onunload=window_unload;
gbWhPHost=true;
}
else
document.location.reload();