
/* -----------------------------------------------
JS file KALS.
FileName:default.js
----------------------------------------------- */

// PRELOAD IMAGES
function revPreloadImages(the_images_array) {
	for(var loop = 0; loop < the_images_array.length; loop++) {
		var an_image = new Image();
		an_image.src = the_images_array[loop];
	}
}
var the_images = new Array(
'../images/global_01_ovr.gif',
'../images/global_02_ovr.gif',
'../images/global_03_ovr.gif',
'../images/global_04_ovr.gif',
'../images/global_05_ovr.gif',
'../../images/ind_menu_01_ovr.gif',
'../../images/ind_menu_02_ovr.gif',
'../../images/ind_menu_03_ovr.gif',
'../../images/ind_menu_04_ovr.gif',
'../../images/ind_menu_05a_ovr.gif',
'../../images/ind_menu_05b_ovr.gif',
'../../images/ind_menu_06_ovr.gif',
'../../images/ind_menu_07_ovr.gif',
'../../images/ind_menu_08_ovr.gif',
'images/btn_shinri_ovr.gif',
'images/btn_mba_ovr.gif',
'images/btn_zei_ovr.gif',
'images/btn_rikei_ovr.gif',
'images/btn_public_ovr.gif',
'images/btn_politics_ovr.gif',
'images/btn_kokusai_ovr.gif',
'images/btn_english_ovr.gif'
);
revPreloadImages(the_images);


// SWAP IMAGES(MM)
function MM_swapImgRestore() { //v3.0
	var i,x,a=document.MM_sr; for(i=0; a&&i<a.length&&(x=a[i])&&x.oSrc; i++) x.src=x.oSrc;
}


// SWAP IMAGES RESTORE(MM)
function MM_swapImage() { //v3.0
	var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0; i<(a.length-2); i+=3)
	if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


// PRELOAD IMAGES(MM)
function MM_preloadImages() { //v3.0
	var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
		var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
		if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


// FIND OBJECT(MM)
function MM_findObj(n, d) { //v4.01
	var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);
	}
	if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0; !x&&i<d.forms.length; i++) x=d.forms[i][n];
	for(i=0; !x&&d.layers&&i<d.layers.length; i++) x=MM_findObj(n,d.layers[i].document);
	if(!x && d.getElementById) x=d.getElementById(n); return x;
}


