function textCounter(field,cntfield,maxlimit) {
if (field.value.length > maxlimit)  
field.value = field.value.substring(0, maxlimit);
else
cntfield.value = maxlimit - field.value.length;
}
function sendmail(){
	theForm=document.form1
var reason = "";

  reason += validateEmpty("mail subject",theForm.txtsubject);
  if (reason != "") {
    alert("Some fields need correction:\n" + reason);
    return false;
  }
	theForm.action="entrepreneurs/conversations/add.php";
	theForm.submit();
}
function isendmail(){
	theForm=document.form1
var reason = "";

  reason += validateEmpty("mail subject",theForm.txtsubject);
  if (reason != "") {
    alert("Some fields need correction:\n" + reason);
    return false;
  }
	theForm.action="investor/conversations/add.php";
	theForm.submit();
}
function contactmail(){
	theForm=document.form1
var reason = "";

  reason += validateEmpty("mail subject",theForm.txtsubject);
  if (reason != "") {
    alert("Some fields need correction:\n" + reason);
    return false;
  }
	theForm.action="investor/conversations/add.php";
	theForm.submit();
}
function deletemail(id){
	theForm=document.form1
if(confirm("Are you sure? You want to delete this message?")){
	theForm.action="entrepreneurs/conversations/add.php?page=delete&id="+id;
	theForm.submit();
}
}
function ideletemail(id){
	theForm=document.form1
if(confirm("Are you sure? You want to delete this message?")){
	theForm.action="investor/conversations/add.php?page=delete&id="+id;
	theForm.submit();
}
}
function regnow(){
theForm=document.form1
var reason = "";
  reason += validateEmpty("first name",theForm.txtFname);
  reason += validateEmpty("last name",theForm.txtLastname);
  reason += validateEmpty("mobile",theForm.txtMobile);
  reason += validateEmpty("home phone",theForm.txtHomePhone);
  reason += validateEmpty("post code",theForm.txtPostcode);
  reason += validateEmpty("loan amount",theForm.txtLoanAmount);
  
  	if (reason != "") {
    alert("Some fields need correction:\n" + reason);
    return false;
  	}
	theForm.action="expert_team/apply_now/add.php?page=step2&mode=team";
	theForm.submit();
}
function delete_hotlist(id){
theForm=document.form1
	if(confirm("Are you sure? You want to delete this from your hot list?")){
		theForm.action="investor/hot_list/add.php?page=delete&id="+id;
		theForm.submit();
	}
}
function callmeback(){
theForm=document.form1
var reason = "";
  reason += validateEmpty("first name",theForm.txtFname);
  reason += validateEmpty("address",theForm.txtAddress);
  reason += validateEmpty("phone number",theForm.txtPhone);
  reason += validateEmpty("mobile",theForm.txtMobile);
  reason += validateEmpty("email",theForm.txtEmail);
  reason += validateEmpty("how did you hear about us",theForm.txtHearAbout);
  
  if (reason != "") {
    alert("Some fields need correction:\n" + reason);
    return false;
  }
theForm.action="specialist_finance/call_me_back/add.php";
theForm.submit();
}

function regnow1(){
theForm=document.form1
var reason = "";
  reason += validateEmpty("first name",theForm.txtFname);
  reason += validateEmpty("last name",theForm.txtLastname);
  reason += validateEmpty("email",theForm.txtEmail);
  reason += validateEmpty("password",theForm.txtPassword);
  reason += validateEmpty("confirm password",theForm.txtrePassword);
  reason += validateEmpty("mobile",theForm.txtMobile);
  reason += validateEmpty("home phone",theForm.txtHomePhone);
  reason += validateEmpty("post code",theForm.txtPostcode);
  reason += validateEmpty("loan amount",theForm.txtLoanAmount);
  
  	if (reason != "") {
    alert("Some fields need correction:\n" + reason);
    return false;
  	}  	
	theForm.action="specialist_finance/apply_now/add.php?page=step2&mode=finance";
	theForm.submit();
}

function pvalidate(){
theForm=document.form1
var reason = "";
  reason += validateEmpty("title of your Business Proposal",theForm.txtTitle);
  reason += validateEmpty("investment summary",theForm.txtSummary);
  reason += validateEmpty("geographical",theForm.geographical);
  reason += validateEmpty("industries",theForm.industries);
  
  
  if (reason != "") {
    alert("Some fields need correction:\n" + reason);
    return false;
  }

theForm.action="entrepreneurs/proposal/add.php?page=title";
theForm.submit();
return true;
}

function marketDetails(){
theForm=document.form1

theForm.action="entrepreneurs/proposal/add.php?page=market";
theForm.submit();
return true;
}

function investmentDetails(){
theForm=document.form1

theForm.action="entrepreneurs/proposal/add.php?page=investment";
theForm.submit();
return true;
}

function ivalidate(){
	theForm=document.form1
	var reason = "";

  reason += validatePassword(theForm.txtpassword);
  reason += validateEmail(theForm.txtemail);
  reason += validatePhone(theForm.txttel1);
  reason += validateSame(theForm.txtpassword,theForm.txtconpass);
  reason += validateEmpty("first name",theForm.txtfname);
  reason += validateEmpty("last name",theForm.txtlname);
  reason += validateEmpty("address",theForm.address);
  reason += validateEmpty("telephone",theForm.txttel1);
  reason += validateEmpty("email1",theForm.txtemail1);
  reason += validateEmail(theForm.txtemail1);
  reason += validateEmpty("city",theForm.txtcity);
  reason += validateEmpty("county",theForm.txtcounty);
  reason += validateEmpty("post code",theForm.txtpost);
  reason += validateEmpty("country",theForm.country);
  reason += validateEmpty("total available for investment from",theForm.txtfrom);
  reason += validateEmpty("total available for investment to",theForm.txtto);
  reason += validatecombo("Stage of Business",theForm.selectstage); 
  reason += validatecombo("investment industries",theForm.industries); 
  reason += validatecombo("involvement",theForm.selectinvolvement);
  reason += validatecombo("syndication",theForm.selectsyndication);  
  reason += validatecombo("geographical",theForm.geographical);  
  reason += validateEmpty("overview of thesort of business",theForm.txtoverview);
  reason += validatecombo("past investments made",theForm.selectinvestmentsmade);  
  reason += validatecombo("experience",theForm.selectexperience);   
  
  if (reason != "") {
    alert("Some fields need correction:\n" + reason);
    return false;
  }
 if(isNaN(document.form1.txtfrom.value))
	{
	alert('Please entre number');	
	document.form1.txtfrom.focus();
	return
	}
  if(document.form1.txtfrom.value < 25000)
	{
	alert('Please make minimum payment of 25,000');	
	document.form1.txtfrom.focus();
	return
	}
	
  if(isNaN(document.form1.txtto.value))
	{
	alert('Please entre number');	
	document.form1.txtto.focus();
	return
	}
  if(document.form1.txtto.value < 50000)
	{
	alert('Please make minimum payment of 50,000');	
	document.form1.txtto.focus();
	return
	}
	
  if (document.form1.txtto.value < document.form1.txtfrom.value) 
	  {
	  alert("Please enter valid from an to amount!");
	  return false;
	  }
	 
  theForm.action="investor/register/add.php";
  theForm.submit();
}

