// JavaScript Document
$(document).ready(function() {
	$('#em1').focus();
	$('form').submit(function () {
	$(':text:not(#em2)').each(function () {
		if ($(this).val().length===0) {
			$(this).after('<span class="redbold"> This field is required!.</span>');
			$(this).next().next('span').remove();
			}
		else {
			$(this).next('span').remove();
			}
	});
	var x = $('#em1').val();
	var y = $('#em2').val();
		if (x != y || y.length===0) {
			$('#em2').after('<span class="redbold"> Email fields must be identical.</span>');
			$(this).next().next('span').remove();
			}
		else {
			$('#em2').next('span').remove();
			}
	var check = $('span.redbold').length;
	if (check > 0 ) {
		return false;
		}
	});
});