//=======================================================================================================
//-------------------------------------------------------------------------------------------------------
//	Custom Javascript functions
//-------------------------------------------------------------------------------------------------------
//=======================================================================================================
function openPopup( url )
{
	sizeX	= 820;
	sizeY	= 630;
	pageurl = url;
	target	= 'flash';

	//	Center the window
	leftpos	= (screen.width)  ? (screen.width-sizeX)/2 : 100;
	toppos	= (screen.height) ? (screen.height-sizeY)/2 : 100;

	//	Define the window size
	widthVar  = 'width=' + sizeX + ',';
	heightVar = 'height=' + sizeY + ',';

	//	Open the window
	winobject				= window.open(pageurl,target,"menubar=0,statusbar=0,scrollbars=0,toolbar=0,location=0," + widthVar + heightVar + "left=" + leftpos + ",top=" + toppos + ",resizable=0" );
	winobject.focus();
}

function toggleGoogleStats( box_id )
{
	stats_box_table = document.getElementById( box_id );

	if ( !stats_box_table )
	{
		return;
	}

	if ( stats_box_table.style.display == 'block' )
	{
		stats_box_table.style.display = 'none';
	}
	else
	{
		stats_box_table.style.display = 'block';
	}
}

function redirectToSmithmicro()
{
    window.location = "http://www.smithmicro.com/mbg";
}

