insymaDropDown = {
	init:function() {
		var DropDownLi = document.getElementById("dropdown").getElementsByTagName("li")[0];
		var DDLiSpan = DropDownLi.getElementsByTagName("span")[0];
		var DDLink = insymaUtil.createElm("a", {href: "#"}, DDLiSpan.innerHTML, DropDownLi);
		var DropDownUL = DropDownLi.getElementsByTagName("ul")[0]
		var anchors = DropDownUL.getElementsByTagName("a");
		DropDownLi.removeChild(DDLiSpan);
		DropDownLi.appendChild(DropDownUL);
		for(var i = 0; i<anchors.length; i++){
			anchors[i].onclick = function(){
				insymaUtil.setText(DDLink, this.innerHTML)
			}
		}
		insymaUtil.cssjs("swap", DropDownLi, "active", "")
		DDLink.onclick = function(){
			insymaUtil.cssjs("swap", DropDownLi, "active", "")
			return false;
		}
		DropDownUL.onclick = function() {
			insymaUtil.cssjs("swap", DropDownLi, "active", "")
		}
		document.getElementById("dropdown").onmouseout = function(){
			document.body.onmousedown = function(){
				insymaUtil.cssjs("remove", DropDownLi, "active", "")
			}
		}
		document.getElementById("dropdown").onmouseover = function(){
			document.body.onmousedown = function(){}
		}
	}
}
insymaUtil.addEvent(window,'load',insymaDropDown.init,false);
