function OnSubmitFormStandard(myform)
{
	url = "https://www.atandra.com/OrderDetailsAuth.php";
	shoppingCart = "";
	edition = "";
	couponcode = "";
	qbType = "";
	//alert("version 3 OrderDetailsAuth.php");	
	couponcode = document.form_coupon.couponCode.value;
	couponcode = couponcode.replace(/^\s+|\s+$/g, '') ;
	//alert("couponcode=" + couponcode);
	
	shoppingCart = document.form_cart.cartName.value ;
	edition = myform.edition.value ;
	realtime = "no";

	
	if (shoppingCart == "YAHOO" && edition =="Advanced") {
		realtime = "yes";
	}

	f = parseFloat ("400.00");

	if (shoppingCart == "None") {
		alert ("Please select your online shopping cart");
		return false;
	}

	if (couponcode =="ATANDRA4000") {
		alert ("This coupon ATANDRA4000 is not available at this time. Please remove the coupon code and try again");
		return false;
	}
	//if (couponcode =="THUB10PROMO") {
	//	alert ("This coupon THUB10PROMO is not available at this time. Please remove the coupon code and try again");
	//	return false;
	//}
	if (couponcode =="THUB35PROMO") {
		alert ("This coupon THUB35PROMO is not available at this time. Please remove the coupon code and try again");
		return false;
	}
	
//alert (shoppingCart);

	
		if (couponcode =="QSC2010PROMO" ) {
			if (shoppingCart == "Go Daddy Quick Shopping Cart"  || shoppingCart == "Quick Shopping Cart") {
			} else {
				alert ("This coupon is not valid for this cart. Please remove the coupon code and try again");
				return false;
			}
		}
	

	if (shoppingCart == "Ebay") {
		if (couponcode =="EBAY2010PROMO" ) {
		} else {
			alert ("This coupon is not valid for this cart. Please remove the coupon code and try again");
			return false;
		}
	}



	qbType = "QBFS";
//	alert ("Option value = " + document.getElementsByName('QbType')[0].checked);
	if ( document.getElementsByName('QbType')[0].checked == true) {
		qbType = "QBFS";
	} else {
		qbType = "QBPOS";
	}


	if ((edition =="Standard") && (shoppingCart =="Other Custom Cart")) {	
		alert ("T-HUB Standard edition is not supported for Other Custom Cart. Please select T-HUB Professional or Advanced");
		return false;
	}
	if ((edition =="Standard") && (qbType == "QBPOS")) {	
		alert ("QuickBooks Point of Sale connector is not available in Standard edition of T-HUB. Please chose T-HUB Professional or Advanced");
		return false;
	}
	
	if ((edition =="Standard") && (couponcode =="ATANDRA4000")) {	
		alert ("This coupon is not applicable for T-HUB Standard edition. Please select T-HUB Professional or Advanced to use this coupon promotion");
		return false;
	}
	
	
	if (edition =="Standard") {	
		f = parseFloat ("300.00");
	} else if (edition =="Professional") {
		f = parseFloat ("500.00");
	} else if (edition =="Advanced") {
		f = parseFloat ("700.00");
	}	
//alert("Coupon code = " + couponcode);

	if (couponcode == "UPGRADE") {
		f = f * 0.80
	} else if (couponcode == "JULY25") {
		f = f * 0.75
	} else if (couponcode == "JULYSETUP") {
		f = f * 1.0
	} else if (couponcode == "SPLXUTJJRX10") {
		f = f * 0.90
	} else if (couponcode == "X-CART-Q1-2010") {
		f = f * 0.85
	} else if (couponcode == "QSC2010PROMO") {
		f = f * 0.75
	} else if (couponcode == "EBAY2010PROMO") {
		f = f * 0.80
	} else if (couponcode == "SPLHSLQHGHQ20") {
		f = f * 0.80
	} else if (couponcode == "UPGRADE30") {
		f = f * 0.7
	} else if (couponcode == "UPGRADEPLAN") {
		f = f * 0.5
	} else if (couponcode == "THUB10PROMO") {
		f = f * 0.75
	} else if (couponcode == "THUB35PROMO") {
		f = f * 0.65
	} else if (couponcode == "ISPRESELLER") {
		f = f * 0.75
	} else if ((couponcode == "SUNSHOPQ110") && (shoppingCart =="SunShop")) {
		f = f * 0.95
	} else if (couponcode == "UPS") {
		f = f * 0.9
	} else if (couponcode == "QUICKLABS") {
		f = f * 0.7
	}
	
	
	myform.opt1.value = "Edition;" + edition;
	myform.opt2.value = "Online Shopping Cart;" + shoppingCart;
	addSetup = parseFloat ("0.00");
	if (edition == "Standard") {
		if (document.form_setup_std.setupservice_std.checked == true) {
			addSetup = parseFloat ("200.00");
		}
	} else if (edition =="Professional") {
		if (document.form_setup_pro.setupservice_pro.checked == true) {
			addSetup = parseFloat ("250.00");
		}
	} else if (edition =="Advanced") {
		if (document.form_setup_adv.setupservice_adv.checked == true) {
			addSetup = parseFloat ("300.00");
		}
	}
	

	if (addSetup > 0) {
		myform.opt3.value = "Setup Service;Yes";
	}

	
	if (couponcode =="ATANDRA4000") {
		addSetup = parseFloat ("0.00"); 
	}
	if (couponcode =="JULYSETUP") {
		addSetup = parseFloat ("0.00"); 
	}
	
	f = f + addSetup;


	addSupport = parseFloat ("0.00");
/////////////////////////////////////////////////////////////////

	if (edition =="Standard") {	
		if (document.form_support_std.supportplanstd.checked == true ) {
			addSupport = parseFloat ("200.00");
			myform.opt4.value = "Support Plan;Standard";
		} else {
			addSupport = parseFloat ("0.00");
			myform.opt4.value = "Support Plan;None";
		}
	} else if (edition =="Professional") {
		if (document.form_support_pro.supportplanpro.checked == true ) {
			addSupport = parseFloat ("250.00");
			myform.opt4.value = "Support Plan;Standard";
		} else {
			addSupport = parseFloat ("0.00");
			myform.opt4.value = "Support Plan;None";
		}
	} else if (edition =="Advanced") {
		if (document.form_support_adv.supportplanadv.checked == true ) {
			addSupport = parseFloat ("300.00");
			myform.opt4.value = "Support Plan;Standard";
		} else {
			addSupport = parseFloat ("0.00");
			myform.opt4.value = "Support Plan;None";
		}
	}
	if (couponcode =="ATANDRA4000") {
		addSupport = parseFloat ("0.00"); 
	}

	//if (couponcode =="THUB10PROMO") {
	//	addSupport = parseFloat ("0.00"); 
	//	myform.opt4.value = "Support Plan;Standard";
	//}

	
	f = f + addSupport;

	addUser = parseFloat (document.form_user.user.value);

	if (addUser == 200) {	
		myform.opt5.value = "Number of User;2";
	} else if (addUser == 300) {
		myform.opt5.value = "Number of User;3";
	} else if (addUser == 400) {
		myform.opt5.value = "Number of User;4";
	} else if (addUser == 500) {
		myform.opt5.value = "Number of User;5";
	} else {
		myform.opt5.value = "Number of User;1";
	}	

	if (couponcode == "UPGRADE") {
		addUser = addUser * 0.85
	} else if (couponcode == "UPGRADEPLAN") {
		addUser = addUser * 0.6
	} else if (couponcode == "THUB10PROMO") {
		addUser = addUser * 0.75
	}
	f = f + addUser;

	addStore = parseFloat (document.form_store.store.value);
	if (addStore == 200) {	
		myform.opt6.value = "Number of Store;2";
	} else if (addStore == 300) {
		myform.opt6.value = "Number of Store;3";
	} else if (addStore == 400) {
		myform.opt6.value = "Number of Store;4";
	} else if (addStore == 500) {
		myform.opt6.value = "Number of Store;5";
	} else {
		myform.opt6.value = "Number of Store;1";
	}	
	if (couponcode == "UPGRADE") {
		addStore = addStore * 0.85
	} else if (couponcode == "UPGRADEPLAN") {
		addStore = addStore * 0.6
	} else if (couponcode == "THUB10PROMO") {
		addStore = addStore * 0.75
	}
	f = f + addStore;	

	

	addRealtime = parseFloat ("0.00");
	if (realtime == "yes") {
		addRealtime = parseFloat ("200.00");
	}
	f = f + addRealtime;


	if (couponcode == "THUB_STD_PKG_001") {
		f = f - 150.00;
	} else if (couponcode == "THUB_PRO_PKG_001") {
		f = f - 100.00;
	} else if (couponcode == "THUB_ADV_PKG_001") {
		f = f - 150.00;
	} else if (couponcode == "THUB_ADV_PKG_002") {
		f = f - 275.00;
	}


	if (addRealtime > 0) {
		myform.opt7.value = "Real time link;Yes";
	}



//////////////////////////
	myform.opt8.value = "QuickBooks Connector;" + qbType;

	myform.couponCode.value = couponcode;
	myform.chargeAmount.value = f;
	myform.action = url;
    return true;
}
// JavaScript Document