public void zoomImage()
	{
		//For clarity of code, create some variables to hold slide dimensions
		//and original image dimensions
		int slideWidth = hostSize.width;
		int slideHeight = hostSize.height;
		int originalWidth = getMainImage().getWidth(null);
		int originalHeight = getMainImage().getHeight(null);

		//Determine maximum zoomed size on the basis of a maximum zoom factor
		//of 2(to avoid excessive pixelation)
		int maxWidth = 2*originalWidth;
		int maxHeight = 2*originalHeight;

		//Determine the overlap with the slide edges
		//Positive value = magnitude of overlap
		//Negative value (no overlap) = distance to slide edge from image edge
		int xOverlap = maxWidth - slideWidth;
		int yOverlap = maxHeight - slideHeight;

		//The overlap with the greatest positive value defines the maximum scale
		//factor since the image must not clip the slide edges.
		double scaleFactor;

		if(xOverlap > yOverlap)
			scaleFactor = (double)slideWidth/originalWidth;
		else
			scaleFactor = (double)slideHeight/originalHeight;

		//If neither are positive then resulting scale factor will be greater
		//than 2. If so, set it to 2 (maximum)
		if(scaleFactor > 2)
			scaleFactor = 2;

		//Instantiate variables zoomedSize and zoomedPosition if required
		if(null == zoomedSize)
			zoomedSize = new Dimension(0,0);
		if(null == zoomedPosition)
			zoomedPosition = new Point(0,0);

		//Determine new width and height
		zoomedSize.width = (int)(scaleFactor*originalWidth);
		zoomedSize.height = (int)(scaleFactor*originalHeight);

		//Determine new position
		zoomedPosition.x = (int)(0.5*slideWidth - 0.5*zoomedSize.width);
		zoomedPosition.y = (int)(0.5*slideHeight - 0.5*zoomedSize.height);

		//Debug message to inform of new size and position of image
		if(Debug.imagePlayer) System.out.println("Zoomed image will be drawn at ("+
				zoomedPosition.x+","+zoomedPosition.y+") with dimensions "+
				zoomedSize.width+" x "+zoomedSize.height);

		//Hide the image panel whilst it is reconfigured for zoom mode
		unDisplayInternal();

		//Determine highest unoccupied layer of the slide panel
		int topLayer = slidePanel.highestLayer() + 1;

		//Promote the image panel to the top layer, so that no other object will
		//obscure the image by displaying on top of it
		slidePanel.remove(imagePanel);
		slidePanel.add(imagePanel,new Integer(topLayer));

		//Enlarge the image panel to completely fill the slide area
		imagePanel.setSize(hostSize);
		imagePanel.setLocation(0,0);

		//Enable drawing to screen of the image panel, and make it black and
		//semitransparent to provide slide darkening effect
		imagePanel.setOpaque(true);
		imagePanel.setBackground(new Color(0,0,0,127));

		//Set flag to indicate that zoomed mode is now activated, and display
		//the reconfigured image
		isZoomed = true;
		display();

		//Update the mouse detection zone to match the new size of image panel
		//updateMouseDetection(true,true);
	}