
// Begin Cart Effects
									 
function effects_start() { 
	 
	update_cart_onopen(); 
	
	// set the background to be able to show
	$('modal_window_background').show({ queue: 'front' });
	
	// and fade in the background
	new Effect.Opacity('modal_window_background', { from: 0, to: 0.7, duration: 0.5, queue: 'end' });
	
	// fade in the main box ( but in 0 time so its not there on start and has to fade in before the slide in next
	new Effect.Opacity('modal_window_box', { from: 0, to: 1.1, duration: 0, queue: 'end' });
	
	// slide in box
	new Effect.SlideDown('modal_window_box', { queue: 'end' });
	
}	

function effects_end() { // removing the modal window
		
	Effect.Queues.get('modal_window_background').interval = 100;
		
	// slide up the	main box
	new Effect.SlideUp('modal_window_box', { queue: 'front' });
	
	// finaly hide the window
	Effect.Fade('modal_window_background');
}	

<!--// Update The Cart As It Opens Ajax Script //--> 
function update_cart_onopen(){ 

	var session_id = '69000818';
	
 	var url = 'includes/cart/update_cart_onopen.inc.php' + '?session_id=' + session_id

	request.open('get', url); 
	request.onreadystatechange = parseUpdate_cart_onopen; 
	request.send(''); 
} 
function parseUpdate_cart_onopen(){ 
	if(request.readyState == 1){ 
	document.getElementById('cart_update_box').innerHTML = 'Loading <img src="images/4-1.gif"/>'; 
	} 
	if(request.readyState == 4){ 
	var answer = request.responseText; 
	document.getElementById('cart_update_box').innerHTML = answer; 
	}
	
} 

