/***************************************
 * function : getChangedNames
 * @input : form - form name
 * @input : delimiter - delimiter string
 * @return : string - changed list
 * desc : get changed item list
 * author : hong
 * date : 2002-08-09
 ***************************************/

//***************************************
// Global変数宣言
//***************************************
var savechildwindow		//途中保存用の子ウィンドウ
var bkochildwindow		//管理画面スキル用の子ウィンドウ

function StartTimeOutCount()
{
	var msg = setTimeout( "Show_TimeOutMsg();" , 6900000);
}

var confirm_message = '';

function confdlg()
{
	if (confirm_message != '') return confirm(confirm_message);
}

function popupw(myurl,h,w)
{
	var l=(screen.width-w)/2
	var t=(screen.height-h)/2
	var w=window.open(myurl,"_blank","scrollbars=1,resizable=1,left="+l+",top="+t+",width="+w+",height="+h)
	if(navigator.platform.indexOf("Mac")!=-1)
	{
		w.moveTo(l,t)
	}
	return w
}

function popupnw(myurl,wname,h,w)
{	
	var l=(screen.width-w)/2
	var t=(screen.height-h)/2
	var w=window.open(myurl,wname,"scrollbars=0,resizable=0,left="+l+",top="+t+",width="+w+",height="+h)
	if(navigator.platform.indexOf("Mac")!=-1)
	{
		w.moveTo(l,t)
	}
	return w
}

function popupnws(myurl,wname,h,w)
{
	var l=(screen.width-w)/2
	var t=(screen.height-h)/2
	var w=window.open(myurl,wname,"scrollbars=1,resizable=0,left="+l+",top="+t+",width="+w+",height="+h)
	if(navigator.platform.indexOf("Mac")!=-1)
	{
		w.moveTo(l,t)
	}
	return w
}

function submit_form(form,action,target,method)
{

	form.action=action;
	form.target=target;
	form.method=method;
	form.submit();

}


function swImg(iName,str)
{
document.images[iName].src = str;
}

function editpopupn(myurl,win_name,h,w)
{	
	var l=(screen.width-w)/2
	var t=(screen.height-h)/2
	var w=window.open(myurl,win_name,"scrollbars=1,resizable=1,left="+l+",top="+t+",width="+w+",height="+h)
	if(navigator.platform.indexOf("Mac")!=-1)
	{
		w.moveTo(l,t)
	}
	bkochildwindow=w
	return w
}

function win_SizeChg()
{
alert ('yonnderu');
	window.focus();
	toolbar=no;
	location=no;
	directories=no;
	status = no;
	menubar=no;
	scrollbars=yes;
	resizable=no;
}

function close_popup_r()
{
	opener.location.reload(false);
	window.close();
}

function win_closed(winVar)
{
	var ua = navigator.userAgent
		if( !!winVar )
			if( ( ua.indexOf('Gecko')!=-1 || ua.indexOf('MSIE 4')!=-1 )
				&& ua.indexOf('Win')!=-1 )
				return winVar.closed
			else return typeof winVar.document  != 'object'
		else return true
}

function addToParentList(sourceList,parent)
{
	destinationList = eval("window.document.forms[0]."+parent);
	if(destinationList != null){
		for(var count = destinationList.options.length - 1; count >= 0; count--)
		{
			destinationList.options[count] = null;
		}
		var j=0;
		for(var i = 0; i < sourceList.length; i++)
		{
			if (sourceList[i].checked == true)
			{
				destinationList.options[j] = new Option(sourceList[i].value.substring(5),sourceList[i].value.substring(0,4));
				j++;
			}
		}
	}
}

function addToParentList1(sourceList, parent, disp, iCount)
{
	var i, j, k, l;

	destinationList = eval("window.document.forms[1]."+parent);
	if(destinationList != null){
		for(var count = destinationList.options.length - 1; count >= 0; count--)
		{
			destinationList.options[count] = null;
		}
	}
	destinationText = eval("window.document.forms[1]."+disp);

	l = 0;
	for(i = 0; i < iCount; i++) {
		k = i + 1;
		for(j = 0; j < 4; j++) {
			radioStr = "sourceList.skill_"+k+"[j]";
			radioObject = eval(radioStr);
			if(radioObject.checked == true) {
				if(j != 0) {
					destinationList.options[l] = new Option(radioObject.value.substring(7),radioObject.value.substring(0,6));
					l++;
					break;
				}
			}
		}
	}
	s_text = "";
	if(l != 0) {
		s_text = "設定済み";
	}
	destinationText.value = s_text;
}

