//add lines to the the bottom of the array list below to add research articles
//use the following format:
//	research[next number in sequence] = ['Title', 'url'];
//
//	NOTE = escape single and double quotes within text by preceding them with a backslash (\)
//

var research = new Array();

research [0] = 	['January 22, 2009 - TDS CEO Foresees Data Center Space Shortage','http://www.thewhir.com/web-hosting-news/012209_TDS_CEO_Foresees_Data_Center_Space_Shortage'];
//research [1] = 	['2008 Trends: Data Protection, Archiving and Disaster Recovery Challenges for the Small and Medium Business','http://www.wwpi.com/index.php?option=com_content&task=view&id=3500&Itemid=44'];

//research [1] = 	['google','http://www.google.com'];
//research [2] = 	['yahoo','http://www.yahoo.com'];



/////////////////////////////////////////////////////////////////////////////////////////
//	DO NOT EDIT BELOW THIS LINE
/////////////////////////////////////////////////////////////////////////////////////////

function writeLinks() {
	
	var lastItem = research.length - 1;
	var html = "";
	
	if (document.getElementById('researchitems')) 
	{
		//if there are not at least three items, get however many items there are
		if (research.length < 3) 
		{
			for (i=lastItem; i>=0; i--) {
				html += "<li class=\"researchitems\"><a href=\"" + research[i][1] + "\">"+research[i][0]+"</a></li>";
			}
		}
		//else get the last three added
		else 
		{
			for (i=lastItem; i>=(research.length - 3); i--) {
				html += "<li class=\"researchitems\"><a href=\"" + research[i][1] + "\">"+research[i][0]+"</a></li>";
			}
		}
		
		document.getElementById('researchitems').innerHTML = html;
		
	} 
	
	else if (document.getElementById('researchitem')) 
	{
		
		html = "<a href=\"" + research[lastItem][1] + "\">"+research[lastItem][0]+"</a>";
		document.getElementById('researchitem').innerHTML = html;
		   
	}
	
}


//
// addLoadEvent()
// Adds event to window.onload without overwriting currently assigned onload functions.
// Function found at Simon Willison's weblog - http://simon.incutio.com/
//
function addLoadEvent(func)
{	
	var oldonload = window.onload;
	if (typeof window.onload != 'function'){
    	window.onload = func;
	} else {
		window.onload = function(){
		oldonload();
		func();
		}
	}

}



addLoadEvent(writeLinks);	 //run writeLinks onLoad