﻿function setTool(){if(!String.prototype.x&&typeof product=='function')String.prototype.x=product;if(!String.prototype.count&&typeof countS=='function')String.prototype.count=countS;if(!Number.prototype.decp&&typeof decplaces=='function')Number.prototype.decp=decplaces;if(!String.prototype.gText&&typeof getText=='function')String.prototype.gText=getText;if(!String.prototype.turnU&&typeof turnUnicode=='function')String.prototype.turnU=turnUnicode;if(!String.prototype.trim&&typeof trimStr=='function')String.prototype.trim=trimStr;if(!String.prototype.toDate&&typeof StrToDate=='function')String.prototype.toDate=StrToDate;if(!Date.prototype.toStr&&typeof DateToStr=='function')Date.prototype.toStr=DateToStr;if(typeof alert=='undefined'&&typeof JSalert=='function')alert=JSalert}
function product(c){if(isNaN(c)||(c=Math.floor(c))<1)return'';var i,r='',s=[];s[i=1]=this;while(i+i<=c)s[i+i]=s[i]+s[i],i+=i;while(c){if(i<=c)r+=s[i],c-=i;i/=2}return r}
function decplaces(d,m){var v=this.valueOf(),i,n;if(isNaN(v))return v;if(isNaN(d)||d<0)d=8;else if(d>20)d=20;if(!m&&Number.prototype.toFixed)return parseFloat(v.toFixed(d));if(v<0)n=1,v=-v;if((i=(v=v.toString(10)).indexOf('e'))!=-1)return v.charAt(i+1)=='-'?0:v;if(i=v.indexOf('.'),i!=-1){if(i+1+d<v.length)if(m)v=v.slice(0,i+1+d);else{v='00000000000000000000'+Math.round(v.slice(0,i++)+v.substr(i,d)+'.'+v.charAt(i+d)).toString(10);v=v.slice(0,m=v.length-d)+'.'+v.substr(m);}}return v?parseFloat((n?'-':'')+v):0}
function countS(k){return(this.length-this.replace(k,'').length)/k.length}
function getText(){return this.valueOf().replace(/<s>[^<]*<\/s>/gi,'').replace(/<w?br[^>]*>/gi,'\n').replace(/<\/?[A-Za-z][^>]*>/g,'');}
function turnUnicode(b){var s=this.valueOf().replace(/&nbsp;/g,' ').replace(/&lt;/g,'<').replace(/&gt;/g,'>').replace(/&quot;/g,'"').replace(/&apos;/g,"'"),m,t;s=s.replace(/&#0*(\d{2,7});/g,function($0,$1){return String.fromCharCode($1);});if(b)s=s.gText();return s}
function trimStr(l,m){var s=this.valueOf(),t=[],sp='<br/>';if(!s||!l||l<1||!String.fromCharCode)return m?s.gText():s;s=s.turnU(m);if(s.length<=l)return s;if(!m)s=s.replace(/<w?br([^>]*)>/gi,sp);s=s.split(sp=m?'\n':sp);try{for(var i=0;i<s.length;i++)t.push(trimStr_(s[i],l,m));}catch(e){return this.valueOf();}return t.join(sp);}
function StrToDate(s,f,diff){if(!s)s=this.valueOf();var m,a,b,c;if(!f&&!diff&&(m=Date.parse(s)))return new Date(m);if(m=s.match(/(^|[^\d])([12]\d{3})([^\/.\-年]|$)/))s=m[2]+'/1';f=1911;if(diff)diff=(new Date).getTimezoneOffset()+parseInt(60*diff);if(!diff)diff=0;if(m=s.match(StrToDate.r1))a=new Date((b=m[2]-0)&&b<200?b+f:b,m[3]?m[3]-1:0,m[5]||1,m[12]=='P'||m[13]=='p'?m[7]-0+12:m[7],m[8]-diff,m[10],m[11]*1e3);if((!m||!isNaN(m[0]))&&(c=s.match(StrToDate.r2)))m=c,a=new Date((b=m[10]-0)&&b<200?b+f:b,m[11]?m[11]-1:0,m[13]||1,m[7]=='P'||m[7]=='p'?m[1]-0+12:m[1],m[2]-diff,m[4],m[5]*1e3);if(StrToDate.m=m){if(!b&&a-new Date(0,0,2)>0&&(m=new Date(a),a.setFullYear(s=(b=new Date).getFullYear()),m.setFullYear(a-b>0?s-1:s+1),a-b>0&&a-b>b-m||a-b<0&&a-b<b-m))a=m;return a}}
function DateToStr(sp){if(!sp)sp='/';with(this)return''+getYear()+sp+(getMonth()+1)+sp+getDate()+' '+getHours()+':'+getMinutes();}
function trigger(div,v,s){if(!s)s='block';var N,n='none',f=arguments.callee.f;if(typeof div=='string')div=typeof getDocObj=='function'?getDocObj(div):document.getElementById(div);if(!div)return;with(div){if(!div.style)n='hidden';if(typeof tagName=='string')N=tagName.toLowerCase();if((N=='div'||N=='span')&&!innerHTML)if(div.style)style.display=n;else div.visibility=h;if(div.style)with(style)return display=!v||v==f._switch?!display||display==n?s:n:v==f._show?s:v==f._hidden?n:display}}
function setTopP(l,s){if(!setTopPDTopP)return 2;if(!l)l=dBasePath(setTopPDTopP)+getFN(setTopPDTopP);if(typeof s=='undefined')try{s=window.location.search}catch(e){return}
var t,r=/[\/\\]$/i,ri=/[\/\\](index.s?html?)?$/i;try{t=window.top.location.href.replace(/[?#](.*)$/,'');}catch(e){t='';}if(t!=l&&!(r.test(l)&&ri.test(t))&&!(ri.test(l)&&r.test(t)))if(s===setTopP_doTest)return 1;else window.top.location.replace(l+s+'#'+encodeURIComponent(location.href));}
function setAstatus(){if(typeof event=='undefined')return;var i,o;if(o=document.getElementsByTagName('A'))for(i=0;i<o.length;i++)if(o[i].title&&!o[i].onmouseover&&!o[i].onmouseout)o[i].onmouseover=setAstatusOver,o[i].onmouseout=setAstatusOut}
function doAlert(n,m,iconContent){if(!n&&typeof doAlertDivName=='string'&&doAlertDivName)n=doAlertDivName;var o=document.getElementById(n),oBg=document.getElementById(n+'Bg'),oI=document.getElementById(n+'I');if(!document.body||!o||m&&!alert(o.innerHTML))return;if(!oI)try{o.parentNode.insertBefore(oI=document.createElement('div'),o);oI.id=n+'I';oI.onclick=function(){doAlertInit();doAlert();};oI.title="注意事項";oI.innerHTML=iconContent||'別忘了';oI.doAlertScrollT=oI.doAlertScrollL=0}catch(e){return}if(!oBg)try{o.parentNode.insertBefore(oBg=document.createElement('div'),o);oBg.id=n+'Bg';}catch(e){return}disableKM(2);doAlertResize();window.Oonresize=window.onresize,window.onresize=doAlertResize;with(oI.style)display='none',position='absolute',right='.1em',top='.1em';with(oBg.style)position='absolute',left=-parseInt(document.body.leftMargin),top=-parseInt(document.body.topMargin),width=height='110%',display='inline';if(o.filters)o.filters.alpha.opacity=85;if(oBg.filters)try{oBg.filters.alpha.opacity=30}catch(e){}else{o.style.position='fixed';with(oBg.style)position='fixed',opacity=oBg.style['-moz-opacity']=.3,left=top=0,width=height='100%';}if(getCookie('doAlert')==n)doAlertAccess(n);else o=getWinStatus(),doAlertOldScrollLocation=[o.scrollX,o.scrollY],setTimeout('scrollTo(0,0);',0);}
function scrollTo(y,x){if(typeof scrollToXY!='object')scrollToXY={};if(typeof y=='object'&&(!isNaN(y.x)||!isNaN(y.y))){if(!isNaN(y.x))scrollToXY.x=y.x;if(!isNaN(y.y))scrollToXY.y=y.y}else if(y instanceof Array)scrollToXY.x=y[0],scrollToXY.y=y[1];else{if(typeof x!='undefined')scrollToXY.x=x;if(typeof y!='undefined')scrollToXY.y=y}if(isNaN(scrollToXY.x))scrollToXY.x=0;if(isNaN(scrollToXY.y))scrollToXY.y=0;setTimeout('window.scrollTo(scrollToXY.x,scrollToXY.y);',9);var _w=getWinStatus();if(_w.scrollX==scrollToXY.x&&_w.scrollY==scrollToXY.y){if(!--scrollToOK&&scrollToInterval)window.clearInterval(scrollToInterval),scrollToInterval=0}else if(!scrollToInterval)scrollToInterval=window.setInterval('scrollTo();',90),scrollToOK=3}
function disableKM(s,m){if(!document.body)return;if(typeof s=='undefined')s=1;if(typeof disabledKM=='undefined')disabledKM=0;if(!s){if(disabledKM){ondragstart=document.body.Oondragstart||null,oncontextmenu=document.body.Ooncontextmenu||null,onselectstart=document.body.Oonselectstart||null;with(window.document.body)if(disabledKM==2)style.overflow=typeof document.body.Ooverflow=='string'?Ooverflow:'auto';onmousedown=window.Oonmousedown||null,onkeydown=window.Oonkeydown||null;onmousedown=document.Oonmousedown||null,onkeydown=document.Oonkeydown||null}disabledKM=0;return}if(disabledKM){with(document.body)if(s==2)style.overflow='hidden';else if(typeof document.body.Ooverflow=='string')style.overflow=Ooverflow}else{with(document.body){document.body.Ooverflow=style.overflow;if(s==2)style.overflow='hidden';if(typeof onselectstart!='undefined')document.body.Oonselectstart=onselectstart;if(typeof oncontextmenu!='undefined')document.body.Ooncontextmenu=oncontextmenu;if(typeof ondragstart!='undefined')document.body.Oondragstart=ondragstart;ondragstart=oncontextmenu=onselectstart=function(){return false}}with(window){if(typeof onmousedown!='undefined')document.Oonmousedown=onmousedown;if(typeof onkeydown!='undefined')document.Oonkeydown=onkeydown}with(window.document){if(typeof onmousedown!='undefined')document.Oonmousedown=onmousedown;if(typeof onkeydown!='undefined')document.Oonkeydown=onkeydown}}window.onmousedown=window.onkeydown=document.onmousedown=document.onkeydown=document.onContextMenu=new Function('e','if(window.navigator.appName=="Microsoft Internet Explorer"&&event.button!=1||window.navigator.appName=="Netscape"&&e.which!=1){'+(m?'alert('+dQuote(m)+');':'')+'return false;}');if(!disabledKM&&window.captureEvents)window.captureEvents(Event.MOUSEDOWN),window.captureEvents(Event.KEYDOWN);disabledKM=s}
function dealPopup(tag,classN,func){if(!tag)tag='b';var i,j,o=document.getElementsByTagName(tag),tp;if(o.length)for(i=0;i<o.length;i++){if(classN&&!hasClassN(o[i],classN)||func&&func(o[i]))continue;for(j=0,tp='';j<sPopP.allTypes.length;j++)if(o[i][sPopP.allTypes[j]]){tp=sPopP.allTypes[j];break}if(tp&&(tp=sPop(o[i],sPopF[tp]|sPopF.nopop))){if(tp==sPopF.window){if(!o[i].onclick)o[i].onclick=new Function('sPop(this,'+tp+');'),o[i].style.cursor='pointer';}else if(tp==sPopF.popup){if(!o[i].onmouseover){o[i].onmouseover=new Function('sPop(this,'+tp+');');if(!o[i].onmouseout)o[i].onmouseout=new Function('sPop(this,sPopF.clearPop);');if(!o[i].onclick)o[i].onclick=new Function('this.onmouseout=null;sPop(this,'+tp+');'),o[i].style.cursor='pointer';}}}}}
function setText(o,txt){if(!o||typeof window!='object'||typeof window.document!='object'||typeof o=='string'&&!(o=document.getElementById(o)))return;if(typeof setTextT!='string'||!setTextT)with(window.document)setTextT=typeof document.body.textContent=='string'?'textContent':typeof document.body.innerText=='string'?'innerText':'innerHTML';var p=typeof o.value=='string'?'value':setTextT;if(typeof txt!='undefined')o[p]=txt;if(o.nodeType==3||o.nodeType==4)return o.data;return o[p]}
function setAutoScroll(interval,force){if(!force)if(typeof document!='object'||setAutoScrollTimer||document.onmousedown||document.ondblclick)return;if(interval)setAutoScrollInterval=interval;else if(!setAutoScrollInterval&&!(setAutoScrollInterval=getCookie('setAutoScrollInterval')))setAutoScrollInterval=200;clearInterval(setAutoScrollTimer),setAutoScrollTimer=0;if(setAutoScrollInterval<0){document.onmousedown=document.ondblclick=null;return}document.onmousedown=function(){if(setAutoScrollTimer)window.clearInterval(setAutoScrollTimer),setAutoScrollTimer=0};document.ondblclick=function(){if(setAutoScrollTimer)return;setAutoScrollTimer=window.setInterval('window.scrollBy(0,1);',setAutoScrollInterval);}}
function wordCount(t,flag){var isHTML=flag&2;if(typeof t=='object')if(t.innerText)t=t.innerText,isHTML=0;else if(t.innerHTML)t=t.innerHTML,isHTML=1;if(typeof t!='string')return 0;if(isHTML)t=t.replace(/<!--((.|\n)*?)-->/g,'').replace(/<[\s\n]*\/?[\s\n]*[a-z][^<>]*>/gi,'');if(flag&1)t=t.replace(/[\+\-*\\\/?!,;.()<>{}\[\]@#$%^&_|"'~`]{2,}/g,';');return t.replace(/[a-zA-ZÀ-ÖØ-öø-ʨ\-']{2,}/g,'w').replace(/[\d:+\-\.\/,]{2,}/g,'d').replace(/[\s\n　]/g,'').length}
function loadReference(referenceURL,iframeId){if(loadReferenceDone||typeof location!='object'||!location.protocol||location.protocol=='https:')return;var o=getDocObj(iframeId||'reference'),thisFuncName=parseFunction().funcName;if(typeof referenceDoc=='object'&&typeof referenceDoc.document=='object'&&referenceDoc.document){referenceDoc=o.contentWindow.document;o=referenceDoc.body;if(o&&o.innerHTML.length){if(typeof setupPageR=='function')setTimeout(setupPageR,9);loadReferenceDone=1}else{setTimeout(thisFuncName+'();',200);}return}if(typeof document!='object'||!document.body){setTimeout(thisFuncName+'();',90);return 1}if(!o||(o.tagName||'').toLowerCase()!='iframe'){loadReferenceDone=2;return}if(!o.src)o.style.display='none',o.src=referenceURL;if(typeof o.contentWindow=='object'&&typeof o.contentWindow.document=='object'){referenceDoc=o.contentWindow;setTimeout(thisFuncName+'();',20);}else{if(!referenceDoc)referenceDoc=40;try{if(referenceDoc--){setTimeout(thisFuncName+'();',300);return 2}else{return 4}}catch(e){return 5}}}
function transRefObj(id,id2,force){if(typeof id2!='string'&&typeof id2!='object')force=id2,id2=typeof id=='object'?id.id:id;var o=typeof id=='object'?id:getDocObj(id,getDocObj.f.self),p;if(o&&(force||!o.innerHTML)&&(p=typeof id2=='object'?id2:getDocObj(id2,getDocObj.f.refOnly))&&(force||p.innerHTML))try{o.appendChild(p.cloneNode(true));}catch(e){o.innerHTML=p.innerHTML}return o}
function oldVadapter(){if(!Array.prototype.push&&typeof Apush=='function')Array.prototype.push=Apush;if(!Array.prototype.pop&&typeof Apop=='function')Array.prototype.pop=Apop;if(!Array.prototype.shift&&typeof Ashift=='function')Array.prototype.shift=Ashift;if(!Array.prototype.unshift&&typeof Aunshift=='function')Array.prototype.unshift=Aunshift;if(typeof Function.prototype.apply=='undefined'&&typeof Fapply=='function')Function.prototype.apply=Fapply;if(typeof Function.prototype.call=='undefined'&&typeof Fcall=='function')Function.prototype.call=Fcall;if(typeof encodeURI!='function'&&typeof escape=='function')encodeURI=escape;if(typeof decodeURI!='function'&&typeof unescape=='function')decodeURI=unescape;if(typeof encodeURIComponent!='function'&&typeof encodeURI=='function')encodeURIComponent=encodeURI;if(typeof decodeURIComponent!='function'&&typeof decodeURI=='function')decodeURIComponent=decodeURI}
function getU(p,_e){var o;try{o=new ActiveXObject('Microsoft.XMLHTTP');}catch(e){o=new XMLHttpRequest();}if(o)with(o){open('GET',p,false);if(_e&&o.overrideMimeType)overrideMimeType('text/xml;charset='+_e);send(null);return responseText}return undefuned}
function addLoad(){for(var i=0,a=arguments;i<a.length;i++)addListener(0,{load:a[i]});}setTool();
function trimStr_(s,l,m){var lt,lt2,gt,i=0,c=l,t='',I=0;while(I<s.length){if(i!=-1)if((lt=s.indexOf('<',i))!=-1){if((gt=s.indexOf('>',lt+1))==-1)i=lt=-1;else{i=gt+1;while(lt!=-1&&(lt2=s.indexOf('<',lt+1))!=-1&&lt2<gt)lt=lt2}}else i=lt=-1;if(lt==-1)gt=lt=s.length;while(I+c<=lt){t+=s.substr(I,c)+(m?'\n':'<br/>');I+=c;c=l}t+=s.slice(I,gt+1);c-=lt-I;I=gt+1}return t}StrToDate.pd=/(([12]\d{3}|1\d{2}|[2-9]\d)[\/.\-年])?([01]?\d)([\/.\-月]([0-3]?\d)日?)?/;StrToDate.pt=/([0-2]?\d)[:時]([0-5]?\d)([:分]([0-5]?\d)(\.\d+)?)?\s*(([PA])M)?/i;StrToDate.r1=/(([12]\d{3}|1\d{2}|[2-9]\d)[\/.\-年])?([01]?\d)([\/.\-月]([0-3]?\d)日?)?(\s+([0-2]?\d)[:時]([0-5]?\d)([:分]([0-5]?\d)(\.\d+)?)?\s*(([PA])M)?)?/i;StrToDate.r2=/([0-2]?\d)[:時]([0-5]?\d)([:分]([0-5]?\d)(\.\d+)?)?\s*(([PA])M)?(\s+(([12]\d{3}|1\d{2}|[2-9]\d)[\/.\-年])?([01]?\d)([\/.\-月]([0-3]?\d)日?)?)?/i;
function dBasePath(bp,pn){if(!pn)pn=typeof location=='object'?location.href:typeof WScript=='object'?WScript.ScriptFullName:'';var p=reducePath(pn,1);if(!p)return;if(!bp)return p;var i,j,k,t,d=getPathOnly(reducePath(bp,1)).match(new RegExp('([^'+dirSpR+']+'+dirSpR+')','g'));if(!d)return;for(i=0,t='';i<d.length;i++)if(p.lastIndexOf(dirSp+d[i])!=-1){t=dirSp;while(d[i]&&(k=p.lastIndexOf(t+d[i]))!=-1)j=k,t+=d[i++];while(d[i])t+=d[i++];break}if(!t)return p;return p.slice(0,j)+t}
function getFN(p,bp,m){p=getFP(p,0,bp);p=p.slice(p.lastIndexOf(dirSp)+1);if(m){if(p.match(/[#?]/))p=p.substr(0,RegExp.lastIndex-1);p=p.replace(/[\\\/:*?"<>|]/g,'_');}return p}
var setTopPDTopP,setTopP_doTest=0.234372464;
function setAstatusOver(){var o=event.srcElement;if(o.title){setAstatusOS=window.status,window.status=o.title;return true}}
function setAstatusOut(){window.status=setAstatusOS;return true}
function doAlertInit(n){if(!n){setCookie(setCookieS.setRoot);setCookie('doAlert');return}
var d=document.getElementById(n);if(d){if(typeof doAlertDivName=='undefined')doAlertDivName=n;doAlert();}}
function doAlertResize(){if(typeof doAlertDivName!='string'||!doAlertDivName||!(o=document.getElementById(doAlertDivName)))return;with(o.style){position='absolute',display='block',width='70%';if(typeof window.innerHeight=='undefined')window.innerHeight=document.body.clientHeight;if(typeof window.innerWidth=='undefined')window.innerWidth=document.body.clientWidth;var t=(window.innerHeight-o.offsetHeight)/2;if(t<0)width=height='99%',top=0;else top=t+'px';t=(window.innerWidth-o.offsetWidth)/2;left=t<0?0:t+'px';}}
function doAlertAccess(n){if(!n&&typeof doAlertDivName=='string'&&doAlertDivName)n=doAlertDivName;var o=document.getElementById(n),oBg=document.getElementById(n+'Bg');if(oBg)oBg.style.display='none';o.style.display='none';disableKM(0);window.onresize=window.Oonresize||null;if(doAlertOldScrollLocation)scrollTo(doAlertOldScrollLocation,0,1);doAlertScroll(1);}
function doAlertScroll(m){var oI;if(typeof doAlertDivName!='string'||!doAlertDivName||!(oI=document.getElementById(doAlertDivName+'I')))return;if(typeof m!='undefined'){oI.style.display=m?'block':'none';oI.doAlertScrollL=oI.offsetWidth+(m||0);if(oI.currentStyle){if(m=parseInt(oI.currentStyle.paddingTop))oI.doAlertScrollT=m;m=parseInt(oI.currentStyle.paddingLeft);if(m=parseInt(oI.currentStyle.paddingRight))oI.doAlertScrollL+=m}else{oI.style.position='fixed';}}m=getWinStatus();oI.style.left=m.scrollX+m.windowW-oI.doAlertScrollL+'px';oI.style.top=m.scrollY-oI.doAlertScrollT+'px';}
var doAlertDivName,doAlertOldScrollLocation;
function getCookie(name,flag){if(typeof document!='object'||!document.cookie)return;if(!name)name='[^;=\\s]+';var c,R=name instanceof RegExp?name:new RegExp('('+name+')\\s*=\\s*([^;=\\s]*)','g'),m=document.cookie.match(R);if(!m)return;if(R.global)R=new_RegExp_flag(R,'-g');if(m.length>1)if(flag==0||typeof flag=='undefined'&&typeof name=='string')m=[m.slice(-1)];if(m.length==1&&typeof m[0]=='string'&&(c=m[0].match(R))[1]==name){return unescape(c[2]);}
var r={},v,M,i=0;for(;i<m.length;i++)if(typeof m[i]=='string'&&(M=m[i].match(R)))r[M[1]]=unescape(M[2]);return r}
function getWinStatus(o){this.scrollX=typeof window.pageXOffset!='undefined'?window.pageXOffset:typeof document.body.scrollLeft!='undefined'?document.body.scrollLeft:typeof document.documentElement.scrollLeft!='undefined'?document.documentElement.scrollLeft:typeof window.scrollX!='undefined'?window.scrollX:null;this.scrollY=typeof window.pageYOffset!='undefined'?window.pageYOffset:typeof document.body.scrollTop!='undefined'?document.body.scrollTop:typeof document.documentElement.scrollTop!='undefined'?document.documentElement.scrollTop:typeof window.scrollY!='undefined'?window.scrollY:null;var t=typeof document.body.scrollHeight!='undefined'&&typeof document.body.offsetHeight!='undefined'&&document.body.scrollHeight>document.body.offsetHeight;this.scrollW=t?document.body.scrollWidth:typeof document.body.offsetWidth!='undefined'?document.body.offsetWidth:null;this.scrollH=t?document.body.scrollHeight:typeof document.body.offsetHeight!='undefined'?document.body.offsetHeight:null;var NewIE=navigator.appVersion.indexOf("MSIE")!=-1&&parseInt(navigator.appVersion.split("MSIE")[1])>6;this.windowW=typeof window.innerWidth!='undefined'?window.innerWidth:!NewIE&&typeof document.body.clientWidth!='undefined'?document.body.clientWidth:document.documentElement&&!isNaN(document.documentElement.clientWidth)?document.documentElement.clientWidth:null;this.windowH=typeof window.innerHeight!='undefined'?window.innerHeight:!NewIE&&typeof document.body.clientHeight!='undefined'?document.body.clientHeight:document.documentElement&&!isNaN(document.documentElement.clientHeight)?document.documentElement.clientHeight:null;var noEmu;if(!o)o=typeof e=='object'?e:typeof event=='object'?event:typeof eventObj=='object'?(noEmu=1,eventObj):null;if(o){var isSafari=/Safari/i.test(window.navigator.appName);this.windowX=o.clientX-((isSafari)?this.scrollX:0);this.windowY=o.clientY-((isSafari)?this.scrollY:0);this.mouseX=o.clientX+((!isSafari)?this.scrollX:0);this.mouseY=o.clientY+((!isSafari)?this.scrollY:0);if(!noEmu)eventObj={'clientX':o.clientX,'clientY':o.clientY}}return this}
var scrollToXY,scrollToInterval,scrollToOK,disabledKM=0;
function sPop(oPos,flag,oTxt,classN){if(!oPos&&!oTxt)return;var limitW=screen.width-50,limitH=screen.height>>1;if(!sPopP.width)sPopP.width=250;if(sPopP.width>limitW)sPopP.width=limitW;if(!sPopP.height)sPopP.height=100;if(sPopP.height>limitH)sPopP.height=limitH;if(!sPopP.functionName)sPopF[sPopP.types[0]='_'+(sPopP.functionName=parseFunction().funcName)]=0;var repopMark='repop',repop=oPos===repopMark,nopop=flag&sPopF.nopop,tp=flag&7,useAttbTxt=false,brReg=/\r*\n/g,brT='<br/>\n';if(repop){if(!sPopP.popObj||typeof sPopP.popObj!='object'||typeof sPopP.popObj.innerHTML!='string'||!sPopP.popObj.innerHTML)return;oPos=sPopP.popObj,tp=sPopF.popup}else{if(typeof oPos=='string'&&oPos)if(oPos.length<32&&document.getElementById(oPos))oPos=document.getElementById(oPos);else if(!oTxt)oTxt=oPos,oPos=0;if(typeof oTxt=='object'&&oTxt.innerHTML)oTxt=oTxt.innerHTML;else if(oTxt)oTxt+='';var useAutoTxt;if(tp==sPopF.auto){if(typeof oPos=='object'&&(!oTxt||oTxt==0))if(oPos[sPopP.types[0]])oTxt=oPos[sPopP.types[0]],useAutoTxt=true;else if(oPos.title)oTxt=oPos.title,useAutoTxt=true;var len=typeof oTxt=='string'?oTxt.length:0;if(typeof oPos=='object'&&(oPos.doneRuby||!oPos.innerHTML.match(/<\s*ruby/i)&&(len<60&&len*.7-9<(typeof oPos.innerText=='string'?oPos.innerText:oPos.innerHTML).length)))tp='ruby';else if(sPopP.window&&len<300){tp='popup';if(typeof oPos=='object'&&oPos.title===oTxt)oPos[sPopP.types[0]]=oTxt,oPos.title='';}else tp='window';if(typeof oPos=='object'&&(!oTxt||oTxt==0))if(oPos[tp])oTxt=oPos[tp],useAutoTxt=true;tp=sPopF[tp]}if(!oTxt||oTxt==0&&typeof oPos!='object')if((oTxt=oPos[sPopP.types[tp]])||(oTxt=oPos[sPopP.types[0]])||(oTxt=oPos.title))useAutoTxt=true;else return;sPopP.left=0,sPopP.top=20;if(!oPos||typeof oPos!='object')try{sPopP.left+=event.offsetX,sPopP.top+=event.offsetY}catch(e){}else if(!oPos.className&&sPopP.DclassName[tp]){if(!classN&&(classN=document.body.className)&&!sPopP.bgS[classN])classN=0;oPos.className=sPopP.DclassName[tp]+(classN?'_'+classN:'');var w,s=oPos.style;if(!s.fontWeight&&(w=oPos.parentNode.style.fontWeight))s.fontWeight=w}}if(tp==sPopF.popup&&!sPopP.window&&!(flag&sPopF.force))tp=sPopF.window;if(tp==sPopF.ruby){if(typeof oPos!='object'||!oPos.innerHTML)return;if(oPos.doneRuby)return tp;if(flag&sPopF.repeat||sPopP.RepeatC.indexOf(oTxt)!=-1)oPos.title='',oTxt=window.navigator.userAgent.indexOf("MSIE")<0?'':oTxt.x(oPos.innerHTML.length/oTxt.length);try{oPos.innerHTML='<ruby><rb>'+oPos.innerHTML+'<\/rb><rp>'+(oTxt?window.navigator.userAgent.indexOf("Opera")>=0||/^[a-z\d\s_,.;"'\[\]{}+\-*\/]*$/i.test(oTxt)?'(<\/rp><rt>'+oTxt+'<\/rt><rp>)':'（<\/rp><rt>'+oTxt+'<\/rt><rp>）':'<\/rp><rt><\/rt><rp>')+'<\/rp><\/ruby>';}catch(e){var n=e.number&0xFFFF;if(n==601&&(typeof sPopError=='undefined'||sPopError!=n))alert('Error: '+e.description+' at\n'+oPos.outerHTML+'\n\n★也許是在這之前的tag出錯，例如有<b>卻沒有<\/b>。');sPopError=n}oPos.doneRuby=true}else if(tp==sPopF.popup){if(nopop||!sPopP.window)return tp;if(!repop){if(useAutoTxt)oTxt=oTxt.replace(brReg,brT);sPopP.window.document.body.innerHTML='<div style="'+sPopP.popupS+'" onblur="parent.sPopP.window.hide();" title="reference">[<b style="color:peru;cursor:pointer;" onclick="parent.sPopP.window.hide();">'+sPopP.closeMessage+'<\/b>] [<b style="color:green;cursor:pointer;" onclick="with(parent)sPopP.width+=100,sPopP.height+=50,'+sPopP.functionName+'(\''+repopMark+'\');">'+sPopP.biggerM+'<\/b>] [<b style="color:orange;cursor:pointer;" onclick="with(parent)sPopP.width=sPopP.height=0,'+sPopP.functionName+'(\''+repopMark+'\');">'+sPopP.resetM+'<\/b>]<hr style="color:purple;height:1px"/>'+oTxt.replace(/'/g,'&#39;')+'<\/div>';sPopP.popObj=oPos||document.body}if(flag&sPopF.clearPop)sPopP.window.hide();else sPopP.window.show(sPopP.left,sPopP.top,sPopP.width,sPopP.height,oPos||document.body);}else if(tp==sPopF.window){if(nopop)return tp;var w=window.open('','comment','titlebar=no,dependent,resizable=1,menubar=0,toolbar=0,location=0,scrollbars=1,width=550,height=400',false),t=sPopP.commentTitle,_t=oPos.innerHTML&&oPos.innerHTML.length<9?sPopP.commentTitlePattern.replace(/%s/,oPos.innerHTML):t;if(document.title)t+=' @ ['+document.title+']',_t+=' @ '+document.title;with(w.document)open(),write('<script type="text/javascript">window.onblur=function(){window.close();};<\/script><b style="color:#11f;">'+t+':<\/b>'+(oPos.innerHTML?'<div id="s" style="color:#488;background-color:#FF8;">\n'+oPos.innerHTML.replace(/\n/g,'<br/>').replace(/ /g,'&nbsp;')+'\n<\/div><hr/>':'')+'<div id="c" style="color:#404;background-color:#8FF;">\n'+oTxt.replace(/\n/g,'<br/>').replace(/ /g,'&nbsp;')+'\n<\/div><hr/>[ <b style="cursor:pointer;color:#40f;" onclick="javascript:opener.focus();self.close();">'+sPopP.closeMessage+'<\/b> ]'),close(),title=_t;w.focus();w=0}return tp}
function hasClassN(o,cN){var n=o.className;if(!n||!cN)return;if(cN instanceof Array){for(var i=0;i<cN.length;i++)if(hasClassN(o,cN[i]))return true;return false}if(!(cN instanceof RegExp))if(n==cN)return true;else cN=new RegExp('(^|\\s)'+cN+'(\\s|$)');return cN.test(n);}
var setTextT,setAutoScrollTimer,setAutoScrollInterval;
function getDocObj(id,flag){if(!getDocObj.f)getDocObj.f={'self':0,'ref':1,'refOnly':2};if(!id||typeof window!='object'||typeof document!='object'||document!=window.document)return null;if(typeof document!='object'||!document.body)return;var o;if(flag!=getDocObj.f.refOnly)o=document.getElementById?document.getElementById(id):document.all?document.all[id]:document.layers?document.layers[id]:window[id]||null;try{if(typeof flag=='object'&&typeof flag.getElementById=='function'&&(o=flag.getElementById(id))||o||flag&&loadReferenceDone==1&&(o=referenceDoc.getElementById(id)))return o}catch(e){}return null}
var referenceDoc,loadReferenceDone;
function parseFunction(functionName,mode){if(!functionName&&typeof(functionName=arguments.callee.caller)!='function')return;if(typeof functionName=='string')this.oriName=functionName,eval('var functionName='+functionName);var functionRegExp,functionArguments,functionContents,functionString;try{functionRegExp=new RegExp('^\\s*function\\s*(\\w*)\\s*\\(([\\w\\s,]*)\\)\\s*\\{\\s*((.|\\n)*)\\s*\\}\\s*$','m');}catch(e){}this.func=functionName,functionString=''+functionName;if(!functionString.match(functionRegExp))return 1002;functionName=RegExp.$1,functionArguments=RegExp.$2.split(','),functionContents=RegExp.$3;for(var i=0;i<functionArguments.length;i++){functionArguments[i]=functionArguments[i].replace(/\s+$|^\s+/g,'');if(functionArguments[i].match(/\s/))return 1002}this.funcName=functionName,this.arguments=functionArguments,this.contents=functionContents;return this}oldVadapter();
function addListener(o,type,listener,pFirst){var _f=arguments.callee,f=function(o,t,l,c){var old=o['on'+t];o['on'+t]=old?c?function(){old();l();}:function(){l();old();}:function(){l();}};if(!window.addEventListener)window.addEventListener=window.attachEvent?function(t,l){window.attachEvent('on'+t,l);}:document.addEventListener||f;if(typeof listener=='string'&&listener)listener=new Function('e',listener);if(typeof type=='object')for(f in type)_f(o,f,type[f]);else if(typeof listener=='object')for(f in listener)_f(o,type,listener[f],f=='true');else try{if(listener)return(o||window).addEventListener(type,listener,typeof pFirst=='undefined'?_f.pFirst:pFirst?true:false);}catch(e){if(o.attachEvent)o.attachEvent('on'+type,listener);}}
function setObjValue(o,v,t,m){if(typeof setObjValueFlag!='object')setObjValueFlag={'object':0,'array':-1};if(!v||typeof o!='string')return 1;var a,b,i=0,p='=',sp=',',e="if(typeof "+o+"!='object')"+o+"=new "+(m?"Array":"Object")+";",n,Tint=false,cmC='\\u002c',eqC='\\u003d';if(t){if(typeof a=='string'){a=t.charAt(0);if(a=='"'||a=="'"){a=t.split(a);p=a[1],sp=a[2],t=a[3]}}if(t=='int')t=1,Tint=true;else if(t=='float')t=.1;else if(isNaN(t))t=0;else if(t==parseInt(t))t=parseInt(t),Tint=true;else t=parseFloat(t);}if(typeof v=='string')v=v.split(sp);cmC=new RegExp(cmC.replace(/([\.\\\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:])/g,"\\$1"),'g'),eqC=new RegExp(eqC.replace(/([\.\\\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:])/g,"\\$1"),'g');if(t)n=-t;for(;i<v.length;i++){if(v[i].indexOf(p)==-1)v[i]=m?p+v[i]:v[i]+p;if(m&&v[i]==p){n+=t;continue}a=v[i].split(p);if(!m&&!a[0])continue;a[0]=a[0].replace(cmC,',').replace(eqC,'='),a[1]=a[1].replace(cmC,',').replace(eqC,'=');if(t)if(m){if(!a[0])a[0]=(n+=t);else if(!isNaN(b=m>0?parseInt(a[0],m):a[0]))n=Tint?(a[0]=parseInt(b)):parseFloat(b);}else if(!a[1])a[1]=(n+=t);else if(!isNaN(a[1]))n=Tint?parseInt(a[1]):parseFloat(a[1]);if(!t||Tint&&isNaN(b=parseInt(a[1]))||isNaN(b=parseFloat(a[1])))b=a[1];a=a[0];e+=o+'['+(!t||isNaN(a)?dQuote(a):a)+']='+(!t||isNaN(b)?dQuote(b):b)+';';}try{eval(e);}catch(e){popErr(e,'Error @ '+o);return 2}}
function dQuote(s,len,sp){var q;s=''+s;if(sp)s=s.replace(new RegExp('['+sp+']+$'),'');if(isNaN(len)||len<0)len=0;if(len){var t='';for(;s;)t+='+'+dQuote(s.slice(0,len))+'\n',s=s.substr(len);return t.substr(1);}s=s.replace(/\\/g,'\\\\').replace(/\r/g,'\\r').replace(/\n/g,'\\n').replace(/([\0-\37\x7f\xff])/g,function($0,$1){var c=$1.charCodeAt(0);return c<64?'\\'+c.toString(8):'\\x'+(c<16?'0':'')+c.toString(16);});if(s.indexOf(q="'")!=-1)q='"';if(s.indexOf(q)!=-1)s=s.replace(new RegExp(q="'",'g'),"\\'");return q+s+q}
var setObjValueFlag;
function reducePath(p,m){if(!(p=''+p))return;var t;if(t=p.match(/^"([^"]*)/))p=t[1];if(t=p.match(/(.*)\|<>/))p=t[1];if(typeof WinEnvironment=='object'&&(t=p.match(/%(.+)%/g)))for(i in t)if(WinEnvironment[i])p.replace(new RegExp(i,"ig"),WinEnvironment[i]);p=p.replace(new RegExp(dirSp=='/'?'\\\\':'/',"g"),dirSp);if(m&&(t=p.lastIndexOf(dirSp))!=-1&&t+1!=p.length)p=p.slice(0,t+1);return p.replace(new RegExp('^(\\.'+dirSpR+')+'),'').replace(new RegExp(dirSpR+'(\\.'+dirSpR+')+','g'),dirSp)}
function getPathOnly(p){var i=p.lastIndexOf('?'),j=p.lastIndexOf('#');if(i==-1)i=j;else if(j!=-1&&i>j)i=j;if(i!=-1)p=p.slice(0,i);if(p.slice(0,8)=='file:///')p=p.substr(8);else if((i=p.indexOf(':'+dirSp+dirSp))!=-1&&(i=p.indexOf(dirSp,i+3)!=-1))p=p.substr(i+1);else if(p.charAt(0)==dirSp)if(p.charAt(1)!=dirSp)p=p.substr(1);else if((i=p.indexOf(dirSp,2))>2)p=p.substr(i+1);else if(i!=-1)throw new Error(1,'illegal path:'+p);if(typeof isFile=='function'&&isFile(p))p=p.replace(new RegExp(dirSpR+'[^'+dirSpR+']+$'),dirSp);return p}
var dirSp='\\',dirSpR='\\\\';
function getFP(p,m,bp){if(!p)return'';if(p.charAt(0)=='\\'&&dBasePath(bp).match(/^(\\\\|[A-Za-z]+:)/))p=RegExp.$1+p;p=reducePath(p);if(m==1){if(!isAbsPath(p))p=reducePath((bp?getPathOnly(bp):dBasePath())+p);}else if(m==2&&isAbsPath(p))p=relatePath(dBasePath(bp),p);return p}
var setAstatusOS;
function setCookie(name,value){if(typeof name=='undefined'||typeof document=='undefined')return;try{if(!window.navigator.cookieEnabled)throw 1}catch(e){window.status='We cannot use cookie!';return}if(name===setCookieS.setRoot)name='path',value='/';else if(name===setCookieS.setDomain)name='domain',value=location.hostname.replace(/^[^.]+\./,'.');else if(name===setCookieS.forever)name='expires',value=1e14;else if(name===setCookieS.moment)name='expires',value=-1;if(typeof name=='string'&&name.match(/^(expires|path|domain|secure)$/i)){name=RegExp.$1;if(name=='expires'&&typeof value=='number'&&value){value=(new Date(value<1e14?value<0?0:(new Date).getTime()+(value<8e3?value*86400000:value):1e14)).toUTCString();}setCookieS[name]=value;return name+'='+value+';';}else{var set;if(name===setCookieS.DeleteAllRoot)set='expires='+(new Date(0)).toUTCString()+';path=/;';else with(setCookieS)set=(typeof value=='undefined'?'expires='+(new Date(0)).toUTCString()+';':expires?'expires='+expires+';':'')+(path?'path='+path+';':'')+(domain?'domain='+domain+';':'')+(secure?'secure;':'');if(name===setCookieS.DeleteAll||name===setCookieS.DeleteAllRoot){for(var p=document.cookie.split(';'),n,i=0;i<p.length;i++)if(!/^\s*expires\s*$/i.test(n=c[i].split('=')[0]))document.cookie=n+'=;'+set;return document.cookie}else{value=name+'='+(typeof value=='undefined'?'':escape(value))+';'+set;return value.length<4096&&(document.cookie=value)?value:-1}}}
function new_RegExp_flag(r,f){var i,fs={global:'g',ignoreCase:'i',multiline:'m'};if(!f){f='';for(i in fs)if(r[i])f+=fs[i];return f}
var a=f.charAt(0),F='',m;a=a=='+'?1:a=='-'?0:(F=1);if(F)F=f;else for(i in fs)if((m=f.indexOf(fs[i],1)!=-1)&&a||!m&&r[i])F+=fs[i];return new RegExp(r.source,F);}
var sPopP=[],sPopF;
function sPopInit(){sPopP.DclassName=',popupedTxt_ruby,popupedTxt,popupedTxt'.split(',');sPopP.bgS='bgb,bgn';{var i=0,t=sPopP.bgS.split(',');sPopP.bgS={};for(;i<t.length;i++)sPopP.bgS[t[i]]=i+1}sPopP.popupS="color:blue;padding:.5em;overflow:auto;position:absolute;top:0;left:0;width:100%;height:100%;scrollbar-face-color:khaki;scrollbar-arrow-color:teal;border:1px solid green;font:normal 10pt tahoma;filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#ffd700, EndColorStr=#ffffff);";sPopP.RepeatC='．。ヽ○●◎☆★※＊＃▽▼△▲◆◇□■↓↑';sPopP.autoTypes='title,_sPop';sPopP.types='ruby,popup,window';sPopP.allTypes=(sPopP.autoTypes+','+sPopP.types).split(',');sPopP.functionName='';if(typeof window.createPopup!='undefined')sPopP.window=window.createPopup();{var i=0,t=sPopP.types.split(','),T='';for(;i<t.length;)T+=t[i]+'='+ ++i+',';setObjValue('sPopF','title=0,auto=0,'+T+'nopop=8,repeat=16,clearPop=32,force=64','int');}sPopP.types=(','+sPopP.types).split(',');sPopP.commentTitle='Comment';sPopP.commentTitlePattern=sPopP.commentTitle+' of %s';sPopP.closeM='Close';sPopP.biggerM='Bigger';sPopP.resetM='Reset size';}sPopInit();getDocObj();addListener.pFirst=false;
function isAbsPath(p){return p&&(dirSp=='/'&&p.charAt(0)==dirSp||new RegExp('^(\\\\|[A-Za-z]+:)'+dirSpR).test(p));}
function relatePath(bp,pn){if(!pn)pn=typeof location=='object'?location.href:typeof WScript=='object'?WScript.ScriptFullName:'';if(!bp)bp=typeof location=='object'?location.href:typeof WshShell=='object'?WshShell.CurrentDirectory:typeof WScript=='object'?WScript.ScriptFullName:'';var p=reducePath(pn);if(!p)return;var d=reducePath(bp,1);if(!d||!isAbsPath(d))return p;if(!isAbsPath(p)){var q=p.indexOf(dirSp,1);if(q==-1)q=p;else q=p.slice(0,q);q=d.indexOf(q);if(q==-1)return p;p=d.slice(0,q)+p}
var s=same_length(p,d);if(s>0&&d.charAt(s-1)!=dirSp)s=d.slice(0,s).lastIndexOf(dirSp)+1;return s>0?d.substr(s).replace(new RegExp('([^'+dirSpR+']+'+dirSpR+')','g'),'..'+dirSp)+p.substr(s):p}
var setCookieS;
function same_length(m,n){if(typeof m!='string'||typeof n!='string')return;if(!m||!n)return-1;if(m==n)return m.length;var i=Math.min(m.length,n.length),b=0,s;while((i=(i+1)>>1)>1&&(s=n.substr(b,i))){if(m.indexOf(s,b)==b)b+=i};return i&&m.charAt(b)==n.charAt(b)?b+1:b}setObjValue('trigger.f','_switch=0,_show=1,_hidden=2,_test=3',1);setObjValue('setCookieS','moment=-1,expires=0,path=0,domain=0,secure=0,DeleteAll=2,DeleteAllRoot=3,setRoot=4,setDomain=5,forever=6',1);dirSp=dirSpR='/';sPopP.commentTitlePattern='%s的'+(sPopP.commentTitle='註解');sPopP.closeMessage='關閉';sPopP.biggerM='放大';sPopP.resetM='回復原大小';var title='評論列表',c=[],g=[],cs='*',sp='	';var surveyItem='label	score	synchronism	fairness	date	IP	id	comment',surveyData;var includeJS_basePath='';
function sgPath(p){return(includeJS_basePath+p).replace(/[^\/]+[^.\/]\/\.\.\//g,'');}try{if(/\/game\/[^\/]*$/.test(location.href))includeJS_basePath+='';else if(/\/game\/[^\/]+\/[^\/]*$/.test(location.href))includeJS_basePath+='../';else includeJS_basePath+=location.href.indexOf('game')==-1?'game/':'';}catch(e){history.go(0);}if(typeof includeJS_basePath=='string'){var p='';try{eval(getU(sgPath('log/surveyData.js')));dealSurveyData();}catch(e){}if(location.protocol=='file:'&&this.netscape)try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");}catch(e){}try{eval(getU(sgPath('log/viewerCount.js')));}catch(e){if(location.protocol=='file:')alert('Load viewerCount error: '+e.message);}try{eval(getU(p=sgPath('gameItem.js')));if(location.protocol=='file:')eval(getU(p=sgPath('pData.js')));eval(getU(p=sgPath('../link.js')));}catch(e){var a=location.protocol!='file:',b=location.href.indexOf('cgi-bin')!=-1;if(a||b)window.status='抱歉！在載入其他網頁時發生錯誤，有些功能可能失常。請重新讀取(reload)，或是過段時間再嘗試。';if(!a&&b)alert('js initial error:\nloading: '+p+'\n@ '+location.href+'\n'+(e.description||e));}}
var DTopP=setTopPDTopP="game/index.htm";var ver=0,ver2='',c_=[],c_t;if(typeof ScriptEngineMajorVersion!='undefined')ver=Number(ScriptEngineMajorVersion()+'.'+ScriptEngineMinorVersion()),ver2=ScriptEngine()+' '+ver+'.'+ScriptEngineBuildVersion();var NO_dealLink,gACrun;
function setupPage(className,title){var t='';if(location.protocol!='file:'){if(title)document.title=title;t+='setAstatus();writeTrackBack();';showFooter();}else if(typeof dhLb=='string'){addWbyTag();setTimeout('_end();',0);try{if(gACrun)return}catch(e){}}if(initUserSet())return;setStyle(className);loadReference(typeof relatePath=='function'?relatePath(0,'game/data/reference.htm'):'data/reference.htm');setSearch(),checkView(),setAutoScroll();t+='checkSurvey(),setImage(),setImgBox();';t+='handleLink2();';if(typeof dealLink=='function'&&!NO_dealLink)t+='dealLink(0,1);';t+='dealPopup();dealMap();';if(location.protocol!='file:')try{var pageTracker=_gat._getTracker("UA-346568-3");with(pageTracker)_initData(),_trackPageview();re_name_tag=re_context_tag=document.title;if(typeof re_=='function')setTimeout('try{re_("f16z6-1392783h8v");}catch(e){}',0);}catch(e){status+='Analytics tool initial error!';}setTimeout(t,0);}
function writeTrackBack(){var o=document.getElementById('trackback'),u=location.href,i;if(o){if((i=u.lastIndexOf(location.pathname))!=-1)u=u.slice(0,i+location.pathname.length)+'?';else u+='&';u=encodeURI(u+'tb='+getLabel());o.innerHTML='<div>引用本文: TrackBack URL for this entry (for blog) | <a href="main2.htm">引用須知</a></div><input onfocus="this.select();" value="'+u+'"/>';}}
function initUserSet(){setCookie(setCookieS.setRoot);if(getCookie('inited'))return;var t;if(t=getCookie('dMenuIndex'))setCookie('menuIndex',t);if(t=getCookie('musicName'))open('midi.htm?'+t,'MIDI');if(t=getCookie('mainPage'))open(t,'MAIN');if(t=getCookie('menuPage'))open(t,'MENU');setCookie('inited',1);}for(var i=0,j;i<c.length;i++)if((j=c[i].l)&&!c_[j]&&c[i].t)c_[j]=i;for(var i=0,j;i<c.length;i++)if(!c[i].t&&(j=c_[c[i].l]))c[i]=c[j];
function C(s,newObj){if(!s)s='';var a=s.split(sp),i=0,_o;if(newObj)_o={};else _o=c[c.length]={};_o.fill=fA;if(a.length==1){if(isNaN(a[0]))_o.l=a[0];return _o}_o.i=parseInt(a[i++]),_o.l=a[i++],_o.t=a[i++],_o.w=a[i++],_o.c=a[i++],_o.p=a[i++];if(surveyData&&surveyData[_o.l])_o.sD=surveyData[_o.l];if(a[i])_o.s=a[i]=='='?_o.l:a[i];if(a[++i]&&a[i].charAt(0)==cs)_o.sC=a[i++].substr(1);if(i>=a.length)return _o;if(a[i]&&!isNaN(a[i]))_o.a_=parseInt(a[i]),a[i]=""+a[i]+"分";_o.a=a[i++];if(a[i]&&a[i].charAt(0)==cs)_o.aC=a[i++].substr(1);_o.d=a[i++];if(a[i]&&a[i].charAt(0)==cs)_o.dC=a[i++].substr(1);_o.m=a[i++];if(a[i]&&a[i].charAt(0)==cs)_o.mC=a[i++].substr(1);_o.C=a[i++];if(a[i]&&a[i].charAt(0)==cs)_o.CC=a[i++].substr(1);_o.S=a[i++];if(a[i]&&a[i]&&a[i].charAt(0)==cs)_o.SC=a[i++].substr(1);return _o;}
function initc_t(){if(c_t)return;c_t=[];for(var i=0,j,a,b;i<c.length;i++)if(c[i])c_t[c[i].fill(1).t_]=i}
function S2N(s){var m,k=m=0,c;for(;;k++)if(c=s.charAt(k))m+=c=='★'?4:c=='☆'?2:c=='('?-1:0;else return m}
function N2S(n){n=Math.round(n);if(!n||n>25)return;var s='',t=['','(☆)','☆','(★)'];while(n>3)s+='★',n-=4;s+=t[n];return s}
function fA(l){if(!l||l<1)l=1;var n=this.filled;if(!n)n=0;if(l<=n)return this;if(!n){if(!this.t)this.t='';this.t_=this.t.turnU().gText().replace(/[\r\n]+/g,'');}if(n<2&&1<l){if(!this.i)this.i=0;if(!this.l)this.l='';if(!this.w)this.w='';if(!this.c)this.c='';if(!this.p)this.p='';if(!this.s)this.s='';if(!this.sC)this.sC='';if(!this.a)this.a='';if(!this.aC)this.aC='';if(!this.d)this.d='';if(!this.dC)this.dC='';if(!this.m)this.m='';if(!this.mC)this.mC='';if(!this.C)this.C='';if(!this.CC)this.CC='';if(!this.S)this.S='';if(!this.SC)this.SC='';this.w_=this.w.toDate(),this.p_=this.p.toDate(),this.d_=S2N(this.d),this.m_=S2N(this.m),this.C_=S2N(this.C),this.S_=S2N(this.S);if(C.wcOK&&!this.wc)this.wc='';if(!(this.view=getCookie(countLogHead+this.l)))this.view=0;}this.filled=l;return this}
function G(s){var a=s.split(sp);g[g.length]={i:c.length,t:a[0],s:a[1]}}
var reviewScore={},reviewTagHead='review_',reviewSelectHead='reviewS_',reviewImgLoadArray={};
function initReview(){var reviewTagHeadL=reviewTagHead.length,count=6;if(o=document.getElementsByTagName('span'))for(i=0;i<o.length;i++)if(o[i].id.slice(0,reviewTagHeadL)==reviewTagHead){var a,b,j,doAdd=function(s,src,sClass){a=document.createElement('span');for(j=0;j<count;){if(src){var tmpId;do{tmpId=Math.random();}while(document.getElementById(tmpId));b=document.createElement(s);b.src=reviewImgLoadArray[b.id=tmpId]=src;b.onload=function(){setTimeout('reviewImgLoad("'+src+'");',0);};if(sClass)b.className=sClass}else{b=document.createElement('span'),b.innerHTML=s}b.onmouseover=new Function('setReview(this,'+ ++j+');');b.onclick=new Function('setReview(this,'+j+',1);');b.title=16*j;a.appendChild(b);}o[i].appendChild(a);};doAdd('img',"img/momiji.png","sImg");a.id=reviewSelectHead+o[i].id;with(a.style)position='absolute',cursor='pointer';doAdd('img',"img/momiji-gray.png","sImg");o[i].onmouseout=new Function('setReview("'+o[i].id+'");');setReview(o[i].id);}setTimeout('reviewImgLoad();',0);}
function reviewImgLoad(imgLoad){if(imgLoad)reviewImgLoadArray[imgLoad]=1;var i,o;for(i in reviewImgLoadArray)if(reviewImgLoadArray[reviewImgLoadArray[i]]&&(o=document.getElementById(i))){o.onload=null;o.src=reviewImgLoadArray[i];delete reviewImgLoadArray[i]}}
function setReview(obj,index,setIt){if(typeof obj=='string'&&(obj=document.getElementById(obj)))try{obj=obj.childNodes[0].childNodes[0]}catch(e){obj=0}if(!obj)return 1;var eWidth=obj.offsetWidth,pid=obj.parentNode.parentNode.id;if(isNaN(index)&&!(index=reviewScore[pid]))index=0;if(obj=document.getElementById(reviewSelectHead+pid)){obj.style.clip='rect(auto '+(index*eWidth)+'px auto auto)';if(setIt){reviewScore[pid]=index;var tH=reviewSelectHead+reviewSetHead;if(obj.id&&obj.id.slice(0,tH.length)==tH&&(obj=document.getElementById(obj.id.slice(tH.length))))obj.selectedIndex=index*4}}}
var surveyData,surveyDataList;
function dealSurveyData(){if(typeof surveyData!='string'){if(typeof surveyData!='object')surveyData=new Object,surveyData.undone=true;return}if(surveyItem.indexOf('	')!=-1)surveyItem=surveyItem.replace(/	/g,',');surveyItem=surveyItem.slice(surveyItem.indexOf(',')+1);setObjValue('surveyItem',surveyItem,1);var l,a,i=0,sData=surveyData.replace(/"/g,'"').split('\n');surveyData=new Object;surveyDataList=[];try{for(;i<sData.length;i++){try{sData[i]=decodeURIComponent(sData[i]);}catch(e){}if(l=(a=sData[i].split('	')).shift()){if(typeof surveyData[l]!='object')surveyData[l]=[a];else surveyData[l].push(a);surveyDataList.push([l,surveyData[l].length-1]);}}}catch(e){}}
var reviewSetHead=reviewTagHead+'set_';
function switchSurveyM(i,m){var p='inline',n='none',t,o=getDocObj(i);if(o){if(!m&&o.style.display==n||m==2)t=p,p=n,n=t;o.style.display=n;getDocObj(reviewSetHead+i).style.display=p}}
function wSurveyM(){try{if(document.getElementById('surveySF').innerHTML)return 1}catch(e){return 2}
var t=getLabel(),cmsg='通常可省略…當然，可能的話請寫幾個字吧 (^_^)';if(location.protocol=='file:')t='local test';if(t){t='<input name="seg" type="hidden" value="'+t+'"/>';var s='synchronism:<span title="同調律">您對這篇文章的認同度</span>,fairness:您覺得這篇文章公正性,score:請為這篇文章評個總分'.split(','),i=0,j,p;for(;i<s.length;i++){p=s[i].split(':'),t+='<label for="'+p[0]+'">'+p[1]+'：<select id="'+p[0]+'" name="'+p[0]+'"><option value=""/>請選擇';for(j=1;j<25;j++)t+='<option value="'+j+'"/>'+(j<3?'0':'')+4*j+' '+N2S(j);t+='</select></label><span id="'+reviewSetHead+p[0]+'"></span><b onclick="switchSurveyM(\''+p[0]+'\');" title="切換簡略與詳細模式" style="cursor:pointer">切換</b><br/>';setTimeout('switchSurveyM("'+p[0]+'",1);',9);}document.getElementById('surveySF').innerHTML=t}else{getDocObj('survey').style.display='none';}initReview();if(t=getDocObj('comment')){if(!t.value)t.value=cmsg;t.onfocus=function(){if(this.value==cmsg)this.value='';};t.onblur=function(){if(!this.value)this.value=cmsg};}getDocObj('surveyForm').onsubmit=function(){var sendM='send';if(this.survey.value==sendM)return;if(!this.score.value){alert('起碼幾個分數部分選一選吧 (^_^)\n只要在小圖上面用滑鼠點一下就行了喔！');return false}setCookie(setCookieS.setRoot),setCookie(setCookieS.forever),setCookie('survey_id',this.id.value),setCookie('expires',0);if(this.comment.value==cmsg)this.comment.value='';if(this.synchronism.value*this.fairness.value*this.score.value<3&&this.comment.value.length<9){alert('這裡的分數針對的是這篇心得或評論本身。\n請填一下簡評！');return false}this.survey.value=sendM};if(t=getCookie('survey_id'))getDocObj('id').value=t}
function checkSurvey(){if(!surveyData||surveyData.undone)return;var a,o,i=0;for(;i<c.length;i++)if((a=c[i]).sD&&!getDocObj('sD_'+a.l)&&(o=getDocObj('c_'+a.l)))o.innerHTML=wSurvey(a)+o.innerHTML;}
function wSurvey(o){if(!o||!o.sD)return'';var j=0,k,s,sD=o.sD,t='<table id="sD_'+o.l+'" class="surveyT" summary="觀客回應表"><caption>觀客回應</caption><tr><th class="h">id/IP 小評</th><th>評分</th><th>同調律</th><th>公正性</th></tr>';for(;j<sD.length;j++){s=sD[j],k=location.protocol=='file:'?s[surveyItem.IP]:'',t+='<tr><td class="h"><b title="'+(k?'IP: '+k+'\n':'')+'日期：'+s[surveyItem.date]+'\n'+(s[surveyItem.comment]?'簡評：'+s[surveyItem.comment]:'')+'">'+(s[surveyItem.id]?s[surveyItem.id]:k?k:'<span class="fadeout">(匿名)</span>')+'</b>';for(k=0;k<3;k++)t+='</td>'+(s[k]?'<td title="'+s[k]*4+' / 100">'+N2S(s[k]):'<td><span class="fadeout">未評分</span>');t+='</td></tr>';}return t+'</table>';}
function getWc(i,isObj){if(!i)return-1;var t=typeof i=='string'&&(isObj||i.length<80)?document.getElementById(i):null;if(!t)return typeof i=='string'&&isObj?-2:wordCount(i,3);if(typeof(t=setText(t))!='string')return-3;return wordCount(t,3);}
var addW,oTitle,dhLb,wScore_after;
function wScore(l,d){if(gACrun){}
var i=c_[l],T,wc,a,o;if(!i){document.write('<div class="aDiv"><span class="red">找不到此筆資料：'+(l?'<b style="background-color:lime;">'+l+'</b>':'<b style="color:gray">(none)</b>')+'!</span></div><br class="clear"/>'+(navigator.userAgent.indexOf("MSIE")<0?'':'<div style="display:block;">&nbsp;</div>'));return}T=wSurvey(o=c[i]);T+='<div class="aDiv" title="總評欄" summary="總評欄"><table class="aTab"><tr><td style="text-align:left;color:gold;border:none;" colspan="2" title="play: '+(o.p+(o.c?'\nclear: '+o.c.gText():'')+(o.sC?'\n'+o.sC.gText():''))+'">'+o.t+'</td></tr><tr>'+scoreTd("評價",o.a,o.aC,2)+'</tr>'+'<tr>'+scoreTd("劇本",o.d,o.dC)+scoreTd("Music",o.m,o.mC)+'</tr><tr>'+scoreTd("CG",o.C,o.CC)+scoreTd("System",o.S,o.SC)+'</tr>'+(o.s&&o.s!='^'&&o.s!='*'?'<tr class="aTd">'+scoreTd("savefile",o.c,o.sC,0,'<a href="'+(d?'#" target="_self':hL(i,'s'))+'">','</a>')+'<td class="aTd">':'<tr><td class="aTd" colspan="2">')+'<span class="aDate">'+o.w+'</span>';if(a=getDocObj("c_"+o.l)){if(gACrun)deleteNoWordCount(a);var txt=setText(a);if(setTextT=='textContent')txt=txt.replace(/wScore\([^)]+\);?$/,'');if(txt&&(wc=getWc(txt))>0)T+=', <span class="aWC">'+wc+'字</span>';else wc=0,this.wordCountWarning='Please use another browser to get the length of this comment.',T+=', <a onclick="alert(wordCountWarning)">?字</a>';setTimeout('handleLink2(getDocObj("c_'+o.l+'"),"'+l+'");',0);if(wScore_after)clearTimeout(wScore_after);wScore_after=setTimeout('wScore_after=0;if(typeof dealLink=="function"&&!NO_dealLink)dealLink(0,1);dealPopup();',500);if(a=a.childNodes[0])for(var t,p,q,j=0;;j++)if(!(t=a.childNodes[j]))break;else if(!(q=setText(t))||/^(\s|&nbsp;)+$/.test(q)){q=t.className;if(q=='ti'&&(p=c[i].fill().t_)||q=='tr'&&(p=c[i].fill().tr_))setText(t,p);}}T+='</td></tr></table></div><br class="clear"/>'+(navigator.userAgent.indexOf("MSIE")<0?'':'<div style="display:block;line-height:0px;">&nbsp;</div>');if(!oTitle&&o.t&&document.title.indexOf(oTitle=o.t.turnU())==-1)setTimeout('document.title+=(document.title?" - ":"")+oTitle',80);if(d)if(typeof d=='object')d.innerHTML=T;else return T;else{document.write(T);if(typeof addW=='function')addW(i,wc);}}
function scoreTd(n,s,c,p,f,b){return'<td class="aTd"'+(p?' colspan="'+p+'"':'')+'>'+(f||'')+n+':<span class="aScore">'+(s?s.trim(20):'<span style="color:gray">(none)</span>')+(c?'<br/><span class="aComment">（'+c.trim(20)+'）</span>':'')+'</span>'+(b||'')+'</td>';}
var cwc,LM=['閱讀用列表','攻略列表','評價列表'],stR=false,stI='',stIA=[],CHd=[],CH;
function dCHd(c){if(CHd.length)return;var i,A,CHd_='t;;標題	w;w_;心得撰寫日期	c;;說明或clear	p;p_;攻略期間	s;;存檔	a;;總評	d;d_;劇情	m;m_;音樂	C;C_;原畫	S;S_;系統	view;;瀏覽次數';if(!c&&typeof cwc=='function')CHd_+=cwc();A=CHd_.split('	');for(i=0;i<A.length;i++){var a=A[i].split(';');CHd[a[0]]=[a[1]||a[0],a[2],a[3]||'st_g']}CH=[wCH('t,w'+(C.wcOK?',wc':'')+',c'+(getLabel()?',view':''),0),wCH('t,p,c,s',1),wCH('t,a,d,m,C,S',2)];if(!CHd.length)CHd.length=1}
function wCH(i,m){var t='',a=i.split(',');for(var j=0;j<a.length;j++){t+='<th class="Lhead" title="以'+CHd[a[j]][1]+'排序" onclick="wList('+m+','+CHd[a[j]][2]+',\''+CHd[a[j]][0]+'\')">'+CHd[a[j]][1]+'</th>';}return t}
function MM(o,t,bg,fg){if(t==1)o.oc=o.style.color,o.style.color=fg?fg:'#0000FF',o.obgc=o.style.backgroundColor,o.style.backgroundColor=bg?bg:'bisque';else if(t==2){o.style.color=o.oc;o.style.backgroundColor=o.obgc}}
function move2(i,m){var t=m==2?hL(i,'s'):hL(i);if(t)if(openTarget=='_blank')window.open(t,openTarget);else location.href=t;}
var wList_key,openTargetMark='openTarget_',openTarget=getCookie(openTargetMark+'AllList')||'_blank';
function wList(md,stf,sti){dCHd();var i,j,O=getDocObj("ListC"),M=getDocObj("ListM"),key,stH='',SEL=' selected="selected"',bg=["beige","ivory","snow","azure"],cc=' onmouseover="MM(this,1)" onmouseout="MM(this,2)"',H='<table border="1" cellpadding="0" cellspacing="0" class="LTab"><tr>'+CH[md]+'</tr>';if(sti)stI=sti;if(stI&&!stf)stf=st_g;if(M){var t='';for(i=0;i<LM.length;i++)t+='<b '+(i==md?'style="cursor:default/*auto*/"':'onclick="wList('+i+')"')+' class="Lhead_"'+(i==md?' style="background-color:plum"':'')+'>'+LM[i]+'</b>'+' | ';t+='<b class="Lsort">排序：</b> <select class="LSel" onchange="{var i=this.options[this.selectedIndex].value;if(CHd[i])wList('+md+',eval(CHd[i][2]),CHd[i][0]);else stI=\'\',wList('+md+');}"><option/>無';for(i in CHd)t+='<option value="'+i+'"'+(stI==CHd[i][0]?(stH=i,SEL):'')+'/>'+CHd[i][1];t+='</select> <select class="LSel" onchange="stR=parseInt(this.options[this.selectedIndex].value);wList('+md+','+(CHd[stH]?CHd[stH][2]:'st_g')+',\''+stI+'\');"><option value="0"'+(stR?'':SEL)+'/>小→大(正向)<option value="1"'+(stR?SEL:'')+'/>大→小(反向)</select>';t+=' <span style="color:#C40;cursor:pointer" onclick="'+"openTarget=openTarget=='_blank'?'_top':'_blank';this.getElementsByTagName('b')[0].innerHTML=openTarget=='_blank'?'新':'原';\">開啟於<b>"+(openTarget=='_blank'?'新':'原')+'</b>視窗</span>';M.innerHTML=t}if(wList_key)key=wList_key;else{key=new Array(c_.length);for(i=0,j=1;j<c.length;j++)if(c_[c[j].l]===j)c[key[i++]=j].fill(2);wList_key=key}if(stf)key.sort(stf);if(stR)key=key.reverse();for(j=0;j<key.length;j++)if(c[key[j]]&&(!stI||stI=='view'||c[key[j]][stI]))with(c[key[j]]){var T=md==0?'<td>'+w+'</td><td>'+(this.C.wcOK?wc+'</td><td>':'')+c+'</td>'+(getLabel()?'<td'+(view?'':' style="background:#a9e"')+'>'+view+'</td>':''):md==1?'<td>'+p+'</td><td title="'+sC+'"'+'>'+c+'</td><td title="'+sC+'">'+s+'</td>':'<td title="'+aC+'">'+a+'</td><td title="'+dC+'">'+d+'</td><td title="'+mC+'">'+m+'</td><td title="'+CC+'">'+C+'</td><td title="'+SC+'">'+S+'</td>';H+='<tr'+cc+' style="background-color:'+bg[j%bg.length]+'" onclick="move2('+key[j]+')"><td title="'+(j+1)+'"><nobr>'+t+'</nobr></td>'+T+'</tr>';}H+='</table><br/>';if(O)O.innerHTML=H;}
function st_g(l,r,st){var i=c[l]&&c[l][stI],j=c[r]&&c[r][stI];return i&&j?c[l][stI]===c[r][stI]?0:c[l][stI]<c[r][stI]?-1:1:i?-1:j?1:0;}
var hLp,hLb,hLM=9;if(!hLb)hLb='';
function hL(i,o){if(!o)o='';var f=1,t='',u=['game.pl?seg=','game.pl?'+(getCookie('user_id')?'user_id='+getCookie('user_id')+'&':'')+'down='],iIsS=(typeof i=="string"),oIsS=(typeof o=="string"),m=oIsS?o:o.innerHTML&&o.innerHTML.charAt(0)=='_'?o.innerHTML.charAt(1):'';if(iIsS&&c_[i])i=c_[i],iIsS=false;if(typeof hLp=='function'){var a=new hLp(i,m);f=a.r;if(!f){if(a.m)m=a.m;t=a.t+'#'+(!oIsS&&o.h?o.h:a.h);}}if(f){if(m=='s')iIsS?i?i:'':t=c[i].s?u[1]+c[i].s:'';else if(m='',iIsS){if(i)t=u[0]+i}else if(c[i].l)t=c[i].l.charAt(0)=='*'?c[i].l:u[0]+c[i].l;if(!oIsS&&o.h)t+=o.h;}if(oIsS)return hLb+t;if(m)o.innerHTML=o.innerHTML.substr(2);if(!o.innerHTML&&c[i])o.innerHTML=iIsS?i:c[i].t;if(t){if(!o.href||o.href==location.href)o.href=(hLb||'')+t;if(!o.target&&innerTarget)o.target=innerTarget;if(c[i]){if(!o.title)o.title=c[i].t.turnU(1)+(c[i].w?'\n'+c[i].w:'')+(c[i].a?'\n類型: 遊戲\n總評: '+c[i].a.turnU():c[i].c?'\n類型: '+c[i].c.turnU():'')+(c[i].d?'\n劇情:'+c[i].d:'')+(c[i].m?'\n音樂:'+c[i].m:'')+(c[i].C?'\n原畫:'+c[i].C:'')+(c[i].S?'\n系統:'+c[i].S:'');if(o.innerHTML==c[i].t)o.className+=' book_title_mark';}return true}return false}
function handleLink(b,M){var n=0,i=1,j,o;if(isNaN(M))M=hLM;if(b)hLb=b+(b.charAt(b.length-1)=='/'?'':'/');for(;i<c.length;i++)for(j=0;j<=M&&(o=getDocObj('l'+(j?j:'')+'_'+c[i].l))&&hL(i,o);n++,j++);for(j=1;j<=M;j++)if(o=getDocObj('l'+j+'_')){var i=o.innerHTML.indexOf('_');if(i>0&&(i=c_[o.innerHTML.substr(0,i)])&&hL(i,o))o.innerHTML=o.innerHTML.substr(i),n++}else break;return n}
var innerTarget=getCookie(openTargetMark+'innerTarget')||'',outerTarget=getCookie(openTargetMark+'outerTarget')||'';
function handleLink2(o,l){if(typeof o=='string')o=getDocObj(o);if(!o)o=document;if(!c_t)initc_t();if(o=o.getElementsByTagName('A'))for(var j=0,p,q;j<o.length;j++)if((p=o[j]).href){if(!p.target&&outerTarget)p.target=outerTarget}else if(!p.id||p.id.charAt(0)!='_'){var done=0,n,gL=function(o){try{return typeof o.label=='string'?o.label:(o=o.attributes)&&(o=o.item('label'))?o.nodeValue:0}catch(e){return}};try{n=p.id}catch(e){}try{if((q=gL(p))&&q!=n&&(q=c_[q]?c_[q]:c_t[q]))hL(q,p),done=1}catch(e){}if(!done&&(q=setText(p))&&(q=q.replace(/[\r\n]+/g,'')))if(q=c_t[q]?c_t[q]:c_[q])hL(q,p);}}
function l2(i,o,n){if(!o){handleLink(i);return}
var a=0;if(typeof i=='object'&&typeof o=='object'){for(;a<i.length;a++)l2(i[a],o[a]);return}if(typeof o=='string')if(n)o=getDocObj(a=o);else{setTimeout('l2("'+i+'","'+o+'",1)',9);return}if(!o){alert("Can't find this object'+(a?': '+a:'')+'!");return false}if(!o.h)o.href='',o.h=hL(i,o)?1:2;if(o.h==1){return n==-1?false:true}else{alert('This link has no href!');return false}}
function dealMap(){for(var oA=document.getElementsByTagName('b'),o,i=0;i<oA.length;i++)if(typeof(o=oA[i]).map=='string'?o.map:o.attributes.getNamedItem('map')&&o.attributes.getNamedItem('map').nodeValue)o.className='mapB',o.onmouseover=function(){dealMap.show(this);},o.onmouseout=function(){dealMap.show(0,0);}}dealMap.show=function(o,s){var d=dealMap.div,t,q;if(!d){document.body.appendChild(d=dealMap.div=document.createElement('div'));d.className='mapD',d.style.display='none';}if(typeof s=='undefined')s=1;t=o?typeof o.map=='string'?o.map:o.attributes.getNamedItem('map').nodeValue:0;if(!s||!o){if(!dealMap.stay||t&&dealMap.c!=t)d.style.display='none';return}t=t.replace(/^\s*(\d{1,3}\.\d+)\s*,\s*(\d{1,3}\.\d+)/,'$1,$2');if(dealMap.c==t){d.style.display='block';return}else dealMap.c=t,dealMap.stay=0;s=t.indexOf(' ');if(s==-1&&t.indexOf('s=')==-1&&t.charAt(0)!='{'){q=encodeURIComponent(t);o.onclick=function(){window.open('http://maps.google.com/maps?ie=UTF8&q='+q+'('+encodeURIComponent(setText(o).replace(/\([^()]*\)/g,'').replace(/（.{20,}）/g,''))+')'+'&z=14&om=1','_blank');}}else{var i,a,m;q={ie:'UTF8',oe:'UTF8',om:1,z:16,q:'',t:'h',output:'embed',s:''};if(t.charAt(0)=='{'){i=0,m=t.slice(1,-1).match(/['"]?([a-z\d_]{1,20})['"]?[:=]([^'",]+|'([^']+)'|"([^"]+)")/ig);for(;i<m.length;i++){a=m[i].match(/['"]?([a-z\d]{1,20})['"]?[:=]([^'",]+|'([^']+)'|"([^"]+)")/i);q[a[1]]=a[3]||a[4]||a[2]||'';}}else if(t.indexOf('s=')!=-1){q=encodeURIComponent(t);}else{q.q=encodeURIComponent(t.slice(s+1)),q.s=t.slice(0,s);}if(typeof q=='object'){s=function(){a=[];for(i in q)if(q[i]!='')a.push(i+'='+((q[i]+='').indexOf('%')==-1?encodeURIComponent(q[i]):q[i]));return a.join('&amp;');};q._q=setText(o).replace(/\([^()]*\)/g,'').replace(/（.{20,}）/g,'');if(!/\([^()]+\)/.test(q.q))if(q.q)q.q+='('+encodeURIComponent(q._q)+')';else q.q=encodeURIComponent(setText(o));}else s=function(){return q};m=s();o.onclick=function(){dealMap.changeStay(m);};t='<iframe style="width:500px;height:400px;margin:0;overflow:hidden;" frameborder="0" src="http://maps.google.com/maps?'+m+'"></iframe>';if(typeof q=='object')q.z=q.z2||14,q.output='',q.s='';t+='<br/>如地圖未出現請<a class="mapLink" href="http://maps.google.com/maps?'+s()+'" target="_blank">檢視大圖</a>或<a href="'+getSearchURL((typeof q=='object'?q._q||'':q).replace(/（.*）/,''))+'" target="_blank">作查詢</a>。 <span>★按一下可使地圖不因滑鼠移開而消失。</span>';d.innerHTML=t;locObj(d,o);d.style.display='block';}};dealMap.changeStay=function(){var d=dealMap.div,i;if(!d)return;d.getElementsByTagName('span')[0].innerHTML='現在滑鼠移開'+((dealMap.stay=!dealMap.stay)?'亦不消失。 [<b class="mapB" onclick="javascript:dealMap.show(0,dealMap.stay=0);dealMap.stay=1;">使地圖消失</b>]':'隨即消失。');};
function getSearchURL(q,k){return'//www.google.com/search?q='+(q.indexOf('%')==-1?encodeURIComponent(q):q);}
var sWebS='*lyrics,game review,%小辭典,%英日→日,*%Getchu,*%Galge.com,%Google,%Google JP,*Openfind,%維基百科,%Wikipedia JP,%日翻中,%excite辞書,英→漢,%日語辭典,%英翻中,%日翻英,*國語辭典,*舊國語辭典,%词霸搜索,%韓→日,GIGA英→漢,%Answers.com'.split(','),sWebT='song,MENU,dict'.split(','),sWebC='本站歌詞搜尋,遊戲心得標題搜尋,本站珍藏詞彙,三省堂辞書,デジタルキャラクター総合情報サイト　Getchu.com,ギャルゲ・ドットコム\n美少女ゲームの情報\n株式会社ベクター Vector Inc.,史丹佛博士班的學生Larry Page和Sergey Brin在1998年創立。Google由googol而來。,Google日本,網擎資訊Openfind創立於1998年一月，其技術源自於由吳昇博士所領導的國立中正大學GAIS實驗室。,Wikipedia百科全書,Wikipedia百科事典日本語版,exciteテキスト翻訳\n夢幻的線上和漢辞典，讚！,大辞林第二版（三省堂）,顏元叔教授主編\n顏氏美語英漢辭典,infoseek国語辞典\n『大辞林 第二版』約23万3千語\n對看得懂日文的朋友才有用吧,AltaVista - Babel Fish Translation\nPowered by SYSTRAN,AltaVista - Babel Fish Translation,教育部重編國語辭典修訂本網路第五版,重編國語辭典修訂本網路第四版,Kingsoft 金山词霸搜索Beta\n速度慢，而且恐怕找不到繁體中文的詞。查日文的部份也有點兩光，所以主要應該用於查英文字吧。,Excite エキサイト 翻訳,Giga Media: 線上英漢、漢英、英英字典／注音、通用、漢語拼音查詢／計算機,Answers.com - Online Dictionary Encyclopedia and much more'.split(','),sWebP='../song.htm?~,all.htm?k=~,dict.htm?~,http://www.sanseido.net/User/Dic/Index.aspx?TWords=~&st=0&DailyJJ=checked&DailyEJ=checked,http://www.getchu.com/php/calendar.phtml?search_month=all&search=~,http://search.galge.com/search?doc=galsoft&query=~,http://www.google.com/search?q=~&ie=UTF-8&oe=UTF-8&hl=zh-TW&inlang=zh-TW&lr=lang_zh-CN%7Clang_zh-TW,http://www.google.co.jp/search?q=~&hl=ja&ie=UTF-8&oe=UTF-8&lr=lang_ja&sa=X&oi=lrtip9,http://www.openfind.com.tw/cgi-bin/tw/gaisweb.cgi?query=~,http://zh.wikipedia.org/wiki/~,http://ja.wikipedia.org/wiki/~,http://www.excite.co.jp/world/chinese/?before=~&wb_lp=JACH&big5=yes,http://www.excite.co.jp/dictionary/japanese/?search=~&match=beginswith,http://www.onlinedict.com/servlet/MobiDictLookup14?example=on&phrase=on&WoRd=~,http://jiten.www.infoseek.co.jp/Kokugo?qt=~&sm=1&pg=result_k.html&col=KO,http://world.altavista.com/babelfish/tr?doit=done&intl=1&tt=urltext&urltext=~&lp=en_zt,http://world.altavista.com/babelfish/tr?doit=done&intl=1&tt=urltext&urltext=~&lp=ja_en,http://www.sinica.edu.tw/ftms-bin/dict/dict.sh?idx=%2Fproject2%2Ffulltext%2Ftdbproj%2Fdict.idx&cond=~&pieceLen=50&fld=1&cat=&imgFont=1,http://dict.moe.gov.tw/cgi-bin/dict/newsearch.cgi?Database=dict&QueryScope=Whole&QueryCommand=fsearch&GraphicWord=yes&QueryString=~,http://cb.kingsoft.com/?lang=utf-8&s=~,http://www.excite.co.jp/world/korean/?before=~&wb_lp=KOJA,http://cdict.giga.net.tw/?q=~,http://www.answers.com/~'.split(','),sWebL,sWebs=[],searchIt_s,s_class='site',s_classH='site_h',dselS,searchIt_f,sWebC,sWebE,searchIt_w=null;
function initSearch(){if(sWebE)return;if(typeof psIt=='function')psIt();sWebE=[];var i=0,j=0,s=getCookie('sWebs');s=(s?s:'1').split(',');sWebL=getCookie('sWebL');if(isNaN(sWebL))sWebL=3;for(;i<sWebS.length;i++)if(sWebS[i]&&sWebS[i].charAt(0)!='*'){if(sWebS[i].charAt(0)=='%')sWebE[i]=1,sWebS[i]=sWebS[i].substr(1);else sWebE[i]=0;if(!sWebT[i])sWebT[i]='SearchOfGame';sWebs[i]=isNaN(s[i])?1:parseInt(s[i]);}else sWebS[i]=0;makeSearchStr();}
function makeSearchStr(showArray){var t='',i=0,j=0;if(!sWebL){searchIt_s='';return}for(;i<sWebS.length;i++)if(sWebs[i]&&sWebS[i])t+=(j++&&j%sWebL==1&&j?'<br/>':'')+' <b class="'+s_class+'"'+(sWebC[i]?' title="'+sWebC[i].trim(20,1)+'"':'')+' onclick="sWeb('+i+')" onmouseover="s_ov(this)" onmouseout="s_o(this)">'+sWebS[i]+'</b> |';searchIt_s=t?'</span><br/>於<span class="dselS">'+t.slice(0,-2)+'</span>':'';}
function sWeb(i){var q=sWebE[i]?encodeURIComponent(dselS):dselS;searchIt_w=open(sWebP[i].replace(/~/,q),sWebT[i],sWebP[i].indexOf('dict.htm')==-1?'':'titlebar=no,dependent,resizable=1,menubar=0,toolbar=0,location=0,scrollbars=1,width=300,height=250');searchIt_w.focus();}
function s_ov(o){status_=window.status;window.status=o.title;o.className=s_classH;searchIt_f=true}
function s_o(o){searchIt_f=false;if(typeof status_!='undefined')window.status=status_;o.className=s_class}
function searchIt(){if(!dselD.style||!searchIt_s)return;var bd=document.body,r=document.selection.createRange(),s=r.text,l=r.offsetLeft,t=r.offsetTop+r.boundingHeight+2,w=280;if(l>bd.scrollWidth-w&&bd.scrollWidth>w)l=bd.scrollWidth-w;if(!s||s.length>50){if(!searchIt_f||s.length>50)dselD.style.display='none';return}dselS=s,s='<span style="cursor:pointer" title="按一下取消使用" onmouseover="s_ov(this)" onmouseout="s_o(this)" onclick="if(confirm(\'是否取消使用搜尋功能？\'))setSearch(-1);">搜尋</span> <span class="dselT">'+s.trim(17)+searchIt_s;with(dselD.style)display='block',left=bd.scrollLeft+l,top=bd.scrollTop+t;dselD.innerHTML=s}
function setSearch(i){if(i==-1&&document.onselectionchange){document.onselectionchange=null;if(typeof dselD=='object'&&typeof dselD.style=='object')dselD.style.display='none';return}if(typeof dselD=='object')alert('double run '+parseFunction(arguments.callee).funcName+'() by '+parseFunction(arguments.callee.caller).funcName+'()!');if(typeof document.onselectionchange=='undefined')return;if(document.body){initSearch();document.onselectionchange=searchIt;var t=document.createElement('div');t.id="dselD";document.body.appendChild(t);}else if(!i||i<9)setTimeout('setSearch('+(i?i+1:1)+')',9);}
function doKousi(n){var dId='kousi',o,oI,oBg,thisFuncName=parseFunction(arguments.callee).funcName;if(!n)n=dId;o=getDocObj(n);if(!o){o=getDocObj(n,getDocObj.f.refOnly);if(!o){if(!loadReferenceDone)setTimeout(thisFuncName+'('+dQuote(n)+')',90);return}if(!getDocObj(dId)&&document.body.insertBefore)document.body.insertBefore(o=document.createElement('div'),document.body.childNodes[0]),o.id=o.className=dId;if(!(o=transRefObj(dId,n))){window.status='transRefObj encounter error @ '+thisFuncName+'!';return}if(!document.body.insertBefore){o.style.display='block';return}n=dId}try{o.className=dId;document.body.insertBefore(oI=document.createElement('div'),o);oI.id=n+'I';oI.className=dId+'I';oI.onclick=function(){doAlertInit();doAlert();};oI.title="注意事項";oI.innerHTML='注意';oI.doAlertScrollT=oI.doAlertScrollL=0;document.body.insertBefore(oBg=document.createElement('div'),o);oBg.id=n+'Bg';oBg.className=dId+'Bg';}catch(e){return}window.onscroll=window.onresize=doAlertScroll;doAlertInit(n);}
function setStyle(className){var n;if(className){n=getCookie('class_'+className);document.body.className=n?n:className}
var f=getCookie('fontSize'),l=getCookie('lineHeight');if(f||l)for(var i=0,o=document.getElementsByTagName('div');i<o.length;i++)if(o[i].id.slice(0,2)=='c_'){if(f)o[i].style.fontSize=f;if(l)o[i].style.lineHeight=l}}
function showFooter(footerDiv){if(!footerDiv)footerDiv='footer';if(typeof footerDiv=='string')footerDiv=getDocObj(footerDiv);if(!footerDiv||typeof footerDiv.innerHTML!='string')return;var t='<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/2.5/" title="Creative Commons 授權" target="_blank"><img src="http://creativecommons.org/images/public/somerights20.png"/></a>'+' <a href="http://www.icra.org/sitelabel/" target="_blank" title="ICRA(Internet Content Rating Association)分級\n警告︰本站雖無情色與暴力文字或多媒體，但閱讀者須具有成熟的價值觀批判能力！"><img src="http://www.icra.org/buttons/icra_sw.gif"/></a>';if(location.protocol!='file:')t+=' <a href="../t.cgi?REQUEST=visit&FN=v&point=T" title="visitor"><img src="../t.cgi?REQUEST=visit&FN=v&mode=pic&page=game&point='+encodeURIComponent(document.title)+'" border="0"></a>';footerDiv.innerHTML=t}
var getPhotoBase_B;
function getPhotoBase(p,base){if(!p)return;if(!getPhotoBase_B)getPhotoBase_B=typeof relatePath=='function'?relatePath(0,'game/photo/'):'photo/';return/\/\//.test(p)||/^img/.test(p)?p:getPhotoBase_B+p}
function setImage(){var i,l,o;if(o=document.getElementsByTagName('IMG'))for(i=0;i<o.length;i++){if(!o[i].src&&(l=o[i].alt)){o[i].src=getPhotoBase(l);if(!o[i].onload)o[i].onload=function(){regulateImage(this);};if(!o[i].className)o[i].className='pImg';}}}
function regulateImage(img,w,h){if(img&&typeof img=='string')img=getDocObj(img);if(!img)return;var limitW=w||screen.width-50,limitH=h||screen.height>>1,c;if(img.offsetWidth>limitW)img.style.width=limitW+'px',c=1;if(img.offsetHeight>limitH)img.style.height=limitH+'px',c=1;if(c&&!img.onclick){img.style.cursor='pointer',img.onclick=function(){window.open(this.src);};if(!img.title)img.title='按一下展示原圖';}}
var zoomImgOff,noZoomImgClass='noZoomImg',zoomImgQ=[],zoomImgT,zoomImgE;
function setZoomImg(o){if(o){zoomImgQ.push(o);if(!zoomImgT)zoomImgT=setTimeout('setZoomImg();',500);}else if(zoomImgQ.length){setZoomImg_(zoomImgQ.pop());if(zoomImgQ.length)zoomImgE=0;else if(++zoomImgE>200)return;zoomImgT=setTimeout('setZoomImg();',50);}}
function setZoomImg_(o){if(typeof o.onmousewheel=='undefined')return;o.onmousewheel=zoomImg;try{o=o.parentNode.getElementsByTagName('div');if(o[0])o[0].innerHTML='<div class="'+noZoomImgClass+'">[<b onclick="zoomImg(this);">reset</b>] / 去除 [<b onclick="noZoomImg(this);">此張</b>] / [<b onclick="noZoomImg();">所有</b>] 圖片的滑鼠滾輪調整大小功能</div>'+o[0].innerHTML}catch(e){}}
function zoomImg(o,z){if(zoomImgOff)return;if(!o)o=this;var zoom;if(o.tagName=='IMG')zoom=parseInt(o.style.zoom,10)||100,zoom+=event.wheelDelta/12;else try{o=o.parentNode.parentNode.parentNode.getElementsByTagName('IMG')[0];zoom=100}catch(e){return 1}if(0<zoom&&zoom<500)o.style.zoom=zoom+'%';return false}
function noZoomImg(o){if(o)try{o.parentNode.parentNode.parentNode.getElementsByTagName('IMG')[0].onmousewheel=null;o.parentNode.style.display='none';}catch(e){}else{zoomImgOff=true,o=document.getElementsByTagName('div');for(var i=0;i<o.length;i++)if(o[i].className==noZoomImgClass)o[i].style.display='none';}}
var doneImgBox,setImgBoxBase;
function setImgBox(tag){if(doneImgBox)return;var i,t,o=document.getElementsByTagName(tag||'div');for(i=0;i<o.length;i++)if(o[i].className=='imgBox')t=o[i].innerHTML,o[i].innerHTML='<div class="box"><img class="img" alt="'+(t.length<200?t.gText():'')+'" src="'+getPhotoBase(o[i].title,setImgBoxBase)+'" onload="setZoomImg(this);regulateImage(this);trigger(this,trigger.f._show);"/><div class="text">'+t+'</div></div>';doneImgBox=true}
function sMenuInit(i,menuDoc){var j=-1,k,t='',o=getDocObj('sM'),txt,alt;if(!o)return;if(!i)i=0;if(typeof menuDoc!='object')menuDoc=(''+(menuDoc?menuDoc:'')).split(',');while(getDocObj('M'+ ++j)){if(!menuDoc[j])txt='Menu '+j,alt='';else if(k=menuDoc[j].indexOf(':'),k==-1)txt=menuDoc[j],alt=' title="Menu '+j+'"';else txt=menuDoc[j].substr(0,k),alt=' title="'+menuDoc[j].substr(k+1)+'"';t+='<a id="sM'+j+'" style="cursor:pointer"'+alt+' href="javascript:sMenu('+j+')">'+txt+'</a> ';}o.innerHTML=t;if(!isNaN(i)&&i>=0){o=getDocObj('sM'+i);if(typeof o.click=='function')o.click();else sMenu(i);o.focus();}}
function sMenu(i,menuDoc){var j=0,o=getDocObj('sM');if(o&&!o.innerHTML)sMenuInit(-1,menuDoc);if(!o||isNaN(i))return;setCookie(setCookieS.setRoot);setCookie('menuIndex',i);while(o=getDocObj('M'+j)){trigger(o,j==i?trigger.f._show:trigger.f._hidden);with(getDocObj('sM'+j).style)textDecoration=j==i?'underline':'none',color=j++==i?'lime':'coral';}}
function setupPageR(){if(!loadReferenceDone){status+='Reference page load fault!';return}transRefObj('kousiTop');if(getLabel().indexOf('diary')!=-1)try{getDocObj('surveyT').style.display='none';}catch(e){}else if('*TimeList*AllList*analysis*surveyCount*viewerCount*'.indexOf('*'+getLabel()+'*')!=-1)try{getDocObj('kousiTop').style.display=getDocObj('surveyT').style.display='none';}catch(e){}else transRefObj('survey');if(!setTopP(0,setTopP_doTest))try{transRefObj('warningTop').style.display='none';}catch(e){}}
var askLabel;
function getLabel(){if(typeof askLabel=='undefined'){try{askLabel=location.search.slice(1).match(/seg=(.+)&?/);}catch(e){askLabel='';}askLabel=askLabel?askLabel[1]:'';}return askLabel}
var countLogHead='count_';
function checkView(label){if(!label)if(getLabel())label=getLabel();else return;var count=getCookie(countLogHead+label);if(!count)count=0;setCookie(setCookieS.setRoot);setCookie(setCookieS.forever);setCookie(countLogHead+label,++count);setCookie('expires',0);}