// JavaScript Document
var HTMLPopupUrl = "about:blank";
var HTMLPopupWidth = 640;
var HTMLPopupHeight = 480;
function showPopup( url, width, height, hide )
{
	if ( url==null||url=="" ) 
		url = HTMLPopupUrl;
	if ( width==null||width=="" ) 
		width = HTMLPopupWidth;
	if ( height==null||height=="" ) 
		height = HTMLPopupHeight;
		
	if ( $("#popupLink").length==0 )
		$("body").append("<a class='iframe' href='" + url + "' id='popupLink'></a>");
	else
		$("#popupLink").attr( "href", url ); 
	
	$("#popupLink").fancybox({
		'width'				: width,
		'height'			: height,
		'type'				: 'iframe',
		'onClosed'			: closePopup,
		'hideOnContentClick': false,
		'overlayShow':false
	});
	$("#popupLink").click();
	
	if ( $('#flashobj')[0].enableNxtbook )
		$('#flashobj')[0].enableNxtbook( false );
	if ( hide==true )
		$('#flashobj').css('visibility', 'hidden')
}
function closePopup() 
{
	if ( $('#flashobj')[0].enableNxtbook )
		$('#flashobj')[0].enableNxtbook( true );
	$('#flashobj').css('visibility', 'visible')
}
function reloadConfig()
{
	if ( $('#flashobj')[0].reloadConfig )
		$('#flashobj')[0].reloadConfig();
}