function tidyDate (workingDate)
{
var monthNames = new Array ("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");
var dayNames = new Array ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
var thisDayName = dayNames[workingDate.getDay()];
var thisDay = workingDate.getDate();
var thisMonth = monthNames[workingDate.getMonth()];
var thisYear = workingDate.getFullYear();
var formattedDate =  thisDayName +  ", " + thisDay +  "-" + thisMonth + "-" + thisYear;
return  formattedDate;
}

function sortDates(newsHeadlines) {
  var x, y, holder;
  // The Bubble Sort method.
  for(x = 0; x < newsHeadlines.length; x++) {
    for(y = 0; y < (newsHeadlines.length-1); y++) {
      if(newsHeadlines[y][3] > newsHeadlines[y+1][3]) {
        holder = newsHeadlines[y+1];
        newsHeadlines[y+1] = newsHeadlines[y];
        newsHeadlines[y] = holder;
      }
    }
  }


}

//******* EDIT AREA FOR 'LATEST NEWS' HEADLINES AND FILES !!! ***************


var newsHeadlines = new Array();

newsHeadlines[newsHeadlines.length] = new Array();

newsHeadlines[newsHeadlines.length-1][0] =  "Basic Skills Award";
newsHeadlines[newsHeadlines.length-1][1] =  "news036.htm";
newsHeadlines[newsHeadlines.length-1][2] =  "Good news for the new year...";
tempDate = new Date ();
tempDate.setDate(10);			//Enter the date (a number between 1 and 31) 
tempDate.setMonth(0);			//Enter the month as a number (0-Jan, 11-Dec)
tempDate.setFullYear(2008);			//Enter the year
newsHeadlines[newsHeadlines.length-1][3] =  tempDate;

newsHeadlines[newsHeadlines.length] = new Array();

newsHeadlines[newsHeadlines.length-1][0] =  "New Assembly Topic";
newsHeadlines[newsHeadlines.length-1][1] =  "news037.htm";
newsHeadlines[newsHeadlines.length-1][2] =  "The focus for this term...";
tempDate = new Date ();
tempDate.setDate(10);			//Enter the date (a number between 1 and 31) 
tempDate.setMonth(0);			//Enter the month as a number (0-Jan, 11-Dec)
tempDate.setFullYear(2008);			//Enter the year
newsHeadlines[newsHeadlines.length-1][3] =  tempDate;

newsHeadlines[newsHeadlines.length] = new Array();

newsHeadlines[newsHeadlines.length-1][0] =  "End of Term Reports";
newsHeadlines[newsHeadlines.length-1][1] =  "news038.htm";
newsHeadlines[newsHeadlines.length-1][2] =  "Parent's Comments pages ...";
tempDate = new Date ();
tempDate.setDate(10);			//Enter the date (a number between 1 and 31) 
tempDate.setMonth(0);			//Enter the month as a number (0-Jan, 11-Dec)
tempDate.setFullYear(2008);			//Enter the year
newsHeadlines[newsHeadlines.length-1][3] =  tempDate;

newsHeadlines[newsHeadlines.length] = new Array();

newsHeadlines[newsHeadlines.length-1][0] =  "Car Parking";
newsHeadlines[newsHeadlines.length-1][1] =  "news039.htm";
newsHeadlines[newsHeadlines.length-1][2] =  "Complaints!";
tempDate = new Date ();
tempDate.setDate(10);			//Enter the date (a number between 1 and 31) 
tempDate.setMonth(0);			//Enter the month as a number (0-Jan, 11-Dec)
tempDate.setFullYear(2008);			//Enter the year
newsHeadlines[newsHeadlines.length-1][3] =  tempDate;

newsHeadlines[newsHeadlines.length] = new Array();

newsHeadlines[newsHeadlines.length-1][0] =  "Children in Need";
newsHeadlines[newsHeadlines.length-1][1] =  "news040.htm";
newsHeadlines[newsHeadlines.length-1][2] =  "Taking part...";
tempDate = new Date ();
tempDate.setDate(7);			//Enter the date (a number between 1 and 31) 
tempDate.setMonth(10);			//Enter the month as a number (0-Jan, 11-Dec)
tempDate.setFullYear(2007);			//Enter the year
newsHeadlines[newsHeadlines.length-1][3] =  tempDate;


newsHeadlines[newsHeadlines.length] = new Array();

newsHeadlines[newsHeadlines.length-1][0] =  "Homework";
newsHeadlines[newsHeadlines.length-1][1] =  "news041.htm";
newsHeadlines[newsHeadlines.length-1][2] =  "Online assisted learning...";
tempDate = new Date ();
tempDate.setDate(7);			//Enter the date (a number between 1 and 31) 
tempDate.setMonth(10);			//Enter the month as a number (0-Jan, 11-Dec)
tempDate.setFullYear(2007);			//Enter the year
newsHeadlines[newsHeadlines.length-1][3] =  tempDate;