function delelteSpace()
{
	var sourceList = window.document.forms[0].license_id;
	var maxCnt = sourceList.options.length;
	for(var i = maxCnt - 1; i >= 0; i--)
	{
		if (sourceList.options[i].value == "space")
		{
			sourceList.options[i] = null;
		}
	}
	sourceList = window.document.forms[0].industry_id;
	maxCnt = sourceList.options.length;
	for(var i = maxCnt - 1; i >= 0; i--)
	{
		if (sourceList.options[i].value == "space")
		{
			sourceList.options[i] = null;
		}
	}
	sourceList = window.document.forms[0].sub_occup_id;
	maxCnt = sourceList.options.length;
	for(var i = maxCnt - 1; i >= 0; i--)
	{
		if (sourceList.options[i].value == "space")
		{
			sourceList.options[i] = null;
		}
	}
	sourceList = window.document.forms[0].pref_id;
	maxCnt = sourceList.options.length;
	for(var i = maxCnt - 1; i >= 0; i--)
	{
		if (sourceList.options[i].value == "space")
		{
			sourceList.options[i] = null;
		}
	}
}
function selectListSubmit_Skill(icount)
{
	for(var k = 1;k<icount; k++)
	{
		sourceList = eval("window.document.forms[1].skill_"+k);
		for(var i = 0; i < sourceList.options.length; i++)
		{
			if (sourceList.options[i] != null)
			sourceList.options[i].selected = true;
		}
	}

	window.document.forms[1].submit();
}
function selectListSubmit_licence()
{
	sourceList = window.document.edit.license_id;
	for(var i = 0; i < sourceList.options.length; i++)
	{
		if (sourceList.options[i] != null)
		sourceList.options[i].selected = true;
	}

	window.document.forms[1].submit();
}
function selectListSubmit_pr()
{
	
	sourceList = window.document.forms[0].industry_id;
	for(var i = 0; i < sourceList.options.length; i++)
	{
		if (sourceList.options[i] != null)
		sourceList.options[i].selected = true;
	}
	sourceList = window.document.forms[0].sub_occup_id;
	for(var i = 0; i < sourceList.options.length; i++)
	{
		if (sourceList.options[i] != null)
		sourceList.options[i].selected = true;
	}
	sourceList = window.document.forms[0].pref_id;
	for(var i = 0; i < sourceList.options.length; i++)
	{
		if (sourceList.options[i] != null)
		sourceList.options[i].selected = true;
	}
	window.document.forms[0].submit();
}

function selectListSubmit()
{
	
	sourceList = window.document.forms[0].license_id;
	for(var i = 0; i < sourceList.options.length; i++)
	{
		if (sourceList.options[i] != null)
		sourceList.options[i].selected = true;
	}
	sourceList = window.document.forms[0].industry_id;
	for(var i = 0; i < sourceList.options.length; i++)
	{
		if (sourceList.options[i] != null)
		sourceList.options[i].selected = true;
	}
	sourceList = window.document.forms[0].sub_occup_id;
	for(var i = 0; i < sourceList.options.length; i++)
	{
		if (sourceList.options[i] != null)
		sourceList.options[i].selected = true;
	}
	sourceList = window.document.forms[0].pref_id;
	for(var i = 0; i < sourceList.options.length; i++)
	{
		if (sourceList.options[i] != null)
		sourceList.options[i].selected = true;
	}
	window.document.forms[0].submit();
}

function deleteSelectedItemsFromList(sourceList)
{
	var maxCnt = sourceList.options.length;
	for(var i = maxCnt - 1; i >= 0; i--)
	{
		if ((sourceList.options[i] != null) && (sourceList.options[i].selected == true))
		{
			sourceList.options[i] = null;
		}
	}
}

