//Splitting the screen function SplitScreen (nonScrollingRegionId, scrollingRegionId) { this.nonScrollingRegion = document.getElementById(nonScrollingRegionId); this.scrollingRegion = document.getElementById(scrollingRegionId); document.body.style.margin = "0px"; document.body.style.overflow = "hidden"; this.scrollingRegion.style.overflow = "auto"; this.resize(null); registerEventHandler(window, 'resize', getInstanceDelegate(this, "resize")); } SplitScreen.prototype.resize = function(e) { var scrollRegionHeight = document.body.clientHeight - this.nonScrollingRegion.offsetHeight; if (scrollRegionHeight < 0) { scrollRegionHeight = 0; } this.scrollingRegion.style.height = scrollRegionHeight; this.scrollingRegion.style.width = document.body.clientWidth; } // Event handler attachment function registerEventHandler (element, event, handler) { if (element.attachEvent) { element.attachEvent('on' + event, handler); } else if (element.addEventListener) { element.addEventListener(event, handler, false); } else { element[event] = handler; } } function getInstanceDelegate (obj, methodName) { return( function(e) { e = e || window.event; return obj[methodName](e); } ); } //element manipulation, functions with limited functionality defined not to throw errors on the page window.onload=init; function init() { try { document.getElementById('languageFilterToolTip').style.display = "none"; } catch (e) {} try { document.getElementById('membersOptionsFilterToolTip').style.display = "none"; } catch (e1) {} try { expandAll(document.getElementById('toggleAllImage')); } catch (e2) {} // split screen try { var screen = new SplitScreen('header', 'mainSection'); } catch (e3) {} } function OnLoadImage() { } function ExpandCollapse(imageItem) { if (imageItem.src == document.getElementById("expandImage").src) { expand(imageItem); } else { collapse(imageItem); } } // helper function expand(imageItem) { imageItem.src = document.getElementById("collapseImage").src; imageItem.alt = document.getElementById("collapseImage").alt; var section = imageItem.parentNode.parentNode; do { section = section.nextSibling; } while (section && !section.tagName || section.tagName.toLowerCase() != "div"); if (section != null) { section.style.display = ""; } } // helper function collapse(imageItem) { imageItem.src = document.getElementById("expandImage").src; imageItem.alt = document.getElementById("expandImage").alt; var section = imageItem.parentNode.parentNode; do { section = section.nextSibling; } while (section && !section.tagName || section.tagName.toLowerCase() != "div"); if (section != null) { section.style.display = "none"; } } function ExpandCollapse_CheckKey(imageItem) { if(window.event.keyCode == 13) ExpandCollapse(imageItem); } function OpenSection(imageItem) { } function ExpandCollapseAll(imageItem) { if (imageItem.src == document.getElementById("expandAllImage").src) { expandAll(imageItem) } else { collapseAll(imageItem); } } //helper function expandAll(imageItem) { var switches = document.getElementsByName("toggleSwitch"); imageItem.src = document.getElementById("collapseAllImage").src; imageItem.alt = document.getElementById("collapseAllImage").alt; document.getElementById("collapseAllLabel").style.display = "inline"; document.getElementById("expandAllLabel").style.display = "none"; for (var i = 0; i < switches.length; ++i) { expand(switches[i]); } } //helper function collapseAll(imageItem) { var switches = document.getElementsByName("toggleSwitch"); imageItem.src = document.getElementById("expandAllImage").src; imageItem.alt = document.getElementById("expandAllImage").alt; document.getElementById("collapseAllLabel").style.display = "none"; document.getElementById("expandAllLabel").style.display = "inline"; for (var i = 0; i < switches.length; ++i) { collapse(switches[i]); } } function SetLanguage(key) { } function loadAll(){ } function saveAll(){ } function ChangeCopyCodeIcon(spanItem) { try { var imageItem = getCopyCodeImageItem(spanItem); if (imageItem.src == document.getElementById("copyImage").src) { imageItem.src = document.getElementById("copyHoverImage").src; } else { imageItem.src = document.getElementById("copyImage").src; } } catch (ex) {} } function getCopyCodeImageItem(spanItem) { var kids = spanItem.childNodes; for (var i = 0; i < kids.length; i++) { if (kids[i].className == "copyCodeImage") { return kids[i]; } } return null; } function CopyCode(spanItem) { try { var kids = spanItem.parentNode.parentNode.parentNode.childNodes; var tr = null; for (var i = 0; i < kids.length; i++) { if (kids[i].nodeName.toLowerCase() == "tr") { tr = kids[i]; } } if (tr != null) { var code = tr.lastChild.firstChild.innerHTML; code = code.replace(/
/gi, "\n"); code = code.replace(/</gi, "<"); code = code.replace(/>/gi, ">"); code = code.replace(/&/gi, "&"); code = code.replace(/"/gi, "\""); try { // works in IE only window.clipboardData.setData("Text", code); } catch (ex) { popCodeWindow(code); } } } catch (e) {} } function popCodeWindow(code) { try { var codeWindow = window.open ("", "Copy the selected code", "location=0,status=0,toolbar=0,menubar =0,directories=0,resizable=1,scrollbars=1,height=400, width=400"); codeWindow.document.writeln(""); codeWindow.document.writeln(""); codeWindow.document.writeln("Copy the selected code"); codeWindow.document.writeln(""); codeWindow.document.writeln("'); codeWindow.document.writeln(code); codeWindow.document.writeln(""); codeWindow.document.writeln(""); // the selectNode function below, converted by http://www.howtocreate.co.uk/tutorials/jsexamples/syntax/prepareInline.html var ftn = "function selectNode (node) {\n\tvar selection, range, doc, win;\n\tif ((doc = node.ownerDocument) && \n\t\t(win = doc.defaultView) && \n\t\ttypeof win.getSelection != \'undefined\' && \n\t\ttypeof doc.createRange != \'undefined\' && \n\t\t(selection = window.getSelection()) && \n\t\ttypeof selection.removeAllRanges != \'undefined\') {\n\t\t\t\n\t\trange = doc.createRange();\n\t\trange.selectNode(node);\n selection.removeAllRanges();\n selection.addRange(range);\n\t} else if (document.body && \n\t\t\ttypeof document.body.createTextRange != \'undefined\' && \n\t\t\t(range = document.body.createTextRange())) {\n \n\t\t \trange.moveToElementText(node);\n \trange.select();\n }\n} "; codeWindow.document.writeln(ftn); codeWindow.document.writeln("selectNode(document.getElementById('code_text'));"); codeWindow.document.writeln(""); codeWindow.document.writeln(""); codeWindow.document.close(); } catch (ex) {} } function selectNode (node) { var selection, range, doc, win; if ((doc = node.ownerDocument) && (win = doc.defaultView) && typeof win.getSelection != 'undefined' && typeof doc.createRange != 'undefined' && (selection = window.getSelection()) && typeof selection.removeAllRanges != 'undefined') { range = doc.createRange(); range.selectNode(node); selection.removeAllRanges(); selection.addRange(range); } else if (document.body && typeof document.body.createTextRange != 'undefined' && (range = document.body.createTextRange())) { range.moveToElementText(node); range.select(); } } function CopyCode_CheckKey(spanItem) { if(window.event.keyCode == 13) CopyCode(spanItem); }