function displayItem(item_id) {

	el = document.getElementById(item_id);
	if(el.style.display == 'none')	el.style.display = 'block';
	else								el.style.display = 'none';
	
	return false;
}

function openPrintWindow(src)
{
	var printStr = "";	
	printStr = src.lastIndexOf("?") < 0 ? "?" : "&";
	printStr+= "doPrint=yes";
	src+= printStr;
	openPopWindow(src, 'menubar=yes, toolbar=yes, resizable=yes, scrollbars=yes', 'printWin')
}

function openPopWindow(src, options, name)
{
	var x = arguments[3];
	var y = arguments[4];

    if (!x && !options.match(/left/i) && (matches = options.match(/width\=(\d+)/i)))
        x = (screen.width - matches[1]) / 2;

    if (!y && !options.match(/top/i) && (matches = options.match(/height\=(\d+)/i)))
        y = (screen.height - matches[1]) / 2;

	if (x) options+= ",left="+x+",screenX="+x;
	if (y) options+= ",top="+y+",screenY="+y;
	
	try{
		if (popWin) popWin.close();
	}catch(err){}

	if (!(src.indexOf("http")==0 || src.indexOf("/")==0))
		src = _ABS_PATH+src;
	
	popWin=window.open(src, name, options);
	popWin.focus();
}