var priceValues = new Array(); //\u041C\u0430\u0441\u0441\u0438\u0432 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0439 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0445 \u043F\u043E\u043B\u0435\u0439-\u0446\u0435\u043Dvar priceValuesIndexs = new Array(); //\u041C\u0430\u0441\u0441\u0438\u0432 \u0438\u043D\u0434\u0435\u043A\u0441\u043E\u0432, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0432\u0443\u044E\u0442 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u043C \u043F\u043E\u043B\u044F\u043C-\u0446\u0435\u043D\u0430\u043C \u0432 \u043C\u0430\u0441\u0441\u0438\u0432\u0435 priceFieldNames \u0438 priceValuesvar priceFieldNames = new Array(); //\u041C\u0430\u0441\u0441\u0438\u0432 \u0438\u043C\u0435\u043D \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0445 \u043F\u043E\u043B\u0435\u0439-\u0446\u0435\u043Dvar arrIndex = -1; //\u0422\u0435\u043A\u0443\u0449\u0438\u0439 \u0438\u043D\u0434\u0435\u043A\u0441 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430 \u043C\u0430\u0441\u0441\u0438\u0432\u0430 \u0446\u0435\u043Dfunction ClearPriceArrays(){	try	{		delete priceValues;		priceValues = new Array();			delete priceValuesIndexs;		priceValuesIndexs = new Array();			delete priceFieldNames;		priceFieldNames = new Array();			arrIndex = -1;	}	catch(err)	{		return;	}}//\u0414\u0430\u043D\u043D\u0430\u044F \u0444\u0443\u043D\u043A\u0446\u0438\u044F \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u0442 \u043F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u0432\u0430\u043B\u044E\u0442function ChangeCurrency(subsFormName, currencySyfix, oldCurrencySifix){	try	{		var tmpArrRadioFName = null;		var priceField = null;		var currentPriceField = null;		var summ = 0;				for(i=0; i<document.forms[subsFormName].elements.length; i++)		{			if(document.forms[subsFormName].elements[i].id.indexOf(oldCurrencySifix) > -1)				document.forms[subsFormName].elements[i].style.display = "none";				if(document.forms[subsFormName].elements[i].id.indexOf(currencySyfix) > -1)				document.forms[subsFormName].elements[i].style.display = "block";		}		for(i=0; i<priceFieldNames.length; i++)					if(priceValues[priceValuesIndexs[priceFieldNames[i].name]] != 0)			{				tmpArrRadioFName = priceFieldNames[i].name.split("_");				priceField = document.getElementById("id_"+tmpArrRadioFName[0]+"_price"+priceFieldNames[i].value+currencySyfix) == null ? (document.getElementById("id_"+tmpArrRadioFName[0]+"_price_en"+priceFieldNames[i].value+currencySyfix) == null ? document.getElementById("id_"+tmpArrRadioFName[0]+"_point"+priceFieldNames[i].value+currencySyfix) : document.getElementById("id_"+tmpArrRadioFName[0]+"_price_en"+priceFieldNames[i].value+currencySyfix)) : document.getElementById("id_"+tmpArrRadioFName[0]+"_price"+priceFieldNames[i].value+currencySyfix);				currentPriceField = document.getElementById("id_"+tmpArrRadioFName[0]+"_price"+priceFieldNames[i].value+currencySyfix) == null ? (document.getElementById("id_"+tmpArrRadioFName[0]+"_price_en"+priceFieldNames[i].value) == null ? document.getElementById("id_"+tmpArrRadioFName[0]+"_point") : document.getElementById("id_"+tmpArrRadioFName[0]+"_price_en"+priceFieldNames[i].value)) : document.getElementById("id_"+tmpArrRadioFName[0]+"_price"+priceFieldNames[i].value);								currentPriceField.value = priceField.value.substr(0, priceField.value.indexOf(document.getElementById("id_"+currencySyfix).value)-1);					priceValues[priceValuesIndexs[priceFieldNames[i].name]] = parseInt(priceField.value.substr(0, priceField.value.indexOf(document.getElementById("id_"+currencySyfix).value)-1));								summ += priceValues[priceValuesIndexs[priceFieldNames[i].name]];			}					document.getElementById("id_oldCurrencySufix").value = currencySyfix;		document.getElementById("id_GeneralSumm").value = summ + " " + document.getElementById("id_"+currencySyfix).value;		}	catch(err)	{		return;	}}//\u0424\u0443\u043D\u043A\u0446\u0438\u044F \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u0442 \u043F\u043E\u0434\u0441\u0447\u0435\u0442 \u0441\u0443\u043C\u043C\u044B \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0439 \u0446\u0435\u043D\u044Bfunction CalcSumm(clickedField, currencyId){	try	{		var currency = "";				if(document.getElementById(currencyId).options == null)			currency = document.getElementById(currencyId).value;		else			currency = document.getElementById(currencyId).options[document.getElementById(currencyId).selectedIndex].text;				var tmpArrRadioFName = clickedField.name.split("_");		var priceField =  document.getElementById("id_"+tmpArrRadioFName[0]+"_price"+clickedField.value+currency) == null ? (document.getElementById("id_"+tmpArrRadioFName[0]+"_en_price"+clickedField.value+currency) == null ? document.getElementById("id_"+tmpArrRadioFName[0]+"_point"+clickedField.value+currency) : document.getElementById("id_"+tmpArrRadioFName[0]+"_en_price"+clickedField.value+currency)) : document.getElementById("id_"+tmpArrRadioFName[0]+"_price"+clickedField.value+currency);		var currentPriceField =  document.getElementById("id_"+tmpArrRadioFName[0]+"_price"+clickedField.value) == null ? (document.getElementById("id_"+tmpArrRadioFName[0]+"_en_price"+clickedField.value) == null ? document.getElementById("id_"+tmpArrRadioFName[0]+"_point") : document.getElementById("id_"+tmpArrRadioFName[0]+"_en_price"+clickedField.value)) : document.getElementById("id_"+tmpArrRadioFName[0]+"_price"+clickedField.value);		var summ = 0;		if(clickedField.value == "\u043D\u0435\u0442" || clickedField.value == "none")		{				if(priceValuesIndexs[clickedField.name] == null)				priceValuesIndexs[clickedField.name] = ++arrIndex;						priceFieldNames[priceValuesIndexs[clickedField.name]] = clickedField;			priceValues[priceValuesIndexs[clickedField.name]] = 0;		}		else		{			if(priceValuesIndexs[clickedField.name] == null)				priceValuesIndexs[clickedField.name] = ++arrIndex;						priceFieldNames[priceValuesIndexs[clickedField.name]] = clickedField;			currentPriceField.value = priceField.value.substr(0, priceField.value.indexOf(document.getElementById("id_"+currency).value)-1);				priceValues[priceValuesIndexs[clickedField.name]] = parseInt(priceField.value.substr(0, priceField.value.indexOf(document.getElementById("id_"+currency).value)-1));		}			for(i=0; i<priceValues.length; i++)			summ += priceValues[i];				document.getElementById("id_GeneralSumm").value = summ + " " + document.getElementById("id_"+currency).value;		}	catch(err)	{		return;	}}