var currentpos,timer; 

function initialize() 
{ 
timer=setInterval("scrollwindow()",2); 
} 
function sc(){ 
clearInterval(timer); 
} 
function scrollwindow() 
{ 
currentpos=document.body.scrollTop; 
window.scroll(0,++currentpos); 
if (currentpos != document.body.scrollTop) 
sc(); 
} 
document.onmousedown=sc 
document.ondblclick=initialize 




var prevpage='/Topic/URL.asp?M=B&id=' + ID.value;

var nextpage='/Topic/URL.asp?M=N&id=' + ID.value;

//随机浏览
function ViewWZ()
{
	window.location="/Topic/URL.asp?SJMS=1"
}


document.onkeydown=nextpageS;

//左右导航 
	function nextpageS(event) 
    {
	    event = event ? event : (window.event ? window.event : null); 

	    if (event.keyCode==37) 
	    {
		    if (prevpage!='')
			    location=prevpage;
		    else
			    alert('这是第一页');
	    }

	    if (event.keyCode==39)
	    {
		    if (nextpage!='')
			    location=nextpage;
		    else
			    alert('已经是最后一页了');
	    }

	    if (event.keyCode==13) location="/FileList.htm"

	    if (event.keyCode==70 || event.keyCode==102) window.showModelessDialog('/topic/selcolor.htm',window,'status:no;resizable:no;help:no;dialogHeight:260px;dialogWidth:300px;')

	    if (event.keyCode==98 || event.keyCode==66) FontBold();

	    if (event.keyCode==78 || event.keyCode==110) UnFontBold();

	    if (event.keyCode==83 || event.keyCode==115) ViewWZ();
	}
