/**********************************************************************************************************
	LANG DEFINITION VARS
**********************************************************************************************************/
COUNTRY_NAME_UK='United Kingdom';

GENDER_MISTER='Mr';
GENDER_LADY='Mrs';
GENDER_MISS='Miss';
GENDER_NONE='Ms';

RECIPIENT_SERVICE='recipient service';
SECURITY_CODE='The security code';
YOUR_EMAIL='Your email';
YOUR_EMAIL_CONFIRMATION='Your Email confirmation';
YOUR_MESSAGE='Your message';
PLEASE_CHECK='Please check';
SEND_YOUR_MESSAGE='Send Your message ?';
TOMBOLA_CONFIRM='Do you confirm Tombola partherepation : %1$s ?';
STORE_CONFIRM='Do you confirm points redeemed for a prize : %1$s ?';
NUMBER_MAXIMUM_REACHED='You have already selected %1$s numbers';
YOU_MUST_CLICK_ON_A_BANNER='You must click on a banner';
YOU_MUST_SELECT_X_NUMBERS='You must select %1$s numbers !';
NOT_VALID_EMAIL_ADDRESS='Invalid email.';
YOU_MUST_ENTER_PASS='Please enter a new password.';
YOUR_GENDER='Your title';
YOUR_NAME='Your lastname';
YOUR_FIRSTNAME='Your firstname';
YOUR_PASSWORD='Your password (Must have 2 to 10 letters/digits)';
YOUR_PASSWORD_SHORT='Your password';
YOUR_PASSWORD_CONFIRMATION='Your password confirmation';
YOUR_OLD_PASSWORD='Your previous password';
YOUR_POSTAL_ADDRESS='Your address';
YOUR_GSM_NUMBER='Your mobile phone number';
YOUR_PHONE_NUMBER='Your phone number';
YOUR_POSTCODE='Your postalcode';
YOUR_TOWN='Your city';
FORM_ERROR='An error as occured.\nPlease delete temporary files from Your browser and try again.\nThank you.';
PLEASE_FILL_HILIGHT_FIELDS='Please complete highlighted fields.';
YOUR_BIRTHDATE='Your date of birth';
PARTNER_SUBSCRIPTION='Partners good deals subscription';
ACCEPT_RULES='Accept Rules and T&Cs';
YOU_NEED_TO_MAKE_A_CHOICE='You need to make a choice.';
INCORRECT_NEW_EMAIL_ADDRESS='Invalid email.';
PRIZE_CHOICE='Prize choice';
EMAIL_FIELDS='email field';
TOO_OLD_BROWSER='Your navigator (internet explorer/firefox version) is too old. Please update new version available. We recommend you to use Firefox : http://www.getfirefox.com/';
LEGAL_NOTES='T&Cs and Private Policy';
LEGAL_NOTES_ALERT="Click on this button and &quot;join and play now!&quot;, your personal details will be transmitted to our company %1$s. Please check our Privacy policy for all details below";
ENDED='Terminé';
DELETE_FAVORITE='Are you sure you want to erase your lucky nurmbers?';
GRID_SELECT_NUMBER='Please select a grid number';
THE_GRID_NUMBER='Grid number %1$s';
DUPLICATE_GRID_NOT_COMPLETED='Cette grille ne peut pas être dupliquée car elle n\'est pas complète.';
ON_ALL_GRIDS='Sur toutes les grilles';

var lg_formPleaseCheck='Please Check :';
var lg_birthdateDay='Date of birth (day)';
var lg_birthdateMonth='Date of birth (month)';
var lg_birthdateYear='Date of birth (year)';
var lg_gender='Title';
var lg_country='Country';

/**********************************************************************************************************
	--- DON'T MODIFY BELOW ---
	COUNTRY SPECIFIC CONF
**********************************************************************************************************/
// profile
CIVILITE_SELECT_OPTIONS={'0':'--','1':GENDER_MISTER,'2':GENDER_LADY,'3':GENDER_MISS,'4':GENDER_NONE};
COUNTRY_SELECT_OPTIONS={'5':COUNTRY_NAME_UK};
BIRTH_SELECT_ORDER={1:'day',2:'month',3:'year'};

// name of play page and delay for tracker
TRACKER_VALID_URL='play.php';
TRACKER_VALID_TIME=3000;

// img sub path (on static server)
PUB_SUBPATH='banana';

// enabled magic number or not
ENABLED_GRID_MAGIC_NUMBER=false;

