


		function del_tov_from_cart(id){
			 $.ajax({url:"http://www.re4i.com.ua/zakaz?task=izkorzini&id"+id,cache: false,success:function(upd_c2){update_cart_div();}});
		}
		
		
		function add_tov_to_cart(id){
			 $.ajax({url:"http://www.re4i.com.ua/zaponki?vkorzinu="+id,cache: false,success:function(upd_c){update_cart_div();}});
			
		}
		

function update_cart_div(){
$.ajax({url:"/zakaz?task=get_cart_tovs_list&mode=iframe",cache: false,success:function(html){$("#cart_div").html(html);}});
}






function show(my_element){

  document.getElementById(my_element).style.display='';

}



function hide(myelement){
  document.getElementById(myelement).style.display='none';
}







function update_div(chto,kuda){

document.getElementById(kuda).style.backgroundImage='url("/img/style/preloader.gif")';

	var req = new Request.HTML({
	method: 'get',
	url: chto,
	update: kuda});

	req.send();

document.getElementById(kuda).style.backgroundImage='url("")';

}





function send_form_update(myForm, update, update_kuda){

$(myForm).set('send', {
onComplete: function(response) { 
update_div(update,update_kuda);
}
});

$(myForm).send();
}


function send_form(myForm){

	$(myForm).send();
}





function doq(q,update,update_kuda){

           // создаем объект запроса
           var r = new Request({
              method: 'get', // GET запрос
              url: q,
		onComplete: function(response) { 
		update_div(update,update_kuda);
		} // адрес запроса берем из адреса ссылки
	      
           });
           r.send(); // отправляем запроса

}

function clear_html(chto){
  document.getElementById(chto).innerHTML='';
};




