// Declare namespace
function TechDry() { }

// Dropdown function overrides
// Close (conditionally)
TechDry.ddCvx = function(strIdn) {
	strId = 'dm_' + strIdn;
	$(strId).dmEnable = 0;
	setTimeout('TechDry.cVis(\'dm_'+strIdn+'\',$(\''+strId+'\').dmEnable)',100);
}

TechDry.cVis = function(strId, dmx) {
	if (dmx != 1) { 
		var objTgt = $(strId);
		if (objTgt._hasIframe == 1) objTgt._iframe.style.display='none';
		objTgt.style.display='none';
	}
}
// Open DD
TechDry.ddOvx = function(strIdn) {
	strId = 'dm_'+strIdn;
	strTopId = 'ml_'+strIdn;
	var objTgt = $(strId);
	objTgt.dmEnable = 1;
	objTgt.style.top=(findPosY($(strTopId)) + $(strTopId).offsetHeight + 1) + "px";
	objTgt.style.left=findPosX($(strTopId)) + "px";
	objTgt.style.display='block';
	if (document.selection) {
		// IE IFRAME underlay trick
		if (objTgt._hasIframe != 1) {
			var iFrame = document.createElement('IFRAME');
			iFrame.className = 'dd_iframe_underlay';
			iFrame.frameBorder = 'no';
			iFrame.style.display = 'none';
			iFrame.style.top = objTgt.style.top;
			iFrame.style.left = objTgt.style.left;
			iFrame.style.width = objTgt.offsetWidth + 'px';
			iFrame.style.height = objTgt.offsetHeight + 'px';
			objTgt._iframe = iFrame;
			objTgt.parentNode.appendChild(iFrame);
			objTgt._hasIframe = 1;
		}
		objTgt._iframe.style.display='block';
	}
}
// Sustain DD
TechDry.ddSvx = function(strIdn) {
	strId = 'dm_'+strIdn;
	$(strId).dmEnable = 1;
}