//希望勤務地
function addSelectedItemsToParentPref()
{
	//2006年1月リニューアル対応 希望勤務地3つまで選択可能チェック追加　2005.11.30
	var y = 0;
	for(var x = 0; x < window.document.forms[0].checkbox.length; x++){
		if (window.document.forms[0].checkbox[x].checked == true){
			y++;
		}
	}
	if(y > 3){
		alert("希望勤務地の選択可能数は最大3つまでです。");
	}else{
		if(!win_closed(window.opener))
		{
			self.opener.addToParentList(window.document.forms[0].checkbox,'pref_id');
			window.close();
		} else {
			window.close();
		}
	}
}
function addSelectedItemsToParentSkill(itemname,dispname,iCount)
{
	if(!win_closed(window.opener))
	{
		self.opener.addToParentList1(window.document.forms[0], itemname, dispname, iCount);
		window.close();
	} else {
		window.close();
	}
}

function fillInitialDestListPref()
{
	var destList = window.document.forms[0].checkbox;
	var srcList = self.opener.window.document.forms[0].pref_id;
	for(var i = 0; i < srcList.options.length; i++)
	{
		for(var r = 0; r < destList.length; r++)
		{
			if (destList[r].value.substring(0,4) == srcList.options[i].value)
			{
				destList[r].checked = true;
			}
		}
	}
}

function fillInitialDestListSkill(count_id)
{
	srcStr = "self.opener.window.document.forms[1].skill_"+count_id;
	srcList = eval(srcStr);
	destList = window.document.forms[0].elements;
	for(var i = 0; i < srcList.options.length; i++)	{
		for(var r = 0; r < destList.length; r++){
			if (destList[r].value.substring(0,6) == srcList.options[i].value) {
				destList[r].checked = true;
				break;
			}
		}
	}
}

//希望職種
function addSelectedItemsToParentOccup()
{
	//2006年1月リニューアル対応 希望職種3つまで選択可能チェック追加　2005.11.30
	var y = 0;
	for(var x = 0; x < window.document.forms[0].checkbox.length; x++){
		if (window.document.forms[0].checkbox[x].checked == true){
			y++;
		}
	}
	if(y > 3){
		alert("希望職種の選択可能数は最大3つまでです。");
	}else{
		if(!win_closed(window.opener))
		{
			self.opener.addToParentList(window.document.forms[0].checkbox,'sub_occup_id');
			window.close();
		} else {
			window.close();
		}
	}
}

function fillInitialDestListOccup()
{
	var destList = window.document.forms[0].checkbox;
	var srcList = self.opener.window.document.forms[0].sub_occup_id;
	for(var i = 0; i < srcList.options.length; i++)
	{
		for(var r = 0; r < destList.length; r++)
		{
			if (destList[r].value.substring(0,4) == srcList.options[i].value)
			{
				destList[r].checked = true;
			}
		}
	}
}

function addSelectedItemsToParentLicense()
{
	if(!win_closed(window.opener))
	{
		self.opener.addToParentList(window.document.forms[0].checkbox,'license_id');
		window.close();
	} else {
		window.close();
	}
}

function fillInitialDestListLicense()
{
	var destList = window.document.forms[0].checkbox;
	var srcList = self.opener.window.document.forms[0].license_id;
	for(var i = 0; i < srcList.options.length; i++)
	{
		for(var r = 0; r < destList.length; r++)
		{
			if (destList[r].value.substring(0,4) == srcList.options[i].value)
			{
				destList[r].checked = true;
			}
		}
	}
}

//希望業種
function addSelectedItemsToParentIndustry()
{
	//2006年1月リニューアル対応 希望業種3つまで選択可能チェック追加　2005.11.30
	var y = 0;
	for(var x = 0; x < window.document.forms[0].checkbox.length; x++){
		if (window.document.forms[0].checkbox[x].checked == true){
			y++;
		}
	}
	if(y > 3){
		alert("希望業種の選択可能数は最大3つまでです。");
	}else{
		if(!win_closed(window.opener))
		{
			self.opener.addToParentList(window.document.forms[0].checkbox,'industry_id');
			window.close();
		} else {
			window.close();
		}
	}
}

