var current_good=''; function add_cart(id,title,price,amount){ //alert(id+title+price+amount); document.getElementById('buy_cont').style.display='block'; var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { //document.getElementById("buy_btn").style.width='70px'; //document.getElementById("buy_btn").innerHTML='Спасибо!'; //document.getElementById("buy_btn").innerHTML='Купить'; document.getElementById("buy_btn").style.display='block'; document.getElementById("buy_progress").style.display='none'; document.getElementById('stepper').style.display='inline'; //document.getElementById("buyed").style.opacity='1'; //setTimeout(function(){document.getElementById("buyed").style.opacity='0';},1800); document.getElementById("cart_cont").style.opacity='1'; eval(xmlhttp.responseText); } } xmlhttp.open("GET","http://lavka.tattoo-vlg.ru/cart.php?id="+id+"&title="+encodeURIComponent(title)+"&price="+price+"&amount="+amount+"&url="+encodeURIComponent(location.href)+"&preview="+encodeURIComponent(current_good), true); xmlhttp.send(); //document.getElementById("buy_btn").innerHTML='Отправка'; //document.getElementById("buy_btn").onclick=function(){}; document.getElementById("buy_btn").style.display='none'; document.getElementById("buy_progress").style.display='block'; document.getElementById('stepper').style.display='none'; } function updateCart(count, itog){ document.getElementById("cart_count").innerHTML=count; document.getElementById("itogo").innerHTML=itog; document.getElementById("cart_table_itogo").innerHTML=itog; } function showSubcat(id){ //document.getElementById('subcat'+id).style.display='block'; //$("#subcat"+id).animate({"opacity":"1.0"}, 1800); $("#subcat"+id).toggle("slow"); } function cancelClick() { if(e && e.stopPropagation) { e.stopPropagation(); } else { e = window.event; e.cancelBubble = true; } }