<!-- The  Add-to-Cart Javascript Version with Redirect
// ©2002-2004 G.E. Masana
function AddToCart(what){redirectTo="";that="";
if (what.elements){
string="";
  for (i=0;i<what.elements.length; i++){
  
    if (what.elements[i].type!="checkbox"){
   string += "&"+what.elements[i].name+"="+what.elements[i].value;
    }
    
      else {if(what.elements[i].checked==true){string += "&"+what.elements[i].name+"="+what.elements[i].value;
   }}
  }
string=what.action+"?"+string.substring(1);
redirectTo="http://"+what.elements['return'].value;
}
else {
string=what.toString();
that=string.split("&");
 for (i=0;i<that.length; i++){
 if (that[i].split("=")[0]=="return"){redirectTo="http://"+that[i].split("=")[1];}
 }
}
document.addtocart.src= string;
alert("Your purchase has been added to your cart. Thank you.");
if (what.elements){
what.href=redirectTo;what.action=redirectTo;what.method="";
}
else{
location.href=redirectTo;
}
}
document.writeln('<IMG NAME="addtocart" HEIGHT=1 WIDTH=1 BORDER=0>');
//-->