var Popdown = function() {}
Popdown.timer = null;
Popdown.ptimeout = 200;
Popdown.pcancel = function() { clearTimeout(Popdown.timer) }
Popdown.pd = function(tgt, id, place) {
	if(!place) place = 'br';
	Popdown.pcancel();
	var lt = $(tgt); //new KLayer(null,null);
	//lt.object = tgt;
	//lt.style=lt.css=lt.object[KL_styleSwitch];
	var lp = $("#"+id);
	lp.show();

    var ltdim = lt.x_dimensions();
    var lpdim = lp.x_dimensions();
	if(place == 'br')
		lp.css("left", ltdim.left).css("top", ltdim.top + ltdim.height);
	else if(place == 'bl')
		lp.css("left", ltdim.left + ltdim.width - lpdim.width).css("top", ltdim.top + ltdim.height);
	else if(place == 'tl')
		lp.css("left", ltdim.left + ltdim.width - lpdim.width).css("top", ltdim.top - lpdim.height);
	else if(place == 'tr')
		lp.css("left", ltdim.left).css("top", ltdim.top - lpdim.height);
	
}
Popdown.px = function(id) {
	Popdown.pcancel();
	Popdown.timer = setTimeout('Popdown.phide("'+id+'")', Popdown.ptimeout);
}
Popdown.phide = function(id) {
	$("#" + id).hide();
}

