var appver=0;

function opendoc(name){
    var iHeight=screen.availHeight*0.82;
    var iWidth=screen.availWidth*0.60;	
    var iLeft=screen.availWidth*0.39;
    var base=document.all.tags("BASE")[0];
    var toInfo=0;
    if (base.target=="info"){
	if(parent.frames.length > 0){
	  if(parent.frames(0).name=="tree") toInfo=1;
	}
    }
    if(toInfo==1){
        parent.frames("info").location=name;
    } else {
          var nwin=window.open("",base.target,"scrollbars=yes,toolbar=yes,menubar=yes,status=no,directories=no,location=no,resizable=yes,left="+iLeft+",top=1, width="+iWidth+", height=" + iHeight);
          try {
            prevName=nwin.location.href;
          }
          catch (e) {
            prevName = "dummy.doc";
          } 
          if(prevName == "about:blank") {
            prevName="info.htm";
          }
          nwin=window.open(name,base.target)
          if(getExt(name) == ".htm" && getExt(prevName) == ".htm" ){
            nwin.focus();
        }
    }
}

function getExt(name){
  var ilen=name.length;
  var iExt=name.lastIndexOf(".");
  return name.substring(iExt,iExt+4).toLowerCase();
}

function getAppver(){
  if(appver==0){
    var av=navigator.appVersion;
    var iMSIE=parseInt(av.indexOf("MSIE"));
    if(iMSIE>=1){
      appver=parseInt(av.charAt(iMSIE+5));
    }
  }
  return appver;
}

function GoToList(){
  window.top.location="hblist.htm";
}

function hover(obj){
  origcol=obj.style.color;
  origdecor=obj.style.textDecoration;
  obj.style.color="blue";
  obj.style.textDecoration="underline";
  obj.style.cursor="hand";
}

function unhover(obj){
  obj.style.color=origcol; 
  obj.style.textDecoration=origdecor;
  obj.style.cursor="default";
}

function checkSeekKey(){
  if(window.event.keyCode==13){
	seek(window.event.srcElement.value);
  }
}

function freeseek(s){
  window.top.location = "frisokframes.asp?txtsearch="+s
}
