/*
'==============================================================================
' 各ページのヘッダ部の書き出し
'==============================================================================
*/
function DrawHead (flg) {
	var wLayerS;
	var wLayerE;

	//------------------------------------------------------------
	//レイヤータグ編集
	//------------------------------------------------------------
	if (flg == "wns") {
		
		//Netscapeの場合
		wLayerS = "<LAYER id=\"header\" pagex=\"0px\" pagey=\"0px\" width=\"610px\" height=\"60px\" z-index=\"2\">"
		wLayerE = "</LAYER>"
		
	} else {
		
		//Internet Explorerの場合
		wLayerS = "<DIV id=\"header\" style=\"position:absolute; left:0px; top:0px; width:610px; height:60px; z-index:2;\">"
		wLayerE = "</DIV>"

	}

	//------------------------------------------------------------
	//書き出し
	//------------------------------------------------------------
	document.write(wLayerS);
    document.write("<A href=\"/index.htm\"><IMG src=\"/images/title.gif\" width=\"750\" height=\"61\" border=\"0\" alt=\"高知県経営者協会　就職支援室\"></A><BR>");
    document.write("<TABLE width=\"750\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
	document.write("<TR>");
	document.write("<TD><A href=\"/index.htm\"><IMG src=\"/images/btn_menu_01.gif\" width=\"173\" height=\"31\" border=\"0\" alt=\"HOME\"></A></TD>");
	document.write("<TD><A href=\"/link.htm\"><IMG src=\"/images/btn_menu_02.gif\" width=\"147\" height=\"31\" border=\"0\" alt=\"LINK\"></A></TD>");
	document.write("<TD><IMG src=\"/images/btn_menu_03.gif\" width=\"430\" height=\"31\" border=\"0\"></TD>");
	document.write("</TR>");
	document.write("</TABLE>");
	
	document.write(wLayerE);

}

/*
'==============================================================================
' 各ページのメニュー部の書き出し
'==============================================================================
*/
function DrawMenu (flg,kbn) {
	var wLayerS;
	var wLayerE;

	//------------------------------------------------------------
	//レイヤータグ編集
	//------------------------------------------------------------
	if (flg == "wns") {
		
		//Netscapeの場合
		wLayerS = "<LAYER id=\"memu\" pagex=\"0\" pagey=\"92\" width=\"200\" height=\"92\" z-index=\"1\">"
		wLayerE = "</LAYER>"

	} else {
		
		//Internet Explorerの場合
		wLayerS = "<DIV id=\"memu\" style=\"position:absolute; left:0px; top:92px; width:200px; height:80%; z-index:1\";>"
		wLayerE = "</DIV>"

	}
	
	//------------------------------------------------------------
	//書き出し
	//------------------------------------------------------------
	document.write(wLayerS);
	document.write("<CENTER>");
	document.write("<IMG src=\"/images/blank.gif\" width=200 height=5>");
	document.write("<IMG src=\"/images/ban_jigyokeikaku.gif\" width=\"198\" height=\"26\" alt=\"事業計画\"><IMG src=\"/images/blank.gif\" width=\"204\" height=\"5\">");
	document.write("<TABLE width=198 border=0 cellpadding=0 cellspacing=0 align=\"center\">");
	//□□職業意識形成支援関係事業□□□□□□□□□□□□□□□□□□□□□□□□□□□
	document.write("<TR><TD><IMG src=\"/images/b_ttl_isikisien.gif\" alt=\"職業意識形成支援関係事業\"></TD></TR>");
	//■高校生保護者意識啓発リーフレット作成・配布
	document.write("<TR><TD>");
	if (kbn != "hogosha"){
		document.write("<A href=\"/hogosha.htm\" onMouseOver=\"document.images[\'m_01\'].src=\'/images/b_menu_on_01.gif\'\"onMouseOut=\"document.images[\'m_01\'].src=\'/images/b_menu_off_01.gif\'\">");
		document.write("<IMG src=\"/images/b_menu_off_01.gif\" width=198 height=40 border=\"0\" name=\"m_01\" alt=\"高校生保護者意識啓発リーフレット作成・配布\"></A>");
	}else{
		document.write("<A href=\"/hogosha.htm\">");
		document.write("<IMG src=\"/images/b_menu_in_01.gif\" width=198 height=40 border=\"0\" name=\"m_01\" alt=\"高校生保護者意識啓発リーフレット作成・配布\"></A>");
	}
	document.write("</TD></TR>");
	//■高校生採用に関する企業意識調査実施
	document.write("<TR><TD>");
	if (kbn != 'isikityosa'){
		document.write("<A href=\"/isikityosa.htm\" onMouseOver=\"document.images[\'m_02\'].src=\'/images/b_menu_on_02.gif\'\"onMouseOut=\"document.images[\'m_02\'].src=\'/images/b_menu_off_02.gif\'\">");
		document.write("<IMG src=\"/images/b_menu_off_02.gif\" width=198 height=40 border=\"0\" name=\"m_02\" alt=\"高校生採用に関する企業意識調査実施\"</A>");
	}else{
		document.write("<A href=\"/isikityosa.htm\">");
		document.write("<IMG src=\"/images/b_menu_in_02.gif\" width=198 height=40 border=\"0\" name=\"m_02\" alt=\"高校生採用に関する企業意識調査実施\"</A>");
	}
	document.write("</TD></TR>");
	//■キャリア教育推進フォーラム実施
	document.write("<TR><TD>");
	if (kbn != 'career'){
		document.write("<A href=\"/career.htm\" onMouseOver=\"document.images[\'m_03\'].src=\'/images/b_menu_on_03.gif\'\"onMouseOut=\"document.images[\'m_03\'].src=\'/images/b_menu_off_03.gif\'\">");
		document.write("<IMG src=\"/images/b_menu_off_03.gif\" width=198 height=25 border=\"0\" name=\"m_03\" alt=\"キャリア教育推進フォーラム実施\"</A>");
	}else{
		document.write("<A href=\"/career.htm\">");
		document.write("<IMG src=\"/images/b_menu_in_03.gif\" width=198 height=25 border=\"0\" name=\"m_03\" alt=\"キャリア教育推進フォーラム実施\"</A>");
	}
	document.write("</TD></TR>");
	//■高校低学年生向け企業情報誌作成・配布
	document.write("<TR><TD>");
	if (kbn != "want"){
		document.write("<A href=\"/want.htm\" onMouseOver=\"document.images[\'m_04\'].src=\'/images/b_menu_on_04.gif\'\"onMouseOut=\"document.images[\'m_04\'].src=\'/images/b_menu_off_04.gif\'\">");
		document.write("<IMG src=\"/images/b_menu_off_04.gif\" width=198 height=40 border=\"0\" name=\"m_04\" alt=\"高校低学年生向け企業情報誌作成・配布\"></A>");
	}else{
		document.write("<A href=\"/want.htm\">");
		document.write("<IMG src=\"/images/b_menu_in_04.gif\" width=198 height=40 border=\"0\" name=\"m_04\" alt=\"高校低学年生向け企業情報誌作成・配布\"></A>");
	}
	document.write("</TD></TR>");
	//■高校生職場見学会実施
	document.write("<TR><TD>");
	if (kbn != "high_kengaku"){
		document.write("<A href=\"/high_kengaku.htm\" onMouseOver=\"document.images[\'m_05\'].src=\'/images/b_menu_on_05.gif\'\"onMouseOut=\"document.images[\'m_05\'].src=\'/images/b_menu_off_05.gif\'\">");
		document.write("<IMG src=\"/images/b_menu_off_05.gif\" width=198 height=26 border=\"0\" name=\"m_05\" alt=\"高校生職場見学会実施\"></A></TD>");
	}else{
		document.write("<A href=\"/high_kengaku.htm\">");
		document.write("<IMG src=\"/images/b_menu_in_05.gif\" width=198 height=26 border=\"0\" name=\"m_05\" alt=\"高校生職場見学会実施\"></A></TD>");
	}
	document.write("</TR>");
	
	//□□雇用対策関連事業□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□
	document.write("<TR><TD><IMG src=\"/images/ttl_b_taisakukanren.gif\" alt=\"雇用対策関連事業\"></TD></TR>");
	
	//■若年者の採用拡大のための広報、及び、啓発
	document.write("<TR><TD>");
	if (kbn != 'koho_keihatu'){
		document.write("<A href=\"/koho_keihatu.htm\" onMouseOver=\"document.images[\'m_06\'].src=\'/images/b_menu_on_06.gif\'\"onMouseOut=\"document.images[\'m_06\'].src=\'/images/b_menu_off_06.gif\'\">");
		document.write("<IMG src=\"/images/b_menu_off_06.gif\" width=198 height=39 border=\"0\" name=\"m_06\" alt=\"若年者の採用拡大のための広報、及び、啓発\"></A>");
	}else{
		document.write("<A href=\"/koho_keihatu.htm\">");
		document.write("<IMG src=\"/images/b_menu_in_06.gif\" width=198 height=39 border=\"0\" name=\"m_06\" alt=\"若年者の採用拡大のための広報、及び、啓発\"></A>");
	}
	document.write("</TD></TR>");
	
	//■新人社員（内定者）合同研修会実施
	document.write("<TR><TD>");
	if (kbn != 'naiteisha'){
		document.write("<A href=\"/naiteisha.htm\" onMouseOver=\"document.images[\'m_07\'].src=\'/images/b_menu_on_07.gif\'\"onMouseOut=\"document.images[\'m_07\'].src=\'/images/b_menu_off_07.gif\'\">");
		document.write("<IMG src=\"/images/b_menu_off_07.gif\" width=198 height=40 border=\"0\" name=\"m_07\" alt=\"新人社員（内定者）合同研修会実施\"></A>");
	}else{
		document.write("<A href=\"/naiteisha.htm\">");
		document.write("<IMG src=\"/images/b_menu_in_07.gif\" width=198 height=40 border=\"0\" name=\"m_07\" alt=\"新人社員（内定者）合同研修会実施\"></A>");
	}
	document.write("</TD></TR>");
	
	//■企業合同説明会および事業所説明会実施
	document.write("<TR><TD>");
	if (kbn != "setumeikai"){
		document.write("<A href=\"/setumeikai.htm\" onMouseOver=\"document.images[\'m_08\'].src=\'/images/b_menu_on_08.gif\'\"onMouseOut=\"document.images[\'m_08\'].src=\'/images/b_menu_off_08.gif\'\">");
		document.write("<IMG src=\"/images/b_menu_off_08.gif\" width=198 height=40 border=\"0\" name=\"m_08\" alt=\"企業合同説明会および事業所説明会実施\"></A>");
	}else{
		document.write("<A href=\"/setumeikai.htm\">");
		document.write("<IMG src=\"/images/b_menu_in_08.gif\" width=198 height=40 border=\"0\" name=\"m_08\" alt=\"企業合同説明会および事業所説明会実施\"></A>");
	}
	document.write("</TD></TR>");
	
	//■高校就職担当者職場見学会実施
	document.write("<TR><TD>");
	if (kbn != 'tan_kengaku'){
		document.write("<A href=\"/tan_kengaku.htm\" onMouseOver=\"document.images[\'m_09\'].src=\'/images/b_menu_on_09.gif\'\"onMouseOut=\"document.images[\'m_09\'].src=\'/images/b_menu_off_09.gif\'\">");
		document.write("<IMG src=\"/images/b_menu_off_09.gif\" width=198 height=40 border=\"0\" name=\"m_09\" alt=\"高校就職担当者職場見学会実施\"></A>");
	}else{
		document.write("<A href=\"/tan_kengaku.htm\">");
		document.write("<IMG src=\"/images/b_menu_in_09.gif\" width=198 height=40 border=\"0\" name=\"m_09\" alt=\"高校就職担当者職場見学会実施\"></A>");
	}
	document.write("</TD></TR>");
	
	//■地域産業担い手育成事業実施
	document.write("<TR><TD>");
	if (kbn != 'ninaite'){
		document.write("<A href=\"/ninaite.htm\" onMouseOver=\"document.images[\'m_10\'].src=\'/images/b_menu_on_10.gif\'\"onMouseOut=\"document.images[\'m_10\'].src=\'/images/b_menu_off_10.gif\'\">");
		document.write("<IMG src=\"/images/b_menu_off_10.gif\" width=198 height=27 border=\"0\" name=\"m_10\" alt=\"地域産業担い手育成事業実施\"></A>");
	}else{
		document.write("<A href=\"/tan_kengaku.htm\">");
		document.write("<IMG src=\"/images/b_menu_in_10.gif\" width=198 height=27 border=\"0\" name=\"m_10\" alt=\"地域産業担い手育成事業実施\"></A>");
	}
	document.write("</TD></TR>");


	//■支援室
	document.write("<TR><TD><BR>");
	if (kbn != 'siensitu'){
		document.write("<A href=\"/siensitu.htm\" onMouseOver=\"document.images[\'m_11\'].src=\'/images/b_menu_on_11.gif\'\"onMouseOut=\"document.images[\'m_11\'].src=\'/images/b_menu_off_11.gif\'\">");
		document.write("<IMG src=\"/images/b_menu_off_11.gif\" width=198 height=29 border=\"0\" name=\"m_11\" alt=\"こうち就職活動支援室\"></A>");
	}else{
		document.write("<A href=\"/siensitu.htm\">");
		document.write("<IMG src=\"/images/b_menu_in_11.gif\" width=198 height=29 border=\"0\" name=\"m_11\" alt=\"こうち就職活動支援室\"></A>");
	}
	document.write("</TD></TR>");

	document.write("</TABLE>");
	document.write("</CENTER>");
	document.write(wLayerE);
	
	
	//------------------------------------------------------------
	//本文部分のレイヤータグ（開始）編集
	//------------------------------------------------------------
	if (flg == "wns") {
		
		//Netscapeの場合
		if (window.location == "http://www.kochi-job.net/index.htm"){
			document.write("<TABLE border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><TR><TD width=\"190\">&nbsp;</TD><TD width=\"590\">");
		} else {
			document.write("<LAYER id=\"main\" pagex=\"200\" pagey=\"92\" width=\"590\" height=\"100\"  z-index=\"3\">");
		}
	} else {
		
		//Internet Explorerの場合
		document.write("<DIV id=\"main\" style=\"position:absolute; left:200px; top:92px; width:590px; height:100; z-index:3\">");

	}

}

/*
'==============================================================================
' 各ページフッダ部の書き出し
'==============================================================================
*/
function DrawFoot (prev,flg) {
	var wInfoArray;
	var mainColor;
	var subColor;

	//------------------------------------------------------------
	//書き出し
	//------------------------------------------------------------
	document.write("<TABLE width=\"560\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
	document.write("<TR>");
	if (flg == 1) {		//ページがタテに長い場合はflgに1を設定し[トップページに戻る]ボタンを表示
			document.write("<TD align=\"right\"><FONT size=\"-1\">［ <A href=\"#top\">このページのトップへ↑</A> ］</FONT></TD>");
	} else {
			document.write("<TD></TD>");
	}

	document.write("</TR>");
	document.write("</TABLE>");
	if ((window.location == "http://www.kochi-job.net/index.htm")||(window.location == "http://www.kochi-job.net/")) {
		DrawCopyright();
	}
	
	//------------------------------------------------------------
	//本文部分のレイヤータグ（終了）編集
	//------------------------------------------------------------
	if (flag == "wns") {
		
		//Netscapeの場合
		if (window.location == "http://www.kochi-job.net/index.htm") {
			document.write("</TD></TR></TABLE>");

		} else {
			document.write("</LAYER>");
		}
		
	} else {
		
		//Internet Explorerの場合
		document.write("</DIV>");

	}
}

/*
'==============================================================================
' コピーライト部の書き出し(例：見出し、記事、写真の無断転載を禁じます)
'==============================================================================
*/

function DrawCopyright () {
    //書き出し
    document.write("<TABLE width=\"560\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\">");
    document.write("<TR valign=\"bottom\">");
    document.write("<TD>&nbsp;</TD>");
    document.write("<TD height=\"20\" class=\"copyright\"><HR size=\"1\">Copyright(C) 2002-2008 高知県経営者協会就職支援室 All Rights Reserved<BR>このホームページ上の全てのデータ、ファイルを無断で転載、掲載する事を禁止します。</TD>");
	document.write("</TR>");
    document.write("</TABLE>");
}


/*
'==============================================================================
' カウンセリングフォームのチェック
'==============================================================================
*/
function formCheck(){

	//■メールアドレス
	str1 = document.forms[0].txt_MAIL.value;
	str2 = document.forms[0].txt_MAIL2.value;
	var err = false;
	if (str1 != str2){
		alert("メールアドレスが確認用アドレスと異なっています。");
		err = true;
	}else{
		var tmp = str1.match("^[0-9A-Za-z._-]+@[0-9A-Za-z.-]+$");
		if (tmp != str1){
			alert("メールアドレスに誤りがあります。");
			err = true;
		}
	}

	if (err == true){
		document.forms[0].txt_MAIL.focus();
		return false;
	}

    //■文字数チェック（内容）空白は許可
	str = document.forms[0].are_NAIYO.value;
	if(str.indexOf(unescape('%0D%0A')) > -1) {
		rcode = unescape('%0D%0A')
	}else if (str.indexOf(unescape('%0A')) > -1){
		rcode = unescape('%0A')
	}else {rcode = unescape('%0D')}
		i = 0
		p = ''
	while (str.indexOf(rcode,i) != -1) {
		m = str.indexOf(rcode,i)
		p += str.substring(i,m)
		i = m + rcode.length;
		}
	p += str.substring(i,str.length)

    if (p.length == 0){
    	err = true;
    	alert("相談内容を記入してください。");
    };
	if (err == true){
		document.forms[0].are_NAIYO.focus();
		return false;
	}
	
	//■投稿確認
	if(confirm("この内容で送信しますか？") == true) {
        document.forms[0].submit();
        return true;
    }else{
        return false;
    }

}




//-------------------------------------------------------------------
// 文字数を取得する（日本語を２，ＡＮＫを１とカウント）
//-------------------------------------------------------------------
function JStrLen(vStr) {
   var vLen = 0;
   var rStr = "";
   var i;

   //日本語はエンコーディングする
   rStr = escape(vStr);

   for (i=0;i<rStr.length;i++,vLen++) {
      //文字のuは日本語
      if (rStr.charAt(i)=="%") {
         if (rStr.charAt(++i)=="u") {
            i += 3;
            vLen++;
         }
         i++;
      }
   }
   return vLen;
}