function fillInitialDestListIndustry()
{
	var destList = window.document.forms[0].checkbox;
	var srcList = self.opener.window.document.forms[0].industry_id;
	for(var i = 0; i < srcList.options.length; i++)
	{
		for(var r = 0; r < destList.length; r++)
		{
			if (destList[r].value.substring(0,4) == srcList.options[i].value)
			{
				destList[r].checked = true;
			}
		}
	}
}

function addSelectedItemsToParentExp()
{
	if(!win_closed(window.opener)){
		source = self.opener.window.document.forms[0];
		destination = window.document.confirm;
		var experience = "";
		
		//１つ目の業種オブジェクトが存在しなければ親ウィンドウは他の画面に遷移されてしまっている為処理をしません。
		if(source != null && source.exp_industry_id_1 != null){
			for(r=1;r<4;r++){
		
				if(eval("destination.exp_industry_"+r+".value") == "" && eval("destination.exp_industry_sub_"+r+".value") == "" && eval("destination.exp_occup_"+r+".value") == "" && eval("destination.exp_year_"+r+".value") == "" && eval("destination.exp_description_"+r+".value") ==""){
					experience +="実務経験"+r+"：未入力\n";
					exp_industry = eval("source.exp_industry_id_"+r);
					exp_industry.value = "";
					//2004.01.06 a.shimizu 中業種の追加
					exp_industry_sub = eval("source.exp_industry_sub_id_"+r);
					exp_industry_sub.value = "";
					exp_occup = eval("source.exp_occup_sub_id_"+r);
					exp_occup.value = "";
					//2003.12.25 a.shimizu 経験年数の追加
					exp_year = eval("source.exp_year_id_"+r);
					exp_year.value = "";
					exp_description = eval("source.exp_detail_"+r);
					exp_description.value = "";
				} else {
					experience +="実務経験"+r+"：入力済\n";
					exp_industry = eval("source.exp_industry_id_"+r);
					exp_industry.value = eval("destination.exp_industry_"+r+".value");
					//2004.01.06 a.shimizu 中業種の追加
					exp_industry_sub = eval("source.exp_industry_sub_id_"+r);
					exp_industry_sub.value = eval("destination.exp_industry_sub_"+r+".value");
					exp_industry = eval("source.exp_occup_sub_id_"+r);
					exp_industry.value = eval("destination.exp_occup_"+r+".value");
					//2003.12.25 a.shimizu 経験年数の追加
					exp_year = eval("source.exp_year_id_"+r);
					exp_year.value = eval("destination.exp_year_"+r+".value");
					exp_description = eval("source.exp_detail_"+r);
					exp_description.value = eval("destination.exp_description_"+r+".value");

				}
			}
			self.opener.window.document.forms[0].exp.value = experience;
		}
		
		window.close();
		
	} else {
		window.close();
	}
}

function resetExperience(num)
{
	eval("window.document.forms[0].exp_industry_"+num+".options[0].selected = true");
	eval("window.document.forms[0].exp_occup_"+num+".options[0].selected = true");
	//2003.12.25 a.shimizu 経験年数の追加
	eval("window.document.forms[0].exp_year_"+num+".options[0].selected = true");
	eval("window.document.forms[0].exp_description_"+num+".value = ''");
}

