// expand
  function shrink (bin) {
//    return(bin);

    return(bin.length + ':' + b2h(bin));
  }

  function expand(string) {
//    return(string);

    if (string == null) {return null;}
    var p = string.indexOf(':', 0);
    var l = string.substring(0, p);
    var v = string.substring(p+1, string.length);
    var s = h2b(v);
    if (l > s.length) {
      for(var i = 0; i < l - s.length; i++) {
        s = '0' + s;
      }
    } else {
      s = s.substring(s.length-l, s.length);
    }
    return s;
  }

  function reverse_string (string) {
    var a = new Array(string.length);
    for(var i = 0; i < string.length; i++) {
      a[string.length - i - 1] = string.substring(i, i+1);
    }
    var s = '';
    for(var i = 0; i < a.length; i++) {
      s += a[i];
    }
    return s;
  }

  function b2h (string) {
    var r = reverse_string(string);
    var start = 0;
    var tmp;
    var h = ''
    while (r.length >= 4) {
      h = b2h4(reverse_string(r.substring(0, 4))) + h;
      r = r.substring(4, r.length);
    }
    var j = 4 - r.length;
    for (var i = 0; i < j; i++) {
      r += '0';
    }
    h = b2h4(reverse_string(r)) + h;
    return h;
  }

  function b2h4 (string) {
    if(string == '0000') {return '0'};
    if(string == '0001') {return '1'};
    if(string == '0010') {return '2'};
    if(string == '0011') {return '3'};
    if(string == '0100') {return '4'};
    if(string == '0101') {return '5'};
    if(string == '0110') {return '6'};
    if(string == '0111') {return '7'};
    if(string == '1000') {return '8'};
    if(string == '1001') {return '9'};
    if(string == '1010') {return 'a'};
    if(string == '1011') {return 'b'};
    if(string == '1100') {return 'c'};
    if(string == '1101') {return 'd'};
    if(string == '1110') {return 'e'};
    if(string == '1111') {return 'f'};
    return ''; // return empty string to avoid error in Netscape 4.05.
  }

  function h2b (string) {
    var b = '';
    for(var i = 0; i < string.length; i++) {
      b += h2b1(string.substring(i, i+1));
    }
    return b;
  }

  function h2b1 (c) {
    if (c == '0') {return '0000'};
    if (c == '1') {return '0001'};
    if (c == '2') {return '0010'};
    if (c == '3') {return '0011'};
    if (c == '4') {return '0100'};
    if (c == '5') {return '0101'};
    if (c == '6') {return '0110'};
    if (c == '7') {return '0111'};
    if (c == '8') {return '1000'};
    if (c == '9') {return '1001'};
    if (c == 'a') {return '1010'};
    if (c == 'b') {return '1011'};
    if (c == 'c') {return '1100'};
    if (c == 'd') {return '1101'};
    if (c == 'e') {return '1110'};
    if (c == 'f') {return '1111'};
    return ''; // return empty string to avoid error in Netscape 4.05.
  }

// init
  function IE5OR6() {
	if (navigator.appName == "Microsoft Internet Explorer") {
		var apv = navigator.appVersion;
		if (parseInt(apv.substring(apv.indexOf("MSIE ")+"MSIE ".length)) >= 5) {
			return true;
		}
	}
	return false;
  }

  function initState (index, intacc) {
   // 2007.6.13 for V1.4
   if (document.search.seek) {
	document.search.seek.focus();
   }

  }

  if (ua == 'lay') {
    window.onResize = location.reload;
  }
