TIMEINTERVAL = 15;
INITIALOFFSET = -80;
function showWindow(msg){
    document.write("<div id='statusBox' class='statbox' style='left:"+(Math.ceil(parseInt(document.documentElement.clientWidth)/2)-100)+"px'>"+msg+"</div>");
    moveWindowVert('statusBox',70,0);
    var tEnd = setTimeout("moveWindowVert('statusBox',INITIALOFFSET,1);",3000);
}

function moveWindowVert(windowID,endingPos,direction){
    curPos = document.getElementById(windowID).style.top.replace(/px/,'');
    if(curPos=='')
        curPos = INITIALOFFSET;
    if(direction==0){
        if(curPos<endingPos){
            document.getElementById(windowID).style.top=eval(parseInt(curPos) + 5)+'px';
            var t1 = setTimeout("moveWindowVert('statusBox',"+endingPos+","+direction+");",TIMEINTERVAL);            
        }
        else {
            document.getElementById(windowID).style.top=endingPos+'px';
        }
    }
    else if(direction==1){
        if(curPos>endingPos){            
            document.getElementById(windowID).style.top=eval(parseInt(curPos) - 7)+'px';
            var t2 = setTimeout("moveWindowVert('statusBox',"+endingPos+","+direction+");",TIMEINTERVAL);
        }
        else {
            document.getElementById(windowID).style.top=endingPos+'px';
        }
    }
}
