// -----------------------------------------------------------------//
// -------------------- Judo (JD) object ---------------------//
// -------------------- By Daniel S. Li -----------------------//
// -------------------- 02/07/2006 ---------------------------//
// ----------------------------------------------------------------//

function JD(){}

JD.show = function(obj)
{
    var h = document.getElementById("pop");
    if (h && h.value) { JD.hide(h.value); }
    if (h) { h.value = obj; }
    JD.display(obj, 'inline');
}

JD.xshow = function(obj, displayStyle)
{
    var h = document.getElementById("pop");
    if (h && h.value) { JD.hide(h.value); }
    if (h) { h.value = obj; }
    JD.display(obj, displayStyle);
}

JD.display = function(obj, displayStyle)
{
    document.getElementById(obj).style.display = displayStyle;
}

JD.hide = function(obj)
{
    document.getElementById(obj).style.display = 'none';
}

JD.rFocus = function(obj) // return key focus
{
	if (event.keyCode == 13) { JD.focus(obj);	}
}

JD.focus = function(obj)
{
	document.getElementById(obj).focus();
}
JD.fill = function(obj, value)
{
	document.getElementById(obj).value = value;
}

// ---------------------- end JD object ------------------------//