// SpamProof jscript methods
//To be used to prevent spammers from grabbing email addresses from a website
//
//Example:
//For more information contact our <Script language="JavaScript">PrintMail('sales','hubbardone.com','Sales')</SCRIPT> department.
//results: For more information contact our sales department.
//	where sales will be a link to mailto.
var strConfirmText = 'Before you continue to send an email to Edwards Wildman, please note:  Please do not include any information in this email that you or someone else considers to be confidential.  Recognize that any information that you submit will not preclude any lawyer in our Firm from representing a party directly adverse to you, in any matter where that information is relevant, even if that information is highly confidential and could be used against you  and even if it is transmitted in a good faith effort to retain us.  If you communicate with us through this website and/or blog in connection with a matter for which we do not presently represent you, we cannot represent you until we know that doing so will not create a conflict-of-interest.  Please be aware that we are under no obligation to keep any information you send us confidential.  Only when you enter into an engagement letter with our Firm will you be our client. We may then freely exchange information with attorney/client privileges. \n\r\n\rFurthermore, if you are communicating with us through our blog, we are not obligated to keep comments sent confidential.  Information sent may be used in future blog postings.';
function  SendMail(n,d){
    if (confirm(strConfirmText)) {
	    document.location.href='mailto:' + n + '@' + d;
	}
}

function  blogSendMail(n){
    if (confirm(strConfirmText)) {
        var strReplace = n.replace(/--/g, "'");        
	    document.location.href='mailto:' + strReplace;
	}
}

function blogEmailThisPage()
{
    //document.location.href='mailto:?body=' + escape(body) + "&subject=" + escape(subject);
    window.open("/emailblog.aspx?link=" + escape(location.href),"Email","width=435,height=500,status=0,location=0,scrollbars");
}

function xSendMail(name, domain){
	var BaseOptions = 'width=400,height=400,status=no,scrollbars=yes,resizeable=yes';
    var win = window.open('/emDisclaimer.aspx?n=' + name + '&d=' + domain,'_new', BaseOptions);
}

function PrintMail(n,d,m){
	PrintMail(n,d,m,'');
}	

function PrintMail(n,d,m,l){
	var ns = n.replace("'","\\\'");
	if(m == ""){
		m = n + '@' + d;
	} else {
	    m = m.replace("<at>", "@");
	}
	var ms = m.replace("'","\\\'");
	document.write("<a href=\"JavaScript:SendMail('" + ns + "','" + d + "'); \" onMouseOver=\"self.status='" + ms.replace("<br>", "") + "'; return true;\" onMouseOut=\"self.status=''; return true;\"" + l +">" + m + "</a>");
	return true;
}	

function PrintEmail(name, domain) { 
	document.write(name + "@" + domain);
}

function SendEmail(name, domain){
	document.location.href = "mailto:" + name + "@" + domain;
}

function sMail(s){
    var sx = s.replace("<at>", "@");
    
    var n = sx.substring(0, sx.indexOf("@"));
    var d = sx.substring(sx.indexOf("@")+1);
	m = sx;

    var ns = n.replace("'","\\\'");
	var ms = m.replace("'","\\\'");
	var l = '';

	document.write("<a href=\"JavaScript:SendMail('" + ns + "','" + d + "'); \" onMouseOver=\"self.status='" + ms + "'; return true;\" onMouseOut=\"self.status=''; return true;\"" + l +">" + m + "</a>");
}

function contactus() 
{
    if (confirm(strConfirmText))
        window.location = "/ContactUs/";
}
