function changeImage (productId, smallImage, largeImage){
if(largeImage.length > 0){
	Eset('mainImage'+productId, 'src', largeImage);
	$('mainImageLink'+productId).href = largeImage;
	Shadowbox.setup( $('mainImageLink'+productId), {gallery:'additionalImages' } );
}
}

function changeImageCategory (cateogyId, image){
if(image.length > 0){
	Eset('mainImage'+cateogyId, 'src', image);
}
}

function addProductCallback(xhr)
{
	var response = JSON.decode(xhr.responseText);
	
	if(!response.ADDED) return;
	/*window.location.href = '/ecommerce/checkout/basket.cfm';*/
	Shadowbox.open({content:'/ecommerce/checkout/addProduct.cfm', player:'ajax', width: '380px', height:'75px'} );
	
	$('miniBasketLayer').set('load', {noCache:true} ).load('/templates/template1/content/common/miniBasket/basket.cfm', {evalScripts:false} );
/*	if(!window.smoothScroll) window.smoothScroll = new Fx.Scroll(window, {wheelStops:true, onComplete:function(){if(window.miniBasketTransition) window.miniBasketTransition.showSubmenu();} });
	window.smoothScroll.toTop();*/
	onAddProduct( response );
}


window.addEvent('domready', function(){ $(document.body).addEvent('contextmenu', function(){return false;} ); } );
