// http://www.netlobo.com/comments/off_left_div_hiding
// thank you netlobo

function toggle(elemID) {
	
	var elem = document.getElementById(elemID);
	
	if(elem.style.position != 'absolute') {
		elem.style.position = 'absolute';
		elem.style.left = '-4000px';
	}
	else	{
		elem.style.position = 'relative';
		elem.style.left = '0';
		elem.style.width = '100%';//absolutely doesn't work in IE6 without that line...width is necessary
	}
}


// The original follows...in case I mess about above...
/*
{
	var elem = document.getElementById(elemID);
	if( elem.style.position != 'absolute' )
	{
		elem.style.position = 'absolute';
		elem.style.left = '-4000px';
	}
	else
	{
		elem.style.position = 'relative';
		elem.style.left = '0px';
	}
}

*/

/////////////////////////////

// This is the improved version with functions separated out...


function showElem(elemID) {
	var elem = document.getElementById(elemID);
	elem.style.position = 'relative';
	elem.style.left = '0px';
	return (true) //everythings ok
}

function hideElem(elemID) {
	var elem = document.getElementById(elemID);
	elem.style.position = 'absolute';
	elem.style.left = '-4000px';
	return (true); //everythings ok
}

function toggleDivOL(elemID) {
	var elem = document.getElementById(elemID); //returns true if everything is ok
	//return (( elem.style.position != 'absolute' ? hideElem (elemID) : showElem (elemID) ));
	
	return ((elem.style.position = 'absolute' ? showElem (elemID) : hideElem (elemID)));
	
}
