//席とりくん予約用
function selectStage(kogyoCode) {
  document.TicSelectTokyuForm.kogyoCode.value = kogyoCode;
  document.TicSelectTokyuForm.submit();
}
//席とりくん予約用(2009/04/06〜)
function selectReserve(kogyoCode){
	var date = "";
	var today = "";
	date = document.TicSelectTokyuForm.orderDate.value;
	today = getDate() + " " + getTime();
//当日が先行予約終了日時前の場合は先行予約の日程一覧を表示
//当日が先行予約終了日時後の場合は一般予約の日程一覧を表示
	if (date == "") {	//先行予約終了日時が設定されていないので、一般予約の日程一覧を表示
		document.TicSelectTokyuForm.kogyoCode.value=kogyoCode;
		document.TicSelectTokyuForm.action="https://web.meijiza.com/sekitori/ticket/TicSelectTokyuAction.do";
	} else {
		if (date > today) {	//先行予約終了日時が当日より未来なので、先行予約の日程一覧を表示
			document.TicSelectTokyuForm.kogyoCode.value=kogyoCode;
			document.TicSelectTokyuForm.action="https://web.meijiza.com/sekitori/ticket/PreRsvPasDispAction.do";
		} else {	//先行予約終了日時が当日より過去なので、一般予約の日程一覧を表示
			document.TicSelectTokyuForm.kogyoCode.value=kogyoCode;
			document.TicSelectTokyuForm.action="https://web.meijiza.com/sekitori/ticket/TicSelectTokyuAction.do";
		}
	}
	document.TicSelectTokyuForm.submit();
}

function getDate(){
	var date = new Date();
	var year = date.getFullYear();
	var month = date.getMonth() + 1;
	var date = date.getDate();
	if (month < 10) {
		month = "0" + month;
	}
	if (date < 10) {
		date = "0" + date;
	}
	var strDate = year + "/" + month + "/" + date;
	return strDate;
}

function getTime(){
	var time = new Date();
	var Hour = time.getHours();
	var Minute = time.getMinutes();
	if (Hour < 10) {
		Hour = "0" + Hour;
	}
	if (Minute < 10) {
		Minute = "0" + Minute;
	}
	var strTime = Hour + ":" + Minute;
	return strTime;
}
//席とりくん予約用　ここまで

//座席表
function newWina(wURL){
  url = wURL + '.html'
  a = window.open(url,"a","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=430,height=685");
  a.focus();
}

//広告拡大
function newWinb(wURL){
  url = wURL + '.html'
  b = window.open(url,"b","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=520,height=740");
  b.focus();
}

//広告拡大 20100625
function newWinbb(wURL){
  url = wURL + '.html'
  b = window.open(url,"b","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=800,height=1200");
  b.focus();
}

//コシノものがたりNEWS
function news(wURL){
  url = wURL + '.html'
  n = window.open(url,"news","width=400,height=300");
  n.focus();
}

//広告拡大
function newWinb2(wURL){
  url = wURL + '.html'
  b2 = window.open(url,"b2","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=700,height=520");
  b.focus();
}

//広告拡大
function newWinb22(wURL){
  url = wURL + '.html'
  b22 = window.open(url,"b22","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=700,height=520");
  b.focus();
}

//広告拡大　横幅
function newWinb3(wURL){
  url = wURL + '.html'
  b = window.open(url,"b","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=695,height=520");
  b.focus();
}

//広告拡大　横幅
function newWinb4(wURL){
  url = wURL + '.html'
  b = window.open(url,"b","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=1090,height=810");
  b.focus();
}

//売店
function newWinc(wURL){
  url = wURL + '.html'
  b = window.open(url,"b","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=460,height=430");
  b.focus();
}


//座席表拡大
function newWind(wURL){
  url = wURL + '.html'
  d = window.open(url,"d","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=700,height=600");
  d.focus();
}

