	document.onmousemove=doAnimation;
	
	function doAnimation(e)
	{
		var imageContainer = 'aniDiv';
		var imageCount =  12;
		var imageWidth =  100;
		var imageHeight = 145;
		var imageGap =    10;
		var imageTop =    50;
		var labels = new Array(imageCount+1);
		
		labels[0]='Index';
		labels[1]='alpha LED';
		labels[2]='LED';
		labels[3]='Retail';
		labels[4]='Downlights';
		labels[5]='Track, spot & pendants';
		labels[6]='Fluorescent systems';
		labels[7]='Wall & uplights';
		labels[8]='Modular fluorescent systems';
		labels[9]='Industrial & commercial';
		labels[10]='Outdoor';
		labels[11]='Emergency lighting';
		labels[12]='Control systems';
				
		var imageLeft, totalWidth, mouseX, mouseY, scrollAmount, cursorX;
		var objContainer, distanceX, distanceY, zoomX, zoomY, zoom, doScroll, maxWidth, nearest;

		if(!e) e = window.event;
		mouseX   = e.clientX;
		mouseY   = e.clientY;

		objContainer = document.getElementById(imageContainer);
		totalWidth = ((imageCount+2)*imageWidth)+((imageCount)*imageGap);
		doScroll = ((((imageCount)*imageWidth)+((imageCount-1)*imageWidth))>objContainer.offsetWidth);
		cursorX = totalWidth*(mouseX-objContainer.offsetParent.offsetLeft-objContainer.offsetLeft)/(objContainer.offsetWidth);
		scrollAmount = ((cursorX/totalWidth)*(totalWidth-objContainer.offsetWidth)*-1);
		maxWidth = 0;
		nearest  = 0;
		
		distanceY=Math.abs(mouseY-objContainer.offsetParent.offsetTop-objContainer.offsetTop-imageTop-(imageHeight/3));
		zoomY=(1-((distanceY*1.5)/objContainer.offsetHeight));
		if(zoomY<0) zoomY=0;

		for(var i=1; i<=imageCount; i++)
		{
			if(zoomY>0)
			{
				if(doScroll) { imageLeft=((i)*imageWidth)+((i-1)*imageGap)+scrollAmount; }
				else 		    { imageLeft=((i-1)*imageWidth)+((i-2)*+imageGap); }

				distanceX=Math.round(Math.abs((imageLeft-scrollAmount-cursorX+(imageWidth/2))));
				zoomX=(1-((distanceX*5)/objContainer.offsetWidth));
				if(zoomX<0) zoomX=0;
	
				if(zoomX<zoomY) { zoom=zoomX; }
				else 	          {	zoom=zoomY; }

				imageLeft = imageLeft-(zoom*50);

				if(zoom>0.4)
				{
					document.getElementById('aniImg'+i).style.left=imageLeft+'px';
					document.getElementById('aniImg'+i).style.top=imageTop-(zoom*50)+'px';
					document.getElementById('aniImg'+i).style.width=imageWidth+(zoom*imageWidth)+'px';
					document.getElementById('aniImg'+i).style.height=imageHeight+(zoom*imageHeight)+'px';
					document.getElementById('aniImg'+i).style.zIndex=Math.round(zoom*120);
					document.getElementById('aniImg'+i).style.visibility='visible';		
					document.getElementById('aniThumb'+i).style.visibility='hidden';		
				}
				else
				{
					document.getElementById('aniThumb'+i).style.left=imageLeft+'px';
					document.getElementById('aniThumb'+i).style.top=imageTop-(zoom*50)+'px';
					document.getElementById('aniThumb'+i).style.width=imageWidth+(zoom*imageWidth)+'px';
					document.getElementById('aniThumb'+i).style.height=imageHeight+(zoom*imageHeight)+'px';
					document.getElementById('aniThumb'+i).style.zIndex=Math.round(zoom*120);
					document.getElementById('aniImg'+i).style.visibility='hidden';		
					document.getElementById('aniThumb'+i).style.visibility='visible';		
				}
				
				if((Math.round(zoom*120))>maxWidth)
				{
					maxWidth = Math.round(zoom*120);
					nearest = i;
				}

			}
			else
			{

				document.getElementById('aniImg'+i).style.visibility='hidden';		
				document.getElementById('aniThumb'+i).style.visibility='visible';		
				document.getElementById('aniThumb'+i).style.left=((i-1)*imageWidth)+((i-1)*imageGap)+(((9-imageCount)/2)*110)+'px';
				document.getElementById('aniThumb'+i).style.top=imageTop+'px';
				document.getElementById('aniThumb'+i).style.width=imageWidth+'px';
				document.getElementById('aniThumb'+i).style.height=imageHeight+'px';
				document.getElementById('aniThumb'+i).style.zIndex=0;		
			}

		}
		document.getElementById('subMenuText').innerHTML = labels[nearest];		
	}