function updateprofile(){
	theForm=document.form1
	var reason = "";

  reason += validateEmail(theForm.txtemail);
  reason += validatePhone(theForm.txttel1);
  reason += validateSame(theForm.txtpassword,theForm.txtconpass);
  reason += validateEmpty("first name",theForm.txtfname);
  reason += validateEmpty("last name",theForm.txtlname);
  reason += validateEmpty("address",theForm.address);
  reason += validateEmpty("telephone",theForm.txttel1);
  reason += validateEmpty("email1",theForm.txtemail1);
  reason += validateEmail(theForm.txtemail1);
  reason += validateEmpty("city",theForm.txtcity);
  reason += validateEmpty("county",theForm.txtcounty);
  reason += validateEmpty("post code",theForm.txtpost);
  reason += validateEmpty("country",theForm.country);
  
  
  if (reason != "") {
    alert("Some fields need correction:\n" + reason);
    return false;
  }
  theForm.action="entrepreneurs/profile/add.php";
  theForm.submit();
}
function updateiprofile(){
	theForm=document.form1
	var reason = "";

  reason += validateEmail(theForm.txtemail);
  reason += validatePhone(theForm.txttel1);
  reason += validateSame(theForm.txtpassword,theForm.txtconpass);
  reason += validateEmpty("first name",theForm.txtfname);
  reason += validateEmpty("last name",theForm.txtlname);
  reason += validateEmpty("address",theForm.address);
  reason += validateEmpty("telephone",theForm.txttel1);
  reason += validateEmpty("email1",theForm.txtemail1);
  reason += validateEmail(theForm.txtemail1);
  reason += validateEmpty("city",theForm.txtcity);
  reason += validateEmpty("county",theForm.txtcounty);
  reason += validateEmpty("post code",theForm.txtpost);
  reason += validateEmpty("country",theForm.country);
  
  
  if (reason != "") {
    alert("Some fields need correction:\n" + reason);
    return false;
  }
  theForm.action="investor/profile/add.php";
  theForm.submit();
}
function IsNumeric(strString)
   //  check for valid numeric strings	
   {
   var strValidChars = "0123456789.-";
   var strChar;
   var blnResult = true;

   if (strString.length == 0) return false;

   //  test strString consists of valid characters listed above
   for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
         blnResult = false;
         }
      }
   return blnResult;
   }

function validateFormOnSubmit(theForm) {
var reason = "";

  reason += validatePassword(theForm.txtpassword);
  reason += validateEmail(theForm.txtemail);
  reason += validateex(theForm.chk);
  reason += validatePhone(theForm.txttel1);
  reason += validateEmpty("password",theForm.txtpassword);
  reason += validateEmpty("confirm password",theForm.txtconpass);
  reason += validateSame(theForm.txtpassword,theForm.txtconpass);
  reason += validateEmpty("Title",theForm.txtTitle);
  reason += validateEmpty("First name",theForm.txtfname);
  reason += validateEmpty("Last name",theForm.txtlname);
  reason += validateEmpty("Company",theForm.txtCompany);
  reason += validateEmpty("Address",theForm.address);
  reason += validateEmpty("Telephone",theForm.txttel1);
  reason += validateEmpty("Email1",theForm.txtemail1);
  reason += validateEmail(theForm.txtemail1);
  reason += validateEmpty("Hear about us",theForm.txtheaAbout);  
  reason += validatecombo("Stage of business",theForm.listStage);  
  reason += validatecombo("Sector",theForm.listSector);    
  reason += validatecombo("Funding Sought",theForm.listSought);       
  reason += validateEmpty("Post code",theForm.txtpost);
  reason += validateEmpty("Country",theForm.txtCounty);
  reason += validateEmpty("Words",theForm.recaptcha_response_field);
  
  
  if (reason != "") {
    alert("Some fields need correction:\n" + reason);
    return false;
  }

  //alert("All fields are filled correctly");
  return true;
}
function validateex(fld) {
    var error = "";
 
    if (fld.value.length == 0) {
        fld.style.background = 'Yellow'; 
        error = "Sorry!!! Email address already registered with us. Please try with a new email.\n"
    } else {
        fld.style.background = 'White';
    }
    return error;  
}
function validatecombo(val, fld) {
    var error = "";
 
    if (fld.selectedIndex== 0) {
        fld.style.background = 'Yellow'; 
       error = "The "+ val +" field has not been selected in.\n"
    } else {
        fld.style.background = 'White';
    }
    return error;  
}

function validateEmpty(val,fld) {
    var error = "";
 
    if (fld.value.length == 0) {
        fld.style.background = 'Yellow'; 
        error = "The "+ val +" field has not been filled in.\n"
    } else {
        fld.style.background = 'White';
    }
    return error;  
}
function validateSame(fld1,fld2) {
    var error = "";
    if (fld1.value.length != fld2.value.length) {
        fld1.style.background = 'Yellow'; 
		fld2.style.background = 'Yellow'; 
        error = "Both password should be matched.\n"
    } else {
        fld1.style.background = 'White'; 
		fld2.style.background = 'White';  
    }
    return error;  
}
function validatePassword(fld) {
    var error = "";
    var illegalChars = /[\W_]/; // allow only letters and numbers 
 
    if (fld.value == "") {
        fld.style.background = 'Yellow';
        error = "You didn't enter a password.\n";
    } else if ((fld.value.length < 7) || (fld.value.length > 15)) {
        error = "The password is the wrong length. \n";
        fld.style.background = 'Yellow';
    } else if (illegalChars.test(fld.value)) {
        error = "The password contains illegal characters.\n";
        fld.style.background = 'Yellow';
    } else if (!((fld.value.search(/(a-z)+/)) && (fld.value.search(/(0-9)+/)))) {
        error = "The password must contain at least one numeral.\n";
        fld.style.background = 'Yellow';
    } else {
        fld.style.background = 'White';
    }
   return error;
}  
function trim(s)
{
  return s.replace(/^\s+|\s+$/, '');
}
function validateEmail(fld) {
    var error="";
    var tfld = trim(fld.value);                        // value of field with whitespace trimmed off
    var emailFilter = /^[^@]+@[^@.]+\.[^@]*\w\w$/ ;
    var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/ ;
   
    if (fld.value == "") {
        fld.style.background = 'Yellow';
        error = "You didn't enter an email address.\n";
    } else if (!emailFilter.test(tfld)) {              //test email for illegal characters
        fld.style.background = 'Yellow';
        error = "Please enter a valid email address.\n";
    } else if (fld.value.match(illegalChars)) {
        fld.style.background = 'Yellow';
        error = "The email address contains illegal characters.\n";
    } else {
        fld.style.background = 'White';
    }
    return error;
}
function validatePhone(fld) {
    var error = "";
    var stripped = fld.value.replace(/[\(\)\.\-\ ]/g, '');    

   if (fld.value == "") {
        error = "You didn't enter a phone number.\n";
        fld.style.background = 'Yellow';
    } else if (isNaN(parseInt(stripped))) {
        error = "The phone number contains illegal characters.\n";
        fld.style.background = 'Yellow';
    } else if (!(stripped.length < 25)) {
        error = "The phone number is the wrong length. Make sure you included an area code.\n";
        fld.style.background = 'Yellow';
    }
    return error;
}


var xmlhttp

function showHint(str,p)
{
if (str.length==0)
  {
  document.getElementById("txtvHint").innerHTML="";
  return;
  }
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("Your browser does not support XMLHTTP!");
  return;
  }
var url="getemail.php";
url=url+"?q="+str;
url=url+"&p="+p;
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=statevChanged;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}

function statevChanged()
{
if (xmlhttp.readyState==4)
  {
  document.getElementById("txtvHint").innerHTML=xmlhttp.responseText;
  }
}

function stateChanged()
{
if (xmlhttp.readyState==4)
  {
  document.getElementById("txtvHint").innerHTML=xmlhttp.responseText;
  }
}
function showcapital(str)
{
if (str.length==0)
  {
  document.getElementById("spcapital").innerHTML="";
  return;
  }
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("Your browser does not support XMLHTTP!");
  return;
  }
var url="capital.php";
url=url+"?q="+str;
url=url+"&mode=less";
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=stateChanged;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}
function showcapitals(str1,str2,str3,str4)
{
if (str1.length==0)
  {
  document.getElementById("spcapital").innerHTML="";
  return;
  }
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("Your browser does not support XMLHTTP!");
  return;
  }
