var ibc = 
{
	// These are parameters that can be adjusted
	initialDelay: 4000, // Milliseconds to wait before starting animation
	restartDelay: 4000, // Milliseconds pause between repetitions
	numLoops: 3,		// How many times to loop through the headlines
	frameLength: 50,	// Milliseconds per frame
	pixelsPerFrame: 2,	// How much to scroll up each frame.
	pauseLength: 4000,	// Milliseconds to pause between individual headlines
	headlineFile:"http://www.iraqbodycount.net/counters/headlines.js",
	defaultText:'<a href="http://www.iraqbodycount.org/" target="_blank"><img src="http://www.flpan.org/js/IBC/ibc144_2.gif" width="144" height="48" border="0"></a>',
	textStyle:'font-family: Helvetica,Arial,sans-serif; font-size: 12px; color: #000; vertical-align: middle; text-align: center; overflow: hidden; width: 144px; height: 48px; line-height:12px;',
	repetitions:0,pageText:"",
	viewport:null,page:null,
	viewportHeight:0,pageHeight:0,curpos:0,headlines:null,
	checked:false,
	headlineNumber:0,paused:false,timeoutid:null,
	nocache:"?"+Math.floor((new Date()).getTime()/900000),
	checkCapabilities:function()
	{
		if(!document.getElementById)return false;
		var m=document.getElementById('IBCViewport');
		if(m==null||m["offsetHeight"]==null||m["offsetTop"]==null||m["style"]==null||m["innerHTML"]==null||m["getElementsByTagName"]==null||window["setTimeout"]==null)return false;
		return true;
	},
	headlines:function()
	{
		this.pageText="";for(var i=2;i<arguments.length;i++)
		{
			this.pageText+="<div style='padding: 6px 2px 6px 2px;'>"+arguments[i]+"</div>";
		}
		setTimeout("ibc.animate()",
		this.initialDelay);
	},
	restart:function()
	{
		setTimeout("ibc.animate()",
		this.restartDelay);
	},
	animate:function()
	{
		if(!this.checked)
		{
			if(!this.checkCapabilities())return;
			this.checked=true;
			this.viewport=document.getElementById('IBCViewport');
			this.page=document.getElementById('IBCPage');
			this.viewportHeight=this.viewport.offsetHeight;this.page.style.position="relative";
		}
		this.curpos=this.viewportHeight;
		this.page.style.top=this.curpos+"px";
		this.page.innerHTML=this.pageText;
		this.pageHeight=this.page.offsetHeight;
		this.headlines=this.page.getElementsByTagName("DIV");
		this.headlineHeights=new Array(this.headlines.length);
		this.headlinePositions=new Array(this.headlines.length);
		for(var i=0;i<this.headlines.length;i++)
		{
			this.headlineHeights[i]=this.headlines[i].offsetHeight;this.headlinePositions[i]=this.headlines[i].offsetTop;
		}
		this.headlineNumber=0;
		this.targetPos=-this.headlinePositions[0]+(this.viewportHeight-this.headlineHeights[0])/2;
		ibc.nextFrame();
	},
	nextFrame:function()
	{
		if(this.paused)return;
		this.curpos-=this.pixelsPerFrame;
		if(this.curpos<this.targetPos)this.curpos=this.targetPos;
		this.page.style.top=this.curpos+"px";
		if(this.curpos>this.targetPos)
		{
			this.timeoutid=setTimeout("ibc.nextFrame()",this.frameLength);
		}
		else
		{
			this.headlineNumber++;
			if(this.headlineNumber<this.headlines.length)
			{
				this.targetPos=-this.headlinePositions[this.headlineNumber]+(this.viewportHeight-this.headlineHeights[this.headlineNumber])/2;
				this.timeoutid=setTimeout("ibc.nextFrame()",this.pauseLength);
				return;
			}
			else if(this.headlineNumber==this.headlines.length)
			{
				this.targetPos=-this.pageHeight;this.timeoutid=setTimeout("ibc.nextFrame()",this.pauseLength);
				return;
			}
			else
			{
				this.repetitions++;this.page.innerHTML=this.defaultText;this.page.style.top="0px";
				if(this.repetitions<this.numLoops)this.restart();
				return;
			}
		}
	},
	pause:function()
	{
		if(this.timeoutid!=null)
		{
			this.paused=true;
			clearTimeout(this.timeoutid);
			this.timeoutid=null;
		}
	},
	resume:function()
	{
		if(this.paused)
		{
			this.paused=false;
			this.nextFrame();
		}
	}
}
document.write('<table width="144" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td><a href="http://www.iraqbodycount.org/" target="_blank"><img src="http://www.flpan.org/js/IBC/ibc144_1.gif" alt="www.iraqbodycount.org"></a></td></tr><tr><td width="144" height="48" background="http://www.flpan.org/js/IBC/ibc144_4.gif"><div id="IBCViewport" align="center" onmouseover="ibc.pause()" onmouseout="ibc.resume()" style="'+ibc.textStyle+'"><div id="IBCPage" style="width:144px; height:48px;">');
document.write(ibc.defaultText);
document.write('</div></div></td></tr><tr><td><a href="http://www.iraqbodycount.org/" target="_blank"><img src="http://www.flpan.org/js/IBC/ibc144r_3.gif" alt="" width="144" height="13" border="0"></a></td></tr><tr><td width="144" height="36" align="center" valign="middle" background="http://www.flpan.org/js/IBC/ibc144_5.gif" border="0" alt=""><a href="http://www.iraqbodycount.org/" target="_blank">');
document.write("<img src='http://www.iraqbodycount.net/counters/ibc_a.gif"+ibc.nocache+"' "+"width='136' height='28' border='0' "+"alt='www.iraqbodycount.org' "+"onerror='this.src=\"http://www.iraqbodycount.org/counters/ibc_a.gif"+ibc.nocache+"\"; this.style.display=\"inline\";'>");
document.write("</a></td></tr></tbody></table>");if(ibc.numLoops>0&&(navigator.appName!="Netscape"||parseInt(navigator.appVersion)>4)&&!(navigator.userAgent.indexOf("Mac")>0&&navigator.userAgent.indexOf("MSIE 5")>0))
document.write('<script src="'+ibc.headlineFile+ibc.nocache+'"></'+'script>');