function MM_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=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.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];}
}
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 changeImage(image_id, image_src) {
	document.getElementById(image_id).src=image_src;
}
function returnImage(image_id, image_src) {
	document.getElementById(image_id).src=image_src;
}

/*----------------
	IR biz_highlight.html
	IR procedure.html
-----------------*/
function divDisp(div_id){
	document.getElementById(div_id).style.display = "block";
}
function divHide(div_id){
	document.getElementById(div_id).style.display = "none";
}

/*----------------
	new list
	
	HOME 
	IR index.html
	Topics index.html
-----------------*/
function overNews(id_num, src_arrow){
	document.getElementById("date"+id_num).style.color = "#000099";	
	document.getElementById("category"+id_num).style.color = "#000099";	
	document.getElementById("text"+id_num).style.color = "#000099";	
	document.getElementById("arrowlink"+id_num).src = src_arrow;
}

function outNews(id_num, src_arrow){
	document.getElementById("date"+id_num).style.color = "#333333";	
	document.getElementById("category"+id_num).style.color = "#333333";	
	document.getElementById("text"+id_num).style.color = "#333333";	
	document.getElementById("arrowlink"+id_num).src = src_arrow;
}

/*----------------
	new list
	
	Topics index.html
-----------------*/
function overNews2(id_num, src_arrow){
	document.getElementById("date"+id_num).style.color = "#000099";	
	//document.getElementById("category"+id_num).style.color = "#000099";	
	document.getElementById("text"+id_num).style.color = "#000099";	
	document.getElementById("arrowlink"+id_num).src = src_arrow;
}

function outNews2(id_num, src_arrow){
	document.getElementById("date"+id_num).style.color = "#333333";	
	//document.getElementById("category"+id_num).style.color = "#333333";	
	document.getElementById("text"+id_num).style.color = "#333333";	
	document.getElementById("arrowlink"+id_num).src = src_arrow;
}

/*----------------
	Profile directors.html
-----------------*/
function overList(id_num){
	document.getElementById("position"+id_num).style.color = "#000099";	
	document.getElementById("name"+id_num).style.color = "#000099";	
	//document.getElementById("detail"+id_num).src = "../../image/common/icon_detail_f2.gif";	
}

function outList(id_num){
	document.getElementById("position"+id_num).style.color = "#333333";	
	document.getElementById("name"+id_num).style.color = "#333333";	
	//document.getElementById("detail"+id_num).src = "../../image/common/icon_detail.gif";	
}

function clickDetail(id_num){
	document.getElementById("detail-box"+id_num).style.display = "block";
}

function closeDetail(id_num){
	document.getElementById("detail-box"+id_num).style.display = "none";
}

/*----------------
	Localnavi
	Recruit Graduate Flow
-----------------*/
function clickChange(div_id){

	flag = document.getElementById(div_id).style.display;

	if(flag=="block"){
		document.getElementById(div_id).style.display = "none";
	} else {
		document.getElementById(div_id).style.display = "block";
	}
}
/*----------------
	Profile Domestic
	Profile Overseas
-----------------*/
function mapDisp(div_id){
	document.getElementById(div_id).style.display = "block";
}
function mapHide(div_id){
	document.getElementById(div_id).style.display = "none";
}

/*----------------
	IR Explanatory
	IR Faq
	Common Streaming_Faq
-----------------*/
function clickChangeQA(div_id, img_id){

	flag = document.getElementById(div_id).style.display;

	if(flag=="block"){
		document.getElementById(div_id).style.display = "none";
		document.getElementById(img_id).src="../../image/ir/explanatory_q_small.gif";
	} else {
		document.getElementById(div_id).style.display = "block";
		document.getElementById(img_id).src="../../image/ir/explanatory_q_big.gif";
	}
}
/*----------------
	Recruit Faq
-----------------*/
function clickChangeQAlev3(div_id, img_id){

	flag = document.getElementById(div_id).style.display;

	if(flag=="block"){
		document.getElementById(div_id).style.display = "none";
		document.getElementById(img_id).src="../../../image/ir/explanatory_q_small.gif";
	} else {
		document.getElementById(div_id).style.display = "block";
		document.getElementById(img_id).src="../../../image/ir/explanatory_q_big.gif";
	}
}

/*----------------------
	IR Directnavi
	Service What-System
	Service Field-Transport
	Service Field-Storage
	Service Field-Forwarding
	Recruit Flow
-----------------------*/
function clickChangeBlock(div_id, block_num){
	for(i=0; i<block_num; i++){
		document.getElementById("block"+i).style.display = "none";
	}
	document.getElementById(div_id).style.display = "block";
}



/*----------------
	Recruit Photo Album
-----------------*/
img_num=1;

function albumChange(action, maisu, p_name){
//function albumChange(NEXT or BACK, 写真の枚数, 写真の名前)
	
	if(action=="NEXT"&&img_num<maisu){img_num++;}
	if(action=="BACK"&&1<img_num){img_num--;}
	
	if(img_num<10){
		document.album_photo.src="../../../image/recruit/"+p_name+0+img_num+".jpg";
	}
	
	if(img_num>=10){
		document.album_photo.src="../../../image/recruit/"+p_name+img_num+".jpg";
	}
}


/*----------------
	Recruit Seminar
-----------------*/
function windowOpen(file){
	var file_name = "seminar_map_"+file+".html";
	var map_w = 300;	//地図画像の幅
	var map_h = 392;	//地図画像の高さ
	map_w += 10*2;
	map_h += 100;
	
	window.open(file_name,"map", "width="+map_w+", height="+map_h+", left=100, top=100, scrollbars=0, status=0, toolbar=0, location=0, menubar=0, resizable=0");
}
