Ok I admit I know very little about javascript at all, it's on my list of things to learn when I'm not quite so busy.

However I believe what I want can be achieved with Javascript pretty easily, but me attempting to edit scripts that weren't really writtern for that purpose at all with very little knowledge is proving fruitless.

What I would like is this...

x number of selection lists (created by php depending on how many entries there are in a database) each with two options, a void option (-) and a number option (n) for ordering them.

Simple, yes, however... I want it so that if you have say three selection lists, when you first start on the page each selection list has the void option and option #1. When one of those selection lists is changed to option #1 the remaining lists update so they only have the void option (-) and option #2.

I'd also like it if say you have 10 options already selected as above but change your mind and want to remove one by setting it back to the void option (-) the rest re-number themselves to remove any skip numbers (however this is not imperative - just would be nice).

I've been playing around with the following functions that are related to control selection boxes but to no avail.

Code:
//	SelectBox v1.0 by Bjørn Rosell
//	Find more scripts here: www.prototypeDHTML.net

function SelectBox(formID,selectboxName) {
//	this.elm = document.forms[formID][selectboxName]
	this.id = SelectBox.count
	SelectBox.count++

	this.formID = formID
	this.selectboxName = selectboxName
	this.options = []
	this.waiting = []
	this.created = false
}

SelectBox.prototype.getSelectBoxElm = function() {
	if (!this.elmSelectbox) this.elmSelectbox = document.forms[this.formID][this.selectboxName]
	return this.elmSelectbox;
}

SelectBox.prototype.getDivElm = function() {
	if (!this.elmDiv) this.elmDiv = API.getElm('selectboxElm'+this.id)
	return this.elmDiv
}

SelectBox.prototype.testIfWritingNeeded=function() {
	if (!document.createElement) return true
	elmSB = this.getSelectBoxElm()
	if (!elmSB) return true
	if (!elmSB.options.add) return true;
	var elm = document.createElement("OPTION")
	if (!elm) return true
	return false
}

SelectBox.prototype.needWriting = function() {
	if (this.bNeedsWriting==null) this.bNeedsWriting = this.testIfWritingNeeded()
	return this.bNeedsWriting
}

SelectBox.prototype.add = function(text,value) {
	if (this.created) {
		this.waiting[this.waiting.length] = {cmd:'_add', params:[text,value]}
	}
	else {
		this.options[this.options.length] = [text,value]
	}
}

SelectBox.prototype._add = function(params) {
	this.options[this.options.length] = params
	if (this.needWriting()) return false
	var elm = document.createElement("OPTION")
	if (!elm) return false		
	elm.text = params[0]
	elm.value = params[1]
	this.getSelectBoxElm().options.add(elm)
	return true
}

SelectBox.prototype.clear = function(bUpdate) {
	if (this.created) {
		this.waiting[this.waiting.length] = {cmd:'_clear', params:[]}
	}
	else {
		this.options = []
	}
}

SelectBox.prototype._clear = function(params) {
	this.options = []
	if (this.needWriting()) return false
	elm = this.getSelectBoxElm()
	l = elm.options.length
	for (var i=0; i<l; i++) {
		elm.options.remove(l-i-1)	
	}
	return true
}

SelectBox.prototype.select = function(value) {
	if (this.created) {
		this._select(value)
	}
	else {
		this.waiting[this.waiting.length] = {cmd:'_select', params:[value]}
	}
}

SelectBox.prototype._select = function(value) {
	elm = this.getSelectBoxElm()
	var i=0
	for (var i=0; i<elm.options.length;i++) {
		if (elm.options[i].value==value) {
			elm.selectedIndex=i
			return
		}
	}
}

SelectBox.prototype.getHTML = function() {
	var s=''
	s+='<select name="'+this.selectboxName+'">'
	for (var i=0; i<this.options.length; i++) {
		s+='<option value="'+this.options[i][1]+'">'+this.options[i][0]+'</option>'
	}
	s+='</select>'
	return s
}
SelectBox.prototype.update = function() {
	if (!this.created) return	
	var needWriting=false
	for (var i=0; i<this.waiting.length; i++) {
		if (!this[this.waiting[i].cmd](this.waiting[i].params)) needWriting=true
	}
	this.waiting = []
	if (needWriting) API.writeHTML(this.getDivElm(),this.getHTML())
}

SelectBox.prototype.writeHTML = function() {
	this.created=true
	document.write('<div style="display:inline;" id="selectboxElm'+this.id+'">'+this.getHTML()+'</div>')
}

SelectBox.count = 0
Any ideas, I'm sure with all those functions it's possible somehow, but as I say I don't really know anywhere near enough to get it working by myself.

Thanks a lot in advance.

-D