var timeOut = 0;

function ShowMenu(menu, x, y) 
{		
	var wid=0;
	ClearTimeout();
	wid=SetMenuWidth();
	
        if (menu == 'The Art')
	{			
		document.getElementById('iMenu').style.height = 137+'px';
		document.getElementById('iMenu').style.width = 150+'px';
		window.frames['iMenu'].document.getElementById('mnuTheClub').style.display = 'none';
		window.frames['iMenu'].document.getElementById('mnuTheArt').style.display = 'inline';
	}
				

        if (menu == 'The Club')
	{	
		document.getElementById('iMenu').style.height = 240+'px';
		document.getElementById('iMenu').style.width = 160+'px';
		window.frames['iMenu'].document.getElementById('mnuTheArt').style.display = 'none';
		window.frames['iMenu'].document.getElementById('mnuTheClub').style.display = 'inline';		
	}
	
				
	document.getElementById('iMenu').style.display = 'inline';	
	document.getElementById('iMenu').style.top = y + 'px';	
	document.getElementById('iMenu').style.left = x+wid+'px';											
}

function StartTimeout()
{
	ClearTimeout();
	timeOut = setTimeout("HideMenu();", 500);							
}

function ClearTimeout()
{
	if (timeOut==0)return;
	clearTimeout(timeOut);
	timeOut=0;
}

function HideMenu()
{
	document.getElementById('iMenu').style.display = 'none';		
}

function GetBrowserWidth() 
{		
	var Width = 0;
		
	Width=document.body.clientWidth;	
	return Width;										
}

function SetMenuWidth() 
{	
	var Width = 0;
	var WidthDifference=0;
	var Margin = 0;
		
	Width=GetBrowserWidth();	
	if(Width>1000)
	{
		WidthDifference = Width - 1000;
		Margin = WidthDifference/2;
	}
	return Margin;								
}

