
function chk()
{
	/*if (document.Form1.txt_positionseek.value == "")
	{
		alert("Please Enter position yor are seeking for.");
		document.Form1.txt_positionseek.focus();
		return false;
	}*/
	if (document.Form1.txt_surname.value == "")
	{
		alert("Please Enter your surname");
		document.Form1.txt_surname.focus();
		return false;
	}
	if (document.Form1.txt_name.value == "")
	{
		alert("Please Enter your name.");
		document.Form1.txt_name.focus();
		return false;
	}
	if (document.Form1.txt_address.value == "")
	{
		alert("Please Enter your address.");
		document.Form1.txt_address.focus();
		return false;
	}
	if (document.Form1.txt_postalcode.value == "")
	{
		alert("Please Enter your Postalcode.");
		document.Form1.txt_postalcode.focus();
		return false;
	}
	if (document.Form1.txt_Town.value == "")
	{
		alert("Please Enter your Town.");
		document.Form1.txt_Town.focus();
		return false;
	}
			
	if (document.Form1.txt_birthplace.value == "")
	{
		alert("Please Enter your Birthplace.");
		document.Form1.txt_birthplace.focus();
		return false;
	}
	if (document.Form1.txt_Hometel.value == "")
	{
		alert("Please Enter your Home Telephone number.");
		document.Form1.txt_Hometel.focus();
		return false;
	}
	if (document.Form1.txt_Mobiletel.value == "")
	{
		alert("Please Enter your Mobile number");
		document.Form1.txt_Mobiletel.focus();
		return false;
	}
	if (document.Form1.txt_Worktel.value == "")
	{
		alert("Please Enter your Working Telephone number");
		document.Form1.txt_Worktel.focus();
		return false;
	}
	if (document.Form1.txt_birthdate.value == "")
	{
		alert("Please Enter your Birthdate.");
		document.Form1.txt_birthdate.focus();
		return false;
	}
	if (document.Form1.txt_icardno.value == "")
	{
		alert("Please Enter your Identity card no.");
		document.Form1.txt_icardno.focus();
		return false;
	}
	if (document.Form1.txt_socialno.value == "")
	{
		alert("Please Enter your Social Insurance no.");
		document.Form1.txt_socialno.focus();
		return false;
	}
	if (document.Form1.txt_Nationality.value == "")
	{
		alert("Please Enter your Nationality.");
		document.Form1.txt_Nationality.focus();
		return false;
	}
	
	if (document.Form1.txt_SecFrom.value == "")
	{
		alert("Please Enter your period of study for secondary education");
		document.Form1.txt_SecFrom.focus();
		return false;
	}
	if (document.Form1.txt_SecTo.value == "")
	{
		alert("Please Enter your period of study for secondary education");
		document.Form1.txt_SecTo.focus();
		return false;
	}
	if (document.Form1.txt_SecSchool.value == "")
	{
		alert("Please Enter your School name");
		document.Form1.txt_SecSchool.focus();
		return false;
	}
	if (document.Form1.txt_SecCourse.value == "")
	{
		alert("Please Enter Courses studied.");
		document.Form1.txt_SecCourse.focus();
		return false;
	}
	if (document.Form1.txt_SecGrade.value == "")
	{
		alert("Please Enter Secondary education Grade");
		document.Form1.txt_SecGrade.focus();
		return false;
	}
	
	if (document.Form1.txt_interest.value == "")
	{
		alert("Please Enter your other interest");
		document.Form1.txt_interest.focus();
		return false;
	}
	if (document.Form1.txt_physical.value == "")
	{
		alert("Please fill General information section(a).");
		document.Form1.txt_physical.focus();
		return false;
	}s
	if (document.Form1.txt_crime.value == "")
	{
		alert("Please fill General information section(b).");
		document.Form1.txt_crime.focus();
		return false;
	}
/*	if (document.Form1.txt_HsFrom.value == "")
	{
		alert("Please Enter your period of study for Higher education");
		document.Form1.txt_HsFrom.focus();
		return false;
	}
	if (document.Form1.txt_HsTo.value == "")
	{
		alert("Please Enter your period of study for Higher education");
		document.Form1.txt_HsTo.focus();
		return false;
	}
	if (document.Form1.txt_HsCollege.value == "")
	{
		alert("Please Enter your University/College name");
		document.Form1.txt_HsCollege.focus();
		return false;
	}
	if (document.Form1.txt_HsDiploma.value == "")
	{
		alert("Please Enter Diplomas/Degrees obtained");
		document.Form1.txt_HsDiploma.focus();
		return false;
	}
	if (document.Form1.txt_HsGrade.value == "")
	{
	    alert("Please Enter Higher education Grade");
		document.Form1.txt_HsGrade.focus();
		return false;
	}*/
	if (document.Form1.txt_RefName1.value == "")
	{
		alert("Please Enter name of your first Reference");
		document.Form1.txt_RefName1.focus();
		return false;
	}
	if (document.Form1.txt_RefAdd1.value == "")
	{
		alert("Please Enter address of your first Reference");
		document.Form1.txt_RefAdd1.focus();
		return false;
	}
	if (document.Form1.txt_RefTel1.value == "")
	{
		alert("Please Enter telephone number of your first Reference");
		document.Form1.txt_RefTel1.focus();
		return false;
	}
	if (document.Form1.txt_RefProf1.value == "")
	{
		alert("Please Enter profession of your first Reference");
		document.Form1.txt_RefProf1.focus();
		return false;
	}
	
	if (document.Form1.txt_RefName2.value == "")
	{
		alert("Please Enter name of your second Reference");
		document.Form1.txt_RefName2.focus();
		return false;
	}
	if (document.Form1.txt_RefAdd2.value == "")
	{
		alert("Please Enter address of your second Reference");
		document.Form1.txt_RefAdd2.focus();
		return false;
	}
	if (document.Form1.txt_RefTel2.value == "")
	{
		alert("Please Enter telephone number of your second Reference");
		document.Form1.txt_RefTel2.focus();
		return false;
	}
	if (document.Form1.txt_RefProf2.value == "")
	{
		alert("Please Enter profession of your second Reference");
		document.Form1.txt_RefProf2.focus();
		return false;
	}
	if (!document.Form1.Chk_declr.checked)
	{
		alert("Please accept Declaration by checking ckeckbox.");
		document.Form1.Chk_declr.focus();
		return false;
	}
	
  return true;
  
}



// Validation For application for job


function valapplicationforjob()

{


var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
	var matchArray = document.form1.txt_Email.value.match(emailPat);
	
	if (matchArray == null)
	{
		alert ("Please enter your valid email address.");
		document.form1.txt_Email.value="";
		document.form1.txt_Email.focus();
		return false;
	}
	
	return true;

}
function validatefaq()
{
	if (document.frmFaq.search.value == "")
	{
		alert("Enter text for search");
		document.frmFaq.search.focus();
		return false;
	}
	frmFaq.action="faqdetails.aspx?flag=2&search="+document.frmFaq.search.value;
	return true;
}
// for Auto Responder Details validation

function autoResponderVal()
{
	
	if (form1.txt_autoTitle.value == "")
	{
		alert("You need to enter Autoresponder Title.");
		form1.txt_autoTitle.focus();
		return false;
	}
	
	 if(document.form1.txt_autoEmail.value=="")
    {
        alert("Please Enter Email Address.");
        document.form1.txt_autoEmail.focus();
        return false;
        
    }
    else
	{	var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
		var matchArray = document.form1.txt_autoEmail.value.match(emailPat);
		if (matchArray == null)
		{
			alert ("Please Enter Valid Email Address.");
			document.form1.txt_autoEmail.focus();
			return false;
		}					
	}
	
	if (form1.txt_autoSub.value == "")
	{
		alert("You need to enter Autoresponder Subject.");
		form1.txt_autoSub.focus();
		return false;
	}
	
	if (form1.txt_autoBody.value == "")
	{
		alert("You need to enter Autoresponder Body.");
		form1.txt_autoBody.focus();
		return false;
	}
		
}

 function IsNumeric(sText)

		{
		var ValidChars = "0123456789.";
		var IsNumber=true;
		var Char;

		 
		for (i = 0; i < sText.length && IsNumber == true; i++) 
			{ 
			Char = sText.charAt(i); 
			if (ValidChars.indexOf(Char) == -1) 
				{
				IsNumber = false;
				}
			}
		  return IsNumber;
		   
		}
      