var url="capital.php";
url=url+"?q1="+str1;
url=url+"&q2="+str2;
url=url+"&q3="+str3;
url=url+"&q4="+str4;
url=url+"&mode=more";
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=stateChanged;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}
function stateChanged()
{
if (xmlhttp.readyState==4)
  {
  document.getElementById("spcapital").innerHTML=xmlhttp.responseText;
  }
}


function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}

function uppercase()
{
document.form1.txtsig.value = document.form1.txtsig.value.toUpperCase();
}
function evalidate(){
	
	if(document.form1.txtsig.value==""){
		alert("Please enter your signature");
		document.form1.txtsig.focus();
		return;
	}
	
	if(document.form1.agree1.checked==false){
	alert("Please read and select 'I agree to the Terms and Conditions' agreement!");
	return ;
	}
	
	/*if(document.form1.statement1.checked==false){
	alert("Please read and select 'Statement for Certified High Net Worth Individual' agreement!");
	return ;
	}
	
	if(document.form1.statement2.checked==false){
	alert("Please read and select Statement for Self-Certified Sophisticated Individual agreement!");
	return ;
	}*/
	
	document.form1.action="entrepreneurs/register/add.php?page=esave";
	document.form1.submit();
}

function iivalidate(){
	
	if(document.form1.txtsig.value==""){
		alert("Please enter your signature");
		document.form1.txtsig.focus();
		return;
	}
	if(document.form1.agree1.checked==false){
	alert("Please read and select 'I agree to the Terms and Conditions' agreement!");
	return ;
	}
	
	if(document.form1.statement1.checked==false){
	alert("Please read and select 'Statement for Certified High Net Worth Individual' agreement!");
	return ;
	}
	
	if(document.form1.statement2.checked==false){
	alert("Please read and select Statement for Self-Certified Sophisticated Individual agreement!");
	return ;
	}
		
	document.form1.action="investor/register/add.php?page=esave";
	document.form1.submit();
}
function topelogin(){
	if(document.form1.txttUserName.value==""){
			alert("Please enter your email");
			document.form1.txttUserName.focus();
			return;
	}
	if (document.form1.txttUserName.value!= "")
  {
  var mail1=document.form1.txttUserName.value;
  var i1 = mail1.indexOf('@');
  var i2 = mail1.lastIndexOf('@');
  var i3 = mail1.indexOf('.');
  var i4 =(i1-i3);

  if (mail1.length<=5)
  {
  alert("Your E-mail address is too small");
  document.form1.txttUserName.focus();
  return ;
 } 
  
    if(i1==-1)
 {
  alert(" E-mail address must have a '@' ");
  document.form1.txttUserName.focus();
 return ;
  }
  if(i1<2)
 {
  alert(" E-mail address invalid ");
  document.form1.txttUserName.focus();
 return;
   }
 
    if(i3==-1)
  {
  alert(" E-mail address must have a '.' ");
  document.form1.txttUserName.focus();
   document.form1.txttUserName.focus();
 return 
  }
 ch = mail1.charAt(mail1.length-1); 
 if (ch==".")
  {
    alert(" E-mail address cannot contain '.' in end");
    document.form1.txttUserName.focus();
    return 
 }
if(i1!=i2)
{
 alert(" E-mail address cannot contain two '@' signs");
 document.form1.txttUserName.focus();
 return
  }
 arr=mail1.split("@"); 
 var i5=arr[1].indexOf('.'); 
 if(i5==-1)
 {
 alert(" E-mail address must have a '.' after @ sign ");
 document.form1.txttUserName.focus();
 return 
 }
 
 var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ0123456789-_.@";  var checkStr = document.form1.txttUserName.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, digit and \"@\" characters in the \"E-mail\" field.");
    document.form1.txttUserName.focus();
    return 
  }
}
	if(document.form1.txttPassword.value==""){
			alert("Please enter password");
			document.form1.txttPassword.focus();
			return;
	}
	document.form1.action="entrepreneurs/login/toplogin.php?mode=entrepreneur";
	document.form1.submit();
}
function elogin(){
	if(document.form1.txteUserName.value==""){
			alert("Please enter your email");
			document.form1.txteUserName.focus();
			return;
	}
	if (document.form1.txteUserName.value!= "")
  {
  var mail1=document.form1.txteUserName.value;
  var i1 = mail1.indexOf('@');
  var i2 = mail1.lastIndexOf('@');
  var i3 = mail1.indexOf('.');
  var i4 =(i1-i3);

  if (mail1.length<=5)
  {
  alert("Your E-mail address is too small");
  document.form1.txteUserName.focus();
  return ;
 } 
  
    if(i1==-1)
 {
  alert(" E-mail address must have a '@' ");
  document.form1.txteUserName.focus();
 return ;
  }
  if(i1<2)
 {
  alert(" E-mail address invalid ");
  document.form1.txteUserName.focus();
 return;
   }
 
    if(i3==-1)
  {
  alert(" E-mail address must have a '.' ");
  document.form1.txteUserName.focus();
   document.form1.txteUserName.focus();
 return 
  }
 ch = mail1.charAt(mail1.length-1); 
 if (ch==".")
  {
    alert(" E-mail address cannot contain '.' in end");
    document.form1.txteUserName.focus();
    return 
 }
if(i1!=i2)
{
 alert(" E-mail address cannot contain two '@' signs");
 document.form1.txteUserName.focus();
 return
  }
 arr=mail1.split("@"); 
 var i5=arr[1].indexOf('.'); 
 if(i5==-1)
 {
 alert(" E-mail address must have a '.' after @ sign ");
 document.form1.txteUserName.focus();
 return 
 }
 
 var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ0123456789-_.@";  var checkStr = document.form1.txteUserName.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, digit and \"@\" characters in the \"E-mail\" field.");
    document.form1.email.focus();
    return 
  }
}
	if(document.form1.txtePassword.value==""){
			alert("Please enter password");
			document.form1.txtePassword.focus();
			return;
	}
	document.form1.action="entrepreneurs/login/login.php?mode=entrepreneur";
	document.form1.submit();
}