//座席表拡大2
function newWind2(wURL){
  url = wURL + '.html'
  d = window.open(url,"d","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=1000,height=650");
  d.focus();
}

//座席表拡大3
function newWind3(wURL){
  url = wURL + '.html'
  d = window.open(url,"d","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=400,height=650");
  d.focus();
}

//館内案内
function newWine(wURL){
  url = wURL + '.html'
  e = window.open(url,"e","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=320,height=350");
  e.focus();
}

//過去の公演一覧
function newImage(arg) {
  if (document.images) {
    rslt = new Image();
    rslt.src = arg;
    return rslt;
  }
}

function changeImages() {
  if (document.images && (preloadFlag == true)) {
    for (var i=0; i<changeImages.arguments.length; i+=2) {
      document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
    }
  }
}

var preloadFlag = false;
function preloadImages() {
  if (document.images) {
    id06_01_05_over = newImage("images/06_01_05-over.gif");
    id06_01_06_over = newImage("images/06_01_06-over.gif");
    id06_01_07_over = newImage("images/06_01_07-over.gif");
    id06_01_08_over = newImage("images/06_01_08-over.gif");
    id06_01_09_over = newImage("images/06_01_09-over.gif");
    id06_01_10_over = newImage("images/06_01_10-over.gif");
    id06_01_11_over = newImage("images/06_01_11-over.gif");
    id06_01_12_over = newImage("images/06_01_12-over.gif");
    id06_01_13_over = newImage("images/06_01_13-over.gif");
    id06_01_14_over = newImage("images/06_01_14-over.gif");
    id06_01_15_over = newImage("images/06_01_15-over.gif");
    preloadFlag = true;
  }
}

//劇場案内　全体図
function newImage2(arg) {
  if (document.images) {
    rslt = new Image();
    rslt.src = arg;
    return rslt;
  }
}

function changeImages2() {
  if (document.images && (preloadFlag == true)) {
    for (var i=0; i<changeImages.arguments.length; i+=2) {
      document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
    }
  }
}

var preloadFlag = false;
function preloadImages2() {
  if (document.images) {
    id02_05_02_06_over = newImage("images/02_05-02_06_over.gif");
    id02_06_over = newImage("images/02_06-over.gif");
    id02_08_02_09_over = newImage("images/02_08-02_09_over.gif");
    id02_09_over = newImage("images/02_09-over.gif");
    id02_10_02_11_over = newImage("images/02_10-02_11_over.gif");
    id02_11_over = newImage("images/02_11-over.gif");
    id02_12_02_13_over = newImage("images/02_12-02_13_over.gif");
    id02_13_over = newImage("images/02_13-over.gif");
    id02_14_02_15_over = newImage("images/02_14-02_15_over.gif");
    id02_15_over = newImage("images/02_15-over.gif");
    preloadFlag = true;
  }
}

//ページトップ
var Mac = navigator.appVersion.indexOf('Mac',0) != -1;
var Win = navigator.appVersion.indexOf('Win',0) != -1;
var IE  = navigator.appName.indexOf("Microsoft Internet Explorer",0) != -1;
var NN  = navigator.appName.indexOf("Netscape",0) != -1;
var Moz = navigator.userAgent.indexOf("Gecko") != -1;
var Vmajor = parseInt(navigator.appVersion);	// ex. 3
var Vminor = parseFloat(navigator.appVersion);	// ex. 3.01
var MacIE4 = ((Mac && navigator.appVersion.indexOf('MSIE 4.',0) != -1));
var MacIE3 = ((Mac && navigator.appVersion.indexOf('MSIE 3.',0) != -1));

function getScrollLeft() {
	if ((navigator.appName.indexOf("Microsoft Internet Explorer",0) != -1)) {
		return document.body.scrollLeft;
	} else if (window.pageXOffset) {
		return window.pageXOffset;
	}else{
		return 0;
	}
}