function fillInitialDestListExp()
{
	source = window.document.forms[0];
	destination = self.opener.window.document.forms[0];
	var experience = "";
	for(r=1;r<4;r++)
	{
	if(eval("destination.exp_industry_id_"+r+".value") == "" && eval("destination.exp_industry_sub_id_"+r+".value") == "" && eval("destination.exp_occup_sub_id_"+r+".value") == "" && eval("destination.exp_year_id_"+r+".value") == "" && eval("destination.exp_detail_"+r+".value") == "")
	{
		eval("source.exp_industry_"+r+".options[0].selected = true");
		eval("source.exp_occup_"+r+".options[0].selected = true");
		eval("source.exp_year_"+r+".options[0].selected = true");
		eval("source.exp_description_"+r+".value = ''");
	}
	else
	{

		n = eval("source.exp_industry_"+r+".length");

		//中業種の値を取得できなかった場合
		if(eval("destination.exp_industry_sub_id_"+r+".value") == ""){
			//大業種だけをセットする。
			s_industry_id = eval("destination.exp_industry_id_"+r+".value");
		} else {
			//valueに大業種と中業種を":"で連結してセットする。
			s_industry_id = eval("destination.exp_industry_id_"+r+".value") + ":" + eval("destination.exp_industry_sub_id_"+r+".value");
		}
		
		for(var i=0;i<n;i++)
		{
			d_industry_id = eval("source.exp_industry_"+r+".options["+i+"]");
			d_industry_id = d_industry_id.value;
			if(d_industry_id == s_industry_id)
			{
				check_select = eval("source.exp_industry_"+r+".options["+i+"]");
				check_select.selected = true;
			}
		}

		n = eval("source.exp_occup_"+r+".length");
		s_occup_id = eval("destination.exp_occup_sub_id_"+r+".value");
		for(var i=0;i<n;i++)
		{
			d_occup_id = eval("source.exp_occup_"+r+".options["+i+"]");
			d_occup_id = d_occup_id.value;
			if(d_occup_id == s_occup_id)
			{
				check_select = eval("source.exp_occup_"+r+".options["+i+"]");
				check_select.selected = true;
			}
		}

		n = eval("source.exp_year_"+r+".length");
		s_year_id = eval("destination.exp_year_id_"+r+".value");
		for(var i=0;i<n;i++)
		{
			d_year_id = eval("source.exp_year_"+r+".options["+i+"]");
			d_year_id = d_year_id.value;
			if(d_year_id == s_year_id)
			{
				check_select = eval("source.exp_year_"+r+".options["+i+"]");
				check_select.selected = true;
			}
		}

		exp_description = eval("source.exp_description_"+r);
		exp_description.value = eval("destination.exp_detail_"+r+".value");
	}
	}
}

function AddCareer()
{
	source =  window.document.forms[0];
	source.career_action.value = 2;
	source.submit();
}

function EditCareer(num)
{
	source = window.document.forms[0];
	source.career_action.value = 3;
	source.detail_id.value = num;
	source.submit();
}

function ChangeCareer()
{
	source =  window.document.forms[0];
	source.career_action.value = 4;
	source.submit();
}

function DeleteCareer(num)
{
	source =  window.document.forms[0];
	source.career_action.value = 5;
	eval("source.begin_date_yyyy_"+num+".value = ''");
	eval("source.begin_date_mm_"+num+".value = ''");
	eval("source.end_date_yyyy_"+num+".value = ''");
	eval("source.end_date_mm_"+num+".value = ''");
	eval("source.content_"+num+".value = ''");
	eval("source.detail_"+num+".value = ''");
	source.submit();
}

function Show_TimeOutMsg()
{
	window.alert('あと5分で自動的にログアウトします。登録・編集中の方は\n必須事項をご入力いただき、登録・編集してください。');
}

function print_out()
{
	if (navigator.userAgent.match(/msie (\d)/i))
	   v = (eval(RegExp.$1) >= 5) ? 1 : 0;
	else if (self.innerWidth)
	   v = (eval(navigator.appVersion.charAt(0)) >= 4) ? 1 : 0;
	else v = 0;

   /* print() が使えるブラウザなら印刷を実行 */
   if (v)
	   self.print();
   else
	   alert("お使いのブラウザではこの機能は利用できません");
}
/***********************************************************
 * function : FavoriteAdd
 * @input 　: JPOS利用	0:利用しない 1:利用する
 * @return  : 
 * date : 2005/11/18
 * 2006年1月リニューアル対応 お気に入り登録追加
 ***********************************************************/
function FavoriteAdd(mode) {
	if(navigator.appName == "Microsoft Internet Explorer"){
		if (mode == 1) {
			// 2006.11.20 修正 ↓
			//window.external.AddFavorite("https://bko.nikkei.co.jp/company/login.asp", "Bizキャリア管理ログイン画面");
			window.external.AddFavorite("https://bko.nikkei.co.jp/company/login.asp", "日経キャリアNET管理ログイン画面");
			// 2006.11.20 修正 ↑
		} else if (mode == 0) {
			// 2006.11.20 修正 ↓
			//window.external.AddFavorite("https://bko.nikkei.co.jp/com/login.asp", "Bizキャリア管理ログイン画面");
			window.external.AddFavorite("https://bko.nikkei.co.jp/com/login.asp", "日経キャリアNET管理ログイン画面");
			// 2006.11.20 修正 ↑
		} else if (mode == 2) {
			// 2006.11.20 修正 ↓
			//window.external.AddFavorite("https://bko.nikkei.co.jp/ag/login.asp", "Bizキャリア管理ログイン画面");
			window.external.AddFavorite("https://bko.nikkei.co.jp/ag/login.asp", "日経キャリアNET管理ログイン画面");
			// 2006.11.20 修正 ↑
		}
	} else {
		alert("お使いのブラウザではこの機能は利用できません");
	}
}

