﻿window.Common = window.Common || new (function()
{
	this.toJSON = function(object)
	{
		if (object == null) return "";
		if (typeof object == "string") return "'" + object + "'";
		if (typeof object != "object") return object;

		var array = [];
		var isArray = object instanceof Array;

		for (var key in object)
		{
			array.push(isArray ? Common.toJSON(object[key]) : key + ":" + Common.toJSON(object[key]));
		}

		return isArray ? "[" + array.toString() + "]" : "{" + array.toString() + "}";
	}
})();

if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();