/* Author: 

*/


	window.log = function(){
	  log.history = log.history || [];
	  log.history.push(arguments);
	  arguments.callee = arguments.callee.caller;  
	  if(this.console) console.log( Array.prototype.slice.call(arguments) );
	};
	(function(b){function c(){}for(var d="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),a;a=d.pop();)b[a]=b[a]||c})(window.console=window.console||{});


	
	function GetTimeStamp(z) {
		if(z.length >= 1) {
			if((z.indexOf('p') < 0) && (z.indexOf('P') < 0) && (z.indexOf('a') < 0) && (z.indexOf('A') < 0)) {
				if((parseInt(z) > 6) && (parseInt(z) < 12))
					z = z + 'am';
				else
					z = z + 'pm';
			}
			var shift = false;
			if(z.indexOf('12:') >= 0) { z = z.replace("12:","1:"); shift = true; }
			if(z.indexOf('12p') >= 0) { z = z.replace("12p","1p"); shift = true; }
			if(z.indexOf('12 p') >= 0) { z = z.replace("12 p","1 p"); shift = true; }
			z = Date.parse('January 1, 2011 ' + z).getTime();
			if(shift)
				z = z - (60*60*1000);
			return z / 1000;
		}
		else
			return 0;		
	} 



	function DumpObject(obj, name, indent, depth) {
		var MAX_DUMP_DEPTH = 10;
		var real_indent = "  ";
		if(!indent)
			indent = real_indent;
		if (depth > MAX_DUMP_DEPTH)
			return indent + name;
		if (typeof obj == "object") {
			var child = null;
			var output = indent + name + "\n";
			indent += real_indent;
			for (var item in obj) {
				try {
					child = obj[item];
				} catch (e) {
					child = "<Unable to Evaluate>";
				}
				if (typeof child == "object")
					output += DumpObject(child, item, indent, depth + 1);
				else
					output += indent + item + ": " + child + "\n";
			}
			return output;
		} 
		else
			return  obj;
	}


















