// johnny cison
// www.toomuchstupid.com
// if you're swiping the code, please leave my name in it.

bar_speed=12, bar_growing=0;

function vote(c, p) { req_send('/match/req/vote.php?c='+c+'&p='+p); }

function bar_grow(i, c, m, p)
{
	c += bar_speed;
	if (c >= m)
	{
		document.getElementById(i).style.width=m+'px';

		bar_growing--;
		if (bar_growing == 0) { percent_display(); }
	}
	else
	{
		document.getElementById(i).style.width=c+'px';
		setTimeout("bar_grow('"+i+"', "+c+", "+m+", '"+p+"')", 30);
	}
}

function percent_display() { document.getElementById('d_percent_user_champion').style.display='block'; document.getElementById('d_percent_user_challenger').style.display='block'; document.getElementById('d_percent_pub_champion').style.display='block'; document.getElementById('d_percent_pub_challenger').style.display='block'; }
