
jQuery(document).ready(function() {
    
    (function($){
        // call setMask function on the document.ready event
        $(function(){
            $('input:text').setMask();
        });
     })(jQuery);
   
});

function validate_loan() {
	var forminvalid = false;
	var formtext = "";
	formtext = 'Error! Please include the following details:\n\n';
	if (document.applicationform.name.value == "") {
		formtext = formtext + '  - Full Name\n';
		forminvalid = true;
	}    
	if (document.applicationform.last_name.value == "") {
		formtext = formtext + '  - Surname\n';
		forminvalid = true;
	}
	if (document.applicationform.email.value == "") {
		formtext = formtext + '  - Email Address\n';
		forminvalid = true;
	}
	if (document.applicationform.phone.value == "") {
		formtext = formtext + '  - Phone Number';
		forminvalid = true;
	}
	if (forminvalid == true)
	{
		alert(formtext);
		return false;
	}
	else
	{
		return true;
	}
  }

