
  if (window.addEventListener) {
    window.addEventListener("load", rsContainer, false);
  } else if (window.attachEvent) {
    window.attachEvent("onload", rsContainer);
  } else if (document.getElementById) {
    window.onload=rsContainer;
  }

  function rsContainer () {
    if ( document.getElementById("c-main").offsetHeight < document.getElementById("content").offsetHeight - 30 ) {
      document.getElementById("c-main").style.minHeight = document.getElementById("content").offsetHeight - 62 + "px";
    }
  }

  function ValidateQuery (form) {
    if(form.query.value == "" || form.query.value == null) {
      alert("Please enter your keywords");
      form.query.focus();
      return false;
    }
    return true;
  }

  function AjaxTabView (show,hide,div,url) {
    document.getElementById(show).className = "current";
    document.getElementById(hide).className = "";
    var bcache = (url.indexOf("?") != -1)? "&t=" + new Date().getTime() : "?t=" + new Date().getTime();
    url = url + bcache;
    LoadPage(div,url);
  }


  function LoadPage (container, url) {
    xmlHttp=GetXmlHttpObject();
    if (xmlHttp==null) { return; }
    xmlHttp.onreadystatechange = function () {
      if (xmlHttp.readyState==4) {
        document.getElementById(container).innerHTML=xmlHttp.responseText;
      }
    }
    xmlHttp.open("GET",url,true);
    xmlHttp.send(null);
  }

  function GetXmlHttpObject() {
    var xmlHttp=null;
    try
      {
      xmlHttp=new XMLHttpRequest();
      }
    catch (e)
      {
      try
        {
        xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        }
      catch (e)
        {
        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
      }
    return xmlHttp;
  }

  function WP_File () {
    var ie = document.all;
    if (ie) {
      return true;
    } else {
      alert("You are attempting to open a WordPerfect document using Firefox. Firefox cannot handle this type of document properly.\n\nTo view this document, right click on the document link, select 'Save Link As', and save the document to your computer. Once the download is complete click the 'Open' link next to the document in the Downloads box.");
      return false;
    }
  }

  function expand (ch) {
    var img = ch + "-img";
    if (document.getElementById(ch).style.display=='' || document.getElementById(ch).style.display=='none') {
      document.getElementById(ch).style.display = "block";
      document.getElementById(img).src = "/lawapp/images/minus.gif";
    } else {
      document.getElementById(ch).style.display = "none";
      document.getElementById(img).src = "/lawapp/images/plus.gif";
    }
  }

  function addBookmark (title,url) {
    if (window.sidebar) {
      window.sidebar.addPanel(title, url, "");
    } else if (document.all) {
      window.external.AddFavorite(url, title);
    } else {
      alert("Sorry, but your browser does not support this function.");
    }
  }


