///////////////////////////////////////////
///	『 JAVASCRIPTライブラリ 』	///
///		第一電子株式会社	///
///	Copyright (C) 2001		///
///	DaiichiDenshi Corporation.	///
///	All Rights Reserved.		///
///////////////////////////////////////////

//////////////////
// フレーム解除 //
//////////////////
//if (self != top){ top.location.href = self.location.href; }
//if(this.name == ''){ location.href('index.html'); }

///////////////////////////////////
// Win/Macフォント統一スクリプト //
///////////////////////////////////
document.write('<style type="text/css"><!--');
if(navigator.platform=="MacPPC"){ document.write('.text { font-size:80%}') }
else{ document.write('.text { font-size:90%}') }
document .write('--></style>');

//////////////
// 月日取得 //
//////////////
atDate = new Date();
atMonth = atDate.getMonth()+1;
atDate = atDate.getDate();

//////////////////////
//イメージプレロード//
//////////////////////
//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];
//}

////////////////////////
// ブラウザーチェック //
////////////////////////
function navType(){
	if( navigator.appName == 'Microsoft Internet Explorer' ){
		if( navigator.appVersion == '4.0'){}
	}
	if( navigator.appName == 'Netscape' ){
		if( navigator.appVersion == '4.78'){}
		if( navigator.appVersion == '5.0'){}
	}
}

///////////////////////
// 直前の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);}
}

//////////////////////
// ファイル名の取得 //
//////////////////////
function GetFileName(file_url){
	file_url = file_url.substring(file_url.lastIndexOf("/")+1,file_url.length)
	//拡張子も取り除く場合は次の行のコメントアウトをはずしてください
	//file_url = file_url.substring(0,file_url.indexOf("."));
	return file_url;
MyFile = GetFileName(location.href);
}

////////////////////////////
// ポップアップウインドウ //
////////////////////////////
//【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 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.");
		}
	}
}

function Footer(){
MyFile = GetFileName(location.href);
	document.write('<table border="0" width="100%" cellpadding="0" cellspacing="0" class="middle">');
	document.write('<tr><td height="40">　</td></tr>');
	document.write('<tr><td align="center"><hr size="1" color="#F2A9A6"></td></tr>');
	if(MyFile == 'whatsnew.cgi' || MyFile == 'whatsnew.cgi?page=whatsnew' || MyFile == 'whatsnew.cgi?mode=admin&page=whatsnew'){
		document.write('<tr><td align="center"><img src="../images/cup.gif" width="40" heighht="40" align="absmiddle">【 <a href="../index.html" target="_top">トップへ戻る</a> 】</td></tr>');
	}
	else{
		document.write('<tr><td align="center"><img src="images/cup.gif" width="40" heighht="40" align="absmiddle">【 <a href="index.html" target="_top">トップへ戻る</a> 】</td></tr>');
	}
	document.write('</table>');
}