function postingVal()
{

  if(document.Form1.drp_jobcategory.value=="")
    {
        alert("Please Select Job Category.");
        document.Form1.drp_jobcategory.focus();
        return false;
        
    }
    /*
    if(document.Form1.drp_employername.value=="")
    {
        alert("Please Select Employer Name.");
        document.Form1.drp_employername.focus();
        return false;
        
    }
   
    if(document.Form1.txt_companyname.value=="")
    {
        alert("Please Enter Company Name.");
        document.Form1.txt_companyname.focus();
        return false;
        
    }
    
     if(document.Form1.txt_websiteaddr.value=="")
    {
        alert("Please Enter Website Address.");
        document.Form1.txt_websiteaddr.focus();
        return false;
        
    }
     */
     if(document.Form1.txt_jobtitle.value=="")
    {
        alert("Please Enter Job Title.");
        document.Form1.txt_jobtitle.focus();
        return false;
        
    }
    
     if(document.Form1.txt_joblocation.value=="")
    {
        alert("Please Enter Job Location.");
        document.Form1.txt_joblocation.focus();
        return false;
        
    }
     if (document.Form1.txt_noOfjobopening.value=="") 
      { 
        alert("Please Enter Valid Number Of Job Openings.");
        document.Form1.txt_noOfjobopening.value="";
		document.Form1.txt_noOfjobopening.focus();
		return false;
      } 
     
      if (!IsNumeric(document.Form1.txt_noOfjobopening.value)) 
      { 
        alert("Please Enter Valid Number Of Job Openings.");
        document.Form1.txt_noOfjobopening.value="";
		document.Form1.txt_noOfjobopening.focus();
		return false;
      } 
  
	if(document.Form1.drp_qualification.value=="")
    {
        alert("Please Select Qualification.");
        document.Form1.drp_qualification.focus();
        return false;
        
    }
    
    if(document.Form1.drp_languages.value=="")
    {
        alert("Please Select Language.");
        document.Form1.drp_languages.focus();
        return false;
        
    }
    /*
    if(document.Form1.drp_jobtype.value=="")
    {
        alert("Please Select Job Type.");
        document.Form1.drp_jobtype.focus();
        return false;
        
    }
   
    if(document.Form1.drp_jobstatus.value=="")
    {
        alert("Please Select Job Status.");
        document.Form1.drp_jobstatus.focus();
        return false;
        
    }
    
     */
	if (document.Form1.txt_salary.value=="")
	{
		
		alert("Please Enter Salary.");
		document.Form1.txt_salary.value="";
		document.Form1.txt_salary.focus();
		return false;
	}
	if (!IsNumeric(document.Form1.txt_salary.value))
	{
		
		alert("Please Enter salary in number.");
		document.Form1.txt_salary.value="";
		document.Form1.txt_salary.focus();
		return false;
	}
	/*
	if (document.Form1.fl_jobuploadfile.value)
	{
		filename=window.document.Form1.fl_jobuploadfile.value
		i = filename.lastIndexOf(".");
		ext = filename.substr(i+1);
		ext=ext.toLowerCase();
		if (ext != "doc")  
		{		
			alert("Only .doc files are allowed to upload");
			window.document.Form1.fl_jobuploadfile.focus();
			window.document.Form1.fl_jobuploadfile.select();
			return false;
		}
	}*/
	
	if(document.Form1.txt_jobdescription.value=="")
    {
        alert("Please Enter Job Description.");
        document.Form1.txt_jobdescription.focus();
        return false;
        
    }
    /*
    if(document.Form1.txt_applicationinstruction.value=="")
    {
        alert("Please Enter Application Instruction.");
        document.Form1.txt_applicationinstruction.focus();
        return false;
        
    }
    */
    return true;
	
}

function Applireg()                      
{                                                           
	var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
	var matchArray = document.form1.txt_emailid1.value.match(emailPat);
	if (matchArray == null)
	{
		alert ("Please Enter Valid Email Address.");
		document.form1.txt_emailid1.focus();
		return false;
	}
	var matchArray1= document.form1.txt_confirmemailid.value.match(emailPat);
	if (matchArray1 == null)
	{
		alert ("Please Enter Verify Email field.");
		document.form1.txt_confirmemailid.focus();
		return false;
	}
	if (document.form1.txt_emailid1.value != form1.txt_confirmemailid.value)
	{
		alert("You need to enter a same Email in both field.");
		document.form1.txt_confirmemailid.select();
		return false;
	}
	if(document.form1.txt_pass.value=="")
  {
     alert("Please enter password field.")
     document.form1.txt_pass.focus();
     return false;
  }
  if(document.form1.txt_confirmpass.value=="")
  {
     alert("Please enter verify password field.")
     document.form1.txt_confirmpass.focus();
     return false;
  }
  if (document.form1.txt_pass.value != form1.txt_confirmpass.value)
	{
		alert("You need to enter a same password in both field.");
		document.form1.txt_confirmpass.select();
		return false;
	}	
  return true;
}

function valapplogin()
{
  
	var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
	var matchArray = document.form12.txt_Email.value.match(emailPat);
	if (matchArray == null)
	{
		alert ("Please Enter Valid Email Address.");
		document.form12.txt_Email.focus();
		return false;
	}	
    
  if(document.form12.txt_password.value=="")
  {
     alert("Password Required.")
     document.form12.txt_password.focus();
     return false;
  }
  
  return true;
  
}

function catvalidation()
{
    if(document.Form1.txt_CategoryName.value=="")
    {
        alert("Please enter job category name.");
        document.Form1.txt_CategoryName.focus();
        return false;
        
    }
    return true;
}




function ValidateContactUs()
{
 	var ErrMsg="";
	var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
	var matchArray = frmcontact.Contactus2_txtEmail.value.match(emailPat);
	var ErrorDisp = "You are missing following entries.\n";
	ErrorDisp += "----------------------------------------\n";
	
	if(document.frmcontact.Contactus2_txtFname.value=="" )
	{
		alert("First name required\n");
		document.frmcontact.Contactus2_txtFname.focus();
		return false;
	}
	
	if(document.frmcontact.Contactus2_txtFname.value.charAt(0)==' ')
	{    alert("First name required"); 
		 document.frmcontact.Contactus2_txtFname.focus();
		 return false;
	 }
	
	/*if(document.frmcontact.Contactus2_txtEmail.value==""||document.frmcontact.Contactus2_txtEmail.value=="Enter your email.")
	{
	    alert("Email required");		
		document.frmcontact.Contactus2_txtEmail.focus();
		return false;
	}
	else if (matchArray == null)
	{
		alert("Invalid Email format");
		document.frmcontact.Contactus2_txtEmail.focus();
		return false;
	}*/
	
	 if(document.frmcontact.Contactus2_txtComments.value==""||document.frmcontact.Contactus2_txtComments.value=="Enter your comments here")
	{
	    alert("Comments required");
		document.frmcontact.Contactus2_txtComments.focus();
		return false;		
	}
	
	if(document.frmcontact.Contactus2_txtComments.value.charAt(0)==' ')
	{  
	    alert("No spaces allowed.");
	    document.frmcontact.Contactus2_txtComments.focus();
		return false;
    }
	if(document.frmcontact.Contactus2_txtComments.value.length > 250)
	 {
			alert("Please enter only 250 characters");
			document.frmcontact.Contactus2_txtComments.focus();
			return false; 
	 }
	 
	/*if(document.frmcontact.Contactus2_CodeNumberTextBox.value=="")
	{
		alert("Verification code required");
		document.frmcontact.Contactus2_CodeNumberTextBox.focus();
		return false;
	}*/
		return true;
	}

function ValidateFaqDetails()
{
	var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
	var matchArray = Form1.TextBox2.value.match(emailPat);
	if(document.Form1.TextBox2.value=="")
	{
		alert("Email required");
		document.Form1.TextBox2.focus();
		return false;
	}
	else if (matchArray == null)
	{
		alert("Invalid Email format");
		document.Form1.TextBox2.focus();
		return false;
	}
	if(document.Form1.txtArea.value=="")
	{
		alert("Question required");
		document.Form1.txtArea.focus();
		return false;
	}
	return true;
}
//validation for qualification manage


function Qualvalidation()
{
  
   if(document.Form1.txt_QualificationName.value=="")
    {
        alert("Please enter qualification name.");
        document.Form1.txt_QualificationName.focus();
        return false;
        
    }
    return true;

}
function Langvalidation()
{

  if(document.Form1.txt_LanguageName.value=="")
    {
        alert("Please enter language name.");
        document.Form1.txt_LanguageName.focus();
        return false;
        
    }
    return true;

}

