function highLite(PoItem) {
    PoItem.style.backgroundColor = "#0000A0";
    PoItem.style.color = "#FFFFFF";
}

function unHighLite(PoItem) {
    PoItem.style.backgroundColor = '';
    PoItem.style.color = '';
}

function jsCalRowStart() {
    document.write("<TR>");
}

function jsCalRowEnd() {
    document.write("<\/TR>");
}

function jsCalCell(style,text,lite,width,onclick,param,csp,frm) {
    LstrTmp = "<TD";
    LstrJS  = "";
    LstrJS2 = "";

    IE = (navigator.appName == "Microsoft Internet Explorer");

    if (style)
        LstrTmp += " CLASS='"+style+"'";

    if (csp)
        LstrTmp += " COLSPAN="+csp;

    if (lite!=0) {
        LstrName = "D" + lite;

        LstrTmp += " ID='"+LstrName+"'"+
            (IE ? " STYLE='cursor: hand;'" : "");

        if (! IE) {
/*
            LstrJS = "<A HREF='JavaScript:;' "+
                " ONCLICK='javascript:"+onclick+"("+param+");'"+
                " CLASS='"+style+"'>";
*/

            LstrJS = "<A HREF='JavaScript:"+onclick+"("+param+");' "+
                " CLASS='"+style+"'>";

            LstrJS2 = "<\/A>";
        }
        else {
            LstrTmp += " ONMOUSEOVER='javascript:highLite("+LstrName+")'"+
                " ONMOUSEOUT='javascript:unHighLite("+LstrName+")'"+
                " ONCLICK='javascript:"+onclick+"("+param+");'";
        }
    }

    if (width) {
        LstrTmp += " WIDTH='"+width+"'";
    }

    if (frm && param) {
        LstrName = "D" + param;
        LstrJS2 += "<BR><INPUT TYPE=CHECKBOX NAME=C" + LstrName + ">";
    }

    LstrTmp += ">"+LstrJS+text+LstrJS2+"<\/TD>";

    document.write(LstrTmp);
}
