/*==========================================================================================*/
/* Program     : inc_global.js                                                              */
/* DESCRIPTION : 共通JavaScript                                                             */
/*==========================================================================================*/
/* Revision:                                                                                */
/* Version 1.0   2002/07/01           最初のインプリメント                                  */
/* Version 1.1   2002/10/04    ヘルプウインドウOPEN追加                                     */
/* Version 18.1  2007/05/28		/var/log/httpd/error_log.yyyymmdd に出力されているエラー    */
/*								(cssファイルNotFound)について(#1167)(内海)                  */
/*==========================================================================================*/
/* AUTHOR: (高木 秀友)                                                                      */
/*==========================================================================================*/

/* 共通JavaScriptの関数には必ず先頭に"f_"を付加する事！*/

/*==========================================================================================*/
/* Program     : f_subform_open                                                             */
/* DESCRIPTION : サブ画面表示                                                               */
/*==========================================================================================*/
/* Revision:                                                                                */
/* Version 1.0   2002/07/01           最初のインプリメント                                  */
/*==========================================================================================*/
/* AUTHOR:  (高木 秀友)                                                                     */
/*==========================================================================================*/
/* Parameters  : in_url               リンク先URL                                           */
/*               in_name              ウィンドウ名                                          */
/*               in_width             ウィンドウ横幅                                        */
/*               in_height            ウィンドウ高さ                                        */
/*               in_top               ウィンドウ上端位置                                    */
/*               in_left              ウィンドウ左端位置                                    */
/*               in_toolbar           ツールバー有無("yes""no")                             */
/*               in_location          場所ツールバー有無("yes""no")                         */
/*               in_menubar           メニューバー有無("yes""no")                           */
/*               in_resizable         リサイズ可能有無("yes""no")                           */
/*               in_scrollbars        スクロールバー有無("yes""no")                         */
/*               in_status            ステータスバー有無("yes""no")                         */
/* Return      : 無し                                                                       */
/*==========================================================================================*/
/* Copyright Mainichi Communications Inc. All rights reserved.                              */
/*==========================================================================================*/

/*==========================================================================================*/
/* Program     : helpform_open                                                             */
/* DESCRIPTION : サブ画面表示(HELP用)                                                       */
/*==========================================================================================*/
/* Revision:                                                                                */
/* Version 1.0   2002/10/04   最初のインプリメント                                          */
/*==========================================================================================*/
/* AUTHOR: (MYCOM藤山)                                                                     */
/*==========================================================================================*/
/* Parameters  : in_url               リンク先URL                                           */
/* Return      : 無し                                                                       */
/*==========================================================================================*/
/* Copyright (C) 2002 MYCOM                                                                 */
/*==========================================================================================*/


function f_subform_open(in_url,in_name,in_width,in_height,in_top,in_left,in_toolbar,in_location,in_menubar,in_resizable,in_scrollbars,in_status) {

	var j_style = "";

	j_style = j_style + 'width=' + in_width;
	j_style = j_style + ',height=' + in_height;

	if(navigator.appName.charAt(0) == "N"){
		j_style = j_style + ',screenY=' + in_top;
		j_style = j_style + ',screenX=' + in_left;
	} else {
		j_style = j_style + ',top=' + in_top;
		j_style = j_style + ',left=' + in_left;
	}
	j_style = j_style + ',toolbar=' + in_toolbar;
	j_style = j_style + ',location=' + in_location;
	j_style = j_style + ',menubar=' + in_menubar;
	j_style = j_style + ',resizable=' + in_resizable;
	j_style = j_style + ',scrollbars=' + in_scrollbars;
	j_style = j_style + ',status=' + in_status;

	j_w = window.open(in_url, in_name, j_style);
	j_w.focus();
};

/*==========================================================================================*/
function helpform_open(in_url) {
	j_w = window.open(in_url,"help_form","width=400,height=400,toolbar=no,location=no,menubar=no,scrollbars=no,resizable=no,status=no");
	j_w.focus();
};