function ilogin(){
	if(document.form1.txteUserName.value==""){
			alert("Please enter your email");
			document.form1.txteUserName.focus();
			return;
	}
	if (document.form1.txteUserName.value!= "")
  {
  var mail1=document.form1.txteUserName.value;
  var i1 = mail1.indexOf('@');
  var i2 = mail1.lastIndexOf('@');
  var i3 = mail1.indexOf('.');
  var i4 =(i1-i3);

  if (mail1.length<=5)
  {
  alert("Your E-mail address is too small");
  document.form1.txteUserName.focus();
  return ;
 } 
  
    if(i1==-1)
 {
  alert(" E-mail address must have a '@' ");
  document.form1.txteUserName.focus();
 return ;
  }
  if(i1<2)
 {
  alert(" E-mail address invalid ");
  document.form1.txteUserName.focus();
 return;
   }
 
    if(i3==-1)
  {
  alert(" E-mail address must have a '.' ");
  document.form1.txteUserName.focus();
   document.form1.txteUserName.focus();
 return 
  }
 ch = mail1.charAt(mail1.length-1); 
 if (ch==".")
  {
    alert(" E-mail address cannot contain '.' in end");
    document.form1.txteUserName.focus();
    return 
 }
if(i1!=i2)
{
 alert(" E-mail address cannot contain two '@' signs");
 document.form1.txteUserName.focus();
 return
  }
 arr=mail1.split("@"); 
 var i5=arr[1].indexOf('.'); 
 if(i5==-1)
 {
 alert(" E-mail address must have a '.' after @ sign ");
 document.form1.txteUserName.focus();
 return 
 }
 
 var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ0123456789-_.@";  var checkStr = document.form1.txteUserName.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, digit and \"@\" characters in the \"E-mail\" field.");
    document.form1.email.focus();
    return 
  }
}
	if(document.form1.txtePassword.value==""){
			alert("Please enter password");
			document.form1.txtePassword.focus();
			return;
	}
	document.form1.action="investor/login/login.php?mode=investor";
	document.form1.submit();
}
function topinterlogin(){
	if(document.form1.txttiUserName.value==""){
			alert("Please enter your email");
			document.form1.txttiUserName.focus();
			return;
	}
	if (document.form1.txttiUserName.value!= "")
  {
  var mail1=document.form1.txttiUserName.value;
  var i1 = mail1.indexOf('@');
  var i2 = mail1.lastIndexOf('@');
  var i3 = mail1.indexOf('.');
  var i4 =(i1-i3);

  if (mail1.length<=5)
  {
  alert("Your E-mail address is too small");
  document.form1.txttiUserName.focus();
  return ;
 } 
  
    if(i1==-1)
 {
  alert(" E-mail address must have a '@' ");
  document.form1.txttiUserName.focus();
 return ;
  }
  if(i1<2)
 {
  alert(" E-mail address invalid ");
  document.form1.txttiUserName.focus();
 return;
   }
 
    if(i3==-1)
  {
  alert(" E-mail address must have a '.' ");
  document.form1.txttiUserName.focus();
   document.form1.txttiUserName.focus();
 return 
  }
 ch = mail1.charAt(mail1.length-1); 
 if (ch==".")
  {
    alert(" E-mail address cannot contain '.' in end");
    document.form1.txttiUserName.focus();
    return 
 }
if(i1!=i2)
{
 alert(" E-mail address cannot contain two '@' signs");
 document.form1.txttiUserName.focus();
 return
  }
 arr=mail1.split("@"); 
 var i5=arr[1].indexOf('.'); 
 if(i5==-1)
 {
 alert(" E-mail address must have a '.' after @ sign ");
 document.form1.txttiUserName.focus();
 return 
 }
 
 var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ0123456789-_.@";  var checkStr = document.form1.txttiUserName.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, digit and \"@\" characters in the \"E-mail\" field.");
    document.form1.email.focus();
    return 
  }
}
	if(document.form1.txttiPassword.value==""){
			alert("Please enter password");
			document.form1.txttiPassword.focus();
			return;
	}
	document.form1.action="introducers/login/toplogin.php?mode=intermediaries";
	document.form1.submit();
}


function topassologin(){
	if(document.form1.txttiUserName.value==""){
			alert("Please enter your email");
			document.form1.txttiUserName.focus();
			return;
	}
	if (document.form1.txttiUserName.value!= "")
  {
  var mail1=document.form1.txttiUserName.value;
  var i1 = mail1.indexOf('@');
  var i2 = mail1.lastIndexOf('@');
  var i3 = mail1.indexOf('.');
  var i4 =(i1-i3);

  if (mail1.length<=5)
  {
  alert("Your E-mail address is too small");
  document.form1.txttiUserName.focus();
  return ;
 } 
  
    if(i1==-1)
 {
  alert(" E-mail address must have a '@' ");
  document.form1.txttiUserName.focus();
 return ;
  }
  if(i1<2)
 {
  alert(" E-mail address invalid ");
  document.form1.txttiUserName.focus();
 return;
   }
 
    if(i3==-1)
  {
  alert(" E-mail address must have a '.' ");
  document.form1.txttiUserName.focus();
   document.form1.txttiUserName.focus();
 return 
  }
 ch = mail1.charAt(mail1.length-1); 
 if (ch==".")
  {
    alert(" E-mail address cannot contain '.' in end");
    document.form1.txttiUserName.focus();
    return 
 }
if(i1!=i2)
{
 alert(" E-mail address cannot contain two '@' signs");
 document.form1.txttiUserName.focus();
 return
  }
 arr=mail1.split("@"); 
 var i5=arr[1].indexOf('.'); 
 if(i5==-1)
 {
 alert(" E-mail address must have a '.' after @ sign ");
 document.form1.txttiUserName.focus();
 return 
 }
 
 var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ0123456789-_.@";  var checkStr = document.form1.txttiUserName.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, digit and \"@\" characters in the \"E-mail\" field.");
    document.form1.email.focus();
    return 
  }
}
	if(document.form1.txttiPassword.value==""){
			alert("Please enter password");
			document.form1.txttiPassword.focus();
			return;
	}
	document.form1.action="associates/login/toplogin.php?mode=associates";
	document.form1.submit();
}
function topteamlogin(){
	if(document.form1.txtteamUserName.value==""){
			alert("Please enter your email");
			document.form1.txtteamUserName.focus();
			return;
	}
	if (document.form1.txtteamUserName.value!= "")
  {
  var mail1=document.form1.txtteamUserName.value;
  var i1 = mail1.indexOf('@');
  var i2 = mail1.lastIndexOf('@');
  var i3 = mail1.indexOf('.');
  var i4 =(i1-i3);

  if (mail1.length<=5)
  {
  alert("Your E-mail address is too small");
  document.form1.txtteamUserName.focus();
  return ;
 } 
  
    if(i1==-1)
 {
  alert(" E-mail address must have a '@' ");
  document.form1.txtteamUserName.focus();
 return ;
  }
  if(i1<2)
 {
  alert(" E-mail address invalid ");
  document.form1.txtteamUserName.focus();
 return;
   }
 
    if(i3==-1)
  {
  alert(" E-mail address must have a '.' ");
  document.form1.txtteamUserName.focus();
   document.form1.txtteamUserName.focus();
 return 
  }
 ch = mail1.charAt(mail1.length-1); 
 if (ch==".")
  {
    alert(" E-mail address cannot contain '.' in end");
    document.form1.txtteamUserName.focus();
    return 
 }
if(i1!=i2)
{
 alert(" E-mail address cannot contain two '@' signs");
 document.form1.txtteamUserName.focus();
 return
  }
 arr=mail1.split("@"); 
 var i5=arr[1].indexOf('.'); 
 if(i5==-1)
 {
 alert(" E-mail address must have a '.' after @ sign ");
 document.form1.txtteamUserName.focus();
 return 
 }
 
 var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ0123456789-_.@";  var checkStr = document.form1.txtteamUserName.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, digit and \"@\" characters in the \"E-mail\" field.");
    document.form1.email.focus();
    return 
  }
}
	if(document.form1.txtteamPassword.value==""){
			alert("Please enter password");
			document.form1.txtteamPassword.focus();
			return;
	}
	document.form1.action="expert_team/login/toplogin.php?mode=team";
	document.form1.submit();
}
function topilogin(){
	if(document.form1.txttiUserName.value==""){
			alert("Please enter your email");
			document.form1.txttiUserName.focus();
			return;
	}
	if (document.form1.txttiUserName.value!= "")
  {
  var mail1=document.form1.txttiUserName.value;
  var i1 = mail1.indexOf('@');
  var i2 = mail1.lastIndexOf('@');
  var i3 = mail1.indexOf('.');
  var i4 =(i1-i3);

  if (mail1.length<=5)
  {
  alert("Your E-mail address is too small");
  document.form1.txttiUserName.focus();
  return ;
 } 
  
    if(i1==-1)
 {
  alert(" E-mail address must have a '@' ");
  document.form1.txttiUserName.focus();
 return ;
  }
  if(i1<2)
 {
  alert(" E-mail address invalid ");
  document.form1.txttiUserName.focus();
 return;
   }
 
    if(i3==-1)
  {
  alert(" E-mail address must have a '.' ");
  document.form1.txttiUserName.focus();
   document.form1.txttiUserName.focus();
 return 
  }
 ch = mail1.charAt(mail1.length-1); 
 if (ch==".")
  {
    alert(" E-mail address cannot contain '.' in end");
    document.form1.txttiUserName.focus();
    return 
 }
if(i1!=i2)
{
 alert(" E-mail address cannot contain two '@' signs");
 document.form1.txttiUserName.focus();
 return
  }
 arr=mail1.split("@"); 
 var i5=arr[1].indexOf('.'); 
 if(i5==-1)
 {
 alert(" E-mail address must have a '.' after @ sign ");
 document.form1.txttiUserName.focus();
 return 
 }
 
 var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ0123456789-_.@";  var checkStr = document.form1.txttiUserName.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, digit and \"@\" characters in the \"E-mail\" field.");
    document.form1.email.focus();
    return 
  }
}
	if(document.form1.txttiPassword.value==""){
			alert("Please enter password");
			document.form1.txttiPassword.focus();
			return;
	}
	document.form1.action="investor/login/toplogin.php?mode=investor";
	document.form1.submit();
}
function searchnow(){
	theForm=document.form1;
 var reason = "";

  reason += validateEmpty("geographical",theForm.geographical);
  reason += validateEmpty("industries",theForm.industries);
  reason += validateEmpty("invest range from",theForm.txtfrom);
  reason += validateEmpty("invest range to",theForm.txtto);
  
  if (reason != "") {
    alert("Some fields need correction:\n" + reason);
    return false;
  }
   if (IsNumeric(document.form1.txtfrom.value) == false) 
      {
      alert("Please check - non numeric value for total available for investment from!");
	   return false;
      }
   if (IsNumeric(document.form1.txtto.value) == false) 
      {
     	alert("Please check - non numeric value for total available for investment to!");
	   return false;
      }  
	theForm.action="investor/search_proposal/?mode=investor";
	theForm.submit();
}

