	function set_currency2(a) {
        JsHttpRequest.query(
            '/price.php', // backend
            {
                // pass a text value
                'act': 'htb_currency',
                'currency': document.getElementById("currency").value
            },
            // Function is called when an answer arrives.
            function(result) {

                if(a==null){

                		for(var i = 0; i<result["prices"]["rfnc"].length; i++){
                			var j = i+1;
                			document.getElementById("rfnc"+j).innerHTML =  result["prices"]["rfnc"][i];
                		}

                		for(var i = 0; i<result["prices"]["rfc"].length; i++){
                			var j = i+1;
                			document.getElementById("rfc"+j).innerHTML =  result["prices"]["rfc"][i];
                		}

                		for(var i = 0; i<result["prices"]["rfun"].length; i++){
                			var j = i+1;
                			document.getElementById("rfun"+j).innerHTML =  result["prices"]["rfun"][i];
                		}
                	}
                	else{
                		if(a == 'rfnc'){
                			for(var i = 0; i<result["prices"][a].length; i++){
                				var j = i+1;
                				document.getElementById(a+j).innerHTML =  result["prices"][a][i];
                			}
                		}
                		if(a == 'rfc'){
                			for(var i = 0; i<result["prices"][a].length; i++){
                				var j = i+1;
                				document.getElementById(a+j).innerHTML =  result["prices"][a][i];
                			}
                		}
                		if(a == 'rfun'){
                			for(var i = 0; i<result["prices"][a].length; i++){
                				var j = i+1;
                				document.getElementById(a+j).innerHTML =  result["prices"][a][i];
                			}
                		}
                	}
            },
            false  // do not disable caching
        );
    }

 	function addtocart(a) {
        JsHttpRequest.query(
            '/price.php', // backend
            {
                // pass a text value
                'act': 'addtocart',
                'num': a
            },
            // Function is called when an answer arrives.
            function(result) {
                if(document.getElementById("cart_num")==null || document.getElementById("cart_img"+a)==null) document.getElementById("info").innerHTML =  result["text"];
                else{
            		document.getElementById("cart_num").innerHTML =  result["num"];
                	document.getElementById("cart_img"+a).innerHTML =  result["text"];
                }

            },
            false  // do not disable caching
        );
    }

    function change(a) {
        JsHttpRequest.query(
            '/price.php', // backend
            {
                // pass a text value
                'act': 'cart',
                'id': a,
                'license': document.getElementById("lic"+a).value,
                'size': document.getElementById("size"+a).value,
                'currency': document.getElementById("currency").value

            },
            // Function is called when an answer arrives.
            function(result) {
                if (result) {


                    	document.getElementById("price"+a).innerHTML =  result["price"];
                    	document.getElementById("summ").innerHTML =  result["summ"];

                }
            },
            false  // do not disable caching
        );
    }

    function set_currency() {
        JsHttpRequest.query(
            '/price.php', // backend
            {
                // pass a text value
                'act': 'cart_currency',
                'currency': document.getElementById("currency").value

            },
            // Function is called when an answer arrives.
            function(result) {
                if (result) {

                        for(var i = 0; i<result["ids"].length; i++){                        	document.getElementById("price"+result["ids"][i]).innerHTML =  result["price"][i];                        }
                       	document.getElementById("currency2").innerHTML =  result["currency"];
                    	document.getElementById("summ").innerHTML =  result["summ"];

                }
            },
            true  // do not disable caching
        );
    }
