<!--

	//================================================================================================
	// VARIABLES DECLARATION
	//================================================================================================	
   var openConditions = false;
   var openSuccess = false;
	
	//================================================================================================
	// AJAX FUNCTIONS
	//================================================================================================		

	
	//================================================================================================
	// FORM FUNCTIONS
	//================================================================================================

	
	//================================================================================================
	// LAYOUT FUNCTIONS 
	//================================================================================================			
	function showConditions()
	{
		if (!openConditions)
		{		    
		   hideSuccess();
		        				
			$('container_conditions').setStyle('display', 'block');
			new Fx.Tween('container_conditions').start('opacity', 0, 1);
			openConditions = true;
		}
	}	
		
	function hideConditions()
	{
		if (openConditions)
		{
			new Fx.Tween('container_conditions').start('opacity', 1, 0).chain(function(){
				$('container_conditions').setStyle('display', 'none');
			});			
			openConditions = false;
		}
	}	

	function toggleConditions()
	{
		if (openConditions)
		{
			hideConditions();
		} 
		else
		{
			showConditions();
		}
	}
	
	function showSuccess()
	{
		if (!openSuccess)
		{		            				
		   hideConditions();

			$('container_success').setStyle('display', 'block');
			new Fx.Tween('container_success').start('opacity', 0, 1);
			openSuccess = true;
		}
	}	
		
	function hideSuccess()
	{
		if (openSuccess)
		{
			new Fx.Tween('container_success').start('opacity', 1, 0).chain(function(){
				$('container_success').setStyle('display', 'none');
			});			
			openSuccess = false;
		}
	}	

	function toggleSuccess()
	{
		if (openSuccess)
		{
			hideSuccess();
		} 
		else
		{
			showSuccess();
		}
	}		
	
	function resetMenuPositions()
	{
		var w = window.getWidth() / 2 - 490;
		
		if ($chk($('orderinfoContainer')))
		{   		
		   $('orderinfoContainer').setStyle('left', (w + 285) + 'px');
		   $('aboutContainer').setStyle('left', (w + 425) + 'px');
		   $('container_conditions').setStyle( 'left', (w + 300) + 'px');
		   $('container_success').setStyle( 'left', (w + 300) + 'px');
		}
	}
	
	//================================================================================================
	// EVENTS FUNCTIONS
	//================================================================================================		
	function setupActions()
	{
		
	}	
	
	//================================================================================================
	// START THIS WHEN PAGE DOM READY
	//================================================================================================		
	window.addEvents({
	
		'domready' : function(e) {
		   resetMenuPositions();
		},		
		
		'resize' : function() {
         resetMenuPositions();
		}
		
	});
	

//-->