function setDocumentTitle(title) 
{
	document.title = title;
}

function openUrl(url)
{
	var win = window.open(url,'_blank');
	var allowImmediate = ( navigator && navigator.appCodeName == "Mozilla" && navigator.userAgent.indexOf('Safari') == -1 );
	if (!win || !win.top) getApp().alertPopupBlocked( url, allowImmediate );
}

function getApp() {
	return document.getElementById('main');
}

function composeTweet(tweet) {
	getApp().composeTweet(tweet);
}

function openAccountInfo() {
	getApp().openAccountInfo();
}

function showView( action, payload ) {
	$('#htmlContent iframe')[0].contentWindow.vbo.nav.go(action[0], action[1]);
	$('#htmlContent').show();
}

function restoreView() {
	//M@ 2010-05-21 : Concerned this will cause the navigation on the frame to 
	//reload every time we have a pop-up alert in the Flex app.
	//$('#htmlContent iframe')[0].contentWindow.vbo.nav.go(action[0]);	
	$('#htmlContent').show();
}

function hideView() {
	$('#htmlContent').hide();
}