newsHeadlines[newsHeadlines.length] = new Array();

newsHeadlines[newsHeadlines.length-1][0] =  "Scooter Shed";
newsHeadlines[newsHeadlines.length-1][1] =  "news042.htm";
newsHeadlines[newsHeadlines.length-1][2] =  "A place for everything...";
tempDate = new Date ();
tempDate.setDate(7);			//Enter the date (a number between 1 and 31) 
tempDate.setMonth(10);			//Enter the month as a number (0-Jan, 11-Dec)
tempDate.setFullYear(2007);			//Enter the year
newsHeadlines[newsHeadlines.length-1][3] =  tempDate;

newsHeadlines[newsHeadlines.length] = new Array();

newsHeadlines[newsHeadlines.length-1][0] =  "Road Accident outside School";
newsHeadlines[newsHeadlines.length-1][1] =  "news043.htm";
newsHeadlines[newsHeadlines.length-1][2] =  "An important message from Dr Keeble and Mr Johnson";
tempDate = new Date ();
tempDate.setDate(11);			//Enter the date (a number between 1 and 31) 
tempDate.setMonth(1);			//Enter the month as a number (0-Jan, 11-Dec)
tempDate.setFullYear(2008);			//Enter the year
newsHeadlines[newsHeadlines.length-1][3] =  tempDate;


// STORY 44
newsHeadlines[newsHeadlines.length] = new Array();

newsHeadlines[newsHeadlines.length-1][0] =  "For Parents in Year 2 and 3 - Saturday Football";
newsHeadlines[newsHeadlines.length-1][1] =  "news044.htm";
newsHeadlines[newsHeadlines.length-1][2] =  "Setting up a Football League...";
tempDate = new Date ();
tempDate.setDate(8);			//Enter the date (a number between 1 and 31) 
tempDate.setMonth(1);			//Enter the month as a number (0-Jan, 11-Dec)
tempDate.setFullYear(2008);			//Enter the year
newsHeadlines[newsHeadlines.length-1][3] =  tempDate;

// STORY 45
newsHeadlines[newsHeadlines.length] = new Array();

newsHeadlines[newsHeadlines.length-1][0] =  "Arts Week";
newsHeadlines[newsHeadlines.length-1][1] =  "news045.htm";
newsHeadlines[newsHeadlines.length-1][2] =  "A range of fun activities...";
tempDate = new Date ();
tempDate.setDate(8);			//Enter the date (a number between 1 and 31) 
tempDate.setMonth(1);			//Enter the month as a number (0-Jan, 11-Dec)
tempDate.setFullYear(2008);			//Enter the year
newsHeadlines[newsHeadlines.length-1][3] =  tempDate;

// STORY 46
newsHeadlines[newsHeadlines.length] = new Array();

newsHeadlines[newsHeadlines.length-1][0] =  "School Self-Review";
newsHeadlines[newsHeadlines.length-1][1] =  "news046.htm";
newsHeadlines[newsHeadlines.length-1][2] =  "We welcome your views...";
tempDate = new Date ();
tempDate.setDate(8);			//Enter the date (a number between 1 and 31) 
tempDate.setMonth(1);			//Enter the month as a number (0-Jan, 11-Dec)
tempDate.setFullYear(2008);			//Enter the year
newsHeadlines[newsHeadlines.length-1][3] =  tempDate;

// STORY 47
newsHeadlines[newsHeadlines.length] = new Array();

newsHeadlines[newsHeadlines.length-1][0] =  "Keeping Healthy";
newsHeadlines[newsHeadlines.length-1][1] =  "news047.htm";
newsHeadlines[newsHeadlines.length-1][2] =  "Cookery demonstrations and walking to school...";
tempDate = new Date ();
tempDate.setDate(8);			//Enter the date (a number between 1 and 31) 
tempDate.setMonth(1);			//Enter the month as a number (0-Jan, 11-Dec)
tempDate.setFullYear(2008);			//Enter the year
newsHeadlines[newsHeadlines.length-1][3] =  tempDate;

// STORY 48
newsHeadlines[newsHeadlines.length] = new Array();

newsHeadlines[newsHeadlines.length-1][0] =  "Middle School";
newsHeadlines[newsHeadlines.length-1][1] =  "news048.htm";
newsHeadlines[newsHeadlines.length-1][2] =  "Additional teacher training day...";
tempDate = new Date ();
tempDate.setDate(8);			//Enter the date (a number between 1 and 31) 
tempDate.setMonth(1);			//Enter the month as a number (0-Jan, 11-Dec)
tempDate.setFullYear(2008);			//Enter the year
newsHeadlines[newsHeadlines.length-1][3] =  tempDate;