function applicantVal()
{
	if (document.Form1.drp_education.value == "")
	{
		alert("You need to select degree from the list.");
		document.Form1.drp_education.focus();
		return false;
	}
	if (document.Form1.txt_jobgoal.value == "")
	{
		alert("You need to enter job Goal.");
		document.Form1.txt_jobgoal.focus();
		return false;
	}
	if (document.Form1.txt_firstname.value == "")
	{
		alert("You need to enter your first name.");
		document.Form1.txt_firstname.focus();
		return false;
	}
	if (document.Form1.txt_middlename.value == "")
	{
		alert("You need to enter your middle Name.");
		document.Form1.txt_middlename.focus();
		return false;
	}
	if (document.Form1.txt_lastname.value == "")
	{
		alert("You need to enter your last name.");
		document.Form1.txt_lastname.focus();
		return false;
	}
	if (document.Form1.txt_username.value == "")
	{
		alert("You need to enter user name.");
		document.Form1.txt_username.focus();
		return false;
	}
	if (document.Form1.txt_password.value == "")
	{
		alert("You need to enter password.");
		document.Form1.txt_password.focus();
		return false;
	}
	if (document.Form1.txt_password.value != Form1.txt_confirmpassword.value)
	{
		alert("You need to enter a same Password in both field.");
		document.Form1.txt_confirmpassword.select();
		return false;
	}	
	if (document.Form1.txt_secretquestion.value == "")
	{
		alert("You need to enter your secret question.");
		document.Form1.txt_secretquestion.focus();
		return false;
	}
	if (document.Form1.txt_answer.value == "")
	{
		alert("You need to enter your answer.");
		document.Form1.txt_answer.focus();
		return false;
	}
	
	var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
	var matchArray = Form1.txt_emailid.value.match(emailPat);
	
	if (matchArray == null)
	{
		alert ("Please enter your valid email address.");
		document.Form1.txt_emailid.focus();
		return false;
	}

	if (document.Form1.txt_address.value == "")
	{
		alert("You need to enter a Address.");
		document.Form1.txt_address.focus();
		return false;
	}
	if (document.Form1.txt_city.value == "")
	{
		alert("You need to enter your city.");
		document.Form1.txt_city.focus();
		return false;
	}
	if (document.Form1.txt_state.value == "")
	{
		alert("You need to enter your state.");
		document.Form1.txt_state.focus();
		return false;
	}
	if (document.Form1.drop_country.value == "")
	{
		alert("You select Country.");
		document.Form1.drop_country.focus();
		return false;
	}
	if (document.Form1.txt_zipcode.value == "")
	{
		alert("You need to enter your zip code.");
		document.Form1.txt_zipcode.focus();
		return false;
	}
	if (document.Form1.txt_phone.value == "")
	{
		alert("You need to enter phone number.");
		document.Form1.txt_phone.focus();
		return false;
	}
	if (document.Form1.txt_mobile.value == "")
	{
		alert("You need to enter mobile number.");
		document.Form1.txt_mobile.focus();
		return false;
	}	
}


function resumevalidation()
{
	
	if (document.Form1.txt_jobtitle.value == "")
	{
		alert ("Please enter your Job Title.");
		document.Form1.txt_jobtitle.focus();
		
		return false;
	}
	if (document.Form1.drop_prefercontact.value == "")
	{
		alert ("Please selct Prefer Contact.");
		document.Form1.drop_prefercontact.focus();
		return false;
	}
	if (document.Form1.drop_preferjobtype.value == "")
	{
		alert ("Please select your Job Type.");
		document.Form1.drop_preferjobtype.focus();
		return false;
	}
	if (document.Form1.txt_joblocation.value == "")
	{
		alert ("Please enter your Job Location.");
		document.Form1.txt_joblocation.focus();
		return false;
	}
	if (document.Form1.txt_salaryreq.value == "")
	{
		alert ("Please enter salary.");
		document.Form1.txt_salaryreq.focus();
		return false;
	}
	else
	{
	    var anum=/(^\d+$)|(^\d+\.\d+$)/
	    if (!anum.test(document.Form1.txt_salaryreq.value))
	    {
		    alert("Please enter valid Salary.");
		    document.Form1.txt_salaryreq.value="";
		    document.Form1.txt_salaryreq.focus();
		    return false;
	    }
	}
	if (document.Form1.lst_occcategory.value == "")
	{
		alert ("Please select Occupational Category.");
		document.Form1.lst_occcategory.focus();
		return false;
	}
	if (document.Form1.drop_highestdegree.value == "")
	{
		alert ("Please select Occupied Heighest Degree.");
		document.Form1.drop_highestdegree.focus();
		return false;
	}
	
	if(document.Form1.drop_qualification.value == "")
	{
	    alert ("Please select qualification.");
		document.Form1.drop_qualification.focus();
		return false;
	}
	
	if (document.Form1.drop_experience.value == "")
	{
		alert ("Please enter Year Of Experience.");
		document.form1.drop_experience.focus();
		return false;
	}
	if (document.Form1.lst_langs.value == "")
	{
		alert ("Please enter Languages Known.");
		document.Form1.lst_langs.focus();
		return false;
	}
	if (document.Form1.txt_resumeheading.value == "")
	{
		alert ("Please enter Resume Title.");
		document.Form1.txt_resumeheading.focus();
		return false;
	}
	
	
	if (document.Form1.fupload_resume.value)
	{
		filename=window.document.Form1.fupload_resume.value
		i = filename.lastIndexOf(".");
		ext = filename.substr(i+1);
		ext=ext.toLowerCase();
		if (ext != "doc")  
		{		
			alert("Only .doc files are allowed to upload");
			window.document.Form1.fupload_resume.focus();
			window.document.Form1.fupload_resume.select();
			return false;
		}
	}

	
	//alert();
	return true;
}
function chkSelected(nn)
{
	var counter = 0 ;
	var ctr = nn.selectedIndex
	
	for (var i=0; i < nn.options.length; i++ )	
	{
		if(nn.options[i].selected)
		{
			counter++ ;
		}
	}
	if (counter > 3)
	{
		alert("Please select any 3 item from the list.");
		nn.options[ctr].selected="";
	}
	nn.focus();
}

function ValidateProfile()
{
	
 	var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
	var matchArray = Form2.Profile1_txtEmail.value.match(emailPat);
	if(document.Form2.Profile1_txtFName.value=="")
	{  
		alert("First name required");
		document.Form2.Profile1_txtFName.focus();
		return false;
	}
	if(document.Form2.Profile1_txtFName.value.charAt(0)==' ')
	{   alert("No spaces allowed.\n");
		document.Form2.Profile1_txtFName.focus();
		return false;
	}
	if(document.Form2.Profile1_txtUserName.value=="")
	{
		alert("User name required");
		document.Form2.Profile1_txtUserName.focus();
		return false;
	}
	if(document.Form2.Profile1_txtUserName.value.charAt(0)==' ')
	{   alert("No spaces allowed.\n");
		document.Form2.Profile1_txtUserName.focus();
		return false; 
    }
	if(document.Form2.Profile1_txtPassword.value=="")
	{
		alert("Password required");
		document.Form2.Profile1_txtPassword.focus();
		return false;
	}
	if(document.Form2.Profile1_txtPassword.value.charAt(0)==' ')
	{    alert("No spaces allowed.\n"); 
		document.Form2.Profile1_txtPassword.focus();
		return false;
	 }
	if(document.Form2.Profile1_txtEmail.value=="")
	{
		alert("Email required");
		document.Form2.Profile1_txtEmail.focus();
		return false;
	}
	else if (matchArray == null)
	{
		alert("Invalid Email format");
		document.Form2.Profile1_txtEmail.focus();
		return false;
	}
	
	if(document.Form2.Profile1_ddlCountry.value==".::Please Select::.")
	{
		alert("Country required");
		return false;
	}
	
	if(document.Form2.Profile1_txtAns.value=="")
	{
		alert("Answer required");
		document.Form2.Profile1_txtAns.focus();
		return false;
	}
	if(document.Form2.Profile1_txtAns.value.charAt(0)==' ')
	{    alert("No spaces allowed.\n");
	document.Form2.Profile1_txtAns.focus(); 
	return false;
	}
	return true;
	}
	
function loopy()
 {
		loc = window.location.href
		sPos =loc.lastIndexOf("/")+1;
		if (sPos != -1) loc = loc.substring(0,sPos); // loose existing search
		window.location = loc+'logout.aspx';
	}

function popup(url)
{
	width = 450;
	height = 345;
	xx = window.screen.width;
	yy = window.screen.height;
	xx = (xx/2) - (width/2);
	yy = (yy/2) - (height);
	style = 'left = ' +  xx + ',top = ' + yy + ',width='+ width +',height=' + height + ',directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no';
	newwindow=window.open(url,'name',style);
	if (window.focus) {newwindow.focus()}
}

function HeaderEmailValidation()
{
	var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
	var matchArray =document.newsletter.m_txtNewsLetter.value.match(emailPat);
	if(document.newsletter.m_txtNewsLetter.value=="")
	{
		alert("Enter Email address.");
		document.newsletter.m_txtNewsLetter.focus();
		return false;
	}
	else if (matchArray == null)
	{
		alert("Invalid Email format.");
		document.newsletter.m_txtNewsLetter.value="";
		document.newsletter.m_txtNewsLetter.focus();
		return false;
	}
	return true;
}


function HeaderLoginValidation()
{
	if(document.login.m_txtUserName.value==" "||document.login.m_txtUserName.value=="Username")
	{
		alert("Enter your username.");
		document.login.m_txtUserName.focus();
		return false;
	}
	
	if(document.login.m_txtPassword.value==" "||document.login.m_txtPassword.value=="Password")
	{
		alert("Enter your password.");
		document.login.m_txtPassword.focus();
		return false;
	}
	return true;
}

function HeaderSearchValidation()
{  

	if(document.frmcontact.txtheadertext.value=="Search here..." ||document.frmcontacttxtheadertext.value=="Enter your text to search")
	{
		alert("Enter search text.");		
		document.frmcontact.txtheadertext.focus();
		return false;
	}
	return true;
}
	function validateguestbook()
			{	
			  var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
				var matchArray = frmguest.txtemail.value.match(emailPat);					
				if (document.frmguest.txtfname.value == "")
				{
					alert("Enter User Name.");
					document.frmguest.txtfname.focus();
					return false;
				}					
				if (document.frmguest.txtemail.value=="")
				{
				   alert("Enter EmailId.");
					document.frmguest.txtemail.focus();
					return false;												
				}
				else if (matchArray == null)
				{	
				
						alert ("Please enter your valid email address.");
						document.frmguest.txtemail.focus();
				return false;			
				}					
				if (document.frmguest.txtComment.value == "")
				{
					alert("Enter Comment.");
					document.frmguest.txtComment.focus();
					return false;
				}					
					return true;
			}
			
