/*
 * allrights reserved by tategakibunko
 * url : http://tategakibunko.mydns.jp
 * blog : http://tategakibunko.blog83.fc2.com
 */


var Dom={id:function(a){return document.getElementById(a)},style:function(a){return document.getElementById(a).style}};var Env={host:"",api:function(c,b,a){return(this.host+"/cgi-bin/bungou/"+c+".fcgi"+Util.make_path_args(b)+Util.make_get_args(a))},file:function(a){return(this.host+"/bungou"+Util.make_path_args(a))},browser_width:function(){if(window.innerWidth){return window.innerWidth}else{if(document.documentElement&&document.documentElement.clientWidth!=0){return document.documentElement.clientWidth}else{if(document.body){return document.body.clientWidth}}}return 0},is_safari:(navigator.appVersion.indexOf("KHTML")>-1),is_ie:(document.all&&window.ActiveXObject&&navigator.userAgent.toLowerCase().indexOf("msie")>-1&&navigator.userAgent.toLowerCase().indexOf("opera")==-1)};var Sajax={update:function(f,d,b,e){var a=new ajaxObject(d,e);var c=Util.make_params(b);a.update(c,f)},get:function(b,a,c){this.update("get",b,a,c)},post:function(b,a,c){this.update("post",b,a,c)}};var Util={to_json:function(o){return eval("("+o+")")},get_client_size:function(){if(document.all){return{width:document.body.clientWidth,height:document.body.clientHeight}}else{return{width:innerWidth,height:innerHeight}}},make_params:function(c){var b="";for(var d=0;d<c.length;d++){var a=c[d];b+=(d>0)?"&":"";b+=a.name+"="+a.value}return b},make_path_args:function(b){var a="";for(var c=0;c<b.length;c++){a+="/"+b[c]}return a},make_get_args:function(a){var b="";for(var c=0;c<a.length;c++){var d=a[c];b+=(c==0)?"?":"&";b+=d.name+"="+d.value}return b},format_char_count:function(e){var a="";var c=["","","","",",","万"];var f=e+"字";for(var b=f.length-1;b>=0;b--){var d=f.substring(b,b+1);a=(f.length-1-b<c.length)?d+c[f.length-1-b]+a:d+a}return a},attr:function(d){var a="";for(var b=0;b<d.length;b++){var c=d[b];a+=" "+c.name+"='"+c.value+"'"}return a},tag1:function(a,b){return"<"+a+Util.attr(b)+" />"},tag:function(b,c,a){return"<"+b+Util.attr(c)+">"+a+"</"+b+">"},tg:function(b,a){return"<"+b+">"+a+"</"+b+">"},link:function(b,c,a){return Util.tag("a",c.concat({name:"href",value:b}),a)},table:function(f,h,d){var c="";for(var b=0;b<f.length;b++){var g=f[b];var e="";for(var a=0;a<g.length;a++){e+=Util.tag("td",[],g[a])}if(b==0&&d){c+=Util.tag("tr",[{name:"class",value:"header"}],e)}else{c+=Util.tag("tr",[],e)}}return Util.tag("table",h,c)}};var Href={novel:function(a){return Env.api("fview",[a],[])},profile:function(a,b){if(a=="library"&&b!="図書館"){return Env.api("author",["works","library",encodeURIComponent(b)],[])}else{return Env.api("profile",[a],[])}},genre:function(a){return Env.api("genre",[a],[])},comment:function(a){return Env.api("comment",[a],[])},summary:function(a){return Env.api("summary",[a],[])}};var Href2={novel:function(a){return"/novel/"+a},profile:function(a,b){if(a=="library"&&b!="図書館"){return"/author/works/library/"+encodeURIComponent(b)}else{return"/profile/"+a}},genre:function(a){return"/genre/"+a},comment:function(a){return"/comment/"+a},summary:function(a){return"/summary/"+a},exh:function(a){return"/exh/info/"+a},exh_post:function(a){return"/exh/post/"+a},sts_read_rate:function(a){return"/statics/read-rate/"+a},tag_input:function(a){return"/tag/input/"+a}};
