var postinro_validation_fields = new Array();

function d4FormPostinroValidation(error_msg) {
    var arLength = postinro_validation_fields.length;
    for(var i=0 ; i<arLength ; i++) {
        var val = document.getElementById('form-fillin-field-' + postinro_validation_fields[i]).value;
        if(val && !/^\s*\d{5}\s*$/.test(val)) {
            document.getElementById('form-fillin-field-' + postinro_validation_fields[i] + '-label').style.color='red';
            alert(error_msg);
            document.getElementById('form-fillin-field-' + postinro_validation_fields[i]).focus();
            return false;
        } else {
			document.getElementById('form-fillin-field-' + postinro_validation_fields[i] + '-label').style.color='black';
		}
    }
    return true;
}


