		function frmvalidator(theForm)
{
  if (theForm.txtName.value.length < 1)
  {
    alert("Please enter your full name .");
    theForm.txtName.focus();
    return (false);
  }
  if (theForm.txtCity.value.length < 1)
  {
    alert("Please enter City ");
    theForm.txtCity.focus();
    return (false);
  }
  if (theForm.txtState.value.length < 1)
  {
    alert("Please enter state ");
    theForm.txtState.focus();
    return (false);
  }
  if (theForm.txtZip_Code.value.length < 4)
  {
    alert("Please enter valid  zip code ");
    theForm.txtZip_Code.focus();
    return (false);
  }
   if (theForm.txtAddress.value.length < 4)
  {
    alert("Please enter address ");
    theForm.txtAddress.focus();
    return (false);
  }
 
  // E-mail Validator Code
  if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.txtEmail.value))) 
  {
		//  do nothing
  }
  else
  {
	alert("Invalid E-mail Address! Please re-enter.")
	theForm.txtEmail.focus();
	return (false);
  }
  
    if (theForm.txtSummary.value.length < 10)
  {
    alert("Please enter summary for your resume ");
    theForm.txtSummary.focus();
    return (false);
  }
  
  if (theForm.txtSkillSet_Des.value.length < 4)
  {
    alert("Please enter words for skill set ");
    theForm.txtSkillSet_Des.focus();
    return (false);
  }
  
  if (theForm.txtCurrent_Position.value.length < 1)
  {
    alert("Please enter current position or designation, which will be displayed with resume title. ");
    theForm.txtCurrent_Position.focus();
    return (false);
  }

  return (true);
}

function frmvalidatorjob(theForm)
{
  if (theForm.txtJobDetail.value.length < 1)
  {
    alert("Please enter job details .");
    theForm.txtJobDetail.focus();
    return (false);
  }
  if (theForm.txtCompanyName.value.length < 1)
  {
    alert("Please enter company name ");
    theForm.txtCompanyName.focus();
    return (false);
  }
  if (theForm.txtKeywords.value.length < 1)
  {
    alert("Please enter Keywords ");
    theForm.txtKeywords.focus();
    return (false);
  }
  if (theForm.txtJobOpening.value.length < 1)
  {
    alert("Please enter number of job opening. ");
    theForm.txtJobOpening.focus();
    return (false);
  }
   if (theForm.txtPosted.value.length < 1)
  {
    alert("Please enter Text Posted ");
    theForm.txtPosted.focus();
    return (false);
  }
  
  if (theForm.txtPositionTitle.value.length < 1)
  {
    alert("Please enter Position Title  ");
    theForm.txtPositionTitle.focus();
    return (false);
  }
    if (theForm.txtOffPositionTitle.value.length < 1)
  {
    alert("Please enter Official Position Title  ");
    theForm.txtOffPositionTitle.focus();
    return (false);
  }
  if (theForm.txtPositionDes.value.length < 1)
  {
    alert("Please enter Position Description  ");
    theForm.txtPositionDes.focus();
    return (false);
  }
  if (theForm.txtLocation.value.length < 1)
  {
    alert("Please enter Location  ");
    theForm.txtLocation.focus();
    return (false);
  }

  // E-mail Validator Code
  if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.txtEmail.value))) 
  {
		//  do nothing
  }
  else
  {
	alert("Invalid E-mail Address! Please re-enter.")
	theForm.txtEmail.focus();
	return (false);
  }
  
    if (theForm.txtCompanyDes.value.length < 5)
  {
    alert("Please enter company Description ");
    theForm.txtCompanyDes.focus();
    return (false);
  }
  return (true);
}


function fnOpenWindow(theURL)
{
 var winName = "Character";
 var features = "toolbar=0,left=50,top=50,location=0,status=0,menubar=0,scrollbars=1,resizable=0,width=400,height=400"
 window.open(theURL,winName,features);
}
function fnOpenWindow1(theURL)
{
 var winName = "Character";
 var features = "toolbar=0,left=10,top=10,location=0,status=0,menubar=1,scrollbars=1,resizable=0,width=450,height=450"
 window.open(theURL,winName,features);
}

