function buy_this(){ // add to shopping cart
	$("buy").submit();	
}
function process_form(action, id){
	var form = "form_cart"; 
	action = action ? action : "update";
	$("action").value = action;
	
	if(action == "send_order"){ // checkout
		if(check_order()) if($(form)) $(form).submit();	
	} else {
		if($(form)) $(form).submit();		
	}
}
function check_order(){
	var msg = "";
	//shipping info
	if($("name").value == "") msg += "Name is required.\n";
	if($("address").value == "") msg += "Address is required.\n";
	if($("city").value == "") msg += "City is required.\n";
	if($("state").value == "") msg += "State is required.\n";
	if($("zip").value == "") msg += "Zip/Postal code is required.\n";
	if($("country").value == "") msg += "Country is required.\n";
	
	//payment info
	if($("card").value == "") msg += "Card Holder name is required.\n";
	if($("card_number").value == "") msg += "Card number is required.\n";
	if($("month").value == "") msg += "Expiration month is required.\n";
	if($("year").value == "") msg += "Expiration year is required.\n";

	var curdate = new Date();
	var month = curdate.getMonth();

	
	if($("year").value == "2009" && $("month").value < month) msg += "Your card is expired.\n";
	
	
	if(msg != "") {
		alert(msg);
		return false;
	} else {
		return true;
	}
}
function showBuy() {
	//$("preorder").style.display = "none";
	new Effect.Opacity("preorder", {to: 0});
	new Effect.Opacity("order", {to: 1, from: .2});
	$("order").style.display = "";		
}
