if (!BLABBERSCOTT_DEFINED) {
var BSimgpath = "/img/";
var BSimage1 = new Image();
var BSimage2 = new Image();
BSimage1.src = BSimgpath+"scott_face1.jpg";
BSimage2.src = BSimgpath+"scott_face2.jpg";
function BlabberScott_mouseover()
{
    document.images["BSIMG"+this.objName].src = BSimage2.src;
}
function BlabberScott_mouseout()
{
    document.images["BSIMG"+this.objName].src = BSimage1.src;
}
function BlabberScott_talk()
{
    if (!document.getElementById) { return; }
    if (this.line.length < 1) { return; }
    if (this.timer != 0) { clearTimeout(this.timer); }
    this.mouseover();
    setTimeout(this.objName+".mouseout()", 300);
    if (++this.lineIndex == this.line.length) { this.lineIndex = 0; }
    document.getElementById("BS"+this.objName).innerHTML = this.line[this.lineIndex];
    this.timer = setTimeout(this.objName+".talk()", this.pause[this.lineIndex]);
}

function BlabberScott_shutup()
{
    clearTimeout(this.timer);
    this.timer = 0;
}

function BlabberScott_addline(aline, pause_ms)
{
    this.line[this.line.length] = aline;
    this.pause[this.pause.length] = pause_ms;
}

function BlabberScott_show()
{
    if (this.isShown) {
        document.write('BlabberScott error: '+this.objName+' has already been shown elsewhere\n');
        return;
    }
    this.isShown = true;

    document.write('<table border="0" cellpadding="0">\n');
    document.write('<tr>\n');
    document.write('<td valign="top">\n');
    document.write('<a href="#" onClick="'+this.objName+'.talk(); return false;" onMouseOver="'+this.objName+'.mouseover()" onMouseOut="'+this.objName+'.mouseout()"><img src="'+BSimgpath+'scott_face1.jpg" height="100" width="100" border="0" id="BSIMG'+this.objName+'" /></a>\n');
    document.write('</td>\n');
    document.write('<td valign="top">\n');
    document.write('<table border="0" cellspacing="0" cellpadding="0" bgcolor="#99ffcc">\n');
    document.write('<tr>\n');
    document.write('<td bgcolor="#ffffff"><img src="'+BSimgpath+'spacer.gif" /></td>\n');
    document.write('<td><img src="'+BSimgpath+'nw.gif" /></td>\n');
    document.write('<td></td>\n');
    document.write('<td><img src="'+BSimgpath+'ne.gif" /></td>\n');
    document.write('</tr>\n');
    document.write('<tr>\n');
    document.write('<td bgcolor="#ffffff" valign="top" rowspan="2"><img src="'+BSimgpath+'diagleft.gif" /></td>\n');
    document.write('<td></td>\n');
    document.write('<td>\n');
    document.write('<div id="BS'+this.objName+'">');
    if (!document.getElementById) {
        for (var foo in this.line) {
            document.write(this.line[foo]+'<p />\n');
        }
    }
    document.write('</div>');
    document.write('</td>\n');
    document.write('<td></td>\n');
    document.write('</tr>\n');
    document.write('<tr>\n');
    document.write('<td><img src="'+BSimgpath+'sw.gif" />\n');
    document.write('<td></td>\n');
    document.write('<td><img src="'+BSimgpath+'se.gif" />\n');
    document.write('</tr>\n');
    document.write('</table>\n');
    document.write('</td>\n');
    document.write('</tr>\n');
    document.write('</table>\n');
    this.talk();
}
function BlabberScott(objName)
{
    // properties
    this.objName = objName;
    this.line = new Array();
    this.pause = new Array();
    this.lineIndex = -1;
    this.timer = 0;
    this.isShown = false;

    // methods
    this.mouseover = BlabberScott_mouseover;
    this.mouseout = BlabberScott_mouseout;
    this.talk = BlabberScott_talk;
    this.shutup = BlabberScott_shutup;
    this.addline = BlabberScott_addline;
    this.show = BlabberScott_show;
}
var BLABBERSCOTT_DEFINED = true;
}
