

function modCartATC() {
	document.getElementById('modProductATCBtn').innerHTML='Please Wait...';
	document.getElementById('modProductQTYForm').value=document.getElementById('modProductQTYField').value
	modCartUpdateDecription();
	modCartUpdateUID();
	ajaxPostForm('/xfw/mods/shopping/cart/basic/0.0.1/svc.cxp?xfwpagename=cart', 'modProductATCForm', 'xpsActions')


	$('#modUpSell .xpsCheckedBox').each(function(i){	
		var vartid = this.id;
		vartid = vartid.replace('modUpSellProductInfo','modUpSellProductFields');
		document.getElementById('modProductATCForm').innerHTML=document.getElementById(vartid).innerHTML;
		ajaxPostForm('/xfw/mods/shopping/cart/basic/0.0.1/svc.cxp?xfwpagename=cart', 'modProductATCForm', 'xpsActions')
	});
	
	setTimeout('modCartGoToCart()', 300);

}

function modCartGoToCart() {
	window.location='/cart.htm'
}


function modCartUpdateDecription() {
	var fx_desc = '';
	var fx_split = '';

	$('.modProductCFSelect select').each(function(i){		
		fx_desc = fx_desc + fx_split + $(this).attr('value');
		fx_split = '<br />';
		document.getElementById('modProductDescriptionForm').value=fx_desc;
	});

}


function modCartUpdateUID() {


	var fx_uid = '314427';

	$('.modProductCFSelect select').each(function(i){		
		fx_uid = fx_uid + '-' + this.selectedIndex;
		document.getElementById('modProductUIDForm').value=fx_uid;
	});
}

function modCartCFChange(fx_this) {
	modCartUpdatePrice();
}

function modCartUpdatePrice() {
	var cfPcAy=new Array();
	var updatePrice = 295;
	
	$('.modProductCFSelect select').each(function(i){	
		updatePrice = updatePrice + cfPcAy[i][this.selectedIndex];
	});
	
	document.getElementById('modProductPriceForm').value=updatePrice;
	document.getElementById('modProductPriceShow').innerHTML=formatCurrency(updatePrice);

}

function modUpSellCheck(fx_this) {
	if ($(fx_this).hasClass('xpsCheckBox')) {
		$(fx_this).removeClass('xpsCheckBox');
		$(fx_this).addClass('xpsCheckedBox');
	} else {
		$(fx_this).removeClass('xpsCheckedBox');
		$(fx_this).addClass('xpsCheckBox');
	}
}

xpsAddReady('modProductStart()');


function modProductStart() {
	modCartUpdatePrice();
	ajaxGetPage('/xfw/mods/shopping/product/basic/0.0.1/ajax_upsell.cxp?pageid=314427', 'modUpSell');
	ajaxGetPage('/xfw/mods/shopping/cart/basic/0.0.1/svc.cxp?action=makecart', 'xpsActions');
}



xpsJSPage = 'ran';