function getScrollTop() {
	if ((navigator.appName.indexOf("Microsoft Internet Explorer",0) != -1)) {
		return document.body.scrollTop;
	} else if (window.pageYOffset) {
		return window.pageYOffset;
	} else {
		return 0;
	}
}

function getScrollWidth() {
	if ((navigator.appName.indexOf("Microsoft Internet Explorer",0) != -1)) {
		return document.body.scrollWidth;
	} else if (window.innerWidth) {
		return window.innerWidth;
	}
	return 0;
}

function getScrollHeight() {
	if ((navigator.appName.indexOf("Microsoft Internet Explorer",0) != -1)) {
		return document.body.scrollHeight;
	} else if (window.innerHeight) {
		return window.innerHeight;
	}
	return 0;
}

var pageScrollTimer;

function pageScroll(toX,toY,frms,cuX,cuY) {
 if (pageScrollTimer) clearTimeout(pageScrollTimer);
 if (!toX || toX < 0) toX = 0;
 if (!toY || toY < 0) toY = 0;
 if (!cuX) cuX = 0 + getScrollLeft();
 if (!cuY) cuY = 0 + getScrollTop();
 if (!frms) frms = 6;

 cuX += (toX - getScrollLeft()) / frms; if (cuX < 0) cuX = 0;
 cuY += (toY - getScrollTop()) / frms;  if (cuY < 0) cuY = 0;
 var posX = Math.floor(cuX);
 var posY = Math.floor(cuY);
 window.scrollTo(posX, posY);
 if (posX != toX || posY != toY) {
  pageScrollTimer = setTimeout("pageScroll("+toX+","+toY+","+frms+","+cuX+","+cuY+")",16);
 }
}

function toTop(){
	if (!MacIE3 && !MacIE4 && !NN && window.scrollTo || NN && (Vminor >= 4.75) && window.scrollTo) {
		pageScroll(0,0,6);
	} else {
		location.hash = "top";
	}
}

//外商弁当1
function newWing(wURL){
  url = wURL + '.html'
  g = window.open(url,"g","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=600,height=525");
  g.focus();
}

//外商弁当2
function newWinh(wURL){
  url = wURL + '.html'
  h = window.open(url,"h","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=600,height=450");
  h.focus();
}

//外商弁当3
function newWini(wURL){
  url = wURL + '.html'
  i = window.open(url,"i","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=600,height=475");
  i.focus();
}

//外商弁当4
function newWinj(wURL){
  url = wURL + '.html'
  j = window.open(url,"j","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=600,height=560");
  j.focus();
}

//外商弁当5
function newWink(wURL){
  url = wURL + '.html'
  k = window.open(url,"k","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=600,height=430");
  k.focus();
}

//外商弁当6
function newWinl(wURL){
  url = wURL + '.html'
  l = window.open(url,"l","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=600,height=580");
  l.focus();
}

//外商弁当7
function newWinm(wURL){
  url = wURL + '.html'
  m = window.open(url,"m","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=700,height=650");
  m.focus();
}

//外商弁当8
function newWinn(wURL){
  url = wURL + '.html'
  n = window.open(url,"n","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=600,height=500");
  n.focus();
}

//チケット一覧1
function newWino(wURL){
  url = wURL + '.html'
  b = window.open(url,"o","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=600,height=520");
  b.focus();
}

//チケット一覧2
function newWinp(wURL){
  url = wURL + '.html'
  b = window.open(url,"p","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=600,height=560");
  b.focus();
}

//上演時間
function newWinq(wURL){
  url = wURL + '.html'
  b = window.open(url,"p","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=450,height=500");
  b.focus();

}
//PDF
function newWinr(wURL){
  url = wURL + '.html'
  m = window.open(url,"r","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=0,width=720,height=800");
  m.focus();
}

//コピーライトの年号自動カウント

//------------------------------------------------------------



function year() {  

var data = new Date();  

var now_year = data.getFullYear();  

document.write(now_year);  

}  



