///////////////////////////////////////////
///	『 JAVASCRIPTライブラリ 』	///
///		第一電子株式会社	///
///	Copyright (C) 2001		///
///	DaiichiDenshi Corporation.	///
///	All Rights Reserved.		///
///////////////////////////////////////////

//////////////
// 月日取得 //
//////////////
atDate = new Date();
atMonth = atDate.getMonth()+1;
atDate = atDate.getDate();

///////////////////////
// 直前のURLチェック //
///////////////////////
function checkURL(){
	nxtURL = 'http://www./';		//ジャンプ先のURL指定
	myURL = document.URL;			//現在のURL取得
	myHOST = location.hostname;		//ホスト名の取得
	oldURL = document.referrer;		//ジャンプ元のURL取得
	oldHOST = oldURL.substring(7,19);	//substring(http://の文字数,ドメインまでの文字数)
	if(oldHOST != myHOST || oldHOST == 0){location.href(nxtURL);}
}

////////////////////////////
// ポップアップウインドウ //
////////////////////////////
//【HTML記述例】
//popWin('表示させるアドレス',ウィンドウの幅,ウインドウの高さ,スクロールバーON/OFF);
function popWin(url,w,h,s){
	window.open(url, 'win','width='+ w +',height='+ h +',scrollbars=' + s + ',status=0,directories=0,menubar=0,resizable=1,toolbar=0,fullscreen=0,dependent=1');
}

////////////////////////
// クローズウインドウ //
////////////////////////
function CloseThisWindow () {
	close();
}

//////////////////////
//イメージプレロード//
//////////////////////
//【HTML記述例】
//<a href="javaScript:nextImg()">
//<img src="img1.jpg" name="myIMG">
//</a>
data = new Array("img1.jpg","img2.jpg","img3.jpg","img4.jpg");
prImg= new Array();
for (i=0; i<data.length; i++)
{
	prImg[i] = new Image();
	prImg[i].src = data[i];
}

//////////////////////////////
//サウンド再生(著作：中川氏)//
//////////////////////////////
//HTML記述例：onMouseDown="MM_controlSound('play','document.CS965640479383','btn/trim_low2.wav')"
function MM_controlSound(x, _sndObj, sndFile) { //v3.0
  var i, method = "", sndObj = eval(_sndObj);
  if (sndObj != null) {
    if (navigator.appName == 'Netscape') method = "play";
    else {
      if (window.MM_WMP == null) {
        window.MM_WMP = false;
        for(i in sndObj) if (i == "ActiveMovie") {
          window.MM_WMP = true; break;
      } }
      if (window.MM_WMP) method = "play";
      else if (sndObj.FileName) method = "run";
  } }
  if (method) eval(_sndObj+"."+method+"()");
  else window.location = sndFile;
}

function upDate(){
modDate = new Date(document('base.html').lastModified)
year = modDate.getYear()
minute = modDate.getMinutes()
second = modDate.getSeconds()

	if(modDate.getYear() < 2000){ year += 1900 }
	if(year < 1950){ year += 100 } // IE4, NN4の lastModified関連 Y2K対策
	if(modDate.getMinutes() < 10){ minute = "0" + minute }
	if(modDate.getSeconds() < 10){ second = "0" + second }

document.write("<font size=2 color=#FF6655><i>Last Update：<br>",year,"/",modDate.getMonth()+1,"/",modDate.getDate(),"</i></font>")
}

///////////////////////
// ウインドウリサイズ//
///////////////////////
function winResize(){
	if (navigator.appName == "Netscape"){
		moveTo(7, 7);
		resizeTo(715, 365);
	}
	else{
		if (navigator.appName == "Microsoft Internet Explorer"){
			moveTo(14, 50);
			resizeTo(747, 524);
		}
		else{
			alert("The window autoresize feature is not supported by your browser.  Please resize the window manually.");
		}
	}
}
