function var_dump(ob, level)
{
	var sHTML = "";
	var level = (level == null) ? 1 : level;
	if (typeof(ob) == "object") {
		for(var i in ob) {
			if (typeof(ob[i]) == "object") {
				sHTML += str_repeat('&nbsp;',4*level) + "<strong>" + i + "</strong>" + " (<i>Object</i>) " + "=&gt;<br><br>" + var_dump(ob[i],(level + 1));
			}
			else {
				sHTML += str_repeat('&nbsp;',4*level) + "<strong>" + i + "</strong>" + " =&gt; "  + "(<i>" + UCFirst(typeof(ob[i])) + "</i>) " + ob[i] + "<br><br>";
			}
		}
	}
	else {
		sHTML = str_repeat('&nbsp;',4*level) + "(<i>" + UCFirst(typeof(ob)) + "</i>) " + ob + "<br><br>";
	}

	return sHTML
}

function str_repeat (input, multiplier)
{
	var buf = '';
	for (i=0; i < multiplier; i++) {
		buf += input;
	}

	return buf;
}

function UCFirst(str)
{
	firstChar = str.substring(0,1);
	remainChar = str.substring(1);
	firstChar = firstChar.toUpperCase();
	remainChar = remainChar.toLowerCase();

	return firstChar + remainChar
}


function ShowInWin(str)
{
	win_ = open("", "debugWindow", "width=500,height=400,status=yes,toolbar=yes,menubar=yes,scrollbars=yes");
	win_.document.open("text/html");
	win_.document.writeln(str);
	win_.document.close();  
}

function var_prop(el)
{
	var str = '';
	for (i in el)
		try
		{
			str += String(i+' -> '+el[i]+'<br/>');
		}
		catch(e)
		{
			alert(e);
		}
	return str; 
}

function vp(el)
{
	ShowInWin(var_prop(el));
}

function vd(el)
{
	ShowInWin(var_dump(el));
}