var gHelpSystem=null; var gMasterHelpSystem=null; function FMCGetHelpSystem(){ return gHelpSystem;} function FMCGetMasterHelpSystem(){ return gMasterHelpSystem;} function FMCLoadHelpSystem(OnCompleteFunc){ if(FMCIsWebHelp()){ var rootFrameRootFolderUrl=new CMCUrl(MCGlobals.RootFrameRootFolder); var hsUrl=rootFrameRootFolderUrl.CombinePath("Data/HelpSystem.xml"); gMasterHelpSystem=new CMCHelpSystem(null,rootFrameRootFolderUrl.FullPath,hsUrl.FullPath,null,null); gMasterHelpSystem.Load(function(){ gHelpSystem=gMasterHelpSystem.GetHelpSystem(MCGlobals.RootFolder); OnCompleteFunc(gHelpSystem);});} else{ var pathToHelpSystem=FMCGetAttribute(document.documentElement,"MadCap:PathToHelpSystem")||""; var currentFolder=new CMCUrl(FMCEscapeHref(document.location.href)).ToFolder(); var absPathToHS=currentFolder.CombinePath(pathToHelpSystem); var dataFolder=absPathToHS.CombinePath("Data"); var hsUrl=dataFolder.AddFile("HelpSystem.xml"); gMasterHelpSystem=new CMCHelpSystem(null,absPathToHS.FullPath,hsUrl.FullPath,null,null); gMasterHelpSystem.Load(function(){ gHelpSystem=gMasterHelpSystem; OnCompleteFunc(gHelpSystem);});}} function CMCHelpSystem(parentSubsystem,parentPath,xmlFile,tocPath,browseSequencePath){ var mSelf=this; var mParentSubsystem=parentSubsystem; var mPath=parentPath; var mXmlDoc=null; var mSubsystems=new Array(); var mTocPath=tocPath; var mBrowseSequencePath=browseSequencePath; var mConceptMap=null; var mViewedConceptMap=new CMCDictionary(); var mExists=false; var mAliasFile=new CMCAliasFile(parentPath+"Data/Alias.xml",this); var mTocFile=new CMCTocFile(this,EMCTocType.Toc); var mBrowseSequenceFile=new CMCTocFile(this,EMCTocType.BrowseSequence); this.TargetType=null; this.SkinFolder=null; this.SkinTemplateFolder=null; this.DefaultStartTopic=null; this.InPreviewMode=null; this.LiveHelpOutputId=null; this.LiveHelpServer=null; this.LiveHelpEnabled=false; this.IsWebHelpPlus=false; this.ContentFolder=null; this.UseCustomTopicFileExtension=false; this.CustomTopicFileExtension=null; this.GlossaryUrl=null; this.SearchFilterSetUrl=null;(function(){})(); this.Load=function(OnCompleteFunc){ CMCXmlParser.GetXmlDoc(xmlFile,true,function(xmlDoc){ function OnLoadSubHelpSystemComplete(){ completed++; if(completed==length){ OnCompleteFunc();}} mXmlDoc=xmlDoc; mExists=mXmlDoc!=null; if(!mExists){ OnCompleteFunc(); return;} mSelf.TargetType=mXmlDoc.documentElement.getAttribute("TargetType"); mSelf.SkinFolder=new CMCUrl(mXmlDoc.documentElement.getAttribute("Skin")).ToFolder().FullPath; mSelf.SkinTemplateFolder=mXmlDoc.documentElement.getAttribute("SkinTemplateFolder"); mSelf.DefaultStartTopic=mXmlDoc.documentElement.getAttribute("DefaultUrl"); mSelf.InPreviewMode=FMCGetAttributeBool(mXmlDoc.documentElement,"InPreviewMode",false); mSelf.LiveHelpOutputId=mXmlDoc.documentElement.getAttribute("LiveHelpOutputId"); mSelf.LiveHelpServer=mXmlDoc.documentElement.getAttribute("LiveHelpServer"); mSelf.LiveHelpEnabled=mSelf.LiveHelpOutputId!=null; mSelf.IsWebHelpPlus=mSelf.TargetType=="WebHelpPlus"&&document.location.protocol.StartsWith("http",false); var moveOutputContentToRoot=FMCGetAttributeBool(mXmlDoc.documentElement,"MoveOutputContentToRoot",false); var makeFileLowerCase=FMCGetAttributeBool(mXmlDoc.documentElement,"MakeFileLowerCase",false); var contentFolder=""; if(!moveOutputContentToRoot){ contentFolder="Content/";} if(makeFileLowerCase){ contentFolder=contentFolder.toLowerCase();} mSelf.ContentFolder=contentFolder; mSelf.UseCustomTopicFileExtension=FMCGetAttributeBool(mXmlDoc.documentElement,"UseCustomTopicFileExtension",false); mSelf.CustomTopicFileExtension=FMCGetAttribute(mXmlDoc.documentElement,"CustomTopicFileExtension"); mSelf.GlossaryUrl=GetGlossaryUrl(mXmlDoc); mSelf.SearchFilterSetUrl=GetDataFileUrl(mXmlDoc,"SearchFilterSet"); var subsystemsNodes=mXmlDoc.getElementsByTagName("Subsystems"); if(subsystemsNodes.length>0&&subsystemsNodes[0].getElementsByTagName("Url").length>0){ var urlNodes=mXmlDoc.getElementsByTagName("Subsystems")[0].getElementsByTagName("Url"); var completed=0; var length=urlNodes.length; for(var i=0;i0){ var myPathUrl=new CMCUrl(mSelf.GetPath()); var subPathUrl=new CMCUrl(subsystem.GetPath()); var relUrl=subPathUrl.ToRelative(myPathUrl); idInfo.Topic=relUrl.FullPath+idInfo.Topic;} OnCompleteFunc(idInfo); return;} if(i0);}; this.GetConceptsLinks=function(conceptTerms,callbackFunc,callbackArgs){ if(this.IsWebHelpPlus){ function OnGetTopicsForConceptsComplete(xmlDoc,args){ var links=new Array(); var nodes=xmlDoc.documentElement.getElementsByTagName("Url"); var nodeLength=nodes.length; for(var i=0;i0){ var attributesClone=head.cloneNode(false).attributes; for(var i=0;iterm2){ if(typeof(xmlDoc1.importNode)=="function"){ entries.appendChild(xmlDoc1.importNode(currIndexEntry2,true));} else{ entries.appendChild(currIndexEntry2.cloneNode(true));} j++;} else{ entries.appendChild(currIndexEntry1.cloneNode(true)); i++;}} for(;iterm2.toLowerCase()){ var newGlossaryPageEntry=null; if(typeof(xmlDoc1.importNode)=="function"){ newGlossaryPageEntry=xmlDoc1.importNode(currGlossaryPageEntry2,true);} else{ newGlossaryPageEntry=currGlossaryPageEntry2.cloneNode(true);} ConvertGlossaryPageEntryToAbsolute(newGlossaryPageEntry,subPath); body.appendChild(newGlossaryPageEntry) j++;} else{ body.appendChild(currGlossaryPageEntry1.cloneNode(true)); i++;}} for(;i0){ var lastStep=steps[steps.length-1]; if(lastStep.StartsWith("$$$$$")){ linkNodeIndex=parseInt(lastStep.substring("$$$$$".length)); steps.splice(steps.length-1,1);}} var tocNode=mXmlDoc.documentElement; for(var i=0,length=steps.length;i=0){ if(linkNodeIndex==0){ foundNode=tocNode;} else{ foundNode=FMCGetChildNodeByTagName(tocNode,"TocEntry",linkNodeIndex-1);}} else{ var ownerHelpSystem=GetOwnerHelpSystem(tocNode); var relHref=href.ToRelative(new CMCUrl(ownerHelpSystem.GetPath())); var foundNode=FindLink(tocNode,relHref.FullPath.toLowerCase(),true); if(!foundNode){ foundNode=FindLink(tocNode,relHref.PlainPath.toLowerCase(),false);}} mTocPath=null; mTocHref=null; onCompleteFunc(foundNode);} function CheckChunk(tocNode){ var chunk=FMCGetAttribute(tocNode,"Chunk"); if(chunk!=null){ mSelf.LoadChunk(tocNode,chunk, function(tocNode){ mSelf.GetTocNode(mTocPath,mTocHref,onCompleteFunc)}); return true;} return false;} function CheckMerge(tocNode){ var mergeHint=FMCGetAttributeInt(tocNode,"MergeHint",-1); if(mergeHint>=0){ mSelf.LoadMerge(tocNode, function(tocNode){ mSelf.GetTocNode(mTocPath,mTocHref,onCompleteFunc)}); return true;} return false;}}; this.GetEntrySequenceIndex=function(tocPath,href,onCompleteFunc){ this.GetTocNode(tocPath,href,OnCompleteGetTocNode); function OnCompleteGetTocNode(tocNode){ var sequenceIndex=-1; if(tocNode!=null){ sequenceIndex=ComputeEntrySequenceIndex(tocNode);} onCompleteFunc(sequenceIndex);}}; this.GetIndexTotalForEntry=function(tocPath,href,onCompleteFunc){ this.GetTocNode(tocPath,href,OnCompleteGetTocNode); function OnCompleteGetTocNode(tocNode){ var total=-1; if(tocNode!=null){ var currNode=tocNode; while(currNode.parentNode!=mXmlDoc.documentElement){ currNode=currNode.parentNode;} total=FMCGetAttributeInt(currNode,"DescendantCount",-1);} onCompleteFunc(total);}}; function InitOnComplete(){ for(var i=0,length=mInitOnCompleteFuncs.length;i=0){ mSelf.LoadMerge(tocNode,OnCompleteFunc); return true;} return false;}} function GetDeepestChild(tocNode,nodeName){ var node=FMCGetLastChildNodeByTagName(tocNode,nodeName); if(node!=null){ var nodeChild=GetDeepestChild(node,nodeName); if(nodeChild!=null){ return nodeChild;} return node;} return null;} function GetOwnerHelpSystem(tocNode){ var ownerHelpSystem=null; var currNode=tocNode; while(true){ if(currNode==currNode.ownerDocument.documentElement){ ownerHelpSystem=mHelpSystem; break;} var ownerHelpSystemIndex=FMCGetAttributeInt(currNode,"ownerHelpSystemIndex",-1); if(ownerHelpSystemIndex>=0){ ownerHelpSystem=mOwnerHelpSystems[ownerHelpSystemIndex]; break;} currNode=currNode.parentNode;} return ownerHelpSystem;} function GetTocPath(tocNode){ var tocPath=""; var linkNodeIndex=-1; var childNode=FMCGetChildNodeByTagName(tocNode,"TocEntry",0); if(childNode!=null){ tocPath=FMCGetAttribute(tocNode,"Title"); linkNodeIndex=0;} else{ linkNodeIndex=FMCGetChildIndex(tocNode)+1;} if(tocPath.length>0){ tocPath+="|";} tocPath+=("$$$$$"+linkNodeIndex); for(var currNode=tocNode.parentNode;currNode!=null&&currNode.parentNode.nodeType==1;currNode=currNode.parentNode){ if(tocPath==null){ tocPath="";} if(tocPath.length>0){ tocPath="|"+tocPath;} tocPath=FMCGetAttribute(currNode,"Title")+tocPath;} return tocPath;} function ComputeEntrySequenceIndex(tocNode){ if(tocNode.parentNode==tocNode.ownerDocument.documentElement){ return 0;} var sequenceIndex=0; var link=FMCGetAttribute(tocNode,"Link"); if(link!=null){ sequenceIndex++;} for(var currNode=tocNode.previousSibling;currNode!=null;currNode=currNode.previousSibling){ if(currNode.nodeType!=1){continue;} var descendantCount=FMCGetAttributeInt(currNode,"DescendantCount",0); sequenceIndex+=descendantCount; var link=FMCGetAttribute(currNode,"Link"); if(link!=null){ var linkUrl=new CMCUrl(link); var ext=linkUrl.Extension.toLowerCase(); if(ext=="htm"||ext=="html"){ sequenceIndex++;}}} return sequenceIndex+ComputeEntrySequenceIndex(tocNode.parentNode);}}  function CMCAliasFile(xmlFile,helpSystem,OnLoadFunc){ var mXmlDoc=null; var mHelpSystem=helpSystem; var mNameMap=null; var mIDMap=null;(function(){})(); this.Load=function(OnCompleteFunc){ function OnLoad(xmlDoc){ mXmlDoc=xmlDoc; OnCompleteFunc();} CMCXmlParser.GetXmlDoc(xmlFile,true,OnLoad,null);}; this.GetIDs=function(){ var ids=new Array(); AssureInitializedMap(); mIDMap.ForEach(function(key,value){ ids[ids.length]=key; return true;}); return ids;}; this.GetNames=function(){ var names=new Array(); AssureInitializedMap(); mNameMap.ForEach(function(key,value){ names[names.length]=key; return true;}); return names;}; this.LookupID=function(id){ var found=false; var topic=null; var skin=null; if(id){ if(typeof(id)=="string"&&id.indexOf(".")!=-1){ var pipePos=id.indexOf("|"); if(pipePos!=-1){ topic=id.substring(0,pipePos); skin=id.substring(pipePos+1);} else{ topic=id;}} else{ var mapInfo=GetFromMap(id); if(mapInfo!=null){ found=true; topic=mapInfo.Topic; skin=mapInfo.Skin;}}} else{ found=true;} if(!skin){ if(mXmlDoc){ skin=mXmlDoc.documentElement.getAttribute("DefaultSkinName");}} if(topic){ topic=mHelpSystem.ContentFolder+topic;} return{Found:found,Topic:topic,Skin:skin};}; function GetFromMap(id){ var mapInfo=null; AssureInitializedMap(); if(mNameMap!=null){ if(typeof(id)=="string"){ mapInfo=mNameMap.GetItem(id); if(mapInfo==null){ mapInfo=mIDMap.GetItem(id);}} else if(typeof(id)=="number"){ mapInfo=mIDMap.GetItem(id.toString());}} return mapInfo;} function AssureInitializedMap(){ if(mNameMap==null){ if(mXmlDoc){ mNameMap=new CMCDictionary(); mIDMap=new CMCDictionary(); var maps=mXmlDoc.documentElement.getElementsByTagName("Map"); for(var i=0;i=0&&str.charAt(i)==" ";i--); return str.substring(0,i+1);} function FMCContainsClassRoot(className){ var ret=null; for(var i=1;iwinNode.innerHeight){ clientWidth-=19;}} else if(FMCIsQuirksMode(winNode)){ clientWidth=winNode.document.body.clientWidth;} else if(winNode.document.documentElement){ clientWidth=winNode.document.documentElement.clientWidth;} return clientWidth;} function FMCGetClientHeight(winNode,includeScrollbars){ var clientHeight=null; if(typeof(winNode.innerHeight)!="undefined"){ clientHeight=winNode.innerHeight; if(!includeScrollbars&&FMCGetScrollWidth(winNode)>winNode.innerWidth){ clientHeight-=19;}} else if(FMCIsQuirksMode(winNode)){ clientHeight=winNode.document.body.clientHeight;} else if(winNode.document.documentElement){ clientHeight=winNode.document.documentElement.clientHeight;} return clientHeight;} function FMCGetClientCenter(winNode){ var centerX=FMCGetScrollLeft(winNode)+(FMCGetClientWidth(winNode,false)/2); var centerY=FMCGetScrollTop(winNode)+(FMCGetClientHeight(winNode,false)/2); return[centerX,centerY];} function FMCGetScrollHeight(winNode){ var scrollHeight=null; if(winNode.document.scrollHeight){ scrollHeight=winNode.document.scrollHeight;} else if(FMCIsQuirksMode(winNode)){ scrollHeight=winNode.document.body.scrollHeight;} else if(winNode.document.documentElement){ scrollHeight=winNode.document.documentElement.scrollHeight;} return scrollHeight;} function FMCGetScrollWidth(winNode){ var scrollWidth=null; if(winNode.document.scrollWidth){ scrollWidth=winNode.document.scrollWidth;} else if(FMCIsQuirksMode(winNode)){ scrollWidth=winNode.document.body.scrollWidth;} else if(winNode.document.documentElement){ scrollWidth=winNode.document.documentElement.scrollWidth;} return scrollWidth;} function FMCGetScrollTop(winNode){ var scrollTop=null; if(FMCIsQuirksMode(winNode)){ scrollTop=winNode.document.body.scrollTop;} else{ scrollTop=Math.max(winNode.document.documentElement.scrollTop,winNode.document.body.scrollTop);} return scrollTop;} function FMCSetScrollTop(winNode,value){ winNode.scrollTo(FMCGetScrollLeft(winNode),value);} function FMCGetScrollLeft(winNode){ var scrollLeft=null; if(FMCIsQuirksMode(winNode)){ scrollLeft=winNode.document.body.scrollLeft;} else{ scrollLeft=Math.max(winNode.document.documentElement.scrollLeft,winNode.document.body.scrollLeft);} return scrollLeft;} function FMCSetScrollLeft(winNode,value){ winNode.scrollTo(value,FMCGetScrollTop(winNode));} function FMCGetClientX(winNode,e){ var clientX; if(typeof(e.pageX)!="undefined"){ clientX=e.pageX-FMCGetScrollLeft(winNode);} else if(typeof(e.clientX)!="undefined"){ clientX=e.clientX;} return clientX;} function FMCGetClientY(winNode,e){ var clientY; if(typeof(e.pageY)!="undefined"){ clientY=e.pageY-FMCGetScrollTop(winNode);} else if(typeof(e.clientY)!="undefined"){ clientY=e.clientY;} return clientY;} function FMCGetPageX(winNode,e){ var pageX; if(typeof(e.pageX)!="undefined"){ pageX=e.pageX;} else if(typeof(e.clientX)!="undefined"){ pageX=e.clientX+FMCGetScrollLeft(winNode);} return pageX;} function FMCGetPageY(winNode,e){ var pageY; if(typeof(e.pageY)!="undefined"){ pageY=e.pageY;} else if(typeof(e.clientY)!="undefined"){ pageY=e.clientY+FMCGetScrollTop(winNode);} return pageY;} function FMCGetMouseXRelativeTo(winNode,e,el){ var mouseX=FMCGetPageX(winNode,e,el); var elX=FMCGetPosition(el)[1]; var x=mouseX-elX; return x;} function FMCGetMouseYRelativeTo(winNode,e,el){ var mouseY=FMCGetPageY(winNode,e,el); var elY=FMCGetPosition(el)[0]; var y=mouseY-elY; return y;} function FMCGetPosition(node){ var topPos=0; var leftPos=0; if(node.offsetParent){ topPos=node.offsetTop; leftPos=node.offsetLeft; while(node=node.offsetParent){ topPos+=node.offsetTop; leftPos+=node.offsetLeft;}} return[topPos,leftPos];} function FMCScrollToVisible(win,node){ var offset=0; if(typeof(window.innerWidth)!="undefined"&&!FMCIsSafari()){ offset=19;} var scrollTop=FMCGetScrollTop(win); var scrollBottom=scrollTop+FMCGetClientHeight(win,false)-offset; var scrollLeft=FMCGetScrollLeft(win); var scrollRight=scrollLeft+FMCGetClientWidth(win,false)-offset; var nodePos=FMCGetPosition(node); var nodeTop=nodePos[0]; var nodeLeft=parseInt(node.style.textIndent)+nodePos[1]; var nodeHeight=node.offsetHeight; var nodeWidth=node.getElementsByTagName("a")[0].offsetWidth; if(nodeTopscrollBottom){ FMCSetScrollTop(win,Math.min(nodeTop,nodeTop+nodeHeight-FMCGetClientHeight(win,false)+offset));} if(nodeLeftscrollRight){ FMCSetScrollLeft(win,Math.min(nodeLeft,nodeLeft+nodeWidth-FMCGetClientWidth(win,false)+offset));}} function FMCIsQuirksMode(winNode){ return FMCIsIE55()||(winNode.document.compatMode&&winNode.document.compatMode=="BackCompat");} function FMCGetComputedStyle(node,style){ var value=null; if(node.currentStyle){ value=node.currentStyle[style];} else if(document.defaultView&&document.defaultView.getComputedStyle){ var computedStyle=document.defaultView.getComputedStyle(node,null); if(computedStyle){ value=computedStyle[style];}} return value;} function FMCConvertToPx(doc,str,dimension,defaultValue){ if(!str||str.charAt(0)=="-"){ return defaultValue;} if(str.charAt(str.length-1)=="\%"){ switch(dimension){ case "Width": return parseInt(str)*screen.width/100; break; case "Height": return parseInt(str)*screen.height/100; break;}} else{ if(parseInt(str).toString()==str){ str+="px";}} try{ var div=doc.createElement("div");} catch(err){ return defaultValue;} doc.body.appendChild(div); var value=defaultValue; try{ div.style.width=str; if(div.currentStyle){ value=div.offsetWidth;} else if(document.defaultView&&document.defaultView.getComputedStyle){ value=parseInt(FMCGetComputedStyle(div,"width"));}} catch(err){} doc.body.removeChild(div); return value;} function FMCGetControl(el){ var value=null; if(el.type=="checkbox"){ value=el.checked;} else{ value=el.value;} return value;} function FMCGetOpacity(el){ var opacity=-1; if(el.filters){ if(el.style.filter!=""){ opacity=parseInt(el.style.filter.substring(17,el.style.filter.length-2));}} else if(el.style.MozOpacity!=null){ opacity=parseFloat(el.style.MozOpacity)*100;} else{ opacity=parseFloat(el.style.opacity)*100;} return opacity;} function FMCSetOpacity(el,opacityPercent){ if(el.filters){ if(opacityPercent==100){ el.style.filter="";} else{ el.style.filter="alpha( opacity = "+opacityPercent+" )";}} else if(el.style.MozOpacity!=null){ el.style.MozOpacity=opacityPercent/100;} else{ el.style.opacity=opacityPercent/100;}} function FMCToggleDisplay(el){ if(el.style.display=="none"){ el.style.display="";} else{ el.style.display="none";}} function FMCGetContainingIFrame(win){ var allIFrames=win.parent.document.getElementsByTagName("iframe"); for(var i=0,length=allIFrames.length;i0)?" ":"")+currPart);}} return newValue;} function FMCUnhide(win,node){ for(var currNode=node.parentNode;currNode.nodeName!="BODY";currNode=currNode.parentNode){ if(currNode.style.display=="none"){ var classRoot=FMCContainsClassRoot(currNode.className,"MCExpandingBody","MCDropDownBody","MCTextPopupBody"); if(classRoot=="MCExpandingBody"){ win.FMCExpand(currNode.parentNode.getElementsByTagName("a")[0]);} else if(classRoot=="MCDropDownBody"){ var dropDownBodyID=currNode.id.substring("MCDropDownBody".length+1,currNode.id.length); var aNodes=currNode.parentNode.getElementsByTagName("a"); for(var i=0;i1){ return;} if(fadeElement){ if(fadeElement.style.MozOpacity!=null){ fadeElement.style.MozOpacity="0.1";}} var span=win.document.createElement("span"); var img=win.document.createElement("img"); var midPointX=FMCGetScrollLeft(win)+FMCGetClientWidth(win,false)/2; var spacing=3; parentElement.appendChild(span); span.id="LoadingText"; span.appendChild(win.document.createTextNode(loadingLabel)); span.style.fontFamily="Tahoma, Sans-Serif"; span.style.fontSize="9px"; span.style.fontWeight="bold"; span.style.position="absolute"; span.style.left=(midPointX-(span.offsetWidth/2))+"px"; img.id="LoadingImage"; img.src=MCGlobals.RootFolder+MCGlobals.SkinTemplateFolder+"Images/Loading.gif"; img.alt=loadingAltText; img.style.width="70px"; img.style.height="13px"; img.style.position="absolute"; img.style.left=(midPointX-(70/2))+"px"; var totalHeight=span.offsetHeight+spacing+parseInt(img.style.height); var spanTop=(FMCGetScrollTop(win)+(FMCGetClientHeight(win,false)-totalHeight))/2; span.style.top=spanTop+"px"; img.style.top=spanTop+span.offsetHeight+spacing+"px"; parentElement.appendChild(img);} function EndLoading(win,fadeElement){ win.MCLoadingCount--; if(win.MCLoadingCount>0){ return;} var span=win.document.getElementById("LoadingText"); var img=win.document.getElementById("LoadingImage"); span.parentNode.removeChild(span); img.parentNode.removeChild(img); if(fadeElement){ if(fadeElement.style.MozOpacity!=null){ fadeElement.style.MozOpacity="1.0";}}} var MCEventType=new Object(); MCEventType.OnLoad=0; MCEventType.OnInit=1; MCEventType.OnReady=2; function FMCRegisterCallback(frameName,eventType,CallbackFunc,callbackArgs){ function FMCCheckMCGlobalsInitialized(){ if(MCGlobals.GetIsInitialized()){ CallbackFunc(callbackArgs);} else{ setTimeout(FMCCheckMCGlobalsInitialized,REGISTER_CALLBACK_INTERVAL);}} function FMCCheckRootReady(){ function OnGetReady(isReady){ if(isReady){ CallbackFunc(callbackArgs);} else{ setTimeout(FMCCheckRootReady,REGISTER_CALLBACK_INTERVAL);}} FMCPostMessageRequest(MCGlobals.RootFrame,"gReady",null,function(data){ var isReady=FMCStringToBool(data[0]); OnGetReady(isReady);},function(){ OnGetReady(MCGlobals.RootFrame.gReady);});} function FMCCheckRootLoaded(){ function OnGetLoaded(isLoaded){ if(isLoaded){ CallbackFunc(callbackArgs);} else{ setTimeout(FMCCheckRootLoaded,REGISTER_CALLBACK_INTERVAL);}} FMCPostMessageRequest(MCGlobals.RootFrame,"gLoaded",null,function(data){ var isLoaded=FMCStringToBool(data[0]); OnGetLoaded(isLoaded);},function(){ OnGetLoaded(MCGlobals.RootFrame.gLoaded);});} function FMCCheckTOCInitialized(){ function OnGetInit(isInit){ if(isInit){ CallbackFunc(callbackArgs);} else{ setTimeout(FMCCheckTOCInitialized,REGISTER_CALLBACK_INTERVAL);}} FMCPostMessageRequest(MCGlobals.NavigationFrame.frames["toc"],"gInit",null,function(data){ var isInit=FMCStringToBool(data[0]); OnGetInit(isInit);},function(){ OnGetInit(MCGlobals.NavigationFrame.frames["toc"].gInit);});} function FMCCheckSearchInitialized(){ function OnGetInit(isInit){ if(isInit){ CallbackFunc(callbackArgs);} else{ setTimeout(FMCCheckSearchInitialized,REGISTER_CALLBACK_INTERVAL);}} FMCPostMessageRequest(MCGlobals.NavigationFrame.frames["search"],"gInit",null,function(data){ var isInit=FMCStringToBool(data[0]); OnGetInit(isInit);},function(){ OnGetInit(MCGlobals.NavigationFrame.frames["search"].gInit);});} function FMCCheckBodyCommentsLoaded(){ function OnGetLoaded(isLoaded){ if(isLoaded){ CallbackFunc(callbackArgs);} else{ setTimeout(FMCCheckBodyCommentsLoaded,REGISTER_CALLBACK_INTERVAL);}} FMCPostMessageRequest(MCGlobals.BodyCommentsFrame,"gLoaded",null,function(data){ var isLoaded=FMCStringToBool(data[0]); OnGetLoaded(isLoaded);},function(){ OnGetLoaded(MCGlobals.BodyCommentsFrame.gLoaded);});} function FMCCheckBodyCommentsInitialized(){ function OnGetInit(isInit){ if(isInit){ CallbackFunc(callbackArgs);} else{ setTimeout(FMCCheckBodyCommentsInitialized,REGISTER_CALLBACK_INTERVAL);}} FMCPostMessageRequest(MCGlobals.BodyCommentsFrame,"gInit",null,function(data){ var isInit=FMCStringToBool(data[0]); OnGetInit(isInit);},function(){ OnGetInit(MCGlobals.BodyCommentsFrame.gInit);});} function FMCCheckToolbarInitialized(){ function OnGetInit(isInit){ if(isInit){ CallbackFunc(callbackArgs);} else{ setTimeout(FMCCheckToolbarInitialized,REGISTER_CALLBACK_INTERVAL);}} FMCPostMessageRequest(MCGlobals.ToolbarFrame,"gInit",null,function(data){ var isInit=FMCStringToBool(data[0]); OnGetInit(isInit);},function(){ OnGetInit(MCGlobals.ToolbarFrame.gInit);});} function FMCCheckNavigationReady(){ function OnGetReady(isReady){ if(isReady){ CallbackFunc(callbackArgs);} else{ setTimeout(FMCCheckNavigationReady,REGISTER_CALLBACK_INTERVAL);}} FMCPostMessageRequest(MCGlobals.NavigationFrame,"gReady",null,function(data){ var isReady=FMCStringToBool(data[0]); OnGetReady(isReady);},function(){ OnGetReady(MCGlobals.NavigationFrame.gReady);});} function FMCCheckNavigationLoaded(){ function OnGetLoaded(isLoaded){ if(isLoaded){ CallbackFunc(callbackArgs);} else{ setTimeout(FMCCheckNavigationLoaded,REGISTER_CALLBACK_INTERVAL);}} FMCPostMessageRequest(MCGlobals.NavigationFrame,"gLoaded",null,function(data){ var isLoaded=FMCStringToBool(data[0]); OnGetLoaded(isLoaded);},function(){ OnGetLoaded(MCGlobals.NavigationFrame.gLoaded);});} function FMCCheckNavigationInitialized(){ function OnGetInit(isInit){ if(isInit){ CallbackFunc(callbackArgs);} else{ setTimeout(FMCCheckNavigationInitialized,REGISTER_CALLBACK_INTERVAL);}} FMCPostMessageRequest(MCGlobals.NavigationFrame,"gInit",null,function(data){ var isInit=FMCStringToBool(data[0]); OnGetInit(isInit);},function(){ OnGetInit(MCGlobals.NavigationFrame.gInit);});} function FMCCheckBodyReady(){ function OnGetReady(isReady){ if(isReady){ CallbackFunc(callbackArgs);} else{ setTimeout(FMCCheckBodyReady,REGISTER_CALLBACK_INTERVAL);}} FMCPostMessageRequest(MCGlobals.BodyFrame,"gReady",null,function(data){ var isReady=FMCStringToBool(data[0]); OnGetReady(isReady);},function(){ OnGetReady(MCGlobals.BodyFrame.gReady);});} function FMCCheckBodyLoaded(){ function OnGetLoaded(isLoaded){ if(isLoaded){ CallbackFunc(callbackArgs);} else{ setTimeout(FMCCheckBodyLoaded,REGISTER_CALLBACK_INTERVAL);}} FMCPostMessageRequest(MCGlobals.BodyFrame,"gLoaded",null,function(data){ var isLoaded=FMCStringToBool(data[0]); OnGetLoaded(isLoaded);},function(){ OnGetLoaded(MCGlobals.BodyFrame.gLoaded);});} function FMCCheckBodyInitialized(){ function OnGetInit(isInit){ if(isInit){ CallbackFunc(callbackArgs);} else{ setTimeout(FMCCheckBodyInitialized,REGISTER_CALLBACK_INTERVAL);}} FMCPostMessageRequest(MCGlobals.BodyFrame,"gInit",null,function(data){ var isInit=FMCStringToBool(data[0]); OnGetInit(isInit);},function(){ OnGetInit(MCGlobals.BodyFrame.gInit);});} function FMCCheckPersistenceInitialized(){ function OnGetInit(isInit){ if(isInit){ CallbackFunc(callbackArgs);} else{ setTimeout(FMCCheckPersistenceInitialized,REGISTER_CALLBACK_INTERVAL);}} FMCPostMessageRequest(MCGlobals.PersistenceFrame,"gInit",null,function(data){ var isInit=FMCStringToBool(data[0]); OnGetInit(isInit);},function(){ OnGetInit(MCGlobals.PersistenceFrame.gInit);});} var func=null; if(frameName=="TOC"){ if(eventType==MCEventType.OnLoad){func=FMCCheckTOCLoaded;} else if(eventType==MCEventType.OnInit){func=FMCCheckTOCInitialized;} else if(eventType==MCEventType.OnReady){func=FMCCheckTOCReady;}} else if(frameName=="Toolbar"){ if(eventType==MCEventType.OnLoad){func=FMCCheckToolbarLoaded;} else if(eventType==MCEventType.OnInit){func=FMCCheckToolbarInitialized;} else if(eventType==MCEventType.OnReady){func=FMCCheckToolbarReady;}} else if(frameName=="BodyComments"){ if(eventType==MCEventType.OnLoad){func=FMCCheckBodyCommentsLoaded;} else if(eventType==MCEventType.OnInit){func=FMCCheckBodyCommentsInitialized;} else if(eventType==MCEventType.OnReady){func=FMCCheckBodyCommentsReady;}} else if(frameName=="Persistence"){ if(eventType==MCEventType.OnLoad){func=FMCCheckPersistenceLoaded;} else if(eventType==MCEventType.OnInit){func=FMCCheckPersistenceInitialized;} else if(eventType==MCEventType.OnReady){func=FMCCheckPersistenceReady;}} else if(frameName=="Search"){ if(eventType==MCEventType.OnLoad){func=FMCCheckSearchLoaded;} else if(eventType==MCEventType.OnInit){func=FMCCheckSearchInitialized;} else if(eventType==MCEventType.OnReady){func=FMCCheckSearchReady;}} else if(frameName=="MCGlobals"){ if(eventType==MCEventType.OnLoad){func=FMCCheckMCGlobalsLoaded;} else if(eventType==MCEventType.OnInit){func=FMCCheckMCGlobalsInitialized;} else if(eventType==MCEventType.OnReady){func=FMCCheckMCGlobalsReady;}} else if(frameName=="Navigation"){ if(eventType==MCEventType.OnLoad){func=FMCCheckNavigationLoaded;} else if(eventType==MCEventType.OnInit){func=FMCCheckNavigationInitialized;} else if(eventType==MCEventType.OnReady){func=FMCCheckNavigationReady;}} else if(frameName=="Body"){ if(eventType==MCEventType.OnLoad){func=FMCCheckBodyLoaded;} else if(eventType==MCEventType.OnInit){func=FMCCheckBodyInitialized;} else if(eventType==MCEventType.OnReady){func=FMCCheckBodyReady;}} else if(frameName=="Root"){ if(eventType==MCEventType.OnLoad){func=FMCCheckRootLoaded;} else if(eventType==MCEventType.OnInit){func=FMCCheckRootInitialized;} else if(eventType==MCEventType.OnReady){func=FMCCheckRootReady;}} window.setTimeout(func,REGISTER_CALLBACK_INTERVAL);} function FMCSortStringArray(stringArray){ stringArray.sort(FMCCompareStrings);} function FMCCompareStrings(a,b){ var ret; if(a.toLowerCase()b.toLowerCase()){ ret=1;} return ret;} function FMCSetCookie(name,value,days){ if(FMCIsChromeLocal()){ if(window.localStorage!=null){ window.localStorage.setItem(name,value);} return;} if(window.name!="bridge"){ var cookieFrame=FMCIsDotNetHelp()?MCGlobals.BodyCommentsFrame:MCGlobals.NavigationFrame; if(window!=cookieFrame){ cookieFrame.FMCSetCookie(name,value,days); return;}} value=encodeURI(value); var expires=null; if(days){ var date=new Date(); date.setTime(date.getTime()+(1000*60*60*24*days)); expires="; expires="+date.toGMTString();} else{ expires="";} var cookieString=name+"="+value+expires+";"; document.cookie=cookieString;} function FMCReadCookie(name){ if(FMCIsChromeLocal()){ if(window.localStorage!=null){ return window.localStorage.getItem(name);}} if(window.name!="bridge"){ var cookieFrame=FMCIsDotNetHelp()?MCGlobals.BodyCommentsFrame:MCGlobals.NavigationFrame; if(window!=cookieFrame){ return cookieFrame.FMCReadCookie(name);}} var value=null; var nameEq=name+"="; var cookies=document.cookie.split(";"); for(var i=0;i"; var xmlDoc=CMCXmlParser.LoadXmlString(rootXml); return xmlDoc;} CMCXmlParser.GetOuterXml=function(xmlDoc){ var xml=null; if(window.ActiveXObject){ xml=xmlDoc.xml;} else if(window.XMLSerializer){ var serializer=new XMLSerializer(); xml=serializer.serializeToString(xmlDoc);} return xml;} CMCXmlParser.CallWebService=function(webServiceUrl,async,onCompleteFunc,onCompleteArgs){ var xmlParser=new CMCXmlParser(onCompleteArgs,onCompleteFunc,null); var xmlDoc=xmlParser.LoadRemote(webServiceUrl,async); return xmlDoc;} var CMCFlareStylesheet=new function(){ var mXmlDoc=null; var mInitializedResources=false; var mResourceMap=null; function InitializeResources(){ mInitializedResources=true; mResourceMap=new CMCDictionary(); var resourcesInfos=mXmlDoc.getElementsByTagName("ResourcesInfo"); if(resourcesInfos.length>0){ var resources=resourcesInfos[0].getElementsByTagName("Resource"); for(var i=0;i=0){ newStr=this.substring(0,startIndex);} else{ newStr=this;} newStr+=value; if(startIndex>=0){ newStr+=this.substring(startIndex);} return newStr;} String.prototype.Trim=function(){ return this.TrimLeft().TrimRight();} String.prototype.TrimLeft=function(){ var i=0; for(i=0;i=0&&this.charAt(i)==" ";i--); return this.substring(0,i+1);} Array.prototype.Contains=function(item){ for(var i=0,length=this.length;ithis.length){ throw "Index out of bounds.";} this.splice(index,0,item);} Array.prototype.Remove=function(index){ if(index<0||index>this.length){ throw "Index out of bounds.";} this.splice(index,1);} Array.prototype.RemoveValue=function(value){ for(var i=this.length-1;i>=0;i--){ if(this[i]==value){ this.Remove(i);}}} function CMCDictionary(){ this.mMap=new Object(); this.mOverflows=new Array(); this.mLength=0;} CMCDictionary.prototype.GetLength=function(key){ return this.mLength;}; CMCDictionary.prototype.ForEach=function(func){ var map=this.mMap; for(var key in map){ var value=map[key]; if(!func(key,value)){ return;}} var overflows=this.mOverflows; for(var i=0,length=overflows.length;i=0){ item=this.mOverflows[index].Value;}} else{ item=this.mMap[key]; if(typeof(item)=="undefined"){ item=null;}} return item;}; CMCDictionary.prototype.GetItemOverflowIndex=function(key){ var overflows=this.mOverflows; for(var i=0,length=overflows.length;i=0){ this.mOverflows.splice(index,1) this.mLength--;}} else{ if(this.mMap[key]!="undefined"){ delete(this.mMap[key]); this.mLength--;}}}; CMCDictionary.prototype.Add=function(key,value){ if(typeof(this.mMap[key])=="function"){ var item=this.GetItem(key); if(item!=null){ this.Remove(key);} this.mOverflows[this.mOverflows.length]={Key:key,Value:value};} else{ this.mMap[key]=value;} this.mLength++;}; CMCDictionary.prototype.AddUnique=function(key,value){ var savedValue=this.GetItem(key); if(typeof(savedValue)=="undefined"||!savedValue){ this.Add(key,value);}}; function CMCUrl(src){ var mSelf=this; this.FullPath=null; this.Path=null; this.PlainPath=null; this.Name=null; this.Extension=null; this.NameWithExtension=null; this.Fragment=null; this.Query=null; this.IsAbsolute=false;(function(){ var fragment=""; var query=""; var fragmentPos=src.indexOf("#"); var queryPos=src.indexOf("?"); if(fragmentPos!=-1){ if(fragmentPos>queryPos){ fragment=src.substring(fragmentPos);} else{ fragment=src.substring(fragmentPos,queryPos);}} if(queryPos!=-1){ if(queryPos>fragmentPos){ query=src.substring(queryPos);} else{ query=src.substring(queryPos,fragmentPos);}} var pos=Math.max(fragmentPos,queryPos); var plainPath=src.substring(0,pos==-1?src.length:pos); pos=plainPath.lastIndexOf("/"); var path=plainPath.substring(0,pos+1); var nameWithExt=plainPath.substring(pos+1); pos=nameWithExt.lastIndexOf("."); var name=nameWithExt.substring(0,pos); var ext=nameWithExt.substring(pos+1); var scheme=""; pos=src.indexOf(":"); if(pos>=0){ scheme=src.substring(0,pos);} mSelf.FullPath=src; mSelf.Path=path; mSelf.PlainPath=plainPath; mSelf.Name=name; mSelf.Extension=ext; mSelf.NameWithExtension=nameWithExt; mSelf.Scheme=scheme; mSelf.IsAbsolute=!String.IsNullOrEmpty(scheme); mSelf.Fragment=fragment; mSelf.Query=query;})();} CMCUrl.QueryMap=new CMCDictionary(); CMCUrl.HashMap=new CMCDictionary();(function(){ var search=document.location.search; if(!String.IsNullOrEmpty(search)){ search=search.substring(1); Parse(search,"&",CMCUrl.QueryMap);} var hash=document.location.hash; if(!String.IsNullOrEmpty(hash)){ hash=hash.substring(1); Parse(hash,"|",CMCUrl.HashMap);} function Parse(item,delimiter,map){ var split=item.split(delimiter); for(var i=0,length=split.length;i=0){ key=decodeURIComponent(part.substring(0,index)); value=decodeURIComponent(part.substring(index+1));} else{ key=part;} map.Add(key,value);}}})(); CMCUrl.prototype.AddFile=function(otherUrl){ if(typeof(otherUrl)=="string"){ otherUrl=new CMCUrl(otherUrl);} if(otherUrl.IsAbsolute){ return otherUrl;} var otherFullPath=otherUrl.FullPath; if(otherFullPath.charAt(0)=="/"){ var loc=document.location; var pos=loc.href.lastIndexOf(loc.pathname); var rootPath=loc.href.substring(0,pos); return new CMCUrl(rootPath+otherFullPath);} var fullPath=this.FullPath; if(!fullPath.EndsWith("/")){ fullPath=fullPath+"/";} return new CMCUrl(fullPath+otherFullPath);}; CMCUrl.prototype.CombinePath=function(otherUrl){ if(typeof(otherUrl)=="string"){ otherUrl=new CMCUrl(otherUrl);} if(otherUrl.IsAbsolute){ throw new CMCException(-1,"Cannot combine two absolute paths.");} var otherFullPath=otherUrl.FullPath; var fullPath=this.FullPath; var segments=otherUrl.FullPath.split("/"); var curr=this.FullPath; var prefix=""; if(this.Scheme=="mk"){ var pos=curr.indexOf("::"); prefix=curr.substring(0,pos+"::".length); curr=curr.substring(pos+"::".length);} for(var i=0,length=segments.length;i1&&curr.EndsWith("/")){ curr=curr.substring(0,curr.length-1);} if(seg=="."){ curr+="/";} else if(seg==".."){ curr=curr.substring(0,curr.lastIndexOf("/")+1);} else{ if(!curr.EndsWith("/")){ curr+="/";} curr+=seg;}} curr=prefix+curr; return new CMCUrl(curr);}; CMCUrl.prototype.ToQuery=function(query){ var newPath=this.PlainPath+"?"+query+this.Fragment; return new CMCUrl(newPath);}; CMCUrl.prototype.ToFolder=function(){ var fullPath=this.PlainPath; var pos=fullPath.lastIndexOf("/"); var newPath=fullPath.substring(0,pos+1); return new CMCUrl(newPath);}; CMCUrl.prototype.ToRelative=function(otherUrl){ var path=otherUrl.FullPath; var otherPath=this.FullPath; var pos=otherPath.indexOf(path); var relPath=null; if(pos==0){ relPath=otherPath.substring(path.length);} else{ relPath=otherPath;} return new CMCUrl(relPath);}; CMCUrl.prototype.ToExtension=function(newExt){ var path=this.FullPath; var pos=path.lastIndexOf("."); var left=path.substring(0,pos); var newPath=left+"."+newExt; return new CMCUrl(newPath);}; function FMCGetElementsByClassRoot(node,classRoot){ var nodes=new Array(); var args=new Array(); args[0]=nodes; args[1]=classRoot; FMCTraverseDOM("post",node,FMCGetByClassRoot,args); return nodes;} function FMCGetByClassRoot(node,args){ var nodes=args[0]; var classRoot=args[1]; if(node.nodeType==1&&FMCContainsClassRoot(node.className,classRoot)){ nodes[nodes.length]=node;}} function FMCGetElementsByAttribute(node,attribute,value){ var nodes=new Array(); var args=new Array(); args[0]=nodes; args[1]=attribute; args[2]=value; FMCTraverseDOM("post",node,FMCGetByAttribute,args); return nodes;} function FMCGetByAttribute(node,args){ var nodes=args[0]; var attribute=args[1]; var value=args[2]; try{ if(node.nodeType==1&&(FMCGetMCAttribute(node,attribute)==value||(value=="*"&&FMCGetMCAttribute(node,attribute)))){ nodes[nodes.length]=node;}} catch(err){ node.setAttribute(attribute,null);}} function FMCTraverseDOM(type,root,Func,args){ if(type=="pre"){ Func(root,args);} if(root.childNodes.length!=0){ for(var i=0;i=endOpacity){ clearInterval(interval); if(nodeBG!=null){ FMCSetOpacity(nodeBG,endOpacityBG);}}} interval=setInterval(DoFadeIn,10);};} var CMCDateTimeHelpers=new function(){ this.GetDateFromUTCString=function(utcString){ var ms=Date.parse(utcString); var date=new Date(ms); var utcMS=Date.UTC(date.getFullYear(),date.getMonth(),date.getDate(),date.getHours(),date.getMinutes(),date.getSeconds(),date.getMilliseconds()); var utcDate=new Date(utcMS); return utcDate;}; this.ToUIString=function(date){ var dateStr=(date.getMonth()+1)+"/"+date.getDate()+"/"+date.getFullYear()+" "+date.toLocaleTimeString(); return dateStr;};} function CMCException(number,message){ this.Number=number; this.Message=message;} var MCGlobals=new function(){ var mSelf=this; this.Initialized=false; this.GetHelpSystemComplete=false; this.StylesheetInitialized=false; this.RootFolder=null; this.RootFrameRootFolder=null; this.RootFrame=null; this.ToolbarFrame=null; this.BodyFrame=null; this.NavigationFrame=null; this.BodyCommentsFrame=null; this.PersistenceFrame=null; function InitRoot(){ mSelf.RootFrame=window; mSelf.ToolbarFrame=frames["mctoolbar"]; mSelf.BodyFrame=frames["body"]; mSelf.NavigationFrame=frames["navigation"]; mSelf.PersistenceFrame=null; mSelf.BodyCommentsFrame=mSelf.BodyFrame.frames["topiccomments"]; mSelf.Initialized=true;} function InitTopicCHM(){ mSelf.RootFrame=null; mSelf.ToolbarFrame=frames["mctoolbar"]; mSelf.BodyFrame=window; mSelf.NavigationFrame=null; mSelf.BodyCommentsFrame=frames["topiccomments"]; mSelf.PersistenceFrame=frames["persistence"]; mSelf.Initialized=true;} function InitNavigation(){ mSelf.RootFrame=parent; mSelf.NavigationFrame=window; mSelf.PersistenceFrame=null; FMCRegisterCallback("Root",MCEventType.OnReady,OnRootReady,null); function OnRootReady(args){ mSelf.ToolbarFrame=mSelf.RootFrame.frames["mctoolbar"]; mSelf.BodyFrame=mSelf.RootFrame.frames["body"]; mSelf.BodyCommentsFrame=mSelf.BodyFrame.frames["topiccomments"]; if(FMCIsWebHelpAIR()){ FMCRegisterCallback("Root",MCEventType.OnLoad,OnRootLoaded,null); function OnRootLoaded(args){ mSelf.Initialized=true;}} else{ mSelf.Initialized=true;}}} function InitNavigationFramesWebHelp(){ mSelf.RootFrame=parent.parent; mSelf.NavigationFrame=parent; mSelf.PersistenceFrame=null; FMCRegisterCallback("Root",MCEventType.OnReady,OnRootReady,null); function OnRootReady(args){ mSelf.ToolbarFrame=mSelf.RootFrame.frames["mctoolbar"]; mSelf.BodyFrame=mSelf.RootFrame.frames["body"]; mSelf.BodyCommentsFrame=mSelf.BodyFrame.frames["topiccomments"]; if(window.name=="search"&&FMCIsWebHelpAIR()){ FMCRegisterCallback("Navigation",MCEventType.OnLoad,OnNavigationLoaded,null); function OnNavigationLoaded(args){ mSelf.Initialized=true;}} else{ mSelf.Initialized=true;}}} function InitBodyCommentsFrameWebHelp(){ var rootFrame=null; if(parent.parent!=parent){ rootFrame=parent.parent;} mSelf.RootFrame=rootFrame; mSelf.NavigationFrame=parent.parent.frames["navigation"]; mSelf.PersistenceFrame=null; mSelf.ToolbarFrame=parent.parent.frames["mctoolbar"]; mSelf.BodyFrame=parent; mSelf.BodyCommentsFrame=window; mSelf.Initialized=true;} function InitBodyCommentsFrameDotNetHelp(){ mSelf.RootFrame=null; mSelf.ToolbarFrame=null; mSelf.BodyFrame=parent; mSelf.NavigationFrame=null; mSelf.BodyCommentsFrame=window; mSelf.PersistenceFrame=null; mSelf.Initialized=true;} function InitToolbarWebHelp(){ mSelf.RootFrame=parent; mSelf.ToolbarFrame=window; mSelf.PersistenceFrame=null; FMCRegisterCallback("Root",MCEventType.OnReady,OnRootReady,null); function OnRootReady(args){ mSelf.BodyFrame=mSelf.RootFrame.frames["body"]; mSelf.NavigationFrame=mSelf.RootFrame.frames["navigation"]; mSelf.BodyCommentsFrame=mSelf.BodyFrame.frames["topiccomments"]; mSelf.Initialized=true;}} function InitToolbarWebHelpTopic(){ mSelf.RootFrame=parent.parent; mSelf.PersistenceFrame=null; mSelf.BodyFrame=parent; FMCRegisterCallback("Root",MCEventType.OnReady,OnRootReady,null); function OnRootReady(args){ mSelf.ToolbarFrame=mSelf.RootFrame.frames["mctoolbar"]; mSelf.NavigationFrame=mSelf.RootFrame.frames["navigation"]; mSelf.BodyCommentsFrame=mSelf.BodyFrame.frames["topiccomments"]; mSelf.Initialized=true;}} function InitToolbarCHM(){ mSelf.RootFrame=null; mSelf.ToolbarFrame=window; mSelf.BodyFrame=parent; mSelf.NavigationFrame=null; FMCRegisterCallback("Body",MCEventType.OnReady,OnBodyReady,null); function OnBodyReady(args){ mSelf.BodyCommentsFrame=mSelf.BodyFrame.frames["topiccomments"]; mSelf.PersistenceFrame=mSelf.BodyFrame.frames["persistence"]; mSelf.Initialized=true;}} function InitTopicWebHelp(){ var rootFrame=null; if(parent!=window){ rootFrame=parent;} mSelf.RootFrame=rootFrame; mSelf.BodyFrame=window; mSelf.BodyCommentsFrame=mSelf.BodyFrame.frames["topiccomments"]; mSelf.PersistenceFrame=null; if(mSelf.RootFrame==null){ mSelf.Initialized=true;} else{ function OnRootReady(args){ mSelf.ToolbarFrame=mSelf.RootFrame.frames["mctoolbar"]; mSelf.NavigationFrame=mSelf.RootFrame.frames["navigation"]; if(FMCIsWebHelpAIR()){ FMCRegisterCallback("Root",MCEventType.OnLoad,OnRootLoaded,null); function OnRootLoaded(args){ mSelf.Initialized=true;}} else{ mSelf.Initialized=true;}} FMCRegisterCallback("Root",MCEventType.OnReady,OnRootReady,null);}} function InitTopicDotNetHelp(){ mSelf.RootFrame=null; mSelf.ToolbarFrame=null; mSelf.BodyFrame=window; mSelf.NavigationFrame=null; mSelf.BodyCommentsFrame=mSelf.BodyFrame.frames["topiccomments"]; mSelf.PersistenceFrame=null; mSelf.Initialized=true;} function InitGlossaryFrameDotNetHelp(){ mSelf.RootFrame=null; mSelf.ToolbarFrame=null; mSelf.BodyFrame=null; mSelf.NavigationFrame=null; mSelf.BodyCommentsFrame=null; mSelf.PersistenceFrame=null; mSelf.Initialized=true;} function InitNavigationFramesCHM(){ mSelf.RootFrame=null; mSelf.BodyFrame=parent; mSelf.NavigationFrame=null; FMCRegisterCallback("Body",MCEventType.OnReady,OnBodyReady,null); function OnBodyReady(args){ mSelf.ToolbarFrame=mSelf.BodyFrame.frames["mctoolbar"]; mSelf.BodyCommentsFrame=mSelf.BodyFrame.frames["topiccomments"]; mSelf.PersistenceFrame=mSelf.BodyFrame.frames["persistence"]; mSelf.Initialized=true;}} this.GetIsInitialized=function(){ return this.Initialized&&this.GetHelpSystemComplete&&this.StylesheetInitialized;}; this.Init=function(){ function OnGetHelpSystemComplete(helpSystem){ function OnGetSkinFolder(skinFolder){ mSelf.RootFrameSkinFolder=skinFolder; mSelf.GetHelpSystemComplete=true; CMCFlareStylesheet.Init(OnGetStylesheetComplete);} var masterHS=helpSystem; mSelf.SkinFolder=masterHS.SkinFolder; mSelf.SkinTemplateFolder=masterHS.SkinTemplateFolder; mSelf.DefaultStartTopic=masterHS.DefaultStartTopic; mSelf.InPreviewMode=masterHS.InPreviewMode; if(FMCIsWebHelp()){ FMCPostMessageRequest(mSelf.RootFrame,"get-skin-folder",null,function(data){ var skinFolder=data[0]; OnGetSkinFolder(skinFolder);},function(){ OnGetSkinFolder(MCGlobals.RootFrame.gSkinFolder);});} else{ OnGetSkinFolder(masterHS.SkinFolder);}} function OnGetStylesheetComplete(){ mSelf.StylesheetInitialized=true;} function OnGetUrl(url){ function OnGetRootFolder(rootFolder){ mSelf.RootFolder=rootFolder; mSelf.RootFrameRootFolder=FMCEscapeHref(rootFolder); FMCLoadHelpSystem(OnGetHelpSystemComplete);} var rootFolder=new CMCUrl(url).ToFolder(); mSelf.RootFrameRootFolder=FMCEscapeHref(rootFolder.FullPath); var href=new CMCUrl(document.location.href); var subFolder=href.ToFolder().ToRelative(rootFolder); if(subFolder.FullPath.StartsWith("Subsystems",false)){ while(subFolder.FullPath.StartsWith("Subsystems",false)){ rootFolder=rootFolder.AddFile("Subsystems/"); subFolder=href.ToFolder().ToRelative(rootFolder); var projFolder=subFolder.FullPath.substring(0,subFolder.FullPath.indexOf("/")+1); rootFolder=rootFolder.AddFile(projFolder); subFolder=href.ToFolder().ToRelative(rootFolder);} var r=rootFolder.FullPath; r=r.replace(/\\/g,"/"); r=r.replace(/%20/g," "); r=r.replace(/;/g,"%3B"); mSelf.RootFolder=r;} else if(subFolder.FullPath.StartsWith("AutoMerge",false)){ while(subFolder.FullPath.StartsWith("AutoMerge",false)){ rootFolder=rootFolder.AddFile("AutoMerge/"); subFolder=href.ToFolder().ToRelative(rootFolder); var projFolder=subFolder.FullPath.substring(0,subFolder.FullPath.indexOf("/")+1); rootFolder=rootFolder.AddFile(projFolder); subFolder=href.ToFolder().ToRelative(rootFolder);} var r=rootFolder.FullPath; r=r.replace(/\\/g,"/"); r=r.replace(/%20/g," "); r=r.replace(/;/g,"%3B"); mSelf.RootFolder=r;} else{ FMCPostMessageRequest(mSelf.RootFrame,"get-root-folder",null,function(data){ var rootFolder=data[0]; OnGetRootFolder(rootFolder);},function(){ OnGetRootFolder(FMCGetRootFolder(mSelf.RootFrame.document.location));}); return;} FMCLoadHelpSystem(OnGetHelpSystemComplete);} var inPreviewMode=FMCGetAttributeBool(document.documentElement,"MadCap:InPreviewMode",false); if(inPreviewMode){ this.InPreviewMode=true; this.SkinFolder="Skin/"; this.RootFrameSkinFolder="Skin/"; this.SkinTemplateFolder="SkinTemplate/"; CMCFlareStylesheet.Init(OnGetStylesheetComplete); mSelf.Initialized=true; mSelf.GetHelpSystemComplete=true; return;} if(window.name=="bridge"){ mSelf.Initialized=true; mSelf.GetHelpSystemComplete=true; mSelf.StylesheetInitialized=true; return;} else if(gRuntimeFileType=="Default"||(gRuntimeFileType=="Topic"&&FMCIsHtmlHelp())){ mSelf.ToolbarFrame=frames["mctoolbar"]; if(frames["body"]!=null){ InitRoot();} else{ InitTopicCHM();}} else if(window.name=="navigation"){ InitNavigation();} else if(window.name.StartsWith("mctoolbar")){ mSelf.ToolbarFrame=window; if(parent.frames["navigation"]!=null){ InitToolbarWebHelp();} else if(FMCIsWebHelp()){ InitToolbarWebHelpTopic();} else{ InitToolbarCHM();}} else if(FMCIsTopicPopup(window)){ var currFrame=window; while(true){ if(currFrame.frames["navigation"]!=null){ mSelf.RootFrame=currFrame; break;} if(currFrame.parent==currFrame){ break;} currFrame=currFrame.parent;} mSelf.Initialized=true;} else if(window.name=="body"||gRuntimeFileType=="Topic"){ if(FMCIsWebHelp()){ InitTopicWebHelp();} else if(FMCIsDotNetHelp()){ InitTopicDotNetHelp();} else if(FMCIsHtmlHelp()){ InitTopicCHM();}} else if(window.name=="topiccomments"){ if(FMCIsHtmlHelp()){ InitNavigationFramesCHM();} else if(FMCIsWebHelp()){ InitBodyCommentsFrameWebHelp();} else if(FMCIsDotNetHelp()){ InitBodyCommentsFrameDotNetHelp();}} else if(window.name=="glossary"&&FMCIsDotNetHelp()){ InitGlossaryFrameDotNetHelp();} else if(window.name=="toc"||window.name=="index"||window.name=="search"||window.name=="glossary"||window.name=="favorites"||window.name=="browsesequences"){ if(FMCIsWebHelp()){ InitNavigationFramesWebHelp();} else{ InitNavigationFramesCHM();}} else if(FMCIsDotNetHelp()){ mSelf.Initialized=true;} else{ mSelf.Initialized=true; mSelf.GetHelpSystemComplete=true; mSelf.StylesheetInitialized=true; return;} if(FMCIsWebHelp()){ if(mSelf.RootFrame==null){ mSelf.GetHelpSystemComplete=true; mSelf.StylesheetInitialized=true; return;} FMCPostMessageRequest(mSelf.RootFrame,"url",null,function(data){ var url=data[0]; OnGetUrl(url);},function(){ OnGetUrl(mSelf.RootFrame.document.location.href);}); return;} else if(FMCIsHtmlHelp()){ mSelf.RootFolder="/"; mSelf.RootFrameRootFolder=mSelf.RootFolder;} else if(FMCIsDotNetHelp()){ var pathToHelpSystem=FMCGetAttribute(document.documentElement,"MadCap:PathToHelpSystem"); var rootFolder=new CMCUrl(document.location.href).ToFolder(); rootFolder=rootFolder.CombinePath(pathToHelpSystem); mSelf.RootFolder=rootFolder.FullPath; mSelf.RootFrameRootFolder=FMCEscapeHref(rootFolder.FullPath);} FMCLoadHelpSystem(OnGetHelpSystemComplete);}} var gMessageID=0; var gMessageInfos=new Array(); var gMessageSeparator="%%%%%"; var gDataSeparator="-----"; function FMCPostMessageRequest(win,message,data,callbackFunc,postMessageNotSupportedFunc){ if(FMCIsChromeLocal()){ gMessageInfos[gMessageID]=callbackFunc; var dataString=""; if(data!=null){ for(var i=0,length=data.length;i0){ dataString+=gDataSeparator;} dataString+=data[i];}} win.postMessage("request"+gMessageSeparator+message+gMessageSeparator+dataString+gMessageSeparator+gMessageID,"*"); gMessageID++;} else{ if(postMessageNotSupportedFunc!=null){ postMessageNotSupportedFunc();}}} function FMCPostMessageResponse(win,message,data,messageID){ var dataString=""; if(data!=null){ for(var i=0,length=data.length;i0){ dataString+=gDataSeparator;} dataString+=data[i];}} win.postMessage("response"+gMessageSeparator+message+gMessageSeparator+dataString+gMessageSeparator+messageID,"*"); gMessageID++;} function OnMessage(e){ var parts=e.data.split(gMessageSeparator); var messageType=parts[0]; var message=parts[1]; var messageData=parts[2]; var messageID=parts[3]; var dataValues=null; if(!String.IsNullOrEmpty(messageData)){ dataValues=messageData.split(gDataSeparator); for(var i=0,length=dataValues.length;i0?responseData:null,messageID);}} else if(messageType=="response"){ if(gMessageInfos[messageID]!=null){ gMessageInfos[messageID](dataValues);}}} if(FMCIsChromeLocal()){ window.addEventListener("message",OnMessage,false);}  function CMCDialog(winNode){ this.mRootEl=null; this.mIndex=-1; this.mOK=false; this.mOnCloseFunc=null; this.mOnCloseArgs=null; this.mWindow=winNode; this.StyleClass="Dialog";} CMCDialog.prototype.Run=function(onCloseFunc,onCloseArgs){ FMCInsertOpacitySheet(this.mWindow,"Gray"); CMCDialog.Dialogs.push(this); this.mIndex=CMCDialog.Dialogs.length-1; if(onCloseFunc){ this.mOnCloseFunc=onCloseFunc; this.mOnCloseArgs=onCloseArgs;} var wrapperDiv=this.mWindow.document.createElement("div"); this.RootEl=wrapperDiv; wrapperDiv.setAttribute("MadCap:dialogIndex",this.mIndex); wrapperDiv.id="MCDialog_"+this.mIndex; wrapperDiv.className="MCDialogWrapper"; wrapperDiv.style.display="none"; if(FMCIsQuirksMode(this.mWindow)){ wrapperDiv.style.position="absolute";} var dialogDiv=this.mWindow.document.createElement("div"); dialogDiv.className="MCDialog"; dialogDiv.innerHTML=this.InnerHtml; wrapperDiv.appendChild(dialogDiv); var titleDiv=this.mWindow.document.createElement("div"); titleDiv.id="MCDialogTitle"; titleDiv.appendChild(this.mWindow.document.createTextNode("")); dialogDiv.insertBefore(titleDiv,dialogDiv.firstChild); dialogDiv.insertBefore(this.mWindow.document.createElement("br"),titleDiv.nextSibling); this.mWindow.document.body.appendChild(wrapperDiv); var submitButton=document.getElementById("MCDialogSubmit"); submitButton.onclick=CMCDialog.OK; var cancelButton=document.getElementById("MCDialogCancel"); cancelButton.onclick=CMCDialog.Cancel; var shadowDiv=this.mWindow.document.createElement("div"); shadowDiv.id="MCDialog_DropShadow"; shadowDiv.className="MCDialogShadow"; wrapperDiv.appendChild(shadowDiv); this.Create(function(){ this.LoadStyles(); wrapperDiv.style.display=""; shadowDiv.style.display=""; this.OnInitializing(); var height=dialogDiv.offsetHeight; if(!FMCIsQuirksMode(this.mWindow)||!this.mWindow.document.body.currentStyle){ height-=parseInt(FMCGetComputedStyle(dialogDiv,"borderTopWidth")); height-=parseInt(FMCGetComputedStyle(dialogDiv,"borderBottomWidth")); height-=parseInt(FMCGetComputedStyle(dialogDiv,"paddingTop")); height-=parseInt(FMCGetComputedStyle(dialogDiv,"paddingBottom"));} shadowDiv.style.height=height+"px"; wrapperDiv.style.left=((FMCGetClientWidth(this.mWindow,false)/2)-200)+"px"; wrapperDiv.style.top=((FMCGetClientHeight(this.mWindow,false)/2)-200)+"px"; var shadowOpacity=CMCFlareStylesheet.LookupValue("Dialog",this.StyleClass,"ShadowOpacity",this.ShadowOpacity); MCFader.FadeIn(dialogDiv,0,100,shadowDiv,0,shadowOpacity,false);});}; CMCDialog.prototype.Create=function(OnCompleteFunc){ OnCompleteFunc.call(this);}; CMCDialog.prototype.OnInitializing=function(){}; CMCDialog.prototype.LoadStyles=function(){ var titleNode=this.mWindow.document.getElementById("MCDialogTitle"); titleNode.firstChild.nodeValue=CMCFlareStylesheet.LookupValue("Dialog",this.StyleClass,"TitleLabel",this.TitleLabel); titleNode.style.fontFamily=CMCFlareStylesheet.LookupValue("Dialog",this.StyleClass,"TitleFontFamily",this.TitleFontFamily); titleNode.style.fontSize=CMCFlareStylesheet.LookupValue("Dialog",this.StyleClass,"TitleFontSize",this.TitleFontSize); titleNode.style.fontWeight=CMCFlareStylesheet.LookupValue("Dialog",this.StyleClass,"TitleFontWeight",this.TitleFontWeight); titleNode.style.fontStyle=CMCFlareStylesheet.LookupValue("Dialog",this.StyleClass,"TitleFontStyle",this.TitleFontStyle); titleNode.style.fontVariant=CMCFlareStylesheet.LookupValue("Dialog",this.StyleClass,"TitleFontVariant",this.TitleFontVariant); titleNode.style.color=CMCFlareStylesheet.LookupValue("Dialog",this.StyleClass,"TitleColor",this.TitleColor); var submitButton=this.mWindow.document.getElementById("MCDialogSubmit"); submitButton.value=CMCFlareStylesheet.LookupValue("Dialog",this.StyleClass,"SubmitButtonLabel",this.SubmitButtonLabel); var cancelButton=this.mWindow.document.getElementById("MCDialogCancel"); cancelButton.value=CMCFlareStylesheet.LookupValue("Dialog",this.StyleClass,"CancelButtonLabel",this.CancelButtonLabel); var div=document.getElementById("MCDialog_"+this.mIndex).firstChild; this.SetLabelStyles(div); div.style.backgroundColor=CMCFlareStylesheet.LookupValue("Dialog",this.StyleClass,"BackgroundColor",this.BackgroundColor); var borderLeft=CMCFlareStylesheet.LookupValue("Dialog",this.StyleClass,"BorderLeft",this.BorderLeft); var borderRight=CMCFlareStylesheet.LookupValue("Dialog",this.StyleClass,"BorderRight",this.BorderRight); var borderTop=CMCFlareStylesheet.LookupValue("Dialog",this.StyleClass,"BorderTop",this.BorderTop); var borderBottom=CMCFlareStylesheet.LookupValue("Dialog",this.StyleClass,"BorderBottom",this.BorderBottom); div.style.borderLeft=borderLeft; div.style.borderRight=borderRight; div.style.borderTop=borderTop; div.style.borderBottom=borderBottom; var shadowDiv=this.mWindow.document.getElementById("MCDialog_DropShadow"); var shadowBgColor=CMCFlareStylesheet.LookupValue("Dialog",this.StyleClass,"ShadowColor",this.ShadowColor); shadowDiv.style.backgroundColor=shadowBgColor; var shadowDistance=parseInt(CMCFlareStylesheet.LookupValue("Dialog",this.StyleClass,"ShadowDistance",this.ShadowDistance)); shadowDiv.style.top=shadowDistance+"px"; shadowDiv.style.left=shadowDistance+"px"; shadowDiv.style.borderLeftWidth=FMCGetComputedStyle(div,"borderLeftWidth"); shadowDiv.style.borderRightWidth=FMCGetComputedStyle(div,"borderRightWidth"); shadowDiv.style.borderTopWidth=FMCGetComputedStyle(div,"borderTopWidth"); shadowDiv.style.borderBottomWidth=FMCGetComputedStyle(div,"borderBottomWidth"); shadowDiv.style.borderLeftColor=shadowBgColor; shadowDiv.style.borderLeftStyle="solid"; shadowDiv.style.borderRightColor=shadowBgColor; shadowDiv.style.borderRightStyle="solid"; shadowDiv.style.borderTopColor=shadowBgColor; shadowDiv.style.borderTopStyle="solid"; shadowDiv.style.borderBottomColor=shadowBgColor; shadowDiv.style.borderBottomStyle="solid";}; CMCDialog.prototype.SetLabelStyles=function(el){ if(el.className=="Label"){ el.style.fontFamily=CMCFlareStylesheet.LookupValue("Dialog",this.StyleClass,"FontFamily",this.FontFamily); el.style.fontSize=CMCFlareStylesheet.LookupValue("Dialog",this.StyleClass,"FontSize",this.FontSize); el.style.fontWeight=CMCFlareStylesheet.LookupValue("Dialog",this.StyleClass,"FontWeight",this.FontWeight); el.style.fontStyle=CMCFlareStylesheet.LookupValue("Dialog",this.StyleClass,"FontStyle",this.FontStyle); el.style.color=CMCFlareStylesheet.LookupValue("Dialog",this.StyleClass,"Color",this.Color);} var childNodes=el.childNodes; var length=el.childNodes.length; for(var i=0;i"+ ""+ ""+ ""+ "User Name:"+ ""+ ""+ ""+ ""+ ""+ "Subject:"+ ""+ ""+ ""+ ""+ ""+ "Comment:"+ ""+ ""+ ""+ ""+ ""+ ""+ "
"+ ""+ ""+ "
"; CMCAddCommentDialog.prototype.OnInitializing=function(){ this.base.OnInitializing.call(this); var commentNode=this.mWindow.document.getElementById("MCComment"); if(commentNode.firstChild){ commentNode.removeChild(commentNode.firstChild);} if(this.mAnonymousEnabled){ var username=null; if(FMCIsHtmlHelp()){ username=FMCLoadUserData("LiveHelpUsername");} else{ username=FMCReadCookie("LiveHelpUsername");} if(username){ this.mWindow.document.getElementById("MCUsername").value=username; this.mWindow.document.getElementById("MCSubject").focus();} else{ this.mWindow.document.getElementById("MCUsername").focus();}} else{ var tr=this.mWindow.document.getElementById("MCUsername").parentNode.parentNode; tr.parentNode.removeChild(tr); this.mWindow.document.getElementById("MCSubject").focus();}}; CMCAddCommentDialog.prototype.LoadStyles=function(){ this.base.LoadStyles.call(this); var userNameLabel=CMCFlareStylesheet.LookupValue("Dialog",this.StyleClass,"UserNameLabel",this.UserNameLabel); var subjectLabel=CMCFlareStylesheet.LookupValue("Dialog",this.StyleClass,"SubjectLabel",this.SubjectLabel); var commentLabel=CMCFlareStylesheet.LookupValue("Dialog",this.StyleClass,"CommentLabel",this.CommentLabel); document.getElementById("MCUserNameLabel").firstChild.nodeValue=userNameLabel; document.getElementById("MCSubjectLabel").firstChild.nodeValue=subjectLabel; document.getElementById("MCCommentLabel").firstChild.nodeValue=commentLabel; this.CommentLengthExceeded=CMCFlareStylesheet.LookupValue("Dialog",this.StyleClass,"CommentLengthExceeded",this.CommentLengthExceeded);}; CMCAddCommentDialog.prototype.OK=function(){ var topicID=FMCGetMCAttribute(this.mWindow.document.documentElement,"MadCap:liveHelp"); var userGuid=null; if(FMCIsHtmlHelp()){ userGuid=FMCLoadUserData("LiveHelpUserGuid");} else{ userGuid=FMCReadCookie("LiveHelpUserGuid");} var username=null; if(this.mAnonymousEnabled){ username=this.mWindow.document.getElementById("MCUsername").value; if(username==null||username.length==0){ alert("Please enter a user name."); return false;} if(FMCIsHtmlHelp()){ FMCSaveUserData("LiveHelpUsername",username);} else{ FMCSetCookie("LiveHelpUsername",username,36500);}} var subject=this.mWindow.document.getElementById("MCSubject").value; var comment=this.mWindow.document.getElementById("MCComment").value; if(subject==null||subject.length==0){ alert("Please enter a subject."); return false;} else if(comment==null||comment.length==0){ alert("Please enter a comment."); return false;} try{ gServiceClient.AddComment(topicID,userGuid,username,subject,comment,null);} catch(ex){ var message=this.CommentLengthExceeded.replace(/{n}/g,ex.Data.ExceedAmount); alert(message); return false;} return true;}; CMCAddCommentDialog.prototype.Cancel=function(){}; function CMCRegisterUserDialog(winNode,dialogMode,version){ CMCRegisterUserDialog.InCheckUserStatusMode=false; CMCDialog.call(this,winNode); this.mItemInfos=new Array(); this.mDialogMode=dialogMode; this.mVersion=version; this.StyleClass="RegisterUser"; this.FontFamily="Arial"; this.FontSize="12px"; this.FontWeight="normal"; this.FontStyle="normal"; this.Color="#000000"; this.TitleLabel="Create Feedback Service Profile:"; this.TitleFontFamily="Arial"; this.TitleFontSize="14px"; this.TitleFontWeight="bold"; this.TitleFontStyle="normal"; this.TitleFontVariant="small-caps"; this.TitleColor="#000000"; this.BackgroundColor="#ffffcc"; this.SubmitButtonLabel="Submit"; this.CancelButtonLabel="Cancel"; this.ShadowColor="#000000"; this.ShadowDistance=5; this.ShadowOpacity=100; this.BorderLeft="solid 2px #000000"; this.BorderRight="solid 2px #000000"; this.BorderTop="solid 2px #000000"; this.BorderBottom="solid 2px #000000"; this.RegistrationMessage="You must create a user profile to post comments to this help system. Please fill in the information below. An email will be sent to the address you provide. Please follow the instructions in the email to complete activation. Fields marked with an asterisk (*) are required."; this.EditProfileRegistrationMessage="Use this form to update your profile information. If you choose to update your email address, an email will be sent to the address you provide. Please follow the instructions in the email to complete activation."; this.RegistrationSubmit="Your information has been sent to MadCap Software. When the information has been processed, you will receive an email with a link to a verification page. Click this link, or copy and paste the link into your Web browser to complete the registration."; this.RegistrationSubmitNote="NOTE: Some service providers have email filtering software that may cause the notification email to be sent to your junk email folder. If you do not receive a notification email, please check this folder to see if it has been sent there."; this.MissingRequiredField="Please enter a value for: "; this.UpdateSuccess="Your profile was updated successfully!";} CMCRegisterUserDialog.prototype=new CMCDialog(); CMCRegisterUserDialog.prototype.constructor=CMCRegisterUserDialog; CMCRegisterUserDialog.prototype.base=CMCDialog.prototype; CMCRegisterUserDialog.prototype.InnerHtml=""+ "
"+ "You must create a user profile to post comments to this help system. "+ "Please fill in the information below. An email will be sent to the "+ "address you provide. Please follow the instructions in the email to complete activation."+ "Fields marked with an asterisk (*) are required."+ "
"+ ""+ "
"+ ""+ ""+ ""+ ""+ ""+ "
"+ "
"+ "
E-mail Notifications
"+ "
I want to receive an email when...
"+ "
"+ "
"+ "
"+ "
"+ "
"+ "
"+ ""+ "
"+ ""+ ""+ "
"; CMCRegisterUserDialog.DialogMode={}; CMCRegisterUserDialog.DialogMode.NewUserProfile=0; CMCRegisterUserDialog.DialogMode.EditUserProfile=1; CMCRegisterUserDialog.prototype.Create=function(OnCompleteFunc){ this.base.Create.call(this,function(){ CMCXmlParser.GetXmlDoc(FMCGetSkinFolderAbsolute()+"Skin.xml",true,function(xmlDoc){ var items=null; if(this.mVersion==1){ items=new Array(7); items[0]="Username"; items[1]="EmailAddress"; items[2]="FirstName"; items[3]="LastName"; items[4]="Country"; items[5]="PostalCode"; items[6]="Gender"; var emailNotificationsGroup=this.mWindow.document.getElementById("MCEmailNotificationsGroup"); emailNotificationsGroup.style.display="none";} else{ items=FMCGetAttributeStringList(xmlDoc.documentElement,"FeedbackUserProfileItems","|"); if(items==null){ items=new Array();} if(!items.Contains("EmailAddress")){ items.Insert("EmailAddress",0);} if(!items.Contains("Username")){ items.Insert("Username",0);} var c=this.mWindow.document.getElementById("MCCommentReplyNotification"); var itemInfo=new CMCItemInfo("CommentReplyNotification","CommentReplyNotification",c,false); this.mItemInfos[this.mItemInfos.length]=itemInfo; var savedValue=FMCLoadUserData("CommentReplyNotification"); c.checked=savedValue=="true"; c=this.mWindow.document.getElementById("MCCommentSameTopicNotification"); itemInfo=new CMCItemInfo("CommentSameTopicNotification","CommentSameTopicNotification",c,false); this.mItemInfos[this.mItemInfos.length]=itemInfo; savedValue=FMCLoadUserData("CommentSameTopicNotification"); c.checked=savedValue=="true"; c=this.mWindow.document.getElementById("MCCommentSameHelpSystemNotification"); itemInfo=new CMCItemInfo("CommentSameHelpSystemNotification","CommentSameHelpSystemNotification",c,false); this.mItemInfos[this.mItemInfos.length]=itemInfo; savedValue=FMCLoadUserData("CommentSameHelpSystemNotification"); c.checked=savedValue=="true";} var tbody=this.RootEl.getElementsByTagName("tbody")[0]; for(var i=0,length=items.length;i"+ ""+ ""+ ""+ "User Name:"+ ""+ ""+ ""+ ""+ ""+ "Subject:"+ ""+ ""+ ""+ ""+ ""+ "Comment:"+ ""+ ""+ ""+ ""+ ""+ "Original Comment:"+ ""+ ""+ ""+ ""+ ""+ ""+ "
"+ ""+ ""+ "
"; CMCReplyCommentDialog.prototype.OnInitializing=function(){ this.base.OnInitializing.call(this); var commentNode=this.mWindow.document.getElementById("MCComment"); if(commentNode.firstChild){ commentNode.removeChild(commentNode.firstChild);} if(this.mAnonymousEnabled){ this.mWindow.document.getElementById("MCUsername").focus();} else{ var tr=this.mWindow.document.getElementById("MCUsername").parentNode.parentNode; tr.parentNode.removeChild(tr); this.mWindow.document.getElementById("MCSubject").focus();} this.mWindow.document.getElementById("MCOriginalComment").value=this.mComment;}; CMCReplyCommentDialog.prototype.LoadStyles=function(){ this.base.LoadStyles.call(this); var userNameLabel=CMCFlareStylesheet.LookupValue("Dialog",this.StyleClass,"UserNameLabel",this.UserNameLabel); var subjectLabel=CMCFlareStylesheet.LookupValue("Dialog",this.StyleClass,"SubjectLabel",this.SubjectLabel); var commentLabel=CMCFlareStylesheet.LookupValue("Dialog",this.StyleClass,"CommentLabel",this.CommentLabel); var originalCommentLabel=CMCFlareStylesheet.LookupValue("Dialog",this.StyleClass,"OriginalCommentLabel",this.OriginalCommentLabel); document.getElementById("MCUserNameLabel").firstChild.nodeValue=userNameLabel; document.getElementById("MCSubjectLabel").firstChild.nodeValue=subjectLabel; document.getElementById("MCCommentLabel").firstChild.nodeValue=commentLabel; document.getElementById("MCOriginalCommentLabel").firstChild.nodeValue=originalCommentLabel; this.CommentLengthExceeded=CMCFlareStylesheet.LookupValue("Dialog",this.StyleClass,"CommentLengthExceeded",this.CommentLengthExceeded);}; CMCReplyCommentDialog.prototype.OK=function(){ var topicID=FMCGetMCAttribute(this.mWindow.document.documentElement,"MadCap:liveHelp"); var userGuid=null; if(FMCIsHtmlHelp()){ userGuid=FMCLoadUserData("LiveHelpUserGuid");} else{ userGuid=FMCReadCookie("LiveHelpUserGuid");} var username=null; if(this.mAnonymousEnabled){ username=this.mWindow.document.getElementById("MCUsername").value; if(username==null||username.length==0){ alert("Please enter a user name."); return false;}} var subject=this.mWindow.document.getElementById("MCSubject").value; var comment=this.mWindow.document.getElementById("MCComment").value; if(subject==null||subject.length==0){ alert("Please enter a subject."); return false;} else if(comment==null||comment.length==0){ alert("Please enter a comment."); return false;} try{ gServiceClient.AddComment(topicID,userGuid,username,subject,comment,this.mParentCommentID);} catch(ex){ var message=this.CommentLengthExceeded.replace(/{n}/g,ex.Data.ExceedAmount); alert(message); return false;} return true;}; CMCReplyCommentDialog.prototype.Cancel=function(){};  function FMCInit(){ if(gInit){ return;} FMCCheckForBookmark(); if(FMCIsWebHelp()&&window.name=="body"&&!FMCIsStandaloneTopic()){ FMCRegisterCallback("TOC",MCEventType.OnInit,function(){ var tocPath=FMCGetTocPath(); var href=FMCGetBodyHref(); FMCPostMessageRequest(MCGlobals.NavigationFrame.frames["toc"],"sync-toc",[tocPath,href.FullPath],null,function(){ if(MCGlobals.NavigationFrame.frames["toc"].gSyncTOC){ FMCSyncTOC(tocPath,href);}},null);});} if(MCGlobals.ToolbarFrame!=null){ FMCRegisterCallback("Toolbar",MCEventType.OnInit,function(){ if(FMCIsLiveHelpEnabled()){ var topicID=FMCGetMCAttribute(document.documentElement,"MadCap:liveHelp"); FMCPostMessageRequest(MCGlobals.ToolbarFrame,"topic-initialized",[topicID],null,function(){ MCGlobals.ToolbarFrame.gTopicID=topicID; if(MCGlobals.ToolbarFrame.document.getElementById("RatingIcons")!=null){ MCGlobals.ToolbarFrame.SetRating(0);} MCGlobals.ToolbarFrame.UpdateRating();});} MCGlobals.ToolbarFrame.OnBodyInitSetCurrentTopicIndex();},null);} var topicToolbarHeight=null; if(!FMCIsWebHelp()||MCGlobals.RootFrame!=null){ topicToolbarHeight=CMCFlareStylesheet.LookupValue("Frame","TopicToolbar","Height",null);} if(topicToolbarHeight!=null){ var topicToolbars=document.getElementsByTagName("iframe"); for(var i=0,length=topicToolbars.length;i0?responseData:null,messageID);}}}} if(gRuntimeFileType=="Topic"){ if(FMCIsDotNetHelp()||FMCIsHtmlHelp()){ window.name="body";} var gInit=false; gOnloadFuncs.push(FMCInit); if(FMCIsChromeLocal()){ window.addEventListener("message",Body_OnMessage,false);}}  function Default_WindowOnload(){ var framesForBridge=["body","navigation"]; for(var i=0;i-1)?true:false; var aLeft=(anchors.indexOf("Left")>-1)?true:false; var aBottom=(anchors.indexOf("Bottom")>-1)?true:false; var aRight=(anchors.indexOf("Right")>-1)?true:false; var aWidth=(anchors.indexOf("Width")>-1)?true:false; var aHeight=(anchors.indexOf("Height")>-1)?true:false;} if(aLeft&&aRight){ widthPx=screen.availWidth-(leftPx+rightPx);} else if(!aLeft&&aRight){ leftPx=screen.availWidth-(widthPx+rightPx);} else if(aWidth){ leftPx=(screen.availWidth/ 2)-(widthPx/ 2);} if(aTop&&aBottom){ heightPx=screen.availHeight-(topPx+bottomPx);} else if(!aTop&&aBottom){ topPx=screen.availHeight-(heightPx+bottomPx);} else if(aHeight){ topPx=(screen.availHeight/ 2)-(heightPx/ 2);} if(window==top){ try{ window.resizeTo(widthPx,heightPx); window.moveTo(leftPx,topPx);} catch(err){}}} function Default_LoadWebHelpOptions(xmlDoc){ var webHelpOptions=xmlDoc.getElementsByTagName("WebHelpOptions")[0]; if(webHelpOptions){ if(webHelpOptions.getAttribute("NavigationPanePosition")){ gNavPosition=webHelpOptions.getAttribute("NavigationPanePosition");} if(webHelpOptions.getAttribute("NavigationPaneWidth")){ var navWidth=webHelpOptions.getAttribute("NavigationPaneWidth"); if(navWidth!="0"){ var hideNavStartup=FMCGetAttributeBool(webHelpOptions,"HideNavigationOnStartup",false); if(!hideNavStartup){ if(gNavPosition=="Left"){ document.getElementsByTagName("frameset")[1].cols=navWidth+", *";} else if(gNavPosition=="Right"){ document.getElementsByTagName("frameset")[1].cols="*, "+navWidth;} else if(gNavPosition=="Top"){ var resizeBarHeight=7; document.getElementsByTagName("frameset")[0].rows=navWidth+", "+resizeBarHeight+", *";} else if(gNavPosition=="Bottom"){ document.getElementsByTagName("frameset")[0].rows="*, "+navWidth;}}}} gHideNavStartup=FMCGetAttributeBool(webHelpOptions,"HideNavigationOnStartup",false); if(gHideNavStartup){ Default_ShowHideNavigation(false);}} if(FMCIsSafari()){ var frameNodes=document.getElementsByTagName("frame"); for(var i=0;i=gNavigationWidth){ clearInterval(gIntervalID); for(var i=0,length=gChangeNavigationStateCompletedListeners.length;i=gNavigationWidth){ clearInterval(gIntervalID); for(var i=0,length=gChangeNavigationStateCompletedListeners.length;i0?responseData:null,messageID);}}}} if(gRuntimeFileType=="Default"){ var gInit=false; var gRootFolder=FMCGetRootFolder(document.location); var gStartTopic=gDefaultStartTopic; var gCSHID=null; var gLoadingLabel="LOADING"; var gLoadingAlternateText="Loading"; var gOuterFrameset=null; var gInnerFrameset=null; var gBodyFrameNode=null; var gNavigationWidth; var gCurrNavigationWidth; var gNavPosition="Left"; var gNavigationState="visible"; var gNavigationChangeStep=-30; var gSlide=true; var gChanging=false; var gChangeNavigationStateStartedListeners=new Array(); var gChangeNavigationStateCompletedListeners=new Array(); var gChangingNavigationStateListeners=new Array(); var gChangeNavigationStateStartedMessageListeners=new Array(); var gChangeNavigationStateCompletedMessageListeners=new Array(); var gChangingNavigationStateMessageListeners=new Array(); var gHideNavStartup=false; if(FMCIsWebHelpAIR()){ gOnloadFuncs.push(Default_WindowOnload);} window.onresize=function(){ var indexFrame=frames["navigation"].frames["index"]; if(indexFrame){ FMCPostMessageRequest(indexFrame,"refresh-index",null,null,function(){ indexFrame.RefreshIndex();});}}; CheckCSH(); gReadyFuncs.push( function(){ var framesetNodes=document.getElementsByTagName("frameset"); gOuterFrameset=framesetNodes[0]; gInnerFrameset=framesetNodes[1]; var frameNodes=document.getElementsByTagName("frame"); for(var i=0;i");} catch(ex){ iframe=document.createElement("iframe"); iframe.onload=FMCIFrameOnload;} var name="MCPopup_"+(gPopupNumber++); node.setAttribute("MadCap:iframeName",name); iframe.name=name; iframe.id=name; iframe.className="MCPopupBody"; iframe.setAttribute("title","Popup"); iframe.setAttribute("scrolling","auto"); iframe.setAttribute("frameBorder","0"); var width=FMCGetAttribute(node,"MadCap:width"); if(width!=null){ iframe.setAttribute("MadCap:width",width);} var height=FMCGetAttribute(node,"MadCap:height"); if(height!=null){ iframe.setAttribute("MadCap:height",height);} document.body.appendChild(iframe); iframe.src=path;} iframe.style.display="none"; gJustPopped=true; iframe.MCClientX=e.clientX+FMCGetScrollLeft(window); iframe.MCClientY=e.clientY+FMCGetScrollTop(window); if(iframeExists){ FMCShowIFrame(iframe);}} function FMCIFrameOnload(e){ if(FMCIsChromeLocal()){ try{ if(this.contentWindow.document.location.href=="about:blank"){ return;}} catch(ex){}} else{ if(this.contentWindow.document.location.href=="about:blank"){ return;}} if(FMCGetAttributeBool(this,"MadCap:loaded",false)){ return;} FMCShowIFrame(this); this.setAttribute("MadCap:loaded","true");} function FMCIFrameOnloadInline(popupBody){ if(FMCGetAttributeBool(popupBody,"MadCap:loaded",false)){ return;} FMCShowIFrame(popupBody); popupBody.setAttribute("MadCap:loaded","true");} function FMCShowIFrame(popupBody){ try{ if(popupBody.contentWindow.document.location.href=="about:blank"){ return;}} catch(ex){} popupBody.style.display=""; FMCSetPopupSize(popupBody); var clientX=popupBody.MCClientX; var clientY=popupBody.MCClientY; var newXY=FMCGetInBounds(popupBody,clientX,clientY); popupBody.style.left=newXY.X+"px"; popupBody.style.top=newXY.Y+"px"; var popupBodyBG=document.createElement("span"); popupBodyBG.className="MCPopupBodyBG"; popupBodyBG.style.top=newXY.Y+5+"px"; popupBodyBG.style.left=newXY.X+5+"px"; popupBodyBG.style.width=parseInt(popupBody.offsetWidth)+"px"; popupBodyBG.style.height=parseInt(popupBody.offsetHeight)+"px"; popupBody.parentNode.appendChild(popupBodyBG); gPopupObj=popupBody; gPopupBGObj=popupBodyBG; FMCSetOpacity(gPopupObj,0); FMCSetOpacity(gPopupBGObj,0); gFadeID=setInterval(FMCFade,10);} function FMCGetInBounds(el,x,y){ var absolutePosition=FMCGetPosition(el.offsetParent); var absoluteTop=absolutePosition[0]; var absoluteLeft=absolutePosition[1]; var scrollTop=FMCGetScrollTop(window); var scrollLeft=FMCGetScrollLeft(window); var newTop=y; var newLeft=x; if(yscrollTop+FMCGetClientHeight(window,false)){ newTop=scrollTop+FMCGetClientHeight(window,false)-parseInt(el.style.height)-5;} newTop-=absoluteTop; if(newLeft+parseInt(el.style.width)+5>scrollLeft+FMCGetClientWidth(window,false)){ newLeft=scrollLeft+FMCGetClientWidth(window,false)-parseInt(el.style.width)-5;} newLeft-=absoluteLeft; return{X:newLeft,Y:newTop};} function FMCSetPopupSize(popupNode){ var popupWidth=FMCGetAttribute(popupNode,"MadCap:width"); var popupHeight=FMCGetAttribute(popupNode,"MadCap:height"); if((popupWidth!="auto"&&!String.IsNullOrEmpty(popupWidth))||(popupHeight!="auto"&&!String.IsNullOrEmpty(popupHeight))){ popupNode.style.width=popupWidth; popupNode.style.height=popupHeight; return;} var clientWidth=FMCGetClientWidth(window,false); var clientHeight=FMCGetClientHeight(window,false); var stepSize=10; var hwRatio=clientHeight/clientWidth; var popupFrame=frames[popupNode.name]; var maxX=clientWidth*0.618034; var i=0; if(FMCIsSafari()){ popupNode.style.width=maxX+"px"; popupNode.style.height=(maxX*hwRatio)+"px"; return;} try{ var popupDocument=popupFrame.document; FMCGetScrollHeight(popupFrame.window);} catch(err){ popupNode.style.width=maxX+"px"; popupNode.style.height=(maxX*hwRatio)+"px"; return;} while(true){ popupNode.style.width=maxX-(i*stepSize)+"px"; popupNode.style.height=(maxX-(i*stepSize))*hwRatio+"px"; if(FMCGetScrollHeight(popupFrame.window)>FMCGetClientHeight(popupFrame.window,false)|| FMCGetScrollWidth(popupFrame.window)>FMCGetClientWidth(popupFrame.window,false)){ popupNode.style.width=maxX-((i-1)*stepSize)+"px"; popupNode.style.height=(maxX-((i-1)*stepSize))*hwRatio+"px"; break;} i++;}} function FMCPopupThumbnail_Onclick(e,node){ if(gPopupObj){ return;} if(!e){ e=window.event;} var clientCenter=FMCGetClientCenter(window); var img=FMCPopupThumbnailShow(node,clientCenter[0],clientCenter[1]); var index=gDocumentOnclickFuncs.push(OnDocumentClick)-1; var justPopped=true; function OnDocumentClick(){ if(justPopped){ justPopped=false; return;} FMCRemoveOpacitySheet(window); img.parentNode.removeChild(img); gDocumentOnclickFuncs.splice(index,1);}} function FMCPopupThumbnail_Onmouseover(e,node){ if(gPopupObj){ return;} if(!e){ e=window.event;} var mouseX=FMCGetClientX(window,e); var mouseY=FMCGetClientY(window,e); var x=mouseX+FMCGetScrollLeft(window); var y=mouseY+FMCGetScrollTop(window); var img=FMCPopupThumbnailShow(node,x,y); img.onmouseout=Onmouseout; function Onmouseout(){ FMCRemoveOpacitySheet(window); img.parentNode.removeChild(img);}} function FMCPopupThumbnailShow(node,x,y){ var popupSrc=FMCGetAttribute(node,"MadCap:popupSrc"); var popupWidth=FMCGetAttribute(node,"MadCap:popupWidth"); var popupHeight=FMCGetAttribute(node,"MadCap:popupHeight"); var img=document.createElement("img"); img.className="MCPopupThumbnail_Popup"; img.setAttribute("src",popupSrc); img.style.width=popupWidth+"px"; img.style.height=popupHeight+"px"; var left=Math.max(5,x-(popupWidth/2)); var top=Math.max(5,y-(popupHeight/2)); document.body.appendChild(img); var newXY=FMCGetInBounds(img,left,top); img.style.left=newXY.X+"px"; img.style.top=newXY.Y+"px"; FMCInsertOpacitySheet(window,"#eeeeee"); MCFader.FadeIn(img,0,100,null,0,0,false); return img;} function GetHelpControlLinks(node,callbackFunc,callbackArgs){ var linkMap=new Array(); var inPreviewMode=FMCInPreviewMode(); if(!inPreviewMode){ if(!FMCIsStandaloneTopic()){ var masterHS=FMCGetHelpSystem(); if(masterHS.IsMerged()){ if(FMCGetMCAttribute(node,"MadCap:indexKeywords")!=null){ var indexKeywords=FMCGetMCAttribute(node,"MadCap:indexKeywords").replace("\\;","%%%%%"); if(indexKeywords==""){ callbackFunc(linkMap,callbackArgs);} var indexFrame=MCGlobals.RootFrame.frames["navigation"].frames["index"]; FMCPostMessageRequest(indexFrame,"get-keyword-links",[indexKeywords],function(data){ callbackFunc(data,callbackArgs);},function(){ function OnInit(){ var keywords=indexKeywords.split(";"); for(var i=0;ipopupNode.offsetHeight-2||popupNode.scrollWidth>popupNode.offsetWidth-2){ popupNode.style.overflow="hidden"; popupNode.style.width=maxX-((i-1)*stepSize)+"px"; popupNode.style.height=(maxX-((i-1)*stepSize))*hwRatio+"px"; break;} i++;}} function FMCToggler(node){ if(gPopupObj){ return;} var imgNodes=node.getElementsByTagName("img"); for(var i=0;iclientHeight){ klinkBody.style.height=(clientHeight-5-2)+"px";} if(klinkBody.offsetWidth+5>clientWidth){ klinkBody.style.width=(clientWidth-5-2)+"px";} var clientX=0; var clientY=0; var pageX=0; var pageY=0; if(node.MCKeydown){ if(node.parentNode.style.position=="absolute"){ topOffset=document.getElementById("searchField").offsetHeight; clientX=node.parentNode.offsetLeft-node.parentNode.parentNode.parentNode.scrollLeft; clientY=node.parentNode.offsetTop-node.parentNode.parentNode.parentNode.scrollTop+topOffset; pageX=node.parentNode.offsetLeft-node.parentNode.parentNode.parentNode.scrollLeft; pageY=node.parentNode.offsetTop-node.parentNode.parentNode.parentNode.scrollTop+topOffset;} else{ clientX=node.offsetLeft-FMCGetScrollLeft(window); clientY=node.offsetTop-FMCGetScrollTop(window); pageX=node.offsetLeft; pageY=node.offsetTop;}} else{ clientX=args.clientX; clientY=args.clientY; pageX=args.pageX; pageY=args.pageY;} if(clientY+klinkBody.offsetHeight+5>FMCGetClientHeight(window,false)){ klinkBody.style.top=FMCGetScrollTop(window)+clientHeight-klinkBody.offsetHeight-5+"px";} else{ klinkBody.style.top=pageY+"px";} if(clientX+klinkBody.offsetWidth+5>FMCGetClientWidth(window,false)){ klinkBody.style.left=FMCGetScrollLeft(window)+clientWidth-klinkBody.offsetWidth-5+"px";} else{ klinkBody.style.left=pageX+"px";} if(node.MCKeydown){ klinkBody.getElementsByTagName("a")[0].focus(); node.MCKeydown=false;} var klinkBodyBG=document.createElement("span"); klinkBodyBG.className="MCKLinkBodyBG"; klinkBodyBG.style.top=parseInt(klinkBody.style.top)+5+"px"; klinkBodyBG.style.left=parseInt(klinkBody.style.left)+5+"px"; klinkBodyBG.style.width=klinkBody.offsetWidth+"px"; klinkBodyBG.style.height=klinkBody.offsetHeight+"px"; klinkBody.parentNode.appendChild(klinkBodyBG); closeImg.MCHelpControl=klinkBody; closeImg.MCHelpControlBG=klinkBodyBG; MCFader.FadeIn(klinkBody,0,100,klinkBodyBG,0,50,true);} function FMCOnHelpControlCloseImageKeyup(e){ e=e||window.event; if(e.keyCode==13){ this.MCHelpControl.parentNode.removeChild(this.MCHelpControl); this.MCHelpControlBG.parentNode.removeChild(this.MCHelpControlBG);}} function FMCKLinkBodyOnkeyup(e){ if(!e){e=window.event;} if(e.keyCode==27){ FMCClickHandler(e); this.MCOwner.focus();}}  function Favorites_WindowOnload(){ if(MCGlobals.NavigationFrame!=null){ Favorites_WaitForPaneActive();} else{ Favorites_Init(null);}} function Favorites_WaitForPaneActive(){ function OnGetActivePane(activePane){ if(activePane==window.name){ Favorites_Init(null);} else{ window.setTimeout(Favorites_WaitForPaneActive,WAIT_FOR_PANE_ACTIVE_INTERVAL);}} FMCPostMessageRequest(MCGlobals.NavigationFrame,"gActivePane",null,function(data){ var activePane=data[0]; OnGetActivePane(activePane);},function(){ OnGetActivePane(MCGlobals.NavigationFrame.gActivePane);});} function Favorites_Init(OnCompleteFunc){ if(gInit){ if(OnCompleteFunc){ OnCompleteFunc();} return;} var loadingLabel=CMCFlareStylesheet.LookupValue("Control","Messages","Loading","LOADING"); var loadingAlternateText=CMCFlareStylesheet.LookupValue("Control","Messages","LoadingAlternateText","Loading"); StartLoading(window,document.body,loadingLabel,loadingAlternateText,null); window.setTimeout(Init2,0); function Init2(){ Favorites_LoadSkin(function(){ Favorites_LoadStyles(); if(gDeleteSearchFavoritesIcon==null){gDeleteSearchFavoritesIcon=MCGlobals.RootFolder+MCGlobals.SkinTemplateFolder+"Images/Delete.gif";} if(gDeleteSearchFavoritesOverIcon==null){gDeleteSearchFavoritesOverIcon=MCGlobals.RootFolder+MCGlobals.SkinTemplateFolder+"Images/Delete_over.gif";} if(gDeleteSearchFavoritesSelectedIcon==null){gDeleteSearchFavoritesSelectedIcon=MCGlobals.RootFolder+MCGlobals.SkinTemplateFolder+"Images/Delete_selected.gif";} if(gDeleteTopicFavoritesIcon==null){gDeleteTopicFavoritesIcon=MCGlobals.RootFolder+MCGlobals.SkinTemplateFolder+"Images/Delete.gif";} if(gDeleteTopicFavoritesOverIcon==null){gDeleteTopicFavoritesOverIcon=MCGlobals.RootFolder+MCGlobals.SkinTemplateFolder+"Images/Delete_over.gif";} if(gDeleteTopicFavoritesSelectedIcon==null){gDeleteTopicFavoritesSelectedIcon=MCGlobals.RootFolder+MCGlobals.SkinTemplateFolder+"Images/Delete_selected.gif";} FMCLoadSearchFavorites(); document.body.insertBefore(document.createElement("br"),document.getElementById("searchFavorites").nextSibling); FMCLoadTopicsFavorites(); gInit=true; EndLoading(window,null); if(OnCompleteFunc){ OnCompleteFunc();}});}} function Favorites_LoadSkin(OnCompleteFunc){ CMCXmlParser.GetXmlDoc(MCGlobals.RootFolder+MCGlobals.SkinFolder+"Skin.xml",true,function(xmlDoc){ var xmlHead=xmlDoc.documentElement; var tabsAttribute=xmlHead.getAttribute("Tabs"); if(tabsAttribute.indexOf("Favorites")==-1){ gFavoritesEnabled=false;} OnCompleteFunc();});} function Favorites_LoadStyles(){ var label=CMCFlareStylesheet.LookupValue("AccordionItem","Favorites","Label",null); if(label!=null){ document.title=label;} var backgroundColor=CMCFlareStylesheet.LookupValue("Frame","AccordionFavorites","BackgroundColor",null); if(backgroundColor!=null){ document.body.style.backgroundColor=backgroundColor;} var props=CMCFlareStylesheet.LookupProperties("Control","EmptySearchFavoritesLabel"); for(var i=0,length=props.length;i0){ gTabIndex=1+((trs.length-1)*2)+1;} else{ gTabIndex=2;} var trs=topicTable.getElementsByTagName("tr"); if(trs[1].getElementsByTagName("td").length==1){ return;} for(var i=1;i0?responseData:null,messageID);}}}} if(gRuntimeFileType=="Favorites"){ var gInit=false; var gSearchFavoritesLabel="Favorite Searches"; var gSearchFavoritesLabelStyleMap=new CMCDictionary(); var gEmptySearchFavoritesLabel="(there are no saved searches)"; var gEmptySearchFavoritesTooltip="No search favorites"; var gEmptySearchFavoritesStyleMap=new CMCDictionary(); var gTopicFavoritesLabel="Favorite Topics"; var gTopicFavoritesLabelStyleMap=new CMCDictionary(); var gEmptyTopicFavoritesLabel="(there are no saved topics)"; var gEmptyTopicFavoritesTooltip="No topic favorites"; var gEmptyTopicFavoritesStyleMap=new CMCDictionary(); var gDeleteSearchFavoritesTooltip="Delete selected favorite searches"; var gDeleteSearchFavoritesIcon=null; var gDeleteSearchFavoritesOverIcon=null; var gDeleteSearchFavoritesSelectedIcon=null; var gDeleteSearchFavoritesIconWidth=23; var gDeleteSearchFavoritesIconHeight=22; var gDeleteTopicFavoritesTooltip="Delete selected favorite topics"; var gDeleteTopicFavoritesIcon=null; var gDeleteTopicFavoritesOverIcon=null; var gDeleteTopicFavoritesSelectedIcon=null; var gDeleteTopicFavoritesIconWidth=23; var gDeleteTopicFavoritesIconHeight=22; gEmptySearchFavoritesStyleMap.Add("color","#999999"); gEmptySearchFavoritesStyleMap.Add("fontSize","10px"); gEmptyTopicFavoritesStyleMap.Add("color","#999999"); gEmptyTopicFavoritesStyleMap.Add("fontSize","10px"); gOnloadFuncs.push(Favorites_WindowOnload); if(FMCIsChromeLocal()){ window.addEventListener("message",Favorites_OnMessage,false);}}  function Glossary_Init(){ if(gInit){ return;} var label=CMCFlareStylesheet.LookupValue("AccordionItem","Glossary","Label",null); if(label!=null){ document.title=label;} var backgroundColor=CMCFlareStylesheet.LookupValue("Frame","AccordionGlossary","BackgroundColor",null); if(backgroundColor!=null){ document.body.style.backgroundColor=backgroundColor;} var masterHS=FMCGetHelpSystem(); masterHS.LoadGlossary(LoadGlossaryOnComplete,null); gInit=true;} function LoadGlossaryOnComplete(xmlDoc,args){ if(xmlDoc==null){ return;} var glossaryDoc=MCGlobals.NavigationFrame.frames["glossary"].document; var body1=glossaryDoc.getElementsByTagName("body")[0]; if(window.ActiveXObject){ var body2=xmlDoc.getElementsByTagName("body")[0]; if(body2==null){ return;} body1.innerHTML=body2.xml;} else if(window.XMLSerializer){ var document1=glossaryDoc; var serializer=new XMLSerializer(); var xmlAsString=serializer.serializeToString(xmlDoc); body1.innerHTML=xmlAsString;} var masterHS=FMCGetHelpSystem(); if(document.body.currentStyle&&masterHS.IsMerged()){ setTimeout(SetGlossaryIFrameWidth,50);}} function SetGlossaryIFrameWidth(){ parent.document.getElementById("glossary").style.width="100%";} function DropDownTerm(anchorName){ var anchors=document.getElementsByTagName("a"); for(var i=0;i=1;i--){ var currNode=node.childNodes[i]; var prevNode=currNode.previousSibling; if(currNode.nodeType==3&&prevNode.nodeType==3){ prevNode.nodeValue=prevNode.nodeValue+currNode.nodeValue; node.removeChild(currNode);}} for(var i=0;i=0;i--){ var node=root.childNodes[i]; FMCApplyHighlight(win,node,term,color,caseSensitive,searchType); if(node.nodeType!=3||node.parentNode.nodeName=="SCRIPT"){ continue;} var currNode=node; var text=currNode.nodeValue; for(var match=re.exec(text);match!=null;match=re.exec(text)){ var pos=match.index+(searchType=="NGram"?0:match[1].length); var posEnd=pos+term.length; var span=win.document.createElement("span"); span.className="highlight"; span.style.fontWeight="bold"; span.style.backgroundColor=color.split(",")[0]; span.style.color=color.split(",")[1]; var span2=win.document.createElement("span"); span2.className="SearchHighlight"+(gColorIndex+1); span2.appendChild(win.document.createTextNode(text.substring(pos,posEnd))); span.appendChild(span2); currNode.nodeValue=text.substring(0,pos); currNode.parentNode.insertBefore(span,currNode.nextSibling); currNode.parentNode.insertBefore(win.document.createTextNode(text.substring(posEnd,text.length)),span.nextSibling); currNode=currNode.nextSibling.nextSibling; text=currNode.nodeValue; if(gFirstHighlight==null||span.offsetTopwin.document.documentElement.clientHeight){ win.document.documentElement.scrollTop=gFirstHighlight.offsetTop;}} function FMCHighlightUrl(win){ gColorIndex=0; gFirstHighlight=null; var url=win.document.location.search; if(String.IsNullOrEmpty(url)){ return;} url=decodeURIComponent(url); var pos=url.indexOf("SearchType"); var ampPos=-1; var searchType=null; if(pos>=0){ ampPos=url.indexOf("&",pos); searchType=url.substring(1+pos+"SearchType".length,ampPos>=0?ampPos:url.length);} pos=url.indexOf("Highlight"); if(pos>=0){ ampPos=url.indexOf("&",pos); var highlight=url.substring(1+pos+"Highlight".length,ampPos>=0?ampPos:url.length); var stems=highlight.split("||"); for(var i=0;i=start&&itemletter){ OnCompleteFunc(); return;} LoadChunk(chunk,OnLoadChunk);} var item=gAlphaMap.GetItem(letter); var chunk=FindChunk(item); LoadChunk(chunk,OnLoadChunk);} function CMCIndexEntry(indexEntry,level){ var indexLinks=FMCGetChildNodeByTagName(indexEntry,"Links",0).childNodes; var numNodes=indexLinks.length; var nodeCount=0; this.Term=FMCGetAttribute(indexEntry,"Term"); this.IndexLinks=new Array(); this.Level=level; this.GeneratedReferenceType=FMCGetAttribute(indexEntry,"GeneratedReferenceType"); for(var i=0;i1){ a=GenerateKLink(a,indexLinks);} div.appendChild(a);} function IndexEntryOnmouseover(){ this.style.color="#aa2222";} function IndexEntryOnmouseout(){ var color=gStylesMap.GetItem("color"); this.style.color=color?color:"#0055ff";} function IndexEntryOnclick(){ var indexEntry=this.MCIndexEntry; if(indexEntry.GeneratedReferenceType!=null){ var textParts=indexEntry.Term.split(","); SelectIndexEntry(textParts,function(indexEntryIndex){ var item=indexEntryIndex; document.getElementById("CatapultIndex").parentNode.scrollTop=item*gEntryHeight; RefreshIndex(function(){ var indexDiv=gIndexDivs[indexEntryIndex]; HighlightEntry(indexDiv);});});} else{ HighlightEntry(this.parentNode);}} function SetLinkMap(term,indexLinks){ var linkMap=new CMCDictionary(); for(var i=0;i0){ topics+="||";} var indexLink=indexLinks[i]; var link=indexLink.Link; link=(link.charAt(0)=="/")?".."+link:link; topics+=indexLink.Title+"|"+link;} a.href="javascript:void( 0 );"; a.className="MCKLink"; a.setAttribute("MadCap:topics",topics); a.onclick=KLinkOnclick; a.onkeydown=KLinkOnkeydown; return a;} function KLinkOnclick(e){ HighlightEntry(this.parentNode); FMCLinkControl(e,this,gKLinkStylesMap); return false;} function KLinkOnkeydown(){ this.MCKeydown=true;} function Index_Init(OnCompleteFunc){ if(gInit){ if(OnCompleteFunc){ OnCompleteFunc();} return;} document.getElementById("searchField").focus(); var loadingLabel=CMCFlareStylesheet.LookupValue("Control","Messages","Loading","LOADING"); var loadingAlternateText=CMCFlareStylesheet.LookupValue("Control","Messages","LoadingAlternateText","Loading"); StartLoading(window,document.body,loadingLabel,loadingAlternateText,null); window.setTimeout(Init2,0); function Init2(){ Index_LoadStyles(); function GetIndexOnComplete(xmlDoc,args){ gXMLDoc=xmlDoc; CreateIndex(gXMLDoc); RefreshIndex(function(){ gInit=true; EndLoading(window,null); if(OnCompleteFunc){ OnCompleteFunc();}});} FMCGetHelpSystem().GetIndex(GetIndexOnComplete,null);}} function Index_LoadStyles(){ var label=CMCFlareStylesheet.LookupValue("AccordionItem","Index","Label",null); if(label!=null){ document.title=label;} var backgroundColor=CMCFlareStylesheet.LookupValue("Frame","AccordionIndex","BackgroundColor",null); if(backgroundColor!=null){ document.body.style.backgroundColor=backgroundColor;} var props=CMCFlareStylesheet.LookupProperties("IndexEntry",null); for(var i=0,length=props.length;igIndexEntries[indexEntryIndex].Level){ continue;} else if(currIndexEntry.Leveltext){ newIndexEntryIndex=lastIndexEntryIndex; for(var subText=text.substring(0,text.length-1);subText!="";subText=subText.substring(0,subText.length-1)){ if(term.substring(0,subText.length)==subText){ newIndexEntryIndex=i;}} break;} else{ lastIndexEntryIndex=i;}}}while(false) if(partIndex+1gIndexEntries[newIndexEntryIndex].Level){ FindIndexEntry(textParts,partIndex+1,nextIndexEntryIndex,function(subIndexEntryIndex){ if(subIndexEntryIndex!=-1){ newIndexEntryIndex=subIndexEntryIndex;} OnCompleteFunc(newIndexEntryIndex);}); return;}} OnCompleteFunc(newIndexEntryIndex);} function Index_OnMessage(e){ var parts=e.data.split(gMessageSeparator); var messageType=parts[0]; var message=parts[1]; var messageData=parts[2]; var messageID=parts[3]; var dataValues=null; if(!String.IsNullOrEmpty(messageData)){ dataValues=messageData.split(gDataSeparator); for(var i=0,length=dataValues.length;i0?responseData:null,messageID);}); handled=true; needsCallbackFired=false;} else if(message=="refresh-index"){ RefreshIndex(function(){ FMCPostMessageResponse(e.source,message,responseData.length>0?responseData:null,messageID);}); handled=true; needsCallbackFired=false;} else if(message=="get-keyword-links"){ var indexKeywords=dataValues[0]; Index_Init(function(){ var keywords=indexKeywords.split(";"); for(var i=0;i0?responseData:null,messageID);}); handled=true; needsCallbackFired=false;} if(handled){ if(needsCallbackFired){ FMCPostMessageResponse(e.source,message,responseData.length>0?responseData:null,messageID);}}}} if(gRuntimeFileType=="Index"){ var gInit=false; var gIndent=16; var gIndexEntryCount=0; var gIndexEntries=new Array(); var gIndexDivs=new Array(); var gLinkMap=new CMCDictionary(); var gXMLDoc=null; var gChunks=null; var gAlphaMap=new CMCDictionary(); var gSelectedItem=null; var gStylesMap=new CMCDictionary(); var gKLinkStylesMap=new CMCDictionary(); var gEntryHeight=15; var gSelectionColor=null; var gSelectionBackgroundColor="#cccccc"; var gSeeReferencePrefix="See"; var gSeeAlsoReferencePrefix="See also"; gOnloadFuncs.push(Index_WindowOnload); gReadyFuncs.push(function(){ document.getElementById("searchField").value="";}); if(FMCIsChromeLocal()){ window.addEventListener("message",Index_OnMessage,false);} var gDivCached=null; var gACached=null;} var gEmptyIcon=null; var gHalfFullIcon=null; var gFullIcon=null; var gIconWidth=16; var gTopicRatingIconsInit=false; function TopicRatingIconsInit(){ if(gTopicRatingIconsInit){ return;} var value=CMCFlareStylesheet.LookupValue("ToolbarItem","TopicRatings","EmptyIcon",null); if(value==null){ gEmptyIcon=MCGlobals.RootFolder+MCGlobals.SkinTemplateFolder+"Images/Rating0.gif"; gIconWidth=16;} else{ value=FMCStripCssUrl(value); value=decodeURIComponent(value); value=escape(value); gEmptyIcon=FMCGetSkinFolderAbsolute()+value;} value=CMCFlareStylesheet.LookupValue("ToolbarItem","TopicRatings","HalfFullIcon",null); if(value==null){ gHalfFullIcon=MCGlobals.RootFolder+MCGlobals.SkinTemplateFolder+"Images/RatingGold50.gif";} else{ value=FMCStripCssUrl(value); value=decodeURIComponent(value); value=escape(value); gHalfFullIcon=FMCGetSkinFolderAbsolute()+value;} value=CMCFlareStylesheet.LookupValue("ToolbarItem","TopicRatings","FullIcon",null); if(value==null){ gFullIcon=MCGlobals.RootFolder+MCGlobals.SkinTemplateFolder+"Images/RatingGold100.gif";} else{ value=FMCStripCssUrl(value); value=decodeURIComponent(value); value=escape(value); gFullIcon=FMCGetSkinFolderAbsolute()+value;} gTopicRatingIconsInit=true;} function FMCRatingIconsCalculateRating(e,iconContainer){ if(!e){e=window.event;} var x=FMCGetMouseXRelativeTo(window,e,iconContainer); var imgNodes=iconContainer.getElementsByTagName("img"); var numImgNodes=imgNodes.length; var iconWidth=gIconWidth; var numIcons=Math.ceil(x/iconWidth); numIcons=Math.max(numIcons,1); var rating=numIcons*100/numImgNodes; return rating;} function FMCRatingIconsOnmousemove(e,iconContainer){ TopicRatingIconsInit(); if(!e){e=window.event;} var rating=FMCRatingIconsCalculateRating(e,iconContainer); FMCDrawRatingIcons(rating,iconContainer);} function FMCClearRatingIcons(rating,iconContainer){ FMCDrawRatingIcons(rating,iconContainer);} function FMCDrawRatingIcons(rating,iconContainer){ TopicRatingIconsInit(); var imgNodes=iconContainer.getElementsByTagName("img"); var numImgNodes=imgNodes.length; var numIcons=Math.ceil(rating*numImgNodes/100); for(var i=0;iqsLimit){ var diff=qsChars-qsLimit; var data={ExceedAmount:diff}; var ex=new CMCFeedbackException(-1,"Query string limit exceeded.",data); throw ex;} script.id=scriptID; script.setAttribute("type","text/javascript"); script.setAttribute("src",src); head.appendChild(script); return scriptID;} this.RemoveScriptTag=function(scriptID){ function RemoveScriptTag2(){ var script=document.getElementById(scriptID); script.parentNode.removeChild(script);} window.setTimeout(RemoveScriptTag2,10);} this.LogTopic=function(topicID){ AddScriptTag("LogTopic","gServiceClient.LogTopicOnComplete",[["TopicID",topicID]]);} this.LogTopicOnComplete=function(scriptID){ this.RemoveScriptTag(scriptID);} this.LogTopic2=function(topicID,cshID,onCompleteFunc,onCompleteArgs,thisObj){ this.LogTopic2OnComplete=function(scriptID){ if(onCompleteFunc!=null){ if(thisObj!=null){ onCompleteFunc.call(thisObj,onCompleteArgs);} else{ onCompleteFunc(onCompleteArgs);}} this.RemoveScriptTag(scriptID); this.LogTopic2OnComplete=null;} AddScriptTag("LogTopic2","gServiceClient.LogTopic2OnComplete",[["TopicID",topicID],["CSHID",cshID]]);} this.LogSearch=function(projectID,userGuid,resultCount,language,query){ AddScriptTag("LogSearch","gServiceClient.LogSearchOnComplete",[["ProjectID",projectID],["UserGuid",userGuid],["ResultCount",resultCount],["Language",language],["Query",query]]);} this.LogSearchOnComplete=function(scriptID){ this.RemoveScriptTag(scriptID);} this.AddComment=function(topicID,userGuid,userName,subject,comment,parentCommentID){ AddScriptTag("AddComment","gServiceClient.AddCommentOnComplete",[["TopicID",topicID],["UserGuid",userGuid],["Username",userName],["Subject",subject],["Comment",comment],["ParentCommentID",parentCommentID]]);} this.AddCommentOnComplete=function(scriptID){ this.RemoveScriptTag(scriptID);} this.GetAverageRating=function(topicID,onCompleteFunc,onCompleteArgs){ mGetAverageRatingOnCompleteFunc=onCompleteFunc; mGetAverageRatingOnCompleteArgs=onCompleteArgs; AddScriptTag("GetAverageRating","gServiceClient.GetAverageRatingOnComplete",[["TopicID",topicID]]);} this.GetAverageRatingOnComplete=function(scriptID,averageRating,ratingCount){ if(mGetAverageRatingOnCompleteFunc!=null){ mGetAverageRatingOnCompleteFunc(averageRating,ratingCount,mGetAverageRatingOnCompleteArgs); mGetAverageRatingOnCompleteFunc=null; mGetAverageRatingOnCompleteArgs=null;} this.RemoveScriptTag(scriptID);} this.SubmitRating=function(topicID,rating,comment,onCompleteFunc,onCompleteArgs){ var scriptID=AddScriptTag("SubmitRating","gServiceClient.SubmitRatingOnComplete",[["TopicID",topicID],["Rating",rating],["Comment",comment]]); var callbackData={OnCompleteFunc:onCompleteFunc,OnCompleteArgs:onCompleteArgs}; mCallbackMap.Add(scriptID,callbackData);} this.SubmitRatingOnComplete=function(scriptID){ var callbackData=mCallbackMap.GetItem(scriptID); var callbackFunc=callbackData.OnCompleteFunc; var callbackArgs=callbackData.OnCompleteArgs; if(callbackFunc!=null){ callbackFunc(callbackArgs); mCallbackMap.Remove(scriptID);} this.RemoveScriptTag(scriptID);} this.GetTopicComments=function(topicID,userGuid,userName,onCompleteFunc,onCompleteArgs){ var scriptID=AddScriptTag("GetTopicComments","gServiceClient.GetTopicCommentsOnComplete",[["TopicID",topicID],["UserGuid",userGuid],["Username",userName]]); var callbackData={OnCompleteFunc:onCompleteFunc,OnCompleteArgs:onCompleteArgs}; mCallbackMap.Add(scriptID,callbackData);} this.GetTopicCommentsOnComplete=function(scriptID,commentsXml){ var callbackData=mCallbackMap.GetItem(scriptID); var callbackFunc=callbackData.OnCompleteFunc; var callbackArgs=callbackData.OnCompleteArgs; if(callbackFunc!=null){ callbackFunc(commentsXml,callbackArgs); mCallbackMap.Remove(scriptID);} this.RemoveScriptTag(scriptID);} this.GetAnonymousEnabled=function(projectID,onCompleteFunc,onCompleteArgs){ mGetAnonymousEnabledOnCompleteFunc=onCompleteFunc; mGetAnonymousEnabledOnCompleteArgs=onCompleteArgs; var src=mLiveHelpService+"GetAnonymousEnabled?ProjectID="+encodeURIComponent(projectID); AddScriptTag("GetAnonymousEnabled","gServiceClient.GetAnonymousEnabledOnComplete",[["ProjectID",projectID]]);} this.GetAnonymousEnabledOnComplete=function(scriptID,enabled){ if(mGetAnonymousEnabledOnCompleteFunc!=null){ mGetAnonymousEnabledOnCompleteFunc(enabled,mGetAnonymousEnabledOnCompleteArgs); mGetAnonymousEnabledOnCompleteFunc=null; mGetAnonymousEnabledOnCompleteArgs=null;} this.RemoveScriptTag(scriptID);} this.StartActivateUser=function(xmlDoc,onCompleteFunc,onCompleteArgs){ mStartActivateUserOnCompleteFunc=onCompleteFunc; mStartActivateUserOnCompleteArgs=onCompleteArgs; var usernameNode=FMCGetChildNodeByAttribute(xmlDoc.documentElement,"Name","Username"); var username=FMCGetAttribute(usernameNode,"Value"); var emailAddressNode=FMCGetChildNodeByAttribute(xmlDoc.documentElement,"Name","EmailAddress"); var emailAddress=FMCGetAttribute(emailAddressNode,"Value"); var firstNameNode=FMCGetChildNodeByAttribute(xmlDoc.documentElement,"Name","FirstName"); var firstName=FMCGetAttribute(firstNameNode,"Value"); var lastNameNode=FMCGetChildNodeByAttribute(xmlDoc.documentElement,"Name","LastName"); var lastName=FMCGetAttribute(lastNameNode,"Value"); var countryNode=FMCGetChildNodeByAttribute(xmlDoc.documentElement,"Name","Country"); var country=FMCGetAttribute(countryNode,"Value"); var postalCodeNode=FMCGetChildNodeByAttribute(xmlDoc.documentElement,"Name","PostalCode"); var postalCode=FMCGetAttribute(postalCodeNode,"Value"); var genderNode=FMCGetChildNodeByAttribute(xmlDoc.documentElement,"Name","Gender"); var gender=FMCGetAttribute(genderNode,"Value"); var uiLanguageOrder=""; AddScriptTag("StartActivateUser","gServiceClient.StartActivateUserOnComplete",[["Username",username],["EmailAddress",emailAddress],["FirstName",firstName],["LastName",lastName],["Country",country],["Zip",postalCode],["Gender",gender],["UILanguageOrder",uiLanguageOrder]]);} this.StartActivateUserOnComplete=function(scriptID,pendingGuid){ if(mStartActivateUserOnCompleteFunc!=null){ mStartActivateUserOnCompleteFunc(pendingGuid,mStartActivateUserOnCompleteArgs); mStartActivateUserOnCompleteFunc=null; mStartActivateUserOnCompleteArgs=null;} this.RemoveScriptTag(scriptID);} this.StartActivateUser2=function(xmlDoc,onCompleteFunc,onCompleteArgs,thisObj){ var xml=CMCXmlParser.GetOuterXml(xmlDoc); this.StartActivateUser2OnComplete=function(scriptID,pendingGuid){ if(onCompleteFunc!=null){ if(thisObj!=null){ onCompleteFunc.call(thisObj,pendingGuid,onCompleteArgs);} else{ onCompleteFunc(pendingGuid,onCompleteArgs);}} this.RemoveScriptTag(scriptID); this.StartActivateUser2OnComplete=null;} AddScriptTag("StartActivateUser2","gServiceClient.StartActivateUser2OnComplete",[["Xml",xml]]);} this.UpdateUserProfile=function(guid,xmlDoc,onCompleteFunc,onCompleteArgs,thisObj){ var xml=CMCXmlParser.GetOuterXml(xmlDoc); this.UpdateUserProfileOnComplete=function(scriptID,pendingGuid){ if(onCompleteFunc!=null){ if(thisObj!=null){ onCompleteFunc.call(thisObj,pendingGuid,onCompleteArgs);} else{ onCompleteFunc(pendingGuid,onCompleteArgs);}} this.RemoveScriptTag(scriptID); this.UpdateUserProfileOnComplete=null;} AddScriptTag("UpdateUserProfile","gServiceClient.UpdateUserProfileOnComplete",[["Guid",guid],["Xml",xml]]);} this.CheckUserStatus=function(pendingGuid,onCompleteFunc,onCompleteArgs){ mCheckUserStatusOnCompleteFunc=onCompleteFunc; mCheckUserStatusOnCompleteArgs=onCompleteArgs; AddScriptTag("CheckUserStatus","gServiceClient.CheckUserStatusOnComplete",[["PendingGuid",pendingGuid]]);} this.CheckUserStatusOnComplete=function(scriptID,status){ if(mCheckUserStatusOnCompleteFunc!=null){ var func=mCheckUserStatusOnCompleteFunc; var args=mCheckUserStatusOnCompleteArgs; mCheckUserStatusOnCompleteFunc=null; mCheckUserStatusOnCompleteArgs=null; func(status,args);} this.RemoveScriptTag(scriptID);} this.GetSynonymsFile=function(projectID,updatedSince,onCompleteFunc,onCompleteArgs){ mGetSynonymsFileOnCompleteFunc=onCompleteFunc; mGetSynonymsFileOnCompleteArgs=onCompleteArgs; AddScriptTag("GetSynonymsFile","gServiceClient.GetSynonymsFileOnComplete",[["ProjectID",projectID],["UpdatedSince",updatedSince]]);} this.GetSynonymsFileOnComplete=function(scriptID,synonymsXml){ if(mGetSynonymsFileOnCompleteFunc!=null){ mGetSynonymsFileOnCompleteFunc(synonymsXml,mGetSynonymsFileOnCompleteArgs); mGetSynonymsFileOnCompleteFunc=null; mGetSynonymsFileOnCompleteArgs=null;} this.RemoveScriptTag(scriptID);} this.GetVersion=function(onCompleteFunc,onCompleteArgs,thisObj){ this.GetVersionOnComplete=function(scriptID,version){ if(version==null){ mVersion=1;} else{ mVersion=version;} if(onCompleteFunc!=null){ if(thisObj!=null){ onCompleteFunc.call(thisObj,mVersion,onCompleteArgs);} else{ onCompleteFunc(mVersion,onCompleteArgs);}} if(scriptID!=null){ this.RemoveScriptTag(scriptID);} this.GetVersionOnComplete=null;} if(mVersion==-1){ AddScriptTag("GetVersion","gServiceClient.GetVersionOnComplete");} else{ this.GetVersionOnComplete(null,mVersion);}}} function CMCFeedbackException(number,message,data){ CMCException.call(this,number,message); this.Data=data;} CMCFeedbackException.prototype=new CMCException(); CMCFeedbackException.prototype.constructor=CMCFeedbackException; CMCFeedbackException.prototype.base=CMCException.prototype;  function FMCOpenCommentDialog(reply,comment,parentCommentID){ CMCXmlParser.GetXmlDoc(MCGlobals.RootFolder+"Data/HelpSystem.xml",true,function(xmlDoc){ var projectID=xmlDoc.documentElement.getAttribute("LiveHelpOutputId"); gServiceClient.GetAnonymousEnabled(projectID,FMCGetAnonymousEnabledOnComplete,[reply,comment,parentCommentID]);},null);} function FMCGetAnonymousEnabledOnComplete(enabled,onCompleteArgs){ var reply=onCompleteArgs[0]; var comment=onCompleteArgs[1]; var parentCommentID=onCompleteArgs[2]; if(FMCIsHtmlHelp()){ onCompleteArgs.push(enabled); FMCRegisterCallback("Persistence",MCEventType.OnInit,function(args){ var reply=args[0]; var comment=args[1]; var parentCommentID=args[2]; var anonymousEnabled=args[3]; if(anonymousEnabled){ FMCRunCommentDialog(anonymousEnabled,reply,comment,parentCommentID);} else{ var userGuid=FMCLoadUserData("LiveHelpUserGuid"); if(userGuid==null){ gServiceClient.GetVersion(function(version){ var dlg=new CMCRegisterUserDialog(window,CMCRegisterUserDialog.DialogMode.NewUserProfile,version); dlg.Run(FMCRegisterUserDialogOnClose,args);},null,null);} else{ FMCRunCommentDialog(anonymousEnabled,reply,comment,parentCommentID);}}}, onCompleteArgs); return;} if(!enabled){ var userGuid=FMCReadCookie("LiveHelpUserGuid"); if(userGuid==null){ gServiceClient.GetVersion(function(version){ var dlg=new CMCRegisterUserDialog(window,CMCRegisterUserDialog.DialogMode.NewUserProfile,version); dlg.Run(FMCRegisterUserDialogOnClose,onCompleteArgs);},null,null);} else{ FMCRunCommentDialog(enabled,reply,comment,parentCommentID);}} else{ FMCRunCommentDialog(enabled,reply,comment,parentCommentID);}} function FMCRegisterUserDialogOnClose(onCloseArgs){ var reply=onCloseArgs[0]; var comment=onCloseArgs[1]; var parentCommentID=onCloseArgs[2]; FMCRunCommentDialog(false,reply,comment,parentCommentID);} function FMCRunCommentDialog(anonymousEnabled,reply,comment,parentCommentID){ if(MCGlobals.BodyFrame.CMCDialog.DoesDialogExist()){ return;} var dlg=null; if(!reply){ dlg=new CMCAddCommentDialog(window,anonymousEnabled);} else{ dlg=new CMCReplyCommentDialog(window,anonymousEnabled,comment,parentCommentID);} dlg.Run(function(){ if(MCGlobals.BodyCommentsFrame!=null){ FMCPostMessageRequest(MCGlobals.BodyCommentsFrame,"refresh-comments",null,null,function(){ MCGlobals.BodyCommentsFrame.TopicComments_RefreshComments();});}},null);} function FMCGetRatingOnComplete(averageRating,ratingCount){ var avgRatingIcons=document.getElementById("MCAverageRatingIcons"); var ratingCountSpan=document.getElementById("MCRatingCount"); var textNode=ratingCountSpan.childNodes[0]; if(!textNode){ textNode=ratingCountSpan.appendChild(document.createTextNode(""));} textNode.nodeValue=" based on "+ratingCount+" ratings"; avgRatingIcons.title="Topic rating: "+averageRating+"%"; FMCDrawRatingIcons(averageRating,avgRatingIcons); var loadingImg=document.getElementById("MCLoadingImage"); loadingImg.parentNode.removeChild(loadingImg);} function FMCEditUserProfile(){ if(MCGlobals.BodyFrame.CMCDialog.DoesDialogExist()){ return;} CMCXmlParser.GetXmlDoc(MCGlobals.RootFolder+"Data/HelpSystem.xml",true,function(xmlDoc){ var projectID=xmlDoc.documentElement.getAttribute("LiveHelpOutputId"); gServiceClient.GetAnonymousEnabled(projectID,GetAnonymousEnabledOnComplete,null); function GetAnonymousEnabledOnComplete(enabled,onCompleteArgs){ if(FMCIsHtmlHelp()){ FMCRegisterCallback("Persistence",MCEventType.OnInit,PersistenceInitialized,null); return;} PersistenceInitialized(null); function PersistenceInitialized(args){ if(!enabled){ var userGuid=FMCLoadUserData("LiveHelpUserGuid"); gServiceClient.GetVersion(function(version){ if(userGuid==null){ var dlg=new CMCRegisterUserDialog(window,CMCRegisterUserDialog.DialogMode.NewUserProfile,version); dlg.Run(null,null);} else{ if(version==1){ alert("The Feedback Server you are connecting to does not support this feature."); return;} var dlg=new CMCRegisterUserDialog(window,CMCRegisterUserDialog.DialogMode.EditUserProfile,version); dlg.Run(null,null);}},null,null);}}}},null);} if(gRuntimeFileType=="Topic"){}  function LiveHelpToolbar_Init(){ gRatingSubmittedMessage=CMCFlareStylesheet.LookupValue("ToolbarItem","TopicRatings","RatingSubmittedMessage",gRatingSubmittedMessage);} function UpdateRating(){ if(document.getElementById("RatingIcons")!=null){ gServiceClient.GetAverageRating(gTopicID,function(averageRating,ratingCount,onCompleteArgs){ SetRating(averageRating);},null);}} function SetRating(rating){ var iconContainer=document.getElementById("RatingIcons"); gTopicRating=rating; FMCDrawRatingIcons(gTopicRating,iconContainer);} function FMCTopicRatingIconsOnclick(e){ if(!e){e=window.event;} var rating=FMCRatingIconsCalculateRating(e,this); FMCSubmitRating(rating);} function FMCTopicRatingIconsOnmousemove(e){ if(!e){e=window.event;} FMCRatingIconsOnmousemove(e,this);} function FMCTopicRatingIconsOnkeyup(e){ if(!e){e=window.event;} if(e.keyCode!=13){ return;} var iconContainer=this; var target=e.srcElement||e.target; var imgNodes=iconContainer.getElementsByTagName("img"); var numImgNodes=imgNodes.length; var numIcons=FMCGetChildIndex(target)+1; var rating=numIcons*100/numImgNodes; FMCSubmitRating(rating);} function FMCSubmitRating(rating){ try{ gServiceClient.SubmitRating(gTopicID,rating,null,function(args){ UpdateRating(); alert(gRatingSubmittedMessage);},null);} catch(ex){ var message=this.CommentLengthExceeded.replace(/{n}/g,ex.Data.ExceedAmount); return;}} function FMCTopicClearRatingIcons(e){ if(!e){e=window.event;} FMCClearRatingIcons(gTopicRating,this);} if(gRuntimeFileType=="Toolbar"){ var gTopicRating=0;} if(gRuntimeFileType=="Toolbar"){ var gRatingSubmittedMessage="Thank you for submitting your rating!"; gOnloadFuncs.push(LiveHelpToolbar_Init);} function CalcVisibleItems(y){ var accordionTop=(gVisibleItems+1)*gcAccordionItemHeight; var itemOffset=(y-accordionTop>=0)?Math.floor((y-accordionTop)/gcAccordionItemHeight):Math.ceil((y-accordionTop)/gcAccordionItemHeight); gVisibleItems=Math.max(Math.min(gVisibleItems+itemOffset,gcMaxVisibleItems),0);} function RefreshAccordion(){ SetIFrameHeight(); for(var i=0;i=0;i--){ if(i>gVisibleItems-1){ continue;} var accordionItem=gAccordionItems[i]; currTop-=(accordionItem.style.height?parseInt(accordionItem.style.height):gcAccordionItemHeight); accordionItem.style.top=currTop+"px";} var accordionExpander=document.getElementById("AccordionExpander"); currTop-=parseInt(FMCGetComputedStyle(accordionExpander,"height")); accordionExpander.style.top=currTop+"px"; var navigationTop=document.getElementById("NavigationTop"); currTop-=parseInt(FMCGetComputedStyle(navigationTop,"height")); for(var i=0;i0?responseData:null,messageID);}}}} if(gRuntimeFileType=="Navigation"){ var gInit=false; var gVisibleItems=8; var gcMaxVisibleItems=8; var gcAccordionItemHeight=28; var gActivePane=null; var gActiveItem=null; var gActiveIcon=null; var gActiveIFrame=null; var gAccordionItems=new Array(); var gAccordionIcons=new Array(); var gIFrames=new Array(); var gcDefaultID=0; var gcDefaultTitle="Table of Contents"; window.onresize=function(){ var width=Math.max(FMCGetClientWidth(window,true),0); FMCPostMessageRequest(parent.frames["mctoolbar"],"navigation-resized",[width],function(){ SetIFrameHeight();},function(){ var accordionTitle=parent.frames["mctoolbar"].document.getElementById("AccordionTitle"); if(accordionTitle!=null){ accordionTitle.style.width=width+"px";} SetIFrameHeight();});}; gOnloadFuncs.push(Navigation_Init); if(FMCIsChromeLocal()){ window.addEventListener("message",Navigation_OnMessage,false);}} function CMCTokenizer(){ var mOriginalString=""; var mPos=-1; var mTokens=new Array(); this.Tokenize=function(str){ var token=null; mOriginalString=str; mPos=-1; for(var i=0;token=ReadNextToken();i++){ mTokens[i]=token;} return mTokens;} function IsNameChar(c){ if(!c){return false;} else if(c=="\""){return false;} else if(c=="+"){return false;} else if(c=="^"){return false;} else if(c=="|"){return false;} else if(c=="&"){return false;} else if(c=="("){return false;} else if(c==")"){return false;} else if(IsWhiteSpace(c)){return false;} else{return true;}} function IsWhiteSpace(c){ if(!c){ return false;} else if(c==" "){ return true;} else if(c.charCodeAt(0)==12288){ return true;} else{ return false;}} function Peek(){ return mOriginalString.charAt(mPos+1);} function Read(){ mPos++;} function ReadString(){ var str=""; for(;;){ var c=Peek(); if(!c){ return(str=="")?null:str;} if(c=="\\"){ Read(); if(!Peek()){ return null;} Read(); continue;} if(c=="\""){ Read(); break;} else{ Read(); str+=c;}} return str;} function ReadNextToken(){ var c=Peek(); var token=null; var tokenText=""; if(!c){ token=null;} else if(IsWhiteSpace(c)){ for(c=Peek();IsWhiteSpace(c);c=Peek()){ Read(); tokenText+=c;} token=new CMCToken(tokenText,CMCToken.WhiteSpace);} else if(c=="("){ Read(); token=new CMCToken(c,CMCToken.LeftParen);} else if(c==")"){ Read(); token=new CMCToken(c,CMCToken.RightParen);} else if(c=="^"){ Read(); token=new CMCToken(c,CMCToken.Subtract);} else if(c=="+"||c=="&"){ Read(); token=new CMCToken(c,CMCToken.And);} else if(c=="|"){ Read(); token=new CMCToken(c,CMCToken.Or);} else if(c=="!"){ Read(); token=new CMCToken(c,CMCToken.Not);} else if(c=="\""){ Read(); var str=ReadString(); token=new CMCToken(str,(str==null)?CMCToken.Error:CMCToken.Phrase);} else{ for(c=Peek();IsNameChar(c);c=Peek()){ Read(); tokenText+=c;} if(tokenText=="and"||tokenText=="AND"){ token=new CMCToken(tokenText,CMCToken.And);} else if(tokenText=="or"||tokenText=="OR"){ token=new CMCToken(tokenText,CMCToken.Or);} else if(tokenText=="not"||tokenText=="NOT"){ token=new CMCToken(tokenText,CMCToken.Not);} else{ var tokenType=CMCToken.Word; if(gSearchDBs[0].SearchType=="NGram"){ tokenType=CMCToken.Phrase;} token=new CMCToken(tokenText,tokenType);}} return token;}} function CMCToken(tokenText,type){ var mTokenText=tokenText; var mType=type; this.GetTokenText=function(){ return mTokenText;}; this.GetType=function(){ return mType;};} CMCToken.Eof=0; CMCToken.Error=1; CMCToken.WhiteSpace=2; CMCToken.Phrase=3; CMCToken.Word=4; CMCToken.RightParen=5; CMCToken.LeftParen=6; CMCToken.Not=7; CMCToken.Subtract=8; CMCToken.And=9; CMCToken.Or=10; CMCToken.ImplicitOr=11; function CMCParser(str){ var mSelf=this; var mSearchString=str; var mCurrentToken=-1; var mTokenizer=new CMCTokenizer(); var mSearchTokens=mTokenizer.Tokenize(mSearchString); this.GetStemMap=function(OnCompleteFunc){ function OnLoadChunkComplete(){ completed++; if(completed==length){ for(var i=0;i0&&stemk==0){ result.Ranking=result.Ranking+50;}} stemk++;} return true;}); OnCompleteFunc(resultSet);}} var completed=0; var length=0; var tokenText=mToken.GetTokenText(); var stems=new CMCDictionary(); var startStem=stemWord(tokenText); stems.Add(startStem,true); for(var j=0;jtitle2){ ret=1;}} return(ret*gCompareSet.SortOrder);} CMCQueryResultSet.prototype.FindAdjacentEntries=function(results,token,buildWordMap,buildPhraseMap){ var newResults=new CMCQueryResultSet(); var wordList=SplitPhrase(token.GetTokenText()); var wordListMap=new CMCDictionary(); for(var j=0;jvalue2){ ret=1;}} if(gSearchResultSet.SortOrder==EMCSortOrder.Ascending){ ret*=-1;} return ret;}; var EMCSortColumn=new function(){} EMCSortColumn.Rank=0; EMCSortColumn.RankPosition=1; EMCSortColumn.Title=2; var EMCSortOrder=new function(){} EMCSortOrder.Ascending=0; EMCSortOrder.Descending=1; function DoSearchWebHelpPlus(searchString,filterName,OnCompleteFunc){ function OnGetSearchResultsComplete(xmlDoc,args){ gSearchResultSet=new CMCSearchResultSet(); var results=xmlDoc.getElementsByTagName("Result"); var resultsLength=results.length; for(var i=0;i=0;i--){ var trEl=trEls[i]; if(trEl.id!="searchResultsHeadingRow"){ trEl.parentNode.removeChild(trEl);}} tbody=table.getElementsByTagName("tbody")[0]; trHeader=document.getElementById("searchResultsHeadingRow"); thRankCol=document.getElementById("searchResultsRankColumn"); thTitleCol=document.getElementById("searchResultsTitleColumn"); img=trHeader.getElementsByTagName("img")[0]; img.parentNode.removeChild(img);} else{ table=document.createElement("table"); table.id="searchResultsTable"; table.setAttribute("summary",gTableSummary); table.style.width=FMCGetClientWidth(window,false)-25+"px"; tbody=document.createElement("tbody"); trHeader=document.createElement("tr") thRankCol=document.createElement("th"); thTitleCol=document.createElement("th"); img=document.createElement("img"); trHeader.id="searchResultsHeadingRow"; thRankCol.id="searchResultsRankColumn"; thTitleCol.id="searchResultsTitleColumn"; thRankCol.className="columnHeading"; thTitleCol.className="columnHeading"; thRankCol.style.width="60px"; thTitleCol.style.width="auto"; thRankCol.tabIndex=gTabIndex++; thTitleCol.tabIndex=gTabIndex++; thRankCol.appendChild(document.createTextNode(gRankLabel)); thTitleCol.appendChild(document.createTextNode(gTitleLabel)); img.style.width="12px"; img.style.height="7px"; img.style.paddingLeft="10px"; thRankCol.onclick=THRankColOnclick; thTitleCol.onclick=THTitleColOnclick; thRankCol.onkeyup=THRankColOnkeyup; thTitleCol.onkeyup=THTitleColOnkeyup; thRankCol.onmouseover=ColOnmouseover; thTitleCol.onmouseover=ColOnmouseover; thRankCol.onmouseout=ColOnmouseout; thTitleCol.onmouseout=ColOnmouseout; thRankCol.onmousedown=ColOnmousedown; thTitleCol.onmousedown=ColOnmousedown; trHeader.appendChild(thRankCol); trHeader.appendChild(thTitleCol); tbody.appendChild(trHeader); table.appendChild(tbody); document.getElementById("SearchResults").appendChild(table);} if(searchResultSet.SortColumn==EMCSortColumn.RankPosition){ imgTarget=thRankCol;} else if(searchResultSet.SortColumn==EMCSortColumn.Title){ imgTarget=thTitleCol;} img.src=(searchResultSet.SortOrder==EMCSortOrder.Descending)?"Images/ArrowUp.gif":"Images/ArrowDown.gif"; img.alt=(searchResultSet.SortOrder==EMCSortOrder.Descending)?"Descending":"Ascending"; imgTarget.appendChild(img); FMCPostMessageRequest(MCGlobals.NavigationFrame,"set-iframe-height",null,OnSetIFrameHeightComplete,function(){ parent.SetIFrameHeight(); OnSetIFrameHeightComplete();});} function THRankColOnclick(){ ColOnclick(EMCSortColumn.RankPosition);} function THTitleColOnclick(){ ColOnclick(EMCSortColumn.Title);} function THRankColOnkeyup(e){ e=e||window.event; if(e.keyCode==13){ this.onclick();}} function THTitleColOnkeyup(e){ e=e||window.event; if(e.keyCode==13){ this.onclick();}} function ColOnclick(colName){ var masterHS=FMCGetHelpSystem(); if(!masterHS.IsWebHelpPlus){ Sort(colName,true); if(gFullSet){ GenerateResultsTable(gFilteredSet,false,function(){});}} else{ gSearchResultSet.Sort(colName); GenerateResultsTable(gSearchResultSet,true,function(){});}} function ColOnmouseover(){ this.style.backgroundImage=FMCCreateCssUrl("Images/SearchGradient_over.jpg");} function ColOnmouseout(){ this.style.backgroundImage=FMCCreateCssUrl("Images/SearchGradient.jpg");} function ColOnmousedown(){ this.style.backgroundImage=FMCCreateCssUrl("Images/SearchGradient_selected.jpg");} function ResultTROnmouseover(){ this.setAttribute("MadCap:altBackgroundColor",this.style.backgroundColor); this.style.backgroundColor="#dddddd";} function ResultTROnmouseout(){ var bgColor=FMCGetAttribute(this,"MadCap:altBackgroundColor","Transparent"); this.style.backgroundColor=bgColor;} function ResultTROnclick(){ parent.parent.frames["body"].location.href=FMCGetMCAttribute(this,"MadCap:href")+gHighlight;} function Search_ItemOnkeyup(e){ var target=null; if(!e){e=window.event;} if(e.srcElement){target=e.srcElement;} else if(e.target){target=e.target;} if(e.keyCode==13&&target&&target.onclick){ target.onclick();}} function CMCFilters(){ var mFilterMap=new CMCDictionary(); var mConceptMap=new CMCDictionary(); this.Load=function(OnCompleteFunc){ var masterHS=FMCGetHelpSystem(); if(masterHS.SearchFilterSetUrl==null){ OnCompleteFunc(); return;} CMCXmlParser.GetXmlDoc(masterHS.SearchFilterSetUrl,true,function(xmlDoc){ if(xmlDoc){ LoadFilters(xmlDoc); CMCXmlParser.GetXmlDoc(MCGlobals.RootFolder+"Data/Concepts.xml",true,function(xmlDoc){ LoadConcepts(xmlDoc); OnCompleteFunc();},null);}},null);}; this.ApplyFilter=function(filterName){ if(!gFullSet){ return null;} var filteredSet=new CMCQueryResultSet(); if(filterName==gUnfilteredLabel){ for(var i=0;i0?responseData:null,messageID);}}} if(gRuntimeFileType=="Search"){ var gInit=false; var gSearchDBs=new Array(); var gParser=null; var gFilters=null; var gFullSet=null; var gMergedSet=null; var gFilteredSet=null; var gHighlight=""; var gFavoritesEnabled=true; var gAddSearchLabel="Add search string to favorites"; var gAddSearchIcon="Images/AddSearchToFavorites.gif"; var gAddSearchOverIcon="Images/AddSearchToFavorites_over.gif"; var gAddSearchSelectedIcon="Images/AddSearchToFavorites_selected.gif"; var gAddSearchIconWidth=23; var gAddSearchIconHeight=22; var gFiltersLabel="Filters:"; var gFiltersLabelStyleMap=new CMCDictionary(); var gTableSummary="This table contains the results of the search that was performed. The first column indicates the search rank and the second column indicates the title of the topic that contains the search result."; var gRankLabel="Rank"; var gTitleLabel="Title"; var gUnfilteredLabel="(unfiltered)"; var gNoTopicsFoundLabel="No topics found"; var gInvalidTokenLabel="Invalid token."; var gDownloadedSynonymXmlDoc=null; gOnloadFuncs.push(Search_WindowOnload); gReadyFuncs.push(function(){ document.forms["search"].searchField.value="";}); if(FMCIsChromeLocal()){ window.addEventListener("message",Search_OnMessage,false);} var gOnSearchFinishedFunc=null; var gCallbackFuncArgs=null; var gSearchResultSet=null;} if(gRuntimeFileType=="Search"){ step2list=new Array(); step2list["ational"]="ate"; step2list["tional"]="tion"; step2list["enci"]="ence"; step2list["anci"]="ance"; step2list["izer"]="ize"; step2list["bli"]="ble"; step2list["alli"]="al"; step2list["entli"]="ent"; step2list["eli"]="e"; step2list["ousli"]="ous"; step2list["ization"]="ize"; step2list["ation"]="ate"; step2list["ator"]="ate"; step2list["alism"]="al"; step2list["iveness"]="ive"; step2list["fulness"]="ful"; step2list["ousness"]="ous"; step2list["aliti"]="al"; step2list["iviti"]="ive"; step2list["biliti"]="ble"; step2list["logi"]="log"; step3list=new Array(); step3list["icate"]="ic"; step3list["ative"]=""; step3list["alize"]="al"; step3list["iciti"]="ic"; step3list["ical"]="ic"; step3list["ful"]=""; step3list["ness"]=""; c="[^aeiou]"; v="[aeiouy]"; C=c+"[^aeiouy]*"; V=v+"[aeiou]*"; mgr0="^("+C+")?"+V+C; meq1="^("+C+")?"+V+C+"("+V+")?$"; mgr1="^("+C+")?"+V+C+V+C; s_v="^("+C+")?"+v; function stemWord(w){ w=w.toLowerCase(); var stem; var suffix; var firstch; var origword=w; if(w.length<3){return w.toLowerCase();} var re; var re2; var re3; var re4; firstch=w.substr(0,1); if(firstch=="y"){ w=firstch.toUpperCase()+w.substr(1);} re=/^(.+?)(ss|i)es$/; re2=/^(.+?)([^s])s$/; if(re.test(w)){w=w.replace(re,"$1$2");} else if(re2.test(w)){w=w.replace(re2,"$1$2");} re=/^(.+?)eed$/; re2=/^(.+?)(ed|ing)$/; if(re.test(w)){ var fp=re.exec(w); re=new RegExp(mgr0); if(re.test(fp[1])){ re=/.$/; w=w.replace(re,"");}}else if(re2.test(w)){ var fp=re2.exec(w); stem=fp[1]; re2=new RegExp(s_v); if(re2.test(stem)){ w=stem; re2=/(at|bl|iz)$/; re3=new RegExp("([^aeiouylsz])\\1$"); re4=new RegExp("^"+C+v+"[^aeiouwxy]$"); if(re2.test(w)){w=w+"e";} else if(re3.test(w)){re=/.$/;w=w.replace(re,"");} else if(re4.test(w)){w=w+"e";}}} re=/^(.+?)y$/; if(re.test(w)){ var fp=re.exec(w); stem=fp[1]; re=new RegExp(s_v); if(re.test(stem)){w=stem+"i";}} re=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; if(re.test(w)){ var fp=re.exec(w); stem=fp[1]; suffix=fp[2]; re=new RegExp(mgr0); if(re.test(stem)){ w=stem+step2list[suffix];}} re=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; if(re.test(w)){ var fp=re.exec(w); stem=fp[1]; suffix=fp[2]; re=new RegExp(mgr0); if(re.test(stem)){ w=stem+step3list[suffix];}} re=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; re2=/^(.+?)(s|t)(ion)$/; if(re.test(w)){ var fp=re.exec(w); stem=fp[1]; re=new RegExp(mgr1); if(re.test(stem)){ w=stem;}}else if(re2.test(w)){ var fp=re2.exec(w); stem=fp[1]+fp[2]; re2=new RegExp(mgr1); if(re2.test(stem)){ w=stem;}} re=/^(.+?)e$/; if(re.test(w)){ var fp=re.exec(w); stem=fp[1]; re=new RegExp(mgr1); re2=new RegExp(meq1); re3=new RegExp("^"+C+v+"[^aeiouwxy]$"); if(re.test(stem)||(re2.test(stem)&&!(re3.test(stem)))){ w=stem;}} re=/ll$/; re2=new RegExp(mgr1); if(re.test(w)&&re2.test(w)){ re=/.$/; w=w.replace(re,"");} if(firstch=="y"){ w=firstch.toLowerCase()+w.substr(1);} return w.toLowerCase();}} function Toc_WindowOnload(){ if(MCGlobals.NavigationFrame!=null){ Toc_WaitForPaneActive();} else{ Toc_Init(null);}} function Toc_WaitForPaneActive(){ function OnGetActivePane(activePane){ if(activePane==window.name){ Toc_Init(null);} else{ window.setTimeout(Toc_WaitForPaneActive,WAIT_FOR_PANE_ACTIVE_INTERVAL);}} FMCPostMessageRequest(MCGlobals.NavigationFrame,"gActivePane",null,function(data){ var activePane=data[0]; OnGetActivePane(activePane);},function(){ OnGetActivePane(MCGlobals.NavigationFrame.gActivePane);});} function SyncTOC(tocPath,href){ if(tocPath==null){ return;} GetTocNode(tocPath,href,OnComplete); function OnComplete(tocNode){ if(tocNode){ for(var currNode=tocNode.parentNode;currNode!=null&&currNode.id!="CatapultToc";currNode=currNode.parentNode){ if(FMCGetChildNodeByTagName(currNode,"DIV",0).style.display=="none"){ var aNode=FMCGetChildNodeByTagName(currNode,"A",0); TocExpand(aNode);} else{ break;}} SetSelection(FMCGetChildNodeByTagName(tocNode,"A",0)); FMCScrollToVisible(window,tocNode);}}} function GetTocNode(tocPath,href,onCompleteFunc){ Toc_Init(OnInit); function OnInit(){ gTocPath=tocPath; gTocHref=href; var tocNode=document.getElementById("CatapultToc").getElementsByTagName("div")[0]; var steps=(tocPath=="")?new Array(0):tocPath.split("|"); for(var i=0;tocNode&&i0||chunk||mergeHint); var bookIcon=null; var bookOpenIcon=null; var topicIcon=null; var markAsNew=null; var topicIconAlt="Topic"; var bookIconAlt="Closed Submenu"; var bookOpenIconAlt="Open Submenu"; var markAsNewIconAlt="New"; div.style.textIndent=indent+"px"; div.style.position="relative"; div.style.display="none"; div.setAttribute("MadCap:state","closed"); var entryClass=entry.getAttribute("Class"); var className="TocEntry_"+((entryClass==null)?"TocEntry":entryClass); var aCached=gClassToANodeMap.GetItem(className); var nameToValueMap=gStylesMap.GetItem(className); if(!aCached){ aCached=document.createElement("a"); if(nameToValueMap){ nameToValueMap.ForEach(function(key,value){ var style=ConvertToCSS(key); aCached.style[style]=value; return true;});} gClassToANodeMap.Add(className,aCached);} a=aCached.cloneNode(false); a.setAttribute("MadCap:className",className); a.onmouseover=TocEntryOnmouseover; a.onmouseout=TocEntryOnmouseout; if(nameToValueMap){ bookIcon=nameToValueMap.GetItem("BookIcon"); bookOpenIcon=nameToValueMap.GetItem("BookOpenIcon"); topicIcon=nameToValueMap.GetItem("TopicIcon"); var value=nameToValueMap.GetItem("TopicIconAlternateText"); if(value){topicIconAlt=value;} value=nameToValueMap.GetItem("BookIconAlternateText"); if(value){bookIconAlt=value;} value=nameToValueMap.GetItem("BookOpenIconAlternateText"); if(value){bookOpenIconAlt=value;} value=nameToValueMap.GetItem("MarkAsNewIconAlternateText"); if(value){markAsNewIconAlt=value;} var markAsNewValue=nameToValueMap.GetItem("MarkAsNew"); if(markAsNewValue){ markAsNew=FMCStringToBool(markAsNewValue);}} if(link&&!mergeHint){ if(link.charAt(0)=="/"){ link=fullPath+link.substring(1);} a.setAttribute("href",link); if(!frameName){ frameName="body";} a.setAttribute("MadCap:frameName",frameName);} else{ a.setAttribute("href","javascript:void( 0 );");} var ownerHelpSystem=GetOwnerHelpSystem(htmlNode); var subPath=null; if(mergeHint){ var subsystem=ownerHelpSystem.GetSubsystem(parseInt(mergeHint)); if(subsystem==null||!subsystem.GetExists()){ continue;} subPath=subsystem.GetPath(); var fileName=null; if(window.name=="toc"){ if(!subsystem.HasToc()){ continue;} fileName="Toc.xml";} else if(window.name=="browsesequences"){ if(!subsystem.HasBrowseSequences()){ continue;} fileName="BrowseSequences.xml";} chunk=subPath+"Data/"+fileName; a["MadCap:helpSystem"]=subsystem; var replaceMergeNode=FMCGetAttributeBool(entry,"ReplaceMergeNode",false); if(replaceMergeNode){ var args={div:div,a:a,htmlNode:htmlNode,subPath:subPath,previousNode:htmlNode.lastChild}; CMCXmlParser.GetXmlDoc(chunk,true,function(subTocDoc,args){ var div=args.div; var a=args.a; var htmlNode=args.htmlNode; var subPath=args.subPath; var previousNode=args.previousNode; var nextNode=previousNode.nextSibling; div.appendChild(a); htmlNode.insertBefore(div,nextNode); BuildToc(subTocDoc.documentElement,div,indent,subPath); var newDivs=FMCGetChildNodesByTagName(div,"DIV"); htmlNode.removeChild(div); for(var j=0;j0){ a.onclick=BookOnClick;} if(bookIcon=="none"){ img=null;} else{ var src="Images/Book.gif"; var width=16; var height=16; if(bookIcon){ bookIcon=FMCStripCssUrl(bookIcon); bookIcon=decodeURIComponent(bookIcon); src="../"+MCGlobals.SkinFolder+escape(bookIcon); width=CMCFlareStylesheet.GetResourceProperty(bookIcon,"Width",16); height=CMCFlareStylesheet.GetResourceProperty(bookIcon,"Height",16);} img.src=src; img.alt=bookIconAlt; img.setAttribute("MadCap:bookIconAltText",bookIconAlt); img.setAttribute("MadCap:bookOpenIconAltText",bookOpenIconAlt); if(!bookOpenIcon||bookOpenIcon=="none"){ img.setAttribute("MadCap:altsrc","Images/BookOpen.gif");} else{ bookOpenIcon=FMCStripCssUrl(bookOpenIcon); bookOpenIcon="../"+MCGlobals.SkinFolder+escape(bookOpenIcon); img.setAttribute("MadCap:altsrc",bookOpenIcon); FMCPreloadImage(bookOpenIcon);} img.style.width=width+"px"; img.style.height=height+"px"; img.style.verticalAlign="middle";}} else{ a.onclick=TopicOnClick; if(topicIcon=="none"){ img=null;} else{ var src="Images/Topic.gif"; var width=16; var height=16; if(topicIcon){ topicIcon=FMCStripCssUrl(topicIcon); topicIcon=decodeURIComponent(topicIcon); src="../"+MCGlobals.SkinFolder+escape(topicIcon); width=CMCFlareStylesheet.GetResourceProperty(topicIcon,"Width",16); height=CMCFlareStylesheet.GetResourceProperty(topicIcon,"Height",16);} img.src=src; img.alt=topicIconAlt; img.style.width=width+"px"; img.style.height=height+"px"; img.style.verticalAlign="middle";}} var markAsNewEntry=entry.getAttribute("MarkAsNew"); var markAsNewComputed=markAsNewEntry?FMCStringToBool(markAsNewEntry):markAsNew; if(markAsNewComputed){ var newImg=document.createElement("img"); newImg.src="Images/NewItemIndicator.bmp"; newImg.alt=markAsNewIconAlt; newImg.style.width="7px"; newImg.style.height="7px"; newImg.style.position="absolute"; a.appendChild(newImg);} img?a.appendChild(img):false; var text=document.createTextNode(title); a.appendChild(text); div.appendChild(a); htmlNode.appendChild(div); BuildToc(entry,div,indent+16,mergeHint?subPath:fullPath);}} function CacheStyles(OnCompleteFunc){ CMCXmlParser.GetXmlDoc(MCGlobals.RootFolder+MCGlobals.SkinFolder+"Stylesheet.xml",true,function(stylesDoc){ var styles=stylesDoc.getElementsByTagName("Style"); var tocEntryStyle=null; for(var i=0;i0){ var nameToValueMap=new CMCDictionary(); var props=properties[0].childNodes; for(var i=0;i0){ var nameToValueMap=new CMCDictionary(); var props=properties[0].childNodes; for(var j=0;j0){ var img=null; if(imgs.length==2) img=a.getElementsByTagName("img")[1]; else if(imgs.length==1) img=a.getElementsByTagName("img")[0]; FMCImageSwap(img,"swap"); img.setAttribute("alt",state=="open"?FMCGetAttribute(img,"MadCap:bookIconAltText"):FMCGetAttribute(img,"MadCap:bookOpenIconAltText"));} FMCScrollToVisible(window,div); div.setAttribute("MadCap:state",state=="open"?"closed":"open");} function TocEntryOnmouseover(){ this.style.color="#aa2222";} function TocEntryOnmouseout(){ var color="#0055ff"; var className=FMCGetMCAttribute(this,"MadCap:className"); var nameToValueMap=gStylesMap.GetItem(className); if(nameToValueMap){ var classColor=nameToValueMap.GetItem("Color"); if(classColor){ color=classColor;}} this.style.color=color;} function Toc_OnMessage(e){ var parts=e.data.split(gMessageSeparator); var messageType=parts[0]; var message=parts[1]; var messageData=parts[2]; var messageID=parts[3]; var dataValues=null; if(!String.IsNullOrEmpty(messageData)){ dataValues=messageData.split(gDataSeparator); for(var i=0,length=dataValues.length;i0?responseData:null,messageID);}}}} if(gRuntimeFileType=="Toc"||gRuntimeFileType=="BrowseSequences"){ var gInit=false; var gCurrSelection=null; var gStylesMap=new CMCDictionary(); var gClassToANodeMap=new CMCDictionary(); var gSyncTOC=false; var gTocPath=null; var gTocHref=null; gOnloadFuncs.push(Toc_WindowOnload); if(FMCIsChromeLocal()){ window.addEventListener("message",Toc_OnMessage,false);} var gInitializing=false; var gInitOnCompleteFuncs=new Array();} function Toolbar_Init(){ if(gInit){ return;} if(MCGlobals.InPreviewMode){ try{ var doc=parent.document;} catch(err){ return;}} document.body.tabIndex=gTabIndex++; if(MCGlobals.InPreviewMode){ MCGlobals.BodyFrame=parent;} Toolbar_LoadSkin(function(){ gInit=true;});} function Toolbar_LoadSkin(OnCompleteFunc){ FMCGetSkin(function(xmlDoc){ var buttons=null; var nodeName=gIsTopicToolbar?"TopicToolbar":"Toolbar"; var toolbarNode=xmlDoc.getElementsByTagName(nodeName)[0]; var tabs=xmlDoc.documentElement.getAttribute("Tabs").toLowerCase(); var tabsSplit=xmlDoc.documentElement.getAttribute("Tabs").split(","); var defaultTab=xmlDoc.documentElement.getAttribute("DefaultTab"); defaultTab=(xmlDoc.documentElement.getAttribute("Tabs").indexOf(defaultTab)==-1)?tabsSplit[0]:defaultTab; if(MCGlobals.NavigationFrame!=null){ if(!gIsTopicToolbar&&(toolbarNode==null||!FMCGetAttributeBool(toolbarNode,"ExcludeAccordionTitle",gIsTopicToolbar))){ var buttonsTD=document.getElementById("ToolbarButtons"); var accordionTitleTD=document.createElement("td"); var accordionTitleSpan=document.createElement("span"); accordionTitleSpan.appendChild(document.createTextNode(defaultTab)); accordionTitleTD.appendChild(accordionTitleSpan); buttonsTD.parentNode.insertBefore(accordionTitleTD,buttonsTD); accordionTitleSpan.id="AccordionTitleLabel"; accordionTitleTD.id="AccordionTitle";}} gAboutBoxEnabled=FMCGetAttributeBool(xmlDoc.documentElement,"EnableAboutBox",true); if(!MCGlobals.InPreviewMode){ var isWebHelpPlus=document.documentElement.getAttribute("TargetType")=="WebHelpPlus"&&document.location.protocol.StartsWith("http",false); var logoName=isWebHelpPlus?"LogoPlus.gif":FMCIsHtmlHelp()?"LogoHtmlHelp.gif":"Logo.gif"; gAboutBoxURL=document.location.href.substring(0,document.location.href.lastIndexOf("/"))+"/Images/"+logoName;} Toolbar_LoadWebHelpOptions(xmlDoc); FMCPreloadImage(gAboutBoxURL); FMCGetStylesheet(function(styleDoc){ function OnGetButtonsForToolbarProxyComplete(buttonList){ buttons=buttonList; if(toolbarNode){ var enableCustomLayout=FMCGetAttributeBool(toolbarNode,"EnableCustomLayout",false); if(enableCustomLayout){ if(buttons==null){ var buttonsAttribute=toolbarNode.getAttribute("Buttons"); if(buttonsAttribute){ buttons=buttonsAttribute.split("|");} else{ buttons=new Array(0);}}} var scriptNode=toolbarNode.getElementsByTagName("Script")[0]; if(scriptNode){ var scriptHtmlNode=document.createElement("script"); scriptHtmlNode.type="text/javascript"; scriptHtmlNode.src="../"+FMCGetSkinFolder()+nodeName+".js"; document.getElementsByTagName("head")[0].appendChild(scriptHtmlNode);}} if(buttons==null){ buttons=GetDefaultButtons();} var styles=styleDoc.getElementsByTagName("Style"); var toolbarStyleMap=new CMCDictionary(); for(var i=0;i=0){ var format=formatString.substring(i+1,endPos); if(format=="n"){ var topicIndexNode=document.createElement("span"); topicIndexNode.setAttribute("id","MCCurrentTopicIndex"); span.appendChild(topicIndexNode); var topicIndexTextNode=document.createTextNode(""); topicIndexNode.appendChild(topicIndexTextNode);} else if(format=="total"){ var topicTotalNode=document.createElement("span"); topicTotalNode.setAttribute("id","MCTopicTotal"); span.appendChild(topicTotalNode); var topicTotalTextNode=document.createTextNode(""); topicTotalNode.appendChild(topicTotalTextNode);} i=endPos;}} else{ currText+=c;}} var remainingTextNode=document.createTextNode(currText); span.appendChild(remainingTextNode); FMCRegisterCallback("Body",MCEventType.OnInit,OnBodyInitSetCurrentTopicIndex,null);} function OnBodyInitSetCurrentTopicIndex(){ var span=document.getElementById("MCCurrentTopicIndexContainer"); if(span==null){ return;} if(MCGlobals.InPreviewMode){ SetCurrentTopicIndexSequenceIndex(0); SetCurrentTopicIndexTotal(0); OnCompleteBoth();} else{ FMCPostMessageRequest(MCGlobals.BodyFrame,"get-bs-path",null,function(data){ var bsPath=data[0]; var href=new CMCUrl(data[1]); OnCompleteGetBSPath(bsPath,href);},function(){ var bsPath=MCGlobals.BodyFrame.CMCUrl.QueryMap.GetItem("BrowseSequencePath"); var href=FMCGetBodyHref(); if(bsPath==null){ bsPath=FMCGetMCAttribute(MCGlobals.BodyFrame.document.documentElement,"MadCap:browseSequencePath"); if(bsPath!=null){ var master=FMCGetHelpSystem(); var fullBsPath=master.GetFullTocPath("browsesequences",href.PlainPath); if(fullBsPath){ bsPath=bsPath?fullBsPath+"|"+bsPath:fullBsPath;}}} OnCompleteGetBSPath(bsPath,href);});} function OnCompleteGetBSPath(bsPath,href){ function OnCompleteGetEntrySequenceIndex(sequenceIndex){ if(sequenceIndex==-1){ span.style.display="none"; OnCompleteBoth(); return;} span.style.display=""; SetCurrentTopicIndexSequenceIndex(sequenceIndex); file.GetIndexTotalForEntry(bsPath,href,OnCompleteGetIndexTotalForEntry); function OnCompleteGetIndexTotalForEntry(total){ SetCurrentTopicIndexTotal(total); window.setTimeout(OnCompleteBoth,100);}} if(bsPath==null||bsPath==""||bsPath.StartsWith("$$$$$")){ OnCompleteGetEntrySequenceIndex(-1); return;} var master=FMCGetHelpSystem(); var file=master.GetBrowseSequenceFile(); file.GetEntrySequenceIndex(bsPath,href,OnCompleteGetEntrySequenceIndex);}} function OnCompleteBoth(){ var span=document.getElementById("MCCurrentTopicIndexContainer"); span.parentNode.style.width=span.offsetWidth+"px"; if(gIsTopicToolbar){ SetIFrameFixedWidth();}} function SetCurrentTopicIndexSequenceIndex(sequenceIndex){ var topicIndexNode=document.getElementById("MCCurrentTopicIndex"); if(topicIndexNode!=null){ topicIndexNode.firstChild.nodeValue=sequenceIndex.toString();}} function SetCurrentTopicIndexTotal(total){ var topicTotalNode=document.getElementById("MCTopicTotal"); if(topicTotalNode!=null){ topicTotalNode.firstChild.nodeValue=total.toString();}} function SetIFrameFixedWidth(){ var buttonsTD=document.getElementById("ToolbarButtons"); var tds=buttonsTD.getElementsByTagName("td"); var totalWidth=0; for(var i=0,length=tds.length;i0?responseData:null,messageID);}}}} if(gRuntimeFileType=="Toolbar"){ var gInit=false; var gIsTopicToolbar=window.name.StartsWith("mctoolbar_"); var gAboutBoxEnabled=true; var gAboutBoxURL=null; var gAboutBoxWidth=319; var gAboutBoxHeight=317; var gAboutBoxAlternateText="About"; var gHideNavStartup=false; var gTocTitle="Table of Contents"; var gIndexTitle="Index"; var gSearchTitle="Search"; var gGlossaryTitle="Glossary"; var gFavoritesTitle="Favorites"; var gBrowseSequencesTitle="Browse Sequences"; var gQuickSearchExternalLabel="Quick search is disabled in external topics."; var gQuickSearchIE55="Quick search is disabled in Internet Explorer 5.5."; var gRemoveHighlightIE55Label="Remove highlighting is disabled in Internet Explorer 5.5."; var gTopicID=null; var gChangeNavigationStateStartedEventID=null; var gChangeNavigationStateCompletedEventID=null; var gChangingNavigationStateEventID=null; var gNavPosition="Left"; gOnloadFuncs.push(Toolbar_Init); if(FMCIsChromeLocal()){ window.addEventListener("message",Toolbar_OnMessage,false);}} function TopicComments_Init(topicID,OnCompleteFunc){ gTopicID=topicID; if(gInit){ if(OnCompleteFunc){ OnCompleteFunc();} return;} if(FMCIsTopicPopup(window.parent)){ gInit=true; if(OnCompleteFunc){ OnCompleteFunc();} return;} window.setTimeout(Init2,0); function Init2(){ var buttonTable=document.getElementById("Buttons"); var tr=buttonTable.getElementsByTagName("tr")[0]; FMCSetupButtonFromStylesheet(tr,"Control","CommentsAddButton","Images/AddComment.gif","Images/AddComment_over.gif","Images/AddComment_selected.gif",23,22,"Add comment","",AddComment); FMCSetupButtonFromStylesheet(tr,"Control","CommentsReplyButton","Images/ReplyComment.gif","Images/ReplyComment_over.gif","Images/ReplyComment_selected.gif",23,22,"Reply to comment","",ReplyComment); FMCSetupButtonFromStylesheet(tr,"Control","CommentsRefreshButton","Images/RefreshTopicComments.gif","Images/RefreshTopicComments_over.gif","Images/RefreshTopicComments_selected.gif",23,22,"Refresh comments","",TopicComments_RefreshComments); var labelTD=document.createElement("td"); var label=CMCFlareStylesheet.LookupValue("Frame","BodyComments","Label","Comments"); labelTD.appendChild(document.createTextNode(label)); labelTD.style.fontFamily=CMCFlareStylesheet.LookupValue("Frame","BodyComments","FontFamily","Arial, Sans-Serif"); labelTD.style.fontSize=CMCFlareStylesheet.LookupValue("Frame","BodyComments","FontSize","16px"); labelTD.style.fontWeight=CMCFlareStylesheet.LookupValue("Frame","BodyComments","FontWeight","bold"); labelTD.style.fontStyle=CMCFlareStylesheet.LookupValue("Frame","BodyComments","FontStyle","normal"); labelTD.style.color=CMCFlareStylesheet.LookupValue("Frame","BodyComments","Color","#000000"); labelTD.style.whiteSpace="nowrap"; tr.replaceChild(labelTD,tr.firstChild); buttonTable.parentNode.style.borderTop=CMCFlareStylesheet.LookupValue("Frame","BodyComments","BorderTop","solid 1px #5EC9FF"); buttonTable.parentNode.style.borderBottom=CMCFlareStylesheet.LookupValue("Frame","BodyComments","BorderBottom","solid 1px #5EC9FF"); buttonTable.parentNode.style.borderLeft=CMCFlareStylesheet.LookupValue("Frame","BodyComments","BorderLeft","none"); buttonTable.parentNode.style.borderRight=CMCFlareStylesheet.LookupValue("Frame","BodyComments","BorderRight","none"); TopicComments_LoadSkin(); gInit=true; if(OnCompleteFunc){ OnCompleteFunc();}}} function TopicComments_LoadSkin(){ document.body.style.backgroundColor=CMCFlareStylesheet.LookupValue("Frame","BodyComments","BackgroundColor","#ffffff");} function GetTopicCommentsOnComplete(commentsXml,refreshCount){ if(refreshCount!=gRefreshCount){ return;} var commentsDiv=document.getElementById("LiveHelpComments"); if(commentsDiv){ var newCommentsDiv=commentsDiv.cloneNode(false); commentsDiv.parentNode.replaceChild(newCommentsDiv,commentsDiv); commentsDiv=newCommentsDiv;} else{ commentsDiv=document.createElement("div"); commentsDiv.id="LiveHelpComments"; document.body.appendChild(commentsDiv);} var xmlDoc=CMCXmlParser.LoadXmlString(commentsXml); TopicComments_Build(xmlDoc.documentElement,commentsDiv,0); var loadingImg=document.getElementById("MCLoadingImage"); loadingImg.parentNode.removeChild(loadingImg); document.body.style.padding="0px"; FMCGetScrollHeight(window); var height=FMCGetScrollHeight(window); FMCPostMessageRequest(MCGlobals.BodyFrame,"set-topic-comments-height",[height],null,function(){ var iframe=MCGlobals.BodyFrame.document.getElementById("topiccomments"); iframe.style.height=height+"px";});} function TopicComments_Build(xmlNode,htmlNode,indent){ for(var i=0;i0){ isReply=true; styleClass="CommentReplyNode";} var subject=node.getAttribute("Subject"); var username=node.getAttribute("User"); var date=node.getAttribute("DateUTC"); if(date==null){ date=node.getAttribute("Date");} var outerDiv=document.createElement("div"); var innerDiv=document.createElement("div"); var subjectDiv=document.createElement("div"); var subjectSpan=document.createElement("span"); var infoDiv=document.createElement("div"); var img=document.createElement("img"); outerDiv.appendChild(innerDiv); outerDiv.style.marginLeft=indent+"px"; innerDiv.setAttribute("MadCap:commentID",node.getAttribute("CommentID")); innerDiv.setAttribute("MadCap:bgColor","Transparent"); innerDiv.setAttribute("MadCap:bgColorSelected",CMCFlareStylesheet.LookupValue("Control",styleClass,"BackgroundColor","#CEE3FF")); innerDiv.style.cursor="default"; innerDiv.onclick=TopicComments_CommentOnclick; innerDiv.ondblclick=ReplyComment; subjectDiv.style.fontFamily=CMCFlareStylesheet.LookupValue("Control",styleClass,"SubjectFontFamily","Arial"); subjectDiv.style.fontSize=CMCFlareStylesheet.LookupValue("Control",styleClass,"SubjectFontSize","12px"); subjectDiv.style.fontWeight=CMCFlareStylesheet.LookupValue("Control",styleClass,"SubjectFontWeight","bold"); subjectDiv.style.fontStyle=CMCFlareStylesheet.LookupValue("Control",styleClass,"SubjectFontStyle","normal"); subjectDiv.style.color=CMCFlareStylesheet.LookupValue("Control",styleClass,"SubjectColor","#000000"); subjectDiv.appendChild(img); subjectDiv.appendChild(subjectSpan); if(FMCIsSafari()){ subjectSpan.innerHTML=subject;} else{ subjectSpan.appendChild(document.createTextNode(subject));} innerDiv.appendChild(subjectDiv); if(username){ var userSpan=document.createElement("span"); userSpan.style.fontFamily=CMCFlareStylesheet.LookupValue("Control",styleClass,"UserInfoFontFamily","Arial"); userSpan.style.fontSize=CMCFlareStylesheet.LookupValue("Control",styleClass,"UserInfoFontSize","10px"); userSpan.style.fontWeight=CMCFlareStylesheet.LookupValue("Control",styleClass,"UserInfoFontWeight","normal"); userSpan.style.fontStyle=CMCFlareStylesheet.LookupValue("Control",styleClass,"UserInfoFontStyle","normal"); userSpan.style.color=CMCFlareStylesheet.LookupValue("Control",styleClass,"UserInfoColor","#000000"); if(FMCIsSafari()){ userSpan.innerHTML=username;} else{ userSpan.appendChild(document.createTextNode(username));} infoDiv.appendChild(userSpan);} if(date){ if(username){ infoDiv.appendChild(document.createTextNode(" "));} var dateObj=CMCDateTimeHelpers.GetDateFromUTCString(date); var dateSpan=document.createElement("span"); dateSpan.appendChild(document.createTextNode(CMCDateTimeHelpers.ToUIString(dateObj))); dateSpan.style.fontFamily=CMCFlareStylesheet.LookupValue("Control",styleClass,"TimestampFontFamily","Arial"); dateSpan.style.fontSize=CMCFlareStylesheet.LookupValue("Control",styleClass,"TimestampFontSize","10px"); dateSpan.style.fontWeight=CMCFlareStylesheet.LookupValue("Control",styleClass,"TimestampFontWeight","normal"); dateSpan.style.fontStyle=CMCFlareStylesheet.LookupValue("Control",styleClass,"TimestampFontStyle","italic"); dateSpan.style.color=CMCFlareStylesheet.LookupValue("Control",styleClass,"TimestampColor","#000000"); infoDiv.appendChild(dateSpan);} infoDiv.style.marginLeft="16px"; innerDiv.appendChild(infoDiv); var bodyNode=FMCGetChildNodeByTagName(node,"Body",0); if(bodyNode){ var commentNode=bodyNode.childNodes[0]; if(commentNode){ var comment=commentNode.nodeValue; var commentDiv=document.createElement("div"); commentDiv.appendChild(document.createTextNode(comment)); commentDiv.style.marginLeft="16px"; commentDiv.style.fontFamily=CMCFlareStylesheet.LookupValue("Control",styleClass,"BodyFontFamily","Arial"); commentDiv.style.fontSize=CMCFlareStylesheet.LookupValue("Control",styleClass,"BodyFontSize","10px"); commentDiv.style.fontWeight=CMCFlareStylesheet.LookupValue("Control",styleClass,"BodyFontWeight","normal"); commentDiv.style.fontStyle=CMCFlareStylesheet.LookupValue("Control",styleClass,"BodyFontStyle","normal"); commentDiv.style.color=CMCFlareStylesheet.LookupValue("Control",styleClass,"BodyColor","#000000"); innerDiv.appendChild(commentDiv);}} outerDiv.appendChild(document.createElement("br")); var commentsNode=FMCGetChildNodeByTagName(node,"Comments",0); if(isReply){ CMCFlareStylesheet.SetImageFromStylesheet(img,"Control",styleClass,"Icon","Images/CommentReply.gif",16,16); TopicComments_Build(commentsNode,outerDiv,indent+16);} else{ CMCFlareStylesheet.SetImageFromStylesheet(img,"Control",styleClass,"Icon","Images/Comment.gif",16,16);} htmlNode.appendChild(outerDiv);}} var gRefreshCount=0; function TopicComments_RefreshComments(e){ if(!e){e=window.event;} gRefreshCount++; var loadingImg=document.getElementById("MCLoadingImage"); if(loadingImg==null){ loadingImg=document.createElement("img"); loadingImg.id="MCLoadingImage"; loadingImg.src="Images/LoadingAnimated.gif"; loadingImg.style.width="16px"; loadingImg.style.height="16px"; loadingImg.style.position="absolute"; loadingImg.style.top="5px"; loadingImg.style.left="5px"; document.body.insertBefore(loadingImg,document.body.childNodes[0]);} gSelectedComment=null; if(FMCIsHtmlHelp()){ FMCRegisterCallback("Persistence",MCEventType.OnInit,function(args){ var userGuid=FMCLoadUserData("LiveHelpUserGuid"); gServiceClient.GetTopicComments(gTopicID,userGuid,null,GetTopicCommentsOnComplete,gRefreshCount);},null);} else{ var userGuid=FMCReadCookie("LiveHelpUserGuid"); gServiceClient.GetTopicComments(gTopicID,userGuid,null,GetTopicCommentsOnComplete,gRefreshCount);}} function AddComment(e){ if(!e){e=window.event;} if(gTopicID!=null){ FMCPostMessageRequest(MCGlobals.BodyFrame,"open-comment-dialog",[false,null,null],null,function(){ MCGlobals.BodyFrame.FMCOpenCommentDialog(false,null,null);});}} function ReplyComment(e){ if(!e){e=window.event;} if(gSelectedComment==null){ alert("Please select a comment to reply to."); return;} var comment=gSelectedComment.getElementsByTagName("div")[2].firstChild.nodeValue; var parentCommentID=FMCGetAttribute(gSelectedComment,"MadCap:commentID"); FMCPostMessageRequest(MCGlobals.BodyFrame,"open-comment-dialog",[true,comment,parentCommentID],null,function(){ MCGlobals.BodyFrame.FMCOpenCommentDialog(true,comment,parentCommentID);});} var gSelectedComment=null; function TopicComments_CommentOnclick(e){ if(!e){e=window.event;} if(gSelectedComment){ var c1=FMCGetMCAttribute(gSelectedComment,"MadCap:bgColor"); var c2=FMCGetMCAttribute(gSelectedComment,"MadCap:bgColorSelected"); gSelectedComment.setAttribute("MadCap:bgColor",c2); gSelectedComment.setAttribute("MadCap:bgColorSelected",c1); gSelectedComment.style.backgroundColor=c2;} var bgColor=FMCGetMCAttribute(this,"MadCap:bgColor"); var bgColorSelected=FMCGetMCAttribute(this,"MadCap:bgColorSelected"); this.setAttribute("MadCap:bgColor",bgColorSelected); this.setAttribute("MadCap:bgColorSelected",bgColor); this.style.backgroundColor=bgColorSelected; gSelectedComment=this;} function TopicComments_OnMessage(e){ var parts=e.data.split(gMessageSeparator); var messageType=parts[0]; var message=parts[1]; var messageData=parts[2]; var messageID=parts[3]; var dataValues=null; if(!String.IsNullOrEmpty(messageData)){ dataValues=messageData.split(gDataSeparator); for(var i=0,length=dataValues.length;i0?responseData:null,messageID);}); handled=true; needsCallbackFired=false;} else if(message=="refresh-comments"){ TopicComments_RefreshComments(); handled=true;} if(handled){ if(needsCallbackFired){ FMCPostMessageResponse(e.source,message,responseData.length>0?responseData:null,messageID);}}}} if(gRuntimeFileType=="TopicComments"){ var gInit=false; var gTopicID=null; if(FMCIsChromeLocal()){ window.addEventListener("message",TopicComments_OnMessage,false);}}