
startList = function() {
if (document.all&&document.getElementById) {
cssdropdownRoot = document.getElementById('cssdropdown');
for (x=0; x<cssdropdownRoot.childNodes.length; x++) {
node = cssdropdownRoot.childNodes[x];
if (node.nodeName=='LI') {
node.onmouseover=function() {
this.className+=' over';
}
node.onmouseout=function() {
this.className=this.className.replace(' over', '');
}
}
}
}
}

if (window.attachEvent)
window.attachEvent('onload', startList)
else
window.onload=startList;







addEvent(window, 'load', function()
{
	var counts = document.getElementsByClassName('maxlength');
	var i, count, matches, countHolder;
	
	for (i=0; i<counts.length; i++)
	{
		count = counts[i];	
		matches = count.className.match(/max_([0-9]+)/);
		count.maxVal = RegExp.$1;
		count.holder = document.getElementById(count.id + 'Count');
		if (count.holder)
		{
			count.holder.innerHTML = count.maxVal - count.value.length;
			count.onkeyup = function()
			{
				if (this.value.length > this.maxVal)
					this.value = this.value.substring(0, this.maxVal);
	
				this.holder.innerHTML = this.maxVal - this.value.length;		
			}
		}
	}	
});



















document.getElementsByClassName = function (needle)
{
  var         my_array = document.getElementsByTagName("*");
  var         retvalue = new Array();
  var        i;
  var        j;

  for (i = 0, j = 0; i < my_array.length; i++)
  {
    var c = " " + my_array[i].className + " ";
    if (c.indexOf(" " + needle + " ") != -1)
      retvalue[j++] = my_array[i];
  }
  return retvalue;
}

function addEvent(obj, evType, fn)
{
	if (obj.addEventListener)
	{
		obj.addEventListener(evType, fn, true);
		return true;
	} 
	else if (obj.attachEvent)
	{
		var r = obj.attachEvent("on"+evType, fn);
		return r;
	} 
	else 
	{
		return false;
	}
}

