function DropDown () {	
	this.timeout	= 500;
	this.closetimer	= 0;
	this.ddmenuitem	= 0;
	//
}


// open hidden layer
DropDown.prototype.mopen = function(id) {	
	// cancel close timer
	//this.test = "test???";
	this.mcancelclosetime();

	// close old layer
	if(this.ddmenuitem) this.ddmenuitem.style.visibility = 'hidden';

	// get new layer and show it
	this.ddmenuitem = document.getElementById(id);
	this.ddmenuitem.style.visibility = 'visible';

}
// close showed layer
DropDown.prototype.mclose = function() {
	//alert("mclose? "+this.ddmenuitem);
	if(this.ddmenuitem) {
		this.ddmenuitem.style.visibility = 'hidden';
	} else if(DD.ddmenuitem) {
		DD.ddmenuitem.style.visibility = 'hidden';
	}
}

// go close timer
DropDown.prototype.mclosetime =  function() {
	//alert("mclosetime? ");
	this.closetimer = window.setTimeout(this.mclose, this.timeout);
}

// cancel close timer
DropDown.prototype.mcancelclosetime = function() {
	if(this.closetimer)	{
		window.clearTimeout(this.closetimer);
		this.closetimer = null;
	}
}


