
function convertAtomDateString(str) { 
	//YYYY-MM-DDThh:mm:ss[.f*](Z|-hh:mm|+hh:mm)
	var months = new Array("","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
	var year, month, date, hour, minute, second, offset;
	year = str.slice(0,4);
	month = str.slice(5,7);		//Jan-Dec
	date = str.slice(8,10);		//01-31
	hour = str.slice(11,13);	//00-23
	minute = str.slice(14,16);	//00-59
	second = str.slice(17,19);	//00-59
	offset = "GMT";
	if(str.indexOf("Z") == -1)	//time zone offset specified
	{
		var x = str.lastIndexOf(":");
		offset += str.slice(x-3,x) + str.slice(x+1);
	}
	var thisdate = new Date();
	thisdate.setFullYear(year);
	thisdate.setMonth(month-1);
	thisdate.setDate(date);
	thisdate.setHours(hour);
	thisdate.setMinutes(minute);
	thisdate.setSeconds(second);
	
	showhours = (thisdate.getHours().toString().length == 1) ? "0"+thisdate.getHours().toString():thisdate.getHours().toString() ;
	showminutes = (thisdate.getMinutes().toString().length == 1) ? "0"+thisdate.getMinutes().toString():thisdate.getMinutes().toString() ;

	//DD MMM YYYY hh:mm:ss GMT[(+|-)hhmm]
	//return thisdate.toDateString()+' '+thisdate.toTimeString()+' '+offset;
	return thisdate.toDateString()+' '+showhours+":"+showminutes+" "+offset;
}
