	var now,highest,retval,cmd,alttext,captext;
      
	 highest=22;
	 retval = 0;
	 alttext=" ";
	 captext="xxxxxx";
	 now = new Date();
	 mills= now.getSeconds();
	
	 mills=Math.floor(Math.random()*9999)
	 numone=Math.floor(mills/highest);
	 numone=numone*highest;
	 retval=mills-numone+1;
	

	 //document.write(mills+"  "+numone+"  "+retval);
	 //zz=parent.left.window.document.title;
	 if (retval<10) retval="0"+retval;
//
	if (retval==1) captext = "Loch Tay"
	if (retval==2) captext = "Taymouth Castle"
	if (retval==3) captext = "The bridge at Kenmore"
	if (retval==4) captext = "Looking down the Tummel Valley"
	if (retval==5) captext = "Blair Atholl Castle"
	if (retval==6) captext = "Deer grazing in Blair Atholl"
	if (retval==7) captext = "Killiecrankie"
	if (retval==8) captext = "Killiecrankie"
	if (retval==9) captext = "Dunkeld Abbey"
	if (retval==10) captext = "Bridge over the Tay at Dunkeld"
	if (retval==11) captext = "The Tay at Dunkeld"
	if (retval==12) captext = "Ice on the River Ericht in Blairgowrie"
	if (retval==13) captext = "Rowan trees at Aberfeldy. Picture by Chas Webb"
	if (retval==14) captext = "The Glen Lyon countryside. Picture by Chas Webb"
	if (retval==15) captext = "Roadside cattle in Glen Lyon. Picture by Chas Webb"
	if (retval==16) captext = "The barren Glenshee landscape. Picture by Chas Webb"
	if (retval==17) captext = "Loch Rannoch. Picture by Chas Webb"
	if (retval==18) captext = "Loch Tay. Picture by Chas Webb"
	if (retval==19) captext = "The bridge at Perth. Picture by Chas Webb"
	if (retval==20) captext = "The South Inch in Perth. Picture by Chas Webb"
	if (retval==21) captext = "Wintertime in Rosemount, Blairgowrie. <br> Picture by Chas Webb"
	if (retval==22) captext = "Winter driving outside Blairgowrie. Picture by Chas Webb"
	alttext='"'+captext+'"';
         //alert(alttext);
//
//
	 cmd='document.write ('+"'"+'<div class="float"> <IMG SRC="../assets/random/random'+retval+'.jpg"  BORDER=3 ALT='+alttext+' ><br>'+captext+'</div>'+"')";
//
//
	//document.write(cmd);
	// alert(cmd);
	eval(cmd);
		
