function EventObj(Title, StartDate, Company, Venue, Price, Link) {
  this.title = Title;
  this.startdate = StartDate;
  this.company = Company;
  this.venue = Venue;
  this.price = Price;
  this.link = Link;
}
document.writeln('<font face="Verdana, Arial" size="2" color="#000000">');document.writeln('<p>Found 4 event/s in Sheffield...</p>');
var events = [];
events[0] = new EventObj('Speed Dating', 'Sun 1st August', 'When the Music Stops', 'Ha! Ha! Bar', '16.00', 'http://www.whenthemusicstops.com/speeddating.php?id=4341&aff=datingtrail');
events[1] = new EventObj('Speed Dating', 'Tue 24th August', 'Slow Dating', 'The Bessemer', '20.00', 'http://scripts.affiliatefuture.com/AFClick.asp?affiliateID=117114&merchantID=359&programmeID=1267&mediaID=0&tracking=&url=http://www.slowdating.com/speed-dating/Sheffield/102671.aspx?external=true');
events[2] = new EventObj('Speed Dating', 'Tue 21st September', 'Slow Dating', 'The Bessemer', '20.00', 'http://scripts.affiliatefuture.com/AFClick.asp?affiliateID=117114&merchantID=359&programmeID=1267&mediaID=0&tracking=&url=http://www.slowdating.com/speed-dating/Sheffield/102768.aspx?external=true');
events[3] = new EventObj('Speed Dating', 'Tue 19th October', 'Slow Dating', 'The Bessemer', '20.00', 'http://scripts.affiliatefuture.com/AFClick.asp?affiliateID=117114&merchantID=359&programmeID=1267&mediaID=0&tracking=&url=http://www.slowdating.com/speed-dating/Sheffield/102769.aspx?external=true');
document.writeln('<table width="100%">');
document.writeln('<thead>');
document.writeln('<tr>');
document.writeln('<th align="left"><font face="Verdana, Arial" size="1" color="#000000">Date</font></td>');
document.writeln('<th align="left"><font face="Verdana, Arial" size="1" color="#000000">Event type</font></td>');
document.writeln('<th align="left"><font face="Verdana, Arial" size="1" color="#000000">Venue</font></td>');
document.writeln('<th align="right"><font face="Verdana, Arial" size="1" color="#000000">Price</font></td>');
document.writeln('<th> </td>');
document.writeln('</tr>');
document.writeln('</thead>');
document.writeln('<tbody>');

for (x=0; x<4; x++) 
{ 


  document.writeln('<tr onMouseOver="style.backgroundColor=\'#C0C0C0\'" onMouseOut="style.backgroundColor=\'\'" style="cursor:hand" onClick="document.location.href=\'' + events[x].link + '\'">');
  document.writeln('<td align="left"><font face="Verdana, Arial" size="2" color="#000000">' + events[x].startdate + '</font></td>');
  document.writeln('<td align="left"><font face="Verdana, Arial" size="2" color="#000000">' + events[x].title + '</font></td>');
  document.writeln('<td align="left"><font face="Verdana, Arial" size="2" color="#000000">' + events[x].venue + '</font></td>');
  document.writeln('<td align="right"><font face="Verdana, Arial" size="2" color="#000000">£' + events[x].price + '</font></td>');
  document.writeln('<td align="right"><font face="Verdana, Arial" size="2" color="blue"><a href="' + events[x].link + '" target="_blank" title="Click here for more information" style="color: #800000"><strong>More Info / Book</strong></a></font></td>');
  document.writeln('</tr>');
} 

document.writeln('</tbody>');
document.writeln('</table>');
document.writeln('</font>');