///////////////////////////////////////////
///	『 JAVASCRIPTライブラリ 』	///
///		第一電子株式会社	///
///	Copyright (C) 2001		///
///	DaiichiDenshi Corporation.	///
///	All Rights Reserved.		///
///////////////////////////////////////////

//////////////////
// フレーム解除 //
//////////////////
//if (self != top) top.location.href = self.location.href;

///////////////////////////////////
// Win/Macフォント統一スクリプト //
///////////////////////////////////
document.write('<style type="text/css"><!--');
if(navigator.platform=="MacPPC"){ document.write('.text { font-size:10px}') }
else{ document.write('.text { font-size:11px}') }
document .write('--></style>');

//////////////
// 月日取得 //
//////////////
atDate = new Date();
atMonth = atDate.getMonth()+1;
atDate = atDate.getDate();

////////////////////////
// オンマウスオーバー //
////////////////////////
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];}}
}

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;
}

function MM_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}

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];}
}

//////////////////////
//イメージプレロード//
//////////////////////
//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.");
		}
	}
}


