// JavaScript Document
	var currentImage = 0;
	var totalImages = 9;
	var viewSize =9;
	var scroll_active=0;
	function moveToPrevious()
	{
	  if(currentImage > 0 && scroll_active==0)
	  {
		scroll_active=1;
		new Effect.Move('imageBoxInside', { x: 108, y: 0, transition: Effect.Transitions.sinoidal,duration: .5 });
		currentImage=currentImage-10;
		setTimeout('scroll_active=0;',500);
	  }
	  
	}
	
	function showImg(path,link_url,divid)
	{ 
		if(document.getElementById('bigimg').src!=path) {
			imgPreloader = new Image();
			
			// once image is preloaded, resize image container
			document.getElementById('product_id_link').href=link_url;
			document.getElementById('bigimg').style.display="none";
			document.getElementById('loading_img').style.display="";
			imgPreloader.onload=function(){
					document.getElementById('loading_img').style.display="none";
					document.getElementById('bigimg').src=path;
					document.getElementById('bigimg').style.display="";
					document.getElementById('tddesc').innerHTML=document.getElementById("div_"+divid).innerHTML;
					new Effect.Appear('bigimg',{ duration: 0.7, from: 0.0, to: 1.0});
					imgPreloader.onload=function(){};
					imgPreloader.src="";
			}
			imgPreloader.src=path;
		}
	}
	
	
	
	function moveToNext()
	{
		 
	  if(currentImage < totalImages-viewSize  && scroll_active==0)
	  {
		scroll_active=1;
		new Effect.Move('imageBoxInside', { x: -108, y: 0, transition: Effect.Transitions.sinoidal,duration: .5 });
		currentImage=currentImage+10;
		setTimeout('scroll_active=0;',500);
	  }
	}
	function img_over(imgid){
		 if (navigator.appName=="Microsoft Internet Explorer")
			  document.getElementById(imgid).style.filter="alpha(opacity=50)";
		  else
			 document.getElementById(imgid).style.MozOpacity= .5;
		
		//dimg=document.getElementById(imgid);
		//dimg.setAttribute("style" , "filter:alpha(opacity=100); -moz-opacity: 1;");
	}
	function img_out(imgid){
		if (navigator.appName=="Microsoft Internet Explorer")
			  document.getElementById(imgid).style.filter="alpha(opacity=100)";
		  else
			 document.getElementById(imgid).style.MozOpacity=1;
			 
		//dimg=document.getElementById(imgid);
		//dimg.setAttribute("style" , "filter:alpha(opacity=50); -moz-opacity: .5;");
	}
	
	function load_image()
	{
		imgPreloader = new Image();
		
		// once image is preloaded, resize image container
		imgPreloader.onload=function(){
			Element.setSrc('lightboxImage', imageArray[activeImage][0]);
			imgPreloader.onload=function(){};	//	clear onLoad, IE behaves irratically with animated gifs otherwise 
		}
		imgPreloader.src = imageArray[activeImage][0];	
	}