function fnOpenWindow2(theURL)
{
 var winName = "Character";
 var features = "toolbar=0,left=10,top=10,location=0,status=0,menubar=1,scrollbars=1,resizable=0,width=700,height=550"
 window.open(theURL,winName,features);
}

function fnOpenWindowForPDF(theURL)
{
 var winName = "Character";
 window.open(theURL,winName);
}
function fnclose()
{
	window.close()
}

// Send to a friend validation

function NewUserValidation(theForm)
{
  if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.txtUsername.value))) 
  {
		//  do nothing
  }
  else
  {
	alert("Please enter valid E-mail address.!")
	theForm.txtUsername.focus();
	return (false);
  }
  
   if (theForm.txtPassword.value.length < 4)
  {
    alert("Please enter valid Password .");
    theForm.txtPassword.focus();
    return (false);
  }
}

// Send to a friend validation

function SendtoFriendValidation(theForm)
{
 	
		  if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.txtFriend_Email.value))) 
		  {
				//  do nothing
		  }
		  else
		  {
			alert("Please enter valid E-mail address.!")
			theForm.txtFriend_Email.focus();
			return (false);
		  }
	// 
		  if (!theForm.txtVisitor_Name.value.length )
		  {
			alert("Please enter Your Name ");
			theForm.txtVisitor_Name.focus();
			return (false);
		  }
  
  if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.txtVisitor_Email.value))) 
  {
		//  do nothing
  }
  else
  {
	alert("Please enter valid E-mail address.!")
	theForm.txtVisitor_Email.focus();
	return (false);
  }
  
  
}




//=========================================================================================================
//                                          Sachin Kashid on 5 June 2006 
//=========================================================================================================











//===========================================================================================================
//                                       validation for Login 
//===========================================================================================================


function LoginValidation(theForm)
{
// Chk  username 
	  var strname = (theForm.txtUserName.value.replace(/^\s*/, '').replace(/\s*$/, ''));
	   if(strname.length == 0)
	  {
			alert("Please enter Your UserName ");
			theForm.txtUserName.focus();
			return (false);
	  }
//End

// To chk email id condition
	  if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.txtUserName.value))) 
	  {
			//  do nothing
	  }
	  else
	  {
			alert("Please enter valid E-mail address.!")
			theForm.txtUserName.focus();
			return (false);
	  }
//End

// Chk Password 
	  var strname = (theForm.txtPassword.value.replace(/^\s*/, '').replace(/\s*$/, ''));
	   if(strname.length == 0)
	  {
			alert("Please enter Password ");
			theForm.txtPassword.focus();
			return (false);
	  }
//end
// chk password length < 4
	  if (theForm.txtPassword.value.length < 4)
	  {
			alert("Please enter valid Password .");
			theForm.txtPassword.focus();
			return (false);
	  }
// End 
}
//===========================================================================================================
//                                                  End
//===========================================================================================================










//===========================================================================================================
//                                       validation for New User
//===========================================================================================================
function NewUserValidation(theForm)
{
// Chk  username empty/not
	  var strname = (theForm.txtUsername.value.replace(/^\s*/, '').replace(/\s*$/, ''));
	   if(strname.length == 0)
	  {
			alert("Please enter UserName ");
			theForm.txtUsername.focus();
			return (false);
	  }
//End
// chk user email Id	  
	  if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.txtUsername.value))) 
	  {
			//  do nothing
	  }
	  else
	  {
			alert("Please enter valid E-mail address.!")
			theForm.txtUsername.focus();
			return (false);
	  }
// end
// chk password empty/not
	   var strname = (theForm.txtPassword.value.replace(/^\s*/, '').replace(/\s*$/, ''));
	   if(strname.length == 0)
	  {
			alert("Enter the Password.");
			theForm.txtPassword.focus();
			return (false);
	  }
