// now for the AJAX stuff .... first we need an XMLHTTP object var http = false; if (window.XMLHttpRequest) { // Mozilla, Safari,... http = new XMLHttpRequest(); if (http.overrideMimeType) { http.overrideMimeType('text/xml'); } } else if (window.ActiveXObject) { // IE try { http = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { http = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { } } } if (!http) { alert('Cannot create an XMLHTTP instance'); } function initContextMenu() { // check whether user is logged into CMS and if so, create a DIV to display // the link to the CMS mini-menu if the DIV doesn't already exist if (loggedIntoCMS()) { if (!document.getElementById('contextHeaderDiv')) { // for menu toggling, put // around the .. below and change the showOrHideMenu() document.body.insertAdjacentHTML("afterBegin", "