/*
This function opens a window centrally with options
*/
function open_window(url, windowWidth, windowHeight, opts, name)
{
	// set the default options if none are given
	if (!opts) opts = "scrollbars=yes, menubar=yes, toolbar=yes, location=yes, status=yes, resizable=yes";
	
	// set default name if not given
	if (!name) name = "new_window";
	
	// create full options with central positioning
	full_options = 'width=' + windowWidth + ', height=' + windowHeight + ', top=' + ((screen.availHeight/2)-(windowHeight/2)) + ', left=' + ((screen.availWidth/2)-(windowWidth/2)) + ', ' + opts;
	
	// open the window
	var new_window = window.open(url, name, full_options);
	
	// make sure the window appears on top of other windows
	new_window.focus();
}


function show_sub_menu (menu_id) 
{						
	reset_menu ()
	document.getElementById('sub_' + menu_id).style.display = 'block';
	
}	
function reset_menu () 
{ 
	document.getElementById('sub_about_the_book').style.display = 'none';
	document.getElementById('sub_speeches').style.display = 'none';
	document.getElementById('sub_whats_on').style.display = 'none';	
}
