 /*
 funzioni per il find 
 */
 RegisterScript('t4uFind', 1, 'toscana4u find functions');

    function ShowFind() {
      var txt = document.getElementById("findloc");
      var btn = document.getElementById("showfind");
      if (btn.innerHTML == strings.tool_find) {
        txt.style.display = 'inline';
        var t = new Timeline();
        btn.innerHTML = "&lt;&lt;";
        t.SetAt(0, AnimeJInterp.px(500, 30, txt.style, 'width', 0, 250));
        t.Run();
      } else {
        var t = new Timeline();
        btn.innerHTML = strings.tool_find;
        t.SetAt(0, AnimeJInterp.px(700, 30, txt.style, 'width', 250, 0));
        t.OnEnd = function (d) { txt.style.display = 'none'; }
        t.Run();
      }
    }
    
    function findLocation(e){ //e is event object passed from function invocation
      var characterCode; //literal character code will be stored in this variable

      if(e && e.which){ //if which property of event object is supported (NN4)
        e = e
        characterCode = e.which //character code is contained in NN4's which property
      } else {
        e = event
        characterCode = e.keyCode //character code is contained in IE's keyCode property
      }

      if (characterCode == 13){ //if generated character code is equal to ascii 13 (if enter key)
        map.Find("", document.getElementById("findloc").value);
        return false;
      } else
        return true;
    }
