<!--

	//================================================================================================
	// VARIABLES DECLARATION
	//================================================================================================	
   var openMessageBox = false;
   
	var submitcount = 0;

	function checkFields() {
		if (submitcount == 0) 
		{
			submitcount ++;
			return true;
		}
		else 
		{
			alert("Transaction is in progress.");
			return false;
		}
	}   
	
	//================================================================================================
	// AJAX FUNCTIONS
	//================================================================================================		

	
	//================================================================================================
	// FORM FUNCTIONS
	//================================================================================================

	
	//================================================================================================
	// LAYOUT FUNCTIONS 
	//================================================================================================			
	function resetMenuPositions()
	{
		var w = window.getWidth() / 2;
		
		$('container_msgbox').setStyle( 'left', (w - 185) + 'px');
		
		if ($chk($('eventCostContainer'))) 
		{		
		   $('eventCostContainer').setStyle('left', (w + 310) + 'px');
		}
	}
			
	function showMessageBox(text)
	{
		if (!openMessageBox)
		{	
			$('txtMessageBox').set('html', text);
			$('container_msgbox').setStyle('display', 'block');
			new Fx.Tween('container_msgbox').start('opacity', 0, 1);
			openMessageBox = true;
		}
	}	
		
	function hideMessageBox()
	{
		if (openMessageBox)
		{
			new Fx.Tween('container_msgbox').start('opacity', 1, 0).chain(function(){
				$('container_msgbox').setStyle('display', 'none');
			});			
			openMessageBox = false;
		}
	}	

	function toggleMessageBox()
	{
		if (openMessageBox)
		{
			hideMessageBox();
		} 
		else
		{
			showMessageBox();
		}
	}	
	
	//================================================================================================
	// EVENTS FUNCTIONS
	//================================================================================================		
	function setupActions()
	{
		if ($chk($$('.nav_hover')[0])) 
		{				
			$$('.nav_hover').addEvents({
			
				'mouseover' : function(e) {
					var srcURL = this.getProperty('src');
					if ($chk(srcURL))
						this.setProperty('src', srcURL.replace('.gif', '_hover.gif'));
				},
			
				'mouseout' : function(e) {
					var srcURL = this.getProperty('src');
					if ($chk(srcURL))
						this.setProperty('src', srcURL.replace('_hover.gif', '.gif'));					
				}
				
			});					
		}					
	}
	
	//================================================================================================
	// START THIS WHEN PAGE DOM READY
	//================================================================================================		
	window.addEvents({
	
		'domready' : function(e) {
		   resetMenuPositions();
		   setupActions();
		},
		
		'resize' : function() {
		   resetMenuPositions();
		}
		
	});
	

//-->