		function signpost(){
		
		setInterval('whatdateisit()',1000); //call the clock every second

		}
		
		
			function whatdateisit(){
				
				TimeAndDate = new Date(); //get the date
				
				//Hours for when using a 24 hr clock:
				hours = TimeAndDate.getHours(); //get the hours
				hourString="0"+hours+""; //This gives us a minimum string length of 2 digits
				hour1=parseInt(hourString.charAt(hourString.length-2)); //here is the first digit for the hours
				hour2=parseInt(hourString.charAt(hourString.length-1)); //here is the second digit for the hours
				Nxxx="Nxxx"+hour1+"";								//Form the image ID for hour1
				xNxx="xNxx"+hour2+"";								//Form the image ID for hour2
				
				minutes = TimeAndDate.getMinutes(); //get the minutes
				minuteString="0"+minutes+""; //This gives us a guaranteed minimum string length of 2 digits
				minute1=parseInt(minuteString.charAt(minuteString.length-2)); //here is the first digit for the minutes
				minute2=parseInt(minuteString.charAt(minuteString.length-1)); //here is the second digit for the minutes
				xxNx="xxNx"+minute1+"";									  //Form the image ID for minute1
				xxxN="xxxN"+minute2+"";									  //Form the image ID for minute2				
				
				seconds = TimeAndDate.getSeconds(); //get the seconds
				secondString="0"+seconds+""; //This gives us a guaranteed minimum string length of 2 digits
				second1=parseInt(secondString.charAt(secondString.length-2)); //here is the first digit for the seconds
				second2=parseInt(secondString.charAt(secondString.length-1)); //here is the second digit for the seconds
				secNxImg="secNxImg"+second1+"";								  //Form the image ID for second1
				secxNImg="secxNImg"+second2+"";								  //Form the image ID for second2
				
				days = TimeAndDate.getDay(); //get the day of the week (1-7). As there will only ever be a single digit for this, we need do no more parsing
				
				dom = TimeAndDate.getDate(); //get the day of the month (1-31). It doesn't matter if this is one or two digits
				
				month = TimeAndDate.getMonth(); //get the month (0-11). It doesn't matter if this is one or two digits either
				
				year = TimeAndDate.getFullYear(); //get the year. Four-digit year.
				
				weekdaysImg="weekdaysImg"+days+"";
				domsImg="domsImg"+dom+"";
				monthsImg="monthsImg"+month+"";
				yearsImg="yearsImg"+year+"";
				
								
				//below is the bit for writing the time to the canvas (which has the ID of 'Signpost'):
				var ctx = document.getElementById('Signpost').getContext('2d'); 	//define the canvas				
				ctx.clearRect(0,0,654,450); 										// clear canvas  
				ctx.drawImage(document.getElementById('backgroundImg'),0,0);		//Draw the background
				
				//Digits for the time:
				ctx.drawImage(document.getElementById(Nxxx),292,135);  				//Get the image for the 1st hrs  digit onto the canvas				
				ctx.drawImage(document.getElementById(xNxx),313,135);  				//Get the image for the 2st hrs  digit onto the canvas															
				ctx.drawImage(document.getElementById(xxNx),344,133);				//Get the image for the 1st mins digit onto the canvas  																	
				ctx.drawImage(document.getElementById(xxxN),369,132);				//Get the image for the 2nd mins digit onto the canvas  													
					
				ctx.drawImage(document.getElementById('separatorImg'),335,140);		//Get the image for the separator  													
				
				ctx.drawImage(document.getElementById(secNxImg),396,132);			//Get the image for the 1st secs digit onto the canvas  													
				ctx.drawImage(document.getElementById(secxNImg),419,131);			//Get the image for the 2nd secs digit onto the canvas  													
				
				
				ctx.drawImage(document.getElementById(yearsImg),411,365);			//Get the image for year onto the canvas  													
				ctx.drawImage(document.getElementById(monthsImg),409,321);			//Get the image for month onto the canvas  													
				ctx.drawImage(document.getElementById(weekdaysImg),142,322);		//Get the image for weekdays onto the canvas
				ctx.drawImage(document.getElementById(domsImg),140,360);			//Get the image for the day of the month onto the canvas  													


			}
		

