var textwr = ""

var helpFields = [ 
"companyName",
"companyType",
"companyRegNo",
"title",
"inForename",
"inMiddle",
"inSurname",
"email",
"password",
"tel1",
"tel2",
"inCRStatus",
"customerRef",
"salesCenter",
"adminName",
"adminMobile",
"adminEmail",
"gender",
"flatNumber",
"houseName",
"inAddress1",
"inAddress2",
"inTown_City",
"inRegion",
"inPostcode",
"ltype",
"qty",
"msisdn",
"term",
"accountName",
"accountNumber",
"sortCode",
"bankName",
"bankAddress",
"bankPostcode"
]


var helpText  = [
"Please enter the name of your company",
"Please select the type of business that applies",
"For limited companies please enter your companies house registration number",
"Please enter the title of the primary contact e.g. Mr/Mrs",
"Please enter the fore name of the primary contact",
"If you have a middle intial please enter it",
"Please enter you surname ( family name ) ",
"Please enter your email this will be used as your primary contact for billing",
"Please enter the password you wish to use to access the service",
"Please provide a telephone with which we can call you",
"Please provide an optional secondary contact number",
"The status of this application",
"If you wish to provide your own reference please enter here",
"If you wish to provide a secondary reference please enter here",
"Please enter the name of the person who will be monitoring the devices",
"Please enter the mobile number of the administrator ( for alerts )",
"Please enter the email of the administrator ( fot the alerts )",
"Are you Male of Female",
"If you live in a flat  / sub premise please enter then number here",
"Please enter you house name and/or number",
"Plese enter the first line of your address",
"Please enter the second line of your address if it exists",
"Please enter the town / city",
"Please enter the region / county",
"Please input your postcode",
"Pleae choose the type of license you require",
"Enter the number of devices you wish to license",
"Please enter the mobile phone number e.g. 07970111222 or 00447970111222",
"Please choose the term, the longer the term the more you save",
"Please enter the name of the bank acccount as it appears on the statements",
"Please enter the account number ( 8 digits )",
"Please enter sort code ( 6 digits )",
"Please enter bank name",
"Plese enter the first line of the banks addresss",
"Please enter the banks postcode"
]

$(document).ready(function(){

   $("input,select").focus(function () {
   			//console.log(this);
    var ind = jQuery.inArray($(this).attr("name"),helpFields)  ;
    var text = "" ;
     if ( ind == -1 )
     {	if ( !$("#hb").is(":hidden")) {
     			$("#hb").hide("blind") ;
     		}
   		 
   		}
   		else
   		{
 		text = textwr + helpText[ind] ;
  
   		 $("#hb").show("drop");
   			$("#help").html(text) ;
   		
  
   	}
     });
   
  });    