﻿




// Define the CurrTime variable to be the current time converted to UTC.

var CurrTime = new Date();
CurrTime = Date.UTC(CurrTime.getUTCFullYear(), CurrTime.getUTCMonth(), CurrTime.getUTCDate(), CurrTime.getUTCHours(), CurrTime.getUTCMinutes());


function GetDuration(DateStr)

{

var Min1 = 60000;
var Hour1 = 3600000;
var Day1 = 86400000;
var Week1 = 604800000;
var Mins120 = 7200000;
var Hours48 = 172800000;
var Days14 = 1209600000;

var PostTime;
var TimeDiff;
var Duration;
var BogusDate;


PostTime = new Date(DateStr);
PostTime = PostTime.getTime();

TimeDiff = CurrTime - PostTime;

if (TimeDiff > 0)
	{
	if (TimeDiff < Mins120)
		{
		TimeDiff = parseInt(TimeDiff / Min1);
		Duration = String(TimeDiff) + ' minutes ago';
		}
	else if (TimeDiff < Hours48)
		{
		TimeDiff = parseInt(TimeDiff / Hour1);
		Duration = String(TimeDiff) + ' hours ago';
		}
	else if (TimeDiff < Days14)
		{
		TimeDiff = parseInt(TimeDiff / Day1);
		Duration = String(TimeDiff) + ' days ago';
		}
	else
		{
		TimeDiff = parseInt(TimeDiff / Week1);
		Duration = String(TimeDiff) + ' weeks ago';
		}
	}
else
	{
	Duration = '';
	}
return Duration;

}

// Write the document.

document.write('<center>');
document.write('<table border="1" rules="none" bordercolor="#777777" cellpadding="2" cellspacing="0" width="120" bgcolor="#CCCCCC">');
document.write('<tr>');
document.write('<td bgcolor="#000000" width="1"/>');
document.write('<td bgcolor="#000000">');
document.write('<center>');
document.write('<font color="#FFFFFF"><b>CrimeSpot<br/><i>Express</i></b></font>');
document.write('</center>');
document.write('</td>');
document.write('<td bgcolor="#000000" width="1"/>');
document.write('</tr>');





var sourceTitle = 'Do Some Damage';
var postTitle = 'Further On Down The Road';
var postURL = 'http://dosomedamage.blogspot.com/2010/02/further-on-down-road.html';
var postSummary = 'By Jay Stringer I finally saw The Road at the weekend. I didn ’t hold off for any particular reason, I wasn ’t to scared...';
var postAuthor = 'Jay Stringer';
var postCreatedUTC = 'Feb  9 2010  8:00AM';
var postCreatedLocal = 'Feb  9 2010  3:00AM';



document.write('<tr>');
document.write('<td/>');
document.write('<td valign="top">');
document.write('<br/>');
document.write('<center>');
document.write('<b>' + sourceTitle + '</b><br/>');
document.write('<font size="-1">');
document.write('<a href="' + postURL + '"><b>' + postTitle + '</b></a><br/>');
document.write('</font>');
document.write('</center>');
document.write('<font size="-1">');
document.write(postSummary);
document.write('<br/>');
document.write('<center>');





document.write('<font color="gray">by </font><font color="#FF8000">' + postAuthor + '</font><br/>');





var Duration;

Duration = GetDuration(postCreatedUTC + ' GMT');

if (Duration == '')
	{
	document.write('<font color="gray">at </font>' + postCreatedLocal);
	}
else
	{
	document.write('<font color="red">' + Duration + '</font>');
	}

document.write('</td>');
document.write('<td/>');
document.write('</tr>');
document.write('<tr>');
document.write('<td/>');
document.write('<td bgcolor="gray"/>');
document.write('<td/>');
document.write('</tr>');





var sourceTitle = 'Detectives Beyond Borders';
var postTitle = 'We have lots of winners ...';
var postURL = 'http://detectivesbeyondborders.blogspot.com/2010/02/we-have-lots-of-winners.html';
var postSummary = '... but only two get books. So many eye-opening and thought-provoking replies poured in for Friday&#39;s competition about fallen cities that I&#39;ll award two copies...';
var postAuthor = 'Peter Rozovsky';
var postCreatedUTC = 'Feb  9 2010  7:53AM';
var postCreatedLocal = 'Feb  9 2010  2:53AM';



document.write('<tr>');
document.write('<td/>');
document.write('<td valign="top">');
document.write('<br/>');
document.write('<center>');
document.write('<b>' + sourceTitle + '</b><br/>');
document.write('<font size="-1">');
document.write('<a href="' + postURL + '"><b>' + postTitle + '</b></a><br/>');
document.write('</font>');
document.write('</center>');
document.write('<font size="-1">');
document.write(postSummary);
document.write('<br/>');
document.write('<center>');





document.write('<font color="gray">by </font><font color="#FF8000">' + postAuthor + '</font><br/>');





var Duration;

Duration = GetDuration(postCreatedUTC + ' GMT');

if (Duration == '')
	{
	document.write('<font color="gray">at </font>' + postCreatedLocal);
	}
else
	{
	document.write('<font color="red">' + Duration + '</font>');
	}

document.write('</td>');
document.write('<td/>');
document.write('</tr>');
document.write('<tr>');
document.write('<td/>');
document.write('<td bgcolor="gray"/>');
document.write('<td/>');
document.write('</tr>');





var sourceTitle = 'Crime Watch';
var postTitle = 'Good Reading magazine: crime fiction-related contents in the February issue';
var postURL = 'http://kiwicrime.blogspot.com/2010/02/good-reading-magazine-crime-fiction.html';
var postSummary = 'As I said last year , one of the magazines I write reviews and books-related features for is Good Reading , the Australian-based "magazine for...';
var postAuthor = 'Kiwicraig';
var postCreatedUTC = 'Feb  9 2010  7:01AM';
var postCreatedLocal = 'Feb  9 2010  7:01AM';



document.write('<tr>');
document.write('<td/>');
document.write('<td valign="top">');
document.write('<br/>');
document.write('<center>');
document.write('<b>' + sourceTitle + '</b><br/>');
document.write('<font size="-1">');
document.write('<a href="' + postURL + '"><b>' + postTitle + '</b></a><br/>');
document.write('</font>');
document.write('</center>');
document.write('<font size="-1">');
document.write(postSummary);
document.write('<br/>');
document.write('<center>');





document.write('<font color="gray">by </font><font color="#FF8000">' + postAuthor + '</font><br/>');





var Duration;

Duration = GetDuration(postCreatedUTC + ' GMT');

if (Duration == '')
	{
	document.write('<font color="gray">at </font>' + postCreatedLocal);
	}
else
	{
	document.write('<font color="red">' + Duration + '</font>');
	}

document.write('</td>');
document.write('<td/>');
document.write('</tr>');
document.write('<tr>');
document.write('<td/>');
document.write('<td bgcolor="gray"/>');
document.write('<td/>');
document.write('</tr>');





document.write('<tr>');
document.write('<td/>');
document.write('<td>');
document.write('<br/>');
document.write('<center>');
document.write('<font size="-1"><i>Read the rest at</i></font><br/><a href="http://www.CrimeSpot.net"><b>CrimeSpot.net</b></a>');
document.write('</center>');
document.write('</td>');
document.write('<td/>');
document.write('</tr>');
document.write('<tr>');
document.write('<td colspan="3">');
document.write('&nbsp;');
document.write('</td>');
document.write('</tr>');
document.write('</table>');
document.write('</center>');


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   