// JavaScript Document

function twoCols(src, type)
	{
	var origList = src;
	var leftList = document.createElement(type);
	var rightList = document.createElement(type);
	var container = document.createElement('div');
	
	var items = origList.getElementsByTagName('LI');
	
	var itemsLength = items.length/2;
	for (i = 0; i < itemsLength; i++)
		{
		leftList.appendChild(items[0]);
		}
		
	itemsLength = items.length;
	for (i = 0; i < itemsLength; i++)
		{
		rightList.appendChild(items[0]);
		}
	container.appendChild(leftList);
	container.appendChild(rightList);
	
	leftList.setAttribute('class', 'left');
	rightList.setAttribute('class', 'right');
	if (type == 'ol')
		{
		rightList.setAttribute('start', leftList.getElementsByTagName('LI').length + 1 );
		}
	container.setAttribute('class','twocol');
	if (document.all)
		{
		// ugly hack for ie win
		leftList.setAttribute('className', 'left');
		rightList.setAttribute('className', 'right');
		container.setAttribute('className','twocol');
		}
	origList.parentNode.replaceChild(container, origList);
	}
function allTwoCols (whichclass, type)
	{
	var uls = document.getElementsByTagName(type);
	for (var i=0; i< uls.length; i++)
		{
		if (uls[i].getAttribute('class') == whichclass || uls[i].getAttribute('className') == whichclass)
			{
			twoCols(uls[i], type.toLowerCase());
			}
		}
	}