function ValidateAddNewUser()
{  	var emailPat =/^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
	var matchArray = Form1.txt_EmailAdd.value.match(emailPat);
	var err, ErrorDisp, UrlPat;
    ErrorDisp = "You are missing following entries.\n";
	ErrorDisp += "----------------------------------------\n";

	if (document.Form1.txt_UserName.value=="")
	{ 
			alert("User name required.");
			document.Form1.txt_UserName.focus();
			return false;
	}
	if(document.Form1.txt_UserName.value.charAt(0)==' ')
	{  
	  alert("No spaces allowed.");
			document.Form1.txt_UserName.focus();
			return false;
	}
	if (document.Form1.txt_FirstName.value=="")
	{
		alert("First name required.");
		document.Form1.txt_FirstName.focus();
		return false;
 	}
	if(document.Form1.txt_FirstName.value.charAt(0)==' ')
	{ 
		alert("No spaces allowed.");
		document.Form1.txt_FirstName.focus();
		return false;
 	}
	if (document.Form1.txt_LastName.value=="")
	{ 
		alert("Last name required.");
		document.Form1.txt_LastName.focus();
		return false;
	}
	if(document.Form1.txt_LastName.value.charAt(0)==' ')
	{ 
		alert("No spaces allowed.");
		document.Form1.txt_LastName.focus();
		return false;
	 
	  }
	if (document.Form1.txt_DisplayName.value=="")
	{  
		alert("Display name required.");
		document.Form1.txt_DisplayName.focus();
		return false;
	}
	if(document.Form1.txt_DisplayName.value.charAt(0)==' ')
	{
		 alert("No spaces allowed.");
		document.Form1.txt_DisplayName.focus();
		return false;
	}
	if (document.Form1.txt_EmailAdd.value=="")
	{ 
		alert("Email required.");
		document.Form1.txt_EmailAdd.focus();
		return false;
	}
	else if (matchArray == null)
	{ 
		alert("Invalid Email format");
		document.Form1.txt_EmailAdd.focus();
		return false;
	 }
	if (document.Form1.txt_Password.value=="")
	{ alert("Password required.");
		document.Form1.txt_Password.focus();
		return false;
	  }
	if(document.Form1.txt_Password.value.charAt(0)==' ')
	{  
		alert("No spaces allowed.");
		document.Form1.txt_Password.focus();
		return false;
	}
	if(document.Form1.txt_ConfirmPass.value=="")
	{
		alert("Confirm Password required.");
		document.Form1.txt_ConfirmPass.focus();
		return false;
	}
	if (document.Form1.txt_Password.value!=document.Form1.txt_ConfirmPass.value)
	{
		alert("Password mismatch.");
		document.Form1.txt_ConfirmPass.focus();
		return false;
	}
	if (document.Form1.txt_question.value=="")
	{ 
		alert("Answer required.");
		document.Form1.txt_question.focus();
		return false;
	 }
	if(document.Form1.txt_question.value.charAt(0)==' ')
	{
		alert("No spaces allowed.");
		document.Form1.txt_question.focus();
		return false;
	}
	
	 return true; 
	
	}		

function MsgDeleteRecord()
{
	if(confirm("Are you sure to delete this record?"))
	{	
	return true;
	}
	return false; 
}

function ValidateChangePass()
{
	var err, ErrorDisp;
	err="";
	ErrorDisp = "You are missing following entries.\n";
	ErrorDisp += "----------------------------------------\n";
	if (document.Form1.txtExistingPass.value=="")
	{
		alert("Existing Password required.");
		document.Form1.txtExistingPass.focus();
		return false;
	}
	if (document.Form1.txtNewPass.value=="")
	{
		alert("New Password required.");
		document.Form1.txtNewPass.focus();
		return false;
	}
	if (document.Form1.txtNewPass.value!=document.Form1.txtConfirmPass.value)
	{
		alert("Password mismatch.");
		document.Form1.txtNewPass.focus();
		return false;
	}
	
		return true;

}	 

////   Client Manage
function ValidateClientManage()
{	

	var emailPat =/^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
	var matchArray = Form1.m_txtEmail.value.match(emailPat);
	var err, ErrorDisp, UrlPat;
	err="";
	ErrorDisp = "You are missing following entries.\n";
	ErrorDisp += "----------------------------------------\n";
	if (document.Form1.m_txtFirstName.value == "")
	{
		alert("Enter First Name.");
		document.Form1.m_txtFirstName.focus();
		return false;
	}
	if(document.Form1.m_txtFirstName.value.charAt(0)==' ')
	{
		alert("No spaces allowed.");
		document.Form1.m_txtFirstName.focus();
		return false;

	}
	if (document.Form1.m_txtUserName.value == "")
	{
		alert("Enter UserName.");
		document.Form1.m_txtUserName.focus();
		return false;
	}
	if(document.Form1.m_txtUserName.value.charAt(0)==' ')
	{
		alert("No spaces allowed.");
		document.Form1.m_txtUserName.focus();
		return false;
	
	}
	if (document.Form1.m_txtPassword.value == "")
	{
		alert("Enter Password.");
		document.Form1.m_txtPassword.focus();
		return false;
	}
	if(document.Form1.m_txtPassword.value.charAt(0)==' ')
	{
		alert("No spaces allowed.");
		document.Form1.m_txtPassword.focus();
		return false;
	
	}
	if (document.Form1.m_txtEmail.value == "")
	{
		alert("Enter Email Id.");
		document.Form1.m_txtEmail.focus();
		return false;
	}
	else if (matchArray == null)
	{
		alert("Inavalid Email format.");
		document.Form1.m_txtEmail.focus();
		return false;
	}
	return true;
	}
	
	
	function ChkClientDeleteAll(checkAllBox)                      
	{                                                           
	var frm = document.Form1.elements ;                             
	var ChkState=checkAllBox.checked;                   
	k1=3;
	for(i=0;i<frm.length;i++)                              
	{                                                              
		e=frm.elements[i];                                   
		if(e.name=='m_dtgClient:_ctl'+k1+':m_chkdelete')
		{
			e.checked= ChkState;                        
			k1++;
		}
	}  
    }

function ChkClientActiveAll(checkAllBox)                      
{                                                           
	var frm = document.Form1.elements ;                             
	var ChkState=checkAllBox.checked;    
	k=3;
	for(i=0;i<frm.length;i++)                              
	{                                                              
		e=frm.elements[i];                                   
		if(e.name=='m_dtgClient:_ctl'+k+':m_chkactive')
		{
			e.checked= ChkState;    
			k++;                    
		}
    }  
}

//for employee
function ChkEmployeeDeleteAll(checkAllBox)                      
	{                                                           
	var frm = document.Form1.elements ;                             
	var ChkState=checkAllBox.checked;                   
	k1=3;
	for(i=0;i<frm.length;i++)                              
	{                                                              
		e=frm.elements[i];                                   
		if(e.name=='DataGrid1:_ctl'+k1+':m_chkdelete')
		{
			e.checked= ChkState;                        
			k1++;
		}
	}  
}

function ChkEmployeeActiveAll(checkAllBox)                      
{                                                           
	var frm = document.Form1.elements ;                             
	var ChkState=checkAllBox.checked;    
	k=3;
	for(i=0;i<frm.length;i++)                              
	{                                                              
		e=frm.elements[i];                                   
		if(e.name=='DataGrid1:_ctl'+k+':m_chkactive')
		{
			e.checked= ChkState;    
			k++;                    
		}
		
	}  
}
function ValidateCreatePage()
 {
  if (document.Form1.m_txtpagename.value == "")
	{
		alert("Enter Page Name");
		document.Form1.m_txtpagename.focus();
		return false;
	} 
	var is_space=document.Form1.m_txtpagename.value.indexOf(" ");
	if (is_space!=-1)
	{ 
		alert("Space is not allowed in Page Name.");
		document.Form1.m_txtpagename.focus();
		return false;
	}
	var pagePat = /^[A-Za-z0-9_]+$/				
	var matchArray = Form1.m_txtpagename.value.match(pagePat);
	if (matchArray == null)
	{
		strd="Page Name contains Only Alphabets.";
		alert (strd);						
		document.Form1.m_txtpagename.focus();
		return false;
	}
	if (document.Form1.m_txtpagetitle.value == "")
	{   
		alert("Enter Your Page Title.");
		document.Form1.m_txtpagetitle.focus();
		return false;
	}
	if(document.Form1.m_txtpagetitle.value.charAt(0)==' ')
	{
		alert("No spaces allowed.");
		document.Form1.m_txtpagetitle.focus();
		return false;
	}
	if (document.Form1.m_txtmkey.value == "")
	{
		alert("Enter Your Meta Keyword.");
		document.Form1.m_txtmkey.focus();
		return false;
	}
	if(document.Form1.m_txtmkey.value.charAt(0)==' ')
	{
		alert("No spaces allowed.");
		document.Form1.m_txtmkey.focus();
		return false;
	}
	if (document.Form1.m_txtmdesc.value == "")
	{
		alert("Enter Your Meta Description.");
		document.Form1.m_txtmdesc.focus();
		return false;
	}
	if(document.Form1.m_txtmdesc.value.charAt(0)==' ')
	{
		alert("No spaces allowed.");
		document.Form1.m_txtmdesc.focus();
		return false;
	}
	return true;			
}
function limit(text,long) 
{
	var maxlength = new Number(long); 
	if (text.value.length > maxlength)
	{
		text.value = text.value.substring(0,maxlength);
		alert(" Only " + long + " chars");
		return false;
	}
	return true;
}


