var config1 = {
   slideshowGroup: 'group1',
   transitions: ['expand', 'crossfade']
};

var config2 = {
   slideshowGroup: 'group2',
   transitions: ['expand', 'crossfade']
};	

	hs.graphicsDir = 'scripts/highslide/graphics/';
	hs.align = 'center';
	hs.transitions = ['expand', 'crossfade'];
	hs.outlineType = 'rounded-white';
	hs.fadeInOut = true;
	hs.numberPosition = 'caption';

	// Add the controlbar
	if (hs.addSlideshow) hs.addSlideshow({
		slideshowGroup: ['group1'],
		interval: 5000,
		repeat: false,
		useControls: true,
		fixedControls: 'fit',
		overlayOptions: {
			opacity: .75,
			position: 'bottom center',
			hideOnMouseOut: true
		}
	});

	jQuery(document).ready(function() {
		jQuery('#btn_espace').click(function(){
			jQuery( "#mon_espace_container" ).toggle( 'blind', '', 1000 );
			return false;			
		});
		
		if(document.getElementById('slider'))
		{
			jQuery('#slider').cycle({ 
				fx:     'fade', 
				speed:  'slow', 
				timeout: 5000, 
				pager:  '#slider_nav' 
			});

		}
	});
	
	
	
function click_selection(cb, pid, connect)
{

	if (connect)
	{

		if (cb.checked)
		{
			lock_products2(pid);
		}
		else
		{
			unlock_products2(pid);
		}		
	}
	else
	{
		cb.checked = false;
		window.location.href= "/catalog/login.php";
	}

}
function click_selection2(cb, pid, connect)
{

	if (connect)
	{
		lock_products2(pid);
		
	}
	else
	{
		window.location.href= "/catalog/login.php";
	}

}	
function lock_products2(pid)
  	{
	agent.call('','lock_products','lock_products_return2', pid);
	}

function lock_products_return2(str) {
	document.getElementById('cartcontent').innerHTML = str;
	setTimeout('go_to_shopping_cart()',500);
}
function go_to_shopping_cart()
{
	window.location.href = "/catalog/shopping_cart.php";
}
function unlock_from_shopping(pid)
{
	if (confirm("Etes-vous sur de vouloir supprimer cette option ?"))
	{
		unlock_products2(pid);
	}
}	

function unlock_products2(pid)
{
	agent.call('','unlock_products_acanthe','unlock_products_return2', pid);
	
	if (document.getElementById("shopping_cart_"+pid))
	{
		document.getElementById("shopping_cart_"+pid).style.display = 'none';
	}
	
}
function unlock_products_return2(str) {
	if (document.getElementById('cartcontent'))
	{
		document.getElementById('cartcontent').innerHTML = str;
	}
}

