function changeView(a,b){a.className=b}function emptyCart(){var a=document.getElementsByClassName("inCart");var b="";if(ballonhtml.length>0)var b=" and all available benefits";if(a.length>0&&confirm("Are you sure you want to remove all the items from the basket"+b+"?")){ballonhtml=null;showmeonce=false;if(hb1)hb1.hide();loadCart("removeAll=true",refreshCart)}}function checkout(){window.location=checkoutLocation}function loadCart(a,b){new Ajax.Request(storeLocation+"animaCart.php?hideTooltip=y",{method:"get",parameters:a,onSuccess:b,onFailure:function(){alert("Something went wrong...")}})}function updateCreditos(a){if(a!=null)ballonhtml=a.responseText;if(ballonhtml.length>0){$("cartCredits").show();if(showmeonce!=true){hb1.show();showmeonce=true}}else{$("cartCredits").hide();hb1.hide()}}function refreshCart(a){var b=null;if(a!=null)b=a.responseText;products=document.getElementsByClassName("inCart");if(b!=null)$("cartContainer").innerHTML=b;var c=document.getElementsByClassName("inCart");new Ajax.Request(storeLocation+"showBenefits_2011.php",{method:"get",onSuccess:updateCreditos,onFailure:function(){alert("Something went wrong...")}});updateInCartModels(c.length);updateTotalPrice()}function updateTotalPrice(){new Ajax.Updater("totalPrice",storeLocation+"animaTotalPrice.php",{method:"get"})}function updateInCartModels(a){$("modelsInCart").innerHTML=a+" Model"+(a!=1?"s":"")}function init(){getStatus();updateTotalPrice();loadCart(null,refreshCart);var a=document.getElementById("cartCredits");if(a!=null){hb1=new HelpBalloon({title:"Available Benefits:",dataURL:storeLocation+"showBenefits_2011.php",cacheRemoteContent:false,icon:$("cartCredits"),fixedPosition:HelpBalloon.POS_TOP_LEFT,useEvent:["mouseover"]})}};document.write('<link rel="stylesheet" href="http://javascript.axyz-design.com/modalbox.css" type="text/css" />');document.write('<script type="text/javascript" src="http://javascript.axyz-design.com/modalbox.js"></script>');document.write('<script type="text/javascript" src="/cart/modules/3rdparty/AjaxAuthentication/auth-anima_2011.js"></script>');document.write('<script type="text/javascript" src="http://javascript.axyz-design.com/HelpBalloon.js"></script>');var hb1=null;var ballonhtml=null;var storeLocation=window.location.protocol+"//"+window.location.hostname+"/cart/";var checkoutLocation=storeLocation+"cart.php?act=cart";var productsLocation=window.location.protocol+"//"+window.location.hostname+"/anima/";var selectedProducts=new Array;var products=null;Event.observe(window,"load",init)