function ValidateMyProfile()
{
	var emailPat =/^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
	var err, ErrorDisp;
	
	err="";
    ErrorDisp = "You are missing following entries.\n";
	ErrorDisp += "----------------------------------------\n";
	
	if (document.Form1.txtDisplayName.value=="")
	{
		alert("Display name required.");
		document.Form1.txtDisplayName.focus();
		return false;
	}
	if(document.Form1.txtDisplayName.value.charAt(0)==' ')
	{
		alert("No spaces allowed.");
		document.Form1.txtDisplayName.focus();
		return false;

	}
	if (document.Form1.txtFirstName.value=="")
	{
		alert("First name required.");
		document.Form1.txtFirstName.focus();
		return false;
	
	}
	if(document.Form1.txtFirstName.value.charAt(0)==' ')
	{
		alert("No spaces allowed.");
		document.Form1.txtFirstName.focus();
		return false;

	}
	if (document.Form1.txtEmail.value=="")
	{
		alert("Email required.");
		document.Form1.txtEmail.focus();
		return false;
	}
	
	else if (Form1.txtEmail.value.match(emailPat) == null)
	{
		alert("Inavalid Email format.");
		document.Form1.txtEmail.focus();
		return false;
	}
	return true;
}		
	 

function popup(url)
{
	width = 400;
	height = 345;
	xx = window.screen.width;
	yy = window.screen.height;
	xx = (xx/2) - (width/2);
	yy = (yy/2) - (height);
	style = 'left = ' +  xx + ',top = ' + yy + ',width='+ width +',height=' + height + ',directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no';
	newwindow=window.open(url,'name',style);
	if (window.focus) {newwindow.focus()}
}


function staffImagepopup(url)
{
	width = 500;
	height = 500;
	xx = window.screen.width;
	yy = window.screen.height;
	xx = (xx/2) - (width/2);
	yy = (yy/2) - (height);
	style = 'left = ' +  xx + ',top = ' + yy + ',width='+ width +',height=' + height + ',directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no';
	newwindow=window.open(url,'name',style);
	if (window.focus) {newwindow.focus()}
}

function ValidateStaffEditGen()
{
	
	var emailPat =/^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
	var matchArray = Form1.txtEmail.value.match(emailPat);
	var err, ErrorDisp, UrlPat;
	err="";
	
	ErrorDisp = "You are missing following entries.\n";
	ErrorDisp += "----------------------------------------\n";
	
	if(document.Form1.ddlDepartment.selectedIndex=="0")
	{	
		alert("Department required.");
		document.Form1.ddlDepartment.focus();
		return false;
	}
	
	if (document.Form1.txtStaffNo.value=="")
	{
		alert("Staff no required.");
		document.Form1.txtStaffNo.focus();
		return false;

	}
	if(document.Form1.txtStaffNo.value.charAt(0)==' ')
	{
		alert("No spaces allowed.");
		document.Form1.txtStaffNo.focus();
		return false;

	}
	if (document.Form1.txtFName.value=="")
	{
		alert("First name required.");
		document.Form1.txtFName.focus();
		return false;
	}
	if(document.Form1.txtFName.value.charAt(0)==' ')
	{
		alert("No spaces allowed.");
		document.Form1.txtFName.focus();
		return false;
	
	}
	if (document.Form1.txtLName.value=="")
	{
		alert("Last name required.");
		document.Form1.txtLName.focus();
		return false;
	}
	if(document.Form1.txtLName.value.charAt(0)==' ')
	{
		alert("No spaces allowed.");
		document.Form1.txtLName.focus();
		return false;
	}
	if (document.Form1.txtEmail.value=="")
	{
		alert("Email required.");
		document.Form1.txtEmail.focus();
		return false;

	}
	else if (matchArray == null)
	{
		alert("Inavalid Email format.");
		document.Form1.txtEmail.focus();
		return false;

	}
	if (document.Form1.ddlGender.selectedIndex=="0")
	{
		alert("Select gender.");
		document.Form1.ddlGender.focus();
		return false;
	}
	if (document.Form1.txtDesignation.value=="")
	{
		alert("Designation required.");
		document.Form1.txtDesignation.focus();
		return false;
	}
	if(document.Form1.txtDesignation.value.charAt(0)==' ')
	{
		alert("No spaces allowed.");
		document.Form1.txtDesignation.focus();
		return false;
	}
	if (document.Form1.txtDOB.value=="")
	{
		alert("Date of birth required.");
		document.Form1.txtDOB.focus();
		return false;
	}
	
	return true;
}

function ValidateStaffEditDep()
{
	var err, ErrorDisp;
	err="";
	
	ErrorDisp = "You are missing following entries.\n";
	ErrorDisp += "----------------------------------------\n";
	if (document.Form1.ddlBloodGroup.selectedIndex=="0")
	{
			alert("Select blood group.");
		document.Form1.ddlBloodGroup.focus();
		return false;
	}
	if (document.Form1.ddlCountry.selectedIndex=="0")
	{
		alert("Select country.");
		document.Form1.ddlCountry.focus();
		return false;
	
	}
	return true;
}

function ProcatManagevalidation()
{	
	var strd;
	if (document.Form1.m_txtCatName.value == "")
	{
		strd=document.Form1.MRF1.value;
		alert(strd);
		document.Form1.m_txtCatName.focus();
		return false;
	}
	if(document.Form1.m_txtCatName.value.charAt(0)==' ')
	{
		alert("Nospaces allowed.");
		document.Form1.m_txtCatName.focus();
		return false;
	}
	
	var anum=/(^\d+$)|(^\d+\.\d+$)/
	if (!anum.test(document.Form1.m_txtSortOrder.value))
	{
		strd=document.Form1.MRF2.value;
		alert(strd);
		document.Form1.m_txtSortOrder.value="";
		document.Form1.m_txtSortOrder.focus();
		return false;
	}
	return true;
}
// color validation for site settings

