function openlink(url, w, h)
    {
      mreplywin = window.open('','mreplywin64','width=' + w + ',height=' + h + ',status=0,resizeable=0');
      mreplywin.location.href = url;
      mreplywin.focus(); // bring our subwindow to the front
      if (mreplywin.opener == null) mreplywin.opener = window;
    }

function clickclack(idn)
 {
  var tbl = document.getElementById(idn+'_table');
  var spn = document.getElementById(idn+'_span');
  var cdp = tbl.style.display;
  if (cdp == 'block')
   {
    tbl.style.display = 'none';
    spn.innerHTML = '[+]';
   } else {
    tbl.style.display = 'block';
    spn.innerHTML = '[-]';
   };
 }    
function recheck(idn)
 {
  var subu = 0;
  var trc = null;
  do {
   subu++;
   trc = document.getElementById(idn+'_trc_' + subu);
  } while (trc && (trc.style.display == 'table-row' || trc.style.display == 'block'));
  if (trc)
  {
   try {
    trc.style.display = 'table-row';
   } catch (err)
   {
    trc.style.display = 'block';
   };
   var trcc = document.getElementById(idn+'_trcc_' + subu);
   trcc.checked = 1;
   subu++;
   trc = document.getElementById(idn+'_trc_' + subu);
   if (!trc)
   {
    var trb = document.getElementById(idn+'_trb');
    trb.style.display = 'none';
   };
  }; 
 } 

function postwithiebugs()
{
 //if (document.charset == "koi8-r")
 //{
  //document.charset = "utf-8";
  //document.charset = "koi8-r";
  //alert(document.forms[0][5].value);
 //};
 document.forms.editform.submit();
}

function agreepost(msg)
{
 if (document.forms.adminmainform && confirm(msg))
  document.forms.adminmainform.submit();
}
 
function selectallcheckboxes(basenameid, baseid)
{
 var el=document.getElementById(basenameid + (baseid++));
 while (el)
 {
   el.checked = ! el.checked
   el=document.getElementById(basenameid + (baseid++));
 };
}
