function Validate_FrmPContactMail() {
   if (document.FrmPContactMail.txtEmail.value.length < 5)
   {
     alert("Please enter at least 5 characters in the \"Email\" field.");
     document.FrmPContactMail.txtEmail.focus();
     return (false);
   }
   if (document.FrmPContactMail.txtEmail.value.indexOf("@") < 0 || document.FrmPContactMail.txtEmail.value.indexOf(".") < 0)
   {
     alert("An invalid \"Email\" address has been supplied please re-enter.");
     document.FrmPContactMail.txtEmail.focus();
     return (false);
   } 	
   if (document.FrmPContactMail.txtto.selectedIndex == 0){
     alert("Please enter a value for the \"To\" field.");
     document.FrmPContactMail.txtto.focus();
     return (false);
   } 	
   if (document.FrmPContactMail.txtMessage.value.length < 10 || document.FrmPContactMail.txtMessage.value.length > 4000 )
   {
     alert("Please enter between 10 and 4000 characters in the \"Message\" field.");
     document.FrmPContactMail.txtMessage.focus();
     return (false);
   }      
  return (true);
}

function Validate_FrmContactMail() {	
   if (document.FrmContactMail.txtto.selectedIndex == 0){
     alert("Please enter a value for the \"To\" field.");
     document.FrmContactMail.txtto.focus();
     return (false);
   } 	
   if (document.FrmContactMail.txtMessage.value.length < 10 || document.FrmContactMail.txtMessage.value.length > 4000 )
   {
     alert("Please enter between 10 and 4000 characters in the \"Message\" field.");
     document.FrmContactMail.txtMessage.focus();
     return (false);
   }      
  return (true);
}

function Validate_FrmNameSearch() {

  if (document.FrmNameSearch.txtHandle.value.length < 1) 
   {
       	alert("Please enter a value for the \"Username\" field.");
       	document.FrmNameSearch.txtHandle.focus();
       	return (false);
   }
  return (true);
}

function Validate_FrmReports() {

  if (document.FrmReports.lstPeriod.selectedIndex == 0) 
   {
       	alert("Please enter a value for the \"Period\" field.");
       	document.FrmReports.lstPeriod.focus();
       	return (false);
   }     
  if (document.FrmReports.lstYear.selectedIndex == 0) 
   {
       	alert("Please enter a value for the \"Year\" field.");
       	document.FrmReports.lstYear.focus();
       	return (false);
   }     
   document.FrmReports.hdnyear.value=document.FrmReports.lstYear.value;
   document.FrmReports.hdnperiod.value=document.FrmReports.lstPeriod.value;
  return (true);
 }
 
 function Validate_FrmPersonal() {  if (document.FrmPersonal.lstPerson1.selectedIndex == 0) 
    {
        	alert("Please enter a value for the \"Personality\" field.");
        	document.FrmPersonal.lstPerson1.focus();
        	return (false);
    }  if (document.FrmPersonal.lstPhilos1.selectedIndex == 0) 
    {
        	alert("Please enter a value for the \"Philosophy\" field.");
        	document.FrmPersonal.lstPhilos1.focus();
        	return (false);
    }
    
   if (document.FrmPersonal.lstSocial1.selectedIndex == 0) 
    {
        	alert("Please enter a value for the \"Social Group\" field.");
        	document.FrmPersonal.lstSocial1.focus();
        	return (false);
    }
    
   if (document.FrmPersonal.lstGoal1.selectedIndex == 0) 
    {
        	alert("Please enter a value for the \"Goals\" field.");
        	document.FrmPersonal.lstGoal1.focus();
        	return (false);
    }
    
   if (document.FrmPersonal.lstHobby1.selectedIndex == 0) 
    {
        	alert("Please enter a value for the \"Hobbies\" field.");
        	document.FrmPersonal.lstHobby1.focus();
        	return (false);
    }
    
   if (document.FrmPersonal.lstSport1.selectedIndex == 0) 
    {
        	alert("Please enter a value for the \"Sports\" field.");
        	document.FrmPersonal.lstSport1.focus();
        	return (false);
    }
    
   if (document.FrmPersonal.lstMusic1.selectedIndex == 0) 
    {
        	alert("Please enter a value for the \"Music\" field.");
        	document.FrmPersonal.lstMusic1.focus();
        	return (false);
    }
    
   if (document.FrmPersonal.lstFood1.selectedIndex == 0) 
    {
        	alert("Please enter a value for the \"Food\" field.");
        	document.FrmPersonal.lstFood1.focus();
        	return (false);
    }
    
   return (true);
 }
