function ShowNotic()
{try{
   $('scroll_info').innerHTML= Notic.document.getElementById('odiv1').innerHTML;
   $('oNotic').style.display="block";
   $('oNotic').style.visibility="";
   init_srolltext();}
 catch(e){}
}

var scroll_box,scroll_info,scroll_temp,scroll_timer;
var stopscroll = false;

function init_srolltext()
{ scroll_box = $("scroll_box");
  scroll_info = $("scroll_info");
  scroll_temp = $("scroll_temp");
  clearInterval(scroll_timer);
  if (scroll_info.offsetHeight>parseInt(scroll_box.style.height))
  {  
     scroll_info.innerHTML="<div style='height:"+scroll_box.style.height+";'></div>"+scroll_info.innerHTML;
     scroll_box.appendChild(scroll_info.cloneNode(true));
     scroll_box.scrollTop = 0;

     scroll_temp.innerHTML=scroll_info.innerHTML;
     scroll_box.onmouseover = new Function('stopscroll = true');
     scroll_box.onmouseout   = new Function('stopscroll = false');
     scroll_timer = setInterval('scrollUp()', 50);
  }
}
function scrollUp()
{
  if(stopscroll) return;
  if(scroll_temp.offsetTop-scroll_box.scrollTop<=0)
  {  scroll_box.scrollTop-=scroll_info.offsetHeight; }
  else
  { scroll_box.scrollTop++; }
}
function OpenNotic(NoticID)
{
  var winheight;
  var winwidth;
  if (NoticID>0)
  {  gourl="NoticLook.asp?docID="+NoticID;
     winname="lookNotic"; winheight=500; winwidth=580;}
  else 
  {  gourl="/NetOA/manger/control.asp";
     winname="SysNotic"; winheight=screen.availHeight-30;
     winwidth=screen.availWidth-10;}
  var msg="toolbar=0,directories=0,menubar=0,status=0,scrollbars=1,width="+winwidth+",height="+winheight+",resizable=0";
  var news=window.open(gourl,winname,msg);
  var nleft=eval(screen.availWidth-winwidth)/2;
  var ntop=eval(screen.availHeight-winheight-20)/2;
  if (NoticID==0)
  {  news.moveTo(0,0);}
  else
  { var w = 0;
    try { w = news.document.body.clientWidth;}
    catch(e){} 
    if (w < 760)
    { news.moveTo(nleft,ntop); }
  }
  news.focus();
  return false;
}