//遺言信託用Javascript

//共通使用－ロールオーバー
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_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_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];}
}

// プリロード処理

if(navigator.appVersion.charAt(0) >=3){
	var image = new Array();
	for( i = 0 ; i <= 9 ; i++ ){
		image[i] = new Image();
	}
// 下記の" "内の使用するファイル名に修正してください。
	image[0].src= "/trust/images/popup_footer_close_btn_on.gif";
	image[1].src= "/trust/images/confirm_btn_on.gif";
	image[2].src= "/trust/images/con08_handbook_btn_on.gif";
	image[3].src= "/trust/images/company/confirm_risona_btn_on.gif";
	image[4].src= "/trust/images/confirm/confirm01_yes_btn_on.gif";
	image[5].src= "/trust/images/confirm/confirm01_no_btn_on.gif";
	image[6].src= "/trust/images/confirm/confirm02_yes_btn_on.gif";
	image[7].src= "/trust/images/confirm/confirm02_no_btn_on.gif";
	image[8].src= "/trust/images/confirm/confirm03_yes_btn_on.gif";
	image[9].src= "/trust/images/confirm/confirm03_no_btn_on.gif";
}

//共通使用－ポップアップウィンドウ
function openwindow(strUrl,winName,winWidth,winHeight) {
  var features = 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=' + winWidth + ',height=' + winHeight;
  winName = window.open(strUrl,winName,features);
  winName.focus();
}

// ウィンドウCLOSE
function close_win(){
var nvua = navigator.userAgent;
if(nvua.indexOf('MSIE') >= 0){
	if(nvua.indexOf('MSIE 5.0') == -1) {
		top.opener = '';
	}
}
else if(nvua.indexOf('Gecko') >= 0){
	top.name = 'CLOSE_WINDOW';
	wid = window.open('','CLOSE_WINDOW');
}
top.close();
}

// ウィンドウを閉じてURLを変更
function jump_url(url) {
	window.opener.location.href = url;
	window.close();
} 

//トップページコンテンツ折りたたみ
function show01() {
	if(document.getElementById('contents01').style.display == 'none') {
		document.getElementById('contents01').style.display = 'block';
	}else{
		document.getElementById('contents01').style.display = 'none';
	}
}

function hide01() {
	document.getElementById('contents01').style.display = 'none';
}

function show02() {
	if(document.getElementById('contents02').style.display == 'none') {
		document.getElementById('contents02').style.display = 'block';
	}else{
		document.getElementById('contents02').style.display = 'none';
	}
}

function hide02() {
	document.getElementById('contents02').style.display = 'none';
}

function show03() {
	if(document.getElementById('contents03').style.display == 'none') {
		document.getElementById('contents03').style.display = 'block';
	}else{
		document.getElementById('contents03').style.display = 'none';
	}
}

function hide03() {
	document.getElementById('contents03').style.display = 'none';
}

function show04() {
	if(document.getElementById('contents04').style.display == 'none') {
		document.getElementById('contents04').style.display = 'block';
	}else{
		document.getElementById('contents04').style.display = 'none';
	}
}

function hide04() {
	document.getElementById('contents04').style.display = 'none';
}


/* added 090916
---------------------------------------------------------------*/

function show05() {
	if(document.getElementById('contents05').style.display == 'none') {
		document.getElementById('contents05').style.display = 'block';
	}else{
		document.getElementById('contents05').style.display = 'none';
	}
}

function hide05() {
	document.getElementById('contents05').style.display = 'none';
}