function Validate_FrmSendMail() {
  if (document.FrmSendMail.txtSubject.value.length < 2)
  {
    alert("Please enter at least 2 characters in the  \"Subject\" field.");
    document.FrmSendMail.txtSubject.focus();
    return (false);
  }
  if (document.FrmSendMail.txtMessage.value.length < 20)
  {
    alert("Please enter at least 20 characters in the \"Message\" field.");
    document.FrmSendMail.txtMessage.focus();
    return (false);
  }
 
  return (true);
 }
 
 function Validate_FrmLogin() {
 
   if (document.FrmLogin.txtHandle.value.length < 6)
   {
     alert("Please enter at least 6 characters in the \"Username\" field.");
     document.FrmLogin.txtHandle.focus();
     return (false);
   }
 
   if (document.FrmLogin.txtHandle.value.length > 25)
   {
     alert("Please enter at most 25 characters in the \"Username\" field.");
     document.FrmLogin.txtHandle.focus();
     return (false);
   }
 
   if (document.FrmLogin.txtPassword.value.length < 5)
   {
     alert("Please enter at least 6 characters in the \"Password\" field.");
     document.FrmLogin.txtPassword.focus();
     return (false);
   }
   
   if (document.FrmLogin.txtPassword.value.length > 10)
   {
     alert("Please enter at most 10 characters in the \"Password\" field.");
     document.FrmLogin.txtPassword.focus();
     return (false);
   }
   
   return (true);
 }
 
 function Validate_FrmSendFlirt() {
  if (document.FrmSendFlirt.m_text.selectedIndex == 0) {
   	alert("Please select your message.");
   	document.FrmSendFlirt.m_text.focus();
   	return (false);
   } 	 
 
  return (true);
 }
 
 function Validate_FrmRegister(mode) {
 
   if (mode == 'create') {
	   
	   if (document.FrmRegister.txtHandle.value == "")
	   {
	     alert("Please enter at least 6 characters in the \"Username\" field.");
	     document.FrmRegister.txtHandle.focus();
	     return (false);
	   }
	   if (document.FrmRegister.txtHandle.value.length > 25)
	   {
	     alert("Please enter no more than 25 characters in the \"Username\" field.");
	     document.FrmRegister.txtHandle.focus();
	     return (false);
	   }
	   if (document.FrmRegister.txtHandle.value.length < 6)
	   {
	     alert("Please enter at least 6 characters in the \"Username\" field.");
	     document.FrmRegister.txtHandle.focus();
	     return (false);
	   }
	   var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ1234567890-\t\r\n\f";
	   var checkStr = document.FrmRegister.txtHandle.value;
	   var allValid = true;
	   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 (!allValid)
	   {
	     alert("Please enter only letter, numbers and \"-\" characters in the \"Username\" field.");
	     document.FrmRegister.txtHandle.focus();
	     return (false);
	   }
   }
   if (document.FrmRegister.txtPassword.value.length < 6)
   {
     alert("Please enter between 6-10 characters in the \"Password\" field.");
     document.FrmRegister.Password.focus();
     return (false);
   }
 
   var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ1234567890";
   var checkStr = document.FrmRegister.txtPassword.value;
   var allValid = true;
   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 (!allValid)
   {
     alert("Please enter only letters and numbers in the \"Password\" field.");
     document.FrmRegister.txtPassword.focus();
     return (false);
   }
   
   if (document.FrmRegister.txtPassword.value.length > 10)
    {
      alert("Please enter no more than 10 characters in the \"Password\" field.");
      document.FrmRegister.txtPassword.focus();
      return (false);
   }
   
   if (document.FrmRegister.txtConfirm.value.length < 6)
   {
     alert("Please enter between 6-10 characters in the \"Confirm\" field.");
     document.FrmRegister.Confirm.focus();
     return (false);
   }
 
   var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ1234567890";
   var checkStr = document.FrmRegister.txtConfirm.value;
   var allValid = true;
   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 (!allValid)
   {
     alert("Please enter only letters and numbers in the \"Confirm\" field.");
     document.FrmRegister.txtConfirm.focus();
     return (false);
   }
   
   if (document.FrmRegister.txtConfirm.value.length > 10)
    {
      alert("Please enter no more than 10 characters in the \"Confirm\" field.");
      document.FrmRegister.txtConfirm.focus();
      return (false);
   }
   if (document.FrmRegister.txtPassword.value != document.FrmRegister.txtConfirm.value)
    {
      alert("Password confirmation does not match password - please re-enter");
      document.FrmRegister.txtPassword.focus();
      return (false);
   }	
   if (document.FrmRegister.txtSurname.value.length < 2)
   {
     alert("Please enter at least 2 characters in the \"Last name\" field.");
     document.FrmRegister.txtSurname.focus();
     return (false);
   }
 
   var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ- \t\r\n\f";
   var checkStr = document.FrmRegister.txtSurname.value;
   var allValid = true;
   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 (!allValid)
   {
     alert("Please enter only letter, whitespace and \"-\" characters in the \"Last name\" field.");
     document.FrmRegister.txtSurname.focus();
     return (false);
   }
   
   if (document.FrmRegister.txtSurname.value.length > 25)
    {
      alert("Please enter no more than 25 characters in the \"Last name\" field.");
      document.FrmRegister.txtSurname.focus();
      return (false);
   }
   
   if (document.FrmRegister.txtForename.value.length > 25)
    {
      alert("Please enter no more than 25 characters in the \"First name\" field.");
      document.FrmRegister.txtForename.focus();
      return (false);
   }
   
   if (document.FrmRegister.txtForename.value.length < 2)
   {
     alert("Please enter at least 2 characters in the \"First name\" field.");
     document.FrmRegister.txtForename.focus();
     return (false);
   }
 
   var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ- \t\r\n\f";
   var checkStr = document.FrmRegister.txtForename.value;
   var allValid = true;
   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 (!allValid)
   {
     alert("Please enter only letter, whitespace and \"-\" characters in the \"First name\" field.");
     document.FrmRegister.txtForename.focus();
     return (false);
   }
   
   if (mode=='create' && document.FrmRegister.lstDay.selectedIndex == 0) {
       	alert("Please select your Day of Birth.");
       	document.FrmRegister.lstDay.focus();
       	return (false);
   }   
   
   if (mode=='create' && document.FrmRegister.lstMonth.selectedIndex == 0) {
       	alert("Please select your Month of Birth.");
       	document.FrmRegister.lstMonth.focus();
       	return (false);
   }   
   
 
    if (document.FrmRegister.txtYear.value.length < 2)
     {
       alert("Please enter 2 digits in the \"Year of Birth\" field.");
       document.FrmRegister.txtYear.focus();
       return (false);
     }
   
     if (document.FrmRegister.txtYear.value.length > 2)
     {
       alert("Please enter at most 2 digits in the \"Year of Birth\" field.");
       document.FrmRegister.txtYear.focus();
       return (false);
     }
   
     var checkOK = "0123456789";
     var checkStr = document.FrmRegister.txtYear.value;
     var allValid = true;
     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 (!allValid)
     {
       alert("Please enter only digits in the \"Year of Birth\" field.");
       document.FrmRegister.txtYear.focus();
       return (false);
   }
   
   
   if (mode=='create' && document.FrmRegister.lstSex.selectedIndex == 0) {
     	alert("Please select your gender.");
     	document.FrmRegister.lstSex.focus();
     	return (false);
   }   
   
   if (document.FrmRegister.txtEmail.value.length < 5)
   {
     alert("Please enter at least 5 characters in the \"Email\" field.");
     document.FrmRegister.txtEmail.focus();
     return (false);
   }
 
   if (document.FrmRegister.txtEmail.value.indexOf("@") < 0 || document.FrmRegister.txtEmail.value.indexOf(".") < 0)
   {
     alert("An invalid \"Email\" address has been supplied please re-enter.");
     document.FrmRegister.txtEmail.focus();
     return (false);
   }
   
   if (mode=='create' && document.FrmRegister.chkDisclaimer.checked == false)
   {
      alert("You must read and approve the Terms and Conditions before registering.");
      document.FrmRegister.chkDisclaimer.focus();
      return (false);
   }
  
   return (true);
 }
 
 function Validate_FrmAffiliate() {
 
   if (document.FrmAffiliate.txtUsername.value.length > 12)
   {
     alert("Please enter no more than 12 characters in the \"Username\" field.");
     document.FrmAffiliate.txtUsername.focus();
     return (false);
   }
   
   if (document.FrmAffiliate.txtUsername.value.length < 6)
   {
     alert("Please enter at least 6 characters in the \"Username\" field.");
     document.FrmAffiliate.txtUsername.focus();
     return (false);
   }
 
   var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ1234567890-\t\r\n\f";
   var checkStr = document.FrmAffiliate.txtUsername.value;
   var allValid = true;
   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 (!allValid)
   {
     alert("Please enter only letter, numbers and \"-\" characters in the \"Username\" field.");
     document.FrmAffiliate.txtUsername.focus();
     return (false);
   }
 
   if (document.FrmAffiliate.txtSurname.value.length < 2)
   {
     alert("Please enter at least 2 characters in the \"Last name\" field.");
     document.FrmAffiliate.txtSurname.focus();
     return (false);
   }
 
   var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ- \t\r\n\f";
   var checkStr = document.FrmAffiliate.txtSurname.value;
   var allValid = true;
   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 (!allValid)
   {
     alert("Please enter only letter, whitespace and \"-\" characters in the \"Last name\" field.");
     document.FrmAffiliate.txtSurname.focus();
     return (false);
   }
   
   if (document.FrmAffiliate.txtSurname.value.length > 25)
    {
      alert("Please enter no more than 25 characters in the \"Last name\" field.");
      document.FrmAffiliate.txtSurname.focus();
      return (false);
   }
   
   if (document.FrmAffiliate.txtForename.value.length > 25)
    {
      alert("Please enter no more than 25 characters in the \"First name\" field.");
      document.FrmAffiliate.txtForename.focus();
      return (false);
   }
   
   if (document.FrmAffiliate.txtForename.value.length < 2)
   {
     alert("Please enter at least 2 characters in the \"First name\" field.");
     document.FrmAffiliate.txtForename.focus();
     return (false);
   }
 
   var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ- \t\r\n\f";
   var checkStr = document.FrmAffiliate.txtForename.value;
   var allValid = true;
   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 (!allValid)
   {
     alert("Please enter only letter, whitespace and \"-\" characters in the \"First name\" field.");
     document.FrmAffiliate.txtForename.focus();
     return (false);
   }
   
   if (document.FrmAffiliate.txtBusiness.value == "")
   {
     alert("Please enter a value for the \"Business name\" field.");
     document.FrmAffiliate.txtBusiness.focus();
     return (false);
   }
 
   if (document.FrmAffiliate.txtAddress.value == "")
   {
     alert("Please enter a value for the \"Address\" field.");
     document.FrmAffiliate.txtAddress.focus();
     return (false);
   }
 
   if (document.FrmAffiliate.txtStreet.value == "")
   {
     alert("Please enter a value for the \"Street\" field.");
     document.FrmAffiliate.txtStreet.focus();
     return (false);
   }
 
   if (document.FrmAffiliate.txtTown.value == "")
   {
     alert("Please enter a value for the \"Town\" field.");
     document.FrmAffiliate.txtTown.focus();
     return (false);
   }
 
   if (document.FrmAffiliate.txtState.value == "")
   {
     alert("Please enter a value for the \"State\" field.");
     document.FrmAffiliate.txtState.focus();
     return (false);
   }
 
   if (document.FrmAffiliate.txtZip.value == "")
   {
     alert("Please enter a value for the \"Zip\" field.");
     document.FrmAffiliate.txtZip.focus();
     return (false);
   }
 
   if (document.FrmAffiliate.lstCountry.selectedIndex == 0) 
    {
        	alert("Please enter a value for the \"Country\" field.");
        	document.FrmAffiliate.lstCountry.focus();
        	return (false);
    }     
 
   if (document.FrmAffiliate.txtEmail.value.length < 5)
   {
     alert("Please enter at least 5 characters in the \"Email\" field.");
     document.FrmAffiliate.txtEmail.focus();
     return (false);
   }
 
   if (document.FrmAffiliate.txtEmail.value.indexOf("@") < 0 || document.FrmAffiliate.txtEmail.value.indexOf(".") < 0)
   {
     alert("An invalid \"Email\" address has been supplied please re-enter.");
     document.FrmAffiliate.txtEmail.focus();
     return (false);
   }
  
    if (document.FrmAffiliate.txtWebsite.value == "http://")
    {
      alert("Please enter a value for the \"Website\" field.");
      document.FrmAffiliate.txtWebsite.focus();
      return (false);
    }
  
 
    if (document.FrmAffiliate.txtPayable.value == "")
    {
      alert("Please enter a value for the \"Payable\" field.");
      document.FrmAffiliate.txtPayable.focus();
      return (false);
    }
  
 
   return (true);
 }
 
 function Validate_FrmAdvert(mode) {  
 
   if (document.FrmAdvert.lstCountry.value == '0') 
    {
	alert("Please enter a value for the \"Country\" field.");
	document.FrmAdvert.lstCountry.focus();
	return (false);
    }     
  
   if (document.FrmAdvert.txtLocation.value.length < 3)
     {
       alert("Please enter at least 3 characters in the \"Location\" field.");
       document.FrmAdvert.txtLocation.focus();
       return (false);
     }
   
   if (document.FrmAdvert.txtLocation.value.length > 25)
     {
       alert("Please enter at most 25 characters in the \"Location\" field.");
       document.FrmAdvert.txtLocation.focus();
       return (false);
     }
   
    
   if (mode=='create' && document.FrmAdvert.lstSeeking.selectedIndex == 0) {
        	alert("Please enter a value for the \"Seeking\" field.");
        	document.FrmAdvert.lstSeeking.focus();
        	return (false);
   }
   
   if (mode=='create' && document.FrmAdvert.lstBodyType.selectedIndex == 0) {
        	alert("Please enter a value for the \"Body Type\" field.");
        	document.FrmAdvert.lstBodyType.focus();
        	return (false);
   }   
   
   
   if (mode=='create' && document.FrmAdvert.lstHeight.selectedIndex == 0) {
        	alert("Please enter a value for the \"Height\" field.");
        	document.FrmAdvert.lstHeight.focus();
        	return (false);
   }   
   
   if (mode=='create' && document.FrmAdvert.lstChildren.selectedIndex == 0) {
        	alert("Please enter a value for the \"Children\" field.");
        	document.FrmAdvert.lstChildren.focus();
        	return (false);
   }
   
     
   if (mode=='create' && document.FrmAdvert.lstSmoker.selectedIndex == 0) {
          	alert("Please enter a value for the \"Smoker\" field.");
          	document.FrmAdvert.lstSmoker.focus();
          	return (false);
     }     
   if (mode=='create' && document.FrmAdvert.lstReligion.selectedIndex == 0) {
        	alert("Please enter a value for the \"Religion\" field.");
        	document.FrmAdvert.lstReligion.focus();
        	return (false);
   }  
   
   if (mode=='create' && document.FrmAdvert.lstMarital.selectedIndex == 0) {
        	alert("Please enter a value for the \"Marital Status\" field.");
        	document.FrmAdvert.lstMarital.focus();
        	return (false);
   }
     
   if (mode=='create' && document.FrmAdvert.lstEthnicity.selectedIndex == 0) {
        	alert("Please enter a value for the \"Ethnicity\" field.");
        	document.FrmAdvert.lstEthnicity.focus();
        	return (false);
   }
   
   if (mode=='create' && document.FrmAdvert.lstEducation.selectedIndex == 0) {
        	alert("Please enter a value for the \"Education\" field.");
        	document.FrmAdvert.lstEducation.focus();
        	return (false);
   }    
   
   if (mode=='create' && document.FrmAdvert.lstEmployment.selectedIndex == 0) {
        	alert("Please enter a value for the \"Employment\" field.");
        	document.FrmAdvert.lstEmployment.focus();
        	return (false);
   }
   if (mode=='create' && document.FrmAdvert.lstIncome.selectedIndex == 0) {
        	alert("Please enter a value for the \"Income\" field.");
        	document.FrmAdvert.lstIncome.focus();
        	return (false);
   }
   if (mode=='create' && document.FrmAdvert.lstStarSign.selectedIndex == 0) {
        	alert("Please enter a value for the \"Star Sign\" field.");
        	document.FrmAdvert.lstStarSign.focus();
        	return (false);
   }  
   if (mode=='create' && document.FrmAdvert.lstNationality.selectedIndex == 0) {
        	alert("Please enter a value for the \"Nationality\" field.");
        	document.FrmAdvert.lstNationality.focus();
        	return (false);
   }     
   if (mode=='create' && document.FrmAdvert.lstReligiousBeliefs.selectedIndex == 0) {
        	alert("Please enter a value for the \"Religious beliefs\" field.");
        	document.FrmAdvert.lstReligiousBeliefs.focus();
        	return (false);
   }
   if (mode=='create' && document.FrmAdvert.lstDrink.selectedIndex == 0) {
        	alert("Please enter a value for the \"Drink\" field.");
        	document.FrmAdvert.lstDrink.focus();
        	return (false);
   }   
   if (document.FrmAdvert.txtFavBook.value.length < 3)
     {
       alert("Please enter at least 3 characters in the \"Favourite Books\" field or enter \"none\".");
       document.FrmAdvert.txtFavBook.focus();
       return (false);
     }
   if (document.FrmAdvert.txtFavFilm.value.length < 3)
     {
       alert("Please enter at least 3 characters in the \"Favourite Films\" field or enter \"none\".");
       document.FrmAdvert.txtFavFilm.focus();
       return (false);
     }	
    if (document.FrmAdvert.txtFavTV.value.length < 3)
     {
       alert("Please enter at least 3 characters in the \"Favourite TV Show\" field or enter \"none\".");
       document.FrmAdvert.txtFavTV.focus();
       return (false);
     }
   if (mode=='create' && document.FrmAdvert.lstLiving.selectedIndex == 0) {
        	alert("Please enter a value for the \"Living\" field.");
        	document.FrmAdvert.lstLiving.focus();
        	return (false);
   }		 
   if (mode=='create' && document.FrmAdvert.lstTurban.selectedIndex == 0) {
        	alert("Please enter a value for the \"Headscarf/Turban\" field.");
        	document.FrmAdvert.lstTurban.focus();
        	return (false);
   }		 
   if (mode=='create' && document.FrmAdvert.lstHairstyle.selectedIndex == 0) {
        	alert("Please enter a value for the \"Hair style\" field.");
        	document.FrmAdvert.lstHairstyle.focus();
        	return (false);
   }		 
   if (mode=='create' && document.FrmAdvert.lstComplexion.selectedIndex == 0) {
        	alert("Please enter a value for the \"Complexion\" field.");
        	document.FrmAdvert.lstComplexion.focus();
        	return (false);
   }		 
   if (mode=='create' && document.FrmAdvert.lstLanguages1.selectedIndex == 0) {
        	alert("Please enter a value for the \"Languages\" field.");
        	document.FrmAdvert.lstLanguages1.focus();
        	return (false);
   }	 
   if (document.FrmAdvert.chkSeekmen.checked == false && document.FrmAdvert.chkSeekwmn.checked == false && document.FrmAdvert.chkSeekcpl.checked == false)
   {
     alert("Please select the genders you are \"Seeking\".");
     document.FrmAdvert.chkSeekmen.focus();
     return (false);
   }
   
   
   if (document.FrmAdvert.txtTitle.value.length < 5 || document.FrmAdvert.txtTitle.value.length > 30)
   {
       alert("Please enter at between 5 and 30 characters in the \"Profile Header\" field.");
       document.FrmAdvert.txtTitle.focus();
       return (false);
   }
   
   if (document.FrmAdvert.txtComment.value.length < 120 || document.FrmAdvert.txtComment.value.length > 4000 )
   {
     alert("Please enter between 120 and 4000 characters in the \"About me\" field.");
     document.FrmAdvert.txtComment.focus();
     return (false);
   }  
   
   return (true);
 }

function delete_alert() {
	if (window.confirm("This will remove you from the system, including any profiles, mail and hotlist. Are you sure?")) {
		return true;
	} else {
		return false;
	}
}
function delete_alert2() {
	if (window.confirm("This will remove your profile from the system. Are you sure?")) {
		return true;
	} else {
		return false;
	}
}
function delete_alert3() {
	if (window.confirm("This will remove the profile from the system. Are you sure?")) {
		return true;
	} else {
		return false;
	}
}
function delete_alert4() {
	if (window.confirm("This will remove the member from the system. Are you sure?")) {
		return true;
	} else {
		return false;
	}
}
function skip_alert() {
	if (window.confirm("Do you wish to skip this part of the profile?")) {
		return true;
	} else {
		return false;
	}
}
function MDM_openWindow(theURL,winName,features) {
	var _W=window.open(theURL,winName,features);
	_W.focus();
	_W.moveTo(50,50);
}
function selected(oRow){ oRow.style.backgroundColor='#FFFFE6'; } 
function deselected(oRow){ oRow.style.backgroundColor='#DCE8FC'; } 

function cupid_alert() {
	if (window.confirm("Are you sure you wish to run this process? Please check the documentation if unsure.")) {
		return true;
	} else {
		return false;
	}
}