var realTime = (function() {
	var init = false;
	var headerTable;
	var theContainer;
	
	var self = {
		init:function() {
			headerTable = document.getElementById('blogheader');
			theContainer = headerTable.getElementsByTagName('td');
			theContainer[0].innerHTML = '';
			var containerDiv = document.createElement('div');
			containerDiv.setAttribute('id','flashHeader');
			theContainer[0].appendChild(containerDiv);
			self.insertSwfObject();
		},
		insertSwfObject:function() {
			swfobject.embedSWF("http://ctextras.hearstdigitalnews.com/blogs/img/gt_head_realtime.swf", "flashHeader", "631", "107", "9.0.0");
		}
	};
	return self;
})();

function addLoadEvent(func) {
	var oldonload = window.onload;
	window.onload = typeof window.onload != 'function' ? func : function() {
		if (oldonload) {
			oldonload();
		}
		func();
	}
}

addLoadEvent(realTime.init);
