/**
 * @author 	Andreas Goetz 	<cpuidle@gmx.de>
 * $Id: docpart.js,v 1.5 2005/09/07 16:14:44 andig2 Exp $
 */

function setListColValue(id)
{
	el = document.getElementById(id);
	if (el)
	{
		m = el.href.match(/=(\d+)/);
		if (m) {
			val = parseFloat(m[1]);
		}
	}

	el = document.getElementById("docpart_more");
	if (el)
	{
		el.href = el.href.replace(/=(\d+)/, "="+(val+1));
	}

	el = document.getElementById("docpart_less");
	if (el)
	{
		// prevent underflow
		if (val > 1)
		{
			el.href = el.href.replace(/=(\d+)/, "="+(val-1));
		}
	}
}

/**
 * Actions
 */
function docpart_less_action()
{
	setListColValue("docpart_less");
}

function docpart_more_action()
{
	setListColValue("docpart_more");
}

function docpart_search_action()
{
	alert("YES");
}


/**
 * Targets
 */
function docpart_more()
{
	return("docpart_list_target");
}

function docpart_less()
{
	return("docpart_list_target");
}

function docpart_search()
{
	return("docpart_list_target");
}

