// JavaScript Document

function AddToBasket(description, cost, cushionColour, material, detailColour, n, d, wc) {

	var price;
	var itemDesc;
	var nextURL;
	
	if (n == "") {
		alert ("Please enter the names");
		return;
	}
	if (d == "") {
		alert ("Please enter the date");
		return;
	}
	if (wc == "Please select one") {
		alert ("Please select the writing colour");
		return;
	}
		
	
	if (cushionColour == "Please select one") {
		alert ("Please select a cushion colour");
		return;
	}
	
	if (material == "Please select one") {
		alert ("Please select material required");
		return;
	}
	
	if (detailColour == "Please select one") {
		alert ("Please select detail colour");
		return;
	}
	
	if (cost <= 0) {
		alert ("Please enter an amount");
		return;
	}	

	itemDesc = description+" Cushion Colour:-"+cushionColour+" Fabric:-"+material+" Detail Colour:-"+detailColour+" Names:-"+n+" Date:-"+d+" Writing Colour:-"+wc;

	<!-- Replace all spaces with a + -->
	itemDesc=itemDesc.replace(/ /g,"+");
    itemDesc=itemDesc.replace(/&/g,"and");
	
	price=cost;			

	nextURL=window.location.href;
			
	<!-- Add to and display basket -->
	window.location.href = "http://www.romancart.com/cart.asp?itemname="+itemDesc+"&storeid=27972&quantity=1&price="+price+"&returnurl="+nextURL;
	
}