function popuponclick(pImage,pWidth,pHeight)
{
	attributes = 'width='+ pWidth + ',height=' +pHeight;
	newwindow2=window.open('','window',''+attributes)
	var popwin = newwindow2.document;
	popwin.write('<html><head><title>popup</title>');
	popwin.write('<link rel="stylesheet" href="js.css">');
	popwin.write('</head><body bgcolor=#A4A4A4 leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>');
	popwin.write('<a href="javascript:self.close()"><img src=http://www.svartberg.com/files/gifs/' + pImage + ' border="0" height=' + pHeight + ' width=' + pWidth + '></a>');
	popwin.write('</body></html>');
	popwin.close();
}

function getDim(el){
	for (var lx=0,ly=0;el!=null;
	lx+=el.offsetLeft,ly+=el.offsetTop,el=el.offsetParent);
	return {x:lx,y:ly}
}

function showTip(tip_text,obj)
{
	var xOffset = 50;
	var yOffset = 74;

	var div = document.getElementById( 'msg' );
	div.style.display = '';
	div.innerText = tip_text;

	imgDim = getDim(document.images[obj.id]);
	//alert("x:" + imgDim.x + ", y:" + imgDim.y);

	xPos = parseFloat(imgDim.x) + xOffset;
	//xPos = 100 + xOffset;
	yPos = parseFloat(imgDim.y) + yOffset;
	
	//alert(lt);
	div.style.left = xPos + 'px';
	div.style.top = yPos + 'px';

	obj.onmouseout=function() {
	  div.style.display='none';
	}
}