// SWAP_IMAGES
var revStockUaObj,revStockUaSrc;
function revSetOverAction(_obj){
	revStockUaObj = _obj;
	revStockUaSrc = _obj.firstChild.src;
	var s = revStockUaSrc.indexOf(".gif");
	_obj.firstChild.src = revStockUaSrc.substring(0,s) + "_ovr.gif";
}
function revSetOutAction(){
	revStockUaObj.firstChild.src = revStockUaSrc;
}
// CURRICULUM_WINDOW_OPEN
function CrclmWin() {
	UtilityWindow=window.open("","curriculum","width=900,height=600,toolbar=1,location=0,status=1,menubar=1,scrollbars=1,resizable=1");
	UtilityWindow.focus();
}
// CURRICULUM_WINDOW_OPEN_MIDDLE
function CrclmMidWin() {
	UtilityWindow=window.open("","curriculummid","width=617,height=400,toolbar=1,location=0,status=1,menubar=1,scrollbars=1,resizable=1");
	UtilityWindow.focus();
}
// KALS_WINDOW_OPEN
function KalsWin() {
	UtilityWindow=window.open("","kals","width=617,height=515,toolbar=1,location=0,status=1,menubar=1,scrollbars=1,resizable=1");
	UtilityWindow.focus();
}
// HENNYU_KALS_WINDOW_OPEN
function HenKalsWin() {
	UtilityWindow=window.open("","henkals","width=617,height=270,toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1");
	UtilityWindow.focus();
}
// SUBJECT_WINDOW_OPEN
function SubjeWin() {
	UtilityWindow=window.open("","subject","width=600,height=290,toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=1");
	UtilityWindow.focus();
}
// SUBJECT_WINDOW_OPEN_LONG
function SubjeLongWin() {
	UtilityWindow=window.open("","subjectlong","width=600,height=540,toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=1");
	UtilityWindow.focus();
}
// SUBJECT_WINDOW_OPEN_middle
function SubjeMiddleWin() {
	UtilityWindow=window.open("","subjectmiddlewin","width=640,height=540,toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1");
	UtilityWindow.focus();
}
// SCHEDULE_WINDOW_OPEN
function ScheWin() {
	UtilityWindow=window.open("","schedule","width=617,height=600,toolbar=1,location=0,status=1,menubar=1,scrollbars=1,resizable=1");
	UtilityWindow.focus();
}
// SCHEDULE_WINDOW_OPEN_SHORT
function ScheShortWin() {
	UtilityWindow=window.open("","scheduleshort","width=617,height=300,toolbar=1,location=0,status=1,menubar=1,scrollbars=1,resizable=1");
	UtilityWindow.focus();
}
// WAKARU_WINDOW_OPEN_SHORT
function WakaruWin() {
	UtilityWindow=window.open("","participant","width=667,height=590,toolbar=1,location=0,status=1,menubar=1,scrollbars=1,resizable=1");
	UtilityWindow.focus();
}
// PARTICIPANT_WINDOW_OPEN_SHORT
function ParticipantWin() {
	UtilityWindow=window.open("","participant","width=617,height=590,toolbar=1,location=0,status=1,menubar=1,scrollbars=1,resizable=1");
	UtilityWindow.focus();
}
// KYOUIN_TOP_WINDOW_OPEN_SHORT
function kyouintopWin() {
	UtilityWindow=window.open("","participant","width=667,height=590,toolbar=1,location=0,status=1,menubar=1,scrollbars=1,resizable=1");
	UtilityWindow.focus();
}
// HOUKA_TOP_WINDOW_OPEN_SHORT
function houkatopWin() {
	UtilityWindow=window.open("","participant","width=860,height=600,toolbar=1,location=0,status=1,menubar=1,scrollbars=1,resizable=1");
	UtilityWindow.focus();
}
// PLAN_WINDOW_OPEN
function PlunWin() {
	UtilityWindow=window.open("","plun","width=617,height=300,toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1");
	UtilityWindow.focus();
}
// BEGINNING_ATTENDING_A_LECTURE_MONTH
function LectureWin() {
	UtilityWindow=window.open("","lecture","width=720,height=600,toolbar=1,location=1,status=1,menubar=1,scrollbars=1,resizable=1");
	UtilityWindow.focus();
}
// HOUGAKU_BACKNUMBER
function hougakuBack() {
	UtilityWindow=window.open("","participant","width=520,height=290,toolbar=1,location=1,status=1,menubar=1,scrollbars=1,resizable=1");
	UtilityWindow.focus();
}
// TUSSHIN_WINDOW_OPEN
function TusshinWin() {
	UtilityWindow=window.open("","tusshin","width=617,height=590,toolbar=1,location=0,status=1,menubar=1,scrollbars=1,resizable=1");
	UtilityWindow.focus();
}
// MAP_WINDOW_OPEN
function MapWin() {
	UtilityWindow=window.open("","map","width=617,height=570,toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1");
	UtilityWindow.focus();
}
// RECRUIT_WINDOW_OPEN
function RecruitWin() {
	UtilityWindow=window.open("","recruit","width=617,height=570,toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1");
	UtilityWindow.focus();
}
// GUIDANCE_WINDOW_OPEN_SHORT
function GuidanceWin() {
	UtilityWindow=window.open("","guidance","width=667,height=590,toolbar=1,location=0,status=1,menubar=1,scrollbars=1,resizable=1");
	UtilityWindow.focus();
}
// 2007/03/13
function News700Win() {
	UtilityWindow=window.open("","participant","width=700,height=700,toolbar=1,location=0,status=1,menubar=1,scrollbars=1,resizable=1");
	UtilityWindow.focus();
}

// NEWS_WINDOW_OPEN_LONG
function NewsLongWin() {
	UtilityWindow=window.open("","newslong","width=620,height=700,toolbar=0,location=0,status=1,menubar=1,scrollbars=1,resizable=1");
	UtilityWindow.focus();
}

//—Õ°S—
function OpenWin1() {
	window.open("pop_shinri01.html", "", "width=800,height=780,menubar=no,toolbar=no,scrollbars=yes,resizable=yes");
}

//‘“àMBA
function OpenWin2() {
	window.open("pop_mba01.html", "", "width=800,height=780,menubar=no,toolbar=no,scrollbars=yes,resizable=yes");
}

//Å—Žm
function OpenWin3() {
	window.open("pop_zei01.html", "", "width=800,height=780,menubar=no,toolbar=no,scrollbars=yes,resizable=yes");
}

//—Œn‘åŠw‰@
function OpenWin4() {
	window.open("pop_rikei01.html", "", "width=800,height=780,menubar=no,toolbar=no,scrollbars=yes,resizable=yes");
}

//Œö‹¤­ô
function OpenWin5() {
	window.open("pop_public01.html", "", "width=800,height=780,menubar=no,toolbar=no,scrollbars=yes,resizable=yes");
}

