Lead Routing Required field checking

There are 2 defined methods in this JavaScript include file:

<script>
function initSetup() {
    if ($('theater_id').value > 0) {
        theaterChange($('theater_id').value, true);
    }
}
function checkRequired() {
	var msg = '';
	if( $('company').value == '' ) {
		msg+= '- Please enter a Company Name\n';
	}
	if( $('contact').value == '' ) {
		msg+= '- Please enter a Contact\n';
	}
	if( $('email').value == '' ) {
		msg+= '- Please enter an E-mail Address\n';
	}
	if( $('phone1').value == '' ) {
		msg+= '- Please enter a Phone Number\n';
	}
        if( $('countryCode').value == '' ) {
		msg+= '- Please select a Country\n';
	}
	if(msg.length > 0) {
		alert('The following issues were found...\n\n'+msg);
		return false;
	} else {
		$('editForm').submit();
	}
}
</script>