function stylesEnabled() {
	//check if styles are in use
	var el = document.getElementById('doc');
	if (el.currentStyle) {
		var ta = el.currentStyle['textAlign'];
	} else if (document.defaultView.getComputedStyle) {
		var ta = document.defaultView.getComputedStyle(el,null).getPropertyValue('text-align');
	}
	if (ta=="center" || ta=="auto") { //auto on safari first load
		return true;
	}
	return false;
}

function addFlash(ref) {
	if (stylesEnabled()) {
		//addflash
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="740" height="273">');
		document.write('<param name="movie" value="flash/' + ref + '.swf">');
		document.write('<param name="quality" value="high">');
		document.write('<embed src="flash/' + ref + '.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="740" height="273"></embed>');
		document.write('</object>');
	}
}

function fixup() {
	var doc = document.getElementById('doc');
	var content = document.getElementById('content');
	var offset = content.offsetLeft;
	doc.style.backgroundRepeat = "no-repeat";
	doc.style.backgroundPosition = (-520+offset) + "px 100px";
	doc.style.backgroundImage = "url(images/background.gif)";

	if (stylesEnabled()) {
		//add footer dividers
		el = document.getElementById('footerdivider1');
		if (el) {
			el.innerHTML = "|";
		}
	}
}

window.onload = function() {fixup();}
window.onresize = function() {fixup();}