/**
 * Accuraty: Jeremy's hack to format the time output appropriately
 * 
 * Version: 0.9.0
 * (c) Copyright 2010, Accuraty Solutions, LLC
 * 
 * Description: additional custom Function for "Date" (using prototype)
 * 
 * History:
 * 0.9.0 - Got first version working
 *
 **/

Date.prototype.TimeFormat = function() {
	var returnStr = '';
//	var inDate = new Date(this);
	var a_p = '';
	
	var curr_hour = this.getHours();
	if (curr_hour < 12)
	   { a_p = 'AM'; }
	else
	   { a_p = 'PM'; }
	if (curr_hour == 0)
	   { curr_hour = 12; }
	if (curr_hour > 12)
	   { curr_hour = curr_hour - 12; }
	
	var curr_min = this.getMinutes();
	curr_min = curr_min + '';
	if (curr_min.length == 1)
	   {
	   curr_min = '0' + curr_min;
	   }

	returnStr = '' + curr_hour.toString() + ':' + curr_min.toString() + ' ' + a_p ;
	return returnStr;
};
