function initPage()
{
	var _rates = document.getElementById('rates');
	if(_rates)
	{
		try
		{
			_rates.list=_rates.getElementsByTagName('li');
			_rates.cheng=true;
			_rates._res=_rates.parentNode.getElementsByTagName('span')[0];
			_rates._reset=_rates.parentNode.getElementsByTagName('p')[0].getElementsByTagName('a')[0];
			_rates._reset.pareantObj=_rates;
			_rates._reset.onclick=function()
			{
				try
				{
					if(_login)
					{
						this.pareantObj._res.innerHTML='X';
						this.pareantObj.cler();
						this.pareantObj.cheng=true;
					}
				}
				catch (eror){}
				return false;
			}
			_rates.cler=function()
			{
				for(i=0;i<this.list.length;i++)
				{
					this.list[i].className='';
				}
			}
			for(i=0;i<_rates.list.length;i++)
			{
				_rates.list[i].index=i+1;
				_rates.list[i].onclick=function()
				{
					try
					{
						if(this.parentNode.cheng&&_login)
						{
							this.className='active';
							this.parentNode.cheng=false;
							this.parentNode._res.innerHTML=this.index;
							return false;
						}
					}
					catch (eror){}
					
				}
				_rates.list[i].onmouseover=function()
				{
					if(this.parentNode.cheng)
					{
						this.className='active';
						return false;
					}
				}
				_rates.list[i].onmouseout = function()
				{
					if(this.parentNode.cheng)
					{
						this.className='';
						return false;
					}
				}
			}
		}
		catch(error)
		{
		}
	}
}

if (window.addEventListener)
	window.addEventListener("load", initPage, false);
else if (window.attachEvent)
	window.attachEvent("onload", initPage);