function topfinlogin(){
	if(document.form1.txtfinUserName.value==""){
			alert("Please enter your email");
			document.form1.txtfinUserName.focus();
			return;
	}
	if (document.form1.txtfinUserName.value!= "")
  {
  var mail1=document.form1.txtfinUserName.value;
  var i1 = mail1.indexOf('@');
  var i2 = mail1.lastIndexOf('@');
  var i3 = mail1.indexOf('.');
  var i4 =(i1-i3);

  if (mail1.length<=5)
  {
  alert("Your E-mail address is too small");
  document.form1.txtfinUserName.focus();
  return ;
 } 
  
    if(i1==-1)
 {
  alert(" E-mail address must have a '@' ");
  document.form1.txtfinUserName.focus();
 return ;
  }
  if(i1<2)
 {
  alert(" E-mail address invalid ");
  document.form1.txtfinUserName.focus();
 return;
   }
 
    if(i3==-1)
  {
  alert(" E-mail address must have a '.' ");
  document.form1.txtfinUserName.focus();
   document.form1.txtfinUserName.focus();
 return 
  }
 ch = mail1.charAt(mail1.length-1); 
 if (ch==".")
  {
    alert(" E-mail address cannot contain '.' in end");
    document.form1.txtfinUserName.focus();
    return 
 }
if(i1!=i2)
{
 alert(" E-mail address cannot contain two '@' signs");
 document.form1.txtfinUserName.focus();
 return
  }
 arr=mail1.split("@"); 
 var i5=arr[1].indexOf('.'); 
 if(i5==-1)
 {
 alert(" E-mail address must have a '.' after @ sign ");
 document.form1.txtfinUserName.focus();
 return 
 }
 
 var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ0123456789-_.@";  var checkStr = document.form1.txtfinUserName.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, digit and \"@\" characters in the \"E-mail\" field.");
    document.form1.email.focus();
    return 
  }
}
	if(document.form1.txtfinPassword.value==""){
			alert("Please enter password");
			document.form1.txtfinPassword.focus();
			return;
	}
	document.form1.action="specialist_finance/login/toplogin.php?mode=finance";
	document.form1.submit();
}
function topilogin(){
	if(document.form1.txttiUserName.value==""){
			alert("Please enter your email");
			document.form1.txttiUserName.focus();
			return;
	}
	if (document.form1.txttiUserName.value!= "")
  {
  var mail1=document.form1.txttiUserName.value;
  var i1 = mail1.indexOf('@');
  var i2 = mail1.lastIndexOf('@');
  var i3 = mail1.indexOf('.');
  var i4 =(i1-i3);

  if (mail1.length<=5)
  {
  alert("Your E-mail address is too small");
  document.form1.txttiUserName.focus();
  return ;
 } 
  
    if(i1==-1)
 {
  alert(" E-mail address must have a '@' ");
  document.form1.txttiUserName.focus();
 return ;
  }
  if(i1<2)
 {
  alert(" E-mail address invalid ");
  document.form1.txttiUserName.focus();
 return;
   }
 
    if(i3==-1)
  {
  alert(" E-mail address must have a '.' ");
  document.form1.txttiUserName.focus();
   document.form1.txttiUserName.focus();
 return 
  }
 ch = mail1.charAt(mail1.length-1); 
 if (ch==".")
  {
    alert(" E-mail address cannot contain '.' in end");
    document.form1.txttiUserName.focus();
    return 
 }
if(i1!=i2)
{
 alert(" E-mail address cannot contain two '@' signs");
 document.form1.txttiUserName.focus();
 return
  }
 arr=mail1.split("@"); 
 var i5=arr[1].indexOf('.'); 
 if(i5==-1)
 {
 alert(" E-mail address must have a '.' after @ sign ");
 document.form1.txttiUserName.focus();
 return 
 }
 
 var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ0123456789-_.@";  var checkStr = document.form1.txttiUserName.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, digit and \"@\" characters in the \"E-mail\" field.");
    document.form1.email.focus();
    return 
  }
}
	if(document.form1.txttiPassword.value==""){
			alert("Please enter password");
			document.form1.txttiPassword.focus();
			return;
	}
	document.form1.action="investor/login/toplogin.php?mode=investor";
	document.form1.submit();
}
function searchnow(){
	theForm=document.form1;
 var reason = "";

  reason += validateEmpty("geographical",theForm.geographical);
  reason += validateEmpty("industries",theForm.industries);
  reason += validateEmpty("invest range from",theForm.txtfrom);
  reason += validateEmpty("invest range to",theForm.txtto);
  
  if (reason != "") {
    alert("Some fields need correction:\n" + reason);
    return false;
  }
   if (IsNumeric(document.form1.txtfrom.value) == false) 
      {
      alert("Please check - non numeric value for total available for investment from!");
	   return false;
      }
   if (IsNumeric(document.form1.txtto.value) == false) 
      {
     	alert("Please check - non numeric value for total available for investment to!");
	   return false;
      }  
	theForm.action="investor/search_proposal/?mode=investor";
	theForm.submit();
}

/* expert_team enquiry */
function expertEnquiry(){
theForm=document.form1

if(theForm.pro1.checked==false &&  theForm.pro2.checked==false && theForm.pro3.checked==false && theForm.pro4.checked==false && theForm.pro5.checked==false){
alert("Please check at least one key product!");
return ;
}
if(theForm.ser1.checked==false &&  theForm.ser2.checked==false && theForm.ser3.checked==false && theForm.ser4.checked==false && theForm.ser5.checked==false && theForm.ser6.checked==false){
alert("Please check at least one service!");
return ;
}
	theForm.action="expert_team/enquire_now/add.php?page=step1&mode=team";
	theForm.submit();
}

/* expert_team register */
function expertReg(){
theForm=document.form1

if(theForm.pro1.checked==false &&  theForm.pro2.checked==false && theForm.pro3.checked==false && theForm.pro4.checked==false && theForm.pro5.checked==false){
alert("Please check at least one key product!");
return ;
}
if(theForm.ser1.checked==false &&  theForm.ser2.checked==false && theForm.ser3.checked==false && theForm.ser4.checked==false && theForm.ser5.checked==false && theForm.ser6.checked==false){
alert("Please check at least one service!");
return ;
}
	theForm.action="expert_team/apply_now/add.php?page=step1&mode=team";
	theForm.submit();
}

/* financial enquiry */
function financeEnquiry(){
theForm=document.form1

if(theForm.ser1.checked==false &&  theForm.ser2.checked==false && theForm.ser3.checked==false && theForm.ser4.checked==false && theForm.ser5.checked==false && theForm.ser6.checked==false){
alert("Please check at least one service!");
return ;
}
	theForm.action="specialist_finance/enquire_now/add.php?page=step1&mode=finance";
	theForm.submit();
}

