function CheckFormTens(theform )
 

{
//alert("Hello World!");	


	var bMissingFields = false;
	var strFields = "";
	
	if( theform.DueDate.value == '' ){
		bMissingFields = true;
		strFields += " Please Enter The Baby's Due Date - You Can Select The Date Via The Calendar \n";
			}
		
	if( bMissingFields ) {
	alert( "" + strFields );
	return false;
			
	//scwShow(scwID('DueDate'),event);
			
	
		}
		
//Create a DueDate Cookie for Retrieval at the CheckOut Stage

		var DueDatevalue = document.forms['TENS1'].DueDate.value;
//alert (DueDatevalue);
			
		createCookie('DueDate',DueDatevalue,'365');
		AddToCart(TENS1);
		
		//return true;
		
		
		//While We are here Populate the AdditionalInfo Field on the form
		//document.Form(TENS
		
}



function createCookie(name,value,days) 
{

//alert ("CookieCreate1");

if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
	
//	document.cookie = "testvalue1=Yes; expires=Fri, 13 Jul 2004 05:28:21 UTC; path=/";

	
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return "";
}



