function JSON2string (jsonobject,prefix) {
if (!prefix) prefix="";
if (typeof(jsonobject)=="string") return jsonobject;
if (typeof(jsonobject)=="number") return jsonobject.toString();
if (typeof(jsonobject)=="object") {
var s="Object:\n"
var newprefix=" "+prefix;
for (var i in jsonobject) s+=prefix+i+"="+JSON2String(jsonobject[i],newprefix)+"\n";
return s;
}
return "";
}