// フリーワード検索入力制限
function FreeWordLen(frm){

	var MAXLENGTH = 50;		// 入力許容最大文字数
	var tmp = frm.word.value;
	var len = tmp.length;



	// 文字数
	if(len > MAXLENGTH){
		alert("フリーワードは"+MAXLENGTH+"文字以内で入力してください。");
		return ;
	}
	
	// 送信
	frm.submit();
}

// フリーワード検索入力制限
function FreeWord(frm){

	var MAXLENGTH = 50;		// 入力許容最大文字数
	var tmp = frm.word.value.replace(/^[\s　]+|[\s　]+$/g, "");
	var len = tmp.length;

	// 未入力
	if(len < 1){
		alert("フリーワードを入力してください。");
		return ;
	}


	// 初期入力値
	if (frm.word.value=='会社名、職種等を入力して検索してください'){
		alert("会社名、職種等を入力して検索してください");
		return ;
	}

	// 文字数
	if(len > MAXLENGTH){
		alert("フリーワードは"+MAXLENGTH+"文字以内で入力してください。");
		return ;
	}
	
	// 送信
	frm.method='POST';
	frm.submit();
}

// フリーワード検索入力制限 総合TOPページ
function FreeWordTop(frm,target){

	var MAXLENGTH = 50;		// 入力許容最大文字数
	var tmp = frm.word.value.replace(/^[\s　]+|[\s　]+$/g, "");
	var len = tmp.length;

	// 未入力
	if(len < 1){
		alert("フリーワードを入力してください。");
		return ;
	}


	// 初期入力値
	if (frm.word.value=='会社名、職種等を入力して検索してください'){
		alert("会社名、職種等を入力して検索してください");
		return ;
	}

	// 文字数
	if(len > MAXLENGTH){
		alert("フリーワードは"+MAXLENGTH+"文字以内で入力してください。");
		return ;
	}

	// 送信
  	frm.attributes.action.value =target;
	frm.method='POST';
	frm.submit();

	return ;
}

//アクセスコード入力チェック
function AccessCode(){

	var LOWLENGTH = 0;		
	var tmp = document.access.cid.value;
	var len = tmp.length;

	//未入力
	if(len < 1){
		alert("アクセスコードを入力してください。");
		return ;
	}

	//文字種
	if( tmp.match( /[^0-9\s]+/ ) ) {
		alert("半角英数字のみで入力して下さい。");
		return ;
	}

	//送信
	document.access.submit();
}
/***********************************************************
 * function : savepopup
 * date : 2005/12/28
 * 2006年1月リニューアル対応 途中保存のポップアップを表示
 * 途中保存時の子windowが開いたままだと閉じるように値保持
 ***********************************************************/
function savepopup(myurl,win_name,h,w)
{	
	var l=(screen.width-w)/2
	var t=(screen.height-h)/2
	var w=window.open(myurl,win_name,"scrollbars=1,resizable=1,left="+l+",top="+t+",width="+w+",height="+h)
	if(navigator.platform.indexOf("Mac")!=-1)
	{
		w.moveTo(l,t)
	}
	//今表示したポップアップをglobal変数に保存(開いたままだと閉じられるように)
	savechildwindow = w
	return w
}
/***********************************************************
 * function : ChildWindowClosed
 * date : 2005/12/28
 * 2006年1月リニューアル対応 
 * 途中保存時のポップアップが開いたままだと閉じるように追加
 ***********************************************************/
function ChildWindowClosed(){
	if ( savechildwindow != null ) {
		if ( savechildwindow.closed == false ) {
			savechildwindow.close();
		}
	}
}
/***********************************************************
 * function : GoSelectConsul
 * date : 2006/01/10
 * 2006年1月リニューアル対応 
 * コンサルタント選択コンボボックスを選択したらSubmitする為追加
 ***********************************************************/
