<!--

  //////////////////////////////////////////////////////////////////////////////
  // main functions js functions for the ash website
  //////////////////////////////////////////////////////////////////////////////
  
  function bookmarkPage() {
    if (window.sidebar) { // Moz
      window.sidebar.addPanel(document.title, location.href,"");
    } else if (window.external) { // IE
      window.external.AddFavorite(location.href,document.title);
    } else {
      alert("Your browser doesn't support adding bookmarks automatically sorry!\n\n Please try pressing Ctrl + D.");
    }
  }

  function clearSearch(el) {
    if (el.value == "Search") el.value = "";
    el.className = "topsearchforminputon";
  }

  function setSearch(el) {
    if (el.value=="") el.value = "Search";
    el.className = "topsearchforminput";
  }

  function setGoogleSearch(el) {
    query = getGoogleQuery();
    el.value = unescape(query.replace('+', ' '));
    el.className = "topsearchforminputon";
  }

  function getGoogleQuery() {
    ref = location.href;
    if (ref.indexOf('?') == -1) return;
    si = ref.indexOf('?') + 1;
    li = ref.indexOf('#') - si;
    qs = ref.substr(si, li);
    qsa = qs.split('&');
    for (i=0;i<qsa.length;i++) {
      qsip = qsa[i].split('=');
      if (qsip.length == 1) continue;
      if (qsip[0] == 'q') {
        return qsip[1];
      }
    }
  }

  function getElementsByName_iedomfix(tag, name) {
    var elem = document.getElementsByTagName(tag);
    var arr = new Array();
    for(i = 0,iarr = 0; i < elem.length; i++) {
      att = elem[i].getAttribute("name");
      if(att == name) {
        arr[iarr] = elem[i];
        iarr++;
      }
    }
    return arr;
  }

  function showhidedatesearch(check) {
    if (document.getElementById) {
      check = document.getElementById(check);

      if (check.checked == false) {
        div = document.getElementById('datediv');

        if (div.style.display == "none") {
          div.style.display = "";
        } else { 
          div.style.display = "none"; 
        } 
      }
    } 
  } 

//-->