//////////////////////////////////////////////////////////////
//															//
// JavaScript Document										//
// This is for the rollover menus of the header section.	//
//															//
// This code was taken from the A List Apart article found	//
// at the following address									//
// http://www.alistapart.com/articles/horizdropdowns/		//
//															//
//////////////////////////////////////////////////////////////
startList = function() {
    if (document.all&&document.getElementById) {
        navRoot = document.getElementById("menu");
        for (i=0; i<navRoot.childNodes.length; i++) {
            node = navRoot.childNodes[i];
            if (node.nodeName=="LI") {
                node.onmouseover=function() {
                    this.className+=" over";
                    selects = document.getElementsByTagName("select");
                    for(j=0; j<selects.length; j++) {
                        selects[j].style.visibility="hidden"
                    }
                }
                node.onmouseout=function() {
                    this.className=this.className.replace(" over", "");
                    selects = document.getElementsByTagName("select");
                    for(j=0; j<selects.length; j++) {
                        selects[j].style.visibility="visible"
                    }
                }
//                for(j=0; j<node.childNodes.length;j++) {
//                   if(node.childNodes[j].nodeName=="UL") {
//                      node.childNodes[j].style.left = node.offsetLeft;
//                 }
//            }
            }
        }
    }
    //add a 'submit' class to all submit buttons
    if(document.getElementsByTagName) {
		inputs = document.getElementsByTagName("input");
        for(j=0; j<inputs.length; j++) {
        	if(inputs[j].type == "submit") {
        		inputs[j].className += " submit";
        		span = document.createElement("SPAN");
        		span.className="button_close";
        		span.innerHTML = "&nbsp;"
        		if(inputs[j].nextSibling) {
        			inputs[j].parentNode.insertBefore(span, inputs[j].nextSibling);
        		} else {
        			inputs[j].parentNode.appendChild(span)
        		}
        	}
        }
    }    
}
window.onload=startList;
