
function gId(id)
	{
	return document.getElementById(id);
	}

function switchRegForm(type, disOth)
	{
	if(type == 'priv')
		{
		gId('priv').style.display = ''
		gId('corp').style.display = 'none';
		gId('corp2').style.display = 'none';
		gId('privRadio').checked = 'checked';

		if(disOth == '1')
			gId('corpRadio').disabled = 'disabled';
		}
	if(type == 'corp')
		{
		gId('priv').style.display = 'none'
		gId('corp').style.display = '';
		gId('corp2').style.display = '';
		gId('corpRadio').checked = 'checked';

		if(disOth == '1')
			gId('privRadio').disabled = 'disabled';
		}

	}

/* Scroll item auto */
var timeout = 0;
var speed = 0;
function scrollItem(id, dir)
	{
	speed = 10;
	clearTimeout(timeout);

	scrollItemAuto(id, dir);
	}

function scrollItemAuto(id, dir)
	{
	if(dir == '0')
		return;
	if(dir == '1')
		gId(id).scrollTop = gId(id).scrollTop + speed;
	if(dir == '-1')
		gId(id).scrollTop = gId(id).scrollTop - speed;
	speed ++;

	timeout = setTimeout("scrollItemAuto('"+id+"', '"+dir+"');", 50);
	}


function setStars(num)
	{
	for(i = 1; i <= 5; i++)
		{
		name = 'star_'+i;
		imgName = gId(name).src;
		if(i <= num)
			{
			imgName = imgName.replace('star.gif', 'star-act.gif');
			gId(name).src = imgName;
			}
		else
			{
			imgName = imgName.replace('star-act.gif', 'star.gif');
			gId(name).src = imgName
			}
		}
	}

// Nastvi potrebne eventy
function setEvents()
	{
	if(!gId('compet'))
		{
		setTimeout('setEvents();', 400);
		return;
		}

	gId('compet').onmouseover = function(){this.className = 'competition competitionAct';};
	gId('compet').onmouseout = function(){this.className = 'competition';};
	//gId('compet').onclick = function(){this.className = 'competition competitionAct';};
	//alert('allok');
	}

setTimeout('setEvents();', 400);