var SLGTB={STUDIOLG_TOOLBAR_VIEW:false,STUDIOLG_TOOLBAR_URL:"http://toolbar.slg-labo.com/",name:"SLGTB",ie:(document.all&&!window.opera)?true:false,fx:/Mozilla\/.+Gecko\/.+Firefox/.test(navigator.userAgent),cr:/Mozilla\/.+AppleWebKit\/.+Chrome\/.+Safari/.test(navigator.userAgent),safari:/Safari/.test(navigator.userAgent),geckomac:/Macintosh.+rv:1\.[0-8].+Gecko/.test(navigator.userAgent),width:document.documentElement.clientWidth,version:(function(){var b,c,a;b=0;c=1;a=13;return(a%2)?(b+"."+c+"."+a):(b+"."+c+"."+a+" debug")})(),ieVer:(function(){var a;a=navigator.appVersion.split("MSIE");return a[1]?parseFloat(a[1]):null})(),addMeta:(function(){var a;a=document.getElementsByTagName("head");return function(e,d){var b=document.createElement("meta");b.name=e;b.content=d;a.item(0).appendChild(b)}})(),addLink:(function(){var a;a=document.getElementsByTagName("head");return function(e,d,c){var b=document.createElement("link");b.rel=e;b.href=d;if(c!=null){b.type=c}a.item(0).appendChild(b);SLGTB.log("Add link: "+b.href)}})(),addScript:(function(){var a;a=document.getElementsByTagName("head");return function(b,d,f){var e=document.createElement("script");e.type=b;e.src=d;if(f!=null){e.charset=f}a.item(0).appendChild(e);SLGTB.log("Add script: "+e.src)}})(),$:function(a){return document.getElementById(a)},_:function(a){return document.getElementsByTagName(a)},C:function(a){},N:function(a){return document.getElementsByName(a)},_C:function(f,h){var g,b,d;g=SLGTB._(f);b=[];for(d=0;d<g.length;d++){if(h==g[d].className){b.push(g[d])}}return b},_N:function(a,b){},$$:function(a){},$x:function(a){},is_debug:function(){return/debug/.test(SLGTB.version)?true:false},log:function(b){if(SLGTB.is_debug()){try{console.log(b)}catch(c){}}},debug:function(b){if(SLGTB.is_debug()){try{console.debug(b)}catch(c){}}},info:function(b){if(SLGTB.is_debug()){try{console.info(b)}catch(c){}}},warn:function(b){if(SLGTB.is_debug()){try{console.warn(b)}catch(c){}}},error:function(b){if(SLGTB.is_debug()){try{console.error(b)}catch(c){}}},assert:function(d,b){if(SLGTB.is_debug()){try{console.assert(d,b)}catch(c){}}},dir:function(b){if(SLGTB.is_debug()){try{console.dir(b)}catch(a){}}},dirxml:function(b){if(SLGTB.is_debug()){try{console.dirxml(b)}catch(a){}}},trace:function(){if(SLGTB.is_debug()){try{console.trace()}catch(a){}}},group:function(b){if(SLGTB.is_debug()){try{console.group(b)}catch(c){}}},groupEnd:function(){if(SLGTB.is_debug()){try{console.groupEnd()}catch(a){}}},time:function(a){if(SLGTB.is_debug()){try{console.time(a)}catch(b){}}},timeEnd:function(){if(SLGTB.is_debug()){try{console.timeEnd()}catch(a){}}},profile:function(a){if(SLGTB.is_debug()){try{console.profile(a)}catch(b){}}},profileEnd:function(){if(SLGTB.is_debug()){try{console.profileEnd()}catch(a){}}},count:function(a){if(SLGTB.is_debug()){try{console.count(a)}catch(b){}}},math_bin2dec:function(a){return parseInt(a,2)},math_oct2dec:function(a){return parseInt(a,8)},math_hex2dec:function(a){return parseInt(a,16)},math_dec2bin:function(a){return a.toString(2)},math_dec2oct:function(a){return a.toString(8)},math_dec2hex:function(a){return a.toString(16)},math_reverseRGB:function(d,c){var h,f,a,e;e=d;d=d.replace("#","");if(d.length<6){return e}if(isNaN(c)){c=128}h=this.hex2dec(d.substr(0,2));f=this.hex2dec(d.substr(2,2));a=this.hex2dec(d.substr(4,2));if(h<c){h+=c}else{h-=c}if(f<c){f+=c}else{f-=c}if(a<c){a+=c}else{a-=c}h=this.dec2hex(h);f=this.dec2hex(f);a=this.dec2hex(a);if(h.length<2){h="0"+h}if(f.length<2){f="0"+f}if(a.length<2){a="0"+a}e="#"+h+f+a;return e},math_square:function(a){return a*a},date_expire:function(a){var c;c=new Date();c.setTime(c.getTime()+(a*1000*60*60*24));return c.toGMTString()},date_parse:function(b){var a;a=new Date();if(b==null){return null}if(isNaN(b)){return(Date.parse(b))}a.setTime(b);return a.getFullYear()+"-"+(a.getMonth()+1)+"-"+a.getDate()+" "+a.getHours()+":"+a.getMinutes()+":"+a.getSeconds()},date_weekchar:function(c){var b,e;b=["日","月","火","水","木","金","土"];e=new Date();if(c==null){return null}e.setTime(c);return b[e.getDay()]},date_gapdate:function(a,b){return a+(b*(1000*60*60*24))},date_gapmonth:function(c,f){var g,b,a;g=new Date();g.setTime(c);b=new Date(g.getFullYear(),(g.getMonth()+1+f),0);a=new Date(g.getFullYear(),(g.getMonth()+f),(g.getDate()>b.getDate())?b.getDate():g.getDate(),g.getHours(),g.getMinutes(),g.getSeconds());return a.getTime()},date_diff:function(a,c){return c-a},date_diffdate:function(c,g){var h,a,f;h=new Date();h.setTime(c);a=new Date();a.setTime(g);SLGTB.log("差分秒詳細 date_diffdate(): "+(a-h)/1000);return parseInt((a-h)/86400000)},callback:function(c){var b;for(b=0;b<c.length;b++){if(typeof(c[b].main)=="function"){c[b].main()}}},json_call:function(a,b){if(/\?/.test(a)){SLGTB.addScript("text/javascript",a+"&v="+new Date().valueOf()+"&callback="+b.name+".callback","utf-8")}else{SLGTB.addScript("text/javascript",a+"?v="+new Date().valueOf()+"&callback="+b.name+".callback","utf-8")}},preload:function(c){var e,f,g,b,d;if(c!=null){e=[];for(f=0;f<c.length;f++){g=new Image();g.src=c[f];e.push(g);SLGTB.log("Preloading "+c[f])}}return;window.setTimeout(function(){b=e.length-1;for(d=b;d>=0;d--){if(e[d].complete){SLGTB.log(e[d].src+" caching complete!");e.splice(d,1)}}if(e.length>0){SLGTB.log(e.length+" image retry...");window.setTimeout(arguments.callee,1000)}else{SLGTB.log("Finish preload task...okay")}},100)},addEventListener:function(d,b,a){try{d.addEventListener(b,a,false)}catch(c){try{d.attachEvent("on"+b,a)}catch(c){d["on"+b]=a}}},removeEventListener:function(d,b,a){try{d.removeEventListener(b,a,false)}catch(c){try{d.detachEvent("on"+b,a)}catch(c){d["on"+b]=null}}},getCookie:function(d,e){var c,b;c=document.cookie.split(";");for(b=0;b<c.length;b++){c[b]=c[b].replace(/^[\t\n\r ]+/,"").replace(/[\t\n\r ]+$/,"");if((new RegExp("^"+d+"=")).test(c[b])){return !e?unescape(c[b].substr(c[b].indexOf("=")+1)):c[b].substr(c[b].indexOf("=")+1)}}return""},setCookie:function(b,a){if(typeof(a)!="string"){return false}if(a.substr(0,1)=="("){if(a.substr(a.length-1,1)!=")"){return false}}else{if(a.substr(0,1)!="["){return false}if(a.substr(a.length-1,1)!="]"){return false}}document.cookie=b+"="+escape(a)+";expires="+SLGTB.date_expire(30);return true},clearCookie:function(a){document.cookie=a+"=clear;expires="+SLGTB.date_expire(-1)},max_width:function(){return document.documentElement.clientWidth},limit_width:function(){if(SLGTB.ie){return window.screen.availWidth}return window.screen.availWidth-(window.outerWidth-window.innerWidth)},inherit:function(f,c){var e;if(typeof(f)!=typeof(c)){throw"オブジェクトの型が一致しません。"}if(typeof(c)=="function"){for(e in c.prototype){if(f.prototype[e]==null){f.prototype[e]=c.prototype[e]}}}else{if(typeof(c)=="object"){for(e in c){if(f[e]==null){f[e]=c[e]}}}else{throw"継承できない型のオブジェクトです。"}}},show_trigger:function(a){if(SLGTB.ie){if(a.y<20){SLGTB.show(true)}if(a.y>60){SLGTB.show(false)}}else{if(a.clientY<20){SLGTB.show(true)}if(a.clientY>60){SLGTB.show(false)}}},show:function(a){if(a){document.getElementById("StudioLG_ToolbarArea").style.top="0px";document.getElementById("StudioLG_ToolbarArea_Button").style.top="0px";document.getElementById("StudioLG_ToolbarArea_CM").style.top="30px"}else{if(a!=null){document.getElementById("StudioLG_ToolbarArea").style.top="-30px";document.getElementById("StudioLG_ToolbarArea_Button").style.top="-30px"}else{if(document.getElementById("StudioLG_ToolbarArea").style.top=="0px"){document.getElementById("StudioLG_ToolbarArea").style.top="-30px";document.getElementById("StudioLG_ToolbarArea_Button").style.top="-30px"}else{document.getElementById("StudioLG_ToolbarArea").style.top="0px";document.getElementById("StudioLG_ToolbarArea_Button").style.top="0px";document.getElementById("StudioLG_ToolbarArea_CM").style.top="30px"}}}},fixed:function(a){if(a){document.getElementById("StudioLG_ToolbarArea").style.position="fixed";document.getElementById("StudioLG_ToolbarArea_CM").style.position="fixed"}else{if(a!=null){document.getElementById("StudioLG_ToolbarArea").style.position="absolute";document.getElementById("StudioLG_ToolbarArea_CM").style.position="absolute"}else{if(document.getElementById("StudioLG_ToolbarArea").style.position=="fixed"){document.getElementById("StudioLG_ToolbarArea").style.position="absolute";document.getElementById("StudioLG_ToolbarArea_CM").style.position="absolute"}else{document.getElementById("StudioLG_ToolbarArea").style.position="fixed";document.getElementById("StudioLG_ToolbarArea_CM").style.position="fixed"}}}},adjust_right:function(a){if(a.style.width==""){return false}if(SLGTB.ie){a.style.left=(SLGTB.max_width()-parseInt(a.style.width))+"px"}else{a.style.left=(SLGTB.max_width()-parseInt(a.style.width))+"px"}return true},moveElement:function(){},upMove:function(c,a,b){if(a<b){c.style.top=0;SLGTB.upMove()}},downMove:function(c,a,b){},leftMove:function(c,a,b){},rightMove:function(c,a,b){},main:function(){var v,e,a,i,s,ar;v=eval(SLGTB.getCookie("visit"));if(v!=""){SLGTB.log("前回ログイン: "+SLGTB.date_parse(v));SLGTB.log("経過日数: "+SLGTB.date_diffdate(v,new Date()))}if(SLGTB.ie||SLGTB.cr||SLGTB.safari||window.opera){s="["+new Date().getTime()+"]";SLGTB.log("burning: "+s);if(!SLGTB.setCookie("visit",s)){SLGTB.log("writing cookie...ng")}}else{ar=[new Date().getTime()];SLGTB.log("burning fx: "+ar.toSource());if(!SLGTB.setCookie("visit",ar.toSource())){SLGTB.log("writing cookie...ng")}}SLGTB.addLink("stylesheet",SLGTB.STUDIOLG_TOOLBAR_URL+"toolbar.css?v="+new Date().valueOf(),"text/css");SLGTB.addScript("text/javascript",SLGTB.STUDIOLG_TOOLBAR_URL+"slgtb.app.js?v="+new Date().valueOf(),"utf-8");SLGTB.addScript("text/javascript",SLGTB.STUDIOLG_TOOLBAR_URL+"slgtb.extension.js?v="+new Date().valueOf(),"utf-8");SLGTB.log("SLGTB.main() executed...okay")}};SLGTB.DOM={name:"SLGTB.DOM",ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12,nodes:[],walk:function(b){var a;if(b==null){return}for(a=0;a<b.childNodes.length;a++){SLGTB.DOM.walker(b.childNodes[a])}},nearNull:function(a){return/^[\t\n\r ]*$/.test(a.nodeValue)},getCommentAttribute:function(a){return a.nodeValue.replace(/^[\t\n\r ]+/,"").replace(/[\t\n\r ]+$/,"").split(" ")},getCommentNodes:function(d,e){var b,c;if(typeof(e)=="undefined"){e=document.body}if(e==null){return}if(SLGTB.DOM.nearNull(e)){return}if(e.nodeType==SLGTB.DOM.COMMENT_NODE){b=SLGTB.DOM.getCommentAttribute(e);if(b[0]==d){SLGTB.DOM.nodes.push(e)}}for(c=0;c<e.childNodes.length;c++){SLGTB.DOM.getCommentNodes(d,e.childNodes[c])}},clearNodes:function(){SLGTB.DOM.nodes=[]}};SLGTB.Widget={name:"SLGTB.Widget",cache:{},fullscreen:false,callback:function(b){var a;for(a=0;a<b.prefs.length;a++){SLGTB.Widget.cache[b.prefs[a]["key"]]=b.prefs[a]["html"]}},mask:function(){var a;a=document.createElement("div");a.id="SLGTB_CORE_MASK";a.style.position="absolute";a.style.width=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)+"px";a.style.height=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)+"px";a.style.top="0px";a.style.left="0px";a.style.backgroundColor="#000000";a.style.opacity="0.4";a.style.filter="alpha(opacity=40)";a.style.visibility="visible";document.getElementsByTagName("body").item(0).appendChild(a)},open:function(a){SLGTB.log("処理開始");var b;if(SLGTB.Widget.cache[a]==null){return null}b=document.createElement("div");b.style.position="absolute";b.style.width=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)*0.8+"px";b.style.height=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)*0.8+"px";b.style.top=((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-parseInt(b.style.height))/2+"px";b.style.left=((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-parseInt(b.style.width))/2+"px";b.style.backgroundColor="#ffffff";b.style.opacity="0";b.style.filter="alpha(opacity=0)";b.style.visibility="visible";b.innerHTML=SLGTB.Widget.cache[a];document.getElementsByTagName("body").item(0).appendChild(b);window.setInterval(function(){var c;c=parseFloat(b.style.opacity);if(c+0.1<1){b.style.opacity=(c+0.1);b.style.filter="alpha(opacity="+((c*100)+10)+")";SLGTB.log(parseFloat(b.style.opacity)+":"+b.style.filter);window.setTimeout(arguments.callee,24)}else{b.style.opacity=1;b.style.filter="alpha(opacity="+(1*100)+")"}},100);return true},pop:function(){},main:function(){SLGTB.addScript("text/javascript",SLGTB.STUDIOLG_TOOLBAR_URL+"sources/json.preference.js?v="+new Date().valueOf(),"utf-8")}};SLGTB.XML=function(a,b){this.xmlc=null;this.xslc=null;this.xdom=null;this.mu="";this.su="";this.tid=null;if(SLGTB.ie){try{this.xmlc=new ActiveXObject("Msxml2.XMLHTTP");this.xslc=new ActiveXObject("Msxml2.XMLHTTP")}catch(c){try{this.xmlc=new ActiveXObject("Microsoft.XMLHTTP");this.xslc=new ActiveXObject("Microsoft.XMLHTTP")}catch(c){this.xmlc=null;this.xslc=null}}}else{try{this.xmlc=new XMLHttpRequest();this.xslc=new XMLHttpRequest()}catch(c){this.xmlc=null;this.xslc=null}}if(a!=null){this.mu=a;if(b!=null){this.su=b}else{this.xslc=null}}else{this.xmlc=null;this.xslc=null}SLGTB.log("Set XML.constructer executed...okay")};SLGTB.XML.prototype={name:"SLGTB.XML",load:function(){if(this.xmlc==null){return false}if(this.xslc==null){return loadXML()}else{return this.loadDOM()}},loadXML:function(){if(this.xmlc==null){return false}this.mu+="?t="+new Date().valueOf();this.xmlc.onreadystatechange=this.loadObserve;this.xmlc.open("GET",mu,true);this.xmlc.send(null);this.tid=window.setTimeout(SLGTB.XML.abort,30000);return true},loadDOM:function(){var a;if((this.xmlc==null)||(this.xslc==null)){return false}this.mu+="?t="+new Date().valueOf();this.su+="?t="+new Date().valueOf();a=this;this.xmlc.onreadystatechange=function(){a.loadObserve()};this.xmlc.open("GET",this.mu,true);this.xmlc.send(null);this.xslc.onreadystatechange=function(){a.loadObserve()};this.xslc.open("GET",this.su,true);this.xslc.send(null);this.tid=window.setTimeout("SLGTB.XML.abort",30000);return true},abort:function(){window.clearTimeout(this.tid);this.xmlc.abort();if(this.xslc){this.xslc.abort()}},loadObserve:function(){if(this.xmlc.readyState==4){if(this.xslc==null){window.clearTimeout(this.tid);if(this.xmlc.status!=200){}}else{if(this.xslc.readyState==4){window.clearTimeout(this.tid);if((this.xmlc.status==200)&&(this.xslc.status==200)){this.generate()}}}}},generate:function(){var a,b;if(typeof(this.xmlc.responseXML.transformNode)!="undefined"){this.xdom=document.createElement("body");this.xdom.innerHTML="　"+this.xmlc.responseXML.transformNode(this.xslc.responseXML)}else{this.xdom=document.createElement("body");b=new XSLTProcessor();b.importStylesheet(this.xslc.responseXML);a=b.transformToFragment(this.xmlc.responseXML,window.document);this.xdom.appendChild(a)}}};SLGTB.Ajax=function(){this.version=20091008;try{this.connector=new XDomainRequest()}catch(a){try{this.connector=new XMLHttpRequest()}catch(a){try{this.connector=new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){try{this.connector=new ActiveXObject("Msxml2.XMLHTTP")}catch(a){try{this.connector=new ActiveXObject("Microsoft.XMLHTTP")}catch(a){this.connector=null}}}}}};SLGTB.Ajax.prototype={_begin_open:function(a){if(a.async==null){a.async=false}if(a.user!=null&&a.pass!=null){this.connector.open(a.method,a.url,a.async,a.user,a.pass)}else{this.connector.open(a.method,a.url,a.async)}},encode:function(c){if(c==null){return""}if(typeof(c)=="string"){return encodeURIComponent(c)}if(typeof(c)=="object"){var b=[];for(var a in c){if(typeof(c[a])=="number"||typeof(c[a])=="string"||typeof(c[a])=="boolean"){b.push(encodeURIComponent(a)+"="+encodeURIComponent(c[a]))}}return b.join("&")}return""},multipart:function(d,c){if(d==null||c==null){return""}if(typeof(c)=="object"){var b="";for(var a in c){if(typeof(c[a])=="number"||typeof(c[a])=="string"||typeof(c[a])=="boolean"){b+="--"+d+"\r\n";b+='Content-Disposition: form-data; name="'+a+'"\r\n';b+="\r\n";b+=c[a]+"\r\n"}}return b+"--"+d+"--\r\n"}return""},ajax:function(a,c,f,b){if(this.connector==null){return null}if(a.method==null||a.url==null){return true}if(a.async==null){a.async=false}this._begin_open(a);if(c!=null){this.setHandler(c)}if(f!=null){this.setHeader(f)}b=(b==null)?null:b;try{this.connector.send(b)}catch(d){console.log(d)}},setHandler:function(a){if(typeof(a.onloadstart)=="function"){if(this.connector.onloadstart!==undefined){this.connector.onloadstart=a.onloadstart}}if(typeof(a.onprogress)=="function"){if(this.connector.onprogress!==undefined){this.connector.onprogress=a.onprogress}}if(typeof(a.onabort)=="function"){if(this.connector.onabort!==undefined){this.connector.onabort=a.onabort}}if(typeof(a.onerror)=="function"){if(this.connector.onerror!==undefined){this.connector.onerror=a.onerror}}if(typeof(a.onload)=="function"){if(this.connector.onload!==undefined){this.connector.onload=a.onload}else{if(this.connector.onreadystatechange!==undefined){this.connector.onreadystatechange=a.onload}}}if(typeof(a.onloadend)=="function"){if(this.connector.onloadend!==undefined){this.connector.onloadend=a.onloadend}}},setHeader:function(b){if(typeof(this.connector.setRequestHeader)!="function"){return}for(var a in b){this.connector.setRequestHeader(a,b[a])}}};SLGTB.addEventListener(window,"load",function(){SLGTB.callback([SLGTB,SLGTB.Widget])});
