function createShoppingCart()
{
	var total_CDs = 11;  // Set this to the number in your card.
	//var total_Tapes = 11;  // Set this to the number in your card.
	var total_DVDs = 4;  //Set this to the number in your card.
	
	var qty, qty_s, nm, x, dvd_sold=1,  cd_sold=1, product_sold = 1;    // some working variables
	var num_cd_selected = 0; // just a counter
	//var num_tape_selected = 0; // just a counter
	var num_dvd_selected = 0; //counter
	var output_counter = 1;
	var cost_per_product;
	var outputInfo = '';
	
	// Add the initial values for the form
	outputInfo += '<form name="send2paypal" action="https://www.paypal.com/cgi-bin/webscr"><br>  ';
	//outputInfo += '<form name="send2paypal" action="http://yourezsites.com/yourbizsites/debug_vars.cfm"><br>  ';
	outputInfo += '<input type="hidden" name="upload" value="1"> <br>  ';
	outputInfo += '<input type="hidden" name="business" value="lewisandlewisrus@aol.com"><br>  ';
	outputInfo += '<input type="hidden" name="cmd" value="_cart"><br>  ';
	outputInfo += '<input type="hidden" name="currency_code" value="USD"><br>  ';
	outputInfo += '<input type="hidden" name="no_note" value="1"><br>  ';
	outputInfo += '<input type="hidden" name="handling_cart" value="2.50"><br>  ';
	
	// Just getting a count of the selected items
	for (i=1;i<=total_CDs;++ i)   
	{
		nm = 'CD_' +  i;
		qty_s = document.getElementById(nm);
		if (qty_s != null)
		{
			//parseInt to get the numeric value from our form
			qty = parseInt(qty_s.value); // numeric version of QTY
			num_cd_selected += qty;
		}
	}
	//for (i=1;i<=total_Tapes;++ i)   
	//{
	//	nm = 'Tape_' +  i;
	//	qty_s = document.getElementById(nm);
	//	if (qty_s != null)
	//	{
	//		//parseInt to get the numeric value from our form
	//		qty = parseInt(qty_s.value); // numeric version of QTY
	//		num_tape_selected += qty;
	//	}
	//}
    for (i=1;i<=total_DVDs;++ i)   
	{
		nm = 'DVD_' +  i;
		qty_s = document.getElementById(nm);
		if (qty_s != null)
		{
			//parseInt to get the numeric value from our form
			qty = parseInt(qty_s.value); // numeric version of QTY
			num_dvd_selected += qty;
		}
	}


	// alert(total_DVDs);
	
	if (num_cd_selected < 1 && num_dvd_selected < 1)
	{
		alert("No items have been selected. ");
		return(false);
	}
	else
	{
			
		//////////////////////////////////////////////////////////////////
		//     
		//   CD Section
		//
		//////////////////////////////////////////////////////////////////
		switch (num_cd_selected)
		{
			case 1: cost_per_product = 15.00; break;   // 1 = $15.00 
			case 2: cost_per_product = 12.50; break;   // 2 = $12.50 each 
			default: cost_per_product = 10.00;
		}
		
		// Loop through the form and put the field information in for PayPal
		for (i=1;i<=total_CDs;++ i)    
		{
			nm = 'CD_' + i;
			qty_s = document.getElementById(nm);
			qty = parseInt(qty_s.value); // numeric version of QTY
			
			if (qty > 0 )
			{
				// Dynamically create the variables for paypal
				
				for (j=0; j<qty; j++)
				{
					if (cd_sold == 4)  cost_per_product = 0.00; 
					if (cd_sold > 4)   cost_per_product = 7.00; 
					outputInfo += '<input type="hidden" name="quantity_' + product_sold + '" value="1" >';
					outputInfo += '<input type="hidden" name="item_name_' + product_sold + '" value="' + qty_s.name + '" >';
					outputInfo += '<input type="hidden" name="amount_' + product_sold + '" value="' + cost_per_product + '" >';  
					product_sold++;
					cd_sold++;
				}
				
				
			}

		}

		//////////////////////////////////////////////////////////////////
		//     
		//   Tape Section
		//
		//////////////////////////////////////////////////////////////////

		//switch (num_tape_selected)
		//{
		//	case 1: cost_per_product = 10.00; break;   // 1 for 10.00 
		//	case 2: cost_per_product = 7.50; break;   // 2 for 15.00
		//	case 3: cost_per_product = 5.00; break; //4 for 20.00
		//	default: cost_per_product = 6.67;
		//}
		
		// Loop through the form and put the field information in for PayPal
		//for (i=1;i<=total_Tapes;++ i)    
		//{
	//		nm = 'Tape_' + i;
	//		qty_s = document.getElementById(nm);
	//		qty = parseInt(qty_s.value); // numeric version of QTY
	//		
	//		if (qty > 0 )
	//		{
				// Dynamically create the variables for paypal
				
	//			for (j=0; j<qty; j++)
	//			{
	//				if (tape_sold == 4)  cost_per_product = 0.00; 
	//				if (tape_sold > 4)   cost_per_product = 5.00; 
	//				outputInfo += '<input type="hidden" name="quantity_' + product_sold + '" value="1" >';
	//				outputInfo += '<input type="hidden" name="item_name_' + product_sold + '" value="' + qty_s.name + '" >';
	//				outputInfo += '<input type="hidden" name="amount_' + product_sold + '" value="' + cost_per_product + '" >';  
	//				product_sold++;
	//				tape_sold++;
	//			}
	//			
	//			
	//		}
//
//		}
		
		//////////////////////////////////////////////////////////////////
		//     
		//   DVD Section
		//
		//////////////////////////////////////////////////////////////////

		switch (num_dvd_selected)
		{
			case 1: cost_per_product = 10.00; break;   // 1 = $10.00 
			//case 2: cost_per_product = 7.50; break;   // 2 = $7.50 each 
			default: cost_per_product = 10.00;
		}
		
		// Loop through the form and put the field information in for PayPal
		for (i=1;i<=total_DVDs;++ i)    
		{
			nm = 'DVD_' + i;
			qty_s = document.getElementById(nm);
			qty = parseInt(qty_s.value); // numeric version of QTY
			
			if (qty > 0 )
			{
				// Dynamically create the variables for paypal
				
				for (j=0; j<qty; j++)
				{
					// Not sure about the logic of Tape #4 
					//if (dvd_sold == 4)  cost_per_product = 10.00;
					//if (dvd_sold > 4)  cost_per_product = 10.00;
					outputInfo += '<input type="hidden" name="quantity_' + product_sold + '" value="1" >';
					outputInfo += '<input type="hidden" name="item_name_' + product_sold + '" value="' + qty_s.name + '" >';
					outputInfo += '<input type="hidden" name="amount_' + product_sold + '" value="' + cost_per_product + '" >';  
					product_sold++;
					dvd_sold++;
				}
				
				
			}

		}
		

		outputInfo += '</form>';
		document.getElementById('paypal_info').innerHTML = outputInfo;		
		
		// We submit the form that we dynamiclly created
		
		document.send2paypal.submit();
		
		return(true);
	}
}

