   function onFocus(element) {
     if (element.value == element.defaultValue) {
       element.value = '';
     }
   }
   function onBlur(element) {
     if (element.value == '') {
       element.value = element.defaultValue;
     }
   }
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function validateForm() {
    var input = document.LoginForm;    // Your form name
    var error = false;              // No erros by default

	
	input.Can.className = 'TopNavTextField';
	input.Pin.className = 'TopNavTextField';

    if(input.Can.value == '' || input.Can.value == 'CAN') {
        input.Can.className = 'inputError TopNavTextField';
        error = true;
    }
	
	 if(input.Pin.value == '' || input.Pin.value == 'PIN') {
        input.Pin.className = 'inputError TopNavTextField';
        error = true;
    }

    // Submit form if after validation error = false
    if(!error) {
        document.myForm.submit();
    }
	else
	{
		return false;
	}
  }




function validateSearchForm() {
    var input = document.SearchForm;    // Your form name
    var error = false;              // No erros by default

	
	input.Keyword.className = 'TopNavTextField';


    if(input.Keyword.value == '' || input.Keyword.value == 'Search') {
        input.Keyword.className = 'inputError TopNavTextField';
        error = true;
    }

    // Submit form if after validation error = false
    if(!error) {    document.myForm.submit();   }
	else{return false;}
  }
  

function validateSubscribeForm() {
    var input = document.SubscribeForm;    // Your form name
    var error = false;              // No erros by default

	
	input.Email.className = 'textBox';


    if(input.Email.value == '' || input.Email.value == 'Enter your email id') {
        input.Email.className = 'inputError textBox';
        error = true;
    }

    // Submit form if after validation error = false
    if(!error) {    document.myForm.submit();   }
	else{return false;}
  }
  
  
function validateCustomerServiceContactUsForm() {
    var input = document.CustomerServiceContactUsForm;    // Your form name
    var error = false;              // No erros by default

	
	input.firstname.className = 'bigTextField';
	input.lastname.className = 'bigTextField';
	input.email.className = 'bigTextField';
	input.mobileCountryCode.className = 'smallTextField';
	input.mobileAreaCode.className = 'smallTextField';
	input.mobileNumber.className = 'mediumTextField';
	input.captcha.className = 'bigTextField';
	
	document.getElementById('lbl_firstname').className = '';
	document.getElementById('lbl_lastname').className = '';
	document.getElementById('lbl_email').className = '';
	document.getElementById('lbl_mobileNo').className = '';
	document.getElementById('lbl_mobileNo').className = '';
	document.getElementById('lbl_mobileNo').className = '';
	document.getElementById('lbl_captcha').className = '';	


    if(input.firstname.value == '') {
        input.firstname.className = 'inputError bigTextField';
		document.getElementById('lbl_firstname').className= 'errorLabel';
        error = true;
    }
	
    if(input.lastname.value == '') {
        input.lastname.className = 'inputError bigTextField';
		document.getElementById('lbl_lastname').className= 'errorLabel';
        error = true;
    }
    if(input.email.value == '') {
        input.email.className = 'inputError bigTextField';
		document.getElementById('lbl_email').className= 'errorLabel';
        error = true;
    }
    if(input.mobileCountryCode.value == '' || input.mobileCountryCode.value=='Country Code') {
        input.mobileCountryCode.className = 'inputError smallTextField';
		document.getElementById('lbl_mobileNo').className= 'errorLabel';
        error = true;
    }	
    if(input.mobileAreaCode.value == ''|| input.mobileAreaCode.value=='Area Code') {
        input.mobileAreaCode.className = 'inputError smallTextField';
		document.getElementById('lbl_mobileNo').className= 'errorLabel';
        error = true;
    }

    if(input.mobileNumber.value == ''|| input.mobileNumber.value=='Number') {
        input.mobileNumber.className = 'inputError mediumTextField';
		document.getElementById('lbl_mobileNo').className= 'errorLabel';
        error = true;
    }
	
    if(input.captcha.value == '') {
        input.captcha.className = 'inputError bigTextField';
		document.getElementById('lbl_captcha').className= 'errorLabel';
		
        error = true;
    }	


// Submit form if after validation error = false
    if(!error) {    document.myForm.submit();   }
	else{return false;}
  }
  


