
function __Form_input_by_name(name, index) { 

                                                try {

							var input_ret;
							var input_collection = document.getElementsByName(name);

							if ( !isNaN(index) ) {
								input_ret = input_collection[index];
							}
							else {
								if ( input_collection.length > 1 ) {
									input_ret = input_collection;
								}
								else {
									input_ret = input_collection[0];
								}
							}

							return input_ret;
                                                }
                                                catch (e) {
                                                        return null;
                                                }

					}

function validate_form_Contact_main() {

	var cur_input;

	try {
		//--------contact_name-------//

if ( cur_input = __Form_input_by_name('contact_name') ) {
							if ( (cur_input.value == '' ) ) { 

			alert('Please enter your name');
if ( typeof(cur_input.focus) != 'undefined' ) {
										try { cur_input.focus(); } catch(e) {} 
								       }
			if ( typeof(validation_hook_false) == 'function' ) { validation_hook_false(); }

			return false;
}
}
//--------end contact_name-------//

		//--------email_address-------//

if ( cur_input = __Form_input_by_name('email_address') ) {
							if ( (cur_input.value == '' ) ) { 

			alert('Please enter your email address');
if ( typeof(cur_input.focus) != 'undefined' ) {
										try { cur_input.focus(); } catch(e) {} 
								       }
			if ( typeof(validation_hook_false) == 'function' ) { validation_hook_false(); }

			return false;
}
}
//--------end email_address-------//

		//--------comments-------//

if ( cur_input = __Form_input_by_name('comments') ) {
							if ( (cur_input.value == '' ) ) { 

			alert('Please enter your comments or question');
if ( typeof(cur_input.focus) != 'undefined' ) {
										try { cur_input.focus(); } catch(e) {} 
								       }
			if ( typeof(validation_hook_false) == 'function' ) { validation_hook_false(); }

			return false;
}
}
//--------end comments-------//


if ( typeof(validation_hook_true) == 'function' ) { if ( validation_hook_true() ) { return true; } else { if ( typeof(validation_hook_false) == 'function' ) { validation_hook_false(); }

 return false; } }
	}
	catch(e) {
		return true;
	}
	return true;
}


