var seminar_list = new Array();
var entry_data;
entry_data = {
title:'施工管理資料作成効率アップセミナー',
date:'20120221',
disp_date:'2012年02月21日(&#28779;)',
url:'http://www.kentem.jp/event_seminar/2012/02/shikoku_120221.html',
place:'愛媛県大洲市東大洲270-1',
category:'総合評価',
is_full:false,
is_cpds:true,
modified:'2012年02月09日(&#26408;)'
};
seminar_list.push(entry_data);
entry_data = {
title:'スキルアップセミナー2012　in　旭川',
date:'20120229',
disp_date:'2012年02月29日(&#27700;)',
url:'http://www.kentem.jp/event_seminar/2012/02/sapporo_120229.html',
place:'北海道旭川市緑が丘東1条3丁目1-6',
category:'',
is_full:false,
is_cpds:true,
modified:'2012年02月09日(&#26408;)'
};
seminar_list.push(entry_data);
entry_data = {
title:'スキルアップセミナー2012　in　稚内',
date:'20120228',
disp_date:'2012年02月28日(&#28779;)',
url:'http://www.kentem.jp/event_seminar/2012/02/sapporo_120228.html',
place:'北海道稚内市大黒1丁目8-6',
category:'',
is_full:false,
is_cpds:true,
modified:'2012年02月09日(&#26408;)'
};
seminar_list.push(entry_data);
entry_data = {
title:'図面系ソフト連動体験セミナー【土浦市会場】',
date:'20120229',
disp_date:'2012年02月29日(&#27700;)',
url:'http://www.kentem.jp/event_seminar/2012/02/kantou_iba_120229.html',
place:'茨城県土浦市木田余東台4-1-1',
category:'その他',
is_full:false,
is_cpds:false,
modified:'2012年02月09日(&#26408;)'
};
seminar_list.push(entry_data);
entry_data = {
title:'図面系ソフト連動体験セミナー【つくば市会場】',
date:'20120224',
disp_date:'2012年02月24日(&#37329;)',
url:'http://www.kentem.jp/event_seminar/2012/02/kantou_iba_120224.html',
place:'茨城県つくば市下岩崎2164-1 　',
category:'その他',
is_full:false,
is_cpds:false,
modified:'2012年02月09日(&#26408;)'
};
seminar_list.push(entry_data);
entry_data = {
title:'デキスパートステップUP講習会 <br>A納図初級編【岡崎市会場】',
date:'20120308',
disp_date:'2012年03月08日(&#26408;)',
url:'http://www.kentem.jp/event_seminar/2012/02/nagoya_aic_120308.html',
place:'愛知県岡崎市康生通西4-71',
category:'CAD,ステップアップ講習会',
is_full:false,
is_cpds:true,
modified:'2012年02月07日(&#28779;)'
};
seminar_list.push(entry_data);
entry_data = {
title:'デキスパートステップUP講習会 <br>A納図初級編',
date:'20120307',
disp_date:'2012年03月07日(&#27700;)',
url:'http://www.kentem.jp/event_seminar/2012/02/nagoya_mie_120307.html',
place:'三重県津市一身田上津部田1234 ',
category:'CAD,ステップアップ講習会',
is_full:false,
is_cpds:true,
modified:'2012年02月07日(&#28779;)'
};
seminar_list.push(entry_data);
entry_data = {
title:'デキスパートステップUP講習会 <br>A納図初級編【津島市会場】',
date:'20120305',
disp_date:'2012年03月05日(&#26376;)',
url:'http://www.kentem.jp/event_seminar/2012/02/nagoya_mie_120305.html',
place:'愛知県津島市藤浪町3-89-10',
category:'CAD,ステップアップ講習会',
is_full:false,
is_cpds:true,
modified:'2012年02月07日(&#28779;)'
};
seminar_list.push(entry_data);
entry_data = {
title:'デキスパートステップUP講習会<br>～実践!A納図講習　電子納品攻略編～',
date:'20120223',
disp_date:'2012年02月23日(&#26408;)',
url:'http://www.kentem.jp/event_seminar/2012/02/honsya_ham_120123.html',
place:'静岡県浜松市浜北区貴布祢291-1',
category:'ステップアップ講習会',
is_full:false,
is_cpds:true,
modified:'2012年02月01日(&#27700;)'
};
seminar_list.push(entry_data);
entry_data = {
title:'Ａ納図連携セミナー（現場大将＆出来形展開図）　【奥州市】',
date:'20120216',
disp_date:'2012年02月16日(&#26408;)',
url:'http://www.kentem.jp/event_seminar/2012/02/sendai_iwa_120216.html',
place:'岩手県奥州市水沢区佐倉河字石橋41',
category:'CAD',
is_full:false,
is_cpds:true,
modified:'2012年02月01日(&#27700;)'
};
seminar_list.push(entry_data);
entry_data = {
title:'Ａ納図連携セミナー（現場大将＆出来形展開図）　【盛岡市】',
date:'20120214',
disp_date:'2012年02月14日(&#28779;)',
url:'http://www.kentem.jp/event_seminar/2012/02/sendai_iwa_120214.html',
place:'岩手県盛岡市永井24-10-1',
category:'CAD',
is_full:false,
is_cpds:true,
modified:'2012年02月01日(&#27700;)'
};
seminar_list.push(entry_data);
entry_data = {
title:'目指せ８０点取得！工事成績UPの秘訣セミナー',
date:'20120227',
disp_date:'2012年02月27日(&#26376;)',
url:'http://www.kentem.jp/event_seminar/2012/01/hiroshima_hiro_120227.html',
place:'広島県尾道市東尾道9番地5',
category:'総合評価',
is_full:false,
is_cpds:true,
modified:'2012年01月31日(&#28779;)'
};
seminar_list.push(entry_data);
entry_data = {
title:'現場業務改革セミナー<br>～3次元データ及びLandecoを利用した施工管理及びＴＳ出来形～　（秋田市）',
date:'20120217',
disp_date:'2012年02月17日(&#37329;)',
url:'http://www.kentem.jp/event_seminar/2012/01/sendai_aki_120217.html',
place:'秋田県秋田市寺内神屋敷3-1',
category:'情報化施工',
is_full:false,
is_cpds:true,
modified:'2012年01月31日(&#28779;)'
};
seminar_list.push(entry_data);
entry_data = {
title:'現場業務改革セミナー<br>～3次元データ及びLandecoを利用した施工管理及びＴＳ出来形～　（能代市）',
date:'20120216',
disp_date:'2012年02月16日(&#26408;)',
url:'http://www.kentem.jp/event_seminar/2012/01/sendai_aki_120216.html',
place:'秋田県能代市二ツ井町上台1-1',
category:'情報化施工',
is_full:false,
is_cpds:true,
modified:'2012年01月31日(&#28779;)'
};
seminar_list.push(entry_data);
entry_data = {
title:'現場業務改革セミナー<br>～3次元データ及びLandecoを利用した施工管理及びＴＳ出来形～　（十和田市）',
date:'20120215',
disp_date:'2012年02月15日(&#27700;)',
url:'http://www.kentem.jp/event_seminar/2012/01/sendai_ao_120215.html',
place:'青森県十和田市大字三本木字里ノ沢1-240',
category:'情報化施工',
is_full:false,
is_cpds:true,
modified:'2012年01月31日(&#28779;)'
};
seminar_list.push(entry_data);
entry_data = {
title:'デキスパートスキルアップセミナー　（CAD基本操作編）',
date:'20120210',
disp_date:'2012年02月10日(&#37329;)',
url:'http://www.kentem.jp/event_seminar/2012/01/hiroshima_yama_120210.html',
place:'山口県萩市大字江向548',
category:'CAD',
is_full:false,
is_cpds:true,
modified:'2012年01月27日(&#37329;)'
};
seminar_list.push(entry_data);
entry_data = {
title:'デキスパートステップUP講習会<br>～実践!A納図講習、電子納品攻略編～',
date:'20120215',
disp_date:'2012年02月15日(&#27700;)',
url:'http://www.kentem.jp/event_seminar/2012/01/honsya_shi_120215.html',
place:'静岡県富士市石坂312-1',
category:'ステップアップ講習会',
is_full:false,
is_cpds:true,
modified:'2012年01月27日(&#37329;)'
};
seminar_list.push(entry_data);
entry_data = {
title:'建設BCPセミナー',
date:'20120214',
disp_date:'2012年02月14日(&#28779;)',
url:'http://www.kentem.jp/event_seminar/2012/01/kantou_toc_120214.html',
place:'栃木県小山市大字下国府塚25-1',
category:'その他',
is_full:false,
is_cpds:true,
modified:'2012年01月24日(&#28779;)'
};
seminar_list.push(entry_data);
entry_data = {
title:'建設BCPセミナー',
date:'20120213',
disp_date:'2012年02月13日(&#26376;)',
url:'http://www.kentem.jp/event_seminar/2012/01/kantou_toc_120213.html',
place:'栃木県宇都宮市明保野町7-66 ',
category:'その他',
is_full:false,
is_cpds:true,
modified:'2012年01月24日(&#28779;)'
};
seminar_list.push(entry_data);
entry_data = {
title:'災害・緊急工事で役立つ「Ａ納図」セミナー　（三川町）',
date:'20120221',
disp_date:'2012年02月21日(&#28779;)',
url:'http://www.kentem.jp/event_seminar/2012/01/sendai_mikawa_120221.html',
place:'山形県東田川郡三川町大字横山字堤172-1',
category:'CAD',
is_full:false,
is_cpds:true,
modified:'2012年02月07日(&#28779;)'
};
seminar_list.push(entry_data);
entry_data = {
title:'災害・緊急工事で役立つ「Ａ納図」セミナー　（郡山市）',
date:'20120213',
disp_date:'2012年02月13日(&#26376;)',
url:'http://www.kentem.jp/event_seminar/2012/01/sendai_ko_120213.html',
place:'福島県郡山市熱海町熱海2-148-2',
category:'CAD',
is_full:true,
is_cpds:true,
modified:'2012年02月07日(&#28779;)'
};
seminar_list.push(entry_data);
entry_data = {
title:'電子納品体験セミナー',
date:'20120228',
disp_date:'2012年02月28日(&#28779;)',
url:'http://www.kentem.jp/event_seminar/2012/01/kantou_sai_120228.html',
place:'埼玉県さいたま市桜区道場4-3-1 ',
category:'電子納品',
is_full:true,
is_cpds:true,
modified:'2012年02月09日(&#26408;)'
};
seminar_list.push(entry_data);
entry_data = {
title:'電子納品体験セミナー',
date:'20120221',
disp_date:'2012年02月21日(&#28779;)',
url:'http://www.kentem.jp/event_seminar/2012/01/kantou_gun_120221.html',
place:'群馬県前橋市大渡町1-10-7　',
category:'電子納品',
is_full:false,
is_cpds:true,
modified:'2012年01月19日(&#26408;)'
};
seminar_list.push(entry_data);
var searchAction = function(){
var result = searchEntry();
if(result.length == 0){
var str = "<h3 class=\"mrgt30 BgTitle TitleStyle\">イベント・セミナーの検索結果</h3>\n";
str += "<p>検索結果がありませんでした。</p>";
$("#entry_list").html(str);
$("#entry_describe").html("");
}else{
var html = buildHtmlResult(result);
$("#entry_list").html(html);
$("#entry_describe").html("");
}
return false;
}
var searchPrefecture = function(prefecture){
var result = new Array();
var prefecture_name = prefecture;
for(var i=0;i<seminar_list.length;i++){
var rgx = new RegExp('^' + prefecture_name, "i");
if(seminar_list[i].place.match(rgx)){
result.push(seminar_list[i]);
}
}
if(result.length == 0){
var str = "<h3 class=\"mrgt30 BgTitle TitleStyle\">イベント・セミナーの検索結果</h3>\n";
str += "<p>検索結果がありませんでした。</p>";
$("#entry_list").html(str);
$("#entry_describe").html("");
}else{
var html = buildHtmlResult(result);
$("#entry_list").html(html);
$("#entry_describe").html("");
}
return false;
};
var searchEntry = function(){
//start_date
var start_date = null;
var start_date_year =$("#start_date_year").val();
var start_date_month = $("#start_date_month").val();
if(start_date_month == ""){
start_date_month = "01";
}
var start_date_day = $("#start_date_day").val();
if(start_date_day == ""){
start_date_day = "01";
}
if(start_date_year != "" && start_date_month != "" && start_date_day != ""){
d = new Date(start_date_year, start_date_month, start_date_day);
s = d.getFullYear() + ("0"+(d.getMonth())).slice(-2) + ("0"+d.getDate()).slice(-2);
start_date = parseInt(s);
}
//end_date
var end_date = null;
var end_date_year = $("#end_date_year").val();
var end_date_month = $("#end_date_month").val();
if(end_date_month == ""){
end_date_month = "12";
}
var end_date_day = $("#end_date_day").val();
if(end_date_day == ""){
end_date_day = "30";
}
if(end_date_year != "" && end_date_month != "" && end_date_day != ""){
d = new Date(end_date_year, end_date_month, end_date_day);
s = d.getFullYear() + ("0"+(d.getMonth())).slice(-2) + ("0"+d.getDate()).slice(-2);
end_date = parseInt(s);
}
var prefecture = $("#prefecture").val();
//set category value
var category = new Array();
if($("#category_sougou").attr('checked')){
category.push("総合評価");
}
if($("#category_denshi").attr('checked')){
category.push("電子納品");
}
if($("#category_cad").attr('checked')){
category.push("CAD");
}
if($("#category_jyoho").attr('checked')){
category.push("情報化施工");
}
if($("#category_step").attr('checked')){
category.push("ステップアップ講習会");
}
if($("#category_other").attr('checked')){
category.push("その他");
}
//set other value
var is_cpds = false;
var is_denshi = false;
if($("#other_cpds").attr('checked')){
is_cpds = true;
}
/*
if($("#other_denshi").attr('checked')){
is_denshi = true;
}
*/
var result = new Array();
for(var i=0;i<seminar_list.length;i++){
var is_match = true;
if(start_date != null && end_date != null){
if(seminar_list[i].date >= start_date && seminar_list[i].date <= end_date){
is_match = true;
}else{
continue;
}
}
if(start_date != null && end_date == null){
if(seminar_list[i].date >= start_date){
is_match = true;
}else{
continue;
}
}
if(start_date == null && end_date != null){
if(seminar_list[i].date <= end_date){
is_match = true;
}else{
continue;
}
}
if(prefecture != null){
if(prefecture.length > 0){
var rgx = new RegExp('^' + prefecture, "i");
if(seminar_list[i].place.match(rgx)){
is_match = true;
}else{
continue;
}
}
}
for(var j=0;j<category.length;j++){
if(seminar_list[i].category.indexOf(category[j]) != -1){
is_match = true;
break;
}else{
is_match = false;
}
}
if(is_match == false){
continue;
}
if(is_cpds){
if(seminar_list[i].is_cpds == false){
continue;
}
}
if(is_denshi){
if(seminar_list[i].is_denshi == false){
continue;
}
}
result.push(seminar_list[i]);
}
return result;
};
var buildHtmlResult = function(result_list){
var str = "<h3 class=\"mrgt30 BgTitle TitleStyle\">イベント・セミナーの検索結果</h3>\n";
str += "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" summary=\"検索結果\" class=\"page53-textbox1 intro\">\n";
str += "<tr><th class=\"colum1\">開催日</th><th class=\"colum2\">タイトル</th><th class=\"colum3\">更新日</th></tr>\n";
for(var i = 0;i<result_list.length;i++){
var title_class = "page53-link3";
if(result_list[i].is_cpds){
title_class = "page53-link1";
}
var td_class = "";
if(i != 0){
td_class = "bordert1 ";
}
str += "<tr><th class=\""+td_class+"borderr1\">" +result_list[i].disp_date+"</th>\n";
str += "<td class=\""+td_class+"borderr1\"><a class=\""+title_class+"\" href=\""+result_list[i].url+"\">"+result_list[i].title+"</a><br />\n";
str += "場所；"+result_list[i].place+"　　カテゴリ："+result_list[i].category+"　";
if(result_list[i].is_full){
str += "<a class=\"page53-link2\" href=\"#\">満員御礼</a>";
}
str += "</td>\n";
str += "<td class=\""+td_class+"\">"+result_list[i].modified+"</td></tr>";
}
str += "</table>";
return str;
};