function ValidateSiteSettings()
{
	var validChar='0123456789ABCDEF';
	var entry1=document.Form1.txtMenuActBgColor.value.toUpperCase();
	var entry2=document.Form1.txtMenuInactBgColor.value.toUpperCase();
	var entry3=document.Form1.txtMenuActFontColor.value.toUpperCase();
	var entry4=document.Form1.txtMenuInactFontColor.value.toUpperCase();
	var entry5=document.Form1.txtMenuBorderColor.value.toUpperCase();
	var UrlPat = /^[A-Za-z0-9_\-]+[.]+([A-Za-z0-9_\-]+)*[.]+([A-Za-z0-9_\-]+)$/	
	var emailPat =/^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
	var matchEmail = Form1.txtGEmail.value.match(emailPat);
	var strlen1=entry1.length;
	if(strlen1!=7)
	{
		alert("MenuActBgColor Entry must be EXACTLY 7 characters long");
		return false;
	}
	for (i=1;i<7;i++ )
	{
		if(validChar.indexOf(entry1.charAt(i))<0)
		{
			alert("MenuActBgColor Entry must be in RRGGBB hexcode format!");
			return false;
		}
	}
	
	if(entry1.charAt(0) != "#" )
	{
		alert("MenuActBgColor First Character should be # Sign"); 
		return false;
	}
	
	var strlen2=entry2.length;
	if(strlen2!=7)
	{
		alert("MenuInactBgColor Entry must be EXACTLY 7 characters long");
		return false;
	}
	
	for (i=1;i<7;i++ )
	{
		if(validChar.indexOf(entry2.charAt(i))<0)
		{
			alert("MenuInactBgColor Entry must be in RRGGBB hexcode format!");
			return false;
		}
	}
	
	if(entry2.charAt(0) != "#" )
	{
		alert("MenuInactBgColor First Character should be # Sign"); 
		return false;
	}
	
	var strlen3=entry3.length;
	if(strlen3!=7)
	{
		alert("MenuActFontColor Entry must be EXACTLY 7 characters long");
		return false;
	}
	for (i=1;i<7;i++ )
	{
		if(validChar.indexOf(entry3.charAt(i))<0)
		{
			alert("MenuActFontColor Entry must be in RRGGBB hexcode format!");
			return false;
		}
	}
	if(entry3.charAt(0) != "#" )
	{
		alert("MenuActFontColor First Character should be # Sign"); 
		return false;
	}	
	var strlen4=entry4.length;
	if(strlen4!=7)
	{
		alert("MenuInactFontColor Entry must be EXACTLY 7 characters long");
		return false;
	}
	for (i=1;i<7;i++ )
	{
		if(validChar.indexOf(entry4.charAt(i))<0)
		{
			alert("MenuInactFontColor Entry must be in RRGGBB hexcode format!");
			return false;
		}
	}
	if(entry4.charAt(0) != "#" )
	{
		alert("MenuInactFontColor First Character should be # Sign"); 
		return false;
	}	
	var strlen5=entry5.length;
	if(strlen5!=7)
	{
		alert("MenuBorderColor Entry must be EXACTLY 7 characters long");
		return false;
	}
	for (i=1;i<7;i++ )
	{
		if(validChar.indexOf(entry5.charAt(i))<0)
		{
			alert("MenuBorderColor Entry must be in RRGGBB hexcode format!");
			return false;
		}
	}
	if(entry5.charAt(0) != "#" )
	{
		alert("MenuBorderColor First Character should be # Sign"); 
		return false;
	}	
		if (document.Form1.txtGEmail.value=="")
	{
		alert("Admin Email can not be left empty.");
		return false;
	}
	else if(matchEmail== null)
	{
		alert("Invalid Email format.");
		return false;
	}
	
	if (document.Form1.txtGCopyRightText.value=="")
	{
		alert("Copyright field can not be left empty.");
		document.Form1.txtGCopyRightText.focus();
		return false;
	}
	if(document.Form1.txtGCopyRightText.value.charAt(0)==' ')
	{
		alert("No spaces allowed.");
		return false;
	}
	if (document.Form1.txtGCycImgTrans.value=="")
	{
		alert("Cyclic image transition field can not be left empty.");
		document.Form1.txtGCycImgTrans.focus();
		return false;
	}
	//else
	
		//if (isNaN(document.Form1.txtGCycImgTrans.value)) 
		//{
	//		ErrMsg+ = "Cyclic image transition field accept Numeric Digits Only.\N";
	//	}
	
	
	if (document.Form1.txtGCopyRitURL.value=="")
	{
		alert("Copyright URL field can not be left empty.");
		document.Form1.txtGCopyRitURL.focus();
		return false;
	}
	
	if (document.Form1.m_txtAutoSubject.value=="")
	{
		alert("Subject required.");
		document.Form1.m_txtAutoSubject.focus();
		return false;
	}
	if(document.Form1.m_txtAutoSubject.value.charAt(0)==' ')
	{
		alert("No spaces allowed.");
		return false;
	}
	if (document.Form1.m_txtAutoResBody.value=="")
	{
		alert("Body required.");
		document.Form1.m_txtAutoResBody.focus();
		return false;
	}
	if(document.Form1.m_txtAutoResBody.value.charAt(0)==' ')
	{	alert("No spaces allowed.");
		return false;
	}
	
		return true;
	}

function faqCatManageValidate() 
{ 
	if (document.Form1.txtCatName.value == "")
	{ 
		alert("Enter Category Name");
		document.Form1.txtCatName.focus();
		return false; 
	} 
	if(document.Form1.txtCatName.value.charAt(0)==' ')
	{	alert("No spaces allowed.");
		document.Form1.txtCatName.focus();
		return false; }
	if (document.Form1.txtSortOrder.value == "")
	{
		alert("Enter Sort Order"); 
		document.Form1.txtSortOrder.focus();
		return false;
	}
	var anum=/(^\d+$)|(^\d+\.\d+$)/
	if (!anum.test(document.Form1.txtSortOrder.value))
	{
		alert("Enter numeric Sort Order");
		document.Form1.txtSortOrder.value="";
		document.Form1.txtSortOrder.focus();
		return false;
	}
	return true;
}

function validateEditDynamicpage()
{
	if (document.Form1.m_txtpagetitle.value == "")
	{   
		alert("Enter Your Page Title.");
		document.Form1.m_txtpagetitle.focus();
		return false;
	}
	if(document.Form1.m_txtpagetitle.value.charAt(0)==' ')
	{
		alert("No spaces allowed.");
		document.Form1.m_txtpagetitle.focus();
		return false;	
	}
	if (document.Form1.m_txtmkey.value == "")
	{
		alert("Enter Your Meta Keyword.");
		document.Form1.m_txtmkey.focus();
		return false;
	}
	if(document.Form1.m_txtmkey.value.charAt(0)==' ')
	{
		alert("No spaces allowed.");
		document.Form1.m_txtmkey.focus();
		return false;
	}
	if (document.Form1.m_txtmdesc.value == "")
	{
		alert("Enter Your Meta Description.");
		document.Form1.m_txtmdesc.focus();
		return false;
	}
	if(document.Form1.m_txtmdesc.value.charAt(0)==' ')
	{
		alert("No spaces all.");
		document.Form1.m_txtmdesc.focus();
		return false;
	}
	return true;			
}

function ValidateMenuAdd()
 {
	if (document.Form1.m_txtSubMenu.value == "")
	{
		alert("Enter SubMenu Name");
		document.Form1.m_txtSubMenu.focus();
		return false;
	}
	if(document.Form1.m_txtSubMenu.value.charAt(0)==' ')
	{
		alert("No spaces allowed.");
		document.Form1.m_txtSubMenu.focus();
		return false;
	}
	if (document.Form1.m_txtsort.value =="")
	{
		alert("Enter SortOrder");
		document.Form1.m_txtsort.focus();
		return false;
	}
	var anum=/(^\d+$)|(^\d+\.\d+$)/
	if (!anum.test(document.Form1.m_txtsort.value))
	{
		alert("Invalid SortOrder");
		document.Form1.m_txtsort.value="";
		document.Form1.m_txtsort.focus();
		return false;
	}
	if (document.Form1.m_dropdwnlink.value == "::Select::" && document.Form1.txtCustomLink.value == "")
	{
		alert("Select Link");
		document.Form1.m_dropdwnlink.focus();
		return false;
	}
	return true;			
}

function publicationManagevalidation()
{
	var strd;
	if (document.Form1.m_txtPubName.value == "")
	{
		strd="Publication Name Required.";
		alert(strd);
		document.Form1.m_txtPubName.focus();
		return false;
	}
	if(document.Form1.m_txtPubName.value.charAt(0)==' ')
	{
		alert("No spaces allowed.");
		document.Form1.m_txtPubName.focus();
		return false;
	}
	var anum=/(^\d+$)|(^\d+\.\d+$)/
	if (!anum.test(document.Form1.m_txtSortOrder.value))
	{
		alert('Enter numeric sort order.');
		document.Form1.m_txtSortOrder.value="";
		document.Form1.m_txtSortOrder.focus();
		return false;
	}
	return true;
}


function validatePageManage()
{
	if (document.Form1.m_txtPageTitle.value == "")
	{   
		alert("Enter Your Page Title.");
		document.Form1.m_txtPageTitle.focus();
		return false;
	}
	if(document.Form1.m_txtPageTitle.value.charAt(0)==' ')
	{
		alert("No spaces allowed.");
		document.Form1.m_txtPageTitle.focus();
		return false;
	}
	if (document.Form1.m_txtMetaKeyword.value == "")
	{
		alert("Enter Your Meta Keyword.");
		document.Form1.m_txtMetaKeyword.focus();
		return false;
	}
	if(document.Form1.m_txtMetaKeyword.value.charAt(0)==' ')
	{
		alert("No spaces allowed.");
		document.Form1.m_txtMetaKeyword.focus();
		return false;	
	}
	if (document.Form1.m_txtMetaDescription.value == "")
	{
		alert("Enter Your Meta Description.");
		document.Form1.m_txtMetaDescription.focus();
		return false;
	}
	if(document.Form1.m_txtMetaDescription.value.charAt(0)==' ')
	{
		alert("No spaces allowed.");
		document.Form1.m_txtMetaDescription.focus();
		return false;
	}
	return true;
}

function validateServiceManage()
{	
	if (document.Form1.m_txtServiceName.value == "")
	{
		alert("Please Enter Service Name");
		document.Form1.m_txtServiceName.focus();
		return false;
	}
	if(document.Form1.m_txtServiceName.value.charAt(0)==' ')
	{
		alert("No spaces allowed.");
		document.Form1.m_txtServiceName.focus();
		return false;
	}
	if (document.Form1.m_txtSortOrder.value=="")
	{
		alert("Please Enter SortOrder");					
		document.Form1.m_txtSortOrder.focus();
		return false;
	}
	var anum=/(^\d+$)|(^\d+\.\d+$)/
	if (!anum.test(document.Form1.m_txtSortOrder.value))
	{
		alert("Please Enter Valid SortOrder");
		document.Form1.m_txtSortOrder.value="";
		document.Form1.m_txtSortOrder.focus();
		return false;
	}
	if (document.Form1.m_txtshortDesc.value =="")
	{
		alert("Please Enter Short Description.");
		document.Form1.m_txtshortDesc.focus();
		return false;
	}
	if(document.Form1.m_txtshortDesc.value.charAt(0)==' ')
	{
		alert("No spaces allowed.");
		document.Form1.m_txtshortDesc.focus();
		return false;
	}
	return true;
}

