function DropDownList(id, postback, items)
{
	this.id = id;
	this.items = new Array();
	this.items = items;
	this.visible = false;
	this.postback = postback;
	return this;
}
DropDownList.prototype.ShowList = function()
{
	document.getElementById(this.id + '_List').style.visibility = 'visible';
	this.visible = true;
}
DropDownList.prototype.HideList = function()
{
	this.visible = false;
	if(this.hideInterval == null)
		this.hideInterval = setInterval(this.id + '.DoHideList()', 1000);
}
DropDownList.prototype.DoHideList = function()
{
	if(!this.visible)
	{
		document.getElementById(this.id + '_List').style.visibility = 'hidden';
		clearInterval(this.hideInterval);
		this.hideInterval = null;
	}
}
DropDownList.prototype.Highlight = function(index)
{
	document.getElementById(this.id + '_' + index).className = 'DropDownListItemHighlight';
	this.visible = true;
	return true;
}
DropDownList.prototype.RemoveHighlight = function(index)
{
	document.getElementById(this.id + '_' + index).className = 'DropDownListItem';
	this.visible = false;
	return true;
}
DropDownList.prototype.SelectItem = function(index)
{
	this.visible = false;
	this.DoHideList();
	if(!this.postback)
	{
		document.getElementById(this.id + 'SelectedIndex').value = index;
		document.getElementById(this.id + 'Title').innerHTML = this.items[index];
	}
	return true;
}

