﻿	function popUp(URL, width, height)
	{
		window.open(URL, "", "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=" + width + ",height=" + height + ",left=" + ((screen.availWidth - width)/2) + ",top=150");
	}

	function showHide(table,img)
	{
		if(table.style.display == '')
		{
			if(table != null)table.style.display = 'none';
			if(img != null)img.src = img.src.replace("minus","plus");
		}
		else
		{
			if(table != null)table.style.display = '';
			if(img != null)img.src = img.src.replace("plus","minus");
		}
	}

	function select(td, element)
	{
		if(td.style.color == "#cccccc")
		{
			alert("This category can not be selected.")
			return;
		}
		if(td.style.color == "red")
		{
			td.style.color="black";
			element.value = "";
		}
		else
		{
			td.style.color="red";
			if((element.value != "") && (element.value != "0"))
				document.getElementById("libId" + element.value).style.color = "black";
			element.value = td.id.substr(5);
		}
	}
