function recieveTextFromFlash(Txt) {
	//alert(Txt);
	PlayFlashMovie(Txt);
	}
	
function getFlashMovieObject(movieName)
{
  if (window.document[movieName]) 
  {
    return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
    if (document.embeds && document.embeds[movieName])
      return document.embeds[movieName]; 
  }
  else 
  {
    return document.getElementById(movieName);
  }
}

function PlayFlashMovie(Txt)
{

	var flashMovie=getFlashMovieObject("text_flah_inside_TOA_nav");
	flashMovie.SetVariable("/:mes", Txt);
	
}

// To open a popup window
function MM_openBrWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}
 

// 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
	}	


	Preferredloc = document.frmAppointment.Preferredloc
	if (Preferredloc.options[Preferredloc.selectedIndex].value == "")
	{
		alert("Please select your location");
	Preferredloc.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() {
	
	firstName = document.cuForm.txtName
	if (firstName.value == "" || !isNaN(firstName.value))
	{
		alert("Please enter your first name");
		firstName.focus()
		return false		
	}

	mailid = document.cuForm.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
	}

	comments = document.cuForm.txtMessage
	if (comments.value == "" || !isNaN(comments.value))
	{
		alert("Please add your comments");
		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();
	
	
}



// Case Managers form validation
function CaseManagers() {
	
	firstName = document.cmForm.txtName
	if (firstName.value == "" || !isNaN(firstName.value))
	{
		alert("Please enter your first name");
		firstName.focus()
		return false		
	}
	
	
	LName = document.cmForm.LName
	if (LName.value == "" || !isNaN(LName.value))
	{
		alert("Please enter your last name");
		LName.focus()
		return false		
	}
	
	
	txtCompany = document.cmForm.txtCompany
	if (txtCompany.value == "" || !isNaN(txtCompany.value))
	{
		alert("Please enter your Company name");
		txtCompany.focus()
		return false		
	}
	
	
	txtPhone = document.cmForm.txtPhone
	if (txtPhone.value == "")
	{
		alert("Please enter your phone number");
		txtPhone.focus()
		return false		
	}

	mailid = document.cmForm.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
	}

	txtHear = document.cmForm.txtHear
	if (txtHear.value == "" )
	{
		alert("How did you hear about the seminar");
		txtHear.focus()
		return false		
	}	
	
	if (document.cmForm.uword.value=="" )
	{
	alert('Enter the code as it is shown');
	document.cmForm.uword.focus();
	return false;
	}
	return jcap();
	
	
}
/*DIV PopUp*/

x = 20;
y = 0;
function setVisible(obj)
{
	obj = document.getElementById(obj);
	obj.style.visibility = (obj.style.visibility == 'visible') ? 'hidden' : 'visible';
}
function placeIt(obj)
{
	obj = document.getElementById(obj);
	if (document.documentElement)
	{
		theLeft = document.documentElement.scrollLeft;
		theTop = document.documentElement.scrollTop;
	}
	else if (document.body)
	{
		theLeft = document.body.scrollLeft;
		theTop = document.body.scrollTop;
	}
	theLeft += x;
	theTop += y;
	obj.style.left = theLeft + 'px' ;
	obj.style.top = theTop + 'px' ;
	setTimeout("placeIt('layer1')",500);
}
/*window.onscroll = setTimeout("placeIt('layer1')",500);*/



function open_win(url_add)
   {
   window.open(url_add,'welcome','width=1030,height=699,menubar=no,status=no,location=no,toolbar=no,scrollbars=yes');
   }

function change_back(colorval)
   {
   document.bgColor=colorval;
   }


 

// Rutherford County Signup form validation
function RutherfordCounty() {
	
	firstName = document.RCForm.txtFirstName
	if (firstName.value == "")
	{
		alert("Please enter your first name");
		firstName.focus()
		return false		
	}
	
	lastName = document.RCForm.txtlastName
	if (lastName.value == "")
	{
		alert("Please enter your last name");
		lastName.focus()
		return false		
	}

	mailid = document.RCForm.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
	}


	if (document.RCForm.uword.value=="" )
	{
	alert('Enter the code as it is shown');
	document.RCForm.uword.focus();
	return false;
	}
	return jcap();
	
	
}
