	var Scroll_Img = new Object()	
	
	Scroll_Img.Init = function (sContainer,sNote,iWidth,iScrollWidth,iTop,iLeft,iIncScroll,iInterval ){
		var aDiv,aDivNote,avanzo,larghezza,largh2,larghezzaTotale;
		Scroll_Img.ImgContent = document.getElementById(sContainer);
		Scroll_Img.aDiv = aDiv = Scroll_Img.ImgContent.getElementsByTagName('Div');
		Scroll_Img.NoteContent = document.getElementById(sNote);
		Scroll_Img.aDivNote = aDivNote = Scroll_Img.NoteContent.getElementsByTagName('Div');
		Scroll_Img.MinWidth = iWidth;
		Scroll_Img.IncScroll = iIncScroll;
		Scroll_Img.Interval = iInterval;
		avanzo=0
		for (var i=0;i<aDiv.length;i++){
			aDiv[i].oImg = aDiv[i].getElementsByTagName('Img')[0]
			aDiv[i].style.top = iTop+'px';
			//larghezza dell'elemento corrente
			larghezza=aDiv[i].oImg.style.width.substring(0,aDiv[i].oImg.style.width.length-2)
			aDiv[i].style.left = iLeft*(i+1)+(iLeft*i)+(iWidth*i)+avanzo+'px';	
			//Larghezza degli elementi caricati finora
			largh2=iLeft*(i+1)+(iLeft*i)+(iWidth*i)+avanzo
			//differenza tra gli elementi standard e la larghezza reale
			avanzo=avanzo + (larghezza-iWidth);
			//larghezza totale reale della vetrina
			larghezzaTotale=parseInt(largh2)+parseInt(larghezza)
			aDiv[i].oA = aDiv[i].getElementsByTagName('A')[0]
			aDiv[i].onmouseover = function(){Scroll_Img.SetOpacity(this,100);Scroll_Img.ViewNote(this,'block');}
			aDiv[i].onmouseout  = function(){Scroll_Img.SetOpacity(this,60);Scroll_Img.ViewNote(this,'none');}
			aDiv[i].oNote = aDivNote[i];
			aDiv[i].oNote.style.display = 'none';
			Scroll_Img.SetOpacity (aDiv[i], 60)
		}
		if (aDivNote.length > aDiv.length)	
			Scroll_Img.DivMarquee = aDivNote[aDivNote.length-1] 
		else							
			Scroll_Img.DivMarquee = null;
		Scroll_Img.ImgContent.style.left = '0px';
		Scroll_Img.ImgContent.style.width = larghezzaTotale+'px';
		Scroll_Img.ImgContent.style.height = iTop*2+iWidth+'px';
		Scroll_Img.MaxScroll = iScrollWidth - (((iLeft*2+iWidth)*aDiv.length)+avanzo);
		Scroll_Img.ImgContent.style.visibility = 'visible';
		Scroll_Img.NoteContent.style.display = 'block';
	}

	Scroll_Img.ViewNote = function(oDiv,sState){
		oDiv.oNote.style.display = sState;
		var DM = Scroll_Img.DivMarquee
		if (DM != null)
			DM.style.display = (sState == 'block' ? 'none':'block');
	}

	Scroll_Img.SetScroll = function( iDirection ){
		if ( Scroll_Img.ScrollInterval != undefined ) {
			clearInterval(Scroll_Img.ScrollInterval);
			Scroll_Img.ScrollInterval = undefined;
		}
		if ( iDirection != 0 ) 
			Scroll_Img.ScrollInterval = setInterval('Scroll_Img.DoScroll('+iDirection+')',Scroll_Img.Interval)
	}

	Scroll_Img.DoScroll = function( iDirection ){
		L = parseInt(Scroll_Img.ImgContent.style.left);
		L += iDirection * Scroll_Img.IncScroll;

		if ( L > 0 || L < Scroll_Img.MaxScroll ){
			clearInterval(Scroll_Img.ScrollInterval);
			Scroll_Img.ScrollInterval = undefined;
		} else
			Scroll_Img.ImgContent.style.left = L +'px'; 
	}

	Scroll_Img.SetOpacity = function( oObj, iVal ){
		oObj.Opacity = iVal;
		oObj.style.opacity = iVal/100;
		oObj.style.filter = 'alpha(opacity=' + iVal + ')';
	}
	
	
	
	
	