function MenuPhoto(Serial)
// generates random photo for homepage background
{
if(Serial)
	{
	// specific Photo
	}
else
	{
	PhotoPoint=new Date()
	PhotoMonth=PhotoPoint.getMonth()+1
	if (PhotoMonth<10) {PhotoMonth='0'+PhotoMonth}
	PhotoDate=PhotoPoint.getDate()
	if (PhotoDate<10) {PhotoDate='0'+PhotoDate}
	PhotoMonthDate=PhotoMonth+PhotoDate

	switch(PhotoMonthDate)
		{
		// specific dates
		case '9999':
			PhotoNumber=0;
			break;
			default:
		// random Photo
		DeciSeconds=PhotoPoint/100
		choices=7
		PhotoNumber=Math.floor(choices*(DeciSeconds/choices-Math.floor(DeciSeconds/choices)));
		break;
		}
	}

// enable to test latest
//PhotoNumber=choices-1

switch(PhotoNumber)
{
case 0:
	Caption="The A30 in Devon";
	Source="A30.jpg";
	break;
case 1:
	Caption="The Fosseway in Leicestershire";
	Source="Fosseway.jpg";
	break;
case 2:
	Caption="The M6 in Cumbria";
	Source="M6_Cumbria.jpg";
	break;
case 3:
	Caption="A9 Perthshire";
	Source="A9_Procession.jpg";
	break;
case 4:
	Caption="A road in the New Forest";
	Source="NewForest.jpg";
	break;
case 5:
	Caption="A51 Rugeley bypass, Staffs";
	Source="A51_Rugeley.jpg";
	break;
case 6:
	Caption="Lairg, Highland";
	Source="Lairg.jpg";
	break;

default:
	Caption="&ldquo;Click for more Photos";
	Source="ABD";
	break;

	}
	
Source = 'url(graphics/backgrounds/' + Source + ')'
document.getElementById('PhotoCaption').innerHTML='Photo: '+Caption;
document.getElementById('PageRight').style.backgroundImage=Source;
document.getElementById('PageRight').style.backgroundPosition='center';
document.getElementById('PageRight').style.backgroundAttachment='fixed';
}
