 // To open a popup window
function MM_openBrWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}

// To open a Video popup window
   function popitup(url) {
	newwindow=window.open(url,'name','height=448,width=720,scrollbars');
	if (window.focus) {newwindow.focus()}
	return false;
}
// To open a Video popup window
   function popitup1(url) {
	newwindow=window.open(url,'name','height=520,width=720,scrollbars');
	if (window.focus) {newwindow.focus()}
	return false;
}

// To open a Video popup window
   function popitup2(url) {
	newwindow=window.open(url,'name','height=412,width=720,scrollbars');
	if (window.focus) {newwindow.focus()}
	return false;
}

// To open a Video popup window
   function popitup3(url) {
	newwindow=window.open(url,'name','height=452,width=720,scrollbars');
	if (window.focus) {newwindow.focus()}
	return false;
}

// Newsletter Subscription Form
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
	}
}

// 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		
	}




	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		
	}	
	if (document.fbForm.uword.value=="" )
	{
	alert('Enter the code as it is shown');
	document.fbForm.uword.focus();
	return false;
	}
	return jcap();
	
	
}

// Appointments form validation
function Appointment()
{
if (document.frmAppointment.txtFirstName.value=="" || !isNaN(document.frmAppointment.txtFirstName.value))
	{
	alert('Enter FirstName');
	document.frmAppointment.txtFirstName.focus();
	return false;
	}
if (document.frmAppointment.txtSurname.value=="" || !isNaN(document.frmAppointment.txtSurname.value))
	{
	alert('Enter Surname');
	document.frmAppointment.txtSurname.focus();
	return false;
	}
if (document.frmAppointment.txtHomePhoneNumber.value=="" )
	{
	alert('Enter Home Phone No.');
	document.frmAppointment.txtHomePhoneNumber.focus();
	return false;
	}
	
	
if (document.frmAppointment.txtEmailAddress.value=="")
	{
	alert('Enter Email Address');
	document.frmAppointment.txtEmailAddress.focus();
	return false;
	}
	else if (document.frmAppointment.txtEmailAddress.value.indexOf("@")==-1 || document.frmAppointment.txtEmailAddress.value.indexOf(".")==-1){
		alert("Invalid E-mail ID")
		document.frmAppointment.txtEmailAddress.focus()	   
		return false
	}	
	
	if (document.frmAppointment.uword.value=="" )
	{
	alert('Enter the code as it is shown');
	document.frmAppointment.uword.focus();
	return false;
	}
	return jcap();
}

// Contact Us form validation
function Contactus() {
	
	name1 = document.cuForm.name
	if (name1.value == "" || !isNaN(name1.value))
	{
		alert("Please enter your Name");
		name1.focus()
		return false		
	}

	mailid = document.cuForm.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
	}

	comments = document.cuForm.specialty
	if (comments.value == "" || !isNaN(comments.value))
	{
		alert("Please enter Type of Practice");
		comments.focus()
		return false		
	}		
	if (document.cuForm.uword.value=="" )
	{
	alert('Enter the code as it is shown');
	document.cuForm.uword.focus();
	return false;
	}
	return jcap();
	
	
}

//free usage


function freeusage() {
	name1 = document.fuForm.fname
	if (name1.value == "" || !isNaN(name1.value))
	{
		alert("Please enter your First Name");
		name1.focus()
		return false		
	}
	name2 = document.fuForm.lname
	if (name2.value == "" || !isNaN(name2.value))
	{
		alert("Please enter your Lasr Name");
		name2.focus()
		return false		
	}
	
	practiceType1 = document.fuForm.practiceType
	if (practiceType1.value == "Select Practice Type")
	{
		alert("Please enter Practice Type");
		practiceType1.focus()
		return false		
	}
	
	practiceName1 = document.fuForm.practiceName
	if (practiceName1.value == "" || !isNaN(practiceName1.value))
	{
		alert("Please enter Practice Name");
		practiceName1.focus()
		return false		
	}
	
	practiceAddress1 = document.fuForm.practiceAddress
	if (practiceAddress1.value == "" || !isNaN(practiceAddress1.value))
	{
		alert("Please enter Practice Address");
		practiceAddress1.focus()
		return false		
	}
	
	phone1 = document.fuForm.phone
	if (phone1.value == "")
	{
		alert("Please enter Phone Number");
		phone1.focus()
		return false		
	}

	mailid = document.fuForm.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
	}
	
	
	terms1 = document.fuForm.terms
	if (terms1.checked == false)
	{
		alert("Please accept the terms of agreement");
		terms1.focus()
		return false		
	}
	
	if (document.fuForm.uword.value=="" )
	{
	alert('Enter the code as it is shown');
	document.fuForm.uword.focus();
	return false;
	}
	return jcap();
}



//Free iPad usage
function freeipad() {
	name1 = document.fuForm.fname
	if (name1.value == "" || !isNaN(name1.value))
	{
		alert("Please enter your First Name");
		name1.focus()
		return false		
	}
	name2 = document.fuForm.lname
	if (name2.value == "" || !isNaN(name2.value))
	{
		alert("Please enter your Lasr Name");
		name2.focus()
		return false		
	}
	
		mailid = document.fuForm.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
	}		
if (document.fuForm.phone.value=="" )
	{
	alert('Enter Home Phone No.');
	document.fuForm.phone.focus();	
	return false;
	}	
		mypractice = document.fuForm.mypractice
	if (mypractice.value == "" || !isNaN(name2.value))
	{
		alert("Please enter Type of Practice");
		mypractice.focus()
		return false		
	}
	 /*terms1 = document.fuForm.terms
	if (terms1.checked == false)
	{
		alert("Please accept the terms of agreement");
		terms1.focus()
		return false		
	}*/
	if (document.fuForm.uword.value=="" )
	{
	alert('Enter the code as it is shown');
	document.fuForm.uword.focus();
	return false;
	}
	return jcap();
}	
	
