// DMPPP.js
// Dunbar Memorial Parent Participation Preschool Javascript library
// DJS - 2008
// Last updated 6 Oct 2008
//
// Replaces old Javascript function random_imglink()
// Called from html files with simple line
//		<script language="JavaScript" src="dmppp.js"></script>
// 
// function random_imglink() {  // This is the random picture function
// which must be copied into every page that uses the function
// index.html, learningenvironment.html, enrolment.html, fees.html
//
// --------------- only modify the 2 variables below each year -------------
var imgYear="2008_";  // underscore is the separator
var numImages=22;	// Total number of photos used for the year e.g. 2008_3
// --------------------------------------------------------------------------
// Photos should be in 240x320 jpg format (width x height in pixels)
// Photos should be renamed into the following format:
// e.g. 2008_1.jpg, 2008_2.jpg, 2008_3.jpg, etc.. to whatever is desired
// Note that file extension ".jpg" MUST be in lower case at present!
// The values for imgYear and numImages should be altered for every years photos
var ry=Math.floor(Math.random()* numImages) + 1;
var imgFile="images/"+imgYear+ry+".jpg";
document.write('<img src="' + imgFile + '" alt="Preschool Picture" border=0 width=242 height=322>');
// alert("File: "+imgFile);   // DJS Debug
//
// }  // End of function random_imglink()