//ŒoÏŒn
function OpenWin6() {
	window.open("pop_politics01.html", "", "width=800,height=780,menubar=no,toolbar=no,scrollbars=yes,resizable=yes");
}

//‘ÛŠÖŒW
function OpenWin7() {
	window.open("pop_kokusai01.html", "", "width=800,height=780,menubar=no,toolbar=no,scrollbars=yes,resizable=yes");
}

//‰pŒê•˜_q
function OpenWin8() {
	window.open("pop_english01.html", "", "width=800,height=780,menubar=no,toolbar=no,scrollbars=yes,resizable=yes");
}

//—Õ°S—ƒ`ƒ…[ƒgƒŠƒAƒ‹
function OpenWin9() {
	window.open("pop_shinri_tutorial.html", "", "width=800,height=780,menubar=no,toolbar=no,scrollbars=yes,resizable=yes");
}

//‘“àMBAƒ`ƒ…[ƒgƒŠƒAƒ‹
function OpenWin10() {
	window.open("pop_mba_tutorial.html", "", "width=800,height=780,menubar=no,toolbar=no,scrollbars=yes,resizable=yes");
}

//Å—Žmƒ`ƒ…[ƒgƒŠƒAƒ‹
function OpenWin11() {
	window.open("pop_zei_tutorial.html", "", "width=800,height=780,menubar=no,toolbar=no,scrollbars=yes,resizable=yes");
}

//—Œn‘åŠw‰@ƒ`ƒ…[ƒgƒŠƒAƒ‹
function OpenWin12() {
	window.open("pop_rikei_tutorial.html", "", "width=800,height=780,menubar=no,toolbar=no,scrollbars=yes,resizable=yes");
}

//Œö‹¤­ôƒ`ƒ…[ƒgƒŠƒAƒ‹
function OpenWin13() {
	window.open("pop_public_tutorial.html", "", "width=800,height=780,menubar=no,toolbar=no,scrollbars=yes,resizable=yes");
}

//ŒoÏŒnƒ`ƒ…[ƒgƒŠƒAƒ‹
function OpenWin14() {
	window.open("pop_politics_tutorial.html", "", "width=800,height=780,menubar=no,toolbar=no,scrollbars=yes,resizable=yes");
}

//‘ÛŠÖŒWƒ`ƒ…[ƒgƒŠƒAƒ‹
function OpenWin15() {
	window.open("pop_kokusai_tutorial.html", "", "width=800,height=780,menubar=no,toolbar=no,scrollbars=yes,resizable=yes");
}

//‰pŒê•˜_qƒ`ƒ…[ƒgƒŠƒAƒ‹
function OpenWin16() {
	window.open("pop_english_tutorial.html", "", "width=800,height=780,menubar=no,toolbar=no,scrollbars=yes,resizable=yes");
}

//—Œn•Ò“üŽŽŒ±î•ñ
function OpenWin17() {
	window.open("pop_rikeihennyu01.html", "", "width=800,height=780,menubar=no,toolbar=no,scrollbars=yes,resizable=yes");
}

//•¶Œn•Ò“üŽŽŒ±î•ñ
function OpenWin18() {
	window.open("pop_bunkeihernnyu01.html", "", "width=800,height=780,menubar=no,toolbar=no,scrollbars=yes,resizable=yes");
}

//ŽÐ‰ïl“üŽŽî•ñ
function OpenWin19() {
	window.open("pop_syakaijinnyushi01.html", "", "width=800,height=780,menubar=no,toolbar=no,scrollbars=yes,resizable=yes");
}

//KALS“úŽ
function OpenWin20() {
	window.open("pop_kalsnisshi01.html", "", "width=800,height=780,menubar=no,toolbar=no,scrollbars=yes,resizable=yes");
}

//school shinjuku 1
function NewWin_shinjuku1() {
	window.open("pop_shinjuku01.html", "", "width=700,height=700,menubar=no,toolbar=no,scrollbars=no,resizable=yes");
}

//school shinjuku 2
function NewWin_shinjuku2() {
	window.open("pop_shinjuku02.html", "", "width=700,height=700,menubar=no,toolbar=no,scrollbars=no,resizable=yes");
}

//school shinjuku 3
function NewWin_shinjuku3() {
	window.open("pop_shinjuku03.html", "", "width=700,height=700,menubar=no,toolbar=no,scrollbars=no,resizable=yes");
}

//school shinjuku 4
function NewWin_shinjuku4() {
	window.open("pop_shinjuku04.html", "", "width=700,height=700,menubar=no,toolbar=no,scrollbars=no,resizable=yes");
}



