var noti=new Array(), startPanel=0, n_panel=0, i=0, j=0, count=1;
var htmlstr = "", flag=true, mouse=1, s_speed=1, wait=5000, temp=0, height=20, amount=20;

function adminNotice() 
{     
    for (i=0; i<noti.length; i++) insertText(i);    
    //for (i=0; i<2; i++) insertText(i);    
    if (noti.length > 1)
        scroll();
}
function scroll() 
{
    if (mouse && flag) {

      for (i=0;i<noti.length;i++) {
        temp++;
        tmp = document.getElementById('scroll_area'+i).style;
        tmp.top = parseInt(tmp.top)-s_speed;
        if (parseInt(tmp.top) <= height*(-1)) {
          tmp.top = height*(noti.length-1);
        }
        if (temp>(amount-1)*noti.length) {
          flag=false;
          temp=0;
          window.setTimeout("flag=true;temp=0;",wait);
        }
      }
    }
    window.setTimeout("scroll()",1);
}

function insertText(i) 
{
	if(typeof(bbsMain) != 'undefined' && bbsMain) {
    	noti[i]=noti[i].replace("#C8EEED","#000000");
    	noti[i]=noti[i].replace("class=txt_notice","color=#000000");
	}
    htmlstr='<div style="left: 0px; width: 575px; position: absolute; top: '+(height*i+1)+'px" id="scroll_area'+i+'">\n';
    htmlstr+=noti[i]+'\n'+'</div>\n';
    document.getElementById('scroll_div').innerHTML=document.getElementById('scroll_div').innerHTML+htmlstr;
}



