
scrollVertical.prototype.scrollArea=null;scrollVertical.prototype.scrollMsg=null;scrollVertical.prototype.unitHeight=0;scrollVertical.prototype.msgHeight=0;scrollVertical.prototype.copyMsg=null;scrollVertical.prototype.scrollValue=0;scrollVertical.prototype.scrollHeight=0;scrollVertical.prototype.isStop=false;scrollVertical.prototype.isPause=false;scrollVertical.prototype.scrollTimer=null;scrollVertical.prototype.speed=2000;scrollVertical.prototype.isMoz=function(){return navigator.userAgent.toLowerCase().indexOf('gecko')>0;};scrollVertical.prototype.play=function(o){var s_msg=o.scrollMsg;var c_msg=o.copyMsg;var s_area=o.scrollArea;var msg_h=o.msgHeight;var anim=function(){if(o.scrollTimer)clearTimeout(o.scrollTimer);if(o.isPause){o.scrollTimer=setTimeout(anim,10);return;}
if(msg_h-o.scrollValue<=0){o.scrollValue=0;}else{o.scrollValue+=1;o.scrollHeight+=1;}
if(o.isMoz){s_area.scrollTop=o.scrollValue;}else{s_msg.style.top=-1*o.scrollValue+"px";c_msg.style.top=(msg_h-o.scrollValue)+"px";}
if(o.scrollHeight%s_area.offsetHeight==0){o.scrollTimer=setTimeout(anim,o.speed);}else{o.scrollTimer=setTimeout(anim,10);}};anim();};function scrollVertical(disp,msg,tg){if(typeof(disp)=='string'){this.scrollArea=document.getElementById(disp);}else{this.scrollArea=disp;}
if(typeof(msg)=='string'){this.scrollMsg=document.getElementById(msg);}else{this.scrollMsg=msg;}
var s_msg=this.scrollMsg;var s_area=this.scrollArea;if(!tg)var tg='li';this.unitHeight=s_msg.getElementsByTagName(tg)[0].offsetHeight;this.msgHeight=this.unitHeight*s_msg.getElementsByTagName(tg).length;s_msg.style.position="absolute";s_msg.style.top=0;s_msg.style.left=0;var copydiv=document.createElement('div');copydiv.id=s_area.id+"_copymsgid";copydiv.innerHTML=s_msg.innerHTML;copydiv.style.height=this.msgHeight+"px";s_area.appendChild(copydiv);copydiv.style.position="absolute";copydiv.style.top=this.msgHeight+"px";copydiv.style.left=0;this.copyMsg=copydiv;this.play(this);}

