function getElementsByClass( searchClass, domNode, tagName) {
	if (domNode == null) domNode = document;
	if (tagName == null) tagName = '*';
	var el = new Array();
	var tags = domNode.getElementsByTagName(tagName);
	var tcl = " "+searchClass+" ";
	for(i=0,j=0; i<tags.length; i++) {
		var test = " " + tags[i].className + " ";
		if (test.indexOf(tcl) != -1)
			el[j++] = tags[i];
	}
	return el;
}

function disableSelection() {
	var nodes = getElementsByClass('disableSelection');
	for(i=0; i<nodes.length; i++) {
    nodes[i].onselectstart = function() {
        return false;
    };
    nodes[i].unselectable = "on";
    nodes[i].style.MozUserSelect = "none";
    nodes[i].style.cursor = "default";	
    }
}

function clearSearchField(field) {
   if (field.className == 'unEdited') {
      field.value = '';
      field.className = '';
   }
}

function doItemHover() {
   this.style.backgroundPosition='0 0';
}

function redoItemHover() {
   this.style.backgroundPosition='-200px';
}

function doItemHover2() {
   this.parentNode.addClassName('active');
}

function redoItemHover2() {
   this.parentNode.removeClassName('active');
}

function startList() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}
