
b="";
down=0;


function MakeImageArray(num) // initialises an array of images
{
	if (document.images)
	{
      	this.length = num;
   		for (var i=0; i<=num; i++) 
		{
           	this[i] = new Image();
	   	}
  		return this;
	}
}
    
     

function swapL(num,state) 	// swaps images on rollover
							// num is the number of the button
							// state is true for over, false for out
{
	if(document.images)
	{
		if(num!=down) 	// if not the current page
		{						
			if(state)				// if state is true
			{
				document.images['pos'+num].src=mOver[num].src;
				// add additional rollovers here if needed
			}
			else
			{
				document.images['pos'+num].src=mOut[num].src;
				// add additional rollovers here if needed
			}
		}
	}
}
	
function mClickL(num) // latched click
{
	if(document.images)
	{
		if(down){							//if down exists
			document.images['pos'+down].src=mOut[down].src;		// reset previous down button
		}
		down=num;							// store the new down position

		document.images['pos'+down].src = mOn[down].src 	//display new down button.
 	}			
	return false;
} /* end of mClickL */
	

