function boja(checkboks, tr, boja, id)
{
	if(document.getElementById(checkboks).checked==true)
	{
		var chek = "X"+checkboks;
		document.getElementById(chek).checked=false;
		document.getElementById(tr).style.backgroundColor = "#9BD92E";
		document.getElementById('trajanje' + id).disabled = false;
		document.getElementById('cenaExl' + id).style.color = "#8abe8a";
		document.getElementById('cenaStd' + id).style.color = "green";
	}
	else 
	{
		if(boja==1)	document.getElementById(tr).style.backgroundColor = "#F5F5F5";
		else document.getElementById(tr).style.backgroundColor = "#F5F5F5";
		document.getElementById('trajanje' + id).disabled = true;
		document.getElementById('cenaExl' + id).style.color = "maroon";
		document.getElementById('cenaStd' + id).style.color = "green";
	}
}



function paketboja(checkboks, tr, boja, id)
{
	if(document.getElementById(checkboks).checked==true)
	{
		//var chek = "X"+checkboks;
		//document.getElementById(chek).checked=false;
		document.getElementById(tr).style.backgroundColor = "#9BD92E";
		//document.getElementById('trajanje' + id).disabled = false;
	}
	else 
	{
		if(boja==1)	document.getElementById(tr).style.backgroundColor = "#F5F5F5";
		else document.getElementById(tr).style.backgroundColor = "#F5F5F5";
		//document.getElementById('trajanje' + id).disabled = true;
	}
}


function boja2(checkboks, tr, boja, id)
{
	if(document.getElementById(checkboks).checked==true)
	{
		var chek = checkboks.substring(1);
		document.getElementById(chek).checked=false;
		document.getElementById(tr).style.backgroundColor = "#FF9900";
		document.getElementById('trajanje' + id).disabled = false;
		document.getElementById('cenaStd' + id).style.color = "#ffb900";
		document.getElementById('cenaExl' + id).style.color = "maroon";
	}
	else 
	{
		if(boja==1)	document.getElementById(tr).style.backgroundColor = "#F5F5F5";
		else document.getElementById(tr).style.backgroundColor = "#F5F5F5";
		document.getElementById('trajanje' + id).disabled = true;
		document.getElementById('cenaStd' + id).style.color = "green";
		document.getElementById('cenaExl' + id).style.color = "maroon";
	}
}
function bojaPaket(checkboks, tr)
{
	if(document.getElementById(checkboks).checked==true)
	{
		document.getElementById(tr).style.backgroundColor = "#9BD92E";
		document.getElementById('X'+tr).style.backgroundColor = "#DBFFE4";
	}
	else
	{
		document.getElementById(tr).style.backgroundColor = "#F5F5F5";
		document.getElementById('X'+tr).style.backgroundColor = "#F5F5F5";
	}
}
function promeniCenu(kombo,id,cenaStd,cenaExl)
{
	var std = document.getElementById('cenaStd' + id);
	var exl = document.getElementById('cenaExl' + id);
/*	if(kombo.selectedIndex == 0)
	{
		std.innerHTML = (Math.round(cenaStd * 0.4*100)/100).toFixed(2);
		exl.innerHTML = (Math.round(cenaExl * 0.4*100)/100).toFixed(2);
		//std.innerHTML =cenaStd+"!!"+cenaStd * 0.4;
		//exl.innerHTML = (Math.round(cenaExl * 0.4*100));
	}*/
	if(kombo.selectedIndex == 0)
	{
		std.innerHTML = (Math.round(cenaStd * 0.6*100)/100).toFixed(2);
		exl.innerHTML = (Math.round(cenaExl * 0.6*100)/100).toFixed(2);
	}
	if(kombo.selectedIndex == 1)
	{
		std.innerHTML = (Math.round(cenaStd*1.0*100)/100).toFixed(2);
		exl.innerHTML = (Math.round(cenaExl*1.0*100)/100).toFixed(2);
	}
	if(kombo.selectedIndex == 2)
	{
		std.innerHTML = (Math.round(cenaStd * 1.8*100)/100).toFixed(2);
		exl.innerHTML = (Math.round(cenaExl * 1.8*100)/100).toFixed(2);
	}
	if(kombo.selectedIndex == 3)
	{
		std.innerHTML = (Math.round(cenaStd * 2.8*100)/100).toFixed(2);
		exl.innerHTML = (Math.round(cenaExl * 2.8*100)/100).toFixed(2);
	}
	if(kombo.selectedIndex == 4)
	{
		std.innerHTML = (Math.round(cenaStd * 5.0*100)/100).toFixed(2);
		exl.innerHTML = (Math.round(cenaExl * 5.0*100)/100).toFixed(2);
	}
}

function promeniCenuTestovi(kombo,id,cenaStd,cenaExl)
{
	var std = document.getElementById('cenaStd' + id);
	var exl = document.getElementById('cenaExl' + id);
/*	if(kombo.selectedIndex == 0)
	{
		std.innerHTML = (Math.round(cenaStd * 0.4*100)/100).toFixed(2);
		exl.innerHTML = (Math.round(cenaExl * 0.4*100)/100).toFixed(2);
		//std.innerHTML =cenaStd+"!!"+cenaStd * 0.4;
		//exl.innerHTML = (Math.round(cenaExl * 0.4*100));
	}*/
	/* izbacio sam zato sto je za testove izbacena kupovina od 2 nedelje
	if(kombo.selectedIndex == 0)
	{
		std.innerHTML = (Math.round(cenaStd * 0.6*100)/100).toFixed(2);
		exl.innerHTML = (Math.round(cenaExl * 0.6*100)/100).toFixed(2);
	}
	svima sam smanjio selectedIndex za 1
	*/
	if(kombo.selectedIndex == 0)
	{
		std.innerHTML = (Math.round(cenaStd*1.0*100)/100).toFixed(2);
		exl.innerHTML = (Math.round(cenaExl*1.0*100)/100).toFixed(2);
	}
	if(kombo.selectedIndex == 1)
	{
		std.innerHTML = (Math.round(cenaStd * 1.8*100)/100).toFixed(2);
		exl.innerHTML = (Math.round(cenaExl * 1.8*100)/100).toFixed(2);
	}
	if(kombo.selectedIndex == 2)
	{
		std.innerHTML = (Math.round(cenaStd * 2.8*100)/100).toFixed(2);
		exl.innerHTML = (Math.round(cenaExl * 2.8*100)/100).toFixed(2);
	}
	if(kombo.selectedIndex == 3)
	{
		std.innerHTML = (Math.round(cenaStd * 5.0*100)/100).toFixed(2);
		exl.innerHTML = (Math.round(cenaExl * 5.0*100)/100).toFixed(2);
	}
}