function validateLibCatManage()
{	
	if (document.Form1.m_txtCatName.value == "")
	{
		alert("Please Enter Category Name");
		document.Form1.m_txtCatName.focus();
		return false;
	}
	if(document.Form1.m_txtCatName.value.charAt(0)==' ')
	{
		alert("No spaces allowed.");
		document.Form1.m_txtCatName.focus();
		return false;
	}
	if (document.Form1.m_txtSortOrder.value=="")
	{
		alert("Please Enter Sort Order");
		document.Form1.m_txtSortOrder.focus();
		return false;
	}
	var anum=/(^\d+$)|(^\d+\.\d+$)/
	if (!anum.test(document.Form1.m_txtSortOrder.value))
	{
		alert("Please Enter Valid Sort Order");
		document.Form1.m_txtSortOrder.focus();
		return false;
	}
	return true;
}
 function ValidateAddDepartment()
 {
	if(document.Form1.txtDeptName.value=="")
	{
		alert("enter department name");
		document.Form1.txtDeptName.focus();
		return false;
	}
	if(document.Form1.txtDeptName.value.charAt(0)==' ')
	{
		alert("No spaces allowed.");
		document.Form1.txtDeptName.focus();
		return false;
	}
	if (document.Form1.txtSortOrder.value=="")
	{
		alert("Please Enter Sort Order");
		document.Form1.txtSortOrder.focus();
		return false;
	}
	var anum=/(^\d+$)|(^\d+\.\d+$)/
	if (!anum.test(document.Form1.txtSortOrder.value))
	{   
		alert("Please Enter Valid Sort Order");
		document.Form1.txtSortOrder.value="";
		document.Form1.txtSortOrder.focus();
		
		return false;
	}
	return true;
 }

function validateLibraryManage()
{	
	var UrlPat = /^[http:/]+([A-Za-z0-9_\-]+)[.]+([A-Za-z0-9_\-]+)*[.]+([A-Za-z0-9_\-]+)$/
	//var matchArray = Form1.m_txtUrl.value.match(UrlPat);
	if (document.Form1.m_cmbCategory.value == "")
	{
		alert("Please Select Category Name");
		document.Form1.m_cmbCategory.focus();
		return false;
	}
	if(document.Form1.m_cmbCategory.value.charAt(0)==' ')
	{
		alert("No spaces allowed.");
		document.Form1.m_cmbCategory.focus();
		return false;
	}
	if (document.Form1.m_txtLibrary.value == "")
	{
		alert("Please Enter Links Name");
		document.Form1.m_txtLibrary.focus();
		return false;
	}
	if(document.Form1.m_txtLibrary.value.charAt(0)==' ')
	{
		alert("No spaces allowed.");
		document.Form1.m_txtLibrary.focus();
		return false;
	}
	if (document.Form1.m_txtUrl.value == "")
	{
		alert("Please Enter Url");
		document.Form1.m_txtUrl.focus();
		return false;
	}
	
	if (document.Form1.m_txtSortOrder.value=="")
	{
		alert("Please Enter Sort Order");
		document.Form1.m_txtSortOrder.focus();
		return false;
	}
	var anum=/(^\d+$)|(^\d+\.\d+$)/
	if (!anum.test(document.Form1.m_txtSortOrder.value))
	{
		alert("Please Enter Valid Sort Order");
		document.Form1.m_txtSortOrder.focus();
		return false;
	}
	return true;
}

function faqlistMsgDeleteRecord()
{
	var strd=document.Form1.DMCN.value;
	if (confirm(strd))
	{
		return true;
	}
	return false;
}

function doFullScreen()
{		
}
function doNormalScreen()
{
}

function ProductManagevalidation()
			{	
				var strd;
				if (document.Form1.m_txtRefNo.value == "")
				{
					strd=document.Form1.MRF1.value;
					alert(strd);
					document.Form1.m_txtRefNo.focus();
					return false;
				}
				if(document.Form1.m_txtRefNo.value.charAt(0)==' ')
				{
					alert("No spaces allowed.");
					document.Form1.m_txtRefNo.focus();
					return false;
				}
				if (document.Form1.m_txtProductName.value == "")
				{
					strd=document.Form1.MRF2.value;
					alert(strd);
					document.Form1.m_txtProductName.focus();
					return false;
				}
				if(document.Form1.m_txtProductName.value.charAt(0)==' ')
				{
					alert("No spaces allowed.");
					document.Form1.m_txtProductName.focus();
					return false;
				}
			
				if (document.Form1.m_txtShortDesc.value == "")
				{
					strd=document.Form1.MRF3.value;
					alert(strd);
					document.Form1.m_txtShortDesc.focus();
					return false;
				}
				
				
				var anum=/(^\d+$)|(^\d+\.\d+$)/ 
				if (!anum.test(document.Form1.m_txtSortOrder.value))
				{
					strd="Please Enter Numeric Sort Order.";
					alert(strd);
					document.Form1.m_txtSortOrder.value="";
					document.Form1.m_txtSortOrder.focus();
					return false;
				}
				
				return true;
			}
	
			
	function datevalidtion(todate,fromdate)
	{
	if ((document.Form1.todate.value!="") && (document.Form1.fromdate.value!=""))
	{
		if ((document.Form1.todate.value) > (document.Form1.fromdate.value))
		{
			alert("To Date Must be less than From Date");
			document.Form1.todate.focus();
		}	
	}  
}  
function CheckAll(checkAllBox)                      
{                                                           
	var frm = document.Form1.elements ;                             
	var ChkState=checkAllBox.checked;                   
	for(i=0;i<frm.length;i++)                              
	{                                                              
		e=frm.elements[i];                                   
		if(e.type=='checkbox')
		e.checked= ChkState ;                        
	}  
}

function ChkServiceActiveAll(checkAllBox)                      
{                                                           
	var frm = document.Form1.elements ;                             
	var ChkState=checkAllBox.checked;    
	k=3;
	for(i=0;i<frm.length;i++)                              
	{                                                              
		e=frm.elements[i];                                   
		if(e.name=='m_dtgService:_ctl'+k+':m_chkactive')
		{
			e.checked= ChkState;    
			k++;                    
		}
	}  
}
function ChkServiceDeleteAll(checkAllBox)                      
{                                                           
	var frm = document.Form1.elements ;                             
	var ChkState=checkAllBox.checked;                   
	k1=3;
	for(i=0;i<frm.length;i++)                              
	{                                                            
		e=frm.elements[i];                                   
		if(e.name=='m_dtgService:_ctl'+k1+':m_chkdelete')
		{
			e.checked= ChkState;                        
			k1++;
		}
	}  
}



function ChkLibraryCatActiveAll(checkAllBox)                      
{                                                           
	var frm = document.Form1.elements;                             
	var ChkState=checkAllBox.checked;    
	k=3;
	for(i=0;i<frm.length;i++)                              
	{                                                              
		e=frm.elements[i];                                   
		if(e.name=='m_dtgLibCat:_ctl'+k+':m_chkactive')
		{
			e.checked= ChkState;    
			k++;                    
		}
		
	}  
}

function ChkLibraryCatDeleteAll(checkAllBox)                      
{                                                           
	var frm = document.Form1.elements ;                             
	var ChkState=checkAllBox.checked;                   
	k1=3;
	for(i=0;i<frm.length;i++)                              
	{                                                              
		e=frm.elements[i];                                   
		if(e.name=='m_dtgLibCat:_ctl'+k1+':m_chkdelete')
		{
			e.checked= ChkState;                        
			k1++;
		}
	}  
}
function ChkLibraryActiveAll(checkAllBox)                      
{                                                           
	var frm = document.Form1.elements ;                             
	var ChkState=checkAllBox.checked;    
	k=3;
	for(i=0;i<frm.length;i++)                              
	{                                                              
		e=frm.elements[i];                                   
		if(e.name=='m_dtgLibrary:_ctl'+k+':m_chkactive')
		{
			e.checked= ChkState;    
			k++;                    
		}
		
	}  
}
function ChkLibraryDeleteAll(checkAllBox)                      
{                                                           
	var frm = document.Form1.elements ;                             
	var ChkState=checkAllBox.checked;                   
	k1=3;
	for(i=0;i<frm.length;i++)                              
	{                                                              
		e=frm.elements[i];                                   
		if(e.name=='m_dtgLibrary:_ctl'+k1+':m_chkdelete')
		{
			e.checked= ChkState;                        
			k1++;
		}
	}  
	                                                            
}
function ValidateCyclicImageEdit()
{
	var err, ErrorDisp, UrlPat;
	err="";
	UrlPat = /^[http:/]+([A-Za-z0-9_\-]+)[.]+([A-Za-z0-9_\-]+)*[.]+([A-Za-z0-9_\-]+)$/
	var matchArray = Form1.txtHyperLinkUrl.value.match(UrlPat);
	
	ErrorDisp = "You are missing following entries.\n";
	ErrorDisp += "----------------------------------------\n";
	if (document.Form1.txtHyperLinkUrl.value=="")
	{
	alert("Hyperlink Url required.");
	document.Form1.txtHyperLinkUrl.focus();
	return false;
	
	}
	 else if (matchArray == null)
	{
	alert("http:// should prefix before URL.");
	document.Form1.txtHyperLinkUrl.focus();
	return false;
	}	
	
	return true;
}

