function change(id,start,end){
	var result=0;
	var per=0;
	var al=0;
	var col=0;
	
	for(i=start;i<=end;i++){
		per=document.getElementById("row["+i+"]").value;
		per=per*1;
		result=per+result;
		per=0;
	}
	
	document.getElementById(id).setAttribute("value",result);
	
	for(i=1;i<=11;i++){
		al=document.getElementById("rows["+i+"]").value;
		al=al*1;
		col=al+col;
		al=0;
	}
	document.getElementById("rows[12]").setAttribute("value",col);
};

function star_on(id,ti,col) {

document.getElementById(id).className = "vote_h";

if(ti==2) {
rr="1_" + col;
document.getElementById(rr).className = "vote_h";
}

if(ti==3) {
rr="1_" + col;
document.getElementById(rr).className = "vote_h";
rr="2_" + col;
document.getElementById(rr).className = "vote_h";
}

if(ti==4) {
rr="1_" + col;
document.getElementById(rr).className = "vote_h";
rr="2_" + col;
document.getElementById(rr).className = "vote_h";
rr="3_" + col;
document.getElementById(rr).className = "vote_h";
}

if(ti==5) {
rr="1_" + col;
document.getElementById(rr).className = "vote_h";
rr="2_" + col;
document.getElementById(rr).className = "vote_h";
rr="3_" + col;
document.getElementById(rr).className = "vote_h";
rr="4_" + col;
document.getElementById(rr).className = "vote_h";
}

};


function star_off(id,ti,col) {
document.getElementById(id).className = "vote";

if(ti==2) {
rr="1_" + col;
document.getElementById(rr).className = "vote";
}

if(ti==3) {
rr="1_" + col;
document.getElementById(rr).className = "vote";
rr="2_" + col;
document.getElementById(rr).className = "vote";
}

if(ti==4) {
rr="1_" + col;
document.getElementById(rr).className = "vote";
rr="2_" + col;
document.getElementById(rr).className = "vote";
rr="3_" + col;
document.getElementById(rr).className = "vote";
}

if(ti==5) {
rr="1_" + col;
document.getElementById(rr).className = "vote";
rr="2_" + col;
document.getElementById(rr).className = "vote";
rr="3_" + col;
document.getElementById(rr).className = "vote";
rr="4_" + col;
document.getElementById(rr).className = "vote";
}

};
