var backgroundColor = "FFCC66";
var borderColor = "#000000";
var textColor = "#000000";

var width = "400";
var border = "1";
var offsetx = 12;
var offsety = 12;
var marginx = 12;

var x = 0;
var y = 0;
over = overDiv.style
document.onmousemove = mouseMove

function dts(text) {
    txt = "<TABLE WIDTH="+width+" BORDER=0 CELLPADDING="+border+" CELLSPACING=0 BGCOLOR=\""+borderColor+"\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=6 CELLSPACING=0 BGCOLOR=\""+backgroundColor+"\"><TR><TD><FONT FACE=\"Arial,Helvetica\" COLOR=\""+textColor+"\" SIZE=\"-2\">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>"
    layerWrite(txt);
    disp();
}

function disp() {
    if ( x + offsetx + parseInt(width) + marginx > available_width ) {
        x = available_width - (offsetx + parseInt(width) + marginx)
    }
    moveTo(over,x + offsetx,y + offsety);
    showObject(over);
}

function mouseMove(e) {
    x = event.x + document.body.scrollLeft; y = event.y + document.body.scrollTop;
}

function layerWrite(txt) {
    document.all["overDiv"].innerHTML = txt
}

function showObject(obj) {
    obj.visibility = "visible"
}

function hideObject(obj) {
    obj.visibility = "hidden"
}

function moveTo(obj,xL,yL) {
    obj.left = xL
    obj.top = yL
}

function nd() {
    hideObject(over);
}
