// JavaScript Document
function select_items()
{
	this.items = Array();
	this.i = 0;
	
	this.add_item = function(i)
	{
		this.items[this.i] = i;
		this.i++;
	}
	
	this.remove_item = function(i)
	{
		for (var x = 0; x < this.items.length; x++)
		{
			if(this.items[x] == i)
			{
				this.items[x] = null;
			}
		}
	}
	
	this.post = function(f, k)
	{
		var first = true;
		f.action = '/search/items.php?keywords=' + k;
		for (var x = 0; x < this.items.length; x++)
		{
			if(this.items[x] != null)
			{
				f.action += '&items[' + x + ']=' + this.items[x];
			}
		}
		window.location = f.action;
	}

}

