function getAtomDate(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 = months[1*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);
    }

    //DD MMM YYYY hh:mm:ss GMT[(+|-)hhmm]
    var s = date+" "+month+" "+year+" "+hour+":"+minute+":"+second+" "+offset;
    //alert(new Date(s));
    return new Date(s);
}
