function show_div(id,id1,id2, txtmode, usr)
{
var cc = document.getElementById('current_currency');
var _cc=" грн.";
switch (cc.value)
	{
	case "2": _cc=" грн.";
			break;
	case "3": _cc="$ ";
			break;
	case "4": _cc="€ ";
			break;
	case "5": _cc=" руб.";
			break;
	}

 
 var t = "Товар добавлен в корзину.\n Перейти к оформлению заказа?";
 if(txtmode=="wait")
 	{
	t = "<span style='color: rgb(253, 122, 0); font-family: Tahoma; font-style: normal; font-variant: normal; font-weight: bold; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;'>Товар добавлен в список ожидания</span>";
	$.get('/cart.php?addproduct='+id+'&i='+usr);
	}
	else if(id1=="wait2"){
	  //alert('cart.php?addproduct='+id+'&i='+usr+'&so=1');
	//t = "<span style='color: rgb(253, 122, 0); font-family: Tahoma; font-style: normal; font-variant: normal; font-weight: bold; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none;'>Товар добавлен в список ожидания</span>";

	//$.get('/cart.php?addproduct='+id+'&i='+usr+'&so=1');
	}else{
	t = "Товар добавлен в корзину.\n Перейти к оформлению заказа?";
	$.get('/cart.php?addproduct='+id);
	}
 document.getElementById('mvotefrm_'+id).innerHTML=t;
 document.getElementById('mvotefrm_'+id).href='/index.php?shopping_cart=yes';
 document.getElementById('mvotefrm_'+id).onclick='';
 if(txtmode!="wait")
 	{
 	  if ( $('#discount').length ){
     	  var discount = $('#discount').html().replace('%', '');
     	  var total = parseFloat($('#csum').html().replace(_cc, ''));
          var new_price = parseFloat(id2.replace(_cc, ''));
          var discount_in_summ = (total + new_price) * (discount/100);
          var total_with_discount = (total + new_price - discount_in_summ);
          $('#discount_in_summ').html(discount_in_summ.toFixed(2)+' '+_cc);
          $('#total_with_discount').html(total_with_discount.toFixed(2)+' '+_cc);
      }

	 document.getElementById('crt').innerHTML = eval(document.getElementById('crt').innerHTML)+1;
	 var summ_html=new String(document.getElementById('csum').innerHTML.replace(",",""));
	 var new_summ=(parseFloat(summ_html.replace(_cc,""))+parseFloat(id2.replace(_cc,""))).toFixed(2);
	 if((cc.value=='2') || (cc.value=='5'))
		{
		document.getElementById('csum').innerHTML = new_summ+""+_cc;
		}
		else
		{
		document.getElementById('csum').innerHTML =  _cc+""+new_summ;
		}
	}
}
function set_reserve(id){
    $.get('/cart.php?reserve='+id);
}