// Newsletter Subscription Form
function newsletterTable() {
nltable = "<form action=\"newsletter.asp\" name=\"newsMail\" method=\"post\" onSubmit=\"return Newsletter();\">";
nltable = nltable + "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
nltable = nltable + "<tr><td height=\"26\" colspan=\"3\"><img src=\"images/news.gif\" width=\"175\" height=\"26\" ></td></tr>";

nltable = nltable + "<tr><td colspan=\"3\" height=\"5\"></td></tr>";

nltable = nltable + "<tr><td height=\"20\" align=\"right\" class=\"leftNormal\">E-Mail</td>";
nltable = nltable + "<td class=\"leftNormal\">&nbsp;:&nbsp;&nbsp;</td>";
nltable = nltable + "<td height=\"20\"><input name=\"email\" type=\"text\" class=\"txtfield\" size=\"8\"></td></tr>";

nltable = nltable + "<tr><td colspan=\"3\" height=\"5\"></td></tr>";

nltable = nltable + "<tr><td height=\"20\" align=\"right\" class=\"leftNormal\">Subscribe</td>";
nltable = nltable + "<td height=\"20\" class=\"leftNormal\">&nbsp;:&nbsp;&nbsp;</td>";
nltable = nltable + "<td height=\"20\"><input name=\"opt\" type=\"radio\" value=\"Yes\" checked></td></tr>";

nltable = nltable + "<tr><td colspan=\"3\" height=\"5\"></td></tr>";

nltable = nltable + "<tr><td height=\"20\" align=\"right\" class=\"leftNormal\">Unsubscribe</td>";
nltable = nltable + "<td height=\"20\" class=\"leftNormal\">&nbsp;:&nbsp;&nbsp;</td>";
nltable = nltable + "<td height=\"20\"><input type=\"radio\" name=\"opt\" value=\"No\"></td></tr>";

nltable = nltable + "<tr><td colspan=\"3\" height=\"5\"></td></tr>";

nltable = nltable + "<tr align=\"center\"><td height=\"20\" colspan=\"3\" class=\"leftMenu\"><input type=\"submit\" value=\"Submit\" name=\"submit\" class=\"button\"></td>";
nltable = nltable + "</tr></table></form>";

document.write(nltable);
}
function Newsletter() {
  	mailid = document.newsMail.email
	if (mailid.value == '')
	{
		alert("Please enter E-mail Id");
		mailid.focus()
		return false
	}
	else if (mailid.value.indexOf("@")==-1 || mailid.value.indexOf(".")==-1){
		alert("Invalid E-mail ID")
		mailid.focus()	   
		return false
	}
}
// Newsletter subscription form ends here


// Feedback form validation
function Feedback() {

	firstName = document.fbForm.txtFirstname
	if (firstName.value == "" || !isNaN(firstName.value))
	{
		alert("Please enter your first name");
		firstName.focus()
		return false		
	}

	lastName = document.fbForm.txtlastname
	if (lastName.value == "" || !isNaN(lastName.value))
	{
		alert("Please enter your last name");
		lastName.focus()
		return false		
	}

	dayPhone = document.fbForm.txtworkphone
	if (isNaN(dayPhone.value))
	{
		alert("Phone number you have entered is invalid");
		dayPhone.focus()
		return false		
	}

	eveningPhone = document.fbForm.txthomephone
	if (isNaN(eveningPhone.value))
	{
		alert("Phone number you have entered is invalid");
		eveningPhone.focus()
		return false		
	}

	mailid = document.fbForm.txtemail
	if (mailid.value == '')
	{
		alert("Please enter E-mail Id");
		mailid.focus()
		return false
	}
	else if (mailid.value.indexOf("@")==-1 || mailid.value.indexOf(".")==-1){
		alert("Invalid E-mail ID")
		mailid.focus()	   
		return false
	}

	age = document.fbForm.cmbAgeRange
	if (age.options(age.selectedIndex).value == "")
	{
		alert("Please select your age group");
		age.focus()
		return false		
	}	

	sportsAct = document.fbForm.txtsports
	if (sportsAct.value != "" && !isNaN(sportsAct.value))
	{
		alert("Please enter Sports Activities");
		sportsAct.focus()
		return false		
	}

	comments = document.fbForm.txtComments
	if (comments.value == "" || !isNaN(comments.value))
	{
		alert("Please add your comments");
		comments.focus()
		return false		
	}	
}


