/**
 * Function to center an element to the browser window by giving
 * a negative margin if it's larger than the window
 * @author Steven Reimer
 * @param string element id
 */
function center( element ) {
	var w, h, pw, ph, lpos;
	w = $(element).offsetWidth;

	if (parseInt(navigator.appVersion)>3) {
		if (navigator.appName=="Netscape") {
			winW = window.innerWidth;
	 	}
		if (navigator.appName.indexOf("Microsoft")!=-1) {
			winW = document.body.offsetWidth;
		}
	}

	lpos = ( winW - w ) / 2;
	
	if ( lpos < 0 ) $(element).style.marginLeft = lpos+'px';
	else $(element).style.marginLeft = "auto";
	
}


function centerflash() {
	center( "flash_wrap" );	
}

function centertoplevelflash() {
	center( "top_level_flash" );
}