ycn=window.ycnui||{};ycn.common=new function(){this.lTrim=function(i){return i.replace(/^\s*/,"");};this.rTrim=function(i){return i.replace(/\s*$/,"");};this.trim=function(i){return this.rTrim(this.lTrim(i));};this.getEl=function(i){if(!document.getElementById)return false;if(typeof i==="string"){return document.getElementById(i);}else{return i;}};this.getElByClassName=function(t,n,s,el){var el=(el)?el:document;var itm=el.getElementsByTagName(t);var num=1;for(i=0;i<itm.length;i++){if(itm[i].className===n&&s===num){return itm[i];}else if(itm[i].className===n){num++;}}
return false;};this.isIE6=function(){return navigator.userAgent.search('MSIE')>0&&navigator.userAgent.search('6')>0;}
this.isIE=function(){return navigator.userAgent.search('MSIE')>0;}
this.isOpera=function(){return navigator.userAgent.indexOf('Opera')>-1;}
this.isMoz=function(){return navigator.userAgent.indexOf('Mozilla/5.')>-1;}
this.setCookie=function(cn,cv,d,dm){var now=new Date();var expire=new Date();if(d==null||d==0)d=1;expire.setTime(now.getTime()+3600000*24*d);document.cookie=cn+"="+escape(cv)
+";expires="+expire.toGMTString()
+";domain="+dm;}
this.deleteCookie=function(cn,dm){if(getCookie(name))
{document.cookie=cn+"="+
((domain)?"; domain="+dm:"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT";}}
this.getCookie=function(cn)
{var dc=document.cookie;var prefix=cn+"=";var begin=dc.indexOf("; "+prefix);if(begin==-1)
{begin=dc.indexOf(prefix);if(begin!=0)return null;}
else
{begin+=2;}
var end=document.cookie.indexOf(";",begin);if(end==-1)
{end=dc.length;}
return unescape(dc.substring(begin+prefix.length,end));}};


ycnui=window.ycnui||{};ycnui.event=new function(){this.addEvent=function(ne,ev,fn){if(typeof ne==='string'){var el=document.getElementById(ne);}else{var el=ne;}
var oe;switch(ev){case'click':oe=el.onclick;if(typeof el.onclick!=='function'){el.onclick=fn;}else{el.onclick=function(){oe();fn();}}
break;case'focus':oe=el.onfocus;if(typeof el.onfocus!=='function'){el.onfocus=fn;}else{el.onfocus=function(){oe();fn();}}
break;case'blur':el.onblur=function(){fn();};break;case'mouseover':el.onmouseover=function(){fn();};break;case'mouseout':el.onmouseout=function(){fn();};break;}};this.addLoadEvent=function(fn){var oLoad=window.onload;if(typeof window.onload!='function'){window.onload=fn;}else{window.onload=function(){oLoad();fn();}}};};


slidePlayer.prototype.iNum;slidePlayer.prototype.sWidth;slidePlayer.prototype.sHeight;slidePlayer.prototype.sSpeed;slidePlayer.prototype.sStyle;slidePlayer.prototype.sContainer;slidePlayer.prototype.dPanel;slidePlayer.prototype.nPanel;slidePlayer.prototype.dImg;slidePlayer.prototype.LinkTarget="_blank";slidePlayer.prototype.iArr;slidePlayer.prototype.lArr;slidePlayer.prototype.sImg;slidePlayer.prototype.sLink;slidePlayer.prototype.bWidth;slidePlayer.prototype.sTime;slidePlayer.prototype.isStart;slidePlayer.prototype.cNum;slidePlayer.prototype.initDisplayPanel=function(){var that=this;var sC=this.sContainer;var nP=this.nPanel;var ul,li,n,i,tmp;sC.style.display="block";sC.style.width=(this.sWidth+this.bWidth*2)+"px";sC.style.height=this.sHeight+"px";this.iArr=this.dImg.getElementsByTagName("img");this.lArr=this.dImg.getElementsByTagName("a");this.iNum=this.iArr.length;this.dPanel=document.createElement("div");var dP=this.dPanel;dP.className="slideDisplayPannel";this.sLink=document.createElement("a");this.sLink.setAttribute("href",this.lArr[0].href);this.sLink.setAttribute("target",this.LinkTarget);this.sImg=document.createElement("img");this.sImg.style.display="block";this.sImg.setAttribute("src",this.iArr[0].src);this.sImg.setAttribute("alt",this.iArr[0].alt);this.sImg.setAttribute("width",this.sWidth);this.sImg.setAttribute("height",this.sHeight);this.sLink.appendChild(this.sImg);dP.style.width=this.sWidth+"px";dP.style.Height=this.sHeight+"px";nP.style.width=dP.style.width;dP.appendChild(this.sLink);var over=function(){that.isStart=false;};var out=function(){that.isStart=true;};var changeNum=function(e){var nb=(e)?e:window.event;if(nb.target){var ne=(nb.target.nodeType===3)?nb.target.parentNode:nb.target;}else{var ne=nb.srcElement;}
that.cNum=parseInt(ne.innerHTML)-1;clearTimeout(that.sTime);that.changeSlideAction(that.cNum,that);that.cNum++;that.sTime=setTimeout(slidePlay,that.sSpeed);};ycnui.event.addEvent(dP,"mouseover",over);ycnui.event.addEvent(dP,"mouseout",out);ul=document.createElement("ul");ul.className="slideNumber";for(i=0;i<this.iNum;i++){li=document.createElement("li");if(i===0){li.className="curSlideNumber";}
n=document.createTextNode(i+1);li.appendChild(n);ul.appendChild(li);ycnui.event.addEvent(li,"click",changeNum);}
sC.insertBefore(dP,this.nPanel);nP.appendChild(ul);this.isStart=true;var slidePlay=function(){if(that.sTime)clearTimeout(that.sTime);var iN=that.iNum;var nT=that.nPanel.getElementsByTagName("li");var sI=that.sImg;var sL=that.sLink;if(that.isStart){if(that.cNum<iN){that.cNum++;}else{that.cNum=1;}
that.changeSlideAction(that.cNum-1,that);that.sTime=setTimeout(slidePlay,that.sSpeed);}else{that.sTime=setTimeout(slidePlay,that.sSpeed);}};this.sTime=setTimeout(slidePlay,this.sSpeed);}
slidePlayer.prototype.changeSlideAction=function(cn,o){var dP=o.dPanel;var iN=o.iNum;var nT=o.nPanel.getElementsByTagName("li");var transdivid="slideNextImgId"+Math.floor(Math.random()*1000);var nimgdiv=document.createElement("div");nimgdiv.id=transdivid
nimgdiv.style.position="absolute";nimgdiv.style.top=0;nimgdiv.style.left=0;nimgdiv.style.zIndex=1;nimgdiv.style.filter="alpha(opacity=0)";nimgdiv.style.opacity=0;nimgdiv.style.MozOpacity=0;nimgdiv.style.width=o.sWidth+"px";nimgdiv.style.height=o.sHeight+"px";var nimg=document.createElement("img");nimg.setAttribute("src",o.iArr[cn].src);nimg.setAttribute("width",o.sWidth);nimg.setAttribute("height",o.sHeight);nimgdiv.appendChild(nimg);dP.appendChild(nimgdiv);var transdiv=document.getElementById(transdivid);if(o.isIE5()){o.sImg.setAttribute("src",o.iArr[cn].src);o.sImg.setAttribute("alt",o.iArr[cn].alt);o.sLink.setAttribute("href",o.lArr[cn].href);dP.removeChild(transdiv);}else{var trans=0;var act=function(){if(t)clearTimeout(t);trans+=10;if(trans<=100){transdiv.style.filter="alpha(opacity="+trans+")";transdiv.style.opacity=trans/100;transdiv.style.MozOpacity=trans/100;var t=setTimeout(act,50);}else{o.sImg.setAttribute("src",o.iArr[cn].src);o.sImg.setAttribute("alt",o.iArr[cn].alt);o.sLink.setAttribute("href",o.lArr[cn].href);dP.removeChild(transdiv);}};var t=setTimeout(act,50);}
for(i=0;i<iN;i++){if(i===(cn)){nT[i].className="curSlideNumber";}else{nT[i].className="";}}
if(typeof(slidCallBack)!='undefined')slidCallBack.endChangeSlidePic(cn,o);}
slidePlayer.prototype.isIE5=function(){return navigator.userAgent.toLowerCase().indexOf('msie 5.0')>0;};function slidePlayer(sc,dp,np,sw,sh,sp,bw,st){this.sContainer=ycn.common.getEl(sc);this.dImg=ycn.common.getEl(dp);this.nPanel=ycn.common.getEl(np);this.sWidth=sw;this.sHeight=sh;this.sSpeed=sp*1000;this.bWidth=bw;this.cNum=1;this.initDisplayPanel();}


var slidCallBack = {
endChangeSlidePic : function(i,o){
 if(i<0) i=0;
 var num = 1,addones=new Array;
 while(ycn.common.getElByClassName('div','slide_addone',num))
 {
 addones[num-1] = ycn.common.getElByClassName('div','slide_addone',num);
 addones[num-1].style.display = 'none';
 addones[num-1].onmouseover = function(){
 o.isStart = false;
 }
 addones[num-1].onmouseout = function(){
 o.isStart = true;
 }
 num++
 }
 addones[i].style.display = 'block';
}
};
var s_m = new Array,is_s = true,s_timer,s_m_1;
function init(){
if(!document.getElementById('slideContainer')) return;
var c = document.getElementById('slideContainer');
if(document.getElementById('slideWaiting')) c.removeChild(document.getElementById('slideWaiting'));
var slide=new slidePlayer('slideContainer','slideDisplayImgs','slideNumberPannel',351,234,5,0);
var s_m_1 = new scrollVertical('castroom','castroom_con','tr');
 s_m_1.speed = 2000;
 s_m_1.isPause = true;
 var timer_start = setTimeout(function(){clearTimeout(timer_start);s_m_1.isPause = false;},1500);
 s_m_1.scrollArea.onmouseover = function(){
 s_m_1.isPause = true;
 };
 s_m_1.scrollArea.onmouseout = function(){
 s_m_1.isPause = false;
 };
}
ycnui.event.addLoadEvent(init);

function killErrors()
{
	return true;
}
window.onerror = killErrors;