function load()
{
	var contentFrame = window.top.document.getElementById('content');
	loadFrame(contentFrame, arguments[0]);
	var sidebar = window.top.document.getElementById('sidebar');
	sidebar.innerHTML = "";
  var length = arguments.length;
  for (var i = 1; i < length; i++) 
  {
    sidebar.innerHTML += '<iframe onload="adjustFrame(this, 0)" frameborder="0" scrolling="no" width="100%" src="' + arguments[i] + '"</iframe>\n';
  }
	window.top.scrollTo(0,0);
}

function loadFrame(frame, url, minHeight)
{
	if(url != undefined)
	{
		frame.src=url;
	}
	else
	{
		frame.src=null;
	}
}

function adjustFrame(a_frame, minHeight)
{
	var height = 0;
	if (a_frame.contentWindow) // check to see if the browser is IE5.5
	{ 
		if (a_frame.contentWindow.document) 
		{
			var doc = a_frame.contentWindow.document;
			if (doc.body) // check a document isn't being loaded to avoid errors
			{ 
				height = doc.body.scrollHeight;
			}
		}
	} 
	else if (a_frame.document) // IE5.0
	{ 
		if (a_frame.document.body) // check for transition / refresh
		{ 
			height = a_frame.document.body.scrollHeight;
		}
	}
	if(minHeight != undefined)
	{
		a_frame.height = Math.max(height, minHeight);
	}
	else
	{
		a_frame.height = height;
	}
	a_frame.height = (1.02 * a_frame.height) + 15;
}