// end	
// chk password empty/not
	  if (theForm.txtPassword.value.length < 4)
	  {
			alert("Invalid Password .");
			theForm.txtPassword.focus();
			return (false);
	  }
// end	
// chk first name empty/not
	 var strname = (theForm.txtFirst_Name.value.replace(/^\s*/, '').replace(/\s*$/, ''));
	   if(strname.length == 0)
	  {
			alert("Please enter Your First Name .");
			theForm.txtFirst_Name.focus();
			return (false);
	  }
//End


// for chk name contains any digit
		var checkOK = "0123456789";
		var checkStr = theForm.txtFirst_Name.value;
		var allValid = true;
		var allNum = "";

		for (i = 0;  i < checkStr.length;  i++)
		{
			ch = checkStr.charAt(i);
			for (j = 0;  j < checkOK.length;  j++)
				if (ch == checkOK.charAt(j))
				{
					allValid = false;
					break;
				}
			if (ch != ",")
				allNum += ch;
		}
		if (! allValid)
		{
			alert("InValid Name.");
			theForm.txtFirst_Name.focus();
			return (false);
		}
//end


// chk Last name
	   var strname = (theForm.txtLast_Name.value.replace(/^\s*/, '').replace(/\s*$/, ''));
	   if(strname.length == 0)
	  {
			alert("Please enter Your Last Name.");
			theForm.txtLast_Name.focus();
			return (false);
	  }
// End


// for chk name contains any digit
		var checkOK = "0123456789";
		var checkStr = theForm.txtLast_Name.value;
		var allValid = true;
		var allNum = "";

		for (i = 0;  i < checkStr.length;  i++)
		{
			ch = checkStr.charAt(i);
			for (j = 0;  j < checkOK.length;  j++)
				if (ch == checkOK.charAt(j))
				{
					allValid = false;
					break;
				}
			if (ch != ",")
				allNum += ch;
		}
		if (! allValid)
		{
			alert("Invalid Name.");
			theForm.txtLast_Name.focus();
			return (false);
		}
//end


// for chk the Zip code
		var checkOK = "0123456789";
		var checkStr = theForm.txtZipCode.value;
		var allValid = true;
		var allNum = "";

		for (i = 0;  i < checkStr.length;  i++)
		{
			ch = checkStr.charAt(i);
			for (j = 0;  j < checkOK.length;  j++)
				if (ch == checkOK.charAt(j))
					break;
			if (j == checkOK.length)
			{
				allValid = false;
				break;
			}
			if (ch != ",")
				allNum += ch;
		}
		if (! allValid)
		{
			alert("Enter valid Zip-Code.");
			theForm.txtZipCode.focus();
			return (false);
		}
//end

// for chk City contains any digit
		var checkOK = "0123456789";
		var checkStr = theForm.txtCity.value;
		var allValid = true;
		var allNum = "";

		for (i = 0;  i < checkStr.length;  i++)
		{
			ch = checkStr.charAt(i);
			for (j = 0;  j < checkOK.length;  j++)
				if (ch == checkOK.charAt(j))
				{
					allValid = false;
					break;
				}
			if (ch != ",")
				allNum += ch;
		}
		if (! allValid)
		{
			alert("Invalid Name.");
			theForm.txtCity.focus();
			return (false);
		}
//end
// for chk State contains any digit
		var checkOK = "0123456789";
		var checkStr = theForm.cmbState.value;
		var allValid = true;
		var allNum = "";

		for (i = 0;  i < checkStr.length;  i++)
		{
			ch = checkStr.charAt(i);
			for (j = 0;  j < checkOK.length;  j++)
				if (ch == checkOK.charAt(j))
				{
					allValid = false;
					break;
				}
			if (ch != ",")
				allNum += ch;
		}
		if (! allValid)
		{
			alert("Invalid Name.");
			theForm.cmbState.focus();
			return (false);
		}
//end
}
//===========================================================================================================
//                                                  End
//===========================================================================================================



