// JavaScript Document

var viewportwidth;
var viewportheight;
var divTag;
var dimmer;
var addy;
var isOpen = false;
 
var disclaimer="<h3 style='margin-left:0;'>EMAIL DISCLAIMER</h3><p>The materials provided in this web site are for informational purposes only and are not for the purpose of providing legal advice. Transmission of information from the Stark and Knoll web site is not intended to create, and its receipt by you does not create an attorney-client relationship with Stark and Knoll or any of its individual attorneys or personnel.</p><p>If you are not currently a client of Stark and Knoll, and you elect to communicate with the firm, or any of its attorneys, through this web site, do not transmit any information about any matter (and particularly not information you regard as confidential) that may involve you until the firm has agreed to represent you, and you have received confirmation of that fact in the form of a written engagement letter. Any information transmitted to Stark and Knoll through this website by persons who are not currently clients will not be treated as confidential until the firm's retention has been confirmed in a written engagement letter.</p><p>The foregoing limits on confidentiality do not apply to communications sent by current clients.</p><p>Please accept to continue with email</p><p><a href='javascript:sendEmail()'>ACCEPT</a> | <a href='javascript:closeBox()'>CANCEL</a></p>";

function email(a)
{
	if(isOpen==false)
	{
		addy = a;
	    getDimensions();
		
	    divTag = document.createElement("div");
		dimmer = document.createElement("div");
		
		dimmer.id = "dim";
       
        divTag.id = "div1";
       
        divTag.style.margin = "0px auto";
		divTag.style.padding = "20px"
		divTag.style.width = "560px";
        divTag.style.height = "400px";
		divTag.style.background = "#fff";
		divTag.style.border = "5px solid #000";
		divTag.style.position = "fixed";
		divTag.style.zIndex = "9999999";
		divTag.style.top = viewportheight/2 - 220+"px";
		divTag.style.left = viewportwidth/2 - 300+"px";
		
        divTag.className ="dynamicDiv";
		dimmer.className ="overlay";
       
        divTag.innerHTML = disclaimer;
       
	    document.body.appendChild(dimmer);
        document.body.appendChild(divTag);

		isOpen = true;
	}
}

function closeBox()
{
	document.body.removeChild(divTag);
	document.body.removeChild(dimmer);
	isOpen=false;
}

function sendEmail()
{
	closeBox();
	window.location = ("mailto:"+addy);
}

 function getDimensions()
 {
 
	 // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
 
	 if (typeof window.innerWidth != 'undefined')
 	{
   		 viewportwidth = window.innerWidth,
     	 viewportheight = window.innerHeight
	 }
 
	// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)

	 else if (typeof document.documentElement != 'undefined'
   		  && typeof document.documentElement.clientWidth !=
    	 'undefined' && document.documentElement.clientWidth != 0)
 	{
     	  viewportwidth = document.documentElement.clientWidth,
     	  viewportheight = document.documentElement.clientHeight
	 }
 
 	// older versions of IE
 
 	else
 	{
       viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
       viewportheight = document.getElementsByTagName('body')[0].clientHeight
 	}
	
 }
 
 function emailAlert(addy)
{
	var r=confirm(disclaimer);
	if (r==true)
  	{
 		 window.location = ("mailto:"+addy);
  	}
}

function alertSignup(group)
{
	if(group=="estate")
	{
		window.location = ("mailto:estevens@stark-knoll.com?subject=Estate and Probate Group - Email Sign-up&body=Please sign me up for email alerts from the Estate Planning and Probate Group.");
	}
	else if(group=="business")
	{
		window.location = ("mailto:estevens@stark-knoll.com?subject=Business Services Group - Email Sign-up&body=Please sign me up for email alerts from the Business Services Group.");
	}
	else if(group=="litigation")
	{
		window.location = ("mailto:estevens@stark-knoll.com?subject=Litigation and Employment Group - Email Sign-up&body=Please sign me up for email alerts from the Litigation and Employment Group.");
	}
	else if(group=="sk-transitional")
	{
		window.location = ("mailto:estevens@stark-knoll.com?subject=SK Transitional - Email Sign-up&body=Please sign me up for email alerts from S-K Transitional.");
	}
}
	

	
