function submitEmrcRemoteForm() {
	var _dispErrors = '';
	var errFlag = new Array();

	/**
	* Do lite form checks
	*/
	// Check first name
	if (document.getElementById('emrc-fname').value.length < 1 && !errFlag['fname']) {
		errFlag['fname'] = true;
		_dispErrors = _dispErrors + '\n    - First Name';
		document.getElementById('emrc-fname').style.border = "2px solid #934545";
	}
	if (!errFlag['fname']) {
		document.getElementById('emrc-fname').style.border = "";
	}

	// Check last name
	if (document.getElementById('emrc-lname').value.length < 1 && !errFlag['lname']) {
		errFlag['lname'] = true;
		_dispErrors = _dispErrors + '\n    - Last Name';
		document.getElementById('emrc-lname').style.border = "2px solid #934545";
	}
	if (!errFlag['lname']) {
		document.getElementById('emrc-lname').style.border = "";
	}

	// Check practice name
	if (document.getElementById('emrc-pname').value.length < 1 && !errFlag['pname']) {
		errFlag['pname'] = true;
		_dispErrors = _dispErrors + '\n    - Practice Name';
		document.getElementById('emrc-pname').style.border = "2px solid #934545";
	}
	if (!errFlag['pname']) {
		document.getElementById('emrc-pname').style.border = "";
	}

	// Check specialty
	if (document.getElementById('emrc-specialty').value == 0 && !errFlag['specialty']) {
		errFlag['specialty'] = true;
		_dispErrors = _dispErrors + '\n    - Medical Specialty';
		document.getElementById('emrc-specialty').style.border = "2px solid #934545";
	}
	if (!errFlag['specialty']) {
		document.getElementById('emrc-specialty').style.border = "";
	}

	// Check number of physicians
	if (document.getElementById('emrc-physicians').value.length < 1 && !errFlag['physicians']) {
		errFlag['physicians'] = true;
		_dispErrors = _dispErrors + '\n    - Number of Physicians';
		document.getElementById('emrc-physicians').style.border = "2px solid #934545";
	}
	if (!errFlag['physicians']) {
		document.getElementById('emrc-physicians').style.border = "";
	}

	// Check email validation
	var regex = /^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
	saidEmail = document.getElementById('emrc-email').value;
	if (saidEmail.length < 4 && !errFlag['email']) {
		errFlag['email'] = true;
		_dispErrors = _dispErrors + '\n    - Email';
		document.getElementById('emrc-email').style.border = "2px solid #934545";
	} else if (!errFlag['email']) {
		if (regex.test(saidEmail) == false) {
			errFlag['email'] = true;
			_dispErrors = _dispErrors + '\n    - Invalid Email. Email must be in a valid format.';
		}
	}
	if (!errFlag['email']) {
		document.getElementById('emrc-email').style.border = "";
	}

	// Check phone
	if (document.getElementById('emrc-phone').value.length < 10 && !errFlag['phone']) {
		errFlag['phone'] = true;
		_dispErrors = _dispErrors + '\n    - Phone';
		document.getElementById('emrc-phone').style.border = "2px solid #934545";
	}
	if (!errFlag['phone']) {
		document.getElementById('emrc-phone').style.border = "";
	}

	// If we have any errors lets notify them
	if (_dispErrors != '') {
		// _dispErrors = 'Invalid information entered.' + _dispErrors;
		_dispErrors = 'Some fields are required.\nPlease enter:' + _dispErrors;
		_dispErrors = _dispErrors + '\n\nPlease correct these fields.';
		alert(_dispErrors);
		return false;
	}

	/**
	* If we made it this far we are good to go!
	*
	* Make element changes that need to be updated for the submit below here if needed
	*/
	if (document.getElementById('emrc-phone-ext').value.length > 0) {
		document.getElementById('emrc-phone-data').value = document.getElementById('emrc-phone').value + 'x' + document.getElementById('emrc-phone-ext').value;
	} else {
		document.getElementById('emrc-phone-data').value = document.getElementById('emrc-phone').value;
	}

	return true;
}

