/*COIN -Copyright (c)2008 InfoPlayer.jp. All Rights Reserved/concept design ID-G
このプログラムの無断転載と無断利用、複製、流用、改ざん、改変、転載、リバースエンジニアリング、並びにそれに伴う本サイトプログラムの無断での使用を禁じます。
 */
jQuery.noConflict();(function(){coinDI=function(url){return this instanceof coinDI?this.initDI(url):new initDI(url)};coinDI.prototype={copyright:"©2008 InfoPlayer.jp. All Rights Reserved/concept design ID-G",url:location.href,referer:"",o:null,ct:null,tp:null,srvPath:"http://www.infoplayer.jp",baseDir:location.pathname.match(/\/.*?\//)[0],imgDir:null,medDir:null,cssDir:null,itmbDir:null,tmbDir:null,cntDir:null,ext:["jpg","jpeg","swf","mp3","flv","swf","pdf"],filter:{type:null,selected:null,cell:{},no:{},length:0,types:{},chip:[0,-2,0,2,4,3,1,6,5,-1]},zoom:[0.25,0.5,0.75,1,1.25,1.5,2,3,4],zoomct:3,free:false,temp:{},wizMov:{},wizEnq:{},elements:{},timerID:null,interval:null,urlInt:null,scale:3,cellCount:0,flash:(jQuery.browser.msie)?window:document,id:0,titleY:0,moving:false,entry:false,wizNew:{},nowTop:{},cells:{},cellNo:{},enquetes:{},targetSW:true,historySW:false,showLast:false,titleScrolling:null,partsTag:'<object .*?><param name="movie" value="http://www.youtube.com/.*?<embed src="http://www.youtube.com/.*?></embed></object>?',initDI:function(tmp){$o=this;var self=this;this.imgDir=this.baseDir+"img/";this.medDir=this.baseDir+"media/";this.cssDir=this.baseDir+"css/";$o.IE6=$o.isIE6();if(tmp){jQuery("#oArea").oLoadTemplate(tmp)}var d=this.imgDir;if(typeof(this.history)=="undefined"){this.history={count:1}}if(typeof(this.root)=="undefined"){this.root={no:0}}if(typeof(this.cache)=="undefined"){this.cache={}}this.type={all:false,swidth:24,del:d+"del.gif","-2":{tip:"NEWマーク表示あり",icon:d+"new.gif",s:d+"newi.gif"},"-1":{tip:"アンケート",icon:d+"enq.gif",s:d+"enqi.gif"},"0":{tip:"情報文",icon:d+"info.gif",s:d+"infoi.gif"},"1":{tip:"URL",icon:d+"url.gif",s:d+"urli.gif"},"2":{tip:"画像",icon:d+"pic.gif",s:d+"pici.gif"},"3":{tip:"サウンド",icon:d+"sound.gif",s:d+"sndi.gif"},"4":{tip:"動画",icon:d+"movie.gif",s:d+"movi.gif"},"5":{tip:"Flash",icon:d+"file.gif",s:d+"filei.gif"},"6":{tip:"PDF",icon:d+"doc.gif",s:d+"doci.gif"},"7":{tip:"HTML",icon:d+"file.gif",s:d+"filei.gif"}};this.jQme={};this.jQIm=jQuery("#oInfoW_modal");this.jQPg=jQuery("#oPlay_progress");this.jQRF=jQuery("#oRoot_frame");this.jQRV=jQuery("#oRoot_view",this.jQRF);this.jQTF=jQuery("#oTitle_frame");this.jQTV=jQuery("#oTitle_info",this.jQTF);this.jQSC=jQuery("#thumbBody");this.jQSR=jQuery("#oRound_panel");this.jQp=jQuery("#oPlay_Panel");this.jQIF=jQuery("#oInfo_frame").bind("wheel",function(event,delta){var jQs=jQuery("#oInfo_slider");$o.scrollTo(0,{slider:jQs,frameDiv:$o.jQIF,viewDiv:$o.jQIV,vector:delta,maxValue:100});if(event.preventDefault){event.preventDefault()}event.returnValue=false});this.jQIP=jQuery("#oInfo_panel");this.jQIV=jQuery("#oInfo_view");this.jQMsg=jQuery("#oMsg_panel");this.jQEnq=jQuery("#oEnq_panel");this.jQLd=jQuery("#oNowLoading");this.jQDg={};this.nowTop.topCoinId=(typeof(jQuery().o.opt)!="undefined")?Number(jQuery().o.opt.topCoinId):null;jQuery("#oTitle_frame").bind("wheel",function(event,delta){$o.titleScroll(-delta*16);if(event.preventDefault){event.preventDefault()}event.returnValue=false});jQuery("#oTool_btnGrid").click(function(){self.gridOnOff("off")});jQuery("#oTool_btnGridOn").click(function(){self.gridOnOff("on")});jQuery("#oBtnBack,#oBtnBack2").click(function(){self.backCoin()});jQuery("#oDisp_btnHistory").click(function(){$o.onHistoryClick(jQuery(this))});jQuery("#oBtnTarget").click(function(){$o.onTargetClick(jQuery(this))});jQuery("#oFilter_btnReset").click(function(){self.onFilterClick()});jQuery("#oInfo_btnReload").click(function(){$o.showCell()});jQuery("#oTitle_btnUp").mousedown(function(){$o.titleScroll(-16,function(){jQuery("#oTitle_btnUp").mousedown()})}).mouseup(function(){$o.titleScroll()});jQuery("#oTitle_btnDown").mousedown(function(){$o.titleScroll(16,function(){jQuery("#oTitle_btnDown").mousedown()})}).mouseup(function(){$o.titleScroll()});jQuery("#oPrt_btnOpen").click(function(){if(!$o.checkSelect()){window.open($o.baseDir+"coinprint.html?"+$o.coinUrlHash(),"CoinPrint","width=800,menubar=no,directories=no,location=no,toolbar=no,resizable=yes,scrollbars=yes")}});if(jQuery.isFunction(jQuery().slider)){jQuery("#oPlay_sliderVol").slider({min:0,max:100,value:30,orientation:"vertical",change:function(e,ui){$o.player.masterVol(ui.value)}});if(!jQuery("#oPlay_progress").hasClass("ui-slider")){jQuery("#oPlay_progress").slider({min:0,max:100,value:0,orientation:"vertical",start:function(e,ui){clearInterval($o.interval);var st=$o.player.status();$o.playing=st.playing;$o.player.pause()},stop:function(e,ui){var st=$o.player.status();var p=Math.round(st.duration*(ui.value/100)),ld=Math.floor(st.duration*(st.loadByte/st.totalByte));if((p<ld)&&(st.trickPlay)){$o.player.seek(p,$o.playing);$o.playPanel.showStatus($o.player.status())}else{if(p==ld){$o.playPanel.stop()}else{$o.player.play()}}$o.interval=setInterval("$o.playProgress()",1000);delete $o.playing}});jQuery("#oPlay_btnPlay").click(function(){var st=$o.flash.externalplay.mediaPlay();if(st==null){return}jQuery("img",this).attr("src",(!st.playing)?$o.cssDir+"play.gif":$o.cssDir+"pause.gif")});jQuery("#oPlay_btnRew").click(function(){$o.flash.externalplay.mediaRew()})}}jQuery("#o_close").click(function(){jQuery("#oDocViewer").hide().empty();$o.playPanel.close();var cn=($o.cells[jQuery().o.opt.cellCode])?$o.cells[jQuery().o.opt.cellCode].coinCellId:0,o=$o.o,ct=o.contents;if(jQuery().o.opt.trigger=="hide"){if(ct.contentType==2){var w=ct.width,h=ct.height,f;if(o.abone){f=$o.imgDir+"deleted.gif"}else{f=$o.cntDir+o.contents.filename}}else{var w=480,h=360,f=$o.imgDir+((ct.contentType==3)?"soundl.gif":"moviel.gif")}var pt=jQuery().o.opt.parent,r=jQuery().o.fitRect({srcW:pt.width(),srcH:pt.height(),width:w,height:h}),jt=jQuery("#oTop_title").hide();pt.show().find(".oImgInner").css({left:r.x,top:r.y,width:r.width,height:r.height}).end().find("img").attr({id:o.coinCd,src:f,width:r.width,height:r.height});if(o.abone){pt.find(".oImgCourt").append("<div class='oDeleted'>Deleted</div>")}$o.imgCourt(r.height);pt.find(".oImgCourt>.oDeleted").ifShow(o.abone);jt.css({left:0,top:-jt.height(),width:w}).text(o.title).show()}$o.closeCoin();jQuery("#oArea").fadeOut("fast");jQuery("#oDisplay").fadeOut("slow");if(jQuery.browser.msie){jQuery("iframe").css({visibility:""})}$o.moving=false;$o.topLoading=false;_o.topCoinId=null});jQuery("#oDoc_btnOpen").click(function(){jQuery().o.showPDF($o.o,"on")});jQuery("#oBmark_btnSave").click($o.onMark).hover(function(){if($o.isIE6){jQuery("span",this).addClass("markHover")}},function(){if($o.isIE6){jQuery("span",this).removeClass("markHover")}});jQuery("#oBmark_btnOpen").click($o.onWarp).hover(function(){if($o.isIE6){jQuery("span",this).addClass("warpHover")}},function(){if($o.isIE6){jQuery("span",this).removeClass("warpHover")}});if(typeof(jQuery().slider)=="function"){jQuery("#oRoot_slider").slider({min:0,max:100,value:0,orientation:"horizontal",slide:function(e,ui){$o.scrollTo(ui,{slider:jQuery(this),frameDiv:$o.jQRF,viewDiv:$o.jQRV,nextWidth:(jQuery(this).width()>>1)})}});jQuery("#oInfo_slider").slider({min:0,max:100,value:100,orientation:"vertical",slide:function(e,ui){$o.scrollTo(ui,{slider:jQuery(this),frameDiv:$o.jQIF,viewDiv:$o.jQIV})}}).end().hide()}},player:{play:function(){if($o.flash.externalplay){return $o.flash.externalplay.mediaPlay()}return null},masterVol:function(v){if($o.flash.externalplay){return $o.flash.externalplay.masterVol(v)}return null},status:function(){if($o.flash.externalplay){return $o.flash.externalplay.playStatus()}return null},pause:function(){if($o.flash.externalplay){return $o.flash.externalplay.mediaPause()}return null},seek:function(p,st){if($o.flash.externalplay){return $o.flash.externalplay.mediaSeek(p,st)}return null}},onMark:function(){$o.cookieWrite("W:"+$o.tp.coinCd,$o.coinUrlHash());jQuery().oDialog("","Markしました","今閲覧している階層まで、Markしました。",$o._.ok)},onWarp:function(){var r=$o.cookieRead("W:"+$o.tp.coinCd);if(r!=""){$o.loadCoinFromBookmark(jQuery().oURLParam(r))}},swfControl:function(){if(jQuery.browser.msie){jQuery("OBJECT[classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000]:not(:has(>param[name=wmode]))").each(function(){jQuery(this).addClass("oFlash").replaceWith(jQuery(this).parent().html().match(/<object .*?>/i)+'<param name="wmode" value="transparent" />'+RegExp.rightContext)})}else{jQuery("EMBED").hide().attr("wmode","opaque");jQuery("OBJECT[classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000]:not(:has(>param[name=wmode]))").each(function(){jQuery(this).hide().addClass("oFlash").prepend('<param name="wmode" value="opaque" />').show()});jQuery("EMBED").show()}},drawRoot:function(){var x=4,d="",a="<span class='oRootArrow'><b>►</b></span>",b="";var jQS=jQuery("#oRoot_slider");var jQT=jQuery("#oTitle_frame"),jQV=jQT.find("#oTitle_info"),h=jQV.height(),fw=jQT.width(),fh=jQT.height();$o.titleScroll(0);for(var i=0;i<=$o.root.no;i++){if(!$o.root[i]){continue}var r=$o.root[i],title=r.title,ct=r.contents,img=$o.type[ct.contentType].icon,w=ct.width,h=ct.height;if(r.abone){img=$o.type.del;w=32;h=32}else{if(title.length>=7){title=title.substr(0,6)+"..."}if(ct.contentType==2){img=$o.contentsDir.ithumb(ct)}else{w=32;h=32}}if(i==$o.root.no){a="";b="style='border:solid 2px #888'"}var t=jQuery().o.fitRect({srcW:48,srcH:48,width:w,height:h});d+="<div style='left:"+x+"px' class='oRootThumb'><div class='oRootNo'>"+(i+1)+"</div><div "+b+" class='oRootImage'><img name='"+i+"' src='"+img+"' style='position:absolute;left:"+(t.x+2)+"px;top:"+(t.y+2)+"px;width:"+t.width+"px;height:"+t.height+"px'></div>"+a+"<div class='oRootTitle' >"+title+"</div></div>";x+=70}$o.jQRV.html(d).width(x);if($o.jQRV.width()>$o.jQRF.width()){jQS.innerShow()}else{jQS.hide()}$o.scrollTo(100,{slider:jQS,frameDiv:$o.jQRF,viewDiv:$o.jQRV,nextWidth:(jQS.width()>>1)});jQuery("img",$o.jQRV).click(function(){$o.jumpCoin(Number(this.name))})},ieSpeedy:function(){if(jQuery.browser.msie){eval((function(props){var code=[];for(var i=0,l=props.length;i<l;i++){var p=props[i];window["_"+p]=window[p];code.push(p+"=_"+p)}return"var "+code.join(",")})("document self top parent alert setInterval clearInterval setTimeout clearTimeout".split(" ")))}},themeCd:function(frm){var t1=$o.toNum(frm.tension1.value)*10000,t2=$o.toNum(frm.tension2.value)*100,t3=$o.toNum(frm.doing.value);return((t1==0)||(t2==0)||(t3==0))?0:(t1+t2+t3)},toNum:function(v){var n=Number(v);return((typeof(n)!="number")||(isNaN(n)))?0:n},nextCoin:function(no){if($o.moving){return}var st=$o.root.no;$o.moving=true;jQuery().o.push($o.o);$o.root.vector=1;$o.root.no++;$o.transitionCoinData($o.nowInfos[no].subCoinCd,$o.root.vector)},backCoin:function(){if($o.moving){return}if($o.root.no==0){return}$o.jumpCoin($o.root.no,-1,true)},jumpCoin:function(no,v,bk){if($o.moving){return}$o.moving=true;if(v){no=no+v}if((no<0)||($o.root.no<no)){$o.root.vector=0;return}$o.root.vector=(no<$o.root.no)?-1:((no!=$o.root.no)?1:0);jQuery().o.push($o.o);var st;$o.root.no=no;$o.nowTop.coins=$o.root[$o.root.no];$o.o=$o.nowTop.coins;$o.cnt=$o.nowTop.coins.contents;$o.transitionCoinData($o.o.coinCd,{vector:$o.root.vector,ope:((bk)?1:0)})},pageload:function(hash){if($o.moving){return}if($o.noChange){$o.noChange=false;return}var h=jQuery().oURLParam(hash);if($o.o.coinCd!=h.id){if((h.o)&&($o.tp.coinCd!=h.o)){$o.closeCoin()}$o.loadCoinFromBookmark(h)}else{if(h.n!=jQuery().o.opt.cellCode){var n=(Number(h.n)>=0)?Number(h.n):-1;jQuery().o.cursor.jumpCellCode(n)}}},loadCoinFromBookmark:function(h){var nh=jQuery().oURLParam(),id={id:null,initCellCode:null};if(!h){var h=nh}if(typeof(h.id)=="undefined"){$o.TopCoinLoad(null);return}if(typeof(h.n)!="undefined"){id.initCellCode=Number(h.n)}if(typeof(h.o)!="undefined"){id.id=h.id;$o.TopCoinLoad(id.id,id.initCellCode)}else{id.id=h.c;$o.rootingCoinCd(id.id,id.initCellCode)}return id},rootingCoinCd:function(cd,cellCode){if($o.isNotFound(1,cd,true)){return}if(cellCode==null){cellCode=-1}$o.jQLd.oAjaxMon($o._.loading,true);$o.copyright="©2008 InfoPlayer.jp. All Rights Reserved/concept design ID-G";CoinCan.getRootingCoinCd(cd,function(coins){if($o.isNotFound(coins.length,cd,true)){return}var no=$o.root.no;if(coins[0].abone){coins[0].title=coins[0].titleInfo=$o._.deleted}$o.root=coins;$o.root.no=coins.length-1;for(var i=0;i<$o.root.no;i++){jQuery().o.push(coins[i],{cellCode:coins[i].cellCode})}jQuery().o.push(coins[$o.root.no],{cellCode:cellCode});$o.topLoading=($o.nowTop.coinCd!=coins[0].coinCd);CoinCan.getTopCoin(coins[0].topCoinId,function(topCoin){$o.jQLd.oAjaxMon();$o.nowTop=topCoin;$o.tp=$o.nowTop;$o.nowTop.coins=coins[coins.no];$o.o=$o.nowTop.coins;$o.ct=$o.nowTop.coins.contents;$o.transitionCoin($o.o)})})},changeTop:function(cd){if(($o.moving)||($o.topLoading)){return}if(jQuery("#oDisplay").isShow()){jQuery.historyLoad("o="+cd)}else{jQuery("#oStarting").o({mode:"chgTop",id:cd,trigger:"hide"})}},TopCoinLoad:function(topCoinId,cellCode){if($o.isNotFound(1,topCoinId,true)){return}if(cellCode==null){cellCode=-1}$o.targetSW=true;$o.historySW=false;$o.topLoading=false;$o.jQLd.oAjaxMon($o._.loading,true);$o.noChange=true;$o.moving==true;var t=typeof(topCoinId);if(((t=="string")&&($o.nowTop.coinCd!=topCoinId))||((t=="number")&&($o.nowTop.topCoinId!=topCoinId))){$o.topLoading=true;$o.round=null;jQuery("#oRound_panel").find(".roundToggle").hide().removeClass("roundSelect")}$o.copyright="©2008 InfoPlayer.jp. All Rights Reserved/concept design ID-G";if(typeof(topCoinId)=="string"){CoinCan.getTopCoinByCD(topCoinId,loaded)}else{CoinCan.getTopCoin(topCoinId,loaded)}function loaded(topCoin){if($o.isNotFound(topCoin.topCoinId,topCoinId,true)){return}var id=topCoin.topCoinId;if(topCoin.coins.abone){topCoin.coins.title=topCoin.coins.titleInfo=$o._.deleted}topCoin.coins.cellCode=cellCode;$o.nowTop=topCoin;$o.tp=$o.nowTop;$o.o=$o.nowTop.coins;$o.root={no:0,0:topCoin.coins};jQuery().o.push(topCoin.coins,{cellCode:cellCode});$o.jQLd.oAjaxMon();$o.transitionCoin()}},transitionCoinData:function(coinCd,v,callback){var op=0;if((v==null)||(typeof(v)=="undefined")){v=0}if(typeof(v)=="object"){op=v.ope;v=v.vector}if(!coinCd){var coinCd=$o.o.coinCd;jQuery().o.removeCache($o.o.coinId)}$o.jQLd.oAjaxMon($o._.loading,true);CoinCan.getCoin(coinCd,v,op,function(coins){$o.jQLd.oAjaxMon();$o.transitionCoin(coins);if(jQuery.isFunction(callback)){callback()}})},historyEnable:function(mode){if(jQuery().o.opt.mode!="url"){return}jQuery.historyEnable(mode)},transitionCoin:function(o){$o.historyEnable();$o.urlHash=null;$o.copyright="©2008 InfoPlayer.jp. All Rights Reserved/concept design ID-G";if(o==null){var o=$o.o}if($o.interval){if(typeof($o.flash.externalplay)!="undefined"){$o.flash.externalplay.mediaDispose()}clearInterval($o.interval);$o.interval=null}$o.initCoin(o);var md=jQuery().o.opt.mode;if((md!="view")&&(md!="cover")&&($o._.serviceName)){document.title=$o._.serviceName+" - "+$o.removeAllTag($o.root[0].title)+"["+$o.removeAllTag($o.o.title)+"]"}jQuery(".oTitleName").text(document.title);if($o._.welcomeUrl){jQuery("#oInfo_welcome a",$o.jQIP).attr("href",$o._.welcomeUrl+"#o="+$o.nowTop.coinCd).html($o._.welcomeTitle)}var d=$o.jQIm.css("display");if((jQuery().o.opt.cellCode>0)&&(d!="none")){$o.jQIm.fadeOut(100)}if(($o.jQIm.length!=0)&&(jQuery().o.opt.cellCode>0)&&(d!="none")){$o.jQIm.fadeOut(100)}jQuery().o.image.loadFromCoin($o.o,{transiton:true},done);function done(){if(($o.jQIm.length!=0)&&(jQuery().o.opt.cellCode<0)&&(d=="none")){$o.jQIm.fadeIn(100)}var ck=$o.topLoading;$o.receiveCellData(function(){if(ck){if($o.jQSR.length>0){$o.searchRound.init()}if($o.jQSC.length>0){$o.searchCategory($o.tp.category.categoryId);jQuery("#category_select").val($o.tp.category.categoryId)}}if($o.o.cellPatternId<0){jQuery("#oTitle_mode").text("自由")}else{jQuery("#oTitle_mode").text("固定")}$o.historyEnable(true);jQuery().o.grid.show();jQuery("#oBtnTarget").oToggleEffect($o.targetSW);$o.makeLinkTag();$o.moving=false;$o.topLoading=false})}},initCoin:function(o){if(!o){var o=$o.o}var r=$o.root[$o.root.no];if((r)&&(r.coinId==o.coinId)&&(o.coinCellId==null)&&($o.root.vector==0)){o.coinCellId=r.coinCellId;o.cellCode=r.cellCode;jQuery().o.cursor.setCellCode(r.cellCode)}if(o.abone){o.title=o.titleInfo=$o._.deleted}$o.nowTop.coins=o;$o.o=$o.nowTop.coins;$o.cnt=$o.o.contents;$o.root[$o.root.no]=o;$o.free=(o.cellPatternId<0);$o.refreshInterfaces()},showCoin:function(o){$o.initCoin(o);jQuery().o.grid.setFromCoin(o)},closeCoin:function(fn){if(typeof($o.nowTop.coins)!="undefined"){var c=(typeof($o.cells[jQuery().o.opt.cellCode])=="undefined")?-1:$o.cells[jQuery().o.opt.cellCode].coinCellId;CoinCan.closeCoin($o.o.coinId,(jQuery().o.opt.cellCode>=0)?((jQuery().o.opt.oneCell)?0:c):-1,-1,{callback:fn,async:false,timeout:4000})}},cancelInfo:function(){if(typeof($o.nowTop.coins)!="undefined"){var cd=jQuery().o.opt.cellCode;CoinCan.cancelInfo($o.wizNew.type,$o.o.coinId,((cd>=0)&&($o.cells[cd]))?$o.cells[cd].coinCellId:-1)}},receiveCoinData:function(coinId,callback){if(!coinId){var coinId=$o.o.coinId}$o.jQLd.oAjaxMon($o._.loading,true);$o.copyright="©2008 InfoPlayer.jp. All Rights Reserved/concept design ID-G";CoinCan.getCoin(coinId,function(coins){$o.jQLd.oAjaxMon();$o.showCoin(coins);if(jQuery.isFunction(callback)){callback()}})},receiveFilterData:function(coinId,callback){$o.jQLd.oAjaxMon($o._.loading,true);$o.copyright="©2008 InfoPlayer.jp. All Rights Reserved/concept design ID-G";CoinCan.filterCell(coinId,function(types){$o.jQLd.oAjaxMon($o._.loading,true);$o.setFilterData(types);$o.setFilter();if(jQuery.isFunction(callback)){callback()}})},setFilterData:function(types){var st,min;st=min=Number.MAX_VALUE;$o.filter.cell={};$o.enquetes={};$o.temp.hasInfo={};if(types){$o.filter.types=types}else{var types=$o.filter.types}for(var i in types){var n=types[i].cellCode;if(types[i].contentType==-1){$o.enquetes[n]=types[i].typeCount}else{$o.temp.hasInfo[n]=true}if($o.filter.type==types[i].contentType){$o.filter.cell[n]={};$o.filter.cell[n][types[i].contentType]=types[i].typeCount;if(min>n){min=n}}}if(min==st){min=-1}return min},receiveCellData:function(callback){$o.receiveFilterData($o.o.coinId,function(){$o.jQLd.oAjaxMon($o._.loading,true);$o.copyright="©2008 InfoPlayer.jp. All Rights Reserved/concept design ID-G";CoinCan.getCells($o.o.coinId,function(cellData){$o.cells=[];$o.cellNo=[];cellData.sort(function(a,b){return a.coinCellId-b.coinCellId});$o.cellNo=cellData;for(var i=0;i<cellData.length;i++){var cd=cellData[i].cellCode;$o.cells[cd]=cellData[i];$o.cells[cd].cellNo=i;$o.cells[cd].hasInfo=(typeof($o.temp.hasInfo)=="undefined")?true:$o.temp.hasInfo[cd]}$o.cellCount=i;delete $o.temp.hasInfo;$o.jQLd.oAjaxMon();jQuery().o.isPop($o.o);var cd=jQuery().o.cursor.setCellCode($o.cache[$o.o.coinId].cellCode);$o.checkInfo(jQuery().o.opt.cellCode,callback)})})},showCell:function(view,fn){var f=jQuery.isFunction(view);if((view==true)||(fn)){$o.setFilterData();jQuery().o.grid.show();if(fn){fn()}}else{$o.receiveCellData(function(){jQuery().o.grid.show();if(f){view()}})}},receiveInfoData:function(cellId,callback){$o.jQLd.oAjaxMon($o._.loading,true);$o.copyright="©2008 InfoPlayer.jp. All Rights Reserved/concept design ID-G";CoinCan.getInfos(cellId,$o.entry,function(coinInfos){$o.jQLd.oAjaxMon();$o.updateInfoList(coinInfos);if(jQuery.isFunction(callback)){callback()}})},receiveInfoByCellCode:function(no,callback){if(!$o.cells[no]){$o.updateInfoList();if(jQuery.isFunction(callback)){callback()}return}var id=$o.cells[no].coinCellId;$o.jQLd.oAjaxMon($o._.loading,true);$o.copyright="©2008 InfoPlayer.jp. All Rights Reserved/concept design ID-G";var md=(($o.entry)?1:0)+((callback==true)?2:0);CoinCan.getInfos(id,md,function(coinInfos){$o.jQLd.oAjaxMon();$o.entry=false;$o.updateInfoList(coinInfos);if(jQuery.isFunction(callback)){callback()}})},checkInfo:function(c,callback){var id=$o.o.coinId;if($o.cells[c]){if(!$o.history[id]){$o.history[id]={}}if(!$o.history[id][c]){$o.history[id][c]=$o.history.count;$o.history.count++;jQuery().o.showCheck(c)}}if(!$o.topLoading){$o.bookmarkURL()}if(callback!=null){$o.drawInfo(c,callback)}else{$o.drawInfo(c)}},drawInfo:function(c,callback){if((c>=0)&&($o.jQIm.css("display")!="none")){$o.jQIm.hide()}var p=null,id=null;if($o.cells[c]){id=$o.cells[c].coinCellId}if(callback!=null){$o.receiveInfoByCellCode(c,callback)}else{$o.receiveInfoByCellCode(c)}},receiveEnqueteData:function(cellCode,callback){var cellId=($o.cells[cellCode])?$o.cells[cellCode].coinCellId:null;$o.jQLd.oAjaxMon($o._.loading,true);$o.copyright="©2008 InfoPlayer.jp. All Rights Reserved/concept design ID-G";CoinCan.getEnquete(cellId,function(enq){$o.jQLd.oAjaxMon();$o.wizEnq.enquete=enq;if(jQuery.isFunction(callback)){callback(enq)}})},hashRedef:function(dst,src,k){if(k){jQuery.each(src,function(i,v){dst[i][k]=v})}else{jQuery.each(src,function(i,v){dst[i]=v})}},clone:function(o){return JSON.parse(JSON.stringify(o))},cloneObject:function(o){var f=function(){};f.prototype=o;return new f()},cloneCells:function(o){var c={};for(var i in o){c[o[Number(i)].cellCode]=$o.clone(o[Number(i)])}return c},cloneCellArray:function(a,md){var c=[],n=0;for(var i in a){var o=a[Number(i)];i=Number(i);if(!((md)&&(!o.modified))){c[n]=$o.clone(o);n++}}if(c.length==0){c=null}return c},dateFormat:function(srcDate){var yy=srcDate.getYear(),mm=srcDate.getMonth()+1,dd=srcDate.getDate(),hour=srcDate.getHours(),min=srcDate.getMinutes(),sec=srcDate.getSeconds();if(yy<2000){yy+=1900}if(mm<10){mm="0"+String(mm)}if(dd<10){dd="0"+String(dd)}if(hour<10){hour="0"+String(hour)}if(min<10){min="0"+String(min)}if(sec<10){sec="0"+String(sec)}return(yy+"/"+mm+"/"+dd+" "+hour+":"+min)},trim:function(src){return String(src).replace(/^[ 　\n\r]*$/g,"").replace(/[ 　\n\r]*$/g,"")},maxLength:function(str,len){var bc=0,dash="";for(var i=0;(i<str.length)&&(bc<len);i++){var c=str.charCodeAt(i);if((c!=10)&&(c!=13)){bc+=(c<256)?0.5:1}}bc=Math.ceil(bc);return((len<=bc)&&(str.length>bc))?str.substring(0,i):str},countChr:function(str){if((str==null)||(str=="")){return{length:0,byteLen:0,zenkaku:0}}var bc=0;for(var i=0;i<str.length;i++){bc+=(str.charCodeAt(i)<256)?1:2}return{length:str.length,byteLen:bc,zenkaku:Math.ceil(bc/2)}},countChrOnly:function(src){if((src==null)||(src=="")){return{length:0,byteLen:0,zenkaku:0}}return $o.countChr(src.replace(/<.*?>|\n|\r/g,""))},fileExt:function(src){var ext=src.toLowerCase().match(/\.(....?)$/);return RegExp.$1},dec2hex:function(dec){if((dec==null)||(dec=="")){return"000000"}var hex="";while(dec){var last=dec&15;hex=String.fromCharCode(((last>9)?55:48)+last)+hex;dec>>=4}return("000000").substr(hex.length)+hex},hsv2rgb:function(hsv){var r=0,g=0,b=0;var h=hsv.h,s=hsv.s,v=hsv.v;if(s<0){s=0}if(s>1){s=1}if(v<0){v=0}if(v>1){v=1}h%=360;if(h<0){h+=360}h/=60;i=Math.floor(h);f=h-i;var p1=v*(1-s),p2=v*(1-s*f),p3=v*(1-s*(1-f));switch(i){case 0:r=v;g=p3;b=p1;break;case 1:r=p2;g=v;b=p1;break;case 2:r=p1;g=v;b=p3;break;case 3:r=p1;g=p2;b=v;break;case 4:r=p3;g=p1;b=v;break;case 5:r=v;g=p1;b=p2;break}var rgb=$o.dec2hex(Math.floor(r*255)*65536+Math.floor(g*255)*256+Math.floor(b*255));if(hsv.a){return rgb+$o.dec2hex(Math.floor(hsv.a)).substr(4,5)}else{return rgb}},rgba2css:function(rgba){var c=parseInt("0x"+rgba.substring(1),16);if(rgba.length<=7){c=(c<<8)+70}return"rgba("+((c>>24)&255)+","+((c>>16)&255)+","+((c>>8)&255)+","+((c&255)/100)+")"},rgb2hsv:function(rgb){var hsv=({h:0,s:0,v:0});if(rgb.length>7){hsv.a=parseInt("0x"+rgb.substring(7),16)}rgb=parseInt("0x"+rgb.substring(1,7),16);var r=(rgb>>16),g=((rgb>>8)&255),b=(rgb&255);cmax=(r>=g)?r:g;if(b>cmax){cmax=b}cmin=(r<=g)?r:g;if(b<cmin){cmin=b}hsv.v=cmax/255;var c=cmax-cmin;hsv.s=(cmax==0)?0:c/cmax;if(hsv.s!=0){if(r==cmax){hsv.h=(g-b)/c}else{if(g==cmax){hsv.h=2+(b-r)/c}else{if(b==cmax){hsv.h=4+(r-g)/c}}}hsv.h*=60;if(hsv.h<0){hsv.h+=360}}return hsv},CoinRgb:function(v){s=0;maxCount=7;for(i=0;i<=maxCount;i++){if(CoinColorArray[i][0]>=v){s=i;break}}if((s>0)&&(s<=maxCount)){s--}else{if(v>=CoinColorArray[maxCount][0]){s=maxCount}}return CoinColorArray[s][1]},isIE6:function(){var vn=jQuery.browser.version.match(/\./),v=Math.floor(RegExp.leftContext);return((jQuery.browser.msie)&&(v<7))},imgCourt:function(w){if($o.isIE6()){w=(w)?w:"100%";jQuery(".oImgCourt").hover(function(){jQuery(this).height(w).addClass("oImgCourtHover")},function(){jQuery(this).removeClass("oImgCourtHover")})}},noIE:function(v){if(jQuery.browser.msie){return 0}else{return v}},contentsDir:{lastNo:null,lastDir:null,get:function(srvId,n){n=(n>>>12)+1;if($o.contentsDir.lastNo==n){return $o.contentsDir.lastDir}$o.contentsDir.lastNo=n;var ch="0123456789abcdefghijklmnopqrstuvwx",cd="",b=0;for(var i=0;i<4;i++){cd=ch.charAt(n&31)+cd;n>>>=5}$o.contentsDir.lastDir=$o.medDir+"cl"+srvId+"/fl"+cd+"/";return $o.contentsDir.lastDir},set:function(cont){var d=$o.contentsDir.get(cont.serverId,cont.contentId);$o.cntDir=d+"c/";$o.itmbDir=d+"i/";$o.tmbDir=d+"t/";return},file:function(cont){$o.cntDir=$o.contentsDir.get(cont.serverId,cont.contentId)+"c/";return $o.cntDir+cont.filename},ithumb:function(cont){$o.itmbDir=$o.contentsDir.get(cont.serverId,cont.contentId)+"i/";return $o.itmbDir+cont.filename},thumb:function(cont){$o.tmbDir=$o.contentsDir.get(cont.serverId,cont.contentId)+"t/";return $o.tmbDir+cont.filename}},coinUrlHash:function(){return(($o.root.no==0)?"o="+$o.tp.coinCd:"c="+$o.o.coinCd)+((jQuery().o.opt.cellCode>=0)?("&n="+jQuery().o.opt.cellCode):"")},bookmarkURL:function(){if(!jQuery().o.opt.bookmark){return}var r=jQuery().oURLParam();if((r.id==$o.o.coinCd)&&(r.n==jQuery().o.opt.cellCode)){return}$o.noChange=true;if($o.cnt.contentType==2){$o.makeLinkTag()}jQuery.historyLoad($o.coinUrlHash())},makeLinkTag:function(){var b=$o.srvPath+$o.baseDir;make("#oAtag_linkTop",$o.root[0],"o="+$o.root[0].coinCd);make("#oAtag_link",$o.o,$o.coinUrlHash());function make(id,o,para){var ct=o.contents,url=$o.srvPath+$o.baseDir+"infoplayer.do#"+para,f=$o.srvPath+$o.contentsDir.file(ct).replace("/c/","/t/"),i=$o.removeAllTag(o.titleInfo.match(/(.*?<br>)|(.*)/)[0]),t=(o.title.length<16)?o.title:(o.title.substring(0,15)+"..."),h=Math.floor(ct.height/3);var m=((120-h)>>1);i=(i.length<16)?i:(i.substring(0,15)+"...");jQuery(id).val((ct.contentType==2)?($o.jTmp._templates.ATagLink.get({URL:url,img:f,title:t,info:i,width:Math.floor(ct.width/3),height:h,margin:(m>0)?("margin:"+m+"px 0"):""},[],document.body)):"")}},searchCategory:function(n,id){if((n<1)||isNaN(n)){n=null}CoinCan.searchResult({mode:"c",lastcount:0,offset:0,param:n,limit:20,coinId:id},$o.buildSearchBody)},searchRound:{next:function(v){var n=$o.round.offset;jQuery("#oRound_"+n).removeClass("roundSelect");if(v=="init"){$o.round.offset=-1}else{if(v=="next"){n=(n<($o.round.length-1))?n+1:0}else{n=Number(v)}CoinCan.getRoundUrl($o.nowTop.coinCd,n,round)}function round(){jQuery("#oRound_"+n).addClass("roundSelect");$o.round.offset=n;$o.showLast=true;jQuery.historyLoad($o.round[n])}},init:function(){CoinCan.getRoundUrl($o.nowTop.coinCd,null,function(r){jQuery("#oRound_error").ifShow(r.length==0);$o.round=r;$o.round.offset=null;if((r==null)||(r.length==0)){return}for(var i=0;i<5;i++){jQuery("#oRound_"+i).ifShow(i<r.length).click(function(){$o.searchRound.next(jQuery(this).attr("id").match(/_(.)/)[1])})}$o.searchRound.next("init")})}},buildSearchBody:function(re){if(typeof(re.count)=="undefined"){jQuery("#thumbBody").empty();return}for(var i=0;i<re.results.length;i++){var r=re.results[i];var asp=Math.min(Math.min((112/r.width),(84/r.height)),1);r.no=i+1;r.w=r.width*asp;r.h=r.height*asp;r.fx=0;r.fy=i*116+3;r.x=(112-r.w)>>1;r.y=(84-r.h)>>1;r.filename=$o.contentsDir.file({serverId:r.serverId,contentId:r.contentId,filename:r.filename}).replace("/c/","/t/");r.hname=$o.toNanashi(r.hname)}jQuery("#thumbBody").processTemplate({result:re.results})},getCRChars:function(){var theAgent=navigator.userAgent;if(theAgent.indexOf("Win")>=0){return"\r\n"}else{if(theAgent.indexOf("Mac")>=0){return"\r"}else{return"\n;"}}},checkBlank:function(src){if(src.length==0){return 0}var reg=new RegExp($o.getCRChars()+"| |　");var ok=src.match(reg,"g");return src.replace(reg,"").length},checkInvalidTag:function(src,col){var b=(src.length!=$o.removeTag(src,col).length);return(b||$o.checkClosingTag(src))},checkClosingTag:function(src){var st=src.match(/<font /ig),ed=src.match(/<\/font>/ig);var b=(((st)?st.length:0)!=((ed)?ed.length:0));st=src.match(/<a /ig);ed=src.match(/<\/a>/ig);return b|(((st)?st.length:0)!=((ed)?ed.length:0))},checkURL:function(src){if(src.tag){var a=src.tag.match(/<a href="(http|https):\/\/[!#-9A-~]+\.+[\w\d\/%#$&?()~_.=+-:]+" target="_blank">.*?<\/a>/i)}else{var a=src.match(/(http|https):\/\/[!#-9A-~]+\.+[\w\d\/%#$&?()~_.=+-:]+/i)}return(a!=null)},br2cr:function(src){if(src){return src.replace(/<br>/g,$o.getCRChars())}else{return""}},cr2br:function(src){if(src){return src.replace(/\x0D\x0A|\x0D|\x0A/g,"<br>")}else{return""}},isPartsTag:function(src){return src.match(new RegExp($o.partsTag))},toNanashi:function(n){return((n==null)||(n==""))?"名無しさん":n},checkNanashi:function(n,md){var hn=$o.removeTag(n,$o.wizNew.colors);if(md){if(hn=="名無しさん"){hn=null}}else{hn=$o.toNanashi(hn);var cn=$o.countChrOnly(hn);if(cn.zenkaku>10){hn={err:"＊お名前は、 全角10文字まで。(現在全角"+cn.zenkaku+"字)<br>"}}}return hn},removeAllTag:function(src){if(src){return $o.trim(src.replace(/<.*?>/g,""))}else{return""}},removeTag:function(src,col){if(src){var reg=new RegExp($o.partsTag);var ok=src.match(reg,"g"),c=".*";src=src.replace(reg,"_xx_");if(typeof(col)=="object"){c="";jQuery.each(col,function(i,v){c+=((c=="")?"":"|")+"color:"+this+";"});c=c.replace(/\(/g,"\\(").replace(/\)/g,"\\)")}var reg2=new RegExp('<((?!/font)(?!font style="('+c+')")(?!br)(?!a href=".*" target="_blank">)(?!/a>)).*?>',"ig");src=src.replace(reg2,"");if(ok){src=src.replace(/_xx_/g,ok[0])}return $o.trim(src)}else{return""}},cookieWrite:function(k,dt,kd){if(!navigator.cookieEnabled){alert(";クッキーへの書き込みができません");return}var d=new Date(),d2;if(kd){d.setTime(d.getTime()+(kd*1000*60));d2=d.toGMTString()}else{d2="Tue, 1-Jan-2030 00:00:00 GMT;"}if(typeof(k)=="object"){document.cookie=k.key+"="+k.value+";expires="+d2}else{document.cookie=$o.root[0].contents.filename+"&"+k+"="+escape(dt)+";expires="+d2}},cookieRead:function(k){if(typeof(k)=="undefined"){return""}if(typeof(k)=="object"){k=k.key+"="}else{k=$o.root[0].contents.filename+"&"+k+"="}var dt="",ck=document.cookie+";";var start=ck.indexOf(k);if(start!=-1){dt=unescape(ck.substring(start+k.length,ck.indexOf(";",start)))}return dt},setFilter:function(){var jQf=jQuery("#oFilter_icons").empty(),id,tp=[],y=0,w=$o.type.swidth;for(var i in $o.filter.types){if(!tp[$o.filter.types[i].contentType]){tp[$o.filter.types[i].contentType]=$o.filter.types[i].typeCount}}for(var i=1;i<10;i++){id=$o.filter.chip[i];if(!((!$o.type.all)&&!(tp[id]))){jQf.append("<div id='oFilter"+i+"' onclick='$o.onFilterClick("+i+");' class='btnImg'><a title='"+$o.type[id].tip+"' ><img src='"+$o.type[id].s+"'></a></div>").children("div#oFilter"+i).css({position:"absolute",left:0,top:y,width:w,height:w,filter:"alpha(style=0, opacity=40)",opacity:"0.4"});$o.filter.no[id]=i;y+=w}}$o.filter.selected=null},onFilterClick:function(n){var f=$o.filter;if((n==null)||(n==f.selected)){var cd=$o.setFilterData();$o.refreshFilterButton();if(cd==-1){jQuery().o.cursor.jumpCellCode($o.filter.beforeCell)}}else{if(f.selected==null){$o.filter.beforeCell=jQuery().o.opt.cellCode}$o.refreshFilterButton(n);var cd=$o.setFilterData();jQuery().o.cursor.jumpCellCode(cd)}$o.showCell(true)},refreshFilterButton:function(n){var f=$o.filter;if(f.selected!=null){jQuery("#oFilter"+f.selected).oToggleEffect(false)}var jQr=jQuery("#oFilter_reset");if(n){jQuery("#oFilter"+n).oToggleEffect(true);f.type=$o.filter.chip[n];f.selected=n;f.length=1;jQr.oDivDialog({text:null,ok:"Search Off",okClick:function(){close();$o.showCell(true)}}).fadeIn($o.noIE("fast"))}else{close()}function close(){jQuery("#oFilter"+f.selected).oToggleEffect(false);$o.filter.type=null;$o.filter.selected=null;$o.filter.length=0;jQuery("#oFilter_reset").fadeOut($o.noIE("fast")).empty()}},onHistoryClick:function(self){$o.historySW=$o.toggleButton(self,{value:$o.historySW,toggle:true});jQuery().o.setHistory($o.historySW);$o.showCell(true)},onTargetClick:function(self){$o.targetSW=$o.toggleButton(self,{value:$o.targetSW,toggle:true});jQuery().o.target.show()},gridOnOff:function(md){var z=1,t=(md=="on"),o=jQuery("#oDisplay").offset(),dg=(t)?"enable":"disable";jQuery("#oModal").css({position:"absolute",left:-o.left,top:-o.top}).oModal((t)?"off":"grid");t=jQuery().o.grid.toggle(t);jQuery("#oTool_btnGridOn").ifShow(!t);jQuery("#oDisplay").draggable(dg);var c=jQuery().o.opt.cellCode;CoinCan.checkGridMode(t,$o.o.coinId,(c>=0)?((c)?0:c):-1,{async:false,timeout:4000})},cursorOnOff:function(){var z=1,md="off",onoff="OFF";if(jQuery().o.cursor.modal()){z=2001;md="grid";onoff="ON"}jQuery().oModal(md);var jQ=jQuery("#oTool_btnCursor").css("z-index",z).children("span").text(onoff)},playProgress:function(){var st=$o.player.status();if(!st){return}if(typeof($o.flash.externalplay)=="undefined"){$o.playPanel.refresh();return}if(typeof($o.flash.externalplay.playStatus)=="undefined"){$o.playPanel.refresh();return}var ok=(st.loadByte>=st.totalByte),pi=jQuery("a>.oPlayIndicatorPos",$o.jQPg);if($o.o.contentType==3){if(pi.isShow()!=ok){pi.ifShow(ok)}}if(!st.loaded){$o.playPanel.refresh();return}if(st.end){$o.playPanel.stop()}$o.playPanel.showStatus(st);if(typeof($o.jQPg.slider)!="undefined"){var p=((st.position==0)&&(st.duration==0))?0:(Math.floor((st.position/st.duration)*100));$o.jQPg.slider("option","value",p)}},playPanel:{open:function(){if($o.o.abone){return}if($o.jQp.css("display")!="none"){$o.playPanel.refresh()}clearInterval($o.interval);jQuery("#oPlay_btnPlay > img",$o.jQp).attr("src",$o.cssDir+"pause.gif");var w=$o.jQp.width(),jQv=jQuery("#oPlay_sliderVol",$o.jQp);$o.jQp.show("slide",{direction:"right"},200,function(){var v=jQv.slider("option","value");if(v!=30){jQv.slider("option","value",30,null,true)}$o.interval=setInterval("$o.playProgress()",1000);-$o.playPanel.refresh()})},showStatus:function(st){var h=$o.jQPg.height(),ld=Math.floor(h*(st.loadByte/st.totalByte));jQuery("#oPlay_loading",$o.jQp).css({bottom:0}).height(ld);jQuery("#oPlay_total",$o.jQp).html("Total<br>"+st.strDuration);jQuery("#oPlay_now",$o.jQp).html(st.strTime)},close:function(){clearInterval($o.interval);if($o.jQp.isShow()){if(typeof($o.flash.externalplay)!="undefined"){$o.flash.externalplay.mediaStop()}$o.jQp.hide("slide",{direction:"right"},200)}},refresh:function(){var jQv=jQuery("#oPlay_sliderVol",$o.jQp);if(typeof(jQv.slider)!="undefined"){jQv.slider("option","value",30)}if(typeof($o.jQPg.slider)!="undefined"){$o.jQPg.slider("option","value",0).innerShow()}jQuery("#oPlay_total",$o.jQp).html("Total<br>00:00");jQuery("#oPlay_now",$o.jQp).html("00:00")},stop:function(){if(typeof($o.flash.externalplay)!="undefined"){if((typeof($o.flash.externalplay.mediaStop)=="undefined")){return}var st=$o.flash.externalplay.mediaStop();$o.playPanel.showStatus(st)}jQuery("#oPlay_btnPlay > img",$o.jQp).attr("src",$o.cssDir+"play.gif");$o.jQPg.slider("option","value",100,null,true)}},getCellCd:function(){return jQuery().o.opt.cellCode},scrollTo:function(u,sc){var sl=(typeof(sc.slider)=="object"),fw=sc.frameDiv.width(),fh=sc.frameDiv.height(),tp=sc.viewDiv.attr("offsetTop"),max=(typeof(sc.maxValue)=="number")?sc.maxValue:((sl)?sc.slider.slider("option","max"):100),ui=(typeof(u.value)!="undefined"),n=(ui)?u.value:u;if(typeof(sc.vertical)=="undefined"){sc.vertical=(sc.slider.slider("option","orientation")=="vertical")}if(sc.vertical){var vh=sc.viewDiv.height(),h=vh-(fh>>1);if((fh>=vh)&&((ui)||(sc.vector))){return}if((sc.toLast)&&(vh>fh)){n=max;sc.slider.show()}else{if(sc.vector){n=max-sc.slider.slider("option","value")-32/(h/max)*sc.vector}}if(ui){n=max-n}if((n<0)||(fh>=vh)){n=0}if(n>max){n=max}if(sl){sc.slider.slider("option","value",max-n,null,true)}n=Math.floor(n*(h/max));if(tp==n){return}if(sc.animate>0){sc.viewDiv.css({position:"absolute"}).animate({top:(-n)},sc.animate,null,function(){if(jQuery.isFunction(sc.animeEnd)){sc.animeEnd()}})}else{sc.viewDiv.css({position:"absolute",top:(-n)});if(jQuery.isFunction(sc.animeEnd)){sc.animeEnd()}}}else{var vw=sc.viewDiv.width(),w=vw-(fw>>1);if(max>0){if(sc.nextWidth>0){w=fw+Math.floor((vw-fw)/sc.nextWidth)*sc.nextWidth-sc.nextWidth}sc.slider.slider("option","value",100,null);n=Math.floor(n*(w/max))}else{var ww=n-fw;if(sc.nextWidth>0){n=(ww>0)?fw+Math.floor(ww/sc.nextWidth)*sc.nextWidth-sc.nextWidth:0}}if(n<0){n=0}if(sc.animate>0){sc.viewDiv.animate({left:(-n),clip:"rect(0px "+(n+fw)+"px "+fh+"px "+n+"px)"},sc.animate,function(){if(jQuery.isFunction(sc.animeEnd)){sc.animeEnd()}})}else{sc.viewDiv.css({left:(-n),clip:"rect(0px "+(n+fw)+"px "+fh+"px "+n+"px)"})}if(jQuery.isFunction(sc.animeEnd)){sc.animeEnd()}}},titleScroll:function(v,fn){if(v==null){$o.titleScrolling=null;$o.jQTV.stop().queue([]);return}if(($o.titleScrolling==v)||(($o.titleScrolling==0)&&(v<0))){return}var y=$o.titleY,vy=$o.titleY+v;if(vy==$o.titleY){return}if(v==0){$o.titleY=0;p.animate=null}else{var p={vertical:true,animate:100,frameDiv:$o.jQTF,viewDiv:$o.jQTV},fh=p.frameDiv.height(),vh=p.viewDiv.height(),eh=vh-(fh>>1);if((fh>vh)||(vy>eh)){return}$o.titleScrolling=(v>0)?1:-1;$o.titleY=vy;if(jQuery.isFunction(fn)){p.animate=250;p.animeEnd=function(){$o.titliScrolling=null;fn()}}}$o.scrollTo($o.titleY,p);if($o.titleY<0){$o.titleY=0}},checkSelect:function(){var noSel=(isNaN(jQuery().o.opt.cellCode)||(jQuery().o.opt.cellCode<0));if(noSel){jQuery().oDialog("error","セルが選択されていません","セルを選択してから、行なってください。",$o._.ok)}return noSel},getServerStatus:function(fn){CoinCan.getServerStatus(function(status){$o.serverStatus=status;if(jQuery.isFunction(fn)){fn(status)}})},checkReadOnly:function(fnYes,fnNo){$o.getServerStatus(function(status){if(status.readOnly==1){jQuery("#oServer_status").html("閲覧専用モード運営中").show();if(fnYes!="noDialog"){jQuery().oDialog("error","現在、閲覧専用モードで運営中です","現在、新しい情報を登録できません。<br>InfoPlayerの閲覧のみご利用可能です。",$o._.ok,function(){if(jQuery.isFunction(fnYes)){fnYes()}})}}else{jQuery("#oServer_status").empty().hide();if(jQuery.isFunction(fnNo)){fnNo()}}})},isNotFound:function(no,cd,modal){var nt=(typeof(no)=="number")?(!no):((!no)||(cd.match(/[^\-\+0-9A-Za-z]/)||(cd.length!=11))),fn=null,ok=$o._.ok;if(modal){ok="Site Topへ戻る";fn=function(){jQuery("#oArea,#oDisplay").hide();location.href="siteTop.do"}}if(nt){jQuery().oDialog("error","このStarting IDは、ありません","指定されたStarting ID( "+cd+" )は、<br>サーバ上から削除されたか、見つかりませんでした。<br>正しいStarting IDを指定してください。",ok,fn)}return nt},toggleButton:function(jQ,sw){if(sw.toggle){sw.value=!sw.value}jQ.oToggleEffect(sw.value);return sw.value},onWindowLoad:function(e){this.windowLoaded=true},addInfo:function(coin,func){$o.jQLd.oAjaxMon();var txt,info={},hn,cell=($o.wizNew.addcell)?$o.wizNew.cell:cell={coinId:$o.o.coinId,cellCode:jQuery().o.opt.cellCode};var fn=function(coinInfo){$o.jQLd.oAjaxMon();if(coinInfo.coinCellId==-1){jQuery().oDialog("error","セルか作成できませんでした","セルの追加で指定した場所に、既に他の方がセルを配置したため、<br>情報を書き込めませんでした。<br>そのセルに情報を書き直すか、別の場所にセルを追加し直してください。",$o._.yes,function(){$o.wizEntry.close();return});return}$o.cache[$o.o.coinId].cellCode=cell.cellCode;$o.entry=true;$o.showCell(function(){$o.showLast=true;if(jQuery.isFunction(func)){func()}})};if(coin==null){if((!$o.wizNew.addcell)&&(jQuery().o.opt.cellCode==-1)){jQuery("#oInfoW_error").addClass("oAlert").html($o._.errCellUnselection);return}txt=$o.removeTag(document.frmInfoText.text.value,$o.wizNew.colors);info={subCoinId:$o.o.coinId,information:$o.cr2br(txt),contentType:0,hname:$o.wizNew.hname};if((txt.match(/<a .*<\/a>/))||($o.isPartsTag(txt))){info.contentType=1}if(info.information.length!=0){$o.jQLd.oAjaxMon($o._.saving,true);if($o.editInfoNo==null){CoinCan.addInfo(cell,info,fn)}else{info.coinInfoId=$o.nowInfos[$o.editInfoNo].coinInfoId;CoinCan.updateInfo(info,fn)}}else{jQuery().oDialog("error","非対応のテキスト情報は書き込めません","InfoPlayerに非対応のテキスト情報を書き込もうとしたので、キャンセルしました。",$o._.yes,function(){$o.wizEntry.close();return})}}else{info={subCoinId:coin.coinId,information:coIn.title,contentType:$o.wizNew.uploadInfo.contentType,hname:$o.wizNew.hname};$o.jQLd.oAjaxMon($o._.saving,true);CoinCan.addInfo(cell,info,fn)}},wizEntry:function(mode,opt,closefn){jQuery.extend($o.wizEntry,{close:function(md,refresh){diagClose(md,refresh)}});var defuse={6:0,2:1},isRpl=(mode=="replace"||mode=="subrpl"),cp=(mode=="new")?2:$o.root[$o.root.no].contents.contentType,tp={2:"img",3:"snd",4:"mov",5:"swf",6:"pdf"},dm=((mode=="txt")||(mode=="img")||(mode=="snd"||(mode=="mov")||(mode=="swf")||(mode=="pdf")||isRpl));if(jQuery.isFunction(opt)){var closefn=opt;var opt={use:defuse}}else{if(typeof(opt)!="object"){var opt={use:defuse}}}$o.playPanel.stop();if(((!mode)&&(!$o.wizNew.addcell))||(dm&&!isRpl)){if($o.checkSelect()){return}}if(typeof(mode)=="undefined"){mode=""}var cellcd=jQuery().o.opt.cellCode,tmp,jQW=jQuery("#oWizard"),fntMode={b:false,i:false},fntRGB=null;if($o.wizNew.addcell){tmp=$o.clone($o.wizNew.cell)}$o.wizNew={mode:mode,wizard:false,hasParam:true,sending:false,addcell:($o.wizNew.addcell==true),step:1,srcCellId:null,destCellId:null,modal:["on","on","on","on","on"],cellCode:cellcd,height:[(mode=="new")?216:198],cell:tmp,direct:dm,type:null,closefn:closefn};jQW.html($o.jTmp._templates.entry_wiz.get({mode:mode,typeName:$o.type[cp].tip,direct:$o.wizNew.direct,use:opt.use},[],document.body)).oDecoButton().hide();delete (h);jQuery("#oInfoW_CellCode").html("Cell No."+jQuery().o.grid.getCellNo());var jQSt=jQuery("#oWiz_step",jQW);if(mode=="replace"){$o.wizNew.hasParam=false;setUpload(cp);return}if(mode=="subrpl"){$o.wizNew.hasParam=false;setUpload(2);return}jQuery("#oInfoW_btnText").click(function(){setText()});jQuery("#oInfoW_btnImage,#oInfoW_btnEntry").click(function(){setUpload(2)});jQuery("#oInfoW_btnSound").click(function(){setUpload(3)});jQuery("#oInfoW_btnMovie").click(function(){setUpload(4)});jQuery("#oInfoW_btnSwf").click(function(){setUpload(5)});jQuery("#oInfoW_btnPdf").click(function(){setUpload(6)});jQuery("#oInfoW_btnBanner").click(function(){setUpload(7)});jQuery("#oInfoW_btnMenuCancel ").click(function(){diagClose("esc")});switch(mode){case"txt":setText();break;case"img":setUpload(2);break;case"snd":setUpload(3);break;case"mov":setUpload(4);break;case"swf":setUpload(5);break;case"pdf":setUpload(6);break;case"banner":setUpload(6);break;default:jQW.oWizard(null,1,$o.wizNew)}function diagClose(md,refresh){jQW.find(".oDisable").show();jQW.fadeOut($o.noIE(200),function(){jQuery(this).empty()});if($o.wizNew.addcell){$o.wizAddCell.close("wesc");return}$o.wizNew.step=0;if(md=="esc"){$o.cancelInfo()}if(refresh){$o.showCell()}}function setText(){$o.wizNew.type=0;jQSt.html($o.jTmp._templates.text_step.get({type:0,typeName:$o.type[0].tip,direct:$o.wizNew.direct},[],document.body)).oDecoButton();var d=($o.wizNew.direct)?-24:0;$o.wizNew.height=[(mode=="new")?216:198,214+d,165+d,400+d,400+d];document.frmInfoText.hname.value=$o.wizNew.hname=$o.toNanashi("");jQuery("#oInfoW_btnWrite",jQSt).click(function(){if(!$o.validateText()){jQW.oWizard(2,3,$o.wizNew)}});jQuery("#oInfoW_btnURL",jQSt).click(function(){jQW.oWizard(2,5,$o.wizNew)});jQuery("#oInfoW_btnFont",jQSt).click(function(){jQW.oWizard(2,4,$o.wizNew)});jQuery("#oInfoW_btnCancel",jQSt).click(function(){if($o.wizNew.direct){diagClose("esc")}else{jQW.oWizardBack(2,1,$o.wizNew)}});jQuery(".oHide").hide();jQuery(".btnEsc").click(function(){diagClose("esc")});jQuery(".oDiag_btnDoneCancel",jQSt).click(function(){jQW.oWizardBack(3,2,$o.wizNew)});jQuery(".oDiag_btnDone",jQSt).click(function(){if($o.wizNew.sending){return}$o.wizNew.sending=true;$o.wizNew.hname=$o.checkNanashi(document.frmInfoText.hname.value,true);jQuery(".buttonLine",jQW).oInputDisable(true);$o.addInfo(null,function(){diagClose()})});jQuery("#oUpload_theme",jQSt).ifShow($o.wizNew.mode!="new");jQuery("#oURL_btnClose",jQSt).click(function(){jQW.oWizardBack(5,2,$o.wizNew)});jQuery("#oURL_btnMake",jQSt).click(function(){var url=$o.removeAllTag(document.frmURL.url.value).replace(/\x0D|\x0A| /g,""),txt=document.frmURL.text.value,mess="";if(!url.match(/^http:\/\//)){url="http://"+url}if(!$o.checkBlank(txt)){mess+="＊表示文を必ず記載してください。<br>"}if(!$o.checkURL(url)){mess+="＊正しいURLを記載してください。<br>"}if(mess){jQuery("#oURL_err",jQSt).html(mess).show();jQuery("#oURL_tagA",jQSt).empty()}else{jQuery("#oURL_err",jQSt).empty().hide();jQuery("#oURL_tagA",jQSt).text('<a href="'+url+'" target="_blank">'+txt+"</a>")}});setFont();jQW.oWizard(($o.wizNew.direct)?null:1,2,$o.wizNew)}function setFont(){jQuery("#oFont_B",jQW).oToggleEffect(false).click(function(){fntMode.b=$o.toggleButton(jQuery(this),{value:fntMode.b,toggle:true})});jQuery("#oFont_I",jQW).oToggleEffect(false).click(function(){fntMode.i=$o.toggleButton(jQuery(this),{value:fntMode.i,toggle:true})});var jQC=jQuery("#oFont_RGB",jQW),jQA=jQuery("#oFont_tag",jQW);jQuery("oFont_err",jQW).html("");jQuery("#oFont_btnMake",jQW).click(make);jQuery("#oFont_btnClose",jQW).click(function(){jQW.oWizardBack(4,2,$o.wizNew)});$o.wizNew.colors=jQuery(".oFontCol",jQC).click(color).map(function(){return jQuery(this).css("background-color")});function color(){jQuery(".oFontCol",jQC).css("border-color","#111");var clkRGB=jQuery(this).css("background-color");if(clkRGB!=fntRGB){fntRGB=clkRGB;jQuery(this).css("border-color","#AAA")}else{fntRGB=null}}function make(){var err=null,style="";if(fntMode.b){style="font-weight:bold;"}if(fntMode.i){style+="font-style:oblique;"}if(fntRGB!=null){style+="color:"+fntRGB+";"}if(err){jQuery("#oFont_err").html(err);return}var tag=$o.removeAllTag(document.frmFont.text.value);if(style){tag='<font style="'+style+'">'+tag+"</font>"}jQA.text(tag)}}function setUpload(type){$o.wizNew.type=type;$o.wizNew.ext=(type==2)?$o.ext[0]+","+$o.ext[1]:$o.ext[type];$o.wizNew.hname=$o.toNanashi("");var ext="「"+((type==2)?$o.ext[0]+"」、「"+$o.ext[1]:$o.ext[type])+"」",d=($o.wizNew.direct)?-24:0;jQSt.html($o.jTmp._templates.upload_step.get({mode:$o.wizNew.mode,type:type,typeName:$o.type[type].tip,ext:ext,direct:$o.wizNew.direct},[],document.body)).oDecoButton();jQSt.oInputDisable(true);var m=["格子状の配置","位置と大きさを自由に指定してセル作成","画像自体が一つのセルになる"];$o.wizNew.height=[216,((type==2)?412:((type==3)?440:414))+d,208+d,136];var ah=(type==3)?245:218;switch(mode){case"new":$o.wizNew.height=[216,456,200+d,340];ah=263;break;case"replace":case"subrpl":$o.wizNew.height[1]=255+d;ah=59;break}jQuery("#oUpload_area").height(ah);$o.wizNew.grid=0;jQuery("#oUpload_btnCancel",jQSt).click(function(){if($o.wizNew.direct){diagClose("esc")}else{jQW.oWizardBack(2,1,$o.wizNew)}});var ini="＊右の「ファイル選択」で登録ファイルを指定→→→";document.frmUpload.filename.value=ini;jQuery("#oUpload_inpFile").change(function(){document.frmUpload.filename.value=document.frmUpload.file.value});if(type==7){document.frmUpload.banner.value=""}if(type==3){document.frmUpload.subfilename.value=ini;jQuery("#oUpload_inpSub",jQSt).change(function(){document.frmUpload.subfilename.value=document.frmUpload.subfile.value});jQuery("#oUpload_sub").addClass(($o.wizNew.direct)?"oSubDirect":"oSubNew")}if(type==2){jQuery("#oUpload_btnGridNormal",jQSt).oToggleEffect(true).click(function(){$o.wizNew.grid=0;jQuery(this).oToggleEffect(true);jQuery("#oUpload_btnGridFree").oToggleEffect(false);jQuery("#oUpload_btnGridOneCell").oToggleEffect(false);jQuery("#oUpload_btnGridInfo").html(m[0])});jQuery("#oUpload_btnGridFree",jQSt).oToggleEffect(false).click(function(){$o.wizNew.grid=-1;jQuery(this).oToggleEffect(true);jQuery("#oUpload_btnGridNormal").oToggleEffect(false);jQuery("#oUpload_btnGridOneCell").oToggleEffect(false);jQuery("#oUpload_btnGridInfo").html(m[1])});jQuery("#oUpload_btnGridOneCell",jQSt).oToggleEffect(false).click(function(){$o.wizNew.grid=1;jQuery(this).oToggleEffect(true);jQuery("#oUpload_btnGridNormal").oToggleEffect(false);jQuery("#oUpload_btnGridFree").oToggleEffect(false);jQuery("#oUpload_btnGridInfo").html(m[2])});jQuery("#oUpload_btnGridInfo").html(m[0])}else{jQuery("#oUpload_btnGridOneCell",jQSt).oToggleEffect(true);jQuery("#oUpload_btnGridInfo").html(m[2])}jQuery("#oUpload_btnUpload").click(function(){var fpath,fname,text,nw=($o.wizNew.mode=="new"),frm=document.frmUpload;if(type==7){fpath=null;fname=null;text=frm.banner.value;fname}else{fpath=frm.file.value;fname=fpath.split(/[\\\/]/).pop();text=null}frm.type.value=type;if($o.validateUpload(jQW,$o.wizNew.type,$o.wizNew.ext)){return}if($o.wizNew.sending){return}jQuery(".buttonLine",jQW).oInputDisable(true);jQuery.extend($o.wizNew,{hname:$o.checkNanashi(frm.hname.value,true),themeCd:(nw)?$o.themeCd(frm):0,categoryId:(nw)?Number(frm.category.value):0,sending:true,filename:fname,text:text});if($o.wizNew.hasParam){$o.wizNew.title=$o.maxLength($o.removeAllTag(frm.title.value),25);$o.wizNew.titleInfo=$o.cr2br($o.maxLength($o.removeAllTag($o.trim(frm.info.value)),200))}var fm="#oUpload_form";if(type==7){var tmp=jQuery("body").append('<div id="oTemp" style="position:absolute;filter:alpha(style=0,opacity=0);opacity:0;">'+document.frmUpload.banner.value+"</div>").find("#oTemp");frm.width.value=tmp.width();frm.height.value=tmp.height();tmp.remove();send()}else{send()}function send(){jQuery(fm,jQSt).unbind("submit").submit(function(){$o.startProgress()}).submit();jQW.oWizard(2,3,$o.wizNew)}});jQuery("#oUpload_btnDone").click(function(){if($o.wizNew.mode=="new"){location.href=$o.newUrl+$o.tp.coinCd}else{diagClose()}});if(jQuery.browser.msie){jQuery("#oUpload_txtTitle input").attr("maxlength","50")}jQuery(".oHide").hide();jQuery(".btnEsc").click(function(){diagClose("esc")});jQW.oWizard(($o.wizNew.direct)?null:1,2,$o.wizNew)}},validateText:function(){var jQerr=jQuery("#oInfoW_error").empty(),mess="",text=$o.trim(document.frmInfoText.text.value),hn=$o.checkNanashi(document.frmInfoText.hname.value);document.frmInfoText.text.value=text;if(typeof(hn)=="object"){mess+=hn.err}else{document.frmInfoText.hname.value=hn}text=$o.removeTag(text,$o.wizNew.colors);var a=text.match(/<a.*?>/ig),r=text.match(/href *= *["|']/ig);var al=(a)?a.length:0,rl=(r)?r.length:0;var cl=$o.checkClosingTag(text);var ch=$o.countChrOnly(text);if((document.frmInfoText.text.value!=text)||((al==0)&&(rl>=1))||(cl)){mess+="＊InfoPlayer非対応のタグが記載されています。<br>"}else{if(text.length==0){mess+="＊情報は、必ず記載してください。<br>"}}if(ch.zenkaku>180){mess+="＊記載文字は、 全角180文字まで。(現在全角"+ch.zenkaku+"字)"}if((al>1)||(rl>1)){mess+="＊<a>タグは、１つだけ記載できます。(現在"+Math.max(al,rl)+"つ)<br>"}if((al==1)&&(rl==1)){if(!$o.checkURL({tag:text})){mess+="＊正しいURLを記載してください。<br>"}}jQerr.html(mess).ifShow(mess!="");return(mess!="")},validateUpload:function(jQV,md,arr){if(!arr){var ckext=$o.ext}else{var ckext=arr.split(",")}var jQerr=jQuery("#oUpload_error",jQV),mess="",t="タイトル名",ti="タイトル情報",file,ext,hn=$o.checkNanashi(document.frmUpload.hname.value);if(typeof(hn)=="object"){mess+=hn.err}else{document.frmUpload.hname.value=hn}jQerr.empty();if(md==7){if(document.frmUpload.banner.value==""){mess="＊バナー用タグは、必ず記入して下さい。<br>"}}else{file=document.frmUpload.file.value;if(file==""){mess="＊ファイルを必ず選択して下さい。<br>"}else{ext=$o.fileExt(file);if(ext.length==0){mess+="＊このファイルは登録できない種類です。<br>"}else{if(jQuery.inArray(ext,ckext)==-1){mess+="＊このファイルは登録できない種類です。<br>"}}}}if(md==3){var sub=document.frmUpload.subfile.value;if(sub){var subext=sub.match(/\..*$/);subext=subext[0].substr(1).toLowerCase();if((subext!=$o.ext[0])&&(subext!=$o.ext[1])){mess+="＊背景画像が登録できないファイル形式です。<br>"}}}var wk="",title,info;if($o.wizNew.hasParam){title=document.frmUpload.title.value;info=document.frmUpload.info.value;if(title==""){wk=t}if(info==""){wk+=(wk!="")?"、"+ti:""+ti}if($o.countChrOnly(title).zenkaku>25){mess+="＊タイトル名は全角２５文字以内にしてください。<br>"}if($o.countChrOnly(info).zenkaku>200){mess+="＊タイトル情報は、全角２００文字以内にしてください。<br>"}if(wk){mess+="＊"+wk+"を必ず入力してください。<br>"}wk="";if(title.match(/<.*?>/)){wk=t}if(info.match(/<.*?>/)){wk+=(wk!="")?"、":""+ti}}if(wk){mess+="＊"+wk+"内のHTMLタグは、削除してください。<br>"}if($o.wizNew.mode=="new"){var e=(document.frmUpload.category.value=="")?"カテゴリ":"";var et=(($o.wizNew.themeCd==0)?"テーマ":"");e=e+(((e!="")&&(et!=""))?"と":"")+et;if(e){mess+="＊"+e+"は、必ず"+((et=="")?"":"全て")+"選択してください。<br>"}}jQerr.html(mess);if(mess!=""){jQerr.fadeIn("slow")}return(mess!="")},hasSubContent:function(){return($o.wizNew.type==3)&&(document.frmUploadSub.file.value)},startProgress:function(){jQuery("#oUpload_prtTitle").html($o.wizNew.title);jQuery("#oUpload_prtInfo").html($o.wizNew.titleInfo);jQuery("#oUpload_prtFile").html($o.wizNew.filename);jQuery("#oUpload_progressBar").show("slow");jQuery("#oUpload_progressBarText").html("upload in progress: 0%");jQuery("#oUpload_progressBarText").setTemplate("upload in progress:{$T.a}%");setTimeout("$o.refreshProgress()",1000);return true},refreshProgress:function(){CoinCan.getStatus($o.updateProgress)},updateProgress:function(uploadInfo){if($o.wizNew.error){return}if(uploadInfo.status=="error"){$o.wizNew.error=true;var err=uploadInfo.message.match(/server:(.*)#/);err=(err==null)?"0":Number(err[1]);switch(err){case 0:err="現在、登録できません。<br>しばらくたった後、再度お試しください。";break;case 1:case"2":err="アップロード中にエラーが起きました。<br>しばらくたった後、再度お試しください。";break;case 3:err="未対応のファイル形式です。<br>ファイルをアップロードし直してください。";break;case 4:err="不正なファイルがアップロードされました。<br>登録をキャンセルします。";break;case 5:err="規定より大きいサイズのファイルがアップロードされました。<br>登録をキャンセルします。";break;default:err=uploadInfo.message;break}jQuery().oDialog("error","ファイルアップロードエラー",err,"OK");$o.wizEntry.close("esc");$o.wizNew.sending=false;return}var progressPercent=Math.ceil((uploadInfo.bytesRead/uploadInfo.totalSize)*100);var timeInSeconds=uploadInfo.elapsedTimeInSeconds;var uploadRate=Math.round(uploadInfo.bytesRead/(timeInSeconds+0.00001)/1024);var estimatedRuntime=uploadInfo.totalSize/(uploadRate+0.00001);if(isNaN(progressPercent)){progressPercent=0}jQuery("#oUpload_progressBarText").processTemplate({a:progressPercent});jQuery("#oUpload_progressBarBoxContent").animate({display:"block",width:progressPercent+"%"},1000);if(uploadInfo.status=="dbready"){$o.wizNew.uploadInfo=uploadInfo;switch($o.wizNew.mode){case"new":jQuery().o.cursor.visible=$o.wizNew.cursor;$o.createTopCoin(exitProgress);break;case"replace":case"sub":case"subrpl":$o.jQLd.oAjaxMon($o._.saving,true);exitProgress();return true;break;default:$o.jQLd.oAjaxMon($o._.saving,true);CoinCan.addCoin($o.setNewCoin(),function(coin){$o.addInfo(coin,exitProgress)})}}else{setTimeout("$o.refreshProgress()",1000)}return true;function exitProgress(){jQuery("#oWizard").oWizard(3,4,$o.wizNew);if(jQuery.isFunction($o.wizNew.closefn)){$o.wizNew.closefn()}}},infoWrite:function(){$o.checkReadOnly(null,function(){$o.wizEntry()})}}})();(function(){jQuery.extend({inherit:function(subClass,superClass){function copy_undef_properties(src,dest){for(var prop in src){if(typeof(dest[prop])=="undefined"){dest[prop]=src[prop]}}}copy_undef_properties(superClass.prototype,subClass.prototype)},isIE6:function(){var vn=jQuery.browser.version.match(/\./),v=Math.floor(RegExp.leftContext);return((jQuery.browser.msie)&&(v<7))}});jQuery.fn.extend({oLoadTemplate:function(url){if(!$o){$o=null}if(!url){url="template/dialog.tpl"}url=location.pathname.match(/\/.*?\//)[0]+url;$o.jTmp=jQuery.createTemplateURL(url,null,{filter_data:false});jQuery(this).setTemplateURL(url).processTemplate();$o._=eval("({"+$o.jTmp._templates.language.get({},{},document.body)+"})");return this},innerShow:function(sl){if(!jQuery(this).show().is(":has(.ui-slider-inner)")){var hl=jQuery(".ui-slider-handle",this).wrap("<div class='ui-slider-inner'></div>");var inner=jQuery(".ui-slider-inner",this);if(jQuery(this).height()>jQuery(this).width()){inner.css({top:hl.height()}).height(inner.height()-hl.height())}else{inner.width(inner.width()-hl.width())}}return this},oWordSelect:function(e,ui,fn){if(jQuery(e.target).is("input,textarea,select")){return}var win,key;if(jQuery.browser.msie){window.focus();sel=document.selection.createRange();key=sel.text;sel.setEndPoint("EndToStart",sel);sel.select()}else{sel=(jQuery.browser.opera)?document.getSelection():window.getSelection();key=(sel.rangeCount==0)?"":sel.getRangeAt(0).toString();sel.collapse(document.body,0)}if(key!=""){key=key.replace(/<.*?>/g,"");if(key.length>40){return}_o.player.div.hide();var jQW=jQuery("#oWizard");var jQR=jQuery(".wsResult",jQW);if(typeof($wS)=="undefined"){$wS=jQuery.createTemplateURL($o.baseDir+"template/wordsearch.tpl",null,{filter_data:false})}jQW.setTemplate($wS);jQuery("input",jQW).mouseup(function(){return null});CoinCan.getSearchResult(key,function(result){result.keyword=key;jQW.processTemplate(result).oDecoButton().oWizard(null,1,{mode:"",step:1,modal:["on"],width:478,height:[400]},function(){});jQuery("#oWS_btnSearch").click(function(){key=document.frmKeySearch.keyword.value;CoinCan.getSearchResult(key,function(result){showResult(result)})});jQuery("#oWS_btnClose").click(function(){jQW.oWizard("close")});jQuery("#oWS_btnSite").click(function(){window.open(result.searchEngineUrl,null,"")});showResult(result)})}function showResult(result){jQuery(".wsResult",jQW).html($wS._templates.result.get(result,[],document.body)).oDecoButton()}},oHelpLayer:function(cd,opt,fn){var self=jQuery(this);if(!cd){cd=self.attr("id")}if(cd==null){return}if(typeof($hl)!="undefined"){show(cd,fn);return}if(typeof($o)=="undefined"){new coIn()}$hl=jQuery("#oHLayer_window");if($hl.length==0){$hl=jQuery("body").append('<div id="oHLayer" class="oHLayer"><div id="oModal" class="oHLayerModal"></div><div id="oHLayer_window" class="oHLayerWindow"><div id="oHLayer_disp"></div></div></div>').find("#oHLayer_window");$hl.layer=jQuery("#oHLayer").hide();$hl.disp=jQuery("#oHLayer_disp",$hl.layer);if((!opt)||(opt.mode!="keep")){jQuery(".oHLayerClose",$hl).click(function(){jQuery($hl).fadeOut(100,function(){jQuery($hl.layer).remove()});B(false)})}}show(cd,fn);function show(cd,fn){CoinCan.getHLayer(cd,function(hl){if(hl==null){jQuery($hl.layer).remove();return}$hl.data=hl;var output="",ei=hl.infos,el=ei.length-1;for(var n=0;n<=el;n++){var i=ei[n];output+='<div id="hlText'+i.hlayerInfoId+'" class="hlText '+((i.button)?("oHLayer"+i.button):"")+'" style="position:absolute;left:'+i.xpx+"px;top:"+i.ypx+'px;">'+i.information+"</div>"}$hl.disp.html(output);$hl.find(".oHLayerClose").click(function(){$hl.layer.fadeOut(100).remove();delete ($hl)}).oBlink();$hl.css({left:hl.leftMargin});if(typeof($hl.layer)!="undefined"){jQuery("#oHLayer .oHLayerModal").width(jQuery(window).width()).height(jQuery(window).height());$hl.layer.fadeIn($o.noIE(180))}if(jQuery.isFunction(fn)){fn()}})}},oEnquete:function(opt){var self=jQuery(this),cd,md=null,jQW;if(self.hasClass("oEqButton")){md="float";var jQL=jQuery("#oAEq_layer"),jAE=self.parents(".oEq"),o=jAE.offset(),dis="oEqDisable";if(jAE.length==0){return this}if(typeof($o)=="undefined"){new coIn()}if(jQL.length==0){jQL=jQuery("body").append("<div id='oAEq_layer'></div>").find("#oAEq_layer")}var tpl=jQuery.createTemplateURL("/ip/template/anywhereenquete.tpl",null,{filter_data:false});jQL.setTemplate(tpl);var opt={cd:jAE.attr("id")}}CoinCan.getEnquete(opt.cd,function(enq){for(var n=5;n>0;n--){if(enq.choices[n].choice!=""){break}}if(md=="float"){jQL.processTemplate(enq).oModal("on").oDecoButton();fm=document.frmAEnquete;jQW=jQuery(".oEqWindow",jQL);jQuery("#oAEq_area").css({left:o.left,top:o.top}).width(jAE.width()).height(jAE.height());var wd=jQuery(window),y=wd.scrollTop()+((wd.height()-jQW.height())>>1),x=(wd.width()-jQW.width())>>1;jQW.height(jQW.height()-(5-n)*20).css({left:x,top:y})}else{jQW=self.html($o.jTmp._templates.enquete.get(enq,[],document.body)).oDecoButton();fm=document.frmEnquete}jQP=jQuery(".oEqBtnPost",jQW).addClass(dis);jQW.find(".oEqChoice").click(function(e){jQuery(this).parent().find(".oEqChoice").removeClass("oEqChoiceOn").end().end().addClass("oEqChoiceOn");jQP.removeClass(dis);var n=Number(jQuery("input",this).attr("value"))-1;fm.answare[n].checked=true}).end().find(".oEqBtnClose").click(function(){close()}).end().find(".oEqBtnPost").click(function(){if(!jQW.hasClass(dis)){post(enq)}}).end();if($o.cookieRead({key:"enq_"+enq.enqueteId})){jQW.oDivDialog({text:"このアンケートは回答済です。<br>ご協力ありがとうございました。<p>",ok:$o._.ok,okClick:function(){close()}})}if(md!="float"){$o.commPanel.show(365,jQW)}});function post(enq){for(var n=0;n<6;n++){if(fm.answare[n].checked){break}}jQuery().oDialog("keep","アンケート送信","アンケートの回答を送信しますか？",$o._.yes,function(){CoinCan.postEnquete({enqueteId:enq.enqueteId,choiceId:enq.choices[n].choiceId},function(){$o.cookieWrite({key:"enq_"+enq.enqueteId},"true");jQuery().oDialog("","アンケート送信完了","アンケート結果を受け取りました。<br>ご協力ありがとうございました。",$o._.ok,function(){close()})})},$o._.cancel)}function close(){if(md=="float"){jQL.oWizard("close").remove();delete $aE}else{$o.commPanel.hide()}}},oDivDialog:function(opt){var self=this;if(opt=="close"){jQuery(".oModalDiv",self).remove();return self}var opt=jQuery.extend({text:"",ok:"確認",okfn:null},opt);if(jQuery(".oModalDiv",self).length==0){self.append($o.jTmp._templates.divDialog.get({text:opt.text,button:opt.ok},[],document.body))}var d=jQuery(".oModalDiv",jQuery(self)).show();if(opt.okClick){d.find(".oDivDiagBtnOK").click(function(){opt.okClick();jQuery(".oModalDiv",self).remove();return self})}return self},ifShow:function(ck,speed,fn){if(ck){jQuery(this).show(speed,fn)}else{jQuery(this).hide(speed,fn)}return this},isShow:function(){return(jQuery(this).css("display")!="none")},oModal:function(mode){var jQM=jQuery(this),id;if(!jQM[0].id){jQM=jQuery("#oModal");id=jQM[0].id}var jQ=(jQM.is(".oModal"))?jQM:jQM.children(".oModal");var z=jQM.css("z-index"),md=mode;if(typeof(md)=="object"){md=mode.modal[mode.step-1]}if((!md)||(md=="off")){jQ.hide();return this}switch(md){case"grid":z=900;break;case"config":z=1099;break;default:if((z=="auto")||(!z)||(z==900)){z=1008}}jQM.width(jQuery().width()).height(jQuery().height()).css("zIndex",z);jQ.show();if((jQuery.browser.msie)&&(id=="oModal")){$o.dialogIE6()}return this},oBlink:function(){blink(this);return this;function blink(b){jQuery(b).each(function(){var c=jQuery(b).css("color");jQuery(b).animate({color:"#000"},1000,function(){jQuery(b).animate({color:c},1000,function(){jQuery(b).animate({color:c},2000,function(){blink(b)})})})})}},oDecoButton:function(){var j=jQuery(this);if(typeof($o)=="undefined"){$o={}}if(!$o.cssDir){$o.cssDir=location.pathname.match(/\/.*?\//)[0]+"css/"}jQuery("form",j).submit(function(){return false});jQuery(".btnDark",j).wrapInner('<span class="decoText"></span>').prepend('<img src="'+$o.cssDir+'btndark.png" class="decoImg">').hover(function(){jQuery(this).addClass("decoHover")},function(){jQuery(this).removeClass("decoHover")});jQuery(".btnLight",j).wrapInner('<span class="decoText"></span>').prepend('<img src="'+$o.cssDir+'btnlight.png" class="decoImg">').hover(function(){jQuery(this).addClass("decoHover")},function(){jQuery(this).removeClass("decoHover")});return this},oToggleEffect:function(sw){var op=(sw)?100:40;jQuery(this).css({filter:"alpha(stfyle=0,opacity="+op+")",opacity:Number(op/100)});return this},oClick:function(fn){jQuery(this).find("button").attr("onclick",fn);return this},oWizard:function(divout,divin,mode,callback){var jQ=jQuery(this).oInputDisable(true),jQW=jQuery(".oWizDiag",jQ);jQuery(".oAlert",jQW).hide();if(divout=="close"){jQ.fadeOut($o.noIE(200),function(){jQW.empty()});if(jQuery.isFunction(callback)){callback()}return jQ}jQW.find(".oDisable").show();var m,sm="slide",h=((mode)&&(typeof(mode.height)!="undefined"))?mode.height[divin-1]:240;if(divout!=null){jQuery(".o_"+divout+"i",jQ).fadeOut($o.noIE("fast"),function(){return open()})}else{return open()}function open(){if(mode){jQ.oModal(mode.modal[divin-1]);if(divin!=null){mode.step=Number(divin)}m=typeof(mode.offset)}jQ.show();if(divin==null){return jQ}var c={height:h},oc=".o_"+divin,on=jQuery(oc,jQW),oi=jQuery(oc+"i",jQW);jQuery(oc+"o",jQ).hide();oi.show();mode.step=divin;if(m=="object"){jQW.css(mode.offset);if(typeof(mode.offset.bottom)=="number"){jQW.css("top",null)}if(jQW.is(".oFixDiag")){jQW.addClass("oFixDiag")}}else{c=jQuery.extend(c,jQW.oCenterOffset(c),c);var o=jQW.offset();if(((o.left==0)||(o.top==0))&&(typeof(mode.offset)=="undefined")){jQW.css({left:((o.left==0)?c.left:o.left),top:(c.top+h)}).height(0);sm=null}}if(mode.width){if(divout==null){jQW.width(mode.width)}else{c.width=mode.width}}on.show();if(((divout==0)||(divout==null))&&(divin==1)){jQuery(".oWizHide").hide();if(divout==0){jQuery(".o_0",jQ).show()}jQW.css(c).show("slide",{direction:"down"},"normal",function(){if(divout==0){jQuery(".o_0",jQ).show()}jQW.find(".oDisable").hide();jQuery(this).oInputDisable();if(jQuery.isFunction(callback)){callback()}});return jQ}if(mode){jQW.animate(c,400);setNext(sm)}else{on.slideDown("fast",function(){jQW.find(".oDisable").hide();jQuery(this).oInputDisable();if(jQuery.isFunction(callback)){callback()}})}return jQ}function setNext(mode){jQuery(".o_"+divin,jQ).show(mode,{direction:"down"},500,function(){jQW.find(".oDisable").hide();jQuery(this).oInputDisable();mode.wizard==false;if(jQuery.isFunction(callback)){callback()}})}},oURLParam:function(l){var QS=new Array;if(!l){var l=(location.hash.length>1)?location.hash.substr(1):((location.search.length>1)?location.search.substr(1):"")}if(l.length>1){var m_Array=l.split("&");for(idx in m_Array){var w=m_Array[idx].split("=");QS[w[0]]=w[1]}}QS.id=(QS.o)?QS.o:QS.c;if(!QS.n){QS.n=-1}return QS},oInputDisable:function(md){return this},oWizardBack:function(divout,divin,mode){var jQ=jQuery(this).oInputDisable(true),jQW=jQuery(".oWizDiag",jQ),p=jQ.offset();jQ.find(".oDisable").show();jQuery(".oAlert",jQW).hide();if(typeof(mode.height)!="undefined"){var h=mode.height[divin-1]}if(divout!=null){jQuery(".o_"+divout).hide()}if(mode){if(divin!=null){mode.step=Number(divin)}jQ.oModal(mode.modal[divin-1]);m=typeof(mode.offset)}if(divin!=null){var jQo=jQuery(".o_"+divin+"o",jQ);if(jQo.length!=0){jQo.fadeOut($o.noIE("fast"),function(){jQuery(".o_"+divin+"i").slideDown("fast",setNext(this))})}else{jQuery(".o_"+divin+"i",jQ).slideDown("fast",function(){setNext(this)})}}return jQ;function setNext(self){var c={height:h};if(m=="object"){jQW.css(mode.offset);if(typeof(mode.offset.bottom)=="number"){jQW.css("top",null)}}else{c=jQuery.extend(jQW.oCenterOffset(c),c)}if(mode){jQuery(".oWizDiag",jQ).show().animate(c,240,function(){jQW.find(".oDisable").hide();jQuery(self).oInputDisable()})}}},oCenterOffset:function(s,p){var j=jQuery(this),b,jw=jQuery(window),w,h;w=j.width();h=j.height();if(s){if(s.width){w=s.width}if(s.height){h=s.height}}if(!p){return{left:((jw.width()-w)>>1),top:jw.scrollTop()+((jw.height()-h)>>1)}}if(p.jquery){b=p.offset();b.width=p.width();b.height=p.height()}else{if(!p.width){p.top=0}if(!p.left){p.left=0}if(!p.top){p.top=0}if(!p.left){p.left=0}}var t=(jQuery(this).is(".oFixV"))?0:(p.top+((p.height-h)>>1));var l=(jQuery(this).is(".oFixH"))?0:(p.left+(p.width-w)>>1);if(!p){return{top:t,left:l}}},oDialog:function(style,title,mess,ok,okProcess,cancel,cancelProcess){if(style=="refresh"){jQuery("#oWiazrd,#oDialog,#oModal").width(jQuery().width()).height(jQuery().height());jQuery("#oDiag_window,#oWiz_window,#oHelp_window").each(function(){if(jQuery(this).is(".oFixDiag")){return}var o=jQuery(this).oCenterOffset();jQuery(this).css(o)});return this}if(jQuery("#oDialog").length==0){jQuery(document.body).append('<div id="oDialog"><div id="oDiag_Modal" class="oModal"></div><div id="oDiag_window" class="oDiag"></div></div>')}$o.jQDg=jQuery("#oDialog");if(!$o.jTmp){$o.jQDg.oLoadTemplate()}var css="oD",csst="oDT";switch(style){case"error":css="oDx";csst="oDxT";break;case"!":css="oDc";csst="oDcT";break}var okw=4+$o.countChr(ok).zenkaku,cx=okw+0.5,cw=0;if(cancel!=null){if(cancel==""){cancel=$o._.cancel}cw=$o.countChr(cancel);cw=cw.zenkaku+4}else{cancel=""}var jQW=jQuery("#oDiag_window",$o.jQDg).html($o.jTmp._templates.dialog.get({title:title,mess:mess,titlecss:csst,messcss:css,ok:{text:ok,width:okw},cancel:{text:cancel,right:cx,width:cw}},[],document.body)).oDecoButton().hide();jQuery("#oDiag_btnOk",jQW).click(function(){var fade=(style=="keep")?jQW:$o.jQDg;fade.oModal("off").fadeOut($o.noIE(180),function(){if(jQuery.isFunction(okProcess)){okProcess()}})});jQuery("#oDiag_btnCancel",jQW).click(function(){$o.jQDg.oModal("off").fadeOut($o.noIE(180),function(){if(jQuery.isFunction(cancelProcess)){cancelProcess()}})});$o.jQDg.oModal("on").show();var o=jQW.oCenterOffset();jQW.css(o).fadeIn($o.noIE(180))},oHelper:function(){jQuery(".oHelper").click(function(){B(true);var url=jQuery(".oHelperImg",this).attr("src");var para=jQuery(".oHelperBtn",this).html();if(jQuery("#oDialog").length==0){jQuery(document.body).append('<div id="oDialog">')}var jH=jQuery("#oDialog").html('<div id="oDiag_Modal" class="oModal"></div><div id="oDiag_window" class="oHelpDiag oFixV"><img src="'+url+'" alt="Site Top Help"></div><div id="btnHelpClose" class="oHelperClose">× Help Close</div>'+para).show();jQuery(".oHelperClose",jH).click(function(){jQuery(jH).fadeOut(100,function(){jQuery(this).remove()});B(false)}).oBlink();jH.oModal("on").show();var img=jQuery("img",jQW),io=img.offset();var jQW=jQuery("#oDiag_window").width(img.width*io.left).height(img.height+io.top),o=jQW.oCenterOffset();jQW.css(o).fadeIn($o.noIE(180))})},oAjaxMon:function(md,v){if(md==null){var md=""}jQuery(this).html(md).ifShow(v)}});jQuery.fn.o=function(_opt,iniCallback){function mouse2screen(e){var evt=e?e:window.event;if(evt.pageX==null&&evt.clientX!=null){var e=document.documentElement,b=document.body;evt.pageX=evt.clientX+(e&&e.scrollLeft||b.scrollLeft||0);evt.pageY=evt.clientY+(e&&e.scrollTop||b.scrollTop||0)}return point2screen({x:evt.pageX,y:evt.pageY})}function point2screen(c){c.x=c.x-_o.inFrame.div.offset().left;c.y=c.y-_o.inFrame.div.offset().top;return c}function cell2screen(c){if(!c){return c}if(_o.free){c.x=c.cellX*_o.scale;c.y=c.cellY*_o.scale}else{c.x=Math.floor(c.cellX*_o.grid.width);c.y=Math.floor(c.cellY*_o.grid.height)}c=cell2screenSize(c);return c}function cell2screenSize(c){if(_o.free){c.width=c.cellW*_o.scale;c.height=c.cellH*_o.scale}else{c.width=_o.grid.width;c.height=_o.grid.height}return c}function screen2point(c){if(_o.free){c.cellX=c.x/_o.scale;c.cellY=c.y/_o.scale}else{c.cellX=Math.floor(c.x/_o.scale/_o.grid.cellW);c.cellY=Math.floor(c.y/_o.scale/_o.grid.cellH)}return c}function screen2cell(c){c=screen2point(c);if(_o.free){c=screen2cellSize(c);return checkHit(c)}else{c=cell2screen(c);c.cellCode=cell2CellCode(c);if(c.cellCode==-1){return null}}return c}function screen2cellSize(c){if(_o.free){c.cellW=Math.floor(c.width/_o.scale);c.cellH=Math.floor(c.height/_o.scale)}else{c.cellW=Math.floor(_o.grid.cellW);c.cellH=Math.floor(_o.grid.cellH)}return c}function cellCode2cell(c){if(c.cellCode==-1){return c}c.cellX=c.cellCode&65535;c.cellY=c.cellCode>>16;if(_o.free){var hc=$o.cells[c.cellCode];if(!hc){return c}hc.cellX=c.cellX;hc.cellY=c.cellY;c=cell2screen(hc)}else{c=screen2cellSize(c);if((c.cellX>=_o.grid.countW)||(c.cellY>=_o.grid.countH)){c.cellCode=null}else{c=cell2screen(c)}}return c}function cellCode2No(code){if((code==-1)||(code==null)||((_o.free)&&(!$o.cells[code]))){return null}if(_o.free){return $o.cells[code].cellNo+1}else{return(code&65535)+(code>>16)*_o.grid.countW+1}}function cell2CellCode(c){if((!_o.free)&&((c.cellX<0)||(c.cellY<0)||(c.cellX>=_o.grid.countW)||(c.cellY>=_o.grid.countH))){return -1}return(Math.floor(c.cellY)<<16)+Math.floor(c.cellX)}function getOneCell(){var cl;if(_o.free){if(($o.cellNo==null)||($o.cellNo.length==0)){return}if($o.cellCount>=1){cl={cellW:$o.cellNo[0].cellW,cellH:$o.cellNo[0].cellH}}else{_o.oneCell=false;return false}}else{cl={cellW:_o.grid.countW,cellH:_o.grid.countH}}_o.oneCell=checkOneCell(cl);return _o.oneCell}function checkOneCell(c){return(((!_o.free)&&(c.cellW==1)&&(c.cellH==1))||(($o.tp.publicType!=4)&&(_o.free)&&($o.cellCount==1)&&((c.width*c.height)>(_o.width*_o.height*0.8))))}function redefineCell(c){var ncd=cell2CellCode(c),nc;_o.oneCell=checkOneCell(c);if(_o.oneCell){ncd=0;c.x=0;c.y=0;c.cellX=0;c.cellY=0;ncd=0;c.cellW=_o.imgWidth;c.cellH=_o.imgHeight}if(ncd!=_o.cellCode){$o.cells[ncd]=$o.cells[_o.cellCode];delete $o.cells[_o.cellCode]}$o.cells[ncd].cellCode=c.cellCode=ncd;$o.cells[ncd].cellW=c.cellW;$o.cells[ncd].cellH=c.cellH;$o.cells[ncd].modified=$o.cells[ncd].modified|2;c=cell2screenSize(c);setRect(c);drawRect(c);drawGrid()}function checkHit(src){var hit=null;if(!src.cellW){src.cellW=0}if(!src.cellH){src.cellH=0}src.wx=src.cellX+src.cellW;src.hy=src.cellY+src.cellH;var n=1;for(var i in $o.cells){i=Number(i);if($o.cells[i].modified&4){continue}var cl={};cl.cellCode=i;cl=cellCode2cell(cl);cl.wx=cl.cellX+cl.cellW;cl.hy=cl.cellY+cl.cellH;if((src.wx>=cl.cellX)&&(cl.wx>src.cellX)&&(src.hy>=cl.cellY)&&(cl.hy>src.cellY)){if(src.cellCode!=i){hit=cl;hit.no=n;break}}}return hit}function pushCache(coins,ex){if(!coins){return}if(!$o.cache[coins.coinId]){_o.rect.visible=false;$o.targetSw=true;var fn={cellCode:-2,cursorvisible:false,cell:{},targetSW:true,zoom:1,zoomct:3,history:{},gridvisible:_o.grid.visible,targetvisible:true}}else{var fn={cellCode:_o.cellCode,cursorvisible:_o.cursor.visible,cell:$o.clone(_o.cell),targetSW:$o.targetSW,zoom:$o.zoom[$o.zoomct],zoomct:$o.zoomct,history:_o.history,gridvisible:_o.grid.visible,targetvisible:_o.target.visible}}$o.cache[coins.coinId]=jQuery.extend(fn,ex)}function removeCache(id){delete $o.cache[id]}function popCache(coins,ex){var id=coins.coinId;if(!$o.cache[id]){pushCache(coins,ex)}_o.cell=$o.clone($o.cache[id].cell);_o.cursor.visible=$o.cache[id].cursorvisible;_o.target.visible=$o.cache[id].targetvisible;$o.targetSW=$o.cache[id].targetSW;setZoom($o.cache[id].zoom);$o.zoomct=$o.cache[id].zoomct;if((_o.mode=="print")||(_o.mode=="cover")){return}$o.root[$o.root.no].cellCode=setCellCode($o.cache[id].cellCode)}function onLoadImage(){var call=_o.callback;_o.callback=null;_o.loaded=true;fitDisplay(_o.disp.width,_o.disp.height);_o.fitWidth=_o.width;_o.fitHeight=_o.height;_o.recommend=gridRecommendSize();initCanvas();_o.transition=false;_o.switching=false;if($o){$o.jQLd.oAjaxMon()}if(typeof(call)=="function"){call()}if(typeof(_o.viewReady)=="function"){_o.viewReady()}}function onErrorImage(){if($o){$o.jQLd.oAjaxMon()}_o.loaded=false;jQuery().oDialog("error","画像ロードエラー","画像読込中にエラーが発生しました。<br>ブラウザをリロードしてください。","確認")}function docEvent(href){var option=href.replace(/^[^\?]+\??/,"").replace(/&/g,",");window.open(href,this.rel,option+",width=640,height=480,menubar=no,toolbar=no,status=no,location=no").focus()}function setWidth(w,h){var dw=_o.disp.div.width(),dh=_o.disp.div.height();var x=(((_o.disp.width<dw)?dw:_o.disp.width)-w)>>1;var y=(((_o.disp.height<dh)?dh:_o.disp.height)-h)>>1;_o.grid.canvas.css({position:"absolute",left:0,top:0}).attr({width:w,height:h});_o.inFrame.div.css({position:"absolute",left:x,top:y,width:w,height:h});_o.rect.frame.css({position:"absolute",left:x,top:y,width:w,height:h,zIndex:1005}).hide();if(_o.mode=="print"){_o.print.css({position:"absolute",left:x,top:y,width:w,height:h}).show()}_o.inFrame.left=x;_o.inFrame.top=y}function setCursor(c,v){setCell(c);_o.cellNo=cellCode2No(c.cellCode);_o.cursor.visible=v}function setCursorCellCode(cellCode){var cl=cellCode2cell({cellCode:cellCode});setCell(cl);if((_o.free)&&(!$o.cells[cellCode])){_o.cellCode=_o.cellNo=-1;_o.cursor.visible=false;return false}_o.cellNo=cellCode2No(cellCode);_o.cursor.visible=true;return true}function setCell(c){if(typeof(c.cellCode)!="number"){return}_o.cell.x=c.x;_o.cell.y=c.y;_o.cellCode=c.cellCode;_o.cellNo=c.no;_o.cell=c;if(!_o.free){_o.cell.cellW=_o.grid.cellW;_o.cell.cellH=_o.grid.cellH;_o.cell.width=_o.grid.width;_o.cell.height=_o.grid.height}}function setCursorFreeCell(c){setCell(c);_o.cursor.visible=true;return true}function setRect(c){if(typeof(c.cellCode)!="number"){c.cellCode=cell2CellCode(c)}_o.cellCode=c.cellCode;_o.cellNo=c.no;_o.rect.cell=$o.cloneObject(c);_o.rect.frame.show();_o.rect.visible=true;return true}function setAimRect(c){var w=$o.o.cellW,h=$o.o.cellH,x=c.x/_o.scale,y=c.y/_o.scale,max=96/_o.scale;if(w>max){w=max}if(h>max){h=max}x-=(w>>1);y-=(h>>1);if(x<0){x=0}if(y<0){y=0}if((x+w)>_o.imgWidth){x=_o.imgWidth-w}if((y+h)>_o.imgHeight){y=_o.imgHeight-h}c.x=Math.floor(x*_o.scale);c.y=Math.floor(y*_o.scale);c.cellW=Math.floor(w);c.cellH=Math.floor(h);c.cellX=Math.floor(x);c.cellY=Math.floor(y);c.width=Math.floor(w*_o.scale);c.height=Math.floor(h*_o.scale);_o.aim.cell=c;return c}function fitRect(r){r.r=r.srcW/r.width;var hr=r.srcH/r.height;if(r.r>hr){r.r=hr}if((r.r<1)||(r.strech)){r.width*=r.r;r.height*=r.r}r.x=(r.srcW-r.width)>>1;r.y=(r.srcH-r.height)>>1;return r}function onClick(e){if((_o.mode=="cover")||(_o.mode=="print")||(_o.mode=="view")||((_o.mode=="adjust")&&(!_o.free))||(!_o.grid.visible)||(_o.oneCell)||(_o.cursor.modal)){return}if(_o.dragging){_o.dragging=false;return}var c=mouse2screen(e);if(_o.grid.click){return _o.grid.click(e,c)}c=screen2cell(c);if(c==null){if((_o.mode=="edit")&&(_o.free)){toggleRect(false)}return}if(($o.filter.selected)&&(!$o.filter.cell[c.cellCode])){return}if(e.target.className!="cursor"){if(_o.free){if((_o.mode=="adjust")&&(_o.rect.multi)){setRect(c);drawRect();return}setCursorFreeCell(c)}else{setCursor(c,true)}drawCursor()}$o.checkInfo(_o.cellCode,true)}function focusDiv(fid){if((!$o.elements[fid])||($o.id==fid)){return}$o.elements[$o.id]=_o;jQuery().o.opt=_o=$o.elements[fid];$o.id=fid;$o.jQme=jQuery("#"+fid)}function draw(){if((!_o.grid.layer)||(_o.loaded==false)){return}drawGrid();drawCursor()}function initCanvas(){if(_o.loaded==false){return}if(_o.mode!="print"){_o.grid.layer=_o.grid.canvas[0].getContext("2d")}setGrid(_o.grid.countW,_o.grid.countH)}function fitDisplay(w,h,fit){var iw,ih;if(!_o.coins.abone){if(_o.img){if(_o.mode=="print"){iw=_o.print.width();ih=_o.print.height()}else{iw=_o.img.width;ih=_o.img.height}}else{iw=_o.disp.width;ih=_o.disp.height}_o.imgWidth=iw;_o.imgHeight=ih}else{iw=_o.imgWidth;ih=_o.imgHeight}_o.scale=1;if((fit)||(iw>w)||(ih>h)){_o.scale=Math.min((w/iw),(h/ih))}if(!_o.free){setGrid(_o.grid.countW,_o.grid.countH)}_o.cell=cell2screen(_o.cell);_o.rect.cell=cell2screen(_o.rect.cell);_o.width=Math.round(iw*_o.scale);_o.height=Math.round(ih*_o.scale);setWidth(_o.width,_o.height)}function resetCursor(){_o.cellCode=-1;_o.cellN=-1;toggleCursor(false)}function resetRect(){_o.cellCode=-1;_o.cellN=-1;drawRect()}function toggleCursor(sw){if(sw==null){_o.cursor.visible=(!_o.cursor.visible)}else{_o.cursor.visible=sw}if((_o.cursor.visible)&&(_o.cellCode>=0)){_o.cursor.div.show()}else{_o.cursor.div.hide()}drawTarget();return _o.cursor.visible}function modalCursor(sw){if(sw==null){_o.cursor.modal=(!_o.cursor.modal)}else{_o.cursor.modal=sw}toggleCursor(!_o.cursor.modal);return _o.cursor.modal}function clearTarget(){if(_o.target.layer){_o.target.layer.clearRect(0,0,_o.disp.div.width(),_o.disp.div.height())}}function drawTarget(){if((_o.mode=="cover")||(_o.mode=="print")||(!_o.target.layer)){return}var ctx=_o.target.layer,wx=_o.disp.div.width();ctx.clearRect(0,0,wx,_o.disp.div.height());if((!_o.cursor.visible)||(_o.contents==null)||(_o.contents.contentType>2)||(_o.cellCode<0)||(_o.transition)||(!_o.target.visible)||(!$o.targetSW)){return}ctx.fillStyle="rgba(128,128,128,0.6)";ctx.beginPath();ctx.moveTo(wx-16,0);ctx.lineTo(_o.cell.x+(_o.cell.width>>1)+_o.inFrame.left,_o.cell.y+(_o.cell.height>>1)+_o.inFrame.top);ctx.lineTo(wx,16);ctx.lineTo(wx,0);ctx.lineTo(wx-16,0);ctx.fill()}function drawCursor(){if((_o.mode!="adjust")&&(_o.mode!="edit")){drawRect()}if(_o.mode=="cover"){return}if((_o.grid.visible)&&(_o.cursor.visible)&&(_o.cellCode>=0)&&(_o.contents.contentType<3)){if(_o.cell.height){var x=0,y=0,w=(_o.mode=="print")?6:0;if(jQuery.browser.msie){if($o.IE6){_o.cursor.div.children(".lineVw").height(_o.cell.height).end().children(".lineHs").css({top:_o.cell.height-1}).end().children(".lineVe").height(_o.cell.height).css({left:_o.cell.width-1})}else{x=1;y=1}w=0}_o.cursor.div.css({left:_o.cell.x+x,top:_o.cell.y+y,width:_o.cell.width-w,height:_o.cell.height-w,zIndex:1005}).show()}drawTarget()}else{_o.cursor.div.hide();drawTarget();_o.cursor.visible=false}}function drawRect(){if(!_o.free){return}var cl=_o.rect.cell;if((cl)&&(_o.rect.visible)&&(_o.cellCode>=0)){_o.rect.div.css({left:cl.x,top:cl.y,width:cl.width,height:cl.height,zIndex:1000}).show()}else{_o.rect.div.hide()}}function toggleRect(mode){if(mode==null){_o.rect.visible=!_o.rect.visible}else{_o.rect.visible=mode}_o.rect.frame.ifShow(_o.rect.visible);_o.rect.div.ifShow(_o.rect.visible);if(mode){_o.aim.div.hide()}drawRect()}function toggleAimRect(mode){_o.aim.div.ifShow(mode);if(mode){_o.rect.frame.hide()}}function drawAimRect(){if(!_o.free){return}var cl=_o.aim.cell,a=0;if($o.isIE6){a=-1}_o.aim.div.css({left:cl.x,top:cl.y,width:cl.width+a,height:cl.height+a,zIndex:1005,pointer:"move"});return cl}function setFromCoin(coins){_o.id=coins.coinCd;_o.grid.color=coins.gridColor;_o.grid.cellColor=coins.cellColor;_o.grid.lineStyle=coins.cellPatternId;_o.free=(coins.cellPatternId<0);_o.grid.cellStyle=coins.cellStyle;_o.coins=coins;_o.contents=coins.contents;_o.contents.fullPath=$o.contentsDir.file(coins.contents)}function setImageFromCoin(coins,options,callback){jQuery("#oDocViewer").hide();_o.cursor.div.hide();_o.cursor.modal=false;_o.inFrame.div.css((coins.abone)?{border:"solid 1px black"}:"");jQuery(".oDeleted",_o.inFrame.div).ifShow(coins.abone);if((options)&&(_o.img!=null)){_o.transition=true;_o.target.div.fadeOut($o.isIE6(20));clearTarget();_o.inFrame.div.fadeOut(270,function(){setting()})}else{setting()}function setting(){_o.deleted=false;if(coins.contents.contentType==2){setFromCoin(coins);f=(coins.abone)?null:_o.contents.fullPath;if(_o.mode=="cover"){jQuery(".oTitleName").html(coins.title)}setImageWithDir(coins.topCoinId,coins.cellW,coins.cellH,f,null,callback)}else{setContentFromCoin(coins,callback)}}}function setContentFromCoin(coins,callback){_o.callback=null;_o.loaded=true;_o.cursor.div.hide();setFromCoin(coins);setGrid(1,1);_o.topCoinId=coins.topCoinId;jQuery("#oDocViewer").hide();jQuery("#oHtml",_o.disp.div).empty();var tp=coins.contents.contentType;switch(_o.mode){case"view":case"adjust":if(tp==6){_o.player.div.hide()}break;case"print":_o.player.div.hide();if(coins.subContents.filename){tp+="s";var r=fitRect({srcW:Math.floor(_o.disp.width*0.75),srcH:Math.floor(_o.disp.height*0.75),width:coins.subContents.width,height:coins.subContents.height});_o.player.div.css({position:"absolute",left:((_o.disp.width-r.width)>>1),top:r.y+8,width:r.width,height:r.height}).html("<img src='"+$o.contentsDir.file(coins.subContents)+"' style='width:100%;height:100%'>").show()}else{_o.player.div.empty()}setImageForContent(coins.topCoinId,coins.cellW,coins.cellH,"prt"+tp+".gif",null,callback);return;break;default:if(coins.abone){_o.deleted=true}else{setting()}}fitDisplay(_o.disp.width,_o.disp.height);_o.fitWidth=_o.width=320;_o.fitHeight=_o.height=240;_o.recommend=gridRecommendSize();popCache(_o.coins.coinId);initCanvas();_o.loaded=true;_o.transition=false;_o.switching=false;if(typeof(callback)=="function"){callback()}function setting(){switch(tp){case 3:case 4:var r=fitRect({srcW:_o.disp.width,srcH:_o.disp.height,width:320,height:240}),css={position:"absolute",left:r.x,top:r.y,width:r.width,height:r.height,backgroundcolor:"red"},file=_o.contents.fullPath,title=null,sub=null;if(!checkFlashPlugin(_o.player.swf,css)){return}if((typeof($o.flash.externalplay)=="undefined")||(_o.swf)){_o.player.swf.write(_o.player.swf.id)}_o.swf=null;_o.player.div.css(css).show();if(tp==3){title=coins.title;sub=(coins.subContents.filename)?$o.contentsDir.file(coins.subContents):""}playerLoad(file,title,sub);break;case 5:var r=fitRect({srcW:_o.disp.width,srcH:_o.disp.height,width:coins.contents.width,height:coins.contents.height}),css={position:"absolute",left:r.x,top:r.y,width:r.width,height:r.height};fitDisplay(_o.disp.width,_o.disp.height);if(!checkFlashPlugin(_o.player.swf,css)){return}_o.fitWidth=_o.width;_o.fitHeight=_o.height;initCanvas();_o.swf=new SWFObject(_o.contents.fullPath,"externalplay",r.width,r.height,"8","#222222");_o.swf.useExpressInstall($o.imgDir+"expressinstall.swf");_o.swf.addParam("wmode","opaque");_o.swf.addParam("allowScriptAccess","always");_o.swf.write(_o.player.swf.id);_o.player.div.css(css).show();break;case 6:showPDF(coins);break;case 7:showBanner(coins);break}}function checkFlashPlugin(swf,css){if(swf.installedVer.major==0){_o.player.div.css(css).html($o.jTmp._templates.no_flash.get({},[],document.body)).oDecoButton().show();jQuery("#oBtnFlashDl").click(function(){window.open("http://www.adobe.com/go/getflashplayer/","FlashPlugin")});return false}return true}}function showPDF(coins,mode){_o.player.div.hide();var jQDc=jQuery("#oDocViewer");jQDc.html($o.jTmp._templates.docViewer.get({},[],document.body)).oDecoButton().hide();jQuery("#oDoc_btnClose").click(function(){showPDF($o.o)}).bind("selectstart",function(){event.returnValue=false});var jQIf=jQDc.children("#oDoc_frame").children("iframe"),pdf=_o.contents.fullPath;if(mode=="on"){if($o.IE6){window.open(pdf,"_blank","menubar=no,toolbar=no");return}var w=jQuery(document).width(),h=Math.floor(jQuery(document).height()*0.9);var wx=Math.floor(w*0.7),x=Math.floor((w-wx)/2);jQDc.hide().css({position:"fixed",left:0,top:0,width:"100%",height:"100%",zIndex:1007}).children("#oDoc_modal").show().end().children("#oDoc_frame").css({position:"absolute",left:x,top:32,width:wx+"px",height:"80%"}).children("#oDoc_title").show().end();jQIf.replaceWith('<iframe src="'+pdf+'" width="100%" height="100%" allowtransparency="true"></iframe>');jQDc.show()}else{var d=_o.disp.div.offset();var r=fitRect({srcW:_o.disp.width,srcH:_o.disp.height,width:_o.disp.width,height:_o.disp.height});jQDc.hide().css({position:"absolute",left:d.left,top:d.top,width:r.width,height:r.height,zIndex:1003}).children("#oDoc_modal").hide().end().children("#oDoc_frame").css({position:"absolute",left:0,top:0,width:r.width,height:r.height}).children("#oDoc_title").hide().end();jQIf.replaceWith('<iframe src="'+pdf+'#toolbar=0" width="100%" height="100%" allowtransparency="true"></iframe>');jQDc.show()}}function showBanner(coins,mode){_o.player.div.hide();var cnt=coins.contents;var r=fitRect({srcW:_o.disp.width,srcH:_o.disp.height,width:cnt.width,height:cnt.height});jQuery("#oHtml",_o.disp.div).css({position:"absolute",left:r.x,top:r.y}).width(r.width).height(r.height).html(cnt.text);fitDisplay(_o.disp.width,_o.disp.height);_o.fitWidth=_o.width;_o.fitHeight=_o.height;initCanvas()}function playerLoad(file,title,sub){var e=typeof($o.flash.externalplay.mediaLoad);if(e=="function"){$o.flash.externalplay.mediaLoad(file,title,sub)}else{setTimeout(function(){playerLoad(file,title,sub)},300)}}function setImageWithDir(topCoinId,w,h,filename,options,callback){_o.player.div.hide();setImageWithEffect(topCoinId,w,h,filename,options,callback)}function setImageForContent(topCoinId,w,h,filename,options,callback){setImageWithEffect(topCoinId,w,h,$o.imgDir+filename,options,callback)}function setImageWithEffect(topCoinId,w,h,filename,options,callback){setImage(topCoinId,w,h,{filename:filename},callback);function setImage(topCoinId,w,h,file,callback){_o.topCoinId=Number(topCoinId);_o.loaded=false;setGrid(w,h);_o.callback=callback;if($o){$o.jQLd.oAjaxMon($o._.loading,true)}if((file.filename=="")||(file.filename==null)){file.filename="img/spacer.gif"}imgLoad(file.filename);_o.cursor.div.hide();if(file.filename.substr(-3)=="swf"){onLoadImage()}}}function imgLoad(src){var delay=20;var timeout=15000;var tick=0;delete _o.img;_o.img=(_o.mode=="print")?_o.print[0]:new Image();_o.img.onerror=_o.img.onabort=function(){_o.img.finish=true;if(tick>timeout){onErrorImage1()}else{imgLoad(src)}};_o.img.onload=function(){_o.img.finish=true;if((jQuery.browser.opera)&&(!_o.img.complete)){onErrorImage();return}onLoadImage()};_o.img.src=src+"?"+new Date().getTime();if(!_o.img.finish){setTimeout(function(){if(_o.img.finish){return}if(_o.img.complete){_o.img.finish=true;if(!jQuery.browser.msie){return}if(_o.img.width){onLoadImage()}onErrorImage();return}if((tick+=delay)>timeout){_o.img.finish=true;onLoadImage();return}setTimeout(arguments.callee,delay)},0)}}function imgReady(fn){var delay=100,timeout=15000,tick=0;var i=setTimeout(function(){if((jQuery("img:not([complete])").length<2)||((tick+=delay)>timeout)){clearTimeout(i);fn()}else{i=setTimeout(arguments.callee,delay)}},0)}function drawCells(){if((_o.contents.contentType>2)||($o.cellCount==0)||(_o.mode=="cover")){return}if(_o.oneCell){if(_o.history){drawCheck({cellCode:0,cellNo:1,x:0,y:0})}return}if($o.filter.length>0){_o.grid.layer.fillStyle="rgba(0,0,0,0.7)";_o.grid.layer.fillRect(0,0,_o.width,_o.height)}var f=function(c,i){_o.grid.layer.fillRect(c.x,c.y,c.width,c.height)};_o.grid.layer.fillStyle=$o.rgba2css(_o.grid.cellColor);_o.grid.layer.strokeStyle=_o.grid.color;_o.grid.layer.lineWidth=1;if(_o.free){f=(_o.grid.cellColor=="#000000")?freeCell:cell3d}if(_o.grid.lineStyle==0){f=cell3d}_o.grid.overflows=0;for(var i in $o.cells){i=Number(i);if($o.filter.length>0){if(!$o.filter.cell[i]){continue}else{if(!$o.cells[i]){continue}}}if($o.cells[i].modified&4){continue}var gc=cellCode2cell({cellCode:i});if(gc.cellCode==null){_o.grid.overflows++;continue}if($o.filter.length>0){if(!_o.coins.abone){_o.grid.layer.drawImage(_o.img,gc.x/_o.scale,gc.y/_o.scale,gc.cellW,gc.cellH,gc.x,gc.y,gc.width,gc.height)}else{_o.grid.layer.clearRect(gc.x/_o.scale,gc.y/_o.scale,gc.cellW,gc.cellH,gc.x,gc.y,gc.width,gc.height)}}f(gc,i);if(_o.history){drawCheck(gc)}}function freeCell(c,i){if($o.cells[i].hasInfo){_o.grid.layer.fillRect(c.x,c.y,c.width,c.height)}_o.grid.layer.strokeRect(c.x,c.y,c.width,c.height)}function cell3d(c,i){var x=c.x+1,y=c.y+1,rx=x+c.width-1,ry=y+c.height-1;_o.grid.layer.lineWidth=2;if($o.cells[i].hasInfo){_o.grid.layer.fillRect(x,y,c.width-1,c.height-1)}_o.grid.layer.strokeStyle="rgba(230,230,230,0.9)";_o.grid.layer.beginPath();_o.grid.layer.moveTo(rx,y);_o.grid.layer.lineTo(x,y);_o.grid.layer.lineTo(x,ry);_o.grid.layer.stroke();_o.grid.layer.beginPath();_o.grid.layer.strokeStyle="rgba(24,24,24,0.9)";_o.grid.layer.moveTo(x,ry);_o.grid.layer.lineTo(rx,ry);_o.grid.layer.stroke();_o.grid.layer.strokeStyle="rgba(96,96,96,0.9)";_o.grid.layer.beginPath();_o.grid.layer.moveTo(rx,ry);_o.grid.layer.lineTo(rx,y);_o.grid.layer.stroke()}}function drawCheck(cl){if(!_o.history){return}if(!$o.history[$o.o.coinId]){return}if(!$o.history[$o.o.coinId][cl.cellCode]){return}if(!cl.x){cl=cellCode2cell(cl)}var sx=_o.zoom<<2,sy=_o.zoom<<2;var cx=cl.x+(cl.width>>1)-sx,cy=cl.y+(cl.height>>1);_o.grid.layer.lineWidth=2;_o.grid.layer.strokeStyle=_o.grid.color;_o.grid.layer.beginPath();_o.grid.layer.moveTo(cx,cy);_o.grid.layer.lineTo(cx+sx,cy+sy);_o.grid.layer.lineTo(cx+sx+sx+(sx>>1),cy-sy);_o.grid.layer.stroke()}function setGrid(w,h){if(w==0){w=_o.recommend.w}if(h==0){h=_o.recommend.h}_o.grid.countW=w;_o.grid.countH=h;var ww,hh;if(_o.img){ww=_o.imgWidth/_o.grid.countW;hh=_o.imgHeight/_o.grid.countH}else{ww=_o.disp.width/_o.grid.countW;hh=_o.disp.height/_o.grid.countH}if(_o.free){_o.oneCell=_o.cell.cellW=_o.cell.cellH=_o.cell.width=_o.cell.height=null}else{_o.grid.cellW=_o.cell.cellW=ww;_o.grid.cellH=_o.cell.cellH=hh;_o.grid.width=_o.cell.width=_o.cell.cellW*_o.scale;_o.grid.height=_o.cell.height=_o.cell.cellH*_o.scale}getOneCell()}function gridRecommendSize(w,h,cellSize){var size={},sc=1;if(!cellSize){cellSize=32}if(w==null){w=(_o.img)?_o.imgWidth:_o.disp.width}if(h==null){h=(_o.img)?_o.imgHeight:_o.disp.height}if((w>_o.disp.width)||(h>_o.disp.height)){sc=Math.min((_o.disp.width/w),(_o.disp.height/h))}var cw=cellSize/sc;size.size=Math.floor(cw);size.w=Math.floor(w/cw);size.h=Math.floor(h/cw);return size}function setHistory(mode){_o.history=mode}function setGridColor(color,refresh){_o.grid.color=color;if(refresh){drawGrid()}}function setGridCellColor(color,refresh){_o.grid.cellColor=color;if(refresh){drawGrid()}}function setLineStyle(style){_o.grid.lineStyle=style}function setCellStyle(style){_o.grid.cellStyle=style}function toggleGrid(sw){(!sw)?_o.grid.visible=!(_o.grid.visible):_o.grid.visible=sw;toggleCursor(_o.grid.visible);drawGrid();return _o.grid.visible}function toggleTarget(sw){(!sw)?_o.target.visible=!(_o.target.visible):_o.target.visible=sw;var cl=cellCode2cell({cellCode:_o.cellCode});drawTarget(cl);return _o.target.visible}function setCellCode(cellCode){if(cellCode==null){cellCode=_o.cellCode}if(($o.cellCount==0)||(_o.mode=="view")||(_o.mode=="adjust")||(_o.mode=="cover")){cellCode=-1}if(_o.oneCell){cellCode=0}if(cellCode==-2){cellCode=minimumCellCode()}_o.cellCode=(setCursorCellCode(cellCode))?cellCode:-1;drawCursor();return _o.cellCode}function cellNo2Code(cellNo){if((cellNo==-1)||(cellNo==null)){return cellNo}cellNo=Math.floor(cellNo)-1;if(_o.free){if($o.cellNo[cellNo]){return $o.cellNo[cellNo].cellCode}return -1}if((cellNo<0)||(cellNo>=(_o.grid.countW*_o.grid.countH))){return -1}else{return((cellNo%_o.grid.countW))+(Math.floor(cellNo/_o.grid.countW)<<16)}}function minimumCellCode(){var min=Number.MAX_VALUE;if($o.root.no==0){return}if(_o.free){return cellNo2Code(1)}else{for(var i in $o.cells){min=Math.min(i,min)}if(min==Number.MAX_VALUE){min=-1}}return min}function jumpCellNo(cellNo){var cellCode=cellNo2Code(cellNo);if(!setCellCode(cellCode)){return -1}$o.drawInfo(cellCode);return cellCode}function jumpCellCode(cellCode){if(!setCellCode(cellCode)){return -1}$o.drawInfo(cellCode);return cellCode}function drawGrid(){if((!_o.loaded)||(_o.contents.contentType>2)){return}$o.copyright="©2008 InfoPlayer.jp. All Rights Reserved/concept design ID-G";var cv=_o.grid.layer;var w=_o.width,h=_o.height,tp=1,x,xx,y,yy;if(!_o.coins.abone){cv.drawImage(_o.img,0,0,w,h)}else{cv.clearRect(0,0,w,h)}if(_o.grid.visible){drawCells();if((_o.grid.cellStyle!=1)&&(!_o.free)){cv.lineWidth=4;if($o.filter.length==0){cv.strokeStyle=_o.grid.color}else{cv.strokeStyle="rgba(0,0,0,0.3)"}if(_o.grid.lineStyle!=0){cv.strokeRect(0,0,w,h)}cv.lineWidth=1;if(_o.grid.lineStyle==2){drawBreakGrid()}else{if(_o.grid.lineStyle!=0){drawSolidGrid()}}}}if(_o.inFrame.div.css("display")=="none"){_o.inFrame.div.fadeIn(400,function(){_o.target.div.show()})}_o.inFrame.div.show();function drawSolidGrid(){for(x=_o.grid.width;x<=w;x+=_o.grid.width){cv.beginPath();cv.moveTo(Math.floor(x),0);cv.lineTo(Math.floor(x),h);cv.stroke()}for(y=_o.grid.height;y<=h;y+=_o.grid.height){cv.beginPath();cv.moveTo(0,Math.floor(y));cv.lineTo(w,Math.floor(y));cv.stroke()}}function drawBreakGrid(){for(x=_o.grid.width;x<=w;x+=_o.grid.width){cv.beginPath();xx=Math.floor(x);for(yy=0;yy<=h;yy+=4){cv.moveTo(xx,yy);cv.lineTo(xx+1,yy)}cv.stroke()}for(y=_o.grid.height;y<=h;y+=_o.grid.height){cv.beginPath();yy=Math.floor(y);for(xx=0;xx<=w;xx+=4){cv.moveTo(xx,yy);cv.lineTo(xx,yy+1)}cv.stroke()}}}function setZoom(x){if((x<=0)||(_o.oneCell)&&(_o.contents.contentType>2)){return false}_o.zoom=x;var w=_o.fitWidth,h=_o.fitHeight,dw=_o.disp.width,dh=_o.disp.height;w=Math.floor(w*x);h=Math.floor(h*x);if(w>dw){w=dw}if(h>dh){h=dh}if(((w>=dw)&&(_o.width>=dw))||((h>=dh)&&(_o.height>=dh))){return false}fitDisplay(w,h,true);return true}function moveDisplay(o){var x=o.left,y=o.top,old=_o.disp.div.offset();if((old.left!=o.left)||(old.top!=o.top)){_o.disp.div.css({left:o.left,top:o.top})}jQuery("#oTitlebar,#oRoot_panel,#oFilter_panel,#oInfo_panel").hide();_o.area.div.css({left:x,top:y,width:_o.disp.width,height:_o.disp.height}).show();var t=$o.cnt.contentType,v="#oTitlebar,#oRoot_panel,#oFilter_panel,#oInfo_panel";v+=($o.enquetes[_o.cellCode])?",#oEnq_panel":"";jQuery(v).fadeIn("fast");if((t==3)||(t==4)){jQuery("#oPlay_Panel").fadeIn("fast")}if(_o.enquete){jQuery("#oEnq_Panel").fadeIn("fast");_o.enquete=false}}if(typeof($o)!="undefined"){pushCache($o.o)}if(typeof(jQuery.o)=="undefined"){jQuery.o={}}if((typeof(_o)!="undefined")&&($o.id)){$o.elements[$o.id]=_o}_o=jQuery.extend({left:0,top:0,print:{},dragging:false,switching:false,edgeRight:0,topCoinId:0,width:640,height:480,free:false,contents:null,coins:null,fitWidth:640,fitHeight:480,coinId:-1,bookmark:false,zoom:100,scale:1,cellCode:-1,initCellCode:null,cellNo:-1,focus:null,viewReady:null,enquete:false,parent:null,home:{},swf:{},title:{p:null},inFrame:{div:{},left:0,top:0},player:{div:null,a:null,link:null},blind:{div:null},cursor:{div:null,x:0,y:0,visible:true,modal:false},rect:{div:null,cell:null,last:null,multi:null,visible:true},aim:{div:null,cell:null,visible:true},cell:{oneCell:false,cellW:0,cellH:0,width:0,height:0,history:false},grid:{canvas:null,layer:null,square:{},color:"#EEEEEE",cellColor:"#FF0000",cellStyle:0,lineStyle:null,visible:true,history:false,overflows:0,countW:0,countH:0,recommend:{}},target:{canvas:null,layer:null,visible:false},img:null,filename:null,loaded:false,disp:{div:{},left:0,top:0,width:640,height:480},area:{div:{}},callback:null},_opt);if(_o.mode!="url"){if(!_o.topCoinId){if(typeof(_o.id)!="undefined"){_o.topCoinId=_o.id}else{var t=jQuery(this).get(0).tagName,id=null;if(t=="DIV"){id=jQuery(this).find("IMG").attr("id")}else{id=((t=="IMG")||(t=="SPAN"))?jQuery(this).get(0).id:0}_o.topCoinId=_o.id=id}}}jQuery.extend(jQuery.fn.o,{opt:_o,fit:false,fitRect:function(r){fitRect(r);return r},homePosition:function(mode){if(mode=="move"){moveDisplay(_o.home)}return _o.home},cell2CellCode:function(cl){return cell2CellCode(cl)},getOneCell:function(){return getOneCell()},setFocus:function(fid,id,refresh){focusDiv(fid);initCanvas();if(id){popCache(id)}if(refresh){draw()}},setMode:function(md){_o.mode=md;setCursorCellCode(-1);drawCursor();if((_o.mode=="adjust")||(_o.mode=="edit")){_o.disp.div.draggable("disable").removeClass("ui-state-disabled")}else{_o.disp.div.draggable("enable")}return md},push:function(coins,ex){pushCache(coins,ex)},isPop:function(coins){popCache(coins)},removeCache:function(id){removeCache(id)},zoom:function(x){var ok=setZoom(x);drawGrid();drawCursor();drawRect();return ok},image:{load:function(filename,callback){setImageWithDir(0,0,0,filename,options,callback)},loadFromCoin:function(coins,options,callback){setImageFromCoin(coins,options,callback)}},setHistory:function(mode,refresh){setHistory(mode);if(refresh){drawGrid()}},showCheck:function(cellCode){if(!_o.history){return}var cl={cellCode:cellCode};cl=cellCode2cell(cl);drawCheck(cl)},show:function(){draw()},showPDF:function(coins,mode){showPDF(coins,mode)},grid:{set:function(w,h){setGrid(w,h);drawGrid()},setFromCoin:function(coins){setFromCoin(coins);setGrid(coins.cellW,coins.cellH);drawGrid()},getCellNo:function(cellCode){if(cellCode){return cellCode2No(cellCode)}else{return cellCode2No(_o.cellCode)}},show:function(){drawGrid()},hide:function(){_o.grid.div.hide()},toggle:function(sw){sw=toggleGrid(sw);return sw},setColor:function(color,refresh){setGridColor(color,refresh)},setCellColor:function(color,refresh){setGridCellColor(color,refresh)},setCellStyle:function(styleNo){setLineStyle(1);setCellStyle(styleNo);drawGrid()},setRecommend:function(){setGrid(_o.recommend.w,_o.recommend.h);drawGrid()},getRecommend:function(w,h,sz){return gridRecommendSize(w,h,sz)},setLineStyle:function(lineStyle){setCellStyle(0);setLineStyle(lineStyle);drawGrid()},click:function(fn){if(!fn){delete _o.grid.click}else{_o.grid.click=fn}},mouseover:function(fn){if(!fn){_o.target.div.unbind("mousemove").unbind("mouseover").unbind("mouseout");return}_o.target.div.mousemove(function(e){var cl=mouse2screen(e);fn(e,cl)});_o.target.div.mouseover(function(e){toggleAimRect(true)});_o.target.div.mouseout(function(e){toggleAimRect(false)})}},target:{toggle:function(onoff){return toggleTarget(onoff)},show:function(){drawTarget()}},cursor:{toggle:function(sw){return toggleCursor(sw)},modal:function(sw){return modalCursor(sw)},initCellCode:function(){if((_o.mode=="view")||(_o.mode=="print")|(_o.mode=="cover")){return}jumpCellCode((_o.initCellCode)?_o.initCellCode:setCellCode("min"));_o.initCellCode=null},jumpCellNo:function(cellNo){return jumpCellNo(cellNo)},jumpCellCode:function(cellCode){return jumpCellCode(cellCode)},setCellCode:function(cellCode){return setCellCode(cellCode)},reset:function(){resetCursor()}},rect:{enable:function(md,ml){_o.rect.visible=md;_o.rect.multi=ml;toggleRect(md)},reset:function(){resetRect()},toggle:function(md){if(_o.cellCode){toggleRect(md)}},get:function(){return _o.rect.cell},set:function(cl){if(!typeof(cl.cell)=="undefined"){var cl=cl.cell}cl=setRect(cl);drawRect();return cl},resize:function(cl,callback){if(cl){redefineCell(cl)}if(callback){_o.rect.resizeCallback=callback}},hit:function(cl){return checkHit(cl)}},aim:{toggle:function(mode){toggleAimRect(mode)},set:function(cl){cl=setAimRect(cl);drawAimRect();return cl}}});_o.area.div=jQuery("#oArea");if(_o.area.div.length==0){jQuery("body").append("<div id='oArea' class='oBody'></div><div id='oDisplay' class='oBody' onSelectStart = 'return false;'></div><div id='oWizard'  class='oBody'></div><div id='oDocViewer'></div>");_o.area.div=jQuery("#oArea")}if((typeof($o)=="undefined")||(!_o.mode)){new coIn()}_o.disp.div=jQuery("#oDisplay");var jQv=jQuery(this),p=jQv.offset();_o.parent=jQv;if((_o.mode=="cover")||(_o.mode=="adjust")||(_o.mode=="edit")||(_o.mode=="print")){dp=jQv}else{dp=_o.disp.div}if(typeof(p)!="undefined"){_o.top=p.top}_o.left=p.left;dp.html($o.jTmp._templates.display.get({},[],document.body));if(_o.mode=="print"){jQuery("#oCover",dp).show()}_o.inFrame.div=jQuery(".inFrame",dp);_o.rect.frame=jQuery("#rectFrame",dp);_o.cursor.div=jQuery("#oCursor",_o.inFrame.div);_o.rect.div=jQuery("#oRect",dp);_o.aim.div=jQuery("#oAimRect",dp);_o.target.div=jQuery("#oTarget",dp);_o.target.canvas=jQuery("canvas",_o.target.div);_o.grid.canvas=jQuery("canvas",_o.inFrame.div);_o.print=jQuery("#oPrint",dp);_o.player.div=jQuery("#oPlayer");_o.disp.width=_o.disp.div.width();_o.disp.height=_o.disp.div.height();var dpW=_o.disp.width,dpH=_o.disp.height;if(_o.mode=="cover"){jQuery("#oCover",dp).html($o.jTmp._templates.cover.get({},[],document.body)).height(_o.disp.height).show().hover(function(){jQuery(this).css({backgroundcolor:"#FFF"});if(_o.loaded){jQuery(this).find(".oCoverDiv").show()}},function(){jQuery(this).css({backgroundcolor:"#000"}).find(".oCoverDiv").hide()}).find(".oCoverDiv").height(_o.disp.height).click(function(){location.href=_o.cover+"#o="+$o.tp.coinCd})}else{dp.click(function(e){onClick(e)}).find("#oCover").hide()}if(_o.mode!="print"){_o.target.canvas.css({position:"absolute",left:0,top:0,width:dpW,height:dpH}).attr({width:dpW,height:dpH});if(document.uniqueID){_o.grid.canvas[0]=G_vmlCanvasManager.initElement(_o.grid.canvas[0]);_o.target.canvas[0]=G_vmlCanvasManager.initElement(_o.target.canvas[0])}_o.target.layer=_o.target.canvas[0].getContext("2d");if(document.uniqueID){_o.target.canvas.find("div").css({width:dpW,height:dpH})}_o.target.div.css({position:"absolute",left:0,top:0,width:dpW,height:dpH});_o.player.swf=new SWFObject($o.imgDir+"coinplayer.swf","externalplay","100%","100%","8","#222222");_o.player.swf.useExpressInstall($o.cntDir+"expressInstall.swf");_o.player.swf.addParam("swLiveConnect","true");_o.player.swf.addParam("wmode","opaque");_o.player.swf.addParam("allowScriptAccess","always");_o.player.swf.id="oPlayer";_o.player.div=jQuery("#"+_o.player.swf.id,dp);_o.rect.div.draggable({containment:"parent",snap:_o.rect.frame,snapMode:"outer",start:function(e,ui){_o.dragging=true},stop:function(e,ui){var cl={cellCode:_o.cellCode,x:ui.position.left,y:ui.position.top,width:ui.helper.width(),height:ui.helper.height()};screen2cell(cl);if(checkHit(cl)){_o.rect.div.animate({left:_o.rect.cell.x,top:_o.rect.cell.y},100)}else{redefineCell(cl)}}}).resizable({containment:"parent",snap:_o.rect.frame,snapMode:"outer",minHeight:32,minWidth:32,handles:"all",stop:function(e,ui){var r=_o.rect.div.offset(),cl={cellCode:_o.cellCode,x:r.left,y:r.top,width:_o.rect.div.width(),height:_o.rect.div.height()};if(screen2cell(point2screen(cl))){_o.rect.div.animate({left:_o.rect.cell.x,top:_o.rect.cell.y,width:_o.rect.cell.width,height:_o.rect.cell.height},100)}else{redefineCell(cl)}drawRect(cl);if(_o.rect.resizeCallback){_o.rect.resizeCallback(cl)}}})}_o.edgeRight=jQuery(window).width()-$o.jQIP.width()-Number($o._.marginRight);$o.copyright="©2008 InfoPlayer.jp. All Rights Reserved/concept design ID-G";$o.id=jQv[0].id;$o.jQme=jQuery("#"+$o.id);$o.referer=(_o.mode=="url")?parent.document.referrer:"";_o.bookmark=((_o.mode=="url")||(_o.trigger=="hide"));if(_o.mode=="instance"){return jQv}if((!_o.mode)||(_o.bookmark)){if(jQuery.browser.msie){jQuery("iframe").css({visibility:"hidden"});if(jQuery(".oFlash").length==0){$o.swfControl()}}if(($o.nowTop.topCoinId>0)&&(_o.disp.div.css("display")!="none")){CoinCan.closeCoin($o.o.coinId,(_o.cellCode>=0)?$o.cells[_o.cellCode].coinCellId:-1,-1)}var o=jQuery(this).offset(),x=o.left+(jQuery(this).width()>>1)-(_o.disp.width>>1),y=o.top+(jQuery(this).height()>>1)-(_o.disp.height>>1);_o.home=o;jQuery("#oInfo_message",$o.jQIF).html($o.jTmp._templates.splash.get({},[],document.body));jQuery("#oTitlebar,#oRoot_panel,#oFilter_panel,#oInfo_panel,#oPlay_Panel,#oMsg_panel,#oEnq_panel").hide();_o.area.div.css({left:x,top:y,width:_o.disp.width,height:_o.disp.height}).show();if(y<jQuery("#oTitlebar").height()){y=jQuery("#oTitlebar").height()}if((x+_o.disp.width)>_o.edgeRight){x=_o.edgeRight-_o.disp.width}if(x<jQuery("#oFilter_panel").width()){x=jQuery("#oFilter_panel").width()}$o.jQRV.empty();$o.jQIV.empty();jQuery("#oFilter_icons").empty();_o.area.div.css({left:x,top:y}).show();_o.disp.div.hide().css({left:x,top:y}).show();jQuery("#oTitlebar").show("slide",{direction:"down"},120);_o.switching=true;if(_o.mode=="chgTop"){$o.refreshInterfaces(true)}jQuery("#oRoot_panel").show("slide",{direction:"up"},150,function(){jQuery("#oFilter_panel").show("slide",{direction:"right"},100,function(){if(!_o.disp.div.is(".ui-draggable")){_o.disp.div.draggable({snapMode:"outer",delay:50,distance:16,start:function(e,ui){_o.dragging=true;_o.enquete=(jQuery("#oEnq_panel").css("display")!="none");jQuery("#oTitlebar,#oRoot_panel,#oFilter_panel,#oInfo_panel,#oPlay_Panel,#oEnq_panel,#oMsg_panel").hide()},stop:function(e,ui){moveDisplay(_o.disp.div.offset())}}).removeClass("ui-draggable-disabled")}});if(jQuery.browser.msie){imgReady(function(){if(_o.bookmark){$o.loadCoinFromBookmark()}else{$o.TopCoinLoad(_o.id)}})}else{if(_o.bookmark){if(_o.mode=="chgTop"){jQuery.historyLoad("o="+_o.id);_o.mode="url"}$o.loadCoinFromBookmark()}else{$o.TopCoinLoad(_o.id)}}$o.jQIP.show("slide",{direction:"left"},600)})}else{if(typeof(_o.id)=="string"){$o.TopCoinLoad(_o.id)}}if(_o.trigger=="hide"){_o.parent.hide()}return jQv}})(jQuery);jQuery.event.special.ready.setup();jQuery(function(){if(typeof($o)=="undefined"){jQuery(".imgCourt,.imgHover").hover(function(){jQuery(this).css({filter:"alpha(opacity=50)",opacity:0.5,border:"solid 2px #888888",margin:0,padding:0,cursor:"pointer",backgroundColor:"#FFFFFF",textDecoration:"none"})},function(){jQuery(this).css({filter:"alpha(opacity=100)",opacity:1,border:"none",margin:2,padding:0,backgroundColor:"#FFFFFF",cursor:"pointer",textDecoration:"none"})}).css({filter:"alpha(opacity=100)",opacity:1,border:"none",margin:2,padding:0,backgroundColor:"#FFFFFF",cursor:"pointer",textDecoration:"none"})}});