/*==========================================================================================*/
function enq_form_open(in_url) {
	var q1 = 1;
	var q2 = document.enq_form.f_q2.value;

	in_url = in_url + '&f_q1=' + q1 + '&f_q2=' + q2;
	j_w = window.open(in_url,"enq_page","width=580,height=400,toolbar=no,location=no,menubar=no,scrollbars=yes,resizable=no,status=no");
	j_w.focus();
};
/*==================================================================
  機能：MULTIPLEのSELECTオブジェクトを変更不可にする
==================================================================*/
function f_multiple_select_read_only(object)
{
	for( var i=0; i<object.options.length; i++ )
	{
		if( i != 0 )
		{
			object.options[i].selected=true;
		}
	}
	if( object.options.length > 0 )
	{
		object.options[0].selected=true;
		object.options[0].selected=false;
	}
}
/*==========================================================================================
以下、毎コミ殿ご提示分
==========================================================================================*/
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.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 f_subform_open(in_url,in_name,in_width,in_height,in_top,in_left,in_toolbar,in_location,in_menubar,in_resizable,in_scrollbars,in_status) {

	var j_style = "";

	j_style = j_style + 'width=' + in_width;
	j_style = j_style + ',height=' + in_height;

	if(navigator.appName.charAt(0) == "N"){
		j_style = j_style + ',screenY=' + in_top;
		j_style = j_style + ',screenX=' + in_left;
	} else {
		j_style = j_style + ',top=' + in_top;
		j_style = j_style + ',left=' + in_left;
	}
	j_style = j_style + ',toolbar=' + in_toolbar;
	j_style = j_style + ',location=' + in_location;
	j_style = j_style + ',menubar=' + in_menubar;
	j_style = j_style + ',resizable=' + in_resizable;
	j_style = j_style + ',scrollbars=' + in_scrollbars;
	j_style = j_style + ',status=' + in_status;

	j_w = window.open(in_url, in_name, j_style);
	j_w.focus();
}

// 0703 coms 追加
// START
// ユーザーエージェント判別
var ua = navigator.userAgent;

var WIN = (ua.indexOf("Windows") != -1);
var MAC = (ua.indexOf("Mac") != -1);

var IE = (ua.indexOf("MSIE") != -1);
if (IE && ua.indexOf("MSIE 6") != -1) { var VER = 6; }
else if (IE && ua.indexOf("MSIE 5.5") != -1) { var VER = 5.5; }
else if (IE && ua.indexOf("MSIE 5.2") != -1) { var VER = 5.2; }
else if (IE && ua.indexOf("MSIE 5.1") != -1) { var VER = 5.1; }
else if (IE && ua.indexOf("MSIE 5") != -1) { var VER = 5; }

var NN = (ua.indexOf("Netscape") != -1);
if (NN && ua.indexOf("Netscape/7") != -1) { var VER = 7; }
else if (NN && ua.indexOf("Netscape6/") != -1) { var VER = 6; }

var OP = (ua.indexOf("Opera") != -1);
if (OP && ua.indexOf("Opera 7.5") != -1) { var VER = 7.5; }
else if (OP && ua.indexOf("Opera 7") != -1) { var VER = 7; }
else if (OP && ua.indexOf("Opera 6") != -1) { var VER = 6; }

var SF = (ua.indexOf("Safari") != -1);
if (SF && ua.indexOf("Safari/125") != -1) { var VER = 125; }
else if (SF && ua.indexOf("Safari/100") != -1) { var VER = 100; }
else if (SF && ua.indexOf("Safari/85") != -1) { var VER = 85; }

//  v18.1 #1167 /var/log/httpd/error_log.yyyymmdd に出力されているエラー
// ブラウザ判別後の処理
if(WIN && IE){
	document.write('<link rel="stylesheet" href="http://tenshoku.mynavi.jp/include/win_ie.css" type="text/css" media="screen">');
}

// 画像を表示
function showImg (id) {
    if(document.getElementById) {
        document.getElementById(id).style.visibility = "visible";
    } else if(document.all) {
        document.all(id).style.visibility = "visible";
    } else if(document.layers) {
        document.layers[id].visibility = 'show';
    }
}
// 画像を隠す
function hideImg (id) {
    if(document.getElementById) {
        document.getElementById(id).style.visibility = "hidden";
    } else if(document.all) {
        document.all(id).style.visibility = "hidden";
    } else if(document.layers) {
        document.layers[id].visibility = 'hide';
    }
}

// 0703 coms 追加
// END
