function toggleIn(context, dir, selected) {
	
	var classname=document.getElementById(context);
	if (selected == false) {
	classname.src="/img/" + dir + "/" + context + "_selected.gif";
	}
	
}

function toggleOut(context, dir, selected) {
	
	var classname=document.getElementById(context);
	if (selected == false) {
	classname.src="/img/" + dir + "/" + context + ".gif";
	}
}

function toggleDisplay(atitle, elementId) {
	var element=document.getElementById(elementId);
	var href=document.getElementById(atitle);
	
	if (element.style.display == 'block' || element.style.display=='') { 
		
		element.style.display='none';
		href.innerHTML='Hide Attorney Listing';
	}

	else if (element.style.display == 'none') {
		element.style.display ='block';
		href.innerHTML='Show Attorney Listing'; 
	}
	
	
}

function swapContent(hide, show) {
	var contentToHide=document.getElementById(hide);
	var contentToShow=document.getElementById(show);
	
		contentToHide.style.display='none';
		contentToShow.style.display='block';
	
	
	
}



function openWind(pageName,winName,params)
  {
    winName = open(pageName,winName,params);
    winName.focus();
  }
function rollover(img_name, img_src) { document[img_name].src = img_src; }
	function rolloff(img_name, img_src) { document[img_name].src = img_src; }
	function goto_URL() { window.location.href = document.FormName.PracticeArea.value; }
	function openWind(pageName,winName,params) { winName = open(pageName,winName,params); winName.focus();}
    
    function addaP(val)
      {
        val.value = val.value + "<p>";
        val.focus();
      }
    
    function begI(val)
      {
        val.value = val.value + "<i>";
        val.focus();
      }
    
    function endI(val)
      {
        val.value = val.value + "<\/i>";
        val.focus();
      }
    function addLB(val)
      {
        val.value = val.value + "<br>";
        val.focus();
      }
      
    function markSelection (txtObj) 
      {
        if (txtObj.createTextRange) 
          {
             txtObj.caretPos = document.selection.createRange().duplicate();
             isSelected = true;
          }
      }

    function insertTag (txtName,tag,enclose) 
      {
        var closeTag = tag;
        /*if (enclose) 
          {
             var attribSplit = tag.indexOf ( ' ' );
             if ( tag.indexOf ( ' ' ) > -1 )
             closeTag = tag.substring ( 0, attribSplit );
          }*/
        var txtObj = eval ( txtName );
             if (txtObj.createTextRange && txtObj.caretPos) 
               {
                  var caretPos = txtObj.caretPos;
                  caretPos.text = ( ( enclose ) ? "<"+tag+">"+caretPos.text+"</"+closeTag+">" : "<"+tag+">"+caretPos.text );
                  markSelection ( txtObj );
                  if ( txtObj.caretPos.text=='' ) 
                     {
                       isSelected=false;
                       txtObj.focus();
                    }
               }
          
        }

function confirmDelete() {
if (confirm("By clicking 'Yes', this item will be permanently deleted.  Proceed?")) {
return true;
} else {
return false;
}
}