
var isNav4, isIE4, isMac
var insideWindowWidth
var range = ""
var styleObj = ""
var layerObjCache = new Array()
var layerNameCache = new Array()

if (navigator.appVersion.charAt(0) >= "4") {
	if (navigator.appName == "Netscape") {
		isNav4 = true
		insideWindowWidth = window.innerWidth
	} else {
		isIE4 = true
		range = "all."
		styleObj = ".style"
	}
}

isMac = (navigator.userAgent.indexOf("mac")!=-1)  || (navigator.userAgent.indexOf("Mac")!=-1);

featframe = "/public/feat_link.asp"
featbookmark = "/protected/feat_link_bookmark.asp"

function dotlinkit(reftitle,refurl)
{
  var dest = featbookmark+"?refurl="+escape(refurl)+"&reftitle="+escape(reftitle);

  height=170;
  width=233;

  x = (screen.availWidth - width)/2;
  y = (screen.availHeight -height)/2;
  newWin = window.open(dest,"Bookmark","scrollbars=yes,height="+height+",width="+width+",left="+x+",top="+y);
}

/*function openfeatlink(thelink,link, backtodot)
{
  if (top.location=="")
  {
    openfeatlink(thelink,link,backtodot,window);
    alert('1');
  }
  else
  {
    openfeatlink(thelink,link,backtodot,top);
    alert('2');
  }
}*/

function openfeatlink(thelink,link, backtodot, hwnd)
{
  var linktitle;

  if (!hwnd)
    hwnd = top;

  if (isIE4)
  {
    linktitle = thelink.innerText;
  }
  else
  {
    linktitle = thelink.text;
  }

  var linkdest = featframe+"?link="+escape(link)+"&linktitle="+escape(linktitle)+"&backtodot="+escape(backtodot)
  hwnd.location=linkdest;
  hwnd.focus();

  return false;
}