document.write('<div id="emrc-form-container-horizontal">');
document.write('<style>');
document.write('#emrc-remote-form { margin: 0; border: 0; font: normal 12px Arial;	color: #444; padding: 0;}');
document.write('#emrc-remote-form tr { padding: 10px; margin: 0; border: 0; list-style: none; font: normal 12px Arial; color: #444; }');
document.write('#emrc-remote-form td { margin: 0 0 10px 0; }');
document.write('#emrc-remote-form td label {display: block; font-weight:bold;}');
document.write("#emrc-remote-form td input[type='text'] { padding: 4px; border: 1px solid #ccc; color: #444; width:195px;}");
document.write('#emrc-remote-form td select { padding: 4px; border: 1px solid #ccc; color: #444; width:205px;}');
document.write('#emrc-phone {width:125px !important;}');
document.write('#emrc-phone-ext {width:24px !important;}');
document.write("#emrc-remote-form td input[type='submit'] {background: #2261a6; border: none; font: bold 16px Arial; padding:6px; color:#fff;}");
document.write('#emrc-remote-form h2 {padding:6px;margin:4px;font:normal 14px Arial; text-align:center;background:#2261a6;color:#fff;}');
document.write('#emrc-remote-form p {padding:10px 10px 0 10px ;margin:0;}');
document.write('</style>');

document.write('<form method="post" id="emrc-remote-form" action="http://www.emrconsultant.com/index.php" onsubmit="return submitEmrcRemoteForm();">');
document.write('<img src="http://www.emrconsultant.com/_emr_consultant/images/form_logo.png" style="margin:10px;"/>');
document.write('<h2>Analyzing 200+ EMRs</h2>');
document.write('<p>Trusted by over 10,000 Physicians &amp; Administrators</p>');
document.write('<table border="0" cellpadding="2" cellspacing="2">');
document.write('<tr>');
document.write('<td><label>First Name</label></td>');
document.write('<td><input type="text" name="32" id="emrc-fname"/></td>');
document.write('<td><label>Last Name</label></td>');
document.write('<td><input type="text" name="147" id="emrc-lname" /></td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td><label>Practice Name</label></td>');
document.write('<td><input type="text" name="34" id="emrc-pname"/></td>');
document.write('<td><label>Medical Specialty</label></td>');
document.write('<td><select name="4" id="emrc-specialty">');
document.write('<option value="0">- Please Select</option><option value="9050">Allergy</option><option value="9015">Anesthesiology</option><option value="9003">Cardiology</option><option value="9004">Chiropractic</option><option value="9001">Dentistry</option><option value="9006">Dermatology</option><option value="9007">Emergency Medicine</option><option value="9052">Endocrinology</option><option value="9010">Family Medicine</option><option value="9011">Gastroenterology</option><option value="9013">Geriatrics</option><option value="9066">Hospitalist</option><option value="9056">Infectious Disease</option><option value="9045">Int Med Sub-Specialty/Nephrology</option><option value="9017">Internal Medicine</option><option value="9005">Long-Term Care</option><option value="9014">Mental &amp; Behavioral Health / Psychology</option><option value="9048">Multi-Specialty</option><option value="9020">Neurology</option><option value="9008">Neurosurgery</option><option value="9022">Obstetrics and Gynecology</option><option value="9059">Occ Med/Physiatry/Pain Mgmt</option><option value="9018">Oncology - Medical/Hematology</option><option value="9026">Ophthalmology</option><option value="9009">Optometry</option><option value="9027">Orthopedic Surgery</option><option value="9029">Otolaryngology</option><option value="9032">Pediatrics</option><option value="9012">Physical Therapy</option><option value="9061">Plastic Surgery</option><option value="9034">Podiatry</option><option value="9063">Psychiatry</option><option value="9064">Pulmonology</option><option value="9065">Rheumatology</option><option value="9042">Surgery &amp; Surgical Specialties</option><option value="9002">SurgiCenter</option><option value="9051">Urgent Care</option><option value="9070">Urology</option><option value="9100">Not Listed</option>');
document.write('</select></td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td><label>No. of physicians:</label></td>');
document.write('<td><input type="text" name="1" id="emrc-physicians" /></td>');
document.write('<td><label>Email Address</label></td>');
document.write('<td><input type="text" name="41" id="emrc-email" /></td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td><label>Phone Number</label></td>');
document.write('<td><input maxlength="14" name="office-phone" id="emrc-phone" class="phone" type="text"/> ext: <input maxlength="14" name="office-phone-ext" id="emrc-phone-ext" class="phone-ext" type="text"/></td>');
document.write('<td>');
document.write('<input type="hidden" value="" name="is-human" id="required" />');
document.write('<input type="hidden" value="1" name="emrc_remote_form"/>');
document.write('<input type="hidden" value="VoiceRecognition Board" name="form_source"/>');
document.write('<input type="hidden" value="one" name="next_page"/>');
document.write('<input type="hidden" name="40" id="phone-data" value="" />');
document.write('<input type="hidden" name="enc_id" id="enc_id" value="a4f76ac5eda476bf6c68af534a0cd6fa" />');
document.write('<input type="submit" name="submit" id="submit" value="Find My EHR"/>');
document.write('</td>');
document.write('</tr>');
document.write('</table>');
document.write('</form>');
document.write('</div>');