/* financial register */
function seedRegStep1(){
theForm=document.form1

if(theForm.ser1.checked==false &&  theForm.ser2.checked==false && theForm.ser3.checked==false && theForm.ser4.checked==false && theForm.ser5.checked==false && theForm.ser6.checked==false){
alert("Please check at least one service!");
return ;
}
	theForm.action="specialist_finance/apply_now/add.php?page=step1&mode=finance";
	theForm.submit();
}
function seedRegStep2(mode){
	theForm=document.form1
	var reason = "";

  	reason += validateEmpty("name",theForm.txtName);
	reason += validateEmpty("Company name",theForm.txtCompany);
	reason += validateEmpty("Phone",theForm.txtPhone);
	reason += validateEmpty("Mobile",theForm.txtMobile);
	reason += validateEmpty("Email",theForm.txtEmail);
	reason += validateEmpty("Applicant Name",theForm.txtApplicantName);
	reason += validateEmpty("Date",theForm.txtDate);
	
	reason += validateEmpty("Name",theForm.txtpName);
	reason += validateEmpty("Address",theForm.txtpaddress);
	reason += validateEmpty("Phone",theForm.txtpPhone);
	reason += validateEmpty("Mobile",theForm.txtpMobile);
	reason += validateEmpty("Email",theForm.txtpEmail);
	
  if (reason != "") {
    alert("Some fields need correction:\n" + reason);
    return false;
  }
	
	/*if(theForm.checkAdditionalYes.checked==true){
	alert("If yes, what is its value, details of any loans outstanding, type of property and its location is empty");
	return false;
	}*/
	
	if(mode=="team"){
	theForm.action="expert_team/enquire_now/add.php?page=step2&mode=team";
	theForm.submit();
	}else{
	theForm.action="specialist_finance/enquire_now/add.php?page=step2&mode=finance";
	theForm.submit();
	}
}
function seedRegStep3(mode){
	theForm=document.form1
	var reason = "";

  	reason += validateEmpty("Loan required",theForm.txtLoanrequired);
	reason += validateEmpty("Estimated value of security",theForm.txtValueOfSecurity);
	reason += validateEmpty("Repayment term",theForm.txtRepayment);
	reason += validateEmpty("Purchase price",theForm.txtPurchasePrice);
	reason += validateEmpty("Purpose of this loan",theForm.txtPurposeLoan);
	
	
	
	reason += validateEmpty("Location of security",theForm.txtLocationOfSecurity);
	reason += validateEmpty("Type of security",theForm.txtTypeOfSecurity);
	reason += validateEmpty("Years remaining on lease",theForm.txtYearsRemaining);
	reason += validateEmpty("Where property owned",theForm.txtWherePropertyOwned);
	reason += validateEmpty("Purchase Price",theForm.txtPurchasePriceProperty);
	reason += validateEmpty("Current Value",theForm.txtCurrentValue);
	reason += validateEmpty("Amount of any mortgage outstanding",theForm.txtMortgageOutstanding);	
	reason += validateEmpty("Name of lender",theForm.txtNameOfLenderMortgage);
	
	reason += validateEmpty("Current Arrears",theForm.txtCurrentArrearsMortgage);
	reason += validateEmpty("Amount of any other loans secured on property",theForm.txtAnyOtherLoans);
	reason += validateEmpty("Name of lender",theForm.txtNameOfLenderLoans);
	reason += validateEmpty("Current Arrears",theForm.txtCurrentArrearsLoans);
	
	
  if (reason != "") {
    alert("Some fields need correction:\n" + reason);
    return false;
  }
  if(theForm.lontype1.checked==false &&  theForm.lontype2.checked==false && theForm.lontype3.checked==false && theForm.lontype4.checked==false && theForm.lontype5.checked==false){
alert("Type of loan required!");
return ;
}

if(theForm.offered1.checked==false &&  theForm.offered2.checked==false){
alert("Select Are we being offered!");
return ;
}
		
	if(mode=="team"){
	theForm.action="expert_team/enquire_now/add.php?page=step3&mode=team";
	theForm.submit();
	}else{
	theForm.action="specialist_finance/enquire_now/add.php?page=step3&mode=finance";
	theForm.submit();
	}
}
function seedRegStep4(mode){
	theForm=document.form1
	var reason = "";

	reason += validateEmpty("Income details (1st Applicant)",theForm.txtIncomeDetails);
	reason += validateEmpty("Age (1st Applicant)",theForm.txtAge);
	reason += validateEmpty("Gross P.A. (1st Applicant)",theForm.txtGross);
	reason += validateEmpty("Job / business description",theForm.txtBusinessDescription);
	reason += validateEmpty("Time in current employment / business",theForm.txtTimeInCurrentEmployment);
	reason += validateEmpty("Income details (2nd Applicant)",theForm.txtIncomDetails2ndApplicant );
	reason += validateEmpty("Gross P.A.(2nd Applicant)",theForm.txtGross2);
	reason += validateEmpty("Age2(2nd Applicant)",theForm.txtAge2);
	reason += validateEmpty("Job / business description (2nd Applicant)",theForm.txtBusinessDescription2);
	reason += validateEmpty("Time in current employment / business (2nd Applicant)",theForm.txtTimeInCurrentEmployment2);
 	
	reason += validateEmpty("Applicant (1) CCJ’s",theForm.txtApplicant1);
	reason += validateEmpty("Total Applicant (1)",theForm.txtTotal1);
	reason += validateEmpty("Number Applicant (1)",theForm.txtNumber1);
	reason += validateEmpty("Applicant (2) CCJ’s",theForm.txtApplicant2);
	reason += validateEmpty("Total Applicant (2)",theForm.txtTotal2);
	reason += validateEmpty("Number Applicant (2)",theForm.txtNumber2);
	reason += validateEmpty("Additional information",theForm.txtAdditionalInformation);
	
	
	if (reason != "") {
	alert("Some fields need correction:\n" + reason);
	return false;
	}
	
	if(theForm.cheAgreement.checked==false){
	alert("Please agree to Terms and Conditions!");
	return ;
	}
		
	if(mode=="team"){
	theForm.action="expert_team/enquire_now/add.php?page=step4&mode=team";
	theForm.submit();
	}else{
	theForm.action="specialist_finance/enquire_now/add.php?page=step4&mode=finance";
	theForm.submit();
	}
}

/* Approved introducer application form */
function introducerVal(mode){
	theForm=document.form1
	var reason = "";

  	reason += validateEmpty("Email address",theForm.txtEmail);
	reason += validateEmpty("Password",theForm.txtPass);
	reason += validateEmpty("Company Name",theForm.txtComName);
	reason += validateEmpty("What type of business are you",theForm.selectBusiness);
	reason += validateEmpty("Post Code",theForm.txtPostCode);
	reason += validateEmpty("Address Line1",theForm.txtAddress1);
	reason += validateEmpty("Town or City",theForm.txtTown);
	reason += validateEmpty("County",theForm.selectCountry);
	reason += validateEmpty("Full Name",theForm.txtSurname);
	reason += validateEmpty("Phone",theForm.txtTel);
	
	if(theForm.cheAgreement.checked==false){
	alert("Please agree to Terms and Conditions!");
	return ;
	}
	
	if (reason != "") {
    alert("Some fields need correction:\n" + reason);
    return false;
    }
	
	if(mode=="intermediaries"){	
	theForm.action="introducers/add.php?page=appro&mode=intermediaries";
	theForm.submit();
	}else{
	theForm.action="associates/add.php?page=appro&mode=associates";
	theForm.submit();
	} 
}

