/* REDIRECT PAGE */
var sFlashVersion = '9.0.0';

function redirectPage() {

	if (swfobject.hasFlashPlayerVersion(sFlashVersion) && window.location.pathname != '/')
		window.location.replace('/#' + window.location.pathname);

}

/* PRINT PAGE */
var wPrintPage = null;
var sPrintHref;

function printPage(sHref, sName, sAttrib) {

	if (sName === undefined)
		sName = 'glosterPrintPage';

	if (sAttrib === undefined)
		sAttrib = 'resizable=yes,scrollbars=yes,menubar=yes,width=800,height=600';

	if(wPrintPage == null || wPrintPage.closed) {
		
		wPrintPage = window.open(sHref, sName, sAttrib);
	
	} else if(sPrintHref != sHref) {

		wPrintPage = window.open(sHref, sName, sAttrib);
		wPrintPage.focus();
	
	} else {
		
		wPrintPage.focus();
	
	}

	sPrintHref = sHref;

}

function showPrintDialog() {
	
	var sPage = window.location.pathname + '/print';

	pageTracker._trackPageview(sPage);
	window.print();
	
	return false;

}