// grid per day
GRIDS_PER_DAY=10;

/**********************************************************************************************************
	COUNTRY SPECIFIC FUNCTIONS
**********************************************************************************************************/
function clearPhoneNumber(num,country){
	if(typeof(country)=='undefined') country='5';
	num=num.replace(/[^0-9+]/g,'');
	if(COUNTRIES[country]['code']=='UK')
		num=num.replace(/^(\+|00)44/i,'0');
	num=num.replace(/[^0-9]/g,'');
	return(num);
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
function isValidGsmNumber(num,country){
	if(typeof(country)=='undefined') country='5';
	if(COUNTRIES[country]['code']=='UK')
		return(num.match(/^0[0-9]{10}$/i));
	else return(true);
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
function isValidPhoneNumber(num,country){
	if(typeof(country)=='undefined') country='5';
	if(COUNTRIES[country]['code']=='UK')
		return(num.match(/^0[0-9]{10}$/i));
	else return(true);
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
function isValidZipCode(zipCode,country){
	if(typeof(country)=='undefined') country='5';
	if(COUNTRIES[country]['code']=='UK')
		return(zipCode.match(/^[a-z]{1,2}[0-9]{1,2}\s*\D{0,2}[0-9]{1,1}[a-z]{1,2}$/i));
	else return(false);
}

/**********************************************************************************************************
	MDSTOOLS EXTEND
**********************************************************************************************************/

if(typeof(MFC)=='undefined'){
	var MFC={};
}
if(typeof(MFC.fieldsTypes)=='undefined'){
	MFC.fieldsTypes={};
}

MFC.fieldsTypes.gsmNumber={
	'regExp':null,
	'check':function(elm){
	        	var v=MU.formTagGetValue(elm);
	        	var rv=(v=='');
	        	var f=elm.form;
	        	if((!rv)&&f.elements['pays']){
	        		var country=MU.formTagGetValue(f.elements['pays']);
	        		if(COUNTRIES[country]['code']=='FR'){
	        			v=v.replace(/^(\+|00)33/i,'0');
	        			rv=v.match(/^06[0-9]{8}$/i);
	        		}else if(COUNTRIES[country]['code']=='BE'){
	        			v=v.replace(/^(\+|00)32/i,'0');
	        			rv=v.match(/^04[0-9]{8}$/i);
	        		}else{
	        			rv=true;
	        		}
	        	}
	        	if(rv) MU.formTagSetValue(elm,v);
	        	rv=(elm.readOnly||rv);
	        	return rv;
	        }
};

MFC.fieldsTypes.homeNumber={
	'regExp':null,
	'check':function(elm){
	        	var v=MU.formTagGetValue(elm);
	        	var rv=(v=='');
	        	var f=elm.form;
	        	if((!rv)&&f.elements['pays']){
	        		var country=MU.formTagGetValue(f.elements['pays']);
	        		if(COUNTRIES[country]['code']=='FR'){
	        			v=v.replace(/^(\+|00)33/i,'0');
	        			rv=v.match(/^0[123459][0-9]{8}$/i);
	        		}else if(COUNTRIES[country]['code']=='BE'){
	        			v=v.replace(/^(\+|00)32/i,'0');
	        			rv=v.match(/^0[0-9]{8}$/i);
	        		}else{
	        			rv=true;
	        		}
	        	}
	        	if(rv) MU.formTagSetValue(elm,v);
	        	rv=(elm.readOnly||rv);
	        	return rv;
	        }
};

MFC.fieldsTypes.zipcode={
	'regExp':null,
	'check':function(elm){
	        	var v=MU.formTagGetValue(elm);
	        	var rv=true;
	        	var f=elm.form;
	        	if(f.elements['pays']){
	        		var country=MU.formTagGetValue(f.elements['pays']);
	        		if(COUNTRIES[country]['code']=='FR'){
	        			v=v.replace(/[^0-9]/,'');
	        			rv=v.match(/^[0-9]{5}$/);
	        		}else if(COUNTRIES[country]['code']=='BE' || COUNTRIES[country]['code']=='CH'){
	        			v=v.replace(/[^0-9]/,'');
	        			rv=v.match(/^[0-9]{4}$/);
	        		}else{
	        			v='';
	        			rv=true;
	        		}
	        	}else{
	        		v='';
	        	}
	        	if(rv) MU.formTagSetValue(elm,v);
	        	rv=(elm.readOnly||rv);
	        	return rv;
	        }
};