/****************************************************************************************/
/* Define function for printing trace information										*/
/****************************************************************************************/
var traceWindow;

function traceJS(message) {
	
	// Create trace window if it doesn't exist
	if( traceWindow ) {
		
		traceWindow.document.write(message);
		
	} else {
		
		windowPrefs = 'toolbar=0,location=0,directories=0,status=0,menubar=0,' &
					  'scrollbars=yes,resizable=yes,width=50,height=50,top=0,left=0'
		traceWindow = window.open('',				// Open blank page (no URL)
								  'Debug Trace',	// Window title
								  windowPrefs,		// Window Preferences
								  false);			// Do Not Replace Current Window
	
		traceWindow.document.open();
		traceWindow.document.write(message);
	
	}

	
}

function clearJS() {
	
	traceWindow.document.open();
	
}