//===========================================================================================================
//                                       validation for create invitation
//===========================================================================================================
function Create_Invitation(theForm)
{
// Event name
	  var strname = (theForm.txtEvent_Name.value.replace(/^\s*/, '').replace(/\s*$/, ''));
	  if(strname.length == 0)
	  {
			  		alert("Please enter event Name.");
			  		theForm.txtEvent_Name.focus();
			  		return (false);
	  }   
	
// chk Host name
	  	var strname = (theForm.txtHosted_By.value.replace(/^\s*/, '').replace(/\s*$/, ''));
	   if(strname.length == 0)
	  	{
			  alert("Please enter Host Name.");
			  theForm.txtHosted_By.focus();
			  return (false);
	  	} 
// End
// chk Time field id Null
		if (!theForm.txtTime_Hr.value.length)
		{ 
				alert("Please enter Time.");
			  	theForm.txtTime_Hr.focus();
			  	return (false);
		} 

// End
// Chk time, hour in 1 to  12 and Min in 1 to 60
		 	
					var Strinput = theForm.txtTime_Hr.value;
					var mytool_array=Strinput.split(".");
					var maxcounter = mytool_array.length;
					//alert(mytool_array[0]);
					if(maxcounter[0] < 13 && maxcounter[0] > 0)
					{
							if (maxcounter < 2)
							{ 
									alert("Please enter correct Time.");
									theForm.txtTime_Hr.focus();
									return (false);
							} 
							
							if (mytool_array[0] < 13  && mytool_array[1] < 60) 
							{ 			}
							else
							{
										alert("Invalid Time.");
										theForm.txtTime_Hr.focus();
										return (false);
							}
					}
//end		 

// for chk City contains any digit
		var checkOK = "0123456789";
		var checkStr = theForm.txtCity.value;
		var allValid = true;
		var allNum = "";

		for (i = 0;  i < checkStr.length;  i++)
		{
			ch = checkStr.charAt(i);
			for (j = 0;  j < checkOK.length;  j++)
				if (ch == checkOK.charAt(j))
				{
					allValid = false;
					break;
				}
			if (ch != ",")
				allNum += ch;
		}
		if (! allValid)
		{
			alert("Invalid City Name.");
			theForm.txtCity.focus();
			return (false);
		}
//end

// chk Telephone number
		
		var checkOK = "0123456789-()  ";
		var checkStr = theForm.txtPhone.value;
		var allValid = true;
		var allNum = "";

		for (i = 0;  i < checkStr.length;  i++)
		{
			ch = checkStr.charAt(i);
			for (j = 0;  j < checkOK.length;  j++)
				if (ch == checkOK.charAt(j))
					break;
			if (j == checkOK.length)
			{
				allValid = false;
				break;
			}
			if (ch != ",")
				allNum += ch;
		}
		if (! allValid)
		{
			alert("Invalid Telephone number.");
			theForm.txtPhone.focus();
			return (false);
		}
// End 
// chk address field empty/not
	   var strname = (theForm.txtEmail_List.value.replace(/^\s*/, '').replace(/\s*$/, ''));
	   if(strname.length == 0)
	   {
			  alert("Please enter Email Address.");
			  theForm.txtEmail_List.focus();
			  return (false);
	  	} 
//end

// Validdatiooon for Email address
       
		var Strinput = theForm.txtEmail_List.value;
		if (theForm.txtEmail_List.length > 30 )
		{
			alert (Strinput + "Please enter valid E-mail address.!")
			theForm.txtEmail_List.focus();
			return (false);
		}
		var mytool_array=Strinput.split(";");
		var maxcounter = mytool_array.length;
		if (maxcounter > 30 )
		{
		alert (Strinput + "Please enter valid E-mail address.!")
					theForm.txtEmail_List.focus();
					return (false);
		}
		var valid = true;
		if (maxcounter < 2)
		{
				 if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.txtEmail_List.value))) 
				 {
						//  do nothing
				 }
				 else
				 {
					alert (Strinput + "Please enter valid Email Address!")
					theForm.txtEmail_List.focus();
					return (false);
			  	}
		}
		else
		{
				for (i=0; i < maxcounter; i++)
				{
 						 var tmpEmail_add = mytool_array[i];
						 if(tmpEmail_add.length > 1) 
						  if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(tmpEmail_add))) 
						 {
								//  do nothing
						 }
						 else
						 {
							alert( tmpEmail_add + "  :  is an invalid E-mail Address!")
							theForm.txtEmail_List.focus();
							return (false);
					  }
				}
		}
