// ----------------------------------------------------
// OPEN DISCLAIMER WINDOW 
// ----------------------------------------------------
// Creates a popup window and displays the disclaimer
// --------------------------------------------------
function ShowDisclaimer(url){
  var scroll = true
  var w = 640, h = 480;
  var popW = 350, popH = 200
  var win
  
  if (document.all) {
     /* the following is only available after onLoad */
     w = document.body.clientWidth;
     h = document.body.clientHeight;
  }
  else if (document.layers) {
     w = window.innerWidth;
     h = window.innerHeight;
  }


	// only allow one window to be open
	if (win != null && win.open) win.close(); 

	scr = ((scroll) ? "scrollbars," : "");
	win = window.open(url,'','scrollbars,'+'width=' + popW + ',height='+popH+',top='+(h-popH)/2+',left='+(w-popW)/2);
	
  	if (!win.opener)
         win.opener = self; 
}

// ------------------------------------------------------------
// OPEN URL
// ------------------------------------------------------------
// Open a new window for all links outside the Clerk's Web Site
// ------------------------------------------------------------
function OpenURL(url) {
	window.open(url)
}

// ----------------------------------------------------
// CHANGE COLORS
// ----------------------------------------------------
// Changes button color on mouseover/mouseout
// --------------------------------------------------
function change(color){
	event.srcElement.style.backgroundColor = color
}

// ----------------------------------------------------
// FORCE RELOAD
// ----------------------------------------------------
// NETSCAPE DOESN"T Always refresh the menus
//
// Note: this adds the time to the URL and on each page,
//       this time is checked against current time to 
//       determine whether to reload the page
//
function forceReload() {
	if (document.all) {
       	// DO NOTHING  location.replace(location.href + '?' + (new Date()).getTime());
    	} else {
       		location.href = location.href + '?' + (new Date()).getTime();
	}
}

// this variable is set by the calling page
var pageLevel

function doSearch() {
//alert("Not yet implemented.")
//return
	if (document.frmSearch.txtSearch.value == "") {	
		alert("Please enter a word to search for.")
		return
	}
	if (pageLevel == "TOP") {
		document.location.href = "_siteSearch/searchHandler.asp?WORDS=" + document.frmSearch.txtSearch.value
	}else{
		document.location.href = "../_siteSearch/searchHandler.asp?WORDS=" + document.frmSearch.txtSearch.value
	}

}

