


// ************　元のウィンドウを変化　*************
	
function ctrlWin(url) {
	window.opener.location.href = url;
}

// ************　別窓を閉じて元のウィンドウを変化　*************
	
function ctrlWin_close(url) {
	window.opener.location.href = url;
	opener.focus();
	window.close();
}

// ************　ご案内ポップアップ　*************

function opengoannai(url,winName,features) { //v2.0
  newWindow = window.open(url,"goannai","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=425,height=500,top=0,left,0");
	newWindow.focus();
}

// ************　メニュー表示・非表示切り替え　*************

function hideandshow (zap) {
	if (document.getElementById){
		var showhide = document.getElementById(zap).style;
		if (showhide.display == "block"){
			showhide.display = "none";
			}else{
			showhide.display = "block"
			}
			return false
			} else {
			return true
			}
}

// ************　ポップアップと次のページへ　その1　*************
// ポップアップのURL
pop_url = "http://www.omotesenke.com/";

// ポップアップのパラメータ
pop_p = "toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=800,height=650";

// 次のページのURL
next_url = "tobira.html";

function nextPage(){
	win = window.open(pop_url, "popup", pop_p);
	win.focus();
	location.href = next_url;
}

// ************　ポップアップと次のページへ　その2　*************
// ポップアップのURL
pop_url2 = "chanoyu/kousin.html";

// ポップアップのパラメータ
pop_p2 = "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=425,height=500,top=0,left,0";

// 次のページのURL
next_url2 = "chanoyu/mokuji.html";

function nextPage2(){
	win = window.open(pop_url2, "goannai", pop_p2);
	win.focus();
	location.href = next_url2;
}

// -------------------- Window -------------------- //

function subWin(url){
	w = 460;
	h = 420;
	e = "toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes";

	p = e + ",width=" +w+ ",height=" +h;
	win = window.open(url, "subwin", p);
	win.focus();
}

function subWinm(url){
	w = 460;
	h = 500;
	e = "toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes";

	d = new Date();
	n = d.getMinutes() +"_"+ d.getMilliseconds();
	p = e + ",width=" +w+ ",height=" +h;
	win = window.open(url, n, p);
	win.focus();
}

function openWin(url, n, w, h){
	e = "toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes";

	p = e + ",width=" +w+ ",height=" +h;
	win = window.open(url, n, p);
	win.resizeTo(w+10, h+40);
	win.focus();
}
