function replace(string,text,by) { // Replaces text with by in string var strLength = string.length, txtLength = text.length; if ((strLength == 0) || (txtLength == 0)) return string; var i = string.indexOf(text); if ((!i) && (text != string.substring(0,txtLength))) return string; if (i == -1) return string; var newstr = string.substring(0,i) + by; if (i+txtLength < strLength) newstr += replace(string.substring(i+txtLength,strLength),text,by); return newstr; } function openHelp(contentURL) { var windowWidth = 600; var windowHeight = 400; var windowXPos = 0; var windowYPos = 0; var scrollWidth = 0; if (document.layers) { if (window.scrollbars.visible) scrollWidth = 20; windowXPos = window.screenX + (window.outerWidth / 2) - (windowWidth / 2); windowYPos = window.screenY + (window.outerHeight / 2) - (windowHeight / 2); } else if (document.all) { windowXPos = (screen.width / 2) - (windowWidth / 2); windowYPos = (screen.height / 2) - (windowHeight / 2); } var windowDetails = 'toolbar=yes,status=yes,menubar=no,width='+windowWidth+',height='+windowHeight+',scrollbars=no,screenX='+windowXPos+',screenY='+windowYPos+',top='+windowYPos+',left='+windowXPos if (! contentURL) contentURL = '/help/contents/welcome.html'; // Replace '#' characters with '~' characters to mask contentURL = replace(contentURL,'#','~'); helpWindow = window.open('/help/index.cfm?SRC='+contentURL,'HelpWindow9',windowDetails); if (helpWindow) helpWindow.focus(); }