﻿function csFixDWActiveMenu() {
	var aSPANs, oSPAN, s=0;
	aSPANs = document.getElementsByTagName("span");
	while(oSPAN = aSPANs[s++]) {
		if (oSPAN.className == "L1_Active") {
			oSPAN.parentNode.setAttribute("id", "activemenu", 0);
			break;
		}
	}
}

/*
	Very simple debugging
*/
IDE_DEBUG_STACK = "";
function csPostMessage(msg) {
	IDE_DEBUG_STACK += ((IDE_DEBUG_STACK == "" ? "" : "|") + msg);
}

function csViewMessages() {
	var dbgWin = window.open("", "", "width=500,height=500");
	with (dbgWin) {
		document.write('<body><h1>Debug Info</h1><ol><li>' + IDE_DEBUG_STACK.split("|").join("</li><li>") + '</li></ol></body>');
	}
}
