/* -----------------------------------------------------------------------
   expand.js
   compare the main column and the right sidebar to ensure that the sidebar
   doesn't overhang.
   simon@intelligentweb.co.uk
   ____________

   ----------------------------------------------------------------------- */


function expandSidebar() {
	if ( (document.getElementById) ) {	// Check we have DOM and then grab the block
		var node = document.getElementById("node-2");
		var sidebar = document.getElementById("rightSidebar");
		if (node.offsetHeight < sidebar.offsetHeight) {
			node.style.height = (sidebar.offsetHeight +1 ) + "px";
		}


	} else {
		// Either our DOM isn't working or we have some other problem
	}
}


/* ---------- General setup below ---------- */


/* initialise fader by hiding image object first */
addEvent(window,'load',expandSidebar); 



/* 3rd party helper functions */

/* addEvent handler for IE and other browsers */
//function addEvent(elm, evType, fn, useCapture) 
// addEvent and removeEvent
// cross-browser event handling for IE5+,  NS6 and Mozilla
// By Scott Andrew
//{
 //if (elm.addEventListener){
   //elm.addEventListener(evType, fn, useCapture);
   //return true;
 //} else if (elm.attachEvent){
   //var r = elm.attachEvent("on"+evType, fn);
   //return r;
 //}
//}