// end  


fnSubmit1();
}   //end of function for create_invitation
//===========================================================================================================
//                                                        End
//===========================================================================================================











//===========================================================================================================
//                                       validation for create E-card
//===========================================================================================================
function Create_Ecard(theForm)
{

// chk password empty/not
	var strname = (theForm.txtEcard.value.replace(/^\s*/, '').replace(/\s*$/, ''));
	   if(strname.length == 0)
	   {
			alert("Please Enter Ecard Name.");
			theForm.txtEcard.focus();
			return (false);
	  }
	  var strname = (theForm.FileName.value.replace(/^\s*/, '').replace(/\s*$/, ''));
	   if(strname.length == 0)
	  {
			alert("Please Select the Picture.");
			theForm.FileName.focus();
			return (false);
	  }


// end	
} // End of create E-card
//===========================================================================================================
//                                                      End
//===========================================================================================================












//===========================================================================================================
//                                       validation for Edit_User_Validation
//===========================================================================================================
function Edit_User_Validation(theForm)
{

// for chk City contains any digit
		var checkOK = "0123456789";
		var checkStr = theForm.txtCity.value;
		var allValid = true;
		var allNum = "";

		for (i = 0;  i < checkStr.length;  i++)
		{
			ch = checkStr.charAt(i);
			for (j = 0;  j < checkOK.length;  j++)
				if (ch == checkOK.charAt(j))
				{
					allValid = false;
					break;
				}
			if (ch != ",")
				allNum += ch;
		}
		if (! allValid)
		{
			alert("Invalid City Name.");
			theForm.txtCity.focus();
			return (false);
		}
//end
// for chk the Zip code
		var checkOK = "0123456789";
		var checkStr = theForm.txtZip.value;
		var allValid = true;
		var allNum = "";

		for (i = 0;  i < checkStr.length;  i++)
		{
			ch = checkStr.charAt(i);
			for (j = 0;  j < checkOK.length;  j++)
				if (ch == checkOK.charAt(j))
					break;
			if (j == checkOK.length)
			{
				allValid = false;
				break;
			}
			if (ch != ",")
				allNum += ch;
		}
		if (! allValid)
		{
			alert("Enter valid Zip-Code");
			theForm.txtZip.focus();
			return (false);
		}
//end

// Chk  username empty/not
	  var strname = (theForm.txtUsername.value.replace(/^\s*/, '').replace(/\s*$/, ''));
	   if(strname.length == 0)
	  {
			alert("Please enter Your UserName ");
			theForm.txtUsername.focus();
			return (false);
	  }
//End

// chk user email Id	  
	  if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.txtUsername.value))) 
	  {
			//  do nothing
	  }
	  else
	  {
			alert("Please enter valid E-mail address.!")
			theForm.txtUsername.focus();
			return (false);
	  }
// end
		 var strname = (theForm.txtPassword.value.replace(/^\s*/, '').replace(/\s*$/, ''));
	   if(strname.length == 0)
	  {
			alert("Please enter the Password.");
			theForm.txtPassword.focus();
			return (false);
	  }
// chk password empty/not
	  if (theForm.txtPassword.value.length < 4)
	  {
			alert("Please enter Valid Password.");
			theForm.txtPassword.focus();
			return (false);
	  }
// end	
}

//===========================================================================================================
//                                                      End
//===========================================================================================================










