
var ipinterval, iptotimg, ipimgs, ipwidth=169, ipheight=3;

function iprogress()
{
	document.write('<div id="ipdiv" style="margin: 6px 9px 0 0; width: '+ipwidth+'px; height: '+ipheight+'px;'
	              +' border: solid #112244 1px; text-align: left;">'
	              +'<img id="ipimg" src="iprogress/iprogress.png" border=0 alt=""'
	              +' height='+ipheight+' width=1></div>');
}

function iprogress_timer(kill)
{
	var iptotloaded = 0;
	
	for (var a=0; a<iptotimg; a++) if (ipimgs[a].complete) iptotloaded++;
	if (iptotloaded < iptotimg && (!kill))
		document.getElementById('ipimg').width = (iptotloaded / iptotimg)*ipwidth;
	else {
		document.getElementById('ipdiv').style.visibility = 'hidden';
		window.clearInterval(ipinterval);
	}
}

function iprogress_init()
{
	ipimgs = document.getElementsByTagName('img');
	iptotimg = ipimgs.length;
	ipinterval = window.setInterval('iprogress_timer(0);', 200);
	window.setTimeout('iprogress_timer(1);', 6000);
}


