/**********************************************
	スワップイメージ
**********************************************/
function preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.p) d.p=new Array();
    var i,j=d.p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];}}
}

function swapImgRestore() { //v3.0
  var i,x,a=document.sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function findObj(n, d) { //v4.01
  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=findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function swapImage() { //v3.0
  var i,j=0,x,a=swapImage.arguments; document.sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=findObj(a[i]))!=null){document.sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


/****************************************************************
	新規WINDOW SCRIPT
****************************************************************/
function openWindow(theURL) { //v2.0
		window.open(theURL,'nWin','left=0,top=0,toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=500,height=630').focus();
}

function openWindowMap01(theURL) { //v2.0
		window.open(theURL,'nWin','left=0,top=0,toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=670,height=560').focus();
}

function openWindowEco(theURL) { //v2.0
sw = screen.width - 20;
		window.open(theURL,'ecoWin','left=0,top=0,toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width='+sw+',height=560').focus();
}

function openWindowChara(theURL) { //v2.0
sw = screen.width - 20;
		window.open(theURL,'nWin','left=0,top=0,toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width='+sw+',height=560').focus();
}


function openWindow1(theURL,winName) { //v2.0
//↓newWindowこれが必要
newWindow =
window.open(theURL,winName,'left=0,top=0,toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=no,width=380,height=300')
newWindow.focus();
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
/**********************************************
	OS TYPE別リサイズ
**********************************************/
function openWindowPro(theURL) { //v2.0
newWindow =
window.open(theURL,'nWin','left=0,top=0,toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=500,height=620')
newWindow.focus();
}

function getOSType()
{
    str = navigator.userAgent.toUpperCase();
    if (str.indexOf("MAC") >= 0) return "MacOS";
    if (str.indexOf("WIN") >= 0) return "Windows";
    if (str.indexOf("X11") >= 0) return "UNIX";
    return "不明";
}
w = 515;
h = 650;
function reSize(w,h){
str = navigator.userAgent.toUpperCase();
  if (str.indexOf("MAC") >= 1) {
//↓newWindowこれが必要
  newWindow.resizeTo(w,h);
  }else{
/*  newWindow.resizeTo(w + 10,h + 35);    20070315 Ie7対応　製品情報Windowサイズ拡大　花村  */
  newWindow.resizeTo(w + 10,h + 85);
  }
}



/**********************************************
	更新日自動取得
**********************************************/
function lastRefix(date){
y = String(date.getFullYear());
m = String(date.getMonth() + 1);
d = String(date.getDate());
}
function Watch(){
	if(document.write){
	y1000=y.charAt(0);
	y100=y.charAt(1);
	y10=y.charAt(2);
	y1=y.charAt(3);
		if(m<10){
		/*	m1 = 0;　20060309変更　*/
			m1 = "";
			m2 = m;
		}else{
			m1 = m.charAt(0);
			m2 = m.charAt(1);
		}
		if(d<10){
		/*	d1 = 0;　20060309変更　*/
			d1 = "";
			d2 = d;
		}else{
			d1 = d.charAt(0);
			d2 = d.charAt(1);
		}
document.write("最新更新日："+y1000 + y100 + y10 + y1 +"年"+ m1 +m2 +"月"+ d1 + d2+"日");
	}
}

function WatchEn(){
var month =  m-1;
var mEn = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
	if(document.write){
		if(d<10){
		/*	d1 = 0;　20060309変更　*/
			d1 = "";
			d2 = d;
		}else{
			d1 = d.charAt(0);
			d2 = d.charAt(1);
		}
document.write(d1 + d2 + " " + mEn[month] + " " + y);
	}
}


/**********************************************
	TOPへ
**********************************************/
function scrollToPageTop () {
	if (window.scrollTo) {
		window.scrollTo (0, 0);
		return false;
	} else {
		return true;
	}
}


/****************************************************************
	フッター
****************************************************************/
function footerImg()
{
document.writeln('<div id="footer"><img src="/common/footer.gif"></div>');
}