// 

function $(id){if(document.getElementById){return document.getElementById(id);}
else if(document.all){return document.all[id];}
else if(document.layers){return document.layers[id];}
else{return false;}}
function $$(id)
{return $(id).style;}
function getLastRead(CookiesName)
{var cookieString=new String(document.cookie);var cookieHeader=CookiesName+"=";var beginPosition=cookieString.indexOf(cookieHeader);var myvalue="";if(beginPosition!=-1)
{myvalue=cookieString.substring(beginPosition+cookieHeader.length);var SemiPos=myvalue.indexOf('\;');if(SemiPos>0)
myvalue=myvalue.substring(0,SemiPos);}
return myvalue;}
function ShowLastRead()
{var s=getLastRead("UserLastBook");if((s==null)|(s==""))
{$$("divLastHas").display='none';$$("divLastNone").display='block';}else
{var ss=s.split("|")
$$("divLastHas").display='block';$$("divLastNone").display='none';var LastAid=ss[0];var LastName=ss[1];$("divLastHas").innerHTML="您最近正在阅读<span class='red'>《<a href='http://novel.hongxiu.com/a/"+LastAid+"/' target='_blank'>"+unescape(LastName)+"</a>》</span> <em><a href='http://sns.hongxiu.com/PersonManager/Read/Store/lastsee.aspx' target='_blank'>我看过的书</a> ┆ <a href='http://www.hongxiu.com/zt/fm/fm1.html' target='_blank'>封面推荐</a> ┆ <a href='http://www.hongxiu.com/novel/s/1_1.html' target='_blank'>言情小说</a> ┆ <a href='http://www.hongxiu.com/zt/random/' title='随便看看' target='_blank'>随便看看</a></em>";}}

