function noselectstart(){return false;}
function nocontextmenu(){
  if(iNavig.Name=='ie') event.returnValue=false;
  else arguments[0].preventDefault();
}
function nodragstart(){
  if(iNavig.Name=='ie') event.returnValue=false;
  else arguments[0].preventDefault();
}
document.oncontextmenu = nocontextmenu;
document.onselectstart = noselectstart;
document.ondragstart = nodragstart;

function fss(n){
  novelcont.style.fontSize=n+'px';
}
function ffs(f){
  novelcont.style.fontFamily =f;
}

function bodykeydown(){
  if(iNavig.Name=='ie') var kc=window.event.keyCode;
  else{var e=arguments[0];var kc=e.which;}
  if(kc<37||kc>40) return;
  if(iNavig.Name=='ie'){event.returnValue = false; event.cancelBubble = true;}
  else{e.preventDefault();e.stopPropagation();}
  if(kc==37){
    chapternavi.innerHTML.match(/<a href="([^>]+)">前一章<\/a>/gi);
    var pp=RegExp.$1;
    if(pp==''){alert('此章是最前一章！');return;}
    location.href=pp;
    return;
  }
  if(kc==38){
    chapternavi.innerHTML.match(/<a href="([^>]+)">返回目录<\/a>/gi);
    var ml=RegExp.$1;
    location.href=ml;
    return;
  }
  if(kc==39){
    chapternavi.innerHTML.match(/<a href="([^>]+)">后一章<\/a>/gi);
    var np=RegExp.$1;
    if(np==''){alert('此章是最后一章！');return;}
    location.href=np;
    return;
  }
  if(kc==40){
    if(chapternavi2.innerHTML.search(/morecont\(\)/gi)<0){alert('本章节内容已完全展示！\r\n后面的内容请使用(→)键翻至下一章\r\n向下滚动请使用(PageDwon)键！');}
    else morecont();
    return;
  }
}
if(iNavig.Name=='ie') document.attachEvent('onkeydown',bodykeydown);
else document.addEventListener('keydown',bodykeydown,false);
