
<!-- Common javascript functions -->
 function getDocList(doc_cat_source_id,doc_cat_id,doc_source_id,doc_source_extra_id){

 $('documentlist').className='novisible';
 $('loading').className='';
var url = '/papersandpubs/documentlist?doc_cat_source_id='+doc_cat_source_id+'&doc_cat_id='+doc_cat_id+'&doc_source_id='+doc_source_id+'&doc_source_extra_id='+doc_source_extra_id;
new Ajax.Request(url, {
method: 'get',
onSuccess: function(transport) {
var notice = $('documentlist');
notice.update(transport.responseText);
 $('documentlist').className='height450';
 $('loading').className='novisible';
 adjustLayout();
}

});
 }


var gAutoPrint = true; // Flag for whether or not to automatically call the print function

function PrintThisPage(){
	if (document.getElementById != null)	{
		var html = '<HTML>\n<HEAD>\n';

		if (document.getElementsByTagName != null)		{
			var headTags = document.getElementsByTagName("head");
			if (headTags.length > 0)
				html += headTags[0].innerHTML;
		}

		html += '\n</HE' + 'AD>\n<BODY>\n';

		var printReadyElem = document.getElementById("center-content2");

		if (printReadyElem != null)	{
				html += printReadyElem.innerHTML;
		}else{
			alert("Could not find the printReady section in the HTML");
			return;
		}

		html += '\n</BO' + 'DY>\n</HT' + 'ML>';

		var printWin = window.open("","printSpecial");
		printWin.document.open();
		printWin.document.write(html);
		printWin.document.close();
		if (gAutoPrint)
			printWin.print();
	}
	else
	{
		alert("Sorry, the print ready feature is only available in modern browsers.");
	}
}

function tdButtonize(tdObj,Class,status){
	if(tdObj.childNodes.item(0).className){
		tdObj.childNodes.item(0).className=Class;
	}

	if(status!=null)
		{
		window.status=status;
		//return true;
		}
	}


function tdButtonizeNew(tdObj,Class,status)	{
	tdObj.className=Class;
	if(status!=null)
		{
		window.status=status;
		//return true;
		}
	}

function adjustLayout(){
	if (1==1) {
	  // Get natural heights
	  var cHeight = xHeight("center-container");
	  var lHeight = xHeight("left-section-container");
	  var rHeight = xHeight("right-section-container");

	  // Find the maximum height
	  var maxHeight =
	    Math.max(cHeight, Math.max(lHeight, rHeight));

	  // Assign maximum height to all columns
	  xHeight("center-container", maxHeight);
	  xHeight("left-section-container", maxHeight);
	  xHeight("right-section-container", maxHeight);

	  // Show the footer
	  xShow("footer-container");
	}
}

window.onload = function(){
  xAddEventListener(window, "resize",
    adjustLayout, false);
  adjustLayout();
}





