/*-----------------------------------------------
	ポップアップウィンドウ
-----------------------------------------------*/
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>");
}