//===========================================================================================================
//                                       validation for Send E-card
//===========================================================================================================
function Send_Ecard_Validation(theForm)
{
// chk from From Name
	var strname = (theForm.txtPosted_By.value.replace(/^\s*/, '').replace(/\s*$/, ''));
	   if(strname.length == 0)
	  {
			alert("Please enter the Name.");
			theForm.txtPosted_By.focus();
			return (false);
	  }
// end
// chk from To name
		var strname = (theForm.txtEmail_List.value.replace(/^\s*/, '').replace(/\s*$/, ''));
	   if(strname.length == 0)
	  {
			alert("Please enter the E-Mail Address.");
			theForm.txtEmail_List.focus();
			return (false);
	  }
// end
// Validdatiooon for Email address
		var Strinput = theForm.txtEmail_List.value;
		var mytool_array=Strinput.split(";");
		var maxcounter = mytool_array.length;
		var valid = true;
		if (maxcounter < 2)
		{
				 if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.txtEmail_List.value))) 
				 {
						//  do nothing
				 }
				 else
				 {
					alert("Please enter valid E-mail address.!")
					theForm.txtEmail_List.focus();
					return (false);
			  	}
		}
		else
		{
				for (i=0; i < maxcounter; i++)
				{
						 var tmpEmail_add = mytool_array[i];
						  if(tmpEmail_add.length > 1) 
						  if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(tmpEmail_add))) 
						 {
								//  do nothing
						 }
						 else
						 {
							alert("Please enter valid E-mail address.!")
							theForm.txtEmail_List.focus();
							return (false);
					  }
				}
		}
// end    

	
	fnSubmit1()
}
//===========================================================================================================
//                                                      End
//===========================================================================================================











//===========================================================================================================
//                                       validation for Add new theme
//===========================================================================================================
function New_Theme_Validation(theForm)
{
// chk for Theme name		
		var strname = (theForm.txtTheme.value.replace(/^\s*/, '').replace(/\s*$/, ''));
	   if(strname.length == 0)
	  {
			alert("Please enter the Theme name");
			theForm.txtTheme.focus();
			return (false);
	  }
// end
//  chk for color
		var strname = (theForm.txtColor.value.replace(/^\s*/, '').replace(/\s*$/, ''));
	   if(strname.length == 0)
	  {
			alert("Please select the Color");
			theForm.txtColor.focus();
			return (false);
	  }
// end	 
/*// chk color
	if (theForm.txtColor.value.charAt(0) == '#') 
	{ 
		// do nothing
	}
	else 
	{
			alert("Invalid Color");
			theForm.txtColor.focus();
			return (false);
	}
// end
//  chk background image

		var myOption = -1;
		for (i=theform.txtBackGroundName.value.length-1; i > -1; i--) 
		{
			if (theform.txtBackGroundName[i].value.checked) 
			{
				myOption = i;
			}
		}
		if (myOption == -1) 
		{
			alert("You must select a radio button");
			return false;
		}

// end*/
//  chk for File name path
		var strname = (theForm.FileName.value.replace(/^\s*/, '').replace(/\s*$/, ''));
	   if(strname.length == 0)
	  {
			alert("Please select The main picture");
			theForm.FileName.focus();
			return (false);
	  }
// end	

	fnSubmit2()
}

//===========================================================================================================
//                                                      End
//===========================================================================================================












//===========================================================================================================
//                                       validation for Upload Image
//===========================================================================================================
function Upload_Image_Validation(theForm)
{
// chk for Backgrooud name		
		var strname = (theForm.txtBackGroundName.value.replace(/^\s*/, '').replace(/\s*$/, ''));
	   if(strname.length == 0)
	  {
			alert("Please enter the Image name");
			theForm.txtBackGroundName.focus();
			return (false);
	  }
	 var strname = (theForm.FileName.value.replace(/^\s*/, '').replace(/\s*$/, ''));
	   if(strname.length == 0)
	  {
			alert("Please select the Background Image");
			theForm.FileName.focus();
			return (false);
	  }
// End	  
}
//===========================================================================================================
//                                                      End
//===========================================================================================================












