/*-------------------------------------------------------------------------------* * File: ElqHP.js * Author: MyELQ Team * Purpose: コースのための外部 JavaScript ファイル * Usage: このファイルを利用する JSP,HTML ファイルは, 内に * 記述すること *-------------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------------* * Name: WindowOpenUpSide() * Task: 説明用のポップアップウィンドウを開く。すでに開かれていても必ず上に開く。 * Usage: WindowOpenUpSide(ウィンドウ名, URL, タイトル文字); * Author: Aike *------------------------------------------------------------------------------*/ var up_window = null; var up_window1 = null; var up_window2 = null; var DemoMenu = null; var Demo = null; function WindowOpenUpSide(windowname, url, title) { if( windowname != null && ! eval(windowname).closed ) { eval(windowname).location.replace( url ); eval(windowname).focus(); } else { windowname = window.open( url,title,"toolbar=no,location=no,directories=no,status=no,resizable=yes,scrollbars=yes,menubar=no"); //eval(windowname).focus(); } return false; } function WindowOpenUpSideBar(windowname, url, title) { if( windowname != null && ! eval(windowname).closed ) { eval(windowname).location.replace( url ); eval(windowname).focus(); } else { windowname = window.open( url,title,"toolbar=yes,location=yes,directories=yes,status=yes,resizable=yes,scrollbars=yes,menubar=yes"); //eval(windowname).focus(); } return false; } /*-----------------------------------------------------------------------------* * Name: WindowOpenSize() * Task: 説明用のポップアップウィンドウを開く。すでに開かれていても必ず上に開く。 * Window size is fixed as specified by the caller. * Usage: WindowOpenUpSize(window-name, URL, title, hight, width); * Author: Mike 2003-4-24 *-----------------------------------------------------------------------------*/ var hh = null; var ww = null; var features = null; function WindowOpenSize(windowname, url, title, hh, ww) { if( windowname != null && ! Eval(windowname).closed ) { eval(windowname).location.replace( url ); eval(windowname).focus(); } else { features = "toolbar=no,location=no,directories=no,status=no,resizable=yes,scrollbars=yes,menubar=no, height=" + hh + ", width=" + ww; windowname = window.open(url,title,features); //eval(windowname).focus(); } return false; } /*------------------------------------------------------------------------------*/ /*-------------------------------------------* * Name: popWin() * Task: VPS 用のポップアップウィンドウを開く * Usage: popWin(); * Author: Takeo Nishii -> nazo@cij.com *-------------------------------------------*/ var formRes; function popWin() { formRes = window.open("", "Result", "resizable=no,menubar=no,directories=no, status=no, location=no, width=560, height=620"); /* setTimeout('formRes.focus();', 200); */ } /*-------------------------------------------* * Name: openWin * Task: ポップアップウィンドウを開く * Usage: openWin(url, name, w, h, scroll); * where: * url : ポップアップウィンドウのためのURL * name: 新しいウィンドウの名前 * w : 新しいウィンドウの width * h : 新しいウィンドウの height * scroll: スクロールバーの有無(1か0) *-------------------------------------------*/ var newWin; function openWin(url, name, w, h, scroll) { /* window.open メソッドの3番目のアーギュメントを用意する */ var features = 'width=' + w + ',height=' + h + ',dependent=1,resizable=0,menubar=0,scrollbars=' + scroll; /* ウィンドウがすでに開いていて閉じられていないなら,まず閉じる */ if (newWin && (!newWin.closed)) { newWin.close(); } /* ウィンドウを開く */ newWin = window.open(url, name, features); /* 新しいウィンドウにフォーカス*/ /* 200 ms のディレイは,IEのバグに対処するため */ setTimeout('newWin.focus();', 200); } /*-------------------------------------------* * Name: soundplay * サウンドを再生する *-------------------------------------------*/ function soundplay(soundname) { document[soundname].play(); } /*-------------------------------------------* * Name: imgOn,imgOff,TimgOn,TimgOff * イメージのOn,Off *-------------------------------------------*/ /* Function to activate images. */ function imgOn(imgName) { if (document.images) { document[imgName].src = eval(imgName + "On.src"); } } /* Function to deactivate images. */ function imgOff(imgName) { if (document.images) { document[imgName].src = eval(imgName + ".src"); } } /* Function to activate images. */ function TimgOn(imgName, Target, TimgName) { if (document.images) { document[Target].src = eval(imgName + "On.src"); document["A" + Target].src = eval(TimgName + "On.src"); } } /* Function to deactivate images. */ function TimgOff(imgName ,Target, TimgName) { if (document.images) { document[Target].src = eval(imgName + ".src"); document["A" + Target].src = eval(TimgName + ".src"); } } /*-------------------------------------------* * Name: ***Init * イメージの設定 *-------------------------------------------*/ var image_dir = "./../Images" var image_dir2 = "./../../Images" function SoundGuideInit() { if (document.images) { /* Active Images */ SoundGuide = new Image(); SoundGuide.src = image_dir+"/SoundGuide.gif"; SoundGuideOn = new Image(); SoundGuideOn.src = image_dir+"/SoundGuideOn.gif"; } } function CloseWindowInit() { if (document.images) { /* Active Images */ CloseWindow = new Image(); CloseWindow.src = image_dir+"/CloseWindow.gif"; CloseWindowOn = new Image(); CloseWindowOn.src = image_dir+"/CloseWindowOn.gif"; } } function CloseWindowInit2() { if (document.images) { /* Active Images */ CloseWindow = new Image(); CloseWindow.src = image_dir2+"/CloseWindow.gif"; CloseWindowOn = new Image(); CloseWindowOn.src = image_dir2+"/CloseWindowOn.gif"; } } function MenuInit() { if (document.images) { /* Active Images */ Item = new Image(); Item.src = "../Images/MyELQItem.gif"; ItemOn = new Image(); ItemOn.src = "../Images/MyELQItemOn.gif"; Apply = new Image(); Apply.src = "../Images/MyELQApply.gif"; ApplyOn = new Image(); ApplyOn.src = "../Images/MyELQApplyOn.gif"; Mission = new Image(); Mission.src = "../Images/MyELQMission.gif"; MissionOn = new Image(); MissionOn.src = "../Images/\MyELQMissionOn.gif"; Merit = new Image(); Merit.src = "../Images/MyELQ5Merit.gif"; MeritOn = new Image(); MeritOn.src = "../Images/MyELQ5MeritOn.gif"; Matrix = new Image(); Matrix.src = "../Images/MyELQMatrix.gif"; MatrixOn = new Image(); MatrixOn.src = "../Images/MyELQMatrixOn.gif"; SVSEC = new Image(); SVSEC.src = "../Images/SVSECourse.gif"; SVSECOn = new Image(); SVSECOn.src = "../Images/SVSECourseOn.gif"; MyELQTop = new Image(); MyELQTop.src = "../Images/MyELQTop.gif"; MyELQTopOn = new Image(); MyELQTopOn.src = "../Images/MyELQTopOn.gif"; MyELQOpen = new Image(); MyELQOpen.src = "../Images/MyELQOpen.gif"; MyELQOpenOn = new Image(); MyELQOpenOn.src = "../Images/MyELQOpenOn.gif"; LiveCamera = new Image(); LiveCamera.src = "../Images/LiveCamera.gif"; LiveCameraOn = new Image(); LiveCameraOn.src = "../Images/LiveCameraOn.gif"; Gallery = new Image(); Gallery.src = "../Images/MyELQGallery.gif"; GalleryOn = new Image(); GalleryOn.src = "../Images/MyELQGalleryOn.gif"; MyELQTop = new Image(); MyELQTop.src = "../Images/MyELQTop.gif"; MyELQTopOn = new Image(); MyELQTopOn.src = "../Images/MyELQTopOn.gif"; Lake = new Image(); Lake.src = "../Images/MyELQLake.gif"; LakeOn = new Image(); LakeOn.src = "../Images/MyELQLakeOn.gif"; ConfExpo = new Image(); ConfExpo.src = "../Images/MyELQConference.gif"; ConfExpoOn = new Image(); ConfExpoOn.src = "../Images/MyELQConferenceOn.gif"; MyELQAgeOfELearning = new Image(); MyELQAgeOfELearning.src = "../Images/MyELQAgeOfELearning.gif"; MyELQAgeOfELearningOn = new Image(); MyELQAgeOfELearningOn.src = "../Images/MyELQAgeOfELearningOn.gif"; } } function ItemNoInit( item, no ) { if(document.images) { eval( item+no+" = new Image();" ); eval( item+no+".src = '"+image_dir+"/"+item+".gif';" ); eval( item+no+"On = new Image();" ); eval( item+no+"On.src ='"+image_dir+"/"+item+"On.gif';" ); } } function ItemInit( item ) { if(document.images) { eval( item+" = new Image();" ); eval( item+".src = '"+image_dir+"/"+item+".gif';" ); eval( item+"On = new Image();" ); eval( item+"On.src ='"+image_dir+"/"+item+"On.gif';" ); } }