function showBlock(obj, bid)
{
	var xblock = document.getElementById(bid).style.display;
	if (xblock == "block")
	{
		document.getElementById(bid).style.display = "none";
		obj.style.background = "url(resources/expand_sign.gif) no-repeat top left";
	}
	else if (xblock == "none")
	{
		document.getElementById(bid).style.display = "block";
		obj.style.background = "url(resources/collapse_sign.gif) no-repeat top left";
	}
}

function popup(link, title)
{
	var win = window.open('','preview', 'width=50, height=50, left=0, top=0, resizable=1, scrollbar=1, status=0, menubar=0, toolbar=0, titlebar=0, addressbar=0');
	var winDoc = win.document;
	var content = "<html>" +
				"<head><title>"+title+"</title><style>body{overflow: hidden; margin: 0px; padding: 0px;} img{border: 0px; display: block;}</style></head>" +
				"<body><img id=\"image\" src=\"" + link.href + "\" /></body>"+
				"</html>";
	win.document.write(content);
	
	winDoc.body.onload = function() 
	{
    	var obj = winDoc.getElementById('image');
		var w = obj.width;
		var h = obj.height;
    	var iHeight= document.body.clientHeight, iWidth = self.innerWidth;
    	var left = (self.opera ? iWidth : screen.availWidth)/2 - w/2;
    	var top =  (self.opera ? iHeight : screen.availHeight)/2 - h/2;
    	win.resizeTo(w+12,h+85);
    	win.moveTo(left, top);		
	}
	win.onload = winDoc.body.onload;
	win.document.close();
	win.focus();
}
