// dictionary.js
var feedWidth = 421
var feedHeight = 162
var cw, ch;

if (window.screen) {
	cw = Math.floor((screen.availWidth / 2) - (feedWidth / 2));
	ch = Math.floor((screen.availHeight / 2) - (feedHeight / 2));
}

function openGlossaryLink() {
	document.getElementById("popUpDiv").style.visibility='visible'
	document.getElementById("popUpDiv").style.top=ch;
	document.getElementById("popUpDiv").style.left=cw;
}
function openLink() {
	document.getElementById("popUpDiv").style.visibility='visible'
	document.getElementById("popUpDiv").style.top=ch;
	document.getElementById("popUpDiv").style.left=cw;
}

function closePopUp() {
	document.getElementById("popUpDiv").style.visibility='hidden'
}

/********** floating div code **********/
function floatDiv() {
	var startX = cw, startY = ch;
	var ns = (navigator.appName.indexOf("Netscape") != -1);
	var d = document;
	var px = document.layers ? "" : "px";
	function ml(id)
	{
		var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
		if(d.layers)el.style=el;
		el.sP=function(x,y){this.style.left=x+px;this.style.top=y+px;};
		el.x = startX; el.y = startY;
		return el;
	}
	window.stayTopLeft=function() {
		var pY = ns ? pageYOffset : document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop;
		ftlObj.y += (pY + startY - ftlObj.y)/8;
		ftlObj.sP(ftlObj.x, ftlObj.y);
		setTimeout("stayTopLeft()", 40);
	}
	ftlObj = ml("popUpDiv");
	stayTopLeft();
}