Untitled diff

Created Diff never expires
3 removals
417 lines
5 additions
419 lines
/* ------------ Script copyright 2005-2013 EC Software -------------
/* ------------ Script copyright 2005-2013 EC Software -------------
This script was created by Help & Manual and is part of the
This script was created by Help & Manual and is part of the
Webhelp export format. This script is designed for use in
Webhelp export format. This script is designed for use in
combination with the output of Help & Manual and must not
combination with the output of Help & Manual and must not
be used outside this context. http://www.helpandmanual.com
be used outside this context. http://www.helpandmanual.com
Do not modify this file! It will be overwritten by Help & Manual.
Do not modify this file! It will be overwritten by Help & Manual.
----------------------------------------------------------------- */
----------------------------------------------------------------- */
var usecookie = false;
var usecookie = false;
var tocselecting = false;
var tocselecting = false;
var abspossupported = 0;
var abspossupported = 0;
var currentselection = null;
var currentselection = null;
var currenttocstate = "";
var currenttocstate = "";
if (gaaccount != "") {
if (gaaccount != "") {
var _gaq = _gaq || [];
var _gaq = _gaq || [];
_gaq.push(["_setAccount", gaaccount]);
_gaq.push(["_setAccount", gaaccount]);
_gaq.push(["_trackPageview"]);
_gaq.push(["_trackPageview"]);
(function() {
(function() {
var ga = document.createElement("script");
var ga = document.createElement("script");
ga.type = "text/javascript"; ga.async = true;
ga.type = "text/javascript"; ga.async = true;
ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js";
ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js";
var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(ga, s);
var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(ga, s);
})();
})();
}
}
function hmAddCss(adoc, cssCode) {
function hmAddCss(adoc, cssCode) {
var styleElement = adoc.createElement("style");
var styleElement = adoc.createElement("style");
styleElement.type = "text/css";
styleElement.type = "text/css";
if (styleElement.styleSheet) {
if (styleElement.styleSheet) {
styleElement.styleSheet.cssText = cssCode;
styleElement.styleSheet.cssText = cssCode;
}
}
else {
else {
styleElement.appendChild(adoc.createTextNode(cssCode));
styleElement.appendChild(adoc.createTextNode(cssCode));
}
}
adoc.getElementsByTagName("head")[0].appendChild(styleElement);
adoc.getElementsByTagName("head")[0].appendChild(styleElement);
}
}
function hmSupportsAbspos() {
function hmSupportsAbspos() {
if (abspossupported==0) {
if (abspossupported==0) {
tmp = $('<div style="position:absolute;left:0;right:0;display:none">&nbsp;</div>').appendTo('body');
tmp = $('<div style="position:absolute;left:0;right:0;display:none">&nbsp;</div>').appendTo('body');
if (($(tmp).outerWidth()+30) > $(window).width()) abspossupported = 1;
if (($(tmp).outerWidth()+30) > $(window).width()) abspossupported = 1;
else abspossupported = -1;
else abspossupported = -1;
tmp.remove();
tmp.remove();
}
}
if (abspossupported==1) return true;
if (abspossupported==1) return true;
return false;
return false;
}
}
function hmNoAbsposResize(jdiv, w, h) {
function hmNoAbsposResize(jdiv, w, h) {
var windowWidth, windowHeight;
var windowWidth, windowHeight;
if (self.innerHeight) { // all except Explorer
if (self.innerHeight) { // all except Explorer
if(document.documentElement.clientWidth){
if(document.documentElement.clientWidth){
windowWidth = document.documentElement.clientWidth;
windowWidth = document.documentElement.clientWidth;
} else {
} else {
windowWidth = self.innerWidth;
windowWidth = self.innerWidth;
}
}
windowHeight = self.innerHeight;
windowHeight = self.innerHeight;
} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
windowWidth = document.documentElement.clientWidth;
windowWidth = document.documentElement.clientWidth;
windowHeight = document.documentElement.clientHeight;
windowHeight = document.documentElement.clientHeight;
} else if (document.body) { // other Explorers
} else if (document.body) { // other Explorers
windowWidth = document.body.clientWidth;
windowWidth = document.body.clientWidth;
windowHeight = document.body.clientHeight;
windowHeight = document.body.clientHeight;
}
}
if (w) jdiv.css('width', ( windowWidth - parseInt(jdiv.css('left')) - parseInt(jdiv.css('right')) ));
if (w) jdiv.css('width', ( windowWidth - parseInt(jdiv.css('left')) - parseInt(jdiv.css('right')) ));
if (h) jdiv.css('height', ( windowHeight - parseInt(jdiv.css('top')) - parseInt(jdiv.css('bottom')) ));
if (h) jdiv.css('height', ( windowHeight - parseInt(jdiv.css('top')) - parseInt(jdiv.css('bottom')) ));
}
}
function hmNavigationFrame() {
function hmNavigationFrame() {
for (var i=0;i<frames.length;i++) {
for (var i=0;i<frames.length;i++) {
if (frames[i].name=='hmnavigation') return frames[i];
if (frames[i].name=='hmnavigation') return frames[i];
}
}
return self;
return self;
}
}
function hmContentFrame() {
function hmContentFrame() {
if (!document.getElementById("hmcontent")) return null;
if (!document.getElementById("hmcontent")) return null;
return hmcontent;
return hmcontent;
}
}
function track(action, data) {
function track(action, data) {
if (gaaccount != "") {
if (gaaccount != "") {
if (window._gat) {
if (window._gat) {
var pageTracker = window._gat._getTracker(gaaccount);
var pageTracker = window._gat._getTracker(gaaccount);
switch(action) {
switch(action) {
case "topic":
case "topic":
data = data.substring(data.indexOf("//")+1,data.length);
data = data.substring(data.lastIndexOf("/")+1,data.length);
pageTracker._trackPageview(data);
pageTracker._trackPageview(data);
break;
break;
case "search":
case "search":
pageTracker._trackPageview(data);
pageTracker._trackPageview(data);
break;
break;
case "index":
case "index":
pageTracker._trackEvent("Help|IndexTerm", data, null, null);
pageTracker._trackEvent("Help|IndexTerm", data, null, null);
break;
break;
case "exit":
case "exit":
pageTracker._trackEvent("Help|ExitTo", data, null, null);
pageTracker._trackEvent("Help|ExitTo", data, null, null);
break;
break;
}
}
}
}
}
}
}
}
function fullexpand(animate) { switchall(true, animate); }
function fullexpand(animate) { switchall(true, animate); }
function fullcollapse(animate) { switchall(false, animate); }
function fullcollapse(animate) { switchall(false, animate); }
function levelexpand(divID, animate) {
function levelexpand(divID, animate) {
var thisDIV = hmNavigationFrame().document.getElementById(divID);
var thisDIV = hmNavigationFrame().document.getElementById(divID);
var items = thisDIV.getElementsByTagName("li");
var items = thisDIV.getElementsByTagName("li");
for(var i = 0; i < items.length; i++) {
for(var i = 0; i < items.length; i++) {
if (items[i].parentNode==thisDIV) {
if (items[i].parentNode==thisDIV) {
var thisUL = hmULfromID(items[i].id);
var thisUL = hmULfromID(items[i].id);
if (thisUL) hmSwitchNode(thisUL, true, animate);
if (thisUL) hmSwitchNode(thisUL, true, animate);
}
}
}
}
}
}
function switchall(nodevisible, animate) {
function switchall(nodevisible, animate) {
var toc = hmNavigationFrame().document.getElementById("toc");
var toc = hmNavigationFrame().document.getElementById("toc");
if (toc) {
if (toc) {
var items = toc.getElementsByTagName("ul");
var items = toc.getElementsByTagName("ul");
for(var i = 0; i < items.length; i++) hmSwitchNode(items[i], nodevisible, animate);
for(var i = 0; i < items.length; i++) hmSwitchNode(items[i], nodevisible, animate);
if ((nodevisible) && (currentselection)) intoview(currentselection, toc, false);
if ((nodevisible) && (currentselection)) intoview(currentselection, toc, false);
}
}
}
}
function loadstate(toc) {
function loadstate(toc) {
var tmpAnimate = hmAnimate;
var tmpAnimate = hmAnimate;
hmAnimate = false;
hmAnimate = false;
currentselection = null;
currentselection = null;
if (currenttocstate=="") {
if (currenttocstate=="") {
if (usecookie) currenttocstate = document.cookie;
if (usecookie) currenttocstate = document.cookie;
else { /* load default toc state */
else { /* load default toc state */
if (initialtocstate == 'expandall') fullexpand(false);
if (initialtocstate == 'expandall') fullexpand(false);
else {
else {
if (initialtocstate == 'expandtoplevel') { fullcollapse(false); levelexpand('toc', false); }
if (initialtocstate == 'expandtoplevel') { fullcollapse(false); levelexpand('toc', false); }
else fullcollapse(false);
else fullcollapse(false);
}
}
}
}
}
}
if (currenttocstate != "") {
if (currenttocstate != "") {
var toc = hmNavigationFrame().document.getElementById("toc");
var toc = hmNavigationFrame().document.getElementById("toc");
if (toc) {
if (toc) {
var items = toc.getElementsByTagName("ul");
var items = toc.getElementsByTagName("ul");
for(var i = 0; i < items.length; i++) hmSwitchNode(items[i], (currenttocstate.indexOf(items[i].id+',')>-1), false);
for(var i = 0; i < items.length; i++) hmSwitchNode(items[i], (currenttocstate.indexOf(items[i].id+',')>-1), false);
}
}
}
}
if (hmContentFrame()) {
if (hmContentFrame()) {
var topicID = hmContentFrame().location.href.substring(hmContentFrame().location.href.lastIndexOf("/")+1,hmContentFrame().location.href.length);
var topicID = hmContentFrame().location.href.substring(hmContentFrame().location.href.lastIndexOf("/")+1,hmContentFrame().location.href.length);
if (topicID.lastIndexOf("#") != -1) topicID = topicID.substring(0,topicID.lastIndexOf("#"));
if (topicID.lastIndexOf("#") != -1) topicID = topicID.substring(0,topicID.lastIndexOf("#"));
if (topicID.lastIndexOf("?") != -1) topicID = topicID.substring(0,topicID.lastIndexOf("?"));
if (topicID.lastIndexOf("?") != -1) topicID = topicID.substring(0,topicID.lastIndexOf("?"));
tocselecting = false;
tocselecting = false;
lazysync(topicID);
lazysync(topicID);
}
}
hmAnimate = tmpAnimate;
hmAnimate = tmpAnimate;
}
}
function savestate(toc) {
function savestate(toc) {
currenttocstate = "";
currenttocstate = "";
var items = toc.getElementsByTagName("ul");
var items = toc.getElementsByTagName("ul");
for(var i = 0; i < items.length; i++) if (items[i].style.display!="none") currenttocstate = currenttocstate.concat(items[i].id + ",");
for(var i = 0; i < items.length; i++) if (items[i].style.display!="none") currenttocstate = currenttocstate.concat(items[i].id + ",");
if (usecookie) document.cookie = currenttocstate;
if (usecookie) document.cookie = currenttocstate;
}
}
function toggle(nodeID) {
function toggle(nodeID) {
var thisUL = hmULfromID(nodeID);
var thisUL = hmULfromID(nodeID);
if (thisUL) hmSwitchNode(thisUL, ((thisUL.style.display=="none")?true:false), true);
if (thisUL) hmSwitchNode(thisUL, ((thisUL.style.display=="none")?true:false), true);
}
}
function hmNodeClicked(node, event) {
function hmNodeClicked(node, event) {
if (event.stopPropagation) { event.stopPropagation(); } else { event.cancelBubble = true; } //MSIE
if (event.stopPropagation) { event.stopPropagation(); } else { event.cancelBubble = true; } //MSIE
if ($(node).css('direction') != 'rtl') {
if ($(node).css('direction') != 'rtl') {
var scrOfX = $(hmNavigationFrame()).scrollLeft();
var scrOfX = $(hmNavigationFrame()).scrollLeft();
var scrOfY = $(hmNavigationFrame()).scrollTop();
var scrOfY = $(hmNavigationFrame()).scrollTop();
var offset = parseInt( $(node).css('padding-left'));
var offset = parseInt( $(node).css('padding-left'));
var thisClicked = ( (event.clientY+scrOfY > $(node).offset().top) && (event.clientY+scrOfY < ($(node).offset().top+offset)) &&
var thisClicked = ( (event.clientY+scrOfY > $(node).offset().top) && (event.clientY+scrOfY < ($(node).offset().top+offset)) &&
(event.clientX+scrOfX > $(node).offset().left) && (event.clientX+scrOfX < ($(node).offset().left+offset+$(node.firstChild).outerWidth())) );
(event.clientX+scrOfX > $(node).offset().left) && (event.clientX+scrOfX < ($(node).offset().left+offset+$(node.firstChild).outerWidth())) );
var iconClicked = (thisClicked && (event.clientX+scrOfX > $(node).offset().left) && (event.clientX+scrOfX < ($(node).offset().left+offset)));
var iconClicked = (thisClicked && (event.clientX+scrOfX > $(node).offset().left) && (event.clientX+scrOfX < ($(node).offset().left+offset)));
}
}
else {
else {
var scrOfX = $(hmNavigationFrame()).scrollLeft();
var scrOfX = $(hmNavigationFrame()).scrollLeft();
var scrOfY = $(hmNavigationFrame()).scrollTop();
var scrOfY = $(hmNavigationFrame()).scrollTop();
var offset = parseInt( $(node).css('padding-right'));
var offset = parseInt( $(node).css('padding-right'));
var nodeW = $(node).outerWidth();
var nodeW = $(node).outerWidth();
var textW = $(node.firstChild).outerWidth();
var textW = $(node.firstChild).outerWidth();
var thisClicked = ( (event.clientY+scrOfY > $(node).offset().top) && (event.clientY+scrOfY < ($(node).offset().top+offset)) &&
var thisClicked = ( (event.clientY+scrOfY > $(node).offset().top) && (event.clientY+scrOfY < ($(node).offset().top+offset)) &&
(event.clientX+scrOfX < $(node).offset().left+nodeW) && (event.clientX+scrOfX > ($(node).offset().left+nodeW-offset-textW)) );
(event.clientX+scrOfX < $(node).offset().left+nodeW) && (event.clientX+scrOfX > ($(node).offset().left+nodeW-offset-textW)) );
var iconClicked = (thisClicked && (event.clientX+scrOfX < $(node).offset().left+nodeW) && (event.clientX+scrOfX > ($(node).offset().left+nodeW-offset)));
var iconClicked = (thisClicked && (event.clientX+scrOfX < $(node).offset().left+nodeW) && (event.clientX+scrOfX > ($(node).offset().left+nodeW-offset)));
}
}
var thisID = node.id;
var thisID = node.id;
if (iconClicked) {
if (iconClicked) {
toggle('ul'+thisID.substring(1,thisID.length));
toggle('ul'+thisID.substring(1,thisID.length));
}
}
else if (thisClicked) {
else if (thisClicked) {
if (hmTocSingleClick) {
if (hmTocSingleClick) {
hilightexpand('s'+thisID.substring(1,thisID.length));
hilightexpand('s'+thisID.substring(1,thisID.length));
}
}
else {
else {
hilight('s'+thisID.substring(1,thisID.length));
hilight('s'+thisID.substring(1,thisID.length));
}
}
}
}
}
}
function hmNodeDblclicked(node) {
function hmNodeDblclicked(node) {
thisID = node.id;
thisID = node.id;
toggle('ul'+thisID.substring(1,thisID.length));
toggle('ul'+thisID.substring(1,thisID.length));
}
}
function hmLIfromID(thisID) {
function hmLIfromID(thisID) {
return hmNavigationFrame().document.getElementById('i'+thisID.replace(/[isaul]/g,''));
return hmNavigationFrame().document.getElementById('i'+thisID.replace(/[isaul]/g,''));
}
}
function hmULfromID(thisID) {
function hmULfromID(thisID) {
return hmNavigationFrame().document.getElementById('ul'+thisID.replace(/[isaul]/g,''));
return hmNavigationFrame().document.getElementById('ul'+thisID.replace(/[isaul]/g,''));
}
}
function hmSwitchNode(thisUL, nodevisible, animate) {
function hmSwitchNode(thisUL, nodevisible, animate) {
if ((thisUL.style.display!='none')!=nodevisible) {
if ((thisUL.style.display!='none')!=nodevisible) {
var thisLI = hmLIfromID(thisUL.id);
var thisLI = hmLIfromID(thisUL.id);
if (thisLI) {
if (thisLI) {
var thisIcon = thisLI.getAttribute('data-bg');
var thisIcon = thisLI.getAttribute('data-bg');
if (thisIcon!='') $(thisLI).css('background-image', 'url(' + (nodevisible ? thisIcon.substr(thisIcon.indexOf(';')+1, thisIcon.length) : thisIcon.substr(0, thisIcon.indexOf(';')) ) + ')');
if (thisIcon!='') $(thisLI).css('background-image', 'url(' + (nodevisible ? thisIcon.substr(thisIcon.indexOf(';')+1, thisIcon.length) : thisIcon.substr(0, thisIcon.indexOf(';')) ) + ')');
if (nodevisible) {
if (nodevisible) {
if (animate && hmAnimate) $(thisUL).slideDown('fast');
if (animate && hmAnimate) $(thisUL).slideDown('fast');
else thisUL.style.display = 'block';
else thisUL.style.display = 'block';
}
}
else {
else {
if (animate && hmAnimate) $(thisUL).slideUp('fast');
if (animate && hmAnimate) $(thisUL).slideUp('fast');
else thisUL.style.display = 'none';
else thisUL.style.display = 'none';
}
}
}
}
}
}
}
}
function hilightexpand(spanID) {
function hilightexpand(spanID) {
if (hilight(spanID)) {
if (hilight(spanID)) {
var thisUL = hmULfromID(spanID);
var thisUL = hmULfromID(spanID);
if (thisUL) hmSwitchNode(thisUL, true, true);
if (thisUL) hmSwitchNode(thisUL, true, true);
return true;
return true;
}
}
else return false;
else return false;
}
}
function hilight(spanID) {
function hilight(spanID) {
tocselecting = true;
tocselecting = true;
var thisnode = null;
var thisnode = null;
var selectionchanged = false;
var selectionchanged = false;
thisnode = hmNavigationFrame().document.getElementById(spanID);
thisnode = hmNavigationFrame().document.getElementById(spanID);
if (thisnode) {
if (thisnode) {
try {
try {
if ((currentselection) && (currentselection != thisnode)) currentselection.className = "heading" + currentselection.className.substr(7,1);
if ((currentselection) && (currentselection != thisnode)) currentselection.className = "heading" + currentselection.className.substr(7,1);
}
}
catch(e){
catch(e){
}
}
thisnode.className = "hilight"+thisnode.className.substr(7,1);
thisnode.className = "hilight"+thisnode.className.substr(7,1);
selectionchanged = (currentselection != thisnode);
selectionchanged = (currentselection != thisnode);
currentselection = thisnode;
currentselection = thisnode;
}
}
return selectionchanged;
return selectionchanged;
}
}
function intoview(thisnode, tree, selectionchanged) {
function intoview(thisnode, tree, selectionchanged) {
var thisparent = thisnode;
var thisparent = thisnode;
while (thisparent != tree) {
while (thisparent != tree) {
if ((selectionchanged) && (thisparent.nodeName.toLowerCase()=="ul")) hmSwitchNode(thisparent,true,true);
if ((selectionchanged) && (thisparent.nodeName.toLowerCase()=="ul")) hmSwitchNode(thisparent,true,true);
thisparent = thisparent.parentNode;
thisparent = thisparent.parentNode;
}
}
thisparent = thisnode;
thisparent = thisnode;
for (var t=0; thisparent!=null; t+=thisparent.offsetTop, thisparent=thisparent.offsetParent);
for (var t=0; thisparent!=null; t+=thisparent.offsetTop, thisparent=thisparent.offsetParent);
var bt = (hmNavigationFrame().window.pageYOffset)?hmNavigationFrame().window.pageYOffset:hmNavigationFrame().document.body.scrollTop;
var bt = (hmNavigationFrame().window.pageYOffset)?hmNavigationFrame().window.pageYOffset:hmNavigationFrame().document.body.scrollTop;
var bh = (hmNavigationFrame().window.innerHeight)?hmNavigationFrame().window.innerHeight:hmNavigationFrame().document.body.offsetHeight;
var bh = (hmNavigationFrame().window.innerHeight)?hmNavigationFrame().window.innerHeight:hmNavigationFrame().document.body.offsetHeight;
if ((t+thisnode.offsetHeight-bt) > bh) hmNavigationFrame().window.scrollTo(0,(t+24-bh))
if ((t+thisnode.offsetHeight-bt) > bh) hmNavigationFrame().window.scrollTo(0,(t+24-bh))
else if (t < bt) hmNavigationFrame().window.scrollTo(0,t);
else if (t < bt) hmNavigationFrame().window.scrollTo(0,t);
}
}
function collapseunfocused(toc, selectedID) {
function collapseunfocused(toc, selectedID) {
if (toc) {
if (toc) {
var nodepath = 'ul'+selectedID.replace(/[isaul]/g,'') + ".";
var nodepath = 'ul'+selectedID.replace(/[isaul]/g,'') + ".";
var nodeCompare = "";
var nodeCompare = "";
var items = toc.getElementsByTagName("ul");
var items = toc.getElementsByTagName("ul");
for (var i = 0; i < items.length; i++) {
for (var i = 0; i < items.length; i++) {
if (items[i].id.indexOf(".")<0) nodeCompare = items[i].id + ".";
if (items[i].id.indexOf(".")<0) nodeCompare = items[i].id + ".";
else nodeCompare = items[i].id;
else nodeCompare = items[i].id;
if (nodepath.lastIndexOf(nodeCompare)<0) {
if (nodepath.lastIndexOf(nodeCompare)<0) {
hmSwitchNode(items[i], false, false);
hmSwitchNode(items[i], false, false);
}
}
}
}
}
}
}
}
function quicksync(aID) {
function quicksync(aID) {
if (aID != "") {
if (aID != "") {
var toc = hmNavigationFrame().document.getElementById("toc");
var toc = hmNavigationFrame().document.getElementById("toc");
if (toc) {
if (toc) {
if (!tocselecting) {
if (!tocselecting) {
aID = "s"+aID.substring(1,aID.length);
aID = "s"+aID.substring(1,aID.length);
var thisspan = hmNavigationFrame().document.getElementById(aID);
var thisspan = hmNavigationFrame().document.getElementById(aID);
if (thisspan) {
if (thisspan) {
var selectionchanged = hilight(aID);
var selectionchanged = hilight(aID);
intoview(thisspan, toc, selectionchanged);
intoview(thisspan, toc, selectionchanged);
}
}
}
}
if (autocollapse) {
if (autocollapse) {
if (currentselection) collapseunfocused(toc, currentselection.id);
if (currentselection) collapseunfocused(toc, currentselection.id);
else collapseunfocused(toc, "");
else collapseunfocused(toc, "");
}
}
}
}
track('topic', topicID);
track('topic', topicID);
}
}
tocselecting = false;
tocselecting = false;
}
}
function lazysync(topicID) {
function lazysync(topicID) {
if (topicID != "") {
if (topicID != "") {
var toc = hmNavigationFrame().document.getElementById("toc");
var toc = hmNavigationFrame().document.getElementById("toc");
if (toc) {
if (toc) {
if (!tocselecting) {
if (!tocselecting) {
var currentTopic = $("a[href^='"+topicID+"']",toc);
var currentTopic = $("a[href^='"+topicID+"']",toc);
if (currentTopic.length > 0) {
if (currentTopic.length > 0) {
var currentSpanID = $(currentTopic).children("span").attr("id");
var currentSpanID = $(currentTopic).children("span").attr("id");
var selectionchanged = false;
var selectionchanged = false;
if (hmTocSingleClick) {
if (hmTocSingleClick) {
selectionchanged = hilightexpand(currentSpanID);
selectionchanged = hilightexpand(currentSpanID);
}
}
else {
else {
selectionchanged = hilight(currentSpanID);
selectionchanged = hilight(currentSpanID);
}
}
intoview(currentTopic[0], toc, selectionchanged);
intoview(currentTopic[0], toc, selectionchanged);
}
}
}
}
if (autocollapse) {
if (autocollapse) {
if (currentselection) collapseunfocused(toc, currentselection.id);
if (currentselection) collapseunfocused(toc, currentselection.id);
else collapseunfocused(toc, "");
else collapseunfocused(toc, "");
}
}
}
}
track('topic', topicID);
if (topicID != parent.oldTopicID) {
var topicRelativeURL = hmContentFrame().location.href.substring(hmContentFrame().location.href.indexOf(".com")+4,hmContentFrame().location.href.length);
track('topic', topicRelativeURL);
parent.oldTopicID = topicID;
}
}
}
tocselecting = false;
tocselecting = false;
}
}
function hmPreloadIcons() {
function hmPreloadIcons() {
var icons = new Array();
var icons = new Array();
for (i=0; i<arguments.length; i++) {
for (i=0; i<arguments.length; i++) {
icons[i] = new Image();
icons[i] = new Image();
icons[i].src = arguments[i];
icons[i].src = arguments[i];
}
}
}
}
function hmCreateVSplitter(leftdiv, rightdiv) {
function hmCreateVSplitter(leftdiv, rightdiv) {
var splitWidth = ($(rightdiv).offset().left - ($(leftdiv).offset().left+$(leftdiv).outerWidth()));
var splitWidth = ($(rightdiv).offset().left - ($(leftdiv).offset().left+$(leftdiv).outerWidth()));
$('body').append('<div id="hmsplitter" style="border:none;margin:0;padding:0;position:absolute;cursor:col-resize;background-color:transparent;background:url(blank.gif);overflow:hidden;'+
$('body').append('<div id="hmsplitter" style="border:none;margin:0;padding:0;position:absolute;cursor:col-resize;background-color:transparent;background:url(blank.gif);overflow:hidden;'+
'height:'+$(leftdiv).outerHeight()+
'height:'+$(leftdiv).outerHeight()+
'px;top:'+$(leftdiv).offset().top+
'px;top:'+$(leftdiv).offset().top+
'px;left:'+($(leftdiv).offset().left+$(leftdiv).outerWidth())+
'px;left:'+($(leftdiv).offset().left+$(leftdiv).outerWidth())+
'px;width:'+splitWidth+'px">&nbsp;</div>');
'px;width:'+splitWidth+'px">&nbsp;</div>');
var oldX;
var oldX;
var navWidth;
var navWidth;
var minWidth;
var minWidth;
var oldLeft;
var oldLeft;
var oldWidth;
var oldWidth;
var oldSplitL;
var oldSplitL;
var split = $('#hmsplitter');
var split = $('#hmsplitter');
$(window).resize(function() { /* resize splitter when window changes */
$(window).resize(function() { /* resize splitter when window changes */
split.css('height', $(leftdiv).outerHeight()+'px');
split.css('height', $(leftdiv).outerHeight()+'px');
});
});
split.bind('mousedown', startDrag);
split.bind('mousedown', startDrag);
function startDrag(e) {
function startDrag(e) {
oldX = (!document.all) ? e.clientX : event.clientX;
oldX = (!document.all) ? e.clientX : event.clientX;
navWidth = parseInt($(leftdiv).css('width'),10);
navWidth = parseInt($(leftdiv).css('width'),10);
minWidth = parseInt($(leftdiv).css('min-width'));
minWidth = parseInt($(leftdiv).css('min-width'));
oldLeft = $(rightdiv).offset().left;
oldLeft = $(rightdiv).offset().left;
oldWidth = $(rightdiv).outerWidth();
oldWidth = $(rightdiv).outerWidth();
oldSplitL = split.offset().left;
oldSplitL = split.offset().left;
var bg = $('<div id="hmcurtain" style="border:none;padding:0;margin:0;position:absolute;cursor:col-resize;width:100%;height:100%;background-color:transparent;background:url(blank.gif)"></div>').appendTo('body');
var bg = $('<div id="hmcurtain" style="border:none;padding:0;margin:0;position:absolute;cursor:col-resize;width:100%;height:100%;background-color:transparent;background:url(blank.gif)"></div>').appendTo('body');
bg.bind('mousemove', performDrag);
bg.bind('mousemove', performDrag);
bg.bind('mouseup', endDrag);
bg.bind('mouseup', endDrag);
split.bind('mousemove', performDrag);
split.bind('mousemove', performDrag);
split.bind('mouseup', endDrag);
split.bind('mouseup', endDrag);
function endDrag() {
function endDrag() {
bg.unbind('mousemove').unbind('mouseup').remove();
bg.unbind('mousemove').unbind('mouseup').remove();
split.unbind('mousemove').unbind('mouseup');
split.unbind('mousemove').unbind('mouseup');
}
}
}
}
function performDrag(e) {
function performDrag(e) {
//deselect:
//deselect:
if (window.getSelection) window.getSelection().removeAllRanges();
if (window.getSelection) window.getSelection().removeAllRanges();
else if (document.selection) document.selection.empty();
else if (document.selection) document.selection.empty();
var moveX = (!document.all) ? e.clientX - oldX : event.clientX - oldX;
var moveX = (!document.all) ? e.clientX - oldX : event.clientX - oldX;
var newNavW = navWidth + moveX < minWidth ? minWidth : navWidth + moveX;
var newNavW = navWidth + moveX < minWidth ? minWidth : navWidth + moveX;
$(leftdiv).css('width', (newNavW) + 'px');
$(leftdiv).css('width', (newNavW) + 'px');
//split.css('left', ($(leftdiv).offset().left+newNavW) + 'px');
//split.css('left', ($(leftdiv).offset().left+newNavW) + 'px');
split.css('left', (oldSplitL + newNavW - navWidth) + 'px');
split.css('left', (oldSplitL + newNavW - navWidth) + 'px');
$(rightdiv).css('left', (oldLeft + newNavW - navWidth) + 'px');
$(rightdiv).css('left', (oldLeft + newNavW - navWidth) + 'px');
if (!hmSupportsAbspos()) $(rightdiv).css('width', (oldWidth - newNavW + navWidth) + 'px');
if (!hmSupportsAbspos()) $(rightdiv).css('width', (oldWidth - newNavW + navWidth) + 'px');
}
}
}
}