/*-----------------------------------------------
	ポップアップウィンドウ
-----------------------------------------------*/
window.onload = function (){
	var node_a = document.getElementsByTagName('a');
		for (var i in node_a) {
			if(node_a[i].className == 'popup'){
				node_a[i].onclick = function() {
					return winOpen(this.href, this.rel)
				};
			}
		}
} ;

function winOpen(url, rel) {
	var split = rel.split(',') ;
	window.open(
	url,'popup',
	'width='+ split[0] +',height='+ split[1] +',toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes');

	return false;
};

/*-----------------------------------------------
	上映中マーク
-----------------------------------------------*/

function showing(yy,mm,dd,term){
 var today = new Date();
 var upday = new Date(yy, mm-1, dd);
 d = (today.getTime() - upday.getTime()) / (24*60*60*1000);
 if (d < term){document.write('<img src="images/ic_showing.gif" width="41" height="17" alt="上映中" />');}
 }
 
 function showing2(y,m,d)
{
	oldDay = new Date(y+"/"+m+"/"+d);
	newDay = new Date();
	n = (newDay - oldDay)/(1000*60*60*24);
	if (n <= 7) document.write("<font color='red'><i>NEW</i></font>");
}

function newM(y,m,d)
{
newday=new Date(y+"/"+m+"/"+d);
oldday= new Date();
n=(oldday-newday)/(1000*60*60*24);
if (n <=3)document.write("<span class='newmark'>new!</span>");
}


/*-----------------------------------------------
	ランダム表示
-----------------------------------------------*/
//function random(){

//ban=new Array(4);

//i=Math.floor(Math.random()*ban.length);

//ban[0]='<img src="images/movie.jpg" alt="" width="304" height="204" usemap="#Map" /><map name="Map" id="Map"><area shape="rect" coords="8,54,77,152" href="lineup/04" alt="第4弾 野田版 研辰の討たれ" /><area shape="rect" coords="81,54,149,152" href="lineup/03" alt="第3弾 京鹿子娘二人道成寺" /><area shape="rect" coords="155,54,221,152" href="lineup/02" alt="第2弾 坂東玉三郎－鷺娘－同時上映 日高川入相花王" /><area shape="rect" coords="227,54,294,152" href="lineup/01/" alt="第1弾 野田版 鼠小僧" /></map>';
//ban[1]='<img src="images/movie2.jpg" alt="" width="304" height="204" usemap="#Map2" /><map name="Map2" id="Map2"><area shape="rect" coords="8,54,77,152" href="lineup/06" alt="第6弾 人情噺文七元結" /><area shape="rect" coords="81,54,149,152" href="lineup/05/" alt="第5弾 ふるあめりかに袖はぬらさじ" /><area shape="rect" coords="155,54,221,152" href="lineup/04" alt="第4弾 野田版 研辰の討たれ" /><area shape="rect" coords="227,54,294,152" href="lineup/03" alt="第3弾 京鹿子娘二人道成寺" /></map>';
//ban[2]='<img src="images/movie3.jpg" alt="" width="304" height="204" usemap="#Map3" /><map name="Map3" id="Map3"><area shape="rect" coords="8,54,77,152" href="lineup/08" alt="第8弾 刺青奇偶" /><area shape="rect" coords="81,54,149,152" href="lineup/07" alt="第7弾 連獅子／らくだ" /><area shape="rect" coords="155,54,221,152" href="lineup/06" alt="第6弾 人情噺文七元結" /><area shape="rect" coords="227,54,294,152" href="lineup/05/" alt="第5弾 ふるあめりかに袖はぬらさじ" /></map>';
//ban[3]='<img src="images/movie4.jpg" alt="" width="304" height="204" usemap="#Map4" /><map name="Map4" id="Map4"><area shape="rect" coords="8,54,77,152" href="lineup/02" alt="第2弾 坂東玉三郎－鷺娘－同時上映 日高川入相花王" /><area shape="rect" coords="81,54,149,152" href="lineup/01/" alt="第1弾 野田版 鼠小僧" /><area shape="rect" coords="155,54,221,152" href="lineup/08" alt="第8弾 刺青奇偶" /><area shape="rect" coords="227,54,294,152" href="lineup/07" alt="第7弾 連獅子／らくだ"  /></map>';
//document.write(ban[i]);
//}

/*-----------------------------------------------
	ランダム表示 Youtube
-----------------------------------------------*/
function random(){

ban=new Array(14);

i=Math.floor(Math.random()*ban.length);

ban[0]='<iframe title="YouTube video player" width="304" height="201" src="http://www.youtube.com/embed/5LqkNGisMbg?rel=0" frameborder="0" allowfullscreen></iframe>';
ban[1]='<iframe title="YouTube video player" width="304" height="201" src="http://www.youtube.com/embed/1O8H5czrOjQ?rel=0" frameborder="0" allowfullscreen></iframe>';
ban[2]='<iframe title="YouTube video player" width="304" height="201" src="http://www.youtube.com/embed/d931-aV7BCs?rel=0" frameborder="0" allowfullscreen></iframe>';
ban[3]='<iframe title="YouTube video player" width="304" height="201" src="http://www.youtube.com/embed/28l8-aOT-ZU?rel=0" frameborder="0" allowfullscreen></iframe>';
ban[4]='<iframe title="YouTube video player" width="304" height="201" src="http://www.youtube.com/embed/6Ynv6tDUGik?rel=0" frameborder="0" allowfullscreen></iframe>';
ban[5]='<iframe title="YouTube video player" width="304" height="201" src="http://www.youtube.com/embed/Wp3JWtjrpgw?rel=0" frameborder="0" allowfullscreen></iframe>';
ban[6]='<iframe title="YouTube video player" width="304" height="201" src="http://www.youtube.com/embed/SFH2SCjThX4?rel=0" frameborder="0" allowfullscreen></iframe>';
ban[7]='<iframe title="YouTube video player" width="304" height="258" src="http://www.youtube.com/embed/mgoPrKsY9mk?rel=0" frameborder="0" allowfullscreen></iframe>';
ban[8]='<iframe title="YouTube video player" width="304" height="258" src="http://www.youtube.com/embed/Xayp2nJAzTY?rel=0" frameborder="0" allowfullscreen></iframe>';
ban[9]='<iframe title="YouTube video player" width="304" height="258" src="http://www.youtube.com/embed/01UujSYPYfU?rel=0" frameborder="0" allowfullscreen></iframe>';
ban[10]='<iframe title="YouTube video player" width="304" height="258" src="http://www.youtube.com/embed/YJjUwynuq3Y?rel=0" frameborder="0" allowfullscreen></iframe>';
ban[11]='<iframe title="YouTube video player" width="304" height="258" src="http://www.youtube.com/embed/J4efmzZ-U-I?rel=0" frameborder="0" allowfullscreen></iframe>';
ban[12]='<iframe title="YouTube video player" width="304" height="258" src="http://www.youtube.com/embed/xyoteQbxB4I?rel=0" frameborder="0" allowfullscreen></iframe>';
ban[13]='<iframe width="304" height="203" src="http://www.youtube.com/embed/E6Akkt9gR9c?rel=0" frameborder="0" allowfullscreen></iframe>';

document.write(ban[i]);
}
