function disp(url){
  window.open(url,"window","scrollbars=yes,resizable=yes");
}

function mdisp(url){
  window.open(url,"","scrollbars=yes,resizable=yes");
}

function showTips(nm){
  var style=document.getElementById?
              document.getElementById(nm).style:(
                document.all?document.all(nm).style:(
                  document.layers?document.layers[nm]:null
                  )
              );
  if(style) style.visibility='inherit';
}

function hideTips(nm){
  var style=document.getElementById?
              document.getElementById(nm).style:(
                document.all?document.all(nm).style:(
                  document.layers?document.layers[nm]:null
                  )
              );
  if(style) style.visibility='hidden';
}

function sortData(data,start,end) { 
var x = data[Math.floor((start + end) / 2)]; 
var i = start; 
var j = end; 
while (true) { 
  while (data[i] < x) i++; 
  while (x < data[j]) j--; 
  if (i >= j) break; 
  n = data[i]; 
  data[i] = data[j]; 
  data[j] = n; i++; j--; 
} 
if (start < i-1) sortData(data,start,i-1); 
if (j+1 < end) sortData(data,j+1,end); 
}

function SupCol(n) {
  var varRed;
  var varGre;
  var varBlu;

  n = n + "";

  varRed = parseInt((n.slice(0,2)),16);
  varGre = parseInt((n.slice(2,4)),16);
  varBlu = parseInt((n.slice(4,6)),16);

  varRed = 255 - varRed;
  varGre = 255 - varGre;
  varBlu = 255 - varBlu;

  if (varRed <16 ){varRed = 0 + varRed.toString(16)
  } else { varRed = varRed.toString(16)}
  if (varGre <16 ){varGre = 0 + varGre.toString(16)
  } else { varGre = varGre.toString(16)}
  if (varBlu <16 ){varBlu = 0 + varBlu.toString(16)
  } else { varBlu = varBlu.toString(16)}
  return varRed + varGre + varBlu;
//  n = varRed + varGre + varBlu;
//  m.value = n;
}

function m_win(url,windowname,width,height) {
 var features="location=no, menubar=no, status=yes, scrollbars=yes, resizable=yes, toolbar=no";
 if (width) {
  if (window.screen.width > width)
   features+=", left="+(window.screen.width-width)/2;
  else width=window.screen.width;
  features+=", width="+width;
 }
 if (height) {
  if (window.screen.height > height)
   features+=", top="+(window.screen.height-height)/2;
  else height=window.screen.height;
  features+=", height="+height;
 }
 window.open(url,windowname,features);
}
