/*スパム対策*/
<!--
function vspam(im,domain) {
  maddress = "mailto:" + im + "@" + domain;
  window.location.href = maddress;
}
// -->

function jpMenu(){
	document.getElementById("g-Nav").style.display="none";
	document.getElementById("g-Nav-jp").style.display="block";
}

/*オープンキャンパススペシャル*/
function ocSpWin(){
	st = "scrollbars=yes,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=no";
	wx = 620;
	wy = screen.height - (screen.height*0.15);
	x = (screen.width  - wx) / 2;
	y = ((screen.height - wy) / 2) - 30;
	newwin = window.open("oc_special.html","newWinOpen","left="+x+",top="+y+",width="+wx+",height="+wy+","+st);
	newwin.focus();
}

/*サマースクール*/
function summerWin(){
	st = "scrollbars=yes,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=no";
	wx = 620;
	wy = screen.height - (screen.height*0.15);
	x = (screen.width  - wx) / 2;
	y = ((screen.height - wy) / 2) - 30;
	newwin = window.open("summer_school.html","newWinOpen","left="+x+",top="+y+",width="+wx+",height="+wy+","+st);
	newwin.focus();
}

/*早稲田外語メニュー*/
function menuWin(){
	st = "scrollbars=yes,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=no";
	wx = 620;
	wy = 670;
	x = (screen.width  - wx) / 2;
	y = ((screen.height - wy) / 2) - 30;
	newwin = window.open("menu.html","newWinOpen","left="+x+",top="+y+",width="+wx+",height="+wy+","+st);
	newwin.focus();
}

/*extetion*/
function extentionWin(){
	st = "scrollbars=yes,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=no";
	wx = 800;
	wy = 670;
	x = (screen.width  - wx) / 2;
	y = ((screen.height - wy) / 2) - 30;
	newwin = window.open("extention.html","newWinOpen","left="+x+",top="+y+",width="+wx+",height="+wy+","+st);
	newwin.focus();
}

/*ページの先頭へ戻る*/
function backToTop() {
	var x1 = x2 = x3 = 0;
	var y1 = y2 = y3 = 0;
	if (document.documentElement) {
		x1 = document.documentElement.scrollLeft || 0;
		y1 = document.documentElement.scrollTop || 0;
	}
	if (document.body) {
		x2 = document.body.scrollLeft || 0;
		y2 = document.body.scrollTop || 0;
	}
	x3 = window.scrollX || 0;
	y3 = window.scrollY || 0;
	var x = Math.max(x1, Math.max(x2, x3));
	var y = Math.max(y1, Math.max(y2, y3));
	window.scrollTo(Math.floor(x / 1.4), Math.floor(y / 1.4));
	if (x > 0 || y > 0) {
		window.setTimeout("backToTop()", 10);
	}
}
