// JavaScript Document
 //output

function eml(user){
  var domain = "chamberlainmchaney.com";
  var subject = "Subscribe to Texas Updates"; 
  document.write('<a href=\"mailto:' + user + '@' + domain + '?subject=' + subject + '&body=' + '\">'); 
  document.write('David Chamberlain</a>');
}
function eml2(user){
  user1 = user; 
  var domain = "chamberlainmchaney.com";
  var subject = "E-mail from Website"; 
  document.write('<a onclick=\"confirmation()\" href=\"javascript: void(0)\">'); 
  document.write('E-mail</a>');
  return user;
}

function eml3(user){
  user1 = user;
  var domain = "chamberlainmchaney.com";
  var subject = "E-mail from Website"; 
  document.write('<a onclick=\"confirmation()\" href=\"javascript: void(0)\">');
  document.write('e-mail</a>');
}

function eml4(user){
  var domain = "chmc-law.com";
  var subject = "E-mail from Website"; 
  document.write('<a href=\"mailto:' + user + '@' + domain + '?subject=' + subject + '&body=' + '\">'); 
  document.write('E-mail</a>');
}

function confirmation() {
  var domain = "chamberlainmchaney.com";
  var subject = "E-mail from Website"; 
  var mail = "mailto:";
  var at = "@";
  var subject1 = "?subject=";
  var body1 = "&body=";
  var url = mail + user1 + at + domain + subject1 + subject + body1;
   
	var answer = confirm("Please READ BEFORE SENDING YOUR EMAIL. \n\nWe appreciate your visit to our web site and your interest in contacting us by email. First, however, we need to give you this important message: \n\nINFORMATION YOU SEND US BY THIS E-MAIL WILL NOT BE CONFIDENTIAL. \nInformation you send by email through this link is not protected by the attorney-client privilege and is not confidential. Therefore your email should not include confidential information. \n\nCOMMUNICATION TO US BY THIS E-MAIL WILL NOT ESTABLISH AN ATTORNEY-CLIENT RELATIONSHIP WITH THIS FIRM. To obtain legal advice, you must establish anattorney-client relationship with us by signing and returning an engagement letter. Until you do so, we are not your attorney, you are not our client, and nothing you tell us is privileged or confidential. \n\nIf in doubt about whether any information is confidential, please exclude it. By clicking \"OK\" below, you indicate that you have read and understand this Notice. \n\nPlease press OK to send an email; press CANCEL to return to the Web page.")
	if (answer){
			window.location = url
	}
	else{
		alert("E-mail cancelled.")
		window.location = "javascript: void(0)"
	}
}
