if(alertLoading == true){
	alert("trace loaded!");
}
/////////////////////////////////////////////////////////////////
// tracing
var traceWindow;
function initTraceWindow(){
	var windowX = screen.availWidth - 200;
	traceWindow != undefined ? traceWindow.close() : 0;
	traceWindow = window.open('js/traceWindow.html', "debug",'top=0,left='+windowX+',width=200,height='+screen.availHeight+',toolbar=true');
	window.focus();
	if(traceWindow == undefined){
		alert("Please disable your Popup-Blocker to use the trace function!");
	} else {
		var tmp = traceWindow.document;
		tmp.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">')
		tmp.write('<head><title>popup</title></head>');
		tmp.write('<body style="font-size:11px; font-family:Courier; overflow:auto"><p id="content">DEBUG:</p><a name="bottom" id="bottom" /></body></html>');
		tmp.close();
		var content = traceWindow.document.getElementById('content');
	}
}
function trace(msg){
	try {
		content = traceWindow.document.getElementById('content');
		content.innerHTML += '<br /> ' + msg;
		traceWindow.scrollTo(0, content.offsetHeight);
	} catch(e){
		initTraceWindow();
		content = traceWindow.document.getElementById('content');
		content.innerHTML += '<br /> ' + msg;
		traceWindow.scrollTo(0, content.offsetHeight);
	};
}