function GoSelectConsul(ofrm)
{

	ofrm.submit();
}

/***********************************************************
 * function : ComChildWindowClosed
 * date : 2006/1/13
 * 2006年1月リニューアル対応 
 * 管理画面のスキル選択ポップアップが開いたままだと閉じるように追加
 ***********************************************************/
function BkoChildWindowClosed(){
	if ( bkochildwindow != null ) {
		if ( bkochildwindow.closed == false ) {
			bkochildwindow.close();
		}
	}
}
/***********************************************************
 * function : FocusTextFreeWord
 * date : 2006/1/20
 * 2006年1月リニューアル対応 
 * フリーワードテキストボックスのテキスト文字列、表示非表示
 * INPUT mode=0 : onFocusイベント時 ・・・テキストボックスをクリア
 * 		 mode=1 : onBlurイベント時  ・・・文字列表示
 ***********************************************************/
function FocusTextFreeWord(frm,name,mode){
	var text = eval("frm."+name);
	if (mode == 0) {
		text.style.color = "#000000";
		if (text.value == "会社名、職種等を入力して検索してください") {
			text.value = "";
		}
	} else {
		if (text.value == "") {
			text.style.color = "#808080";
			text.value = "会社名、職種等を入力して検索してください";
		}
	}
}
/***********************************************************
 * function : TextColorFreeWord
 * date : 2006/1/24
 * 2006年1月リニューアル対応 
 * onload時、フリーワード検索テキストボックスの文字色指定
 ***********************************************************/
function TextColorFreeWord() {
	if (document.freeword_text) {
		if (typeof(document.freeword_text.word)!="undefined" && typeof(document.freeword_text.word)=="object" ){
			var text = document.freeword_text.word;
			if (text.value == "会社名、職種等を入力して検索してください") {
				text.style.color = "#808080";
			} else {
				text.style.color = "#000000";
			}
		}
	}
}
/***********************************************************
 * function : DefaultViewScoutLog
 * date : 2006/1/30
 * 2006年1月リニューアル対応 
 * エージェント管理画面onload時、スカウトログ初期表示設定
 ***********************************************************/
function DefaultViewScoutLog() {
	var url;
	var str;
	//現在のURL取得
	url = location.pathname;
	str = "/bnk/bnk_report_scout.asp";
	if (url.lastIndexOf(str) != -1) {
		var myForm = document.f_rep_scout;
		var submit_mode = myForm.limit_h;
		if (submit_mode.value == "") {
			toDailyReport('',0);
		}
	}
}
/***********************************************************
 * function : FreeWordAction
 * date : 2006/6/14
 * 2006年1月リニューアル対応 
 * enterキーによるサブミット時のフリーワード検索アクションを設定
 ***********************************************************/
function FreeWordAction(target) {
	var frm=document.freeword_text;
	
	frm.attributes.action.value =target;
	frm.method='POST';
	return true;
}
/***********************************************************
 * function : doInputCheck
 * date : 2006/11/28
 * 入力チェック処理（選択してればTrue 未選択はFalse）
 ***********************************************************/
function doInputCheck(target) {

	if (!document.sarform[target]) {
		return false;
	}

	if (document.sarform[target].length==null) {
		if	(document.sarform[target].checked){
			return true;
		}
	}else{
		for (var i = 0; i < document.sarform[target].length; i++){
			if	(document.sarform[target][i].checked){
				return true;
			}
		}
	}

	// 未チェック状態
	return false;
}
/***********************************************************
 * function : doInputMaxCheck
 * date : 2006/12/04
 * 選択数取得処理（選択数を返します）
 ***********************************************************/
function doInputCheckCount(target) {

	var cnt = 0;

	if (!document.sarform[target]) {
		return cnt;
	}

	if (document.sarform[target].length==null) {
		if	(document.sarform[target].checked){
			cnt++;	//選択数をカウント
		}
	}else{
		for (var i = 0; i < document.sarform[target].length; i++){
			if	(document.sarform[target][i].checked){
				cnt++;	//選択数をカウント
			}
		}
	}

	// 選択数を返します
	return cnt;
}