//===========================================================================================================
//                                       validation for Add New Contact
//===========================================================================================================
function Add_New_Contact_Validation(theForm)
{
//chk first name			
			var strname = (theForm.txtFirst_Name.value.replace(/^\s*/, '').replace(/\s*$/, ''));
	   if(strname.length == 0)
			{
					alert("Please enter the First name");
					theForm.txtFirst_Name.focus();
					return (false);
			}
//end
// chk for Last name
			var strname = (theForm.txtLast_Name.value.replace(/^\s*/, '').replace(/\s*$/, ''));
	   if(strname.length == 0)
			{
					alert("Please enter the Last name");
					theForm.txtLast_Name.focus();
					return (false);
			}
//End		
// Chk  username 
		  var strname = (theForm.txtEMailID.value.replace(/^\s*/, '').replace(/\s*$/, ''));
	   if(strname.length == 0)
		  {
				alert("Please enter Email address ");
				theForm.txtEMailID.focus();
				return (false);
		  }
//End
// To chk email id condition
		  if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.txtEMailID.value))) 
		  {
				//  do nothing
		  }
		  else
		  {
				alert("Please enter valid E-mail address.!")
				theForm.txtEMailID.focus();
				return (false);
		  }
//End
}
//===========================================================================================================
//                                                      End
//===========================================================================================================

//===========================================================================================================
//                                       validation for Add Edit Contact
//===========================================================================================================
function Edit_Contact_Validation(theForm)
{
//chk first name			
			var strname = (theForm.txtFirst_Name.value.replace(/^\s*/, '').replace(/\s*$/, ''));
	   if(strname.length == 0)
			{
					alert("Please enter the First name");
					theForm.txtFirst_Name.focus();
					return (false);
			}
//End		
// Chk  username 
		  var strname = (theForm.txtEMailID.value.replace(/^\s*/, '').replace(/\s*$/, ''));
	   if(strname.length == 0)
		  {
				alert("Please enter Email address ");
				theForm.txtEMailID.focus();
				return (false);
		  }
//End
// To chk email id condition
		  if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.txtEMailID.value))) 
		  {
				//  do nothing
		  }
		  else
		  {
				alert("Please enter valid E-mail address.!")
				theForm.txtEMailID.focus();
				return (false);
		  }
//End
}








//===========================================================================================================
//                                       validation for Edit Invitation
//===========================================================================================================
function Edit_Invitation_Validation(theForm)
{
	// chk Event
		var strname = (theForm.txtEvent_Name.value.replace(/^\s*/, '').replace(/\s*$/, ''));
	   if(strname.length == 0)
	  	{
			  alert("Please enter event Name.");
			  theForm.txtEvent_Name.focus();
			  return (false);
	  	}   
//end
// chk Host name
	  	var strname = (theForm.txtHosted_By.value.replace(/^\s*/, '').replace(/\s*$/, ''));
	   if(strname.length == 0)
	  	{
			  alert("Please enter Host Name.");
			  theForm.txtHosted_By.focus();
			  return (false);
	  	} 
// End
// chk Time field id Null
		var strname = (theForm.txtTime_Hr.value.replace(/^\s*/, '').replace(/\s*$/, ''));
	   if(strname.length == 0)
		{ 
				alert("Please enter Time.");
			  	theForm.txtTime_Hr.focus();
			  	return (false);
		} 

// End
// Chk time, hour in 1 to  12 and Min in 1 to 60
		 	var Strinput = theForm.txtTime_Hr.value;
			var mytool_array=Strinput.split(".");
			var maxcounter = mytool_array.length;
			if (maxcounter < 2)
			{ 
					alert("Please enter correct Time.");
			  		theForm.txtTime_Hr.focus();
			  		return (false);
			} 
			if (mytool_array[0] < 13  && mytool_array[1] < 60) 
			{ 			}
			else
			{
						alert("Invalid Time.");
			  			theForm.txtTime_Hr.focus();
			  			return (false);
			}
//end		

// for chk City contains any digit
		var checkOK = "0123456789";
		var checkStr = theForm.txtCity.value;
		var allValid = true;
		var allNum = "";

		for (i = 0;  i < checkStr.length;  i++)
		{
			ch = checkStr.charAt(i);
			for (j = 0;  j < checkOK.length;  j++)
				if (ch == checkOK.charAt(j))
				{
					allValid = false;
					break;
				}
			if (ch != ",")
				allNum += ch;
		}
		if (! allValid)
		{
			alert("Invalid City Name.");
			theForm.txtCity.focus();
			return (false);
		}
//end

// chk Telephone number
		
		var checkOK = "0123456789";
		var checkStr = theForm.txtPhone.value;
		var allValid = true;
		var allNum = "";

		for (i = 0;  i < checkStr.length;  i++)
		{
			ch = checkStr.charAt(i);
			for (j = 0;  j < checkOK.length;  j++)
				if (ch == checkOK.charAt(j))
					break;
			if (j == checkOK.length)
			{
				allValid = false;
				break;
			}
			if (ch != ",")
				allNum += ch;
		}
		if (! allValid)
		{
			alert("Invalid Telephone number.");
			theForm.txtPhone.focus();
			return (false);
		}
//end
// Validdatiooon for Email address
		var Strinput = theForm.txtEmail_List.value;
		var mytool_array=Strinput.split(";");
		var maxcounter = mytool_array.length;
		var valid = true;
		if (maxcounter < 2)
		{
				 if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.txtEmail_List.value))) 
				 {
						//  do nothing
				 }
				 else
				 {
					alert("Please enter valid E-mail address.!")
					theForm.txtEmail_List.focus();
					return (false);
			  	}
		}
		else
		{
				for (i=0; i < maxcounter ; i++)
				{
						 var tmpEmail_add = mytool_array[i];
						  if(tmpEmail_add.length > 1) 
						  if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(tmpEmail_add))) 
						 {
								//  do nothing
						 }
						 else
						 {
							alert("Please enter valid E-mail address.!")
							theForm.txtEmail_List.focus();
							return (false);
					  }
				}
		}