function ShowTab(BlkBlackTabid_num,BlkBlackTabnum){for(var i=0;i<5;i++){$$("tabc_"+BlkBlackTabid_num+i).display="none";}
for(var i=0;i<5;i++){$("tabm_"+BlkBlackTabid_num+i).className="";}
$("tabm_"+BlkBlackTabid_num+BlkBlackTabnum).className="now";$$("tabc_"+BlkBlackTabid_num+BlkBlackTabnum).display="block";}
function showlist(k,h){for(var i=0;i<4;i++){$$("box_"+k+i).display="none";}
for(var i=0;i<4;i++){$("tab_"+k+i).className="";}
$("tab_"+k+h).className="now";$$("box_"+k+h).display="block";}
var showImageIndex=-1;var imageTimer;function showImage(imageIndex)
{var flash_img_div=$("flash_img");var flash_title=$("flash_title");if(imageIndex>fImgs.length-1)
imageIndex=0;if(imageIndex<0)
imageIndex=fImgs.length-1;if(!fImgs[imageIndex]||imageIndex==showImageIndex)
return false;var imgId="__fImg"+imageIndex;flash_img_div.filters&&flash_img_div.filters[0].Apply();for(i=0;i<flash_img_div.childNodes.length;i++){flash_img_div.childNodes[i].style.display="none";}
if($(imgId)){var imga=$(imgId);imga.style.display="block";if(imga.tagName=="OBJECT"){imga.rewind();imga.Play();}}else{var pos=fImgs[imageIndex].img.lastIndexOf(".");if(fImgs[imageIndex].img.substr(pos+1).substr(0,3).toLowerCase()=="swf"){flash_img_div.innerHTML+='\
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="320" height="240" id="'+imgId+'">\
     <param name="movie" value="'+fImgs[imageIndex].img+'" />\
     <param name="quality" value="high" />\
     <embed src="'+fImgs[imageIndex].img+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="320" height="240"></embed>\
    </object>';}else{var img=new Image();img.border="0";img.src=fImgs[imageIndex].img;img.width="250";img.height="170";var a=document.createElement("a");a.href=fImgs[imageIndex].href;a.target="_blank";a.id=imgId;a.appendChild(img);flash_img_div.appendChild(a);}}
flash_img_div.filters&&flash_img_div.filters[0].Play();var flash_show_ctl_msg=$("flash_show_ctl_msg");flash_show_ctl_msg.filters&&flash_show_ctl_msg.filters[0].Apply();flash_title.href=fImgs[imageIndex].href;flash_title.innerHTML=fImgs[imageIndex].title;flash_show_ctl_msg.filters&&flash_show_ctl_msg.filters[0].Play();showImageIndex=imageIndex;var myid,mybid;myid="txt"+imageIndex;for(var i=0;i<fImgs.length;i++){mybid="txt"+i;$$(mybid).display="none";}
$$(myid).display="block";return true;}
function imagePlay()
{if(imageTimer)return;if(showImageIndex>=fImgs.length-1){showImageIndex=-1;}
var myDate=new Date();var mytime=myDate.toLocaleTimeString();if((mytime>="21:00:00")||(mytime<="10:00:00"))
showImage(showImageIndex+1);else if(mytime>"10:00:00"&&mytime<="15:00:00")
showImage(showImageIndex+2);else if(mytime>"15:00:00"&&mytime<"21:00:00")
showImage(showImageIndex+3)}
function stop(){clearInterval(imageTimer);imageTimer=null;}
function showNextImage(){showImage(showImageIndex+1);}
function showPrevImage(){showImage(showImageIndex-1);}
function ppRoll(a)
{this.myA=a;this.myA.IsPlay=1;this.$(a.demo).style.overflow="hidden";this.$(a.demo).style.width=a.width;this.$(a.demo).style.height=a.height;this.$(a.demo2).innerHTML=this.$(a.demo1).innerHTML;this.$(a.demo).scrollTop=this.$(a.demo).scrollHeight;this.Marquee();this.$(a.demo).onmouseover=function(){eval(a.objStr+".clearIntervalpp();");}
this.$(a.demo).onmouseout=function(){eval(a.objStr+".setTimeoutpp();")}}
ppRoll.prototype.$=function(Id)
{return document.getElementById(Id);}
ppRoll.prototype.Marquee=function()
{this.MyMar=setTimeout(this.myA.objStr+".Marquee();",this.myA.speed);if(this.myA.IsPlay==1)
{if(this.myA.direction=="roll_top")
{if(this.$(this.myA.demo).scrollTop>=this.$(this.myA.demo2).offsetHeight)
this.$(this.myA.demo).scrollTop-=this.$(this.myA.demo2).offsetHeight;else
this.$(this.myA.demo).scrollTop++;}
else if(this.myA.direction=="roll_down")
{if(this.$(this.myA.demo1).offsetTop-this.$(this.myA.demo).scrollTop>=0)
this.$(this.myA.demo).scrollTop+=this.$(this.myA.demo2).offsetHeight;else
this.$(this.myA.demo).scrollTop--;}
else if(this.myA.direction=="roll_left")
{if(this.$(this.myA.demo2).offsetWidth-this.$(this.myA.demo).scrollLeft<=0)
this.$(this.myA.demo).scrollLeft-=this.$(this.myA.demo1).offsetWidth;else
this.$(this.myA.demo).scrollLeft++;}
else if(this.myA.direction=="roll_right")
{if(this.$(this.myA.demo).scrollLeft<=0)
this.$(this.myA.demo).scrollLeft+=this.$(this.myA.demo2).offsetWidth;else
this.$(this.myA.demo).scrollLeft--;}}}
ppRoll.prototype.clearIntervalpp=function()
{this.myA.IsPlay=0;}
ppRoll.prototype.setTimeoutpp=function()
{this.myA.IsPlay=1;}
function killErrorsss()
{return true;}
window.onerror=killErrorsss;
function phtab(k,h){for(var i=0;i<2;i++){document.getElementById("phlist_"+k+i).style.display="none";}
for(var i=0;i<2;i++){document.getElementById("phmenu_"+k+i).className="";}
document.getElementById("phmenu_"+k+h).className="now";document.getElementById("phlist_"+k+h).style.display="block";}