function validateEmpty(val,fld) {
    var error = "";
 
    if (fld.value.length == 0) {
        fld.style.background = 'Yellow'; 
        error = "The "+ val +" field has not been filled in.\n"
    } else {
        fld.style.background = 'White';
    }
    return error;  
}

function regoffer(){
	theForm=document.form1
var reason = "";

  	reason += validateEmpty("Offer Title",theForm.txtoffertitle);
	reason += validateEmpty("Detail of your offer",theForm.txtofferdtl);
  
  if (reason != "") {
    alert("Some fields need correction:\n" + reason);
    return false;
  }		
   theForm.action="associates/offer/add.php?page=sec&mode=team";
theForm.submit();
}

function UpdateideaSpotter(mode){
theForm=document.form1	
if(mode=="associates"){	
 theForm.action="associates/login/toplogin.php?mode=associates";
 theForm.submit();
 }else{
 theForm.action="introducers/login/toplogin.php?mode=intermediaries";
 theForm.submit();
 }
}
/* Become a idea spotter */
function ideaSpotter(){
	theForm=document.form1
	var reason = "";

  	reason += validateEmpty("First Name",theForm.txtFName);
	reason += validateEmpty("Last Name",theForm.txtLName);
	reason += validateEmpty("Email Address",theForm.txtEmail);
	reason += validateEmail(theForm.txtEmail);
	reason += validateEmpty("County",theForm.selectCountry);
	reason += validateEmpty("City",theForm.txtCity);
	
	if(theForm.cheAgree.checked==false){
	alert("Make sure! the I agree to the Terms and Conditions check box is selected");
	return false;
	}
				
	if(reason != "") {
    alert("Some fields need correction:\n" + reason);
    return false;
    }
		
 	theForm.action="introducers/add.php?page=become&mode=intermediaries";
 	theForm.submit();
}
function searchoffer(){
	theForm=document.form1
	theForm.action="associates/offer/viewoffers.php?mode=associates";	
	theForm.submit();	
}

/* Forgot Password */
function forgetPass(mode){
	theForm=document.form1
var reason = "";

	reason += validateEmpty("User Name",theForm.txtForgotPass);
	reason += validateEmail(theForm.txtForgotPass);
	
	if (reason != "") {
    alert("Some fields need correction:\n" + reason);
    return false;
    }
 if(mode=="entrepreneur"){
 theForm.action="forgot_password/add.php?mode=entrepreneur";
 theForm.submit();
 }else if(mode=="investor"){
 theForm.action="forgot_password/add.php?mode=investor";
 theForm.submit();
 }else if(mode=="intermediaries"){
 theForm.action="forgot_password/add.php?mode=intermediaries";
 theForm.submit();
 }else if(mode=="associates"){
 theForm.action="forgot_password/add.php?mode=associates";
 theForm.submit();
 }else if(mode=="finance"){
 theForm.action="forgot_password/add.php?mode=finance";
 theForm.submit();
 }
}
/* Introducer create account now */
function introducAcc(){
	theForm=document.form1
	var reason = "";

  	reason += validateEmpty("Your Name",theForm.txtYourName);
	reason += validateEmpty("Your Email",theForm.txtYourEmail);
	reason += validateEmail(theForm.txtYourEmail);
	reason += validateEmpty("Name of Service",theForm.txtNameOfService);
	reason += validateEmpty("Describe your business",theForm.txtDesBussiness);
	reason += validateEmpty("Company Located",theForm.txtCompanyLocated);
	reason += validateEmpty("Business Unique",theForm.txtBusinessUnique);
	
	if (reason != "") {
	alert("Some fields need correction:\n" + reason);
	return false;
	}
	theForm.action="introducers/add.php?page=spotter&mode=intermediaries";
	theForm.submit();
}

function introSpotter(){
	theForm=document.form1
	var reason = "";

  	reason += validateEmpty("Your Name",theForm.txtYName);
	reason += validateEmpty("Your Email",theForm.txtYEmail);
	
	if (reason != "") {
	alert("Some fields need correction:\n" + reason);
	return false;
	}
	theForm.action="introducers/add.php?page=spotter&mode=intermediaries";
	theForm.submit();
}

function associatesAcc(){
	theForm=document.form1
	var reason = "";

  	reason += validateEmpty("Your Name",theForm.txtYourName);
	reason += validateEmpty("Your Email",theForm.txtYourEmail);
	reason += validateEmpty("Password",theForm.txtPass);
	reason += validateEmpty("Password",theForm.txtRePass);
	reason += validateEmpty("Password",theForm.txtNameOfService);
	
	if (reason != "") {
	alert("Some fields need correction:\n" + reason);
	return false;
	}
	
	if(theForm.cheAgreement.checked==false){
	alert("Please agree to Terms and Conditions!");
	return ;
	}
	
	theForm.action="associates/add.php?page=acc&mode=associates";
	theForm.submit();
}
function callus(){
theForm=document.form1
theForm.action="contactus/?mode=contactus";
theForm.submit();
}

function ideaSpoter(){
theForm=document.form1
theForm.action="introducers/idea_spotter.php?mode=intermediaries";
theForm.submit();
}

function disAgree1(){
	document.getElementById("txtsig").disabled = false;
	document.getElementById("txtsig").disabled = true;
}
function disAgree2(){
	document.getElementById("txtsig").disabled = true;
	document.getElementById("txtsig").disabled = false;
}

function termAgree(){
var anu =document.form1	
if(anu.checkTerms.checked){
anu.btnSubmit.blur()
anu.btnSubmit.disabled=false
}else
{
anu.btnSubmit.disabled=true
}
}

/* investor form */
function investorform(){
	theForm=document.form1
	var reason = "";

  	reason += validateEmpty("First Name",theForm.txtFname);
	reason += validateEmpty("Last Email",theForm.txtLName);
	reason += validateEmpty("Email",theForm.txtEmail);
	reason += validateEmpty("password",theForm.txtPass);
	reason += validateEmpty("Address",theForm.txtAddress);
	reason += validateEmpty("City",theForm.txtCity);
	reason += validateEmpty("Postcode",theForm.txtPostcode);
	reason += validateEmpty("Country",theForm.txtCountry);
	reason += validateEmpty("Phone",theForm.txtPhone);
	
	
	if (reason != "") {
	alert("Some fields need correction:\n" + reason);
	return false;
	}
	theForm.action="expert_team/apply_now/add.php?rset=invest&mode=team";
	theForm.submit();
}

function serviceform(){
	theForm=document.form1
	var reason = "";
	
	theForm.action="expert_team/apply_now/add.php?rset=service&mode=team";
	theForm.submit();
}

function serviceCategory(){
	theForm=document.form1
	var reason = "";

  	reason += validateEmpty("Product or Service Category",theForm.txtServiceCate);
	reason += validateEmpty("Product or Service Name",theForm.txtService);
	reason += validateEmpty("Describe your product and its benefits",theForm.txtDesYourProduct);
	reason += validateEmpty("If the product is patented, in what countries?",theForm.txtPatented);
	reason += validateEmpty("What is the estimated cost of goods delivered?",theForm.txtEstimatedCost);
	reason += validateEmpty("What is the suggested retail price?",theForm.txtSuggestedRetailPrice);
	reason += validateEmpty("Please list at least 5 claims you can make about your product",theForm.txt5_claims);
	reason += validateEmpty("Briefly list your experience and the experience of your management team Upload your CV or word document",theForm.uploaded);
	
	if (reason != "") {
	alert("Some fields need correction:\n" + reason);
	return false;
	}
	
 if(theForm.unique1.checked==false &&  theForm.unique2.checked==false && theForm.unique3.checked==false && theForm.unique4.checked==false && theForm.unique5.checked==false && theForm.unique6.checked==false){
alert("Identify the unique selling points, features, and benefits of your product or service");
return ;
}
 if(theForm.cheAreYou1.checked==false &&  theForm.cheAreYou2.checked==false && theForm.cheAreYou3.checked==false && theForm.cheAreYou4.checked==false && theForm.cheAreYou5.checked==false){
alert("Are you the...");
return ;
}
 if(theForm.cheProductsHave1.checked==false &&  theForm.cheProductsHave2.checked==false && theForm.cheProductsHave3.checked==false && theForm.cheProductsHave4.checked==false && theForm.cheProductsHave5.checked==false && theForm.cheProductsHave6.checked==false){
alert("Does the product have... ");
return ;
}

	
	
	theForm.action="expert_team/apply_now/add.php?rset=servcate&mode=team";
	theForm.submit();
}

