function checkObjects()
{
	// grab all links and loop through them checking for anchors that need special functions
	var as = document.getElementsByTagName("a");
	for(var i=0;i<as.length;i++)
	{
		//get the link's href and see if the link is external to the current site
		if(as[i].href.indexOf(window.location.hostname) == -1 )
		{
			// all external links open in a new window.
			as[i].target="_blank";
		}
	}
}


// 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(checkObjects);