// JavaScript Document
function externalLinkWarning()
{
alert("You will now leave the LoveLife Matters website. LoveLife Matters does not review or control the content at the site you will now visit. This link does not constitute an endorsement by LoveLife Matters of the content of any non LoveLife Matters website.");
return true;
}
function openWin1(url)
{
var j=window.open(url,"jj","left=200, top=50, width=207,height=208,scrollbar=no,resizable=no, menubar=no, toolbar=no") 
}
function validate()
{
	
	if(document.bmi.txtheight.value=="")
	{
		alert("Please enter height");
		document.bmi.txtheight.focus();
		return false;
	}
	if(isNaN(document.bmi.txtheight.value))
	{
		alert("Please enter your height in numbers");
		document.bmi.txtheight.focus();
		return false;
	}
	if(document.bmi.txtweight.value=="")
	{
		alert("Please enter weight");
		document.bmi.txtweight.focus();
		return false;
	}
	if(isNaN(document.bmi.txtweight.value))
	{
		alert("Please enter your weight in numbers");
		document.bmi.txtweight.focus();
		return false;
	}

	return true;
}

function valRadiobutton(radiobutton)
					{
						myOption = -1;
							for (i=0; i< radiobutton.length; i++)
									{
											if (radiobutton[i].checked)
													{
													myOption = i;
													}
									}
									if (myOption == -1)
									{
										return "";
									}
									else
									{
							return radiobutton[myOption].value
							}
					} // end function valRadioButton
					function Validate()
					{	
						var q1 = valRadiobutton(document.poll.q1);
						if ( q1 == '')
						{
							alert('Please answer the questions.');
							return false;
						}
						return true;
					}