// ==========================================================================================// GWD_consoleLogExtension// ==========================================================================================(function(window, undefined) {	if (!window.console) {		var console = {			elemOutput : "",			pathPics : "Pics/",			strLinefeed : "\n",			init : function() {				var domNode, domElement;				console.e = document.createElement('table');				document.body.appendChild(console.e);				var id = 'GWD_console';				if (!document.getElementById(id)) {					console.e.id = id;					console.e.summary = 'layout table';					with (console.e.style) {						backgroundColor = '#2222ff';						color = 'black';						fontFamily = 'courier, monospace';						display = 'none';						padding = '0';						margin = '0';						border = '1px solid #999';						borderCollapse = 'collapse';						position = 'absolute';						top = '0';						right = '0';						zIndex = '999';					}				}				domNode = console.e;				domNode.appendChild(document.createElement('thead'));				domNode = domNode.lastChild;				domNode.appendChild(document.createElement('tr'));				domNode = domNode.lastChild;				domElement = document.createElement('th');				with (domElement.style) {					background = '#76b2ea url('+console.pathPics+'GUI_Titlebar.gif) repeat-x';					color = 'white';					textAlign = 'left';					display = 'block';					height = '19px';					padding = '2px'					overflow = 'hidden';				}				domNode.appendChild(domElement);				domNode = domNode.lastChild;				domElement = document.createElement('img');				with (domElement) {					src = console.pathPics+'GUI_Close.gif'					alt = 'Close';					title = 'Close';					setAttribute('style', 'float:right');					setAttribute('onclick', 'console.close()');				}				with (domElement.style) {					cursor = 'pointer';				}				domNode.appendChild(domElement);				domElement = document.createElement('span');				with (domElement) {					innerHTML = 'GWD Console';					textAlign = 'left';				}				domNode.appendChild(domElement);				domNode = console.e;				domNode.appendChild(document.createElement('tfoot'));				domNode = domNode.lastChild;				domNode.appendChild(document.createElement('tr'));				domNode = domNode.lastChild;				domNode.appendChild(document.createElement('td'));				domNode = domNode.lastChild;				domElement = document.createElement('input');				with (domElement) {					type = 'button';					name = 'GWD_Reset';					value = 'Reset';					setAttribute('onclick', 'console.clear()');					setAttribute('style', 'margin:0 20px');				}				domNode.appendChild(domElement);				domElement = document.createElement('input');				with (domElement) {					type = 'button';					name = 'GWD_Close';					value = 'Close';					setAttribute('onclick', 'console.close()');					setAttribute('style', 'margin:0 20px');				}				domNode.appendChild(domElement);				domNode = console.e;				domNode.appendChild(document.createElement('tbody'));				domNode = domNode.lastChild;				domNode.appendChild(document.createElement('tr'));				domNode = domNode.lastChild;				domNode.appendChild(document.createElement('td'));				domNode = domNode.lastChild;				domElement = document.createElement('textarea');				with (domElement) {					name = 'GWD_Output';					setAttribute('wrap', 'off');				}				with (domElement.style) {					backgroundColor = '#c0c0c0';					color = 'black';					fontSize = '0.9em';					textAlign = 'left';					display = 'block';					width = '300px';					height = '200px';					margin = '0';					padding = '10px';					border = '2px solid #0000ff';					borderWidth = '0 2px 2px 2px';					overflow = 'scroll';				}				domNode.appendChild(domElement);				console.elemOutput = domNode.lastChild;				window.console = console;			},			log : function(data) {				console.elemOutput.value += data + console.strLinefeed;				console.show();			},			clear : function() {				console.elemOutput.value = '';			},			show : function() {				console.e.style.display = 'block';			},			close : function() {				console.e.style.display = 'none';			},			addWindowOnload : function() {				if(typeof window.onload!='function') {					window.onload = console.init;				} else {					var funcOnload = window.onload;					window.onload = function() {						console.init();						funcOnload();					}				}			}		};		console.addWindowOnload();	}})(window);
