﻿
function getObj(name){
    return document.getElementById(name);
}

function bbsNotice()
{	
    this.i = this.p = 0;
    var sc=getObj("notice").getElementsByTagName("DIV");
    this.n = parseInt(sc.length);
    this.stop = false;
    getObj('notice' + this.i).style.display = '';
    setInterval('nt.play();',4000);	
    getObj('notice').onmouseover=new Function("nt.stop=true");	
    getObj('notice').onmouseout=new Function("nt.stop=false");
    this.play = function(){
        if (this.stop == true) return;
        this.i++;		
        this.p = this.i-1;		
        if (this.i>=this.n){this.i=0;}		
        if (getObj('notice' + this.p)) getObj('notice' + this.p).style.display = 'none';		
        setTimeout(function(){getObj('notice' + nt.i).style.display = '';},500);	
	}
}