	//code that gets the top and left of an image (takes a lot of code for something so simple)
	function getImageXfromLeft(input) 
	{
		if (document.layers) return input.x
		else return getRealLeft(input);
	}

	function getImageYfromTop(input) 
	{
		if (document.layers) return input.y
		else return getRealTop(input);
	}

	function getRealLeft(input) 
	{
		xPos = input.offsetLeft;
		tempEl = input.offsetParent;
  		while (tempEl != null) {
  			xPos += tempEl.offsetLeft;
  			tempEl = tempEl.offsetParent;
  		}
		return xPos;
	}

	function getRealTop(input) 
	{
		var yPos = input.offsetTop;
		var tempEl = input.offsetParent;
		while (tempEl != null) {
			yPos += tempEl.offsetTop;
  			tempEl = tempEl.offsetParent;
  		}
		return yPos;
	}
