// capitalizeMe
function capitalizeMe(obj) {
    val = obj.value;
    newVal = '';
    x = 0;
    val = val.split(' ');
    for (var c = 0; c < val.length; c++) {
        if (c > 0)
            newVal += ' ';

        if (x == 0)

            newVal += val[c].substring(0, 1).toUpperCase() + val[c].substring(1, val[c].length);

        else

            newVal += val[c].substring(0, val[c].length);

        x = 1;
    }
    obj.value = newVal;
}

// Contact us
function contactusform1(contactusform,contactusform_email) {
if (document.contactusform.fullname.value == "Votre Nom complet*")
{
alert("Nom complet is empty");
document.getElementById('fullname').style.borderColor = '#F36B22';
document.contactusform.fullname.focus();
return false;
}
var alphaExp = /^[a-zA-Z ]+$/;
if(document.contactusform.fullname.value.match(alphaExp))
{
}
else
{
alert("Please enter only letters for Votre Nom complet");
document.getElementById('fullname').style.borderColor = '#F36B22';
document.contactusform.fullname.focus();
return false;
}


var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
var address = document.contactusform.contactusform_email.value;
if(reg.test(address) == false) {
      alert('Invalid Adresse Electronique Address');
	  document.getElementById('contactusform_email').style.borderColor = '#F36B22'
	  document.contactusform.contactusform_email.focus();
      return false;
}
	
if (document.contactusform.txt.value == "Vos remarques*")
{
alert("Vos remarques is empty");
document.getElementById('txt').style.borderColor = '#F36B22';
document.contactusform.txt.focus();
return false;
}

	
	document.contactusform.submit();
}

function nljs(nl,t_nl)
{
if (document.getElementById('t_n2').value == "Votre Nom complet*")
{
alert("Votre Nom complet is empty");
document.getElementById('t_n2').style.borderColor = '#F36B22';
document.getElementById('t_n2').focus();
return false;
}

var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
var address = document.nl.t_nl.value;
	if(reg.test(address) == false) {
		alert('Invalid Adresse Electronique Address');
		document.nl.t_nl.style.borderColor = '#F36B22';
		document.getElementById('t_nl').focus();
		return false;
   }
document.nl.submit(); 
}




// emploiform1
function emploiform1(contactusform,contactusform_email) {
if (document.getElementById('fullname').value == "Votre Nom complet*")
{
alert("Nom complet is empty");
document.getElementById('fullname').style.borderColor = '#F36B22';
document.contactusform.fullname.focus();
return false;
}
var alphaExp = /^[a-zA-Z ]+$/;
if(document.contactusform.fullname.value.match(alphaExp))
{
}
else
{
alert("Please enter only letters for Votre Nom complet");
document.getElementById('fullname').style.borderColor = '#F36B22';
document.contactusform.fullname.focus();
return false;
}


var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
var address = document.contactusform.contactusform_email.value;
if(reg.test(address) == false) {
      alert('Invalid Adresse Electronique Address');
	  document.getElementById('contactusform_email').style.borderColor = '#F36B22'
	  document.contactusform.contactusform_email.focus();
      return false;
}
	
if (document.contactusform.txt.value == "Vos remarques*")
{
alert("Vos remarques is empty");
document.getElementById('txt').style.borderColor = '#F36B22';
document.contactusform.txt.focus();
return false;
}

if (document.contactusform.uploaded.value == "")
{
alert("No file selected");
return false;
}

	
	document.contactusform.submit();
}

