//<![CDATA[

// These variables are global to the included page
var bIE = false;
var bIE4 = false;
var bIE5 = false;
var bIE55 = false;
var bIE6 = false;
var bNS = false;
var bNS4 = false;
var bNS6 = false;
var bWin = false;
var bMac = false;

var ua = navigator.userAgent;
var an = navigator.appName;

bWin = (ua.indexOf("Win") >= 1);
bMac = (ua.indexOf("Mac") >= 1);

// Is it IE?
bIE = (ua.indexOf("MSIE") >= 1);
if (bIE)
{
    // IE6
    bIE6 = (ua.indexOf("MSIE 6.") >= 1);
    // IE5.5
    bIE55 = (ua.indexOf("MSIE 5.5") >= 1);
    // IE5
    bIE5 = (ua.indexOf("MSIE 5.") >= 1);
    // IE4s
    bIE4 = (ua.indexOf("MSIE 4.") >= 1);
} 
	
if (an == "Netscape")
{
    bNS = true;
        
    var appVer = parseInt(navigator.appVersion);
    if (appVer >= 5) 
		bNS6 = true;
    else if (appVer >= 4) 
		bNS4 = true;
}


				function ProcessEvent(key, target)
			{
				if (key == "13") 
				{
					goSearch()
					return false;
				}
			}
			
			function goSearch()
			{
				if (document.forms[0].goSearchBox.value == "")
				{
					alert("You must enter keywords before searching AOC site.")
					document.forms[0].goSearchBox.focus()
					return
				}
				
				
				document.location.href = "/SearchResult.asp?Keyword=" + document.forms[0].goSearchBox.value + "&Using=1" + "&What=1" + "&StdContent=true" + "&Forms=true" + "&PageSize=10";
			}





function leavingSite()
{
	alert("You are now leaving the Judicial Branch of North Carolina website.  The Judicial Branch is not responsible for content on other websites.");
}

function email(addressEncode)
{
	window.location = "&#109;&#97;&#105;&#108;&#116;&#111;&#58;" + addressEncode
}

function signon()
{
	window.open('http://www1.aoc.state.nc.us/mediatorpublic/signon.do','child','titlebar=0,directories=no,resizable=yes,status=yes,toolbar=no,menubar=no,scrollbars=yes,location=no,top=0,left=0'); 	
}

//]]>