function toggleDisp(hideObj,showObj){
	document.getElementById(hideObj).style.display='none';
	document.getElementById(showObj).style.display='block';
}

function showHide(obj){
	var disp = 'block';
	if(document.getElementById(obj).style.display == 'block') disp = 'none';
	
	document.getElementById(obj).style.display = disp;
}

function vote(self)
{
	var tr = document.getElementById('gradeHolder');
	
	var col = tr.getElementsByTagName('div');
	
	var end = false;
	
	for(var i = 0; i < col.length; i++){ 
		if(typeof col[i].className != 'undefined' && col[i].className == 'ginside'){
			if(typeof col[i].oldWidth == 'undefined')
				col[i].oldWidth = col[i].style.width;
			
			col[i].style.backgroundColor = '';
			col[i].style.width = col[i].oldWidth;
		}
	}
	
	if(self == 'clear'){
		return true;
	}
	
	for(var i = 0; i < col.length; i++){ 
		if(typeof col[i].className != 'undefined' && col[i].className == 'ginside'){
			col[i].style.width = '100%';
			col[i].style.backgroundColor = 'red';
			if(end){
				break;
			}
		}
		if(col[i] == self){
			end = true;
		}
	}
	
}

function ocen(ocena) {
	
	window.location = window.location.pathname + "?ocen_na=" + ocena;
	
}