function var_dump(obj) {
if(typeof(obj) == "object") {
var txt = '';
for(key in obj)
{
txt += key + '=' + obj[key] + ',';
}
return "Type: "+typeof(obj)+((obj.constructor) ? "\nConstructor: "+obj.constructor : "")+"\nValue: " + txt;
} else {
return "Type: "+typeof(obj)+"\nValue: "+obj;
}
}