function validateCommunity()
{
	var err, ErrorDisp, UrlPat;
	err="";
	
	ErrorDisp = "You are missing following entries.\n";
	ErrorDisp += "----------------------------------------\n";
	if (document.Form1.txtNewsTitle.value=="")
	{
		alert("Enter Community title.");
		document.Form1.txtNewsTitle.focus();
		return false;
	}
	if(document.Form1.txtNewsTitle.value.charAt(0)==' ')
	{
		alert("No spaces allowed.");
		document.Form1.txtNewsTitle.focus();
		return false;
	}
	if (document.Form1.txtShortDescription.value=="")
	{
		alert("Enter Short Description for Community.");
		document.Form1.txtShortDescription.focus();
		return false;
	}
	if (document.Form1.txtDateNews.value=="")
	{
		alert("Enter Community date.");
		document.Form1.txtDateNews.focus();
		return false;
	
	}
		 	
	if (document.Form1.txtSortOrder.value=="")
	{
		alert("Sort order required.");
		document.Form1.txtSortOrder.focus();
		return false;
	}
	
	if(isNaN(document.Form1.txtSortOrder.value)==true)
	{
		alert("Sort order value should be numeric.");
		document.Form1.txtSortOrder.focus();
		return false;
	
	}
	
	return true;
}
function validateMedia()
{
	var err, ErrorDisp, UrlPat;
	err="";
	
	ErrorDisp = "You are missing following entries.\n";
	ErrorDisp += "----------------------------------------\n";
	if (document.Form1.txtNewsTitle.value=="")
	{
		alert("Enter Media title.");
		document.Form1.txtNewsTitle.focus();
		return false;
	}
	if(document.Form1.txtNewsTitle.value.charAt(0)==' ')
	{
		alert("No spaces allowed.");
		document.Form1.txtNewsTitle.focus();
		return false;
	}
	if (document.Form1.txtShortDescription.value=="")
	{
		alert("Enter Short Description for Media.");
		document.Form1.txtShortDescription.focus();
		return false;
	}
	if (document.Form1.txtDateNews.value=="")
	{
		alert("Enter Media date.");
		document.Form1.txtDateNews.focus();
		return false;
	
	}
		 	
	if (document.Form1.txtSortOrder.value=="")
	{
		alert("Sort order required.");
		document.Form1.txtSortOrder.focus();
		return false;
	}
	
	if(isNaN(document.Form1.txtSortOrder.value)==true)
	{
		alert("Sort order value should be numeric.");
		document.Form1.txtSortOrder.focus();
		return false;
	
	}
	
	return true;
}

function validateNews()
{
	var err, ErrorDisp, UrlPat;
	err="";
	
	ErrorDisp = "You are missing following entries.\n";
	ErrorDisp += "----------------------------------------\n";
	if (document.Form1.txtNewsTitle.value=="")
	{
		alert("Enter News title.");
		document.Form1.txtNewsTitle.focus();
		return false;
	}
	
	if(document.Form1.txtNewsTitle.value.charAt(0)==' ')
	{
		alert("No spaces allowed.");
		document.Form1.txtNewsTitle.focus();
		return false;
	}
	if (document.Form1.txtDateNews.value=="")
	{
		alert("Enter news date.");
		document.Form1.txtDateNews.focus();
		return false;
	
	}
	if (document.Form1.txtNewsDate.value=="")
	{
	
		alert("Enter expiry date.");
		document.Form1.txtNewsDate.focus();
		return false;
	
	}
	 	
	if (document.Form1.txtSortOrder.value=="")
	{
		alert("Sort order required.");
		document.Form1.txtSortOrder.focus();
		return false;
	}
	
	if(isNaN(document.Form1.txtSortOrder.value)==true)
	{
		alert("Sort order value should be numeric.");
		document.Form1.txtSortOrder.focus();
		return false;
	
	}
	
	return true;
}

function ValidateCyclicImageManage()
{	
  
	var err, ErrorDisp, UrlPat;
	err="";
	UrlPat = /^[http:/]+([A-Za-z0-9_\-]+)[.]+([A-Za-z0-9_\-]+)*[.]+([A-Za-z0-9_\-]+)$/
	var matchArray = Form1.txtUrl.value.match(UrlPat);
	
	ErrorDisp = "You are missing following entries.\n";
	ErrorDisp += "----------------------------------------\n";
	if (document.Form1.txtImageFile.value=="")
	{
	alert("Select image.");
		document.Form1.txtImageFile.focus();
		return false;
	}
	if (document.Form1.txtUrl.value=="")
	{
		alert("Hyperlink Url required.");
		document.Form1.txtUrl.focus();
		return false;
	
	}
	 else if (matchArray == null)
	{
	alert("Invalid URL.");
		document.Form1.txtUrl.focus();
		return false;

	}	
	return true;
}
function faqManagevalidation()
{	
	var strd;
	if (document.Form1.cmbCategory.value == "")
	{
		strd=document.Form1.MRF1.value;
		alert(strd);
		document.Form1.txtQuestion.focus();
		return false;
	}
	if(document.Form1.cmbCategory.value.charAt(0)==' ')
	{
		alert("No spaces allowed");
		document.Form1.txtQuestion.focus();
		return false;
	}
	if (document.Form1.txtQuestion.value == "")
	{
		strd=document.Form1.MRF2.value;
		alert(strd);
		document.Form1.txtQuestion.focus();
		return false;
	}
	if(document.Form1.txtQuestion.value.charAt(0)==' ')
	{
		alert("No spaces allowed.");
		document.Form1.txtQuestion.focus();
		return false;
	}
	if (document.Form1.txtSortOrder.value=="")
	{
		strd=document.Form1.MRF4.value;
		alert(strd);
		document.Form1.txtSortOrder.focus();
		return false;
	}
	var anum=/(^\d+$)|(^\d+\.\d+$)/
	if (!anum.test(document.Form1.txtSortOrder.value))
	{
		strd=document.Form1.MRF5.value;
		alert(strd);
		document.Form1.txtSortOrder.focus();
		return false;
	}
	return true;
}

		//for shipping details form

function shippingval()
{
	
	if(document.Form1.txt_firstName.value=="")
	{
		alert("Please enter your first name.");
		document.Form1.txt_firstName.focus();
		return false;
	}
	
	if(document.Form1.txtLastName.value=="")
	{
		alert("Please enter your last name.");
		document.Form1.txtLastName.focus();
		return false;
	}
	
	if(document.Form1.txt_billinfoaddr1.value=="")
	{
		alert("Please enter address1.");
		document.Form1.txt_billinfoaddr1.focus();
		return false;
	}
	
	if(document.Form1.txt_billingPostalcode.value=="")
	{
		alert("Please enter postal code.");
		document.Form1.txt_billingPostalcode.focus();
		return false;
	}
	
	if(document.Form1.txt_billinfocity.value=="")
	{
		alert("Please enter city.");
		document.Form1.txt_billinfocity.focus();
		return false;
	}
	
	if(document.Form1.drp_billinfocountry.value=="")
	{
		alert("Please enter country.");
		document.Form1.drp_billinfocountry.focus();
		return false;
	}
	
	if(document.Form1.txt_Email.value=="")
	{
		alert("Please enter email.");
		document.Form1.txt_Email.focus();
		return false;
	}
	
	var emailPat = /^[A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)*[@][A-Za-z0-9_\-]+([.][A-Za-z0-9_\-]+)+$/
	var matchArray =document.Form1.txt_Email.value.match(emailPat);
	
	if (matchArray == null)
	{
		alert("Invalid Email format.");
		document.Form1.txt_Email.value="";
		document.Form1.txt_Email.focus();
		return false;
	}
	
	if(document.Form1.txt_mobile.value=="")
	{
		alert("Please enter your mobile number.");
		document.Form1.txt_mobile.focus();
		return false;
	}
	
	//if(document.Form1.drp_shippingmethod.value=="")
	//{
		//alert("Please select shipping method.");
		//document.Form1.drp_shippingmethod.focus();
		//return false;
	//}
	
	if(document.Form1.txt_shiptoname.value=="")
	{
		alert("Please enter ship to name.");
		document.Form1.txt_shiptoname.focus();
		return false;
	}
	
	if(document.Form1.txt_address.value=="")
	{
		alert("Please enter address.");
		document.Form1.txt_address.focus();
		return false;
	}
	
	if(document.Form1.txt_city.value=="")
	{
		alert("Please enter city.");
		document.Form1.txt_city.focus();
		return false;
	}
	
	if(document.Form1.txt_pincode.value=="")
	{
		alert("Please enter postal code.");
		document.Form1.txt_pincode.focus();
		return false;
	}
	
	if(document.Form1.drp_Country.value=="")
	{
		alert("Please select country.");
		document.Form1.drp_Country.focus();
		return false;
	}
	
	return true;
}


function ShowAlert()
{
alert("Sorry,Vote Can be Submitted only once!!!");
return false;
}
