       function facebook_callback (post_id, exception) { 
			if (post_id != "null" && post_id != "false" && post_id != "") { 
				
			} else {
				
			}
		}
		function facebook_displayPopUp() {
			attachment['name'] = firstName+' vuole consigliarti un oggetto su Bussi Preziosi';
			FB.Connect.streamPublish('', attachment, actionlink);
		}
		
		function facebook_showFeed() {
			if (!user_id) { FB.Connect.requireSession(facebook_required); }
			if (user_id) {
				FB.Facebook.apiClient.users_getInfo(user_id,['first_name','birthday'], function(unifoo, ex){
					firstName = unifoo[0]['first_name'];
					facebook_displayPopUp();
       			});
				
			}
		}
		function facebook_required() {
			user_id = FB.Connect.get_loggedInUser();
			facebook_showFeed();
		}
		
		function facebook_setFacebookID(user) {
			if (user) { user_id = user; }
		}
		
		function checkCartForm() {
			if 	(document.getElementById('productID').value != "") {
				return true;	
			} else { 
				alert('Perfavore, seleziona un\'opzione per il prodotto prima di aggiungerlo al carrello. Le opzioni riguardano solitamente Misure o Colori del prodotto selezionato. Grazie.');
				document.getElementById('productID').className = 'required';
				return false; 
				
			}
		}
		
		var scrollbarContent;
		var slider;
		function makeScrollbar(content,scrollbar,handle,horizontal,ignoreMouse){
			scrollbarContent = content;
			var steps = (horizontal?(content.getScrollSize().x - content.getSize().x - 5):(content.getScrollSize().y - content.getSize().y))
			slider = new Slider(scrollbar, handle, {	
				steps: steps,
				mode: (horizontal?'horizontal':'vertical'),
				onChange: function(step){
					// Scrolls the content element in x or y direction.
					var x = (horizontal?step:0);
					var y = (horizontal?0:step);
					content.scrollTo(x,y);
				}
			}).set(0);
			if( !(ignoreMouse) ){
				// Scroll the content element when the mousewheel is used within the 
				// content or the scrollbar element.
				$$(content, scrollbar).addEvent('mousewheel', function(e){	
					e = new Event(e).stop();
					var step = slider.step - e.wheel * 30;	
					slider.set(step);					
				});
			}
			// Stops the handle dragging process when the mouse leaves the document body.
			$(document.body).addEvent('mouseleave',function(){slider.drag.stop()});
		}
		
		function goRightScrollbar() {
			var scrolling = scrollbarContent.getScroll();
			slider.set(scrolling.x+45);
		}
		function goLeftScrollbar() {
			var scrolling = scrollbarContent.getScroll();
			slider.set(scrolling.x-45);
		}<!--
Shadowbox.init();

window.addEvent('domready', function() {
				if ($('collectionList') && $('collectionToggle')) {			
					$('collectionList').style.display = 'block';
					var collectionSlide = new Fx.Slide('collectionList');
					collectionSlide.hide();
					
					$('collectionToggle').addEvent('click', function(e){
					  e = new Event(e);
					  collectionSlide.toggle();
					  e.stop();
					});
				}
				
				if ($('newsletter')) {
					$('newsletter').addEvent('submit', function(e) {
			
						e.stop();
						
						$('ajaxresponse').innerHTML = "<p>Stiamo processando la tua richiesta. Attendi solo qualche secondo.</p>";
						
						this.set('send', {onComplete: function(response) { 
							$('ajaxresponse').innerHTML = '';
							$('newslettercontainer').innerHTML = response;
						}});
						
						this.send();
					});
				}
				
				if ($('productID')) {
					$('productID').addEvent('change', function(e) {
							var myRequest = new Request({method: 'post', url: 'http://www.bussipreziosi.com/ajax/products_qty.php', 
							onComplete: function(txt){$('qtyContainer').innerHTML = txt;}, 
							onFailure: function() {$('qtyContainer').set('text', 'error' );}
							});	
							myRequest.send('productID='+$('productID').value);
							
							myRequest = new Request({method: 'post', url: 'http://www.bussipreziosi.com/ajax/products_note.php', 
							onComplete: function(txt){ if ($('prodNote')) { $('prodNote').innerHTML = txt; }}, 
							onFailure: function() { if ($('prodNote')) { $('prodNote').set('text', 'error' ); }}
							});	
							myRequest.send('productID='+$('productID').value);
							
							myRequest = new Request({method: 'post', url: 'http://www.bussipreziosi.com/ajax/products_code.php', 
							onComplete: function(txt){$('prodCode').innerHTML = txt;}, 
							onFailure: function() {$('prodCode').set('text', 'error' );}
							});	
							myRequest.send('productID='+$('productID').value);
					});
				}
});
-->