// STORY 49
newsHeadlines[newsHeadlines.length] = new Array();

newsHeadlines[newsHeadlines.length-1][0] =  "Learning about schools in the Ukraine";
newsHeadlines[newsHeadlines.length-1][1] =  "news049.htm";
newsHeadlines[newsHeadlines.length-1][2] =  "Building links with Ukraine primary schools...";
tempDate = new Date ();
tempDate.setDate(8);			//Enter the date (a number between 1 and 31) 
tempDate.setMonth(1);			//Enter the month as a number (0-Jan, 11-Dec)
tempDate.setFullYear(2008);			//Enter the year
newsHeadlines[newsHeadlines.length-1][3] =  tempDate;

// STORY 50
newsHeadlines[newsHeadlines.length] = new Array();

newsHeadlines[newsHeadlines.length-1][0] =  "More parking problems";
newsHeadlines[newsHeadlines.length-1][1] =  "news050.htm";
newsHeadlines[newsHeadlines.length-1][2] =  "Continuing to be inconsiderate...";
tempDate = new Date ();
tempDate.setDate(13);			//Enter the date (a number between 1 and 31) 
tempDate.setMonth(1);			//Enter the month as a number (0-Jan, 11-Dec)
tempDate.setFullYear(2008);			//Enter the year
newsHeadlines[newsHeadlines.length-1][3] =  tempDate;

// STORY 51
newsHeadlines[newsHeadlines.length] = new Array();

newsHeadlines[newsHeadlines.length-1][0] =  "Building Works";
newsHeadlines[newsHeadlines.length-1][1] =  "news051.htm";
newsHeadlines[newsHeadlines.length-1][2] =  "Under construction...";
tempDate = new Date ();
tempDate.setDate(28);			//Enter the date (a number between 1 and 31) 
tempDate.setMonth(1);			//Enter the month as a number (0-Jan, 11-Dec)
tempDate.setFullYear(2008);			//Enter the year
newsHeadlines[newsHeadlines.length-1][3] =  tempDate;

// STORY 52
newsHeadlines[newsHeadlines.length] = new Array();

newsHeadlines[newsHeadlines.length-1][0] =  "Assembly Topic";
newsHeadlines[newsHeadlines.length-1][1] =  "news052.htm";
newsHeadlines[newsHeadlines.length-1][2] =  "The children have suggested...";
tempDate = new Date ();
tempDate.setDate(28);			//Enter the date (a number between 1 and 31) 
tempDate.setMonth(1);			//Enter the month as a number (0-Jan, 11-Dec)
tempDate.setFullYear(2008);			//Enter the year
newsHeadlines[newsHeadlines.length-1][3] =  tempDate;

// STORY 53
newsHeadlines[newsHeadlines.length] = new Array();

newsHeadlines[newsHeadlines.length-1][0] =  "WOW!";
newsHeadlines[newsHeadlines.length-1][1] =  "news053.htm";
newsHeadlines[newsHeadlines.length-1][2] =  "These boots are made for walking...";
tempDate = new Date ();
tempDate.setDate(28);			//Enter the date (a number between 1 and 31) 
tempDate.setMonth(1);			//Enter the month as a number (0-Jan, 11-Dec)
tempDate.setFullYear(2008);			//Enter the year
newsHeadlines[newsHeadlines.length-1][3] =  tempDate;

// STORY 54
newsHeadlines[newsHeadlines.length] = new Array();

newsHeadlines[newsHeadlines.length-1][0] =  "Arts Week";
newsHeadlines[newsHeadlines.length-1][1] =  "news054.htm";
newsHeadlines[newsHeadlines.length-1][2] =  "Art of glass...";
tempDate = new Date ();
tempDate.setDate(28);			//Enter the date (a number between 1 and 31) 
tempDate.setMonth(1);			//Enter the month as a number (0-Jan, 11-Dec)
tempDate.setFullYear(2008);			//Enter the year
newsHeadlines[newsHeadlines.length-1][3] =  tempDate;

// STORY 55
newsHeadlines[newsHeadlines.length] = new Array();

newsHeadlines[newsHeadlines.length-1][0] =  "Ukraine Visit";
newsHeadlines[newsHeadlines.length-1][1] =  "news055.htm";
newsHeadlines[newsHeadlines.length-1][2] =  "Report from Dr Keeble's visit...";
tempDate = new Date ();
tempDate.setDate(13);			//Enter the date (a number between 1 and 31) 
tempDate.setMonth(2);			//Enter the month as a number (0-Jan, 11-Dec)
tempDate.setFullYear(2008);			//Enter the year
newsHeadlines[newsHeadlines.length-1][3] =  tempDate;

sortDates(newsHeadlines);
newsHeadlines.reverse();


// *******END OF EDIT AREA !!! ***************