function validateCustomerServiceRegisterForNewsletterForm() {
    var input = document.CustomerServiceRegisterForNewsletterForm;    // Your form name
    var error = false;              // No erros by default

	//alert('tttet');
	input.firstname.className = 'bigTextField';
	input.lastname.className = 'bigTextField';
	input.email.className = 'bigTextField';
	input.mobileCountryCode.className = 'smallTextField';
	input.mobileAreaCode.className = 'smallTextField';
	input.mobileNumber.className = 'mediumTextField';
	input.nationality.className = 'bigTextField';
	
	document.getElementById('lbl_firstname').className = '';
	document.getElementById('lbl_lastname').className = '';
	document.getElementById('lbl_email').className = '';
	document.getElementById('lbl_mobileNo').className = '';
	document.getElementById('lbl_mobileNo').className = '';
	document.getElementById('lbl_mobileNo').className = '';
	document.getElementById('lbl_nationality').className = '';	


    if(input.firstname.value == '') {
        input.firstname.className = 'inputError bigTextField';
		document.getElementById('lbl_firstname').className= 'errorLabel';
        error = true;
    }
	
    if(input.lastname.value == '') {
        input.lastname.className = 'inputError bigTextField';
		document.getElementById('lbl_lastname').className= 'errorLabel';
        error = true;
    }
    if(input.email.value == '') {
        input.email.className = 'inputError bigTextField';
		document.getElementById('lbl_email').className= 'errorLabel';
        error = true;
    }
    if(input.mobileCountryCode.value == '' || input.mobileCountryCode.value=='Country Code') {
        input.mobileCountryCode.className = 'inputError smallTextField';
		document.getElementById('lbl_mobileNo').className= 'errorLabel';
        error = true;
    }	
    if(input.mobileAreaCode.value == ''|| input.mobileAreaCode.value=='Area Code') {
        input.mobileAreaCode.className = 'inputError smallTextField';
		document.getElementById('lbl_mobileNo').className= 'errorLabel';
        error = true;
    }

    if(input.mobileNumber.value == ''|| input.mobileNumber.value=='Number') {
        input.mobileNumber.className = 'inputError mediumTextField';
		document.getElementById('lbl_mobileNo').className= 'errorLabel';
        error = true;
    }
	
    if(input.nationality.value == '') {
        input.nationality.className = 'inputError bigTextField';
		document.getElementById('lbl_nationality').className= 'errorLabel';
		
        error = true;
    }	


// Submit form if after validation error = false
    if(!error) {    document.myForm.submit();   }
	else{return false;}
  }
  
  
  
  function validateCareersRegistrationForm() {
    var input = document.CareersRegistrationForm;    // Your form name
    var error = false;              // No erros by default

	//alert('tttet');
	input.firstname.className = 'bigTextField';
	input.lastname.className = 'bigTextField';
	input.email.className = 'bigTextField';
	input.mobileCountryCode.className = 'smallTextField';
	input.mobileAreaCode.className = 'smallTextField';
	input.mobileNumber.className = 'mediumTextField';
	input.datex.className = 'smallTextField';
	input.month.className = 'smallTextField';
	input.year.className = 'mediumTextField';	
	input.nationality.className = 'bigTextField';

	document.getElementById('lbl_firstname').className = '';
	document.getElementById('lbl_lastname').className = '';
	document.getElementById('lbl_email').className = '';
	document.getElementById('lbl_mobileNo').className = '';
	document.getElementById('lbl_mobileNo').className = '';
	document.getElementById('lbl_mobileNo').className = '';
	document.getElementById('lbl_dob').className = '';
	document.getElementById('lbl_nationality').className = '';	


    if(input.firstname.value == '') {
        input.firstname.className = 'inputError bigTextField';
		document.getElementById('lbl_firstname').className= 'errorLabel';
        error = true;
    }
	
    if(input.lastname.value == '') {
        input.lastname.className = 'inputError bigTextField';
		document.getElementById('lbl_lastname').className= 'errorLabel';
        error = true;
    }
    if(input.email.value == '') {
        input.email.className = 'inputError bigTextField';
		document.getElementById('lbl_email').className= 'errorLabel';
        error = true;
    }
	
    if(input.datex.value == '' || input.datex.value=='Date') {
        input.datex.className = 'inputError smallTextField';
		document.getElementById('lbl_dob').className= 'errorLabel';
        error = true;
    }	
    if(input.month.value == ''|| input.month.value=='Month') {
        input.month.className = 'inputError smallTextField';
		document.getElementById('lbl_dob').className= 'errorLabel';
        error = true;
    }

    if(input.year.value == ''|| input.year.value=='Year') {
        input.year.className = 'inputError mediumTextField';
		document.getElementById('lbl_dob').className= 'errorLabel';
        error = true;
    }	
	
    if(input.mobileCountryCode.value == '' || input.mobileCountryCode.value=='Country Code') {
        input.mobileCountryCode.className = 'inputError smallTextField';
		document.getElementById('lbl_mobileNo').className= 'errorLabel';
        error = true;
    }	
    if(input.mobileAreaCode.value == ''|| input.mobileAreaCode.value=='Area Code') {
        input.mobileAreaCode.className = 'inputError smallTextField';
		document.getElementById('lbl_mobileNo').className= 'errorLabel';
        error = true;
    }

    if(input.mobileNumber.value == ''|| input.mobileNumber.value=='Number') {
        input.mobileNumber.className = 'inputError mediumTextField';
		document.getElementById('lbl_mobileNo').className= 'errorLabel';
        error = true;
    }
	
    if(input.nationality.value == '') {
        input.nationality.className = 'inputError bigTextField';
		document.getElementById('lbl_nationality').className= 'errorLabel';
		
        error = true;
    }	


// Submit form if after validation error = false
    if(!error) {    document.myForm.submit();   }
	else{return false;}
  }
  
  
 function validateCommentsForm() {
    var input = document.CommentsForm;    // Your form name
    var error = false;              // No erros by default

	
	input.name.className = 'textField';
	input.email.className = 'textField';
	input.comments.className = 'textArea';

    if(input.name.value == '') {
        input.name.className = 'inputError textField';
		document.getElementById('lbl_name').className= 'errorLabel';
        error = true;
    }
	
	 if(input.email.value == '') {
        input.email.className = 'inputError textField';
		document.getElementById('lbl_email').className= 'errorLabel';
        error = true;
    }
	
	 if(input.comments.value == '') {
        input.comments.className = 'inputError textArea';
		document.getElementById('lbl_comments').className= 'errorLabel';
        error = true;
    }
	

    // Submit form if after validation error = false
    if(!error) {
        document.myForm.submit();
    }
	else
	{
		return false;
	}
  }