  var CONVstrs = new Array('0','X','K','I','4','Z','R','7','8','Y');

  function hidestatus(){
    window.status='';
    return true
  }

  if (document.layers) document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)
  document.onmouseover=hidestatus
  document.onmouseout=hidestatus

  function form2url(form){
    var i=0;
    var newURL = document.forms[form].action;
    for(i=0; i<document.forms[form].elements.length; i++){
      if (i==0){newURL = newURL + '?m:';}else{newURL = newURL + '*';}
      newURL = newURL + hexcode(document.forms[form].elements[i].name) + '|' + hexcode(document.forms[form].elements[i].value);
    }
    return newURL;
  }

  function JavaScriptSubmitForm(form) {
    //window.location = form2url(form);
    document.forms[form].submit()
  }

  function hexnib(d) {
    if(d<10) {
      return CONVstrs[d];
    }else{
      return String.fromCharCode(65+d-10);
    }
  }
  function hexcode(textCONV) {
     var result="";
     for(var i=0;i<textCONV.length;i++) {
        var cc=textCONV.charCodeAt(i);
        var hex=hexnib((cc&240)>>4)+""+hexnib(cc&15);
        result+=hex;
     }
     return result;
  }

  function form_submit(){
    var ii=1;
    var form = '';
    if (arguments.length>1){form=arguments[0];}
    while (ii < arguments.length){
      document.forms[form].elements[arguments[ii]].value=arguments[ii+1];
      ii=ii+2;
    }
    JavaScriptSubmitForm(form);
    return false;
  }

  function submit_popup(form,w,h){
     var OPWND = NewCenterWindow('about:blank','popupWND',w,h,'yes');
     var ii=3;
     var newURL = document.forms[form].action;
     while (ii < arguments.length){
       document.forms[form].elements[arguments[ii]].value=arguments[ii+1];
       ii=ii+2;
     }
     document.forms[form].submit();
     //OPWND.location = form2url(form);
     return false;
  }

  function Set_Cookie(name,value,expires) {
    var today = new Date();
    if (expires.indexOf('y') != -1) today.setFullYear(today.getFullYear()+eval(expires.substr(0,expires.indexOf('y'))));
    if (expires.indexOf('h') != -1) today.setHours(today.getHours()+eval(expires.substr(0,expires.indexOf('h'))));
    if (expires.indexOf('m') != -1) today.setMonth(today.getMonth()+eval(expires.substr(0,expires.indexOf('m'))));
    var exp_date = today.toUTCString();
    var domain   = ""+document.location;
    var secure   = '';
    var path     = '/';
    if (domain.indexOf('https://') != -1) secure=";secure";
    domain = document.domain;
    document.cookie = name  + "="+escape(value) +
                      ";expires="+exp_date      +
                      ";path="   +path          +
                      ";domain=" + domain       +
                      secure;
  }

  function NewCenterWindow(mypage,myname,w,h,scroll){
    var winl = (screen.width-w)/2;
    var wint = (screen.height-h)/2;
    var settings  ='height='+h+',';
        settings +='width='+w+',';
        settings +='top='+wint+',';
        settings +='left='+winl+',';
        settings +='scrollbars='+scroll+',';
        settings +='resizable=yes';
    opened=window.open(mypage,myname,settings);
    if(parseInt(navigator.appVersion) >= 4){opened.window.focus();}
    opener=window;
    return opened;
  }

  function changePerPage() {
    document.PAGESform.SQL_START.value='0';
    document.PAGESform.SQL_PAGE.value=document.TEMPperpageFORM.perPage.options[document.TEMPperpageFORM.perPage.selectedIndex].value;
    JavaScriptSubmitForm('PAGESform');
    return true;
  }

