function ZmenitModel(idx, id, obrazek)
{

	var frm = document.forms["aspnetForm"];

	var obr_url = frm.elements["obr-url"].value;
	var obr = document.getElementById(frm.elements["obr-id"].value);
	var tlc = document.getElementById(frm.elements["tlc-id"].value);
	var mod = document.getElementById(frm.elements["mod-id"].value);
	
	tlc.href = "Koupit.aspx?mod_id=" + id;
	obr.src = obr_url + obrazek;
	
	for (var i = 0; i<mod.childNodes.length; i++)
		mod.childNodes[i].className =
			i != idx ? "det-var" : "det-var-akt";
}

function OdstranitPomlcku(policko)
{
	if (policko.value.replace(/ /g, "") == "-")
		policko.value = "";
}

function PridatPomlcku(policko)
{
	if (policko.value.replace(/ /g, "") == "")
		policko.value = "-";
}
