var _e={};function $(id){return _e[id]?_e[id]:(_e[id]=document.getElementById(id));}function trim_both(s){return s.replace(/^[\s　]+|[\s　]+$/g,"");}function escape_html(s){return s.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#039;").replace(/</g,"&lt;").replace(/>/g,"&gt;");}var _c=null;function get_cookie(name){if(!_c){_c={};var a=document.cookie.split(";");for(var i=0;i<a.length;i++){var p=a[i].replace(" ","").split("=");if(p.length>=2)_c[p[0]]=unescape(p[1]);}}return _c[name];}function set_cookie(name,value,days){var a=[],i=0;a[i++]=name;a[i++]="=";a[i++]=escape(value);a[i++]="; path=/";if(days){var t=new Date();t.setTime(t.getTime()+days*24*60*60*1000);a[i++]="; expires=";a[i++]=t.toGMTString();}document.cookie=a.join("");if(_c){_c[name]=value;}}function get_http_request(){try{return new XMLHttpRequest();}catch(e){try{return new ActiveXObject("Msxml2.XMLHTTP");}catch(e2){try{return new ActiveXObject("Microsoft.XMLHTTP");}catch(e3){return null;}}}}function do_request(url,method,data,async,callback){var http=get_http_request();if(!http)return;http.open(method,url,async);if(method=="POST"){http.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8");}if(callback){http.onreadystatechange=function(){if(http.readyState==4&&http.status==200){callback(http);}};}http.send(data);}function get_form_data(form){var v=[],n=0;for(var i=0;i<form.elements.length;i++){var e=form.elements[i];if(e.name&&e.name!=""&&(!e.type.match(/^(radio|checkbox)$/)||e.checked)){v[n++]="&";v[n++]=e.name;v[n++]="=";v[n++]=escape(e.value);}}v[0]="";return v.join("");}function overture_ss(id,keyword,count){var url="/ad/overture_ss/?u="+encodeURI(window.location.href)+"&k="+encodeURIComponent(keyword)+"&n="+count;do_request(url,"GET",null,true,function(http){$(id).innerHTML=http.responseText;});}function overture_im(id,cnt,offset){var a=new Array();var j=0;a[j++]='<div><a href="http://listing.yahoo.co.jp/service/int/index.html" target="_blank">Ads by Yahoo! JAPAN</a></div>';a[j++]='<p>';if(typeof zSr!="undefined"){var i=6;while(i<zSr.length){if(offset!=undefined&&--offset>=0){i+=6;continue;}var descr=zSr[i++];var unused1=zSr[i++];var clickURL=zSr[i++];var title=zSr[i++];var sitehost=zSr[i++];var unused2=zSr[i++];a[j++]='<a href="';a[j++]=clickURL;a[j++]='" target="_blank"><em>';a[j++]=title;a[j++]='</em><cite>';a[j++]=sitehost;a[j++]='</cite><span>';a[j++]=descr;a[j++]='</span></a>';if(cnt&&--cnt<=0){break;}}}a[j++]="</p>";$(id).innerHTML=a.join("");}function refresh_header(){if(navigator.appName.indexOf("Microsoft")>=0&&$("head")){$("head").style.visibility="visible";$("head").style.visibility="";}}refresh_header();if($("h_mypage")){var h=get_cookie("idcore");if(h&&h.length>0){$("h_logout").className="on";if(document.location.protocol=="http:"){do_request("/mypage/status/","GET",null,true,function(http){$("h_status").innerHTML=http.responseText;});}}else{$("h_login").className="on";$("h_mypage").className="on";}}if($("b_google")||$("bt_google")){($("b_google")||$("bt_google")).onclick=function(){window.open('https://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk='+encodeURI(window.location.href)+'&title='+encodeURIComponent(document.title),'popup','width=550,height=480,left=100,top=50,status=yes,location=no,resizable=yes,scrollbars=no');};}if($("b_yahoo")||$("bt_yahoo")){($("b_yahoo")||$("bt_yahoo")).onclick=function(){window.open('http://bookmarks.yahoo.co.jp/bookmarklet/showpopup?t='+encodeURIComponent(document.title)+'&u='+encodeURI(window.location.href)+'&opener=bm&ei=UTF-8','popup','width=550,height=480,left=100,top=50,status=yes,location=no,resizable=yes,scrollbars=no');};}if($("b_hatena")||$("bt_hatena")){($("b_hatena")||$("bt_hatena")).onclick=function(){window.open('http://b.hatena.ne.jp/entry/'+window.location.href);};}if($("b_livedoor")||$("bt_livedoor")){($("b_livedoor")||$("bt_livedoor")).onclick=function(){window.open('http://clip.livedoor.com/clip/add?link='+encodeURI(window.location.href)+'&title='+encodeURIComponent(document.title));};}if($("b_twitter")||$("bt_twitter")){($("b_twitter")||$("bt_twitter")).onclick=function(){if(typeof(tweet)=="undefined"){tweet=document.title.split(" - ")[0].split(":")[0]+" "+window.location.href+"?tweet #eiga";}window.open('http://twitter.com/home?status='+encodeURIComponent(tweet));};}if($("bt_rss")){$("bt_rss").onclick=function(){window.open('http://feeds.eiga.com/eiga_news');};}if($("h_search_t")){function h_search_blur(){if($("h_search_t").value==""){$("h_search_t").style.color="#808080";$("h_search_t").value="作品、俳優、監督名などを入力";}}function h_search_focus(){if($("h_search_t").value=="作品、俳優、監督名などを入力"){$("h_search_t").value="";$("h_search_t").style.color="";}}h_search_blur();$("h_search_t").onblur=function(){h_search_blur();};$("h_search_t").onfocus=function(){h_search_focus();};$("h_search").onsubmit=function(){h_search_focus();};}if($("s_theater_tab_1")){no_pref_opt=new Option("都道府県を選択","");pref_opts=[[new Option("茨城県","8"),new Option("栃木県","9"),new Option("群馬県","10"),new Option("埼玉県","11"),new Option("千葉県","12"),new Option("東京都","13"),new Option("神奈川県","14")],[new Option("滋賀県","25"),new Option("京都府","26"),new Option("大阪府","27"),new Option("兵庫県","28"),new Option("奈良県","29"),new Option("和歌山県","30")],[new Option("岐阜県","21"),new Option("静岡県","22"),new Option("愛知県","23"),new Option("三重県","24")],[new Option("北海道","1"),new Option("青森県","2"),new Option("岩手県","3"),new Option("宮城県","4"),new Option("秋田県","5"),new Option("山形県","6"),new Option("福島県","7")],[new Option("新潟県","15"),new Option("山梨県","19"),new Option("長野県","20")],[new Option("富山県","16"),new Option("石川県","17"),new Option("福井県","18")],[new Option("鳥取県","31"),new Option("島根県","32"),new Option("岡山県","33"),new Option("広島県","34"),new Option("山口県","35"),new Option("徳島県","36"),new Option("香川県","37"),new Option("愛媛県","38"),new Option("高知県","39")],[new Option("福岡県","40"),new Option("佐賀県","41"),new Option("長崎県","42"),new Option("熊本県","43"),new Option("大分県","44"),new Option("宮崎県","45"),new Option("鹿児島県","46"),new Option("沖縄県","47")]];if($("s_theater_tab_1")){theater_tab=1;function sel_theater_tab(n){$("s_theater_tab_"+theater_tab).className="off";$("s_theater_"+theater_tab).className="off";theater_tab=n;$("s_theater_tab_"+n).className="";$("s_theater_"+n).className="";}$("s_theater_tab_1").onclick=function(){sel_theater_tab(1);};$("s_theater_tab_2").onclick=function(){sel_theater_tab(2);};function theater_region_change(){var p=$("s_theater_pref");p.selectedIndex=0;p.options.length=0;p.options[0]=no_pref_opt;var e=$("s_theater_region");var region=parseInt(e.options[e.selectedIndex].value,10)-1;if(0<=region&&region<pref_opts.length){var opts=pref_opts[region];for(var i=0;i<opts.length;i++){p.options[i+1]=opts[i];}}return true;}theater_region_change();$("s_theater_region").onchange=function(){return theater_region_change();};}}if($("hm_theater_pref")){var opts=[new Option("北海道","1"),new Option("青森県","2"),new Option("岩手県","3"),new Option("宮城県","4"),new Option("秋田県","5"),new Option("山形県","6"),new Option("福島県","7"),new Option("茨城県","8"),new Option("栃木県","9"),new Option("群馬県","10"),new Option("埼玉県","11"),new Option("千葉県","12"),new Option("東京都","13"),new Option("神奈川県","14"),new Option("新潟県","15"),new Option("富山県","16"),new Option("石川県","17"),new Option("福井県","18"),new Option("山梨県","19"),new Option("長野県","20"),new Option("岐阜県","21"),new Option("静岡県","22"),new Option("愛知県","23"),new Option("三重県","24"),new Option("滋賀県","25"),new Option("京都府","26"),new Option("大阪府","27"),new Option("兵庫県","28"),new Option("奈良県","29"),new Option("和歌山県","30"),new Option("鳥取県","31"),new Option("島根県","32"),new Option("岡山県","33"),new Option("広島県","34"),new Option("山口県","35"),new Option("徳島県","36"),new Option("香川県","37"),new Option("愛媛県","38"),new Option("高知県","39"),new Option("福岡県","40"),new Option("佐賀県","41"),new Option("長崎県","42"),new Option("熊本県","43"),new Option("大分県","44"),new Option("宮崎県","45"),new Option("鹿児島県","46"),new Option("沖縄県","47")];var e=$("hm_theater_pref");if(e){for(var i=0;i<opts.length;i++){e.options[i+1]=opts[i];}}}function current_year_month(){var today=new Date();var year=today.getFullYear();var month=today.getMonth()+1;month=month<10?"0"+month:""+month;return year+month;}if($("gmenu_btn")){$("gmenu_btn").onclick=function(){if($("gmenu_btn").className=="off"){$("gmenu_btn").className="";$("gmenu_link").style.display="none";}else{$("gmenu_btn").className="off";$("gmenu_link").innerHTML='<a href="/">映画トップ</a> '+'<a href="/movie/now/">公開中の映画</a> '+'<a href="/movie/coming/">近日公開の映画</a> '+'<a href="/movie/coming/'+current_year_month()+'/">公開予定の映画</a> '+'<a href="/news/">映画ニュース</a> '+'<a href="/theater/">映画館を探す</a> '+'<a href="/preview/">試写会</a> '+'<a href="/free/">プレゼント</a> '+'<a href="/ranking/">映画ランキング</a> '+'<a href="/movie/">映画データ</a> '+'<a href="/movie/review/">映画レビュー</a> '+'<a href="/special/">注目映画特集</a> '+'<a href="/interview/">インタビュー</a> '+'<a href="/dvd/">DVD</a> '+'<a href="http://tv.eiga.com/" target="_blank">海外ドラマ</a> '+'<a href="/magazine/">マガジン</a> '+'<a href="/extra/">コラム</a>';$("gmenu_link").style.display="block";}};}var movie_history=null;var theater_history=null;function get_histories(){if(!movie_history){movie_history=[];var n=0;var s=get_cookie("eg_m");if(s&&s.length>0){var a=s.split("|");for(var i=0;i<a.length;i++){var t=a[i];var j=t.indexOf(" ");if(j>=0){movie_history[n++]=[t.substring(0,j),t.substring(j+1)];}}}}if(!theater_history){theater_history=[];var n=0;var s=get_cookie("eg_t");if(s&&s.length>0){var a=s.split("|");for(var i=0;i<a.length;i++){var t=a[i];var j=t.indexOf(" ");if(j>=0){theater_history[n++]=[t.substring(0,j),t.substring(j+1)];}}}}}function set_histories(){if(movie_history){var a=[],n=0;for(var i=0;i<movie_history.length;i++){a[n++]=movie_history[i].join(" ");}set_cookie("eg_m",a.join("|"),14);}if(theater_history){var a=[],n=0;for(var i=0;i<theater_history.length;i++){a[n++]=theater_history[i].join(" ");}set_cookie("eg_t",a.join("|"),14);}}function add_movie_history(id,title){get_histories();var a=[],n=0;a[n++]=[id,title];for(var i=0;a.length<5&&i<movie_history.length;i++){if(movie_history[i][0]!=id){a[n++]=movie_history[i];}}movie_history=a;set_histories();}function add_theater_history(id,title){get_histories();var a=[],n=0;a[n++]=[id,title];for(var i=0;a.length<5&&i<theater_history.length;i++){if(theater_history[i][0]!=id){a[n++]=theater_history[i];}}theater_history=a;set_histories();}function disp_history(){if(!$("movieHis")){return;}get_histories();var a=[],n=0;a[n++]='<h3>最近チェックした履歴</h3>';a[n++]='<div>';a[n++]='<h4>映画の検索履歴</h4>';if(movie_history.length>0){a[n++]='<ul>';for(var i=0;i<movie_history.length;i++){var p=movie_history[i];a[n++]='<li><a href="/movie/';a[n++]=p[0];a[n++]='/">';a[n++]=escape_html(p[1]);a[n++]='</a></li>';}a[n++]='</ul>';}a[n++]='<em class="more"><a href="/movie/">他の映画を探す</a></em>';a[n++]='<h4 class="t_his">映画館の検索履歴</h4>';if(theater_history.length>0){a[n++]='<ul>';for(var i=0;i<theater_history.length;i++){var p=theater_history[i];a[n++]='<li><a href="/theater/';a[n++]=p[0];a[n++]='/">';a[n++]=escape_html(p[1]);a[n++]='</a></li>';}a[n++]='</ul>';}a[n++]='<em class="more"><a href="/theater/">他の映画館を探す</a></em>';a[n++]='</div>';$("movieHis").innerHTML=a.join("");$("movieHis").style.display="block";}disp_history();
if($("hm_vote_btn")){loading_img=new Image();loading_img.src="http://image.eiga.k-img.com/images/shared/loading.gif";function notify_loading(){$("hm_vote_win").innerHTML='<img src="'+loading_img.src+'" alt="" />';}function post_vote_form(f){do_request(f.action,"POST",get_form_data(f),true,function(http){$("hm_vote_win").innerHTML=http.responseText;});notify_loading();return false;}function close_vote_win(){$("hm_vote_win").className="";}$("hm_vote_btn").onclick=function(){if($("hm_vote_win").className=="on"){$("hm_vote_win").className="";}else if(location.pathname.match(/^(\/movie\/\d+)/)){var uri=RegExp.$1+"/vote/";notify_loading();$("hm_vote_win").className="on";do_request(uri,"GET",null,true,function(http){$("hm_vote_win").innerHTML=http.responseText;});}};}
