function setValues()
  { 
    var valArray = new Array;
    for (var intLoop=0; intLoop<document.dataForm.length; intLoop++)
      with (document.dataForm[intLoop])
        if (name != "")
          valArray[name] = value;
    window.returnValue = valArray;
    event.returnValue = false;
    window.close();
  }
function esc_exit()
  {
    switch (event.keyCode) {
      case 13:
        setValues();
        break;
      case 27:
        window.close();
        break;
    } 
  }
function data(s_fmt,d)
  {
    var f = function(a)
      { return a<10?"0"+a:a; };
    var r = s_fmt;
    var d = new Date(d);
    var t = r.split(/\.|-|\/|\\| |:/);
    for (var i in t)
      with (d)
      switch (t[i]) {
        case "d":
          r = r.replace("d",f(getDate())); break;
        case "m":
          r = r.replace("m",f(getMonth()+1)); break;
        case "y":
          var w = getYear();
          w = w>100?(new String(w)).substr(2,2):w;
          r = r.replace("y",w); break;
        case "Y":
          r = r.replace("Y",getFullYear()); break;
        case "h":
          var w = getHours();
          if (w>12) w -= 12;
          r = r.replace("h",f(w)); break;
        case "H":
          r = r.replace("H",f(getHours())); break;
        case "i":
          r = r.replace("i",f(getMinutes())); break;
        case "s":
          r = r.replace("s",f(getSeconds())); break;
      }
    return r;
  }
