///////////////////////////////////////////

///	『 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();



////////////////////////

// ブラウザーチェック //

////////////////////////

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 PrintPage(){
	if(document.getElementById || document.layers){
		window.print();		//印刷をします
	}
}

