// JavaScript Document
function chooseMake(strFormName, boolHeadContained)
{
	var arrModelList;
	var objModelSelection;
	var objMakeSelection;
	var intOffSetForAll;
	var i;

	if (document.forms[strFormName].model == null)
		return;

	objModelSelection = document.forms[strFormName].model;
	objMakeSelection = document.forms[strFormName].make;
	objModelSelection.selectedIndex = 0;
	objModelSelection.options.length = 1;

	if (boolHeadContained)
		intOffsetForAll = 1;
	else
		intOffsetForAll = 0;

	if (objMakeSelection.selectedIndex >= intOffsetForAll){
		arrModelList = (arrModels[objMakeSelection.selectedIndex - intOffsetForAll]).split(';');
        	for (i = 0; i < arrModelList.length; i++){
	    		objModelSelection.options.length = i+2;
			objModelSelection.options[i+1].value = (arrModelList[i]).split(',')[1];
			objModelSelection.options[i+1].text = (arrModelList[i]).split(',')[1];
        	}
	}
}

// JavaScript Document
function chooseKraj(strFormName, boolHeadContained)
{
	var arrObecList;
	var arrObecSelection;
	var objMakeSelection;
	var intOffSetForAll;
	var i;

	if (document.forms[strFormName].idokres == null)
		return;
    
	arrObecSelection = document.forms[strFormName].idokres;
	objMakeSelection = document.forms[strFormName].idkraj;
	arrObecSelection.selectedIndex = 0;
	arrObecSelection.options.length = 1;
	


	if (boolHeadContained)
		intOffsetForAll = 1;
	else
		intOffsetForAll = 0;
    
    
	if (objMakeSelection.selectedIndex >= intOffsetForAll){
		arrObecList = (arrObec[objMakeSelection.selectedIndex + 1 - intOffsetForAll]).split(';');
        	for (i = 0; i < arrObecList.length; i++){
	    		arrObecSelection.options.length = i+2;
			arrObecSelection.options[i+1].value = (arrObecList[i]).split(',')[2];
			arrObecSelection.options[i+1].text = (arrObecList[i]).split(',')[1];
        	}
	}
}

function countChar(strFormName,maxVal)
{
	if (document.forms[strFormName].idcount == null)
		return;
	document.forms[strFormName].idcount.value = document.forms[strFormName].idpopis.value.length+' / '+maxVal;
}

function countCharV(strFormName,maxVal)
{
	if (document.forms[strFormName].idcount == null)
		return;
	document.forms[strFormName].idcount.value = document.forms[strFormName].idtext.value.length+' / '+maxVal;
}

