
	$(document).ready(function() {
	$("div[@class^=commentary]").addClass("hidden");
	});
	
	var exId = "";
	var inUrl = "index.cfm?fa=c.openInternal&type=";

	function getResource(type, id)
	{
		if (type == 'external')
		{
			exId = id;
			height = 750;
			width = 1024;
			var newLeft = (window.screen.availWidth - width) / 2;
			var newHeight = (window.screen.availHeight - height) /2;
			var url = "index.cfm?fa=c.openExternal&id=" + id;
			var exWin = window.open(url,'exWin','height=' + height + ',width=' + width + ',left=' + newLeft + ',top=100,menubar=1,toolbar=1,location=1,status=0,scrollbars=1,directories=0,resizable=1');
			exWin.focus();
		}
		else if (type == 'archives')
		{
			height = 650;
			width = 860;
			var newLeft = (window.screen.availWidth - width) / 2;
			var newHeight = (window.screen.availHeight - height) /2;
			theUrl = inUrl + type + "&id=" + id + "&timestamp=" + new Date().getTime();
			var intWin = window.open(theUrl,'intWin','height=' + height + ',width=' + width + ',left=' + newLeft + ',top=' + newHeight + ',menubar=0,toolbar=0,location=0,status=0,scrollbars=1,directories=0,resizable=1');
			intWin.focus();
		}
		else if (type == 'paper')
		{
			height = 650;
			width = 860;
			var newLeft = (window.screen.availWidth - width) / 2;
			var newHeight = (window.screen.availHeight - height) /2;
			var theUrl = inUrl + type + "&id=" + id + "&timestamp=" + new Date().getTime();
			var intWin = window.open(theUrl,'intWin','height=' + height + ',width=' + width + ',left=' + newLeft + ',top=' + newHeight + ',menubar=0,toolbar=0,status=0,scrollbars=1,directories=0,resizable=1');
			intWin.focus();
		}
		else if (type == 'sculpture')
		{
			height = 650;
			width = 860;
			var newLeft = (window.screen.availWidth - width) / 2;
			var newHeight = (window.screen.availHeight - height) /2;
			theUrl = inUrl + type + "&id=" + id + "&timestamp=" + new Date().getTime();
			var intWin = window.open(theUrl,'intWin','height=' + height + ',width=' + width + ',left=' + newLeft + ',top=' + newHeight + ',menubar=0,toolbar=0,status=0,scrollbars=1,directories=0,resizable=1');
			intWin.focus();
		}
	}
	
	
	function getCommentary(theClass)
	{
		$('div.' + theClass).slideToggle("normal");
	}
	
	/*function openAddItem(decade_id)
	{
			var height=620;
			var width=800;
			var newLeft = (window.screen.availWidth - width) / 2;
			var newHeight = (window.screen.availHeight - height) /2;
			var url = "index.php?method=main.addTimeline&decade_id=" + decade_id;
			var addWin = window.open(url,'addWin','height=' + height + ',width=' + width + ',left=' + newLeft + ',top=' + newHeight + ',menubar=0,status=0,scrollbars=0,directories=0,resizable=1');
			addWin.focus();
	}*/
	
