var RealStories = new Object();
RealStories.submit = function()
{
	// validate for empty fields
	var myVal = new Validate("realStoriesSummary");
	myVal.isEmpty("yourName","yourNameErrorSpan","Please enter your name.");
	myVal.isEmpty("childsName","childsNameErrorSpan","Please enter your child's name.");
	myVal.isEmpty("childAge","childAgeErrorSpan","Please enter your child's age.");
	myVal.isEmpty("city","cityErrorSpan","Please enter your city.");
	//myVal.isEmpty("familySize","familySizeErrorSpan","Please enter your family size.");
	myVal.isEmpty("occupation","occupationErrorSpan","Please enter your occupation.");
	//myVal.isEmpty("thanksgiving","thanksgivingerrorspan","Please tell us what holiday traditions you are excited to share with your baby.");
	//myVal.isEmpty("thanksgivingmemory","thanksgivingmemoryerrorspan","Please tell us what special holiday memory with your little one are you most looking forward to.");
	myVal.isEmpty("discover","discoverErrorSpan","Please tell us how you discovered Baby Einstein.");
	myVal.isEmpty("firstProduct","firstProductErrorSpan","Please tell us which are your baby's favorite Baby Einstein product(s)? ");
	myVal.isEmpty("respond","respondErrorSpan","Please tell us how your baby responded.");
	/*	
	myVal.isEmpty("other","otherErrorSpan","Please enter your occupation.");
	myVal.isEmpty("feel","feelErrorSpan","Please tell us how you felt seeing your baby respond.");
	myVal.isEmpty("tellOthers","tellOthersErrorSpan","Please tell us what you've told others about Baby Einstein.");
	myVal.isEmpty("whatDidYouSay","whatDidYouSayErrorSpan","Please enter how you responded.");
	myVal.isEmpty("othersTellYou","othersTellYouErrorSpan","Please tell us what others have said about Baby Einstein products.");
	myVal.isEmpty("memorable","memorableErrorSpan","Please tell us your most memorable moment.");
	myVal.isEmpty("favorite","favoriteErrorSpan","What is your favorite Baby Einstein product.");
	myVal.isEmpty("add","addErrorSpan","Tell us why you'd like to be in an ad.");
	*/
	myVal.isEmpty("ctl00_ContentPlaceHolder_submittedVideo","submittedVideoErrorSpan","Please select a file to upload.");

	
	if($("ctl00_ContentPlaceHolder_submittedVideo").value.toLowerCase().indexOf(".jpg")>-1 ||
		$("ctl00_ContentPlaceHolder_submittedVideo").value.toLowerCase().indexOf(".jpeg")>-1 ||
		$("ctl00_ContentPlaceHolder_submittedVideo").value.toLowerCase().indexOf(".mov")>-1 ||
		$("ctl00_ContentPlaceHolder_submittedVideo").value.toLowerCase().indexOf(".mpeg")>-1 ||
		$("ctl00_ContentPlaceHolder_submittedVideo").value.toLowerCase().indexOf(".mpg")>-1 ||
		$("ctl00_ContentPlaceHolder_submittedVideo").value.toLowerCase().indexOf(".avi")>-1
		)
	{
		myVal.unsetError("submittedVideoErrorSpan","");	
	}
	else
	{
		myVal.setError("submittedVideoErrorSpan","File type is invalid.");	
	}
	if(myVal.isValid())
	{
		$("realPeopleUserID").value = LoginStatus.UserId;
		$("aspnetForm").submit();
		return true;
	}
	else
	{
		myVal.yield(true);	
		return false;
	}
	return;
}
