function dropLink(sText, oList)
{
	/* properties */
	this.text = sText;
	this.link = null;
	this.button = null;
	this.list = oList;
	/* end properties */

	/* methods */
	this.changeText = function(newText) { dropLinkChangeText(this, newText); }
	/* end methods */

	this.linkWrap = document.createElement("div");
	this.link = document.createElement("a");
	var linkSpan = document.createElement("span");
	var linkSpanOuter = document.createElement("span");
	var linkText = document.createTextNode(this.text);
	this.button = document.createElement("a");
	var buttonText = document.createTextNode(" ");

	var scope = this;

	this.linkWrap.className = "droplink";

	this.link.setAttribute("href", "#");
	this.link.onclick = function() {
		scope.list.toggleDisplay();
		return false;
	}

	this.button.className = "dropbutton";
	this.button.setAttribute("href", "#");
	this.button.onclick = function() {
		scope.list.toggleDisplay();
		return false;
	}

	linkSpan.appendChild(linkText);
	this.link.appendChild(linkSpan);
	linkSpanOuter.appendChild(this.link);
	this.linkWrap.appendChild(linkSpanOuter);

	this.link.appendChild(buttonText);

	return this;
}

function dropLinkChangeText(oLink, sText)
{
	oLink.text = sText;

	var newText = document.createTextNode(sText);
	var linkSpan = oLink.link.getElementsByTagName("span")[0];
	linkSpan.replaceChild(newText, linkSpan.firstChild);
}
