function email_verify() {
	var msg = 'We value your interest in Hamilton Brook Smith Reynolds and any communications prompted by your viewing of our website. It is important to us that you understand that transmitting information to us by e-mail does not establish any attorney-client or confidential relationship with us. An attorney-client relationship, and an obligation for us to maintain your communications in confidence, can be created only after proper checks for potential conflicts with current clients are conducted and an agreement of representation is reached.\n\n By clicking \"OK,\" you acknowledge that, unless you are a current client of Hamilton Brook Smith Reynolds, we have no obligation to maintain the confidentiality of any information you submit to us.\n\n Thank you for your interest in Hamilton Brook Smith Reynolds.';
	
	return confirm(msg);
}

function email_popup(email_prefix){ 
	window.open('http://68.170.130.169/directory/contact.php?email=' + email_prefix,'_blank','width=450, height=250, toolbars=no, scrollbars=yes, resize=no,');
}

function vcard_popup(name){ 
	window.open('http://68.170.130.169/directory/contact.php?name=' + name,'_blank','width=450, height=250, toolbars=no, scrollbars=yes, resize=no,');
}

function toggle(active_content, hide_content1, hide_content2, active_nav, hide_nav1, hide_nav2) {
	
	var active = document.getElementById(active_content);
	var active_nav = document.getElementById(active_nav);
	var hidden1 = document.getElementById(hide_content1);
	var hidden2 = document.getElementById(hide_content2);
	var hidden_nav1 = document.getElementById(hide_nav1);
	var hidden_nav2 = document.getElementById(hide_nav2);	
	
	if (active) {
		
		if(active.style.display === 'none'){
			active.style.display = 'block';
			active_nav.style.display = 'block';
			hidden1.style.display = 'none';
			hidden2.style.display = 'none';
			hidden_nav1.style.display = 'none';
			hidden_nav2.style.display = 'none';
			
		}
		else{
			active.style.display = 'block';
		}
		
	}

}

function NewWindow(mypage,myname,w,h,scroll,pos){
	if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
	if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
	else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
	win=window.open(mypage,myname,settings);
}


function email_window(url){
	
	var escaped_url = escape(url);
	
	window.open('/email/pop_up.php?url=' + escaped_url,'_blank','width=450, height=470, toolbars=no, scrollbars=yes, resize=yes,');
}


function limitText(limitField, limitCount, limitNum) {
	
	if (limitField.value.length > limitNum) {
		limitField.value = limitField.value.substring(0, limitNum);
	} 
	else {
		limitCount.value = limitNum - limitField.value.length;
	}
}