/*

	Dump - Recursive Javscript Object Dumper
	
	This function opens a window with a walkable tree of all of the elements
	within a given object.

*/

debugWin = null;
function dump(obj, caption, width, height) {

	if (obj != null) {
		if (debugWin) {
			debugWin.close();
		}
		
		if (!width) {
			width = 500;
		}
		if (!height) {
			height = 300;
		}
		
		debugWin = window.open("/globals/js/dump/dump.html", "debugWin", "width=" + width + ",height=" + height + ",toolbar=no,scrollbars=yes,resizable=yes");
		debugWin.debugObj = obj;
		debugWin.debugCaption = caption;
		debugWin.focus();
	} else {
		alert("Object is null");
	}
	
}