// end   


fnSubmit1()
}   //end of function for Edit_invitation

//===========================================================================================================
//                                                      End
//===========================================================================================================












//===========================================================================================================
//                                       validation for  add more Guset
//===========================================================================================================
function Add_more_Guest_Validation(theForm)
{
// chk email address	
		var strname = (theForm.txtEmail_List.value.replace(/^\s*/, '').replace(/\s*$/, ''));
	   if(strname.length == 0)
	  	{
			  alert("Please enter Email Address.");
			  theForm.txtEmail_List.focus();
			  return (false);
	  	}  
// end
// Validdatiooon for Email address
		var Strinput = theForm.txtEmail_List.value;
		var mytool_array=Strinput.split(";");
		var maxcounter = mytool_array.length;
		var valid = true;
		if (maxcounter < 2)
		{
				 if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.txtEmail_List.value))) 
				 {
						//  do nothing
				 }
				 else
				 {
					alert("Please enter valid E-mail address.!")
					theForm.txtEmail_List.focus();
					return (false);
			  	}
		}
		else
		{
				for (i=0; i < maxcounter; i++)
				{
						 var tmpEmail_add = mytool_array[i];
						  if(tmpEmail_add.length > 1) 
						  if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(tmpEmail_add))) 
						 {
								//  do nothing
						 }
						 else
						 {
							alert("Please enter valid E-mail address.!")
							theForm.txtEmail_List.focus();
							return (false);
					  }
				}
		}
// end  

}
//===========================================================================================================
//                                                      End
//===========================================================================================================












//===========================================================================================================
//                                       validation for  Edit Address Book
//===========================================================================================================
function  pole_Validation(theForm)
{
// chk First name	
		var strname = (theForm.txtUserName.value.replace(/^\s*/, '').replace(/\s*$/, ''));
	   if(strname.length == 0)
	  	{
			  alert("Please enter Your Name.");
			  theForm.txtUserName.focus();
			  return (false);
	  	}  
// end

// chk user email Id	  
	  if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.txtEmailID.value))) 
	  {
			//  do nothing
	  }
	  else
	  {
			alert("Please enter valid E-mail address.!")
			theForm.txtEmailID.focus();
			return (false);
	  }
// end
}




