﻿
function ValidateForm()	
	{	
		if(document.frmIndex.txtEmail.value == "")
		{
			alert("Please enter your email");
			document.frmIndex.txtEmail.focus();
			return false;
		}
		else if(checkEmail(document.frmIndex.txtEmail.value) == false)
		{
			alert("Your email address is in incorrect format");
			document.frmIndex.txtEmail.focus();
			return false;	
		}
		else if(document.frmIndex.txtPassword.value == "")
		{
			alert("Please enter your password");
			document.frmIndex.txtPassword.focus();
			return false;
		}
		else 
			return true;
	}
	
	function checkEmail(eAdd)
	{
		var rate = eAdd.indexOf("@") ;
		if(rate == -1)
			return false ;
		else
		{
			var dot = eAdd.indexOf(".") ;
			if(dot == -1)
				return false ;
			else
				return true ;
		}
	}
	
	function ToggleMyDivs(divToHandle)
	{
		slidedown(divToHandle);
		slideup('divIndianMatrimonialLinks');
		slideup('divUKMatrimonialLinks');
		slideup('divCanadaMatrimonialLinks');
		slideup('divUSAMatrimonialLinks');
	}

/***************** FADE SHOW HIDE TEXT SCRIPT *****************************/
hexinputG=255;  // Initial color value.
hexinputB=255;  // Initial color value.
var inc=-1; //increment variable

function FadingTxt()
{
	if(hexinputG > 0) 
	{
		hexinputG-=11; // increase color value
		hexinputB-=11;
		//document.getElementById("divFadeTxt").style.color="rgb("+hexinput+","+hexinput+","+hexinput+")"; // Set color value.
		document.getElementById("divFadeTxt").style.color="rgb(255,"+hexinputG+","+hexinputB+")"; // Set color value.
		setTimeout("FadingTxt()", 20);
	}
	else
	{
		hexinputG=255;  //reset hex value
		hexinputB=255;
	}
}

function ChangeTxt()
{

	if (!document.getElementById) return;
		inc++;	
	if (inc==0)
		document.getElementById("divFadeTxt").innerHTML="Imagine meeting your match in a comfortable personal and convenient way";	
	else if (inc==1)
		document.getElementById("divFadeTxt").innerHTML="Meet professionals from all walks of life at your favorite matrimonial introduction site";
	else if (inc==2)
		document.getElementById("divFadeTxt").innerHTML="Priority and Bold display of your profile - Star Memberships";
	else if (inc==3)
	    document.getElementById("divFadeTxt").innerHTML = "Use our personal matchmaking services for busy professionals";
	else if (inc == 4)
	    document.getElementById("divFadeTxt").innerHTML = "Find your life partner in USA";
	else if (inc == 5)
	    document.getElementById("divFadeTxt").innerHTML = "A second marriage is a start of fresh life, you can initiate it with a positive outlook";
	else if (inc == 6)
	    document.getElementById("divFadeTxt").innerHTML = "Serious about meeting someone special? Problem solved";
	else if (inc == 7)
	    document.getElementById("divFadeTxt").innerHTML = "Fill out our registration form and change your life forever";
	else 
	{
	    document.getElementById("divFadeTxt").innerHTML = "The need of a life partner is essential to a single or divorced person";
		inc=-1;
	}	
	FadingTxt();
	setTimeout("ChangeTxt()", 4000);
}




	
	
	
	
	