function marketChann(){
	theForm=document.form1
	
	 if(document.getElementById("radioa").checked==false && document.getElementById("radiob").checked==false){
alert("Is the product currently being marketed anywhere in the world?");
return ;
}
 if(document.getElementById("radioa").checked==true && theForm.IfSoHow1.checked==false &&  theForm.IfSoHow2.checked==false && theForm.IfSoHow3.checked==false && theForm.IfSoHow4.checked==false && theForm.IfSoHow5.checked==false && theForm.IfSoHow6.checked==false && theForm.IfSoHow7.checked==false){
alert("If so, how? ");
return ;
}
 if(document.getElementById("radioc").checked==false && document.getElementById("radiod").checked==false){
alert("Do you have printed brochures or sales sheets?");
return ;
}
 if(document.getElementById("radioe").checked==false && document.getElementById("radiof").checked==false){
alert("Do you have testimonials from people who have used your product or service?");
return ;
}
if(theForm.txtInIsYourProduct.selectedIndex==0){
alert("In what stage is your product?");
return ;
}
	
if(theForm.txtHowDid.value==""){
alert("How did you hear about us?");
return ;
}	
	theForm.action="expert_team/apply_now/add.php?rset=market&mode=team";
	theForm.submit();
}

function fundingReq(){
	theForm=document.form1
	
	var reason = "";

  	reason += validateEmpty("Please indicate the amount of funding you are requesting",theForm.amountOfFunding);
	reason += validateEmpty("How long have you been actively seeking funding?",theForm.seekingFunding);
	reason += validateEmpty("Describe the type(s) of funding you are looking for and why this type of funding?",theForm.lookingForAndWhyThisType);
	reason += validateEmpty("Length of Investment - how long will you need these invested funds for?",theForm.lengthOfInvestment);
	reason += validateEmpty("Please describe what forms of collateral you will be using?",theForm.describeWhatForms);
	reason += validateEmpty("If none, how do you propose to minimize the risk to our investors?",theForm.howUoYouPropose);
	reason += validateEmpty("How much of your own money do you currently have at risk in associationwith this project?",theForm.muchOfYourOwnMoney);
	reason += validateEmpty("Can you provide documentation proof for personally invested funds?",theForm.provideDocumentation);
	
	if (reason != "") {
	alert("Some fields need correction:\n" + reason);
	return false;
	}
	/*if(theForm.cheAgreement.checked==false){
	alert("Please agree to Terms and Conditions!");
	return ;
	}*/
	theForm.action="expert_team/apply_now/add.php?rset=funding&mode=team";
	theForm.submit();
}

function commercialform(){
	theForm=document.form1
	/*
	if(theForm.agree.checked==false){
	alert("Please select I agree to the above terms");
	return ;
	}*/

	theForm.action="expert_team/apply_now/commercial_managers_contact_form.php?mode=team";
	theForm.submit();
}
function commercialform1(){
	theForm=document.form1
	var reason = "";

  	reason += validateEmpty("First Name",theForm.txtFname);
	reason += validateEmpty("Last Email",theForm.txtLName);
	reason += validateEmpty("Password",theForm.txtPassword);
	reason += validateEmpty("Mobile",theForm.txtMobile);
	reason += validateEmpty("Home Street",theForm.txtHStreet);
	reason += validateEmpty("Home City",theForm.txtHomeCity);
	reason += validateEmpty("Post Code",theForm.txtPostCode);
	reason += validateEmpty("Email",theForm.txtEmail);
	
	if (reason != "") {
	alert("Some fields need correction:\n" + reason);
	return false;
	}
	theForm.action="expert_team/apply_now/add.php?records=commcrce&mode=team";
	theForm.submit();
}
function commercialform2(){
	theForm=document.form1
	if((document.getElementById("selectAgriculture").selectedIndex==1) && (document.getElementById("selectAerospace").selectedIndex==1) &&  (document.getElementById("selectArts").selectedIndex==1) && (document.getElementById("selectAutomotive").selectedIndex==1) && (document.getElementById("selectBiotechnology").selectedIndex==1) && (document.getElementById("selectBusiness").selectedIndex==1) && (document.getElementById("selectConstruction").selectedIndex==1) && (document.getElementById("selectConsumer").selectedIndex==1)&& (document.getElementById("selectIT").selectedIndex==1)&& (document.getElementById("selectLeisure").selectedIndex==1)&& (document.getElementById("selectConsultancy").selectedIndex==1)&& (document.getElementById("selectAutomotive").selectedIndex==1)&& (document.getElementById("selectManufacturing").selectedIndex==1)&& (document.getElementById("selectEngineering").selectedIndex==1)&& (document.getElementById("selectAdvertising").selectedIndex==1)&& (document.getElementById("selectChemical").selectedIndex==1)&& (document.getElementById("selectPharmaceutical").selectedIndex==1)&& (document.getElementById("selectProfessional").selectedIndex==1)&& (document.getElementById("selectPublic").selectedIndex==1)&& (document.getElementById("selectTelecommunications").selectedIndex==1)&& (document.getElementById("selectTransport").selectedIndex==1)){
		alert("Select at least  one?");
		return ;
}
	 
	theForm.action="expert_team/apply_now/add.php?records=commfinal&mode=team";
	theForm.submit();
}

function topinventlogin(){
	if(document.form1.txtinveUserName.value==""){
			alert("Please enter your email");
			document.form1.txtinveUserName.focus();
			return;
	}
	if (document.form1.txtinveUserName.value!= "")
  {
  var mail1=document.form1.txtinveUserName.value;
  var i1 = mail1.indexOf('@');
  var i2 = mail1.lastIndexOf('@');
  var i3 = mail1.indexOf('.');
  var i4 =(i1-i3);

  if (mail1.length<=5)
  {
  alert("Your E-mail address is too small");
  document.form1.txtinveUserName.focus();
  return ;
 } 
  
    if(i1==-1)
 {
  alert(" E-mail address must have a '@' ");
  document.form1.txtinveUserName.focus();
 return ;
  }
  if(i1<2)
 {
  alert(" E-mail address invalid ");
  document.form1.txtinveUserName.focus();
 return;
   }
 
    if(i3==-1)
  {
  alert(" E-mail address must have a '.' ");
  document.form1.txtinveUserName.focus();
   document.form1.txtinveUserName.focus();
 return 
  }
 ch = mail1.charAt(mail1.length-1); 
 if (ch==".")
  {
    alert(" E-mail address cannot contain '.' in end");
    document.form1.txtinveUserName.focus();
    return 
 }
if(i1!=i2)
{
 alert(" E-mail address cannot contain two '@' signs");
 document.form1.txtinveUserName.focus();
 return
  }
 arr=mail1.split("@"); 
 var i5=arr[1].indexOf('.'); 
 if(i5==-1)
 {
 alert(" E-mail address must have a '.' after @ sign ");
 document.form1.txtinveUserName.focus();
 return 
 }
 
 var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ0123456789-_.@";  var checkStr = document.form1.txtinveUserName.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, digit and \"@\" characters in the \"E-mail\" field.");
    document.form1.email.focus();
    return 
  }
}
	if(document.form1.txtinvePassword.value==""){
			alert("Please enter password");
			document.form1.txtinvePassword.focus();
			return;
	}
	document.form1.action="expert_team/login/toplogin_inventor.php?mode=team";
	document.form1.submit();
}
