<!--

/*******************************/
/* Variable initialisation     */
/*******************************/

     


/***
Since an Array can store other Arrays you can get the benefit of multi-dimension arrays.
				var x=[0,1,2,3,4,5];
				var y=[x];
In the above example we created an array named “x” and assigned it as the first element 
in the array “y”. If we ask for the value of y[0] it will return the contents of “x” as a
string because we didn't specify an index.
				var x=[0,1,2,3,4,5];
				var y=[x];
document.writeln(y[0]); // Will output: 0,1,2,3,4,5
If we wanted the third index we'd access it this way…
				var x=[0,1,2,3,4,5];
				var y=[x];
				document.writeln(y[0][3]); // Will output: 2
There's no defined limit to how many Arrays you can nest in this manner. For instance …
				document.writeln(bigArray[5][8][12][1])
…would indicate bigArray's 5th index held an array, who's 8th index held an array, 
who's 12th index held an array, who's first index contains the data we want.
***/

        var timeron = 0;
        var myInterval = 0;
        var myTimeout = 0;
  
        var pictures = new Array(10);           
        var picnum = new Array("01","02","03"); 
        var picid = 0;  
        var slide = 0;    
        
        var buttonid = new Array("0000000","7520580","7520626","7520645","7520691","7520705","7520719","7520735","7520762","7520805","7520819","7520830","7520840","7520854");             
        var ticketpics = new Array(14);   
 
        
/*******************************/
/* Preload images              */
/*******************************/
 
/***
The Image object is an image on an HTML form, created by using the HTML 'IMG' tag. Any images created in a document 
are then stored in an array in the document.images property, and it is from here that they are accessed. If you have 
specified a name for an image created using the HTML 'IMG' tag, you can use that name when you index the image in the 
images array. You can also use the Image constructor and the new operator to create an image object which can then be 
displayed within an existing cell. The main use of this is to load an image from the network so that it is in cache 
before it needs to be displayed.
 
For example the following code creates an Image object called MyImage:
 
Code:
myImage = new Image()
myImage.src = "C:/Personal/Mountain.gif"
 
...you could then have this image replace an existing image River on, say, the click of a button:
 
Code:
onClick="javascript:void(document.River.src = myImage.src)"
 
When one Image object replaces another, as in the above example, it cannot change the width and height properties of 
it (these are read-only for this object) and the browser displays the image with the dimensions set in the IMG tag. 
JavaScript can also be used to create animation by repeatedly changing the value of the src property. This isn't as 
fast as GIF animation because Javascript has to load each indivual frame as a separate file, whereas with GIF animation 
all the frames are contained in one file.  
***/


        if (document.images) {
           for(u=0; u< picnum.length; u++) {
              pictures[u] = new Image();
              pictures[u].src = "images/pic"+picnum[u]+".jpg";
           }   
        }        


        if (document.images) {
           for(u=0; u< buttonid.length; u++) {
              ticketpics[u] = new Image();
              ticketpics[u].src = "images/S"+u+".gif";
           }   
        }    


/*********************************/
/* Load random pics              */
/*********************************/
 
        function showpic() {
            picid = Math.floor(Math.random()*3);  /** the random number will fall between 0-2  ***/
            if(document.images) document.images["banner"].src = pictures[picid].src;         
        }     
 
 
/*********************************/
/* Load pics                     */
/*********************************/
 
        function nextslide() {
            if(document.images) document.images["banner"].src = pictures[slide].src;   
            slide++;
            if (slide > picnum.length) {
				  	   slide = 0; 
				    }	      
        }                              
        
/*******************************/
/* Start slide show            */
/*******************************/

        function slideshow() {
          if (timeron == 0) {
				 	  myInterval = window.setInterval('nextslide()',1000);
				 	  timeron++;
				  }
				  if (timeron == 12) {
				  	clearInterval(myInterval); 
				  	timeron = 0;
				  }	
        }


/************************************/
/* Display events on selected date  */
/************************************/

        function myevents(am,pm) {
          if (am > 0) {
				 	  if(document.images) document.images["tx01"].src = ticketpics[am].src;
				 	  if(document.images) document.images["tx01"].width = 200;    
				  }
				  else {
				 	  if(document.images) document.images["tx01"].src = ticketpics[0].src;
				 	  if(document.images) document.images["tx01"].width = 1;
				  }
				  
				  if (pm > 0) {
				 	  if(document.images) document.images["tx02"].src = ticketpics[pm].src;
				 	  if(document.images) document.images["tx02"].width = 200;  
				  }
				  else {
				 	  if(document.images) document.images["tx02"].src = ticketpics[0].src; 
				 	  if(document.images) document.images["tx02"].width = 1; 
				  }
        }



//-->

