// fade menu in
function fademenuin()
{
   	$('headermenupanel').fade('in');
}

// fade menu out
function fademenuout()
{
   	$('headermenupanel').fade('out');
}

// initially hide menu (called at page init so the menu that is shown by default (the static 'noscript' state) is hidden)
function initMenu()
{
   	$('headermenupanel').fade('hide');
	$('headermenupanel').addEvent('mouseleave',fademenuout);
}


// called by html video button
function switchtovideo()
{
	enablevideo()
	location.reload(false)
}

// write out html version of video button
function writeVideoButton()
{
	if ((!videoEnabled())&&(swfobject.getFlashPlayerVersion()['major']>=9))
	{
		document.write("<a class=\"videobutton\" onclick=\"switchtovideo();return false;\" href=\"start video\">&nbsp;</a>");
	}
}





// called by swf video button
function disablevideo()
{
	Cookie.write('videodisabled','1',{duration:4, path: '/'});
	location.reload(false)
}

// called by swf video button and function switchtovideo
function enablevideo()
{
	Cookie.dispose('videodisabled', {path: '/'});
}

// check if video is enabled according to cookie settings
function videoEnabled()
{
	return Cookie.read("videodisabled")=='1' ? false : true
}



