var ABSOLUTE_PATH = "http://www.idessinteractive.com/"; var CART_PATH = "https://secure.idessonline.com/idessit/shopping_cart/"; function addToCart(objForm){ if(trimString(objForm.txtQuantity.value)==""){ alert("Please enter number of quantity you want to order."); objForm.txtQuantity.select(); return; } if(isNaN(trimString(objForm.txtQuantity.value))){ alert("Invalid value. Quantity must be a number."); objForm.txtQuantity.select(); return; } if(parseInt(trimString(objForm.txtQuantity.value))<=0){ alert("Invalid value. Quantity must be a greater than zero."); objForm.txtQuantity.select(); return; } if(objForm.rdoType.type!='hidden'){ if(!objForm.rdoType[0].checked && !objForm.rdoType[1].checked){ alert("Please select an option. CD-ROM or Download?"); return; } } $('addtocart').addClass('ajax-loading'); objAjax=new Request({ url:ABSOLUTE_PATH+"cart/addtocart.php", data:$(objForm), method: 'post', onSuccess: function(sResponse) { $(objForm).submit(); //$('addtocart').removeClass('ajax-loading'); //eval(sResponse) //alert("Your order has been added to cart."); }, evalScripts: true, onFailure: function(){alert('Unable to process your request. Please check your internet connection.');} }).send(); } function viewCartContent(){ top.location=CART_PATH+"viewcart.php"; } function processCart(objForm){ with(objForm){ //Check if some items are selected bWithSelected = false; if(typeof(objForm.elements['chkItems[]'])!='undefined'){ //More than one check box if(typeof(objForm.elements['chkItems[]'].length)!='undefined'){ for(i=0;i