function calcPrice(){jQuery.ajax({type:"GET",url:"/ajax/calc_price.php",data:"update_quantity=1",success:function(a){jQuery("#total_price").html(a)}});return false}function addToCart(a,b){var c=document.getElementById(b).value;query_string="order_code="+a+"&order_quantity="+c;jQuery.ajax({type:"POST",url:"/ajax/cart_action.php",data:query_string,success:function(b){cartItems();jQuery("#orderadded"+a).html(b);jQuery("#shopcartup").show();jQuery("#cartimg").show()}});return false}function cartItems(){jQuery.ajax({type:"POST",url:"/ajax/cart_count.php",data:"id=1",success:function(a){jQuery("#cartnumitems").html("("+a+")")}});return false}function registerAccount(){location.href="/index.php?register"}function showRestrict(a){jQuery("#restrict"+a).show()}function retrievePass(){var a=jQuery("#email").val();query_string="lgin=1&email="+a;jQuery.ajax({type:"POST",url:"/ajax/resetpass.php",data:query_string,success:function(a){jQuery("#retriever").html(a)}});return false}function confirmOrder(){query_string="confirm=1";jQuery.ajax({type:"POST",url:"/ajax/paypalsend.php",data:query_string,success:function(a){jQuery("#cartinc").html(a)}});return false}function getPassForm(){query_string="getlogin=1";jQuery.ajax({type:"POST",url:"/ajax/passwordform.php",data:query_string,success:function(a){jQuery("#cartsinc").html(a)}});return false}function getLoginForm(){query_string="getlogin=1";jQuery.ajax({type:"POST",url:"/ajax/getLogin.php",data:query_string,success:function(a){jQuery("#cartsinc").html(a)}});return false}function couponCart(a){query_string="id="+a;jQuery.ajax({type:"POST",url:"/ajax/couponcart.php",data:query_string,success:function(a){jQuery("#coupadded").html(a)}});return false}function print_this(a){var b=document.getElementsByTagName("DIV");for(i=0;i<b.length;i++){if(b[i].id!=a&&b[i].className=="hide_for_print"){b[i].style.display="none"}}window.print()}function couponopen(a){specialspop=window.open(a,"name","height=400,width=500,left=300,top=100,scrollbars=1")}function editReply(){if(http.readyState==1){}if(http.readyState==4){var a=http.responseText;document.getElementById("subid").innerHTML=""+a;document.categoryform.submit()}}function genSubCatEdit(a,b){nocache=Math.random();var c="";var d=encodeURI(document.getElementById(a).value);http.open("get","/lib/ajaxSubCategory.php?id="+d+"&nocache = "+nocache+"&p="+c);http.onreadystatechange=editReply;http.send(null)}function genSubCat(){nocache=Math.random();var a=encodeURI(document.getElementById("subid").value);http.open("get","/lib/ajaxSubCategory.php?id="+a+"&nocache = "+nocache);http.onreadystatechange=insertReply;http.send(null)}function createObject(){var a;var b=navigator.appName;if(b=="Microsoft Internet Explorer"){a=new ActiveXObject("Microsoft.XMLHTTP")}else{a=new XMLHttpRequest}return a}jQuery.noConflict();var http=createObject();var nocache=0;var specialspop;jQuery(function(){jQuery("#cart tr .remove input").click(function(){var a=jQuery(this).val();jQuery.ajax({type:"GET",url:"/ajax/cart_action.php",data:"remove[]="+a+"&update_quantity=1",success:function(){jQuery("#cart tr .remove input[value="+a+"]").parent().parent().fadeOut(500,function(){jQuery(this).remove();calcPrice()})}})});jQuery("#cart tr .quantity select").change(function(){var a=jQuery(this).attr("name").slice(9,-1);var b=jQuery(this).val();jQuery.ajax({type:"GET",url:"/ajax/cart_action.php",data:"quantity["+a+"]="+b,success:function(b){jQuery("#subamount"+a).html(b);calcPrice()}})})});