//school yokohama 1
function NewWin1() {
	window.open("pop_01.html", "", "width=600,height=600,menubar=no,toolbar=no,scrollbars=no,resizable=yes");
}

//school yokohama 2
function NewWin2() {
	window.open("pop_02.html", "", "width=600,height=600,menubar=no,toolbar=no,scrollbars=no,resizable=yes");
}

//school yokohama 3
function NewWin3() {
	window.open("pop_03.html", "", "width=600,height=600,menubar=no,toolbar=no,scrollbars=no,resizable=yes");
}

//school yokohama 4
function NewWin4() {
	window.open("pop_04.html", "", "width=600,height=600,menubar=no,toolbar=no,scrollbars=no,resizable=yes");
}

//school meieki 1
function NewWin_mei1() {
	window.open("pop_mei01.html", "", "width=600,height=600,menubar=no,toolbar=no,scrollbars=no,resizable=yes");
}

//school meieki 2
function NewWin_mei2() {
	window.open("pop_mei02.html", "", "width=600,height=600,menubar=no,toolbar=no,scrollbars=no,resizable=yes");
}

//school meieki 3
function NewWin_mei3() {
	window.open("pop_mei03.html", "", "width=600,height=600,menubar=no,toolbar=no,scrollbars=no,resizable=yes");
}

//school meieki 4
function NewWin_mei4() {
	window.open("pop_mei04.html", "", "width=600,height=600,menubar=no,toolbar=no,scrollbars=no,resizable=yes");
}

//school osaka 1
function NewWin_osaka1() {
	window.open("pop_osaka01.html", "", "width=600,height=600,menubar=no,toolbar=no,scrollbars=no,resizable=yes");
}

//school osaka 2
function NewWin_osaka2() {
	window.open("pop_osaka02.html", "", "width=600,height=600,menubar=no,toolbar=no,scrollbars=no,resizable=yes");
}

//school osaka 3
function NewWin_osaka3() {
	window.open("pop_osaka03.html", "", "width=600,height=600,menubar=no,toolbar=no,scrollbars=no,resizable=yes");
}

//school osaka 4
function NewWin_osaka4() {
	window.open("pop_osaka04.html", "", "width=600,height=600,menubar=no,toolbar=no,scrollbars=no,resizable=yes");
}

//school kyoto 1
function NewWin_kyoto1() {
	window.open("pop_kyoto01.html", "", "width=600,height=600,menubar=no,toolbar=no,scrollbars=no,resizable=yes");
}

//school kyoto 2
function NewWin_kyoto2() {
	window.open("pop_kyoto02.html", "", "width=600,height=600,menubar=no,toolbar=no,scrollbars=no,resizable=yes");
}

//school kyoto 3
function NewWin_kyoto3() {
	window.open("pop_kyoto03.html", "", "width=600,height=600,menubar=no,toolbar=no,scrollbars=no,resizable=yes");
}

//school kyoto 4
function NewWin_kyoto4() {
	window.open("pop_kyoto04.html", "", "width=600,height=600,menubar=no,toolbar=no,scrollbars=no,resizable=yes");
}

//school yokohama 1
function NewWin_yokohama1() {
	window.open("pop_yokohama01.html", "", "width=600,height=600,menubar=no,toolbar=no,scrollbars=no,resizable=yes");
}

//school yokohama 2
function NewWin_yokohama2() {
	window.open("pop_yokohama02.html", "", "width=600,height=600,menubar=no,toolbar=no,scrollbars=no,resizable=yes");
}

//school yokohama 3
function NewWin_yokohama3() {
	window.open("pop_yokohama03.html", "", "width=600,height=600,menubar=no,toolbar=no,scrollbars=no,resizable=yes");
}

//school yokohama 4
function NewWin_yokohama4() {
	window.open("pop_yokohama04.html", "", "width=600,height=600,menubar=no,toolbar=no,scrollbars=no,resizable=yes");
}
// SWAP IMAGES (use for multi-images swap at the same time)
// Notes: revSetOverAction and revSetOutAction cannot use because it save and restore just 1 image
// -- written by Tung Lam, IMJV

function swapImg()
{
	for (i=0;i<arguments.length;i++)
	{
		var obj=document.getElementById(arguments[i]);
		if (obj!=null)
		{
			var st = obj.src;
			if (st.indexOf('_on.gif')!=-1)
				st=st.replace('_on.gif', '.gif')
			else
				st=st.replace('.gif', '_on.gif');
			
			obj.src=st;
		}
	}
}


