#####  INCM plug-in for KENT-WEB (http://www.kent-web.com/)
 ####                                Ver1.61 　2004/03/25 by GETWILD'74

package KENT_WEB;

# モジュールのパス設定
$_=$0; s/[^\\]+$//; s/data\\.*$/Plugins\\/;
# モジュールの読み込み
require ($_.'INCM_MODULE.PM');

#####  フォルダプロパティの設定  ###########################################

$Dialog= <<"#[/IniDIALOG]";
#[IniDIALOG]
 #URL=1\nUPURL=1\nNAME=1\nEMAIL=1\nHP=1\nKEY=1
 #USER=1\nPASS=1\nPARAM1=1\nPARAM2=1
 #_URL=掲示板のアドレス(URL)(&A):
 #_UPURL=書き込み先のアドレス(URL)
 #_NAME=名前:
 #_EMAIL=メールアドレス:
 #_HP=ホームページ(URL)
 #_KEY=削除キー
 #_USER=User
 #_PASS=Pass
 #_PARAM1=
 #_PARAM2=巡回ページ数
 #L000=L,,----- 掲示板の情報 -----
 #L000=TS,L_BBS_Name,掲示板の種類
 #L000=TS,L_BBS_Ver,掲示板のバージョン
 #L001=L,,----- ＢＢＳ等の各種パラメータ -----
 #L002=P,L_COLOR,記事色.
 #L003=TS,L_COLOR_TS,記事色(番号指定等).
 #L004=P,L_COLOR2,題名色.
 #L005=TS,L_COLOR2_TS,題名色(番号指定等).
 #L006=P,L_COLOR3,テーブル色.
 #L007=TS,L_COLOR3_TS,テーブル色(番号指定等).
 #L008=L,,↓各種入力項目
 #L009=TS,L_AREA,居住地.
 #L010=TS,L_AGE,年齢.
 #L011=TS,L_BLD,血液型.
 #L012=TS,L_WORK,職業.
 #L013=TS,L_SEX,性別.
 #L014=L,,↓アイコン指定
 #L015=TS,L_ICON,選択アイコン.
 #L016=TS,L_ICON2,HTTP指定アイコン.
 #L017=L,,----- プチ☆ボードの返信方式 -----
 #L017=R,L_PETIT=0,一行.
 #L017=R,L_PETIT=1,複数行.
 #L018=L,,----- 題名入力欄の存在 -----
 #L018=R,L_TITLE=0,題名なし.
 #L018=R,L_TITLE=1,題名あり.
 #L019=L,,----- 管理人返信モード -----
 #L019=TS,L_Opt1,PassWord.
 #L020=L,,----- 添付ファイルのダウンロード -----
 #L020=C,L_FileDown,ダウンロードする.
 #L021=L,,----- フォーム上の各種設定 -----
 #L022=L,,  -- タグの指定 --
 #L022=R,L_Opt2=0,タグ無効.
 #L022=R,L_Opt2=on,タグ有効.
 #L023=L,,  -- クッキーの保存 --
 #L023=R,L_Opt3=0,クッキーを保存しない.
 #L023=R,L_Opt3=on,クッキーを保存する.
 #L024=L,,  -- メッセージモード --
 #L024=R,L_Opt4=soft,手動改行.
 #L024=R,L_Opt4=hard,強制改行.
 #L024=R,L_Opt4=pre,図表\.
 #L025=L,,  -- アドレス表\示 --
 #L025=C,L_Opt5,メールアドレス非表\示.
 #L026=L,,  -- GateWayBoard --
 #L026=TS,L_ID,ID.
 #L026=TS,L_Pass,PASS.
 #L027=L,,  -- アップロードファイル --
 #L027=F,L_File,送信するファイル選択.
 #L028=L,,----- 正規表\現解析の設定 -----
 #L029=L,,  -- 記事全般 --
 #L030=TS,L_PrmMain:HeadBody,記事ヘッダと本文の区切り.
 #L031=TS,L_PrmMain:Found,記事と判断する部分.
 #L032=TS,L_PrmMain:PassFound,無条件に記事とする正規表\現.
 #L033=L,,  -- 記事情報(親記事) --
 #L033=TS,L_RegMain:Num,記事番号.
 #L033=TS,L_RegMain:ResNum,レス元記事番号.
 #L033=TS,L_RegMain:Title,題名.
 #L033=TS,L_RegMain:Name,発言者名.
 #L033=TS,L_RegMain:Date,記事の日付書式.
 #L033=TS,L_RegMain:Url,ＵＲＬ.
 #L033=TS,L_RegMain:Mail,メールアドレス.
 #L033=TS,L_RegMain:Comment,本文.
 #L033=TS,L_RegMain:Attachment,添付ファイル.
 #L034=L,,  -- 記事情報(子記事) --
 #L034=TS,L_RegMain:NumC,記事番号.
 #L034=TS,L_RegMain:ResNumC,レス元記事番号.
 #L034=TS,L_RegMain:TitleC,題名.
 #L034=TS,L_RegMain:NameC,発言者名.
 #L034=TS,L_RegMain:DateC,記事の日付書式.
 #L034=TS,L_RegMain:UrlC,ＵＲＬ.
 #L034=TS,L_RegMain:MailC,メールアドレス.
 #L034=TS,L_RegMain:CommentC,本文.
 #L034=TS,L_RegMain:AttachmentC,添付ファイル.
 #L035=L,,  -- スレッド解析 --
 #L036=TS,L_PrmMain:Root,親記事判定.
 #L036=TS,L_PrmMain:Split,記事の切り分け.
 #L037=L,,  -- ツリー解析 --
 #L038=TS,L_PrmTopic1:Found,記事と判断する部分.
 #L038=TS,L_RegTopic1:Num,記事番号.
 #L038=TS,L_RegTopic1:ResNum,レス元記事番号.
 #L038=TS,L_RegTopic1:List,記事のURLリスト.
 #L038=TS,L_RegMain:PullList,URLリストの取出方法.
 #L038=TS,L_PrmTopic1:Step,記事区切り.
 #L038=TS,L_PrmTopic1:StepTop,ページ頭読み飛ばし.
 #L038=TS,L_PrmTopic1:StepBottom,ページ末尾読み飛ばし.
 #L038=TS,L_PrmPages:Topic1:NextPage,ページめくり.
 #L038=TS,L_PrmTopic1:Fram,フレームの引数.
 #L038=TS,L_PrmTopic1:Mode,CGIモードの引数.
 #L038=TS,L_PrmPages:Topic1:Method,リクエストMethod(GET or POST).
 #L039=L,,  -- 記事の読込定義 --
 #L039=TS,L_PrmMain:Step,記事の区切り.
 #L039=TS,L_PrmMain:StepTop,ページ頭読み飛ばし.
 #L039=TS,L_PrmMain:StepBottom,ページ末尾読み飛ばし.
 #L039=TS,L_PrmPages:Main:NextPage,ページめくり.
 #L039=TS,L_PrmMain:Fram,フレームの引数.
 #L039=TS,L_PrmMain:Mode,CGIモードの引数.
 #L039=TS,L_BasicHttp:Cookie,送信するCookie文字列.
 #L039=TS,L_PrmPages:Main:Method,リクエストMethod(GET or POST).
 #L039=TS,L_BasicHttp:Referer,リンク元とするURL.
 #L040=L,,----- 書込定義 -----
 #L040=TS,L_BasicUpUrl,書込先Urlの指定.
 #L041=L,,----- プラグインデバッグ用設定 -----
 #L041=C,DEBUG=1,動作ログを保存する
 #L041=.
#[/IniDIALOG]

# INCM_MODULEクラスのインスタンス生成(生成時に初期化も行う)
if ($INCM = new INCM_MODULE) {

	# 巡回処理
	$INCM->Main;

}
exit;

#####  フォルダプロパティの定義  ###########################################
sub SetProperty {
	my ($BBS_Name, $BBS_Ver) = @_;
	my %Property;

	# フォルダプロパティ書き換え用の定義
	# Light Board
	if ($BBS_Name eq 'Light Board') {
		$Property{PARAM1} = 1;
		$Property{_HP} = '参照先(URL)';
		$Property{_PARAM2} = '未読ポインタ(例: 2000/01/01,12:00 or No.1)';
		$Property{L000} = 1;
		$Property{L028} = 1;
		$Property{L029} = 1;
		$Property{L030} = 1;
		$Property{L031} = 1;
		$Property{L032} = 1;
		$Property{L033} = 1;
		$Property{L039} = 1;
		$Property{L040} = 1;
		$Property{L041} = 1;

	# Aska BBS
	} elsif ($BBS_Name eq 'Aska BBS') {
		$Property{PARAM1} = 1;
		$Property{_PARAM2} = '未読ポインタ(例: 2000/01/01,12:00 or No.1)';
		$Property{L000} = 1;
		$Property{L021} = 1;
		$Property{L023} = 1;
		$Property{L028} = 1;
		$Property{L029} = 1;
		$Property{L030} = 1;
		$Property{L031} = 1;
		$Property{L032} = 1;
		$Property{L033} = 1;
		$Property{L039} = 1;
		$Property{L040} = 1;
		$Property{L041} = 1;

	# COM Board
	} elsif ($BBS_Name eq 'COM Board') {
		$Property{PARAM1} = 1;
		$Property{_PARAM2} = '未読ポインタ(例: 2000/01/01,12:00 or No.1)';
		$Property{L000} = 1;
		$Property{L018} = 1;
		$Property{L021} = 1;
		$Property{L023} = 1;
		$Property{L028} = 1;
		$Property{L029} = 1;
		$Property{L030} = 1;
		$Property{L031} = 1;
		$Property{L032} = 1;
		$Property{L033} = 1;
		$Property{L039} = 1;
		$Property{L040} = 1;
		$Property{L041} = 1;

	# Sun Board
	} elsif ($BBS_Name eq 'Sun Board') {
		$Property{PARAM1} = 1;
		$Property{_PARAM2} = '未読ポインタ(例: 2000/01/01,12:00 or No.1)';
		$Property{L000} = 1;
		$Property{L028} = 1;
		$Property{L029} = 1;
		$Property{L030} = 1;
		$Property{L031} = 1;
		$Property{L032} = 1;
		$Property{L033} = 1;
		$Property{L039} = 1;
		$Property{L040} = 1;
		$Property{L041} = 1;

	# YY-Board
	} elsif ($BBS_Name eq 'YY-Board' || $BBS_Name eq 'AZAQ-NET') {
		$Property{PARAM1} = 1;
		$Property{L000} = 1;
		$Property{L001} = 1;
		$Property{L002} = 1;
		$Property{L014} = 1;
		$Property{L015} = 1;
		$Property{L028} = 1;
		$Property{L029} = 1;
		$Property{L030} = 1;
		$Property{L031} = 1;
		$Property{L032} = 1;
		$Property{L033} = 1;
		$Property{L034} = 1;
		$Property{L035} = 1;
		$Property{L036} = 1;
		$Property{L039} = 1;
		$Property{L040} = 1;
		$Property{L041} = 1;

	# PETIT BOARD
	} elsif ($BBS_Name eq 'PETIT BOARD') {
		$Property{PARAM1} = 1;
		$Property{L000} = 1;
		$Property{L001} = 1;
		$Property{L002} = 1;
		$Property{L017} = 1;
		$Property{L028} = 1;
		$Property{L029} = 1;
		$Property{L030} = 1;
		$Property{L031} = 1;
		$Property{L032} = 1;
		$Property{L033} = 1;
		$Property{L034} = 1;
		$Property{L035} = 1;
		$Property{L036} = 1;
		$Property{L039} = 1;
		$Property{L040} = 1;
		$Property{L041} = 1;

	# Honey Board
	} elsif ($BBS_Name eq 'Honey Board') {
		$Property{PARAM1} = 1;
		$Property{L000} = 1;
		$Property{L001} = 1;
		$Property{L002} = 1;
		$Property{L014} = 1;
		$Property{L015} = 1;
		$Property{L021} = 1;
		$Property{L023} = 1;
		$Property{L028} = 1;
		$Property{L029} = 1;
		$Property{L030} = 1;
		$Property{L031} = 1;
		$Property{L032} = 1;
		$Property{L033} = 1;
		$Property{L034} = 1;
		$Property{L035} = 1;
		$Property{L036} = 1;
		$Property{L039} = 1;
		$Property{L040} = 1;
		$Property{L041} = 1;

	# G-LIGHT
	} elsif ($BBS_Name eq 'G-LIGHT') {
		$Property{PARAM1} = 1;
		$Property{L000} = 1;
		$Property{L001} = 1;
		$Property{L008} = 1;
		$Property{L009} = 1;
		$Property{L014} = 1;
		$Property{L015} = 1;
		$Property{L016} = '管理人アイコン';
		$Property{L018} = 1;
		$Property{L019} = 1;
		$Property{L028} = 1;
		$Property{L029} = 1;
		$Property{L030} = 1;
		$Property{L031} = 1;
		$Property{L032} = 1;
		$Property{L033} = 1;
		$Property{L034} = 1;
		$Property{L035} = 1;
		$Property{L036} = 1;
		$Property{L039} = 1;
		$Property{L040} = 1;
		$Property{L041} = 1;

	# Fantasy Board
	} elsif ($BBS_Name eq 'Fantasy Board') {
		$Property{PARAM1} = 1;
		$Property{L000} = 1;
		$Property{L001} = 1;
		$Property{L008} = 1;
		$Property{L009} = 1;
		$Property{L014} = 1;
		$Property{L015} = 1;
		$Property{L019} = 1;
		$Property{L021} = 1;
		$Property{L022} = 1;
		$Property{L023} = 1;
		$Property{L028} = 1;
		$Property{L029} = 1;
		$Property{L030} = 1;
		$Property{L031} = 1;
		$Property{L032} = 1;
		$Property{L033} = 1;
		$Property{L034} = 1;
		$Property{L035} = 1;
		$Property{L036} = 1;
		$Property{L039} = 1;
		$Property{L040} = 1;
		$Property{L041} = 1;

	# Web Forum
	} elsif ($BBS_Name eq 'Web Forum' || $BBS_Name eq 'Web Forum plus') {
		$Property{PARAM1} = 1;
		$Property{_PARAM2} = '巡回ページ数 or 未読ポインタ(例: No.1)';
		$Property{L000} = 1;
		$Property{L021} = 1;
		$Property{L024} = 1;
		$Property{L025} = 1;
		$Property{L028} = 1;
		$Property{L029} = 1;
		$Property{L030} = 1;
		$Property{L031} = 1;
		$Property{L032} = 1;
		$Property{L033} = 1;
		$Property{L034} = 1;
		$Property{L035} = 1;
		$Property{L036} = 1;
		$Property{L037} = 1;
		$Property{L038} = 1;
		$Property{L039} = 1;
		$Property{L040} = 1;
		$Property{L041} = 1;

	# ClipBoard
	} elsif ($BBS_Name eq 'ClipBoard') {
		$Property{PARAM1} = 1;
		$Property{_PARAM2} = '未読ポインタ(例: 2000/01/01,12:00 or No.1)';
		$Property{L000} = 1;
		$Property{L020} = 1;
		$Property{L021} = 1;
		$Property{L023} = 1;
		$Property{L027} = 1;
		$Property{L028} = 1;
		$Property{L029} = 1;
		$Property{L030} = 1;
		$Property{L031} = 1;
		$Property{L032} = 1;
		$Property{L033} = 1;
		$Property{L039} = 1;
		$Property{L040} = 1;
		$Property{L041} = 1;

	# Joyful Note
	} elsif ($BBS_Name eq 'Joyful Note') {
		$Property{PARAM1} = 1;
		$Property{L000} = 1;
		$Property{L001} = 1;
		$Property{L002} = 1;
		$Property{L020} = 1;
		$Property{L021} = 1;
		$Property{L027} = 1;
		$Property{L028} = 1;
		$Property{L029} = 1;
		$Property{L030} = 1;
		$Property{L031} = 1;
		$Property{L032} = 1;
		$Property{L033} = 1;
		$Property{L034} = 1;
		$Property{L035} = 1;
		$Property{L036} = 1;
		$Property{L039} = 1;
		$Property{L040} = 1;
		$Property{L041} = 1;

	# Cside BBS
	} elsif ($BBS_Name eq 'Cside BBS') {
		$Property{PARAM1} = 1;
		$Property{L000} = 1;
		$Property{L001} = 1;
		$Property{L014} = 1;
		$Property{L015} = 1;
		$Property{L021} = 1;
		$Property{L023} = 1;
		$Property{L028} = 1;
		$Property{L029} = 1;
		$Property{L030} = 1;
		$Property{L031} = 1;
		$Property{L032} = 1;
		$Property{L033} = 1;
		$Property{L034} = 1;
		$Property{L035} = 1;
		$Property{L036} = 1;
		$Property{L039} = 1;
		$Property{L040} = 1;
		$Property{L041} = 1;

	# GateWay Board
	} elsif ($BBS_Name eq 'GateWay') {
		$Property{PARAM1} = 1;
		$Property{_PARAM2} = '未読ポインタ(例: 2000/01/01,12:00 or No.1)';
		$Property{L000} = 1;
		$Property{L021} = 1;
		$Property{L023} = 1;
		$Property{L026} = 1;
		$Property{L028} = 1;
		$Property{L029} = 1;
		$Property{L030} = 1;
		$Property{L031} = 1;
		$Property{L032} = 1;
		$Property{L033} = 1;
		$Property{L039} = 1;
		$Property{L040} = 1;
		$Property{L041} = 1;

	# Web Patio
	} elsif ($BBS_Name eq 'Web Patio') {
		$Property{PARAM1} = 1;
		$Property{_PARAM2} = '巡回ページ数 or 未読ポインタ(例: No.1)';
		$Property{L000} = 1;
		$Property{L021} = 1;
		$Property{L023} = 1;
		$Property{L025} = 1;
		$Property{L028} = 1;
		$Property{L029} = 1;
		$Property{L030} = 1;
		$Property{L031} = 1;
		$Property{L032} = 1;
		$Property{L033} = 1;
		$Property{L034} = 1;
		$Property{L035} = '  -- スレッド内解析 --';
		$Property{L036} = 1;
		$Property{L037} = '  -- スレッド一覧解析 --';
		$Property{L038} = 1;
		$Property{L039} = 1;
		$Property{L040} = 1;
		$Property{L041} = 1;

	# BBS PARK
	} elsif ($BBS_Name eq 'BBS PARK') {
		$Property{PARAM1} = 1;
		$Property{L000} = 1;
		$Property{L021} = 1;
		$Property{L023} = 1;
		$Property{L028} = 1;
		$Property{L029} = 1;
		$Property{L030} = 1;
		$Property{L031} = 1;
		$Property{L032} = 1;
		$Property{L033} = 1;
		$Property{L037} = 1;
		$Property{L038} = 1;
		$Property{L039} = 1;
		$Property{L040} = 1;
		$Property{L041} = 1;

	# ETC
	} else {
		$Property{L000} = 1;
		$Property{L041} = 1;
	}

	# 掲示板ごとのフォルダプロパティ定義の連想配列リファレンスを返す
	return \%Property;
}

#####  掲示板自動判別  #####################################################
sub AutoSelect {
	my %AutoHOST;
	my %AutoURL;
	my %AutoHTML;

	# HTMLから判断するための定義
	$AutoHTML{'LIGHT'}			= sub {
		my $STR = shift;
		if ($STR =~ /<!-- LIGHT v([\d\.]+) -->/s) {
			return 'Light Board', $1;
		} elsif ($STR =~ /<!-- LIGHT BOARD v([\d\.]+) -->/s) {
			return 'Light Board', $1;
		}
	};
	$AutoHTML{'Aska'}			= sub {
		my $STR = shift;
		if ($STR =~ /<!-- Aska v([\d\.]+) -->/s) {
			return 'Aska BBS', $1;
		} elsif ($STR =~ /<!-- ASKA BBS v([\d\.]+) -->/s) {
			return 'Aska BBS', $1;
		} elsif ($STR =~ /<!--.*?\(ASKA BBS v([\d\.]+)\）-->/s) {
			return 'Aska BBS', $1;
		}
	};
	$AutoHTML{'COMBBS'}			= sub {
		my $STR = shift;
		if ($STR =~ /<!-- COMBBS v([\d\.]+) -->/s) {
			return 'COM Board', $1;
		}
	};
	$AutoHTML{'Sun Board'}		= sub {
		my $STR = shift;
		if ($STR =~ /<a href=\"?\.\/(sunbbs\.cgi)\?mode=/i) {
			$INCM->SetUpUrl($1);
		}
		if ($STR =~ /<!-- Sun Board v([\d\.]+) -->/s) {
			return 'Sun Board', $1;
		}
	};
	$AutoHTML{'YYBBS'}			= sub {
		my $STR = shift;
		if ($STR =~ /<!-- YYBBS v([\d\.]+) -->/s) {
			return 'YY-Board', $1;
		} elsif ($STR =~ /<!-- YY-BOARD v([\d\.]+) -->/s) {
			return 'YY-Board', $1;
		}
	};
	$AutoHTML{'PETIT BOARD'}	= sub {
		my $STR = shift;
		if ($STR =~ /<!-- PETIT BOARD v([\d\.]+) -->/s) {
			return 'PETIT BOARD', $1;
		} elsif ($STR =~ /<!-- PETIT v([\d\.]+) -->/s) {
			return 'PETIT BOARD', $1;
		}
	};
	$AutoHTML{'Honey'}			= sub {
		my $STR = shift;
		if ($STR =~ /<!-- Honey v([\d\.]+) -->/s) {
			return 'Honey Board', $1;
		}
	};
	$AutoHTML{'G-LIGHT'}		= sub {
		my $STR = shift;
		if ($STR =~ /<!-- G-LIGHT v([\d\.]+) -->/s) {
			return 'G-LIGHT', $1;
		}
	};
	$AutoHTML{'Fantasy'}		= sub {
		my $STR = shift;
		if ($STR =~ /<!-- Fantasy v([\d\.]+) -->/s) {
			return 'Fantasy Board', $1;
		} elsif ($STR =~ /<span style=[^>]+><b>Fantasy Board v([\d\.]+)<\/b>/s) {
			return 'Fantasy Board', $1;
		}
	};
	$AutoHTML{'Web Forum'}		= sub {
		my $STR = shift;
		if ($STR =~ m#No\.\d+</font> *</SMALL></TD></TR></TABLE>#s) {
			$Class->{BbsTemp} = 'Web Forum plus';
		} elsif ($STR =~ /<!-- Web Forum v([\d\.]+) -->/s) {
			if ($Class->{BbsTemp}) {
				return $Class->{BbsTemp}, $1;
			} else {
				return 'Web Forum', $1;
			}
		} elsif ($STR =~ /<!-- Web Forum v([\d\.]+) for Hi-HO -->/s) {
			return 'Web Forum', $1;
		}
	};
	$AutoHTML{'ClipBoard'}		= sub {
		my $STR = shift;
		if ($STR =~ /<!-- ClipBoard v([\d\.]+) -->/s) {
			return 'ClipBoard', $1;
		}
	};
	$AutoHTML{'Joyful Note'}		= sub {
		my $STR = shift;
		if ($STR =~ /<!-- Joyful Note v([\d\.]+) -->/s) {
			return 'Joyful Note', $1;
		}
	};
	$AutoHTML{'Cside BBS'}		= sub {
		my $STR = shift;
		if ($STR =~ /<!-- Cside BBS v([\d\.]+) .*?-->/s) {
			return 'Cside BBS', $1;
		}
	};
	$AutoHTML{'GateWay'}		= sub {
		my $STR = shift;
		if ($STR =~ /<!-- GW-BBS v([\d\.]+) .*?-->/s) {
			return 'GateWay', $1;
		} elsif ($STR =~ /<!-- [^\(]+\(GW-BBS v([\d\.]+)\) -->/s) {
			return 'GateWay', $1;
		} elsif ($STR =~ /<!-- [^\(]+\(GATEWAY BOARD v([\d\.]+)\) -->/s) {
			return 'GateWay', $1;
		} elsif ($STR =~ /<!-- GATEWAY BOARD v([\d\.]+) .*?-->/s) {
			return 'GateWay', $1;
		}
	};
	$AutoHTML{'Web Patio'}		= sub {
		my $STR = shift;
		if ($STR =~ /<!-- .*? \(Web Patio v([\d\.]+)\) -->/s) {
			return 'Web Patio', $1;
		}
	};
	# URLから判断するための定義
	$AutoURL{'AZAQ-NET'}		= sub {
		my $STR = shift;
		if ($STR =~ m#^http://www\d*\.(azaq-net\.com|azaq\.net)/bbs/#is) {
			my $Ver;
			if ($1 eq 'azaq-net.com') { $Ver = '9.22'; }
			else { $Ver = '3.1'; }
			return 'AZAQ-NET', $Ver;
		}
	};
	# HOSTから判断するための定義
	$AutoURL{'BBS PARK'}		= sub {
		my $STR = shift;
		if ($STR =~ m#/bbs1.parks.jp#) {
			return 'BBS PARK', 3;
		}
	};

	# 自動判別定義を返す
	return ( HTML => \%AutoHTML, URL => \%AutoURL, HOST => \%AutoHOST );
}

#####  掲示板毎の設定  #####################################################
sub SetBBSdef {
	my ($BBS_Name, $BBS_Ver) = @_;
	my (%Basic, %CMT, %Reg, %Prm);
	$CMT{Files}{'001'}{Title}{Mode} = 'AUTO';
	$CMT{Head}{Parent}{Method} = 'POST';
	$CMT{Head}{Parent}{URL} = 'Read';
	$CMT{Head}{Mode} = 'ALL';
	($CMT{Head}{Child}{Method}, $CMT{Head}{Child}{URL}) = ('POST', 'Read');
	@{$Prm{Type}} = ('Date');
	$Prm{Main}{Found} = 'Date';
	%{$Reg{Main}{Date}} = (Value => 'AUTO', No => 4);
	$Prm{Pages}{Main}{Method} = 'GET';

# スクリプト種別ごとの解析用定義
	# Light Board
	if ($BBS_Name eq 'Light Board') {
		$CMT{Head}{Parent}{Type} = 'Fix';
		$CMT{Head}{Child}{Type}  = 'Fix';

		%{$Prm{Pages}{Main}{NextPage}} = (Found => '<input type=submit value="次の\d+件">', Type => 'Form', Step => '</form>');

		%{$Reg{Main}{Name}} = (Value => '<b>(<a [^>]+>)?(.*?)(<\/a>)?<\/b>', Match => 2, No => 4);
		%{$Reg{Main}{Mail}} = (Value => 'AUTO', No => 3);
		%{$Reg{Main}{Url}} = (Value => 'AUTO', No => 4);
		if ($BBS_Ver >= 5.8) {
			$CMT{Head}{Parent}{Fix} = $CMT{Head}{Child}{Fix} = 'mode=regist';
			$CMT{Head}{Parent}{FixCMT} = $CMT{Head}{Child}{FixCMT} = 'Name => name, Mail => email, Sub => sub, '
					 .'Mes => comment, HP => url, Key => pwd';
			%{$Reg{Main}{Num}} = (Value => '<td valign=top>\[<b>(\d+)<\/b>\]', Match => 1, No => 1);
			%{$Reg{Main}{ResNum}} = (Value => '<b style=[^>]+>Re:\[(\d+)\].*?<\/b>', Match => 1, No => 2, Opt => 'm');
			%{$Reg{Main}{Title}} = (Value => '<b style=[^>]+>(.*?)<\/b>', Match => 1, No => 3);
			%{$Reg{Main}{Comment}} = (Value => '<DD>(.*?<P>|.*?<DT>)', Match => 1, No => 5);
		} else { # v5.2 v5.3 v5.4 v5.42 v5.51 v5.52 v5.7改
			$CMT{Head}{Parent}{Fix} = $CMT{Head}{Child}{Fix} = 'mode=msg';
			$CMT{Head}{Parent}{FixCMT} = $CMT{Head}{Child}{FixCMT} = 'Name => name, Mail => email, Sub => subj, '
					 .'Mes => comment, HP => url, Key => pwd';
			$CMT{Head}{Parent}{FixCMT} = $CMT{Head}{Child}{FixCMT} = 'Name => name, Mail => email, Sub => sub, '
					 .'Mes => comment, HP => url, Key => pwd' if ($BBS_Ver >= 5.7);
			%{$Reg{Main}{Num}} = (Value => '<td valign=top>\[(\d+)\]', Match => 1, No => 1);
			%{$Reg{Main}{ResNum}} = (Value => '<b>Re:\[(\d+)\].*?<\/b>', Match => 1, No => 2, Opt => 'm');
			%{$Reg{Main}{ResNum}} = (Value => '<b>Re\[(\d+)\](\[\d+\])*:.*?<\/b>', Match => 1, No => 2, Opt => 'm') if ($BBS_Ver <= 5.52);
			%{$Reg{Main}{Title}} = (Value => '<b>(.*?)<\/b>', Match => 1, No => 3);
			%{$Reg{Main}{Comment}} = (Value => '<blockquote>(.*?)<P>', Match => 1, No => 5);
		}

		$Prm{Main}{Step} = '<hr>';

	# Aska BBS
	} elsif ($BBS_Name eq 'Aska BBS') {
		$CMT{Head}{Parent}{Type} = 'Fix';
		$CMT{Head}{Child}{Type}  = 'Fix';

		%{$Prm{Pages}{Main}{NextPage}} = (Found => '<input type=submit value="次の\d+件">', Type => 'Form', Step => '</form>');

		%{$Reg{Main}{ResNum}}  = (Value => '<b>Re:\[(\d+)\].*?<\/b>', Match => 1, No => 2, Opt => 'm');
		%{$Reg{Main}{Title}}   = (Value => '<b>(.*?)<\/b>', Match => 1, No => 3);
		%{$Reg{Main}{Mail}}     = (Value => 'AUTO', No => 3);
		%{$Reg{Main}{Name}}    = (Value => '<b>(<a [^>]+>)?(.*?)(<\/a>)?<\/b>', Match => 2, No => 4);
		%{$Reg{Main}{Url}}     = (Value => 'AUTO', No => 4);

		if ($BBS_Ver >= 2.4) { # v2.4 v2.5
			$CMT{Head}{Parent}{Fix} = $CMT{Head}{Child}{Fix} = 'mode=regist';
			$CMT{Head}{Parent}{FixCMT} = $CMT{Head}{Child}{FixCMT} = 'Name => name, Mail => email, Sub => sub, '
					 .'Mes => comment, HP => url, Key => pwd, Opt3 => cook';
			%{$Reg{Main}{Num}}     = (Value => '^\[<b>(\d+)<\/b>\]', Match => 1, No => 1);
			%{$Reg{Main}{Comment}} = (Value => '<DD>(.*?<P>|.*?<DT>)', Match => 1, No => 5, Opt => 's');
		} else { # v0.5 v1.61
			$CMT{Head}{Parent}{Fix} = $CMT{Head}{Child}{Fix} = 'mode=regist';
			$CMT{Head}{Parent}{FixCMT} = $CMT{Head}{Child}{FixCMT} = 'Name => name, Mail => email, Sub => sub, '
					 .'Mes => com, HP => url, Key => pwd';
			%{$Reg{Main}{Num}}     = (Value => '\n\[<b>(\d+)<\/b>\]', Match => 1, No => 1);
			%{$Reg{Main}{Comment}} = (Value => '<blockquote>(.*?)<P>', Match => 1, No => 5);
		}

		$Prm{Main}{Step} = '<hr>';

	# COM Board
	} elsif ($BBS_Name eq 'COM Board') {
		my $Sub;
		$CMT{Head}{Parent}{Type} = 'Fix';
		$CMT{Head}{Child}{Type}  = 'Fix';

		%{$Prm{Pages}{Main}{NextPage}} = (Found => '<input type=submit value="次の\d+件">', Type => 'Form', Step => '</form>');

		%{$Reg{Main}{ResNum}}  = (Value => '<b>Re:\[(\d+)\].*?<\/b>', Match => 1, No => 2, Opt => 'm');
		%{$Reg{Main}{Title}}   = (Value => '<b>(.*?)<\/b>', Match => 1, No => 3);
		%{$Reg{Main}{Name}}    = (Value => '<b>(<a [^>]+>)?(.*?)(<\/a>)?<\/b>', Match => 2, No => 4);
		%{$Reg{Main}{Mail}}     = (Value => 'AUTO', No => 3);
		%{$Reg{Main}{Url}}     = (Value => 'AUTO', No => 4);

		if ($BBS_Ver >= 4.4) {
			$CMT{Head}{Parent}{Fix} = $CMT{Head}{Child}{Fix} = 'mode=regist';
			$CMT{Head}{Parent}{FixCMT} = $CMT{Head}{Child}{FixCMT} = 'Name => name, Mail => email, '
					 .'HP => url, Key => pwd';
			%{$Reg{Main}{Num}}     = (Value => '^\[<b>(\d+)<\/b>\]', Match => 1, No => 1);
			%{$Reg{Main}{Comment}} = (Value => '<DD>(.*?<P>|.*?<DT>)', Match => 1, No => 5);
			$Sub = 'sub';
		} else { # v4.0
			$CMT{Head}{Parent}{Fix} = $CMT{Head}{Child}{Fix} = 'mode=msg';
			$CMT{Head}{Parent}{FixCMT} = $CMT{Head}{Child}{FixCMT} = 'Name => name, Mail => email, Sub => subj, '
					 .'Mes => comment, HP => url, Key => dkey';
			%{$Reg{Main}{Num}}     = (Value => '\n\[(\d+)\]', Match => 1, No => 1);
			%{$Reg{Main}{Comment}} = (Value => '<blockquote>(.*?)<\/blockquote>', Match => 1, No => 5);
			$Sub = 'subj';
		}
		if ($INCM->GetParam('TITLE', 'L')) {
			$CMT{Head}{Parent}{FixCMT} .= ', Mes => comment, Sub => '.$Sub;
			%{$Reg{Main}{Title}}   = (Value => '<b>(.*?)<\/b>', Match => 1, No => 3);
		} else {
			$CMT{Head}{Parent}{FixCMT} .= ', Mes2 => comment';
			%{$Reg{Main}{Title}}   = (Value => 'Pass');
		}
		$CMT{Head}{Child}{FixCMT} = $CMT{Head}{Parent}{FixCMT};

		$Prm{Main}{Step} = '<hr>';
		$Prm{Pages}{Main}{Frame} = 'mode=log';

	# Sun Board
	} elsif ($BBS_Name eq 'Sun Board') {
		$CMT{Head}{Parent}{URL} = 'Write';
		$Basic{UpUrl}{Cgi} = 'sunbbs.cgi';
		$CMT{Head}{Parent}{Type} = 'Fix';
		$CMT{Head}{Child}{Type}  = 'Fix';
		$CMT{Head}{Parent}{Fix} = $CMT{Head}{Child}{Fix} = 'mode=regist';
		$CMT{Head}{Parent}{FixCMT} = $CMT{Head}{Child}{FixCMT} = 'Name => name, Mail => email, Sub => sub, '
				 .'Mes => comment, HP => url, Key => pwd';

		%{$Prm{Pages}{Main}{NextPage}} = (Found => '<input type=submit value="次ペ\x81\x5bジ">', Type => 'Form', Step => '</form>');
		$Prm{Pages}{Main}{NextPage}{Url}{Cgi} = ('index2.html');

		%{$Reg{Main}{Num}}     = (Value => 'No\.<\/td><td>：<B>(\d+)<\/B>', Match => 1, No => 1);
		%{$Reg{Main}{ResNum}}  = (Value => '<b>Re\[(\d+)\]:.*?<\/b>', Match => 1, No => 2, Opt => 'm');
		%{$Reg{Main}{Title}}   = (Value => '<b>(.*?)<\/b>', Match => 1, No => 3);
		%{$Reg{Main}{Name}}    = (Value => 'Name<\/td><td>：<b>(.*?)<\/b>', Match => 1, No => 4);
		if ($BBS_Ver >= 2 && $BBS_Ver < 3.3) { # v2.2
			%{$Reg{Main}{Comment}} = (Value => '<blockquote>(.*?)<\/blockquote>', Match => 1, No => 5);
		} elsif ($BBS_Ver >= 3.3) { # v3.4
			%{$Reg{Main}{Num}}     = (Value => 'No\.<td>： <B>(\d+)<\/B>', Match => 1, No => 1);
			%{$Reg{Main}{Name}}    = (Value => 'Name<td>： <b>(.*?)<\/b>', Match => 1, No => 4);
			%{$Reg{Main}{Comment}} = (Value => '<blockquote>(.*?)<\/blockquote>', Match => 1, No => 5);
		} else { # v1.2
			%{$Reg{Main}{Comment}} = (Value => '</td><td[^>]+>(.*?)<\/td>', Match => 1, No => 5);
		}

		$Prm{Main}{Step} = '<hr>';

	# YY-Board
	} elsif ($BBS_Name eq 'YY-Board') {
		$CMT{Head}{Parent}{Type} = 'Fix';
		$CMT{Head}{Child}{Type} = 'Dynamic';
		$CMT{Head}{Child}{Dynamic} = 'RootNo:reno';
		$CMT{Head}{Parent}{Fix} = $CMT{Head}{Child}{Fix} = 'mode=msg';
		$CMT{Head}{Parent}{FixCMT} = $CMT{Head}{Child}{FixCMT} = 'Name => name, Mail => email, Sub => sub, '
				 .'Mes => comment, HP => url, Key => pwd, Icon => icon, Color => color';

		%{$Prm{Pages}{Main}{NextPage}} = (Found => '<input [^>]*type=submit value="次の\d+件">', Type => 'Form', Step => '</form>');

		@{$Prm{Type}} = ('Thread');
		%{$Reg{Main}{Title}}   = (Value => '<b>(.*?)<\/b>', Match => 1, No => 2);
		%{$Reg{Main}{Name}}    = (Value => '<b>(<a [^>]+>)?(.*?)(<\/a>)?<\/b>', Match => 2, No => 3);
		%{$Reg{Main}{Mail}}     = (Value => 'AUTO', No => 3);
		%{$Reg{Main}{Url}}     = (Value => 'AUTO', No => 4);

		if ($BBS_Ver >= 5.0) { # v5.0 v5.12
			%{$Prm{Pages}{Main}{NextPage}} = (Found => '<input [^>]*type=submit value=\'Next\'[^>]*>', Type => 'Form', Step => '</form>');
			$CMT{Head}{Parent}{Fix} = $CMT{Head}{Child}{Fix}  = 'mode=regist';
			$Prm{Main}{HeadBody} = '<td valign=top>';
			$Prm{Main}{Root}    = '<input type=hidden name=mode value=res>';
			%{$Reg{Main}{Num}}     = (Value => '<font [^>]+>\[?No\.(\d+)\]?<\/font><\/td>', Match => 1, No => 1);
			%{$Reg{Main}{Comment}} = (Value => '<\/tr><\/table>(.*?)<\/table>', Match => 1, No => 4);
			$Prm{Main}{Step} = '<td valign=top nowrap><font';
			$Prm{Main}{StepTop} = '<td valign=top nowrap><font';
			$Prm{Main}{StepBottom} = '</TD></TR></TABLE></center>';
		} elsif ($BBS_Ver >= 3.0 && $BBS_Ver < 5.0) { # v3.4 v3.51 v3.52 v4.04 v4.32 v4.41 v4.51 v4.52 v4.53 v4.54 v4.6
			$CMT{Head}{Parent}{Fix} = $CMT{Head}{Child}{Fix}  = 'mode=regist';
			$Prm{Main}{HeadBody} = '<td valign=top>';
			$Prm{Main}{Root}    = '<input type=hidden name=mode value=res>';
			%{$Reg{Main}{Num}}     = (Value => '<small>\[?No\.(\d+)\]?<\/small>', Match => 1, No => 1);
			%{$Reg{Main}{Comment}} = (Value => '<\/tr><\/table>(.*?)<\/table>', Match => 1, No => 4);
			$Prm{Main}{Step} = '<td valign=top nowrap><font';
			$Prm{Main}{StepTop} = '<td valign=top nowrap><font';
			$Prm{Main}{StepBottom} = '</TD></TR></TABLE></center>';
		} else { # v2.74 v2.81
			$CMT{Head}{Child}{Dynamic} = 'RootNo:resno';
			$Prm{Main}{Root}    = '<input type=hidden name=mode value=\"?res_msg\"?>';
			%{$Reg{Main}{Num}}     = (Value => '\[<b>(\d+)<\/b>\]', Match => 1, No => 1);
			%{$Reg{Main}{Comment}} = (Value => '<td><font color=[^>]+>(.*?)<\/font><\/td>', Match => 1, No => 4);
			%{$Reg{Main}{CommentC}}= (Value => '<br><font color=[^>]+>(.*?)<\/font><\/td>', Match => 1, No => 4);
			$Prm{Main}{Step} = '</td></tr></table>';
			$Prm{Main}{StepTop} = '<center><TABLE';
		}

	# PETIT BOARD
	} elsif ($BBS_Name eq 'PETIT BOARD') {
		$CMT{Head}{Parent}{Type}   = 'Fix';
		$CMT{Head}{Child}{Type}    = 'Dynamic';
		$CMT{Head}{Child}{Dynamic} = 'RootNo:reno';
		$CMT{Head}{Parent}{Fix} = $CMT{Head}{Child}{Fix} = 'mode=regist';
		$CMT{Head}{Parent}{Fix}   = 'Name => name, Mail => email, Sub => sub, Mes => comment, '
				 .'HP => url, Key => pwd, Color => color';
		$CMT{Head}{Child}{FixCMT}  = 'Name => name, Mail => email, '
				 .'HP => url, Key => pwd, Color => color';
		if ($INCM->GetParam('PETIT', 'L')) {
			$CMT{Head}{Child}{FixCMT} .= ', Mes2 => comment, Sub => sub';
		} else {
			$CMT{Head}{Child}{FixCMT} .= ', Sub => comment';
		}

		$Prm{Main}{Step} = '<TABLE';
		$Prm{Main}{StepTop} = '<center><br>';

		%{$Prm{Pages}{Main}{NextPage}} = (Found => '<input type=submit value="次の\d+件">', Type => 'Form', Step => '</form>');

		@{$Prm{Type}} = ('Thread');
		%{$Prm{Main}{Split}}   = (Parent => '<hr', Child => '\n');
		$Prm{Main}{Root}       = '<small>No\.\d+<\/small>';
		%{$Reg{Main}{Num}}     = (Value => '<small>No\.(\d+)<\/small>', Match => 1, No => 1);
		%{$Reg{Main}{Title}}   = (Value => '<b>(.*?)<\/b>', Match => 1, No => 2);
		%{$Reg{Main}{TitleC}}  = (Value => 'Pass', No => 1);
		%{$Reg{Main}{Name}}    = (Value => '<b>(<a [^>]+>)?(.*?)(<\/a>)?<\/b>', Match => 2, No => 3);
		%{$Reg{Main}{Mail}}    = (Value => 'AUTO', No => 3);
		%{$Reg{Main}{Url}}     = (Value => '<a href=\"([^"]+)\" target=\'_blank\'>', Match => 1,  No => 4);
		%{$Reg{Main}{Comment}} = (Value => '<blockquote>(.*?)<\/blockquote>', Match => 1, No => 4);
		if ($BBS_Ver < 5.0) { # v4.3 v4.5
			$Prm{Main}{StepTop} = '</blockquote><hr>';
			$Prm{Main}{Step} = '<hr>';
			$Prm{Main}{Root}    = '<td>\[<b>(\d+)<\/b>\]';
			%{$Prm{Main}{Split}}   = (Parent => '<hr ', Child => '</table>');
			%{$Reg{Main}{Num}}     = (Value => '<td>\[<b>(\d+)<\/b>\]', Match => 1, No => 1);
			%{$Reg{Main}{Comment}} = (Value => '<table border=0 cellspacing=10>(.*?)<\/table>', Match => 1, No => 4) if ($BBS_Ver == 4.3);
			%{$Reg{Main}{CommentC}} = (Value => '＞ (.*?)<small>', Match => 1, No => 4);
		} elsif ($BBS_Ver >= 5.0 && $BBS_Ver < 5.3) { # v5.0 v5.1 v5.22 v5.25 v5.26
			%{$Reg{Main}{CommentC}} = (Value => '＞ (.*?)<small>', Match => 1, No => 4);
		} elsif ($BBS_Ver >= 5.3) { #v5.3 v5.31 v5.4 v5.25
			$Prm{Main}{Root}    = '<font color[^>]+>No\.\d+<\/font>&nbsp;';
			%{$Reg{Main}{Num}}     = (Value => '<font color[^>]+>No\.(\d+)<\/font>', Match => 1, No => 1);
			%{$Reg{Main}{CommentC}} = (Value => ' ＞ (.*?) \(', Match => 1, No => 4);
		}

	# Honey Board
	} elsif ($BBS_Name eq 'Honey Board') {
		$CMT{Head}{Parent}{Type}   = 'Fix';
		$CMT{Head}{Child}{Type}    = 'Dynamic';
		$CMT{Head}{Child}{Dynamic} = 'RootNo:reno';
		$CMT{Head}{Parent}{Fix} = $CMT{Head}{Child}{Fix} = 'mode=regist';
		$CMT{Head}{Parent}{FixCMT} = $CMT{Head}{Child}{FixCMT} = 'Name => name, Mail => email, Sub => sub, Mes => comment, '
				 .'HP => url, Key => pwd, Icon => icon, Color => color, Opt3 => cook';

		%{$Prm{Pages}{Main}{NextPage}} = (Found => '<input type=submit value="次の\d+件">', Type => 'Form', Step => '</form>');

		@{$Prm{Type}} = ('Thread');
		$Prm{Main}{Root}    = '<a href=\"?[^\?]+\?mode=res&no=\d+';
		%{$Reg{Main}{Num}}     = (Value => '<small>No\.(\d+)<\/small>', Match => 1, No => 1);
		%{$Reg{Main}{Title}}   = (Value => '<b>(.*?)<\/b>', Match => 1, No => 2);
		%{$Reg{Main}{Name}}    = (Value => '<b>(<a [^>]+>)?(.*?)(<\/a>)?<\/b>', Match => 2, No => 3);
		%{$Reg{Main}{Comment}} = (Value => '<blockquote>(.*?)<\/blockquote>', Match => 1, No => 4);
		%{$Reg{Main}{Mail}}    = (Value => 'AUTO', No => 3);
		%{$Reg{Main}{Url}}     = (Value => '<a href=\"([^"]+)\" target=[^>]+>', Match => 1,  No => 4);
		if ($BBS_Ver <= 1.7) { # v1.02
			$CMT{Head}{Parent}{FixCMT} = $CMT{Head}{Child}{FixCMT} = 'Name => name, Mail => email, Sub => sub, Mes => com, '
					 .'HP => url, Key => pwd, Icon => icon, Color => color, Opt3 => cook';
		} elsif ($BBS_Ver >= 1.8) {
			%{$Reg{Main}{Num}}     = (Value => '<font color[^>]+>No\.(\d+)<\/font>', Match => 1, No => 1);
		}

		$Prm{Main}{Step} = '</table>';
		$Prm{Main}{StepTop} = '</td></tr></table>';

	# G-LIGHT
	} elsif ($BBS_Name eq 'G-LIGHT') {
		$Prm{Main}{Step} = '<hr';
		$CMT{Head}{Parent}{Type} = 'Fix';
		$CMT{Head}{Child}{Type}  = 'Fix';
		$CMT{Head}{Parent}{Fix} = $CMT{Head}{Child}{Fix} = 'mode=regist';
		$CMT{Head}{Parent}{FixCMT} = 'Name => name, Mail => email, '
				 .'HP => url, Icon => icon';
		if ($INCM->GetParam('TITLE', 'L')) {
			$CMT{Head}{Parent}{FixCMT} .= ', Mes => comment, Sub => subj';
			%{$Reg{Main}{Title}}   = (Value => '<b>(.*?)<\/b>', Match => 1, No => 2);
		} else {
			$CMT{Head}{Parent}{FixCMT} .= ', Mes2 => comment';
			%{$Reg{Main}{Title}}   = (Value => 'Pass');
		}

		%{$Prm{Pages}{Main}{NextPage}} = (Found => '<input type=submit value="次の\d+件">', Type => 'Form', Step => '</form>');

		@{$Prm{Type}}        = ('Thread');
		$Prm{Main}{Root}     = 'nowrap>\[<b>(\d+)<\/b>\]';
		$Prm{Main}{PassFound} = '\[From .+?\]';
		%{$Reg{Main}{Num}}      = (Value => 'nowrap>\[<b>(\d+)<\/b>\]', Match => 1, No => 1);
		%{$Reg{Main}{Name}}     = (Value => '<b>(<a [^>]+>)?(.*?)(<\/a>)?<\/b>', Match => 2, No => 3);
		%{$Reg{Main}{NameC}}    = (Value => '\[From (.*?)\]', Match => 1, No => 2);
		%{$Reg{Main}{DateC}}    = (Value => 'Set', No => 3, Set => 'Date', Opt => 'Easy');
		%{$Reg{Main}{Mail}}     = (Value => 'AUTO', No => 3);
		%{$Reg{Main}{Url}}      = (Value => 'AUTO', No => 4);
		%{$Reg{Main}{OptionName1}}   = (Value => '<font[^>]+>[^\[]*\[(.*?)\] *', Match => 1, No => 4);
		%{$Reg{Main}{OptionName1C}}  = (Value => 'Pass');
		%{$Reg{Main}{Comment}}  = (Value => '<td width=3></td><td>(.*?)</td></tr></table>', Match => 1, No => 5);
		%{$Reg{Main}{CommentC}} = (Value => '<td><font[^>]+>(.*?)<font', Match => 1, No => 5);
		if ($BBS_Ver <= 4.7) { # v4.4
			$CMT{Head}{Parent}{Fix} = $CMT{Head}{Child}{Fix} = 'mode=msg';
			$CMT{Head}{Parent}{FixCMT} .= ', Area => local, Key => usr_pwd';
			$Prm{Main}{Step} = '<table><td';
			$Prm{Main}{Root}     = 'nowrap>\[(\d+)\]';
			%{$Reg{Main}{Num}}      = (Value => 'nowrap>\[(\d+)\]', Match => 1, No => 1);
			%{$Reg{Main}{Comment}}  = (Value => '<td colspan=\d+>(.*?)<\/?table>', Match => 1, No => 5);
			%{$Reg{Main}{OptionName1}} = (Value => '<td nowrap><font[^>]+>[^\[]*\[(.*?)\] *<\/font>', Match => 1, No => 4);
		} elsif ($BBS_Ver >= 4.8) { # v4.8
			$CMT{Head}{Parent}{FixCMT} .= ', Area => area, Key => pwd';
			%{$Prm{Main}{Split}}   = (Parent => '<table border=0><tr><td width=32></td>', Child => '</td></tr></table>');
		}

		if ($INCM->GetParam('Opt1', 'L')) {
			$CMT{Head}{Child}{Method} = 'LIB';
			$CMT{Head}{Child}{Fix} = 'mode=edit_msg';
			$CMT{Head}{Child}{FixCMT} = 'NameO => name, MailO => email, SubO => sub, HPO => url, '
					 .'Icon2 => ad_icon, MesO => com, Mes2 => res, Opt1 => pass, Res => no';
		} else {
			$CMT{Head}{Child}{FixCMT} = $CMT{Head}{Parent}{FixCMT};
		}

		$Prm{Main}{StepTop} = '</table>';
		$Prm{Main}{StepBottom} = '<td align=right>';

	# Fantasy Board
	} elsif ($BBS_Name eq 'Fantasy Board') {
		$CMT{Head}{Parent}{Type} = 'Fix';
		$CMT{Head}{Child}{Type}  = 'Fix';
		$CMT{Head}{Parent}{Fix} = $CMT{Head}{Child}{Fix} = 'mode=regist';
		$CMT{Head}{Parent}{FixCMT} = $CMT{Head}{Child}{FixCMT} = 'Name => name, Mail => email, Mes2 => com, '
				 .'Area => area, Icon => icon, HP => url, Key => pwd, Opt3 => cook';

		if ($INCM->GetParam('Opt1', 'L')) {
			$CMT{Head}{Child}{Fix} = 'mode=res&action=res';
			$CMT{Head}{Child}{FixCMT} = 'Res => no, Opt1 => pass, Mes2 => com, Opt2 => tag';
		}

		%{$Prm{Pages}{Main}{NextPage}} = (Found => '<input type=submit value="次の\d+件">', Type => 'Form', Step => '</form>');

		@{$Prm{Type}}     = ('Thread');
		$Prm{Main}{Root}     = '\n\[<b>(\d+)<\/b>\]';
		$Prm{Main}{PassFound} = '\[ *From .+?\]';
		%{$Reg{Main}{Num}}      = (Value => '\n\[<b>(\d+)<\/b>\]', Match => 1, No => 1);
		%{$Reg{Main}{Name}}     = (Value => '<b>(<a [^>]+>)?(.*?)(<\/a>)?<\/b>', Match => 2, No => 2);
		%{$Reg{Main}{NameC}}    = (Value => '\[ *From (.*?) *\]', Match => 1, No => 2);
		%{$Reg{Main}{DateC}}    = (Value => 'Set', No => 3, Set => 'Date', Opt => 'Easy');
		%{$Reg{Main}{Mail}}     = (Value => 'AUTO', No => 3);
		%{$Reg{Main}{Url}}      = (Value => 'AUTO', No => 4);
		%{$Reg{Main}{OptionName1}}   = (Value => ' <font[^>]+>[^\[]*\[(.*?)\] *\d+\/\d+\/\d+', Match => 1, No => 3);
		%{$Reg{Main}{OptionName1C}}  = (Value => 'Pass');
		if ($BBS_Ver >= 0) { # v1.8
			%{$Reg{Main}{Comment}}  = (Value => '<blockquote>(.*?)<\/blockquote>', Match => 1, No => 4);
			%{$Reg{Main}{CommentC}} = (Value => '<td><font[^>]+>(.*?)<font', Match => 1, No => 4);
		} else {
			%{$Reg{Main}{Comment}}  = (Value => '</td><td[^>]+>(.*?)<\/td>', Match => 1, No => 4);
		}

		$Prm{Main}{Step} = '<table';
		$Prm{Main}{StepTop} = '</table>';
		$Prm{Main}{StepBottom} = '<td align=right>';

	# Web Forum
	} elsif ($BBS_Name eq 'Web Forum' || $BBS_Name eq 'Web Forum plus') {
		$CMT{Head}{Mode} = 'Head&Parent';
		$CMT{Head}{Parent}{Type}   = 'Fix';
		$CMT{Head}{Child}{Type}    = 'Dynamic';
		$CMT{Head}{Child}{Dynamic} = 'Num:no, TreeNo:oya';
		$CMT{Head}{Child}{Fix} = 'mode=regist&pview=on&action=res_msg';
		$CMT{Head}{Parent}{Fix} = $CMT{Head}{Child}{Fix}.'&no=new';
		$CMT{Head}{Parent}{FixCMT} = $CMT{Head}{Child}{FixCMT} = 'Name => name, Mail => email, Sub => sub, Mes => message, '
				 .'HP => url, Key => pwd, Opt4 => wrap, Opt5 => smail';

		%{$Prm{Pages}{Topic1}{NextPage}} = (Found => '\[<b>\d+</b>\]\n\[<a href="[^\?]+\?(page=\d+&list=new)">\d+</a>\]', Type => 'Anchor', Match => 1);

		@{$Prm{Type}}    = ('Topic1','Date');
		$Prm{Topic1}{Found} = 'Num';
		$Prm{Topic1}{ReadPoint} = 'Num';
		$Prm{Topic1}{Step} = '</SMALL>';
		$Prm{Topic1}{StepTop} = '<UL>';
		$Prm{Topic1}{StepBottom} = '</blockquote>';
		$Prm{Pages}{Topic1}{Mode} = 'list=new';
		%{$Reg{Topic1}{Num}}    = (Value => '<font[^>]+>No\.(\d+)</font>', Match => 1, No => 1);
		%{$Reg{Topic1}{ResNum}} = (Value => '<a href="[^\?]+\?.*?no=\d+&reno=(\d+)[^>]+>', Match => 1, No => 2, Opt => 'm');
		%{$Reg{Topic1}{List}} = (Value => '<a href="[^\?]+\?([^"]+)"[ >]', Match => 1, No => 4);
		$Prm{Main}{Step} = '</form></blockquote>';
		$Prm{Main}{StepTop} = '</center>';
		$Prm{Main}{List} = 'Topic1';
		$Prm{Main}{PullList} = 'Shift';
		%{$Reg{Main}{Num}}     = (Value => '<input type=hidden name=no value=\"?(\d+)\"?>', Match => 1, No => 1);
		%{$Reg{Main}{ResNum}}  = (Value => 'Pass', SetParse => 1);
		%{$Reg{Main}{Name}}    = (Value => '<B>投稿者名：(.*?)</B><BR>', Match => 1, No => 2);
		%{$Reg{Main}{Title}}   = (Value => '<b>\x83\x5eイトル：<font [^>]+>(.*?)</font></b>', Match => 1, No => 3);
		%{$Reg{Main}{Mail}}    = (Value => '<B>Ｅメ\x81\x5bル：</B><a href="mailto:[^>]+>(.*?)</a><BR>', Match => 1, No => 4);
		%{$Reg{Main}{Url}}     = (Value => '<B>ＵＲＬ　：</B><a href=[^>]+>(.*?)</a><BR>', Match => 1, No => 4);
		%{$Reg{Main}{TreeNo}} = (Value => '<input type=hidden name=oya value=\"?(\d+)\"?>', Match => 1, No => 3, Opt => 'm');
		if ($BBS_Ver >= 4.4) { # v4.44 v4.45
			$CMT{Head}{Parent}{URL} = 'Write';
			%{$Basic{UpUrl}} = (Type => 'Main', Found => '<input type=hidden name=mode value="form">', HtmlType => 'Form', Step => '</form>', SetType => 'Cgi');
			%{$Prm{Pages}{Topic1}{NextPage}} = (Found => '<b>\[\d+\]</b>\n\[<a href="[^\?]+\?(page=\d+&list=new)">\d+</a>\]', Type => 'Anchor', Match => 1);
			$Prm{Topic1}{StepTop} = '<ul>';
			$Prm{Topic1}{Step} = '</font> ';
			$Prm{Main}{StepTop} = '<p><table cellspacing=0>';
			%{$Reg{Main}{Name}}    = (Value => '(投稿者|投稿者名|名前)(</b>)?</td><td>： <b>(.*?)</b>', Match => 3, No => 2);
			%{$Reg{Main}{Title}}   = (Value => '<td>\x83\x5eイトル</td>\n *<td>： <b><font [^>]+>(.*?)</font></b>', Match => 1, No => 3);
			%{$Reg{Main}{Mail}}    = (Value => '&lt;<a href="mailto:[^>]+>(.*?)</a>&gt;</td></tr>', Match => 1, No => 4);
			%{$Reg{Main}{Url}}     = (Value => '<td>参照先</td><td>： <a href=[^>]+>(.*?)</a>', Match => 1, No => 4);
			%{$Reg{Main}{Comment}} = (Value => '<blockquote>(.*?)<\/blockquote>', Match => 1, No => 4);
		} elsif ($BBS_Ver >= 4.0 && $BBS_Ver < 4.4) { # v4.06 v4.07 v4.1 v4.2 v4.31
			$CMT{Head}{Parent}{URL} = 'Write';
			%{$Basic{UpUrl}} = (Type => 'Main', Found => '<input type=hidden name=mode value="form">', HtmlType => 'Form', Step => '</form>', SetType => 'Cgi');
			%{$Prm{Pages}{Topic1}{NextPage}} = (Found => '<b>\[\d+\]</b>\n\[<a href="[^\?]+\?(page=\d+&list=new)">\d+</a>\]', Type => 'Anchor', Match => 1);
			$Prm{Topic1}{Step} = '</font> ';
			$Prm{Main}{StepTop} = '<P><table cellspacing=0>';
			%{$Reg{Main}{Name}}    = (Value => '(投稿者|投稿者名|名前)(</b>)?</td><td>： <b>(.*?)</b>', Match => 3, No => 2);
			%{$Reg{Main}{Title}}   = (Value => '<td>\x83\x5eイトル</td><td>： <b><font [^>]+>(.*?)</font></b>', Match => 1, No => 3);
			%{$Reg{Main}{Mail}}    = (Value => '&lt;<a href="mailto:[^>]+>(.*?)</a>&gt;</td></tr>', Match => 1, No => 4);
			%{$Reg{Main}{Url}}     = (Value => '<td>参照先</td><td>： <a href=[^>]+>(.*?)</a>', Match => 1, No => 4);
			%{$Reg{Main}{Comment}} = (Value => '<blockquote>(.*?)<\/blockquote>', Match => 1, No => 4);
		} elsif ($BBS_Ver >= 3.1 && $BBS_Ver < 4.0) { # v3.13 v3.23 v3.24 v3.3
			%{$Prm{Pages}{Topic1}{NextPage}} = (Found => '<b>\[\d+\]</b>\n\[<a href="[^\?]+\?(page=\d+&list=new)">\d+</a>\]', Type => 'Anchor', Match => 1);
			%{$Reg{Main}{Name}}    = (Value => '<b>投稿者</b></td><td>： <b>(.*?)</td></tr>', Match => 1, No => 2);
			%{$Reg{Main}{Title}}   = (Value => '<b>\x83\x5eイトル</b></td><td>： <b><font [^>]+>(.*?)</font></b>', Match => 1, No => 3);
			%{$Reg{Main}{Mail}}    = (Value => '<b>Ｅメ\x81\x5bル</b></td><td>： <a href="mailto:[^>]+>(.*?)</a>', Match => 1, No => 4);
			%{$Reg{Main}{Url}}     = (Value => '<b>ＵＲＬ</b></td><td>： <a href=[^>]+>(.*?)</a>', Match => 1, No => 4);
			%{$Reg{Main}{Comment}} = (Value => '<blockquote>(.*?)<\/blockquote>', Match => 1, No => 4);
		} elsif ($BBS_Ver >= 2.6 && $BBS_Ver < 3.0) { # v2.84 v2.83 v2.82 v2.71 v2.72 v2.64改 v2.64
			%{$Reg{Main}{Comment}} = (Value => '<blockquote>(.*?)<\/blockquote>', Match => 1, No => 4);
#		} elsif ($BBS_Ver >= 3.2 && $BBS_Ver < 4.0) { # 
		} else { # v1.65 v2.01 v2.41 v2.5 v2.2
			%{$Prm{Pages}{Topic1}{NextPage}} = (Found => '\[<b>\d+</b>\]\n\[<a href="[^\?]+\?(page=\d+)">\d+</a>\]', Type => 'Anchor', Match => 1);
			%{$Prm{Pages}{Topic1}{NextPage}} = (Found => '<input type=submit value="次の\d+組">', Type => 'Form', Step => '</form>') if ($BBS_Ver <= 2.2);
			@{$Prm{Type}}    = ('Topic1','Date');
			$Prm{Topic1}{ReadPoint} = 'None';
			$Prm{Main}{ReadPoint} = 'None';
			$Prm{Pages}{Topic1}{Mode} = undef;
			$Prm{Topic1}{Step} = '<DT>';
			$Prm{Topic1}{StepTop} = '<blockquote>';
			%{$Reg{Topic1}{List}} = (Value => '<a href="[^\?]+\?(mode=all_read[^"]+)">', Match => 1, No => 4);
			$Prm{Main}{Root}     = '<input type=hidden name=reno value=no>';
			$Prm{Main}{Step} = '<table ';
			$Prm{Main}{StepTop} = '<center>';
			%{$Reg{Main}{ResNum}}  = (Value => '<input type=hidden name=reno value=(\d+)>', Match => 1, No => 1, SetParse => '');
			%{$Reg{Main}{Name}}    = (Value => '<br>投稿者名：<b>(.*?)</b><br>', Match => 1, No => 2);
			%{$Reg{Main}{Title}}   = (Value => '\x83\x5eイトル：<font [^>]+><b>(.*?)</b>', Match => 1, No => 3);
			%{$Reg{Main}{Mail}}    = (Value => 'Ｅメ\x81\x5bル：<a href="mailto:[^>]+>(.*?)</a>', Match => 1, No => 4);
			%{$Reg{Main}{Url}}     = (Value => 'ＵＲＬ　：<a href=[^>]+>(.*?)</a>', Match => 1, No => 4);
			%{$Reg{Main}{Comment}} = (Value => '<blockquote>(.*?)<\/blockquote>', Match => 1, No => 4);
 		}
#		if ($BBS_Name eq 'Web Forum plus') {
#		}

	# ClipBoard
	} elsif ($BBS_Name eq 'ClipBoard') {
		$INCM->SetParam('FileUpload', 'L', 1);
		$CMT{Head}{Parent}{Method} = $CMT{Head}{Child}{Method} = 'LIB';
		$CMT{Head}{Parent}{Type} = 'Fix';
		$CMT{Head}{Child}{Type}  = 'Fix';
		$CMT{Head}{Parent}{Fix} = $CMT{Head}{Child}{Fix} = 'mode=regist';
		$CMT{Head}{Parent}{FixCMT} = $CMT{Head}{Child}{FixCMT} = 'Name => name, Mail => email, Sub => sub, Mes => comment, '
				 .'HP => url, Key => pwd, Opt3 => cook, File => upfile';

		%{$Prm{Pages}{Main}{NextPage}} = (Found => '<input type=submit value="次の\d+件">', Type => 'Form', Step => '</form>');

		%{$Reg{Main}{Num}}     = (Value => '\n\[<b>(\d+)<\/b>\]', Match => 1, No => 1);
		%{$Reg{Main}{ResNum}}  = (Value => '<b>Re:\[(\d+)\].*?<\/b>', Match => 1, No => 2, Opt => 'm');
		%{$Reg{Main}{Title}}   = (Value => '<b>(.*?)<\/b>', Match => 1, No => 3);
		%{$Reg{Main}{Name}}    = (Value => '<b>(<a [^>]+>)?(.*?)(<\/a>)?<\/b>', Match => 2, No => 4);
		%{$Reg{Main}{Comment}} = (Value => '<blockquote>(.*?)<\/blockquote>', Match => 1, No => 5);
		%{$Reg{Main}{Attachment}[0]} = (Value => '<a href=\"?([^\"> ]+)\"?[^>]*><img[^>]*>', Match => 1, Target => 'Comment', No => 5);
		%{$Reg{Main}{Url}}     = (Value => '; <a href=\"([^"]+)\" target=[^>]+>', Match => 1, No => 4);
		%{$Reg{Main}{Mail}}    = (Value => '<b><a href="mailto:([^"]+)">.*?</a></b>', Match => 1, No => 2, Opt => 'm');

		if ($BBS_Ver >= 1.6) { # v1.6
			$Prm{Main}{HeadBody} = '<DD>';
			%{$Reg{Main}{Num}}     = (Value => '^\[<b>(\d+)<\/b>\]', Match => 1, No => 1);
			%{$Reg{Main}{Comment}} = (Value => '^(.*?)<br clear=all>', Match => 1, No => 5);
			%{$Reg{Main}{Attachment}[0]} = (Value => '<P><a href *= *\"?([^\"> ]+)\"?[^>]*><img[^>]*></a>', Match => 1, Target => 'Comment', No => 5);
		} else { # v1.3
		}

		$Prm{Main}{Step} = '<hr>';
		$Prm{Main}{StepTop} = '<hr ';

	# Joyful Note
	} elsif ($BBS_Name eq 'Joyful Note') {
		$INCM->SetParam('FileUpload', 'L', 1);
		$CMT{Head}{Parent}{Method} = $CMT{Head}{Child}{Method} = 'LIB';
		$CMT{Head}{Parent}{Type} = 'Fix';
		$CMT{Head}{Child}{Type}  = 'Dynamic';
		$CMT{Head}{Child}{Dynamic} = 'RootNo:reno';
		$CMT{Head}{Parent}{Fix} = $CMT{Head}{Child}{Fix} = 'mode=regist';
		$CMT{Head}{Parent}{FixCMT} = $CMT{Head}{Child}{FixCMT} = 'Name => name, Mail => email, Sub => sub, '
				 .'Mes => comment, HP => url, Key => pwd, Color => color, File => upfile';

		%{$Prm{Pages}{Main}{NextPage}} = (Found => '<input type=submit value="次の\d+件">', Type => 'Form', Step => '</form>');

		@{$Prm{Type}} = ('Thread');
		$Prm{Main}{Root}    = '<input type=hidden name=mode value=res>';
		%{$Reg{Main}{Num}}     = (Value => '<small>No\.(\d+)<\/small>', Match => 1, No => 1);
		%{$Reg{Main}{Title}}   = (Value => '<b>(.*?)<\/b>', Match => 1, No => 2);
		%{$Reg{Main}{Name}}    = (Value => '<b>(<a [^>]+>)?(.*?)(<\/a>)?<\/b>', Match => 2, No => 3);
		%{$Reg{Main}{Comment}} = (Value => '<blockquote>(.*?)<\/blockquote>', Match => 1, No => 5);
		%{$Reg{Main}{Attachment}[0]} = (Value => '<a href=\"?\.\/([^\"> ]+)\"?[^>]*><img[^>]*>', Match => 1, Target => 'Comment', No => 5);
		%{$Reg{Main}{Url}}     = (Value => '; <a href=\"([^"]+)\" target=[^>]+>', Match => 1, No => 4);
		%{$Reg{Main}{Mail}}    = (Value => '<b><a href="mailto:([^"]+)">.*?</a></b>', Match => 1, No => 2, Opt => 'm');

		if ($BBS_Ver >= 1.4) { # v1.41
			$Prm{Main}{HeadBody} = '<td valign=top>';
			%{$Reg{Main}{Num}}     = (Value => '<font color=[^>]+>No\.(\d+)</font></td>', Match => 1, No => 1);
			%{$Reg{Main}{Comment}} = (Value => '^(.*?)<br clear=all>', Match => 1, No => 5);
			%{$Reg{Main}{Attachment}[0]} = (Value => '<a href *= *\"?\.?\/?([^\"> ]+)\"?[^>]*><img[^>]*></a>', Match => 1, Target => 'Comment', No => 5);
		} else { # v0.4
		}

		$Prm{Main}{Step} = '<td valign=top nowrap><font';
		$Prm{Main}{StepTop} = '<center><br>';

	# Cside BBS
	} elsif ($BBS_Name eq 'Cside BBS') {
		$CMT{Head}{Parent}{Type} = 'Fix';
		$CMT{Head}{Child}{Type}  = 'Dynamic';
		$CMT{Head}{Child}{Dynamic} = 'RootNo:reno';
		$CMT{Head}{Parent}{Fix} = $CMT{Head}{Child}{Fix} = 'mode=regist';
		$CMT{Head}{Parent}{FixCMT} = $CMT{Head}{Child}{FixCMT} = 'Name => name, Mail => email, Sub => sub, '
				 .'Mes => comment, HP => url, Key => pwd, Icon => icon, Opt3 => cook';

		%{$Prm{Pages}{Main}{NextPage}} = (Found => '<input type=submit value="次ペ\x81\x5bジ">', Type => 'Form', Step => '</form>');

		@{$Prm{Type}} = ('Thread');
		$Prm{Main}{Root} = '\[<a href=\"\.\/bbs\.cgi\?[^>]+><font[^>]+>返信<\/font><\/a>\]';
		%{$Reg{Main}{Title}}   = (Value => '<b>(.*?)<\/b>', Match => 1, No => 1);
		%{$Reg{Main}{DM}}      = (Value => '<b>new!<\/b>', Match => 1, No => 2);
		%{$Reg{Main}{Name}}    = (Value => '<b>(.*?)<\/b>', Match => 1, No => 3);
		%{$Reg{Main}{Num}}     = (Value => '<div align=\'right\'><font[^>]+>No\.(\d+) &nbsp; [^>]+</font>', Match => 1, No => 5);
		%{$Reg{Main}{Comment}} = (Value => '<td width=\'\d+%\'>(.*?)\n', Match => 1, No => 4);
		%{$Reg{Main}{Url}}     = (Value => ';  <a href=\"([^"]+)\" target=[^>]+>', Match => 1, No => 4);
		%{$Reg{Main}{Mail}}    = (Value => '; <a href="mailto:([^"]+)">', Match => 1, No => 2);

		$Prm{Main}{Step} = '</div>'."\n".'</td></tr></table>';
		$Prm{Main}{StepTop} = '<hr width=\'90%\'><P>';
		$Prm{Main}{StepBottom} = '</tr></table></blockquote>';

	# GateWay Board
	} elsif ($BBS_Name eq 'GateWay') {

		$Prm{Pages}{Main}{Mode} = 'id='.$INCM->GetParam('ID', 'L').'&pw='.$INCM->GetParam('Pass', 'L');
		$Prm{Pages}{Main}{Method} = 'POST';
		$CMT{Head}{Parent}{Type} = 'Fix';
		$CMT{Head}{Child}{Type}  = 'Fix';

		%{$Prm{Pages}{Main}{NextPage}} = (Found => '<input type=submit value="次の\d+件">', Type => 'Form', Step => '</form>');

		%{$Reg{Main}{Name}}    = (Value => '<b>(<a [^>]+>)?(.*?)(<\/a>)?<\/b>', Match => 2, No => 4);
		%{$Reg{Main}{Url}}     = (Value => '<P><a href=\"([^"]+)\" target=[^>]+>', Match => 1, No => 4);
		%{$Reg{Main}{Mail}}    = (Value => '<b><a href="mailto:([^"]+)">.*?</a></b>', Match => 1, No => 2, Opt => 'm');
		if ($BBS_Ver >= 3.2) {
			$CMT{Head}{Parent}{Fix} = $CMT{Head}{Child}{Fix} = 'mode=regist';
			$CMT{Head}{Parent}{FixCMT} = $CMT{Head}{Child}{FixCMT} = 'Name => name, Mail => email, Sub => sub, Opt3 => cook, '
					 .'Mes => comment, HP => url, Key => pwd, ID => id, Pass => pw';
			%{$Reg{Main}{Num}}     = (Value => '<td>\[<b>(\d+)</b>\]', Match => 1, No => 1);
			%{$Reg{Main}{ResNum}}  = (Value => '<b>Re:\[(\d+)\].*?<\/b>', Match => 1, No => 2, Opt => 'm');
			%{$Reg{Main}{Title}}   = (Value => '<b>(.*?)<\/b>', Match => 1, No => 3);
			%{$Reg{Main}{Comment}} = (Value => '<DD>(.*?<P>|.*?<DT>)', Match => 1, No => 5);
		} else { # v3.1 v3.07
			$CMT{Head}{Parent}{Fix} = $CMT{Head}{Child}{Fix} = 'mode=regist';
			$CMT{Head}{Parent}{FixCMT} = $CMT{Head}{Child}{FixCMT} = 'Name => name, Mail => email, Sub => sub, Opt3 => cook, '
					 .'Mes => comment, HP => url, Key => pwd, ID => id, Pass => pw';
			%{$Reg{Main}{Num}}     = (Value => '<td>\[<b>(\d+)</b>\]', Match => 1, No => 1);
			%{$Reg{Main}{Num}}     = (Value => '\n\[<b>(\d+)</b>\]', Match => 1, No => 1) if ($BBS_Ver < 3.1);
			%{$Reg{Main}{ResNum}}  = (Value => '<b>Re:\[(\d+)\].*?<\/b>', Match => 1, No => 2, Opt => 'm');
			%{$Reg{Main}{Title}}   = (Value => '<b>(.*?)<\/b>', Match => 1, No => 3);
			%{$Reg{Main}{Comment}} = (Value => '<DD>(.*?<P>|.*?<DT>)', Match => 1, No => 5);
			%{$Reg{Main}{Comment}} = (Value => '<blockquote>(.*?)<P>', Match => 1, No => 5) if ($BBS_Ver <= 3.07);
		}

		$Prm{Main}{Step} = '<hr>';

	# Web Patio
	} elsif ($BBS_Name eq 'Web Patio') {
#		$CMT{Head}{Mode} = 'Head&Parent';
		$CMT{Head}{NumMode} = 'String';
#		$CMT{Head}{Parent}{Type}   = 'Fix';
#		$CMT{Head}{Child}{Type}    = 'Dynamic';
#		$CMT{Head}{Child}{Dynamic} = 'Num:no, TreeNo:oya';
#		$CMT{Head}{Child}{Fix} = 'mode=regist&pview=on&action=res_msg';
#		$CMT{Head}{Parent}{Fix} = $CMT{Head}{Child}{Fix}.'&no=new';
#		$CMT{Head}{Parent}{FixCMT} = $CMT{Head}{Child}{FixCMT} = 'Name => name, Mail => email, Sub => sub, Mes => message, '
#				 .'HP => url, Key => pwd, Opt4 => wrap, Opt5 => smail';

		%{$Prm{Pages}{Topic1}{NextPage}} = (Found => '<b>\[\d+\]</b>\n\[<a href="[^\?]+\?(p=\d+)">\d+</a>\]', Type => 'Anchor', Match => 1);
		%{$Prm{Pages}{Main}{NextPage}} = (Found => '<b>\[\d+\]</b>\n\[<a href="[^\?]+\?(.*?)">\d+</a>\]', Type => 'Anchor', Match => 1, AllRead => 1);

		@{$Prm{Type}}    = ('Topic1','Thread');
		$Prm{Topic1}{Found} = 'List';
		$Prm{Topic1}{ReadPoint} = 'None';
		$Prm{Topic1}{Step} = '</tr>';
		$Prm{Topic1}{StepTop} = '</table>';
		$Prm{Topic1}{StepBottom} = '</table></Td></Tr></Table>';
		%{$Reg{Topic1}{List}} = (Value => '<a href="[^\?]+\?(mode=view&no=\d+)"[ >]', Match => 1, No => 1, Opt => 'm');
		%{$Reg{Topic1}{Num}} = (Value => '<a href="[^\?]+\?.*?no=(\d+)"[ >]', Match => 1, No => 2);
		$Prm{Main}{Step} = '</div>';
		$Prm{Main}{StepTop} = '<table';
		$Prm{Main}{ReadPoint} = 'None';
		$Prm{Main}{InPage} = 1;
		$Prm{Main}{List} = 'Topic1';
		$Prm{Main}{PullList} = 'Shift';
		$Prm{Main}{Root} = '(<a href="[^\?]+\?mode=(mente|key)&f=\d+">|<b>管理者からの.*?</b>です。</td>)';
		%{$Reg{Main}{Num}}     = (Value => '<div align=right><a href="[^\?]+?\?mode=mente&f=(\d+)">', Match => 1, No => 1, SetParse => '\d+');
		%{$Reg{Main}{NumC}}     = (Value => '<div align=right><a href="[^\?]+?\?mode=(mente|del)&f=(\d+&no=\d+)">', Match => 2, No => 1, Opt => 'm', Eval => '$Text =~ s/(\d+)\D+(\d+)/$1\-$2/; $Text;');
#		%{$Reg{Main}{ResNumC}}  = (Value => '<div align=right><a href="[^\?]+?\?mode=(mente|del)&f=(\d+)&no=\d+">', Match => 2, No => 2);
		%{$Reg{Main}{Name}}    = (Value => '名前： <b>(.*?)</b>', Match => 1, No => 2);
		%{$Reg{Main}{Title}}   = (Value => '> ?<b>(.*?)</b>', Match => 1, No => 3);
		%{$Reg{Main}{Mail}}    = (Value => '<a href="mailto:([^"]+)" class=num>', Match => 1, No => 4);
#		%{$Reg{Main}{Url}}     = (Value => '<B>ＵＲＬ　：</B><a href=[^>]+>(.*?)</a><BR>', Match => 1, No => 4);
#		%{$Reg{Main}{TreeNo}} = (Value => '<input type=hidden name=oya value=\"?(\d+)\"?>', Match => 1, No => 3, Opt => 'm');
		%{$Reg{Main}{Comment}} = (Value => '<DD>(.*?)<\/DL>', Match => 1, No => 5, Eval => 'my %Face = (1 => \'(^^)\', 2 => \'(^_^)\', 3 => \'(+_+)\', 4 => \'(^o^)\', 5 => \'(^^;)\', 6 => \'(^_-)\', 7 => \'(;_;)\'); $Class->{Result}{$Type}{Comment} =~ s/<img src=".*?smile0(\d)\.gif"[^>]*>/$Face{$1}/eg;');
		if ($BBS_Ver >= 0.0) { # v1.3
 		}

	# AZAQ-NET
	} elsif ($BBS_Name eq 'AZAQ-NET') {
		$CMT{Head}{Parent}{Type} = 'Fix';
		$CMT{Head}{Child}{Type} = 'Dynamic';
		$CMT{Head}{Child}{Dynamic} = 'RootNo:reno';
		$CMT{Head}{Parent}{Fix} = $CMT{Head}{Child}{Fix} = 'mode=regist&new=1';
		$CMT{Head}{Parent}{FixCMT} = $CMT{Head}{Child}{FixCMT} = 'Name => name, Mail => email, Sub => sub, '
				 .'Mes => comment, HP => url, Key => pwd, Icon => icon, Color => color';

		%{$Prm{Pages}{Main}{NextPage}} = (Found => '<input type=submit value="次の\d+件">', Type => 'Form', Step => '</form>', Method => 'POST');

		if ($BBS_Ver == 3.1) {
			$CMT{Head}{Parent}{URL} = 'Write';
			%{$Basic{UpUrl}} = (Type => 'Main', Found => '<input type=hidden name=mode value="regist">', HtmlType => 'Form', Step => '</form>', SetType => 'Uri');
			%{$Prm{Pages}{Main}{NextPage}{GetAction}} = (Type => 'Uri');
			%{$Prm{Pages}{Main}{NextPage}{Url}} = (Type => 'GetAction');
			%{$Reg{Main}{Url}}     = (Value => '(;|> )<a href=\"([^"]+)\" target=[^>]+>', Match => 2, No => 4);
		} else {
			%{$Reg{Main}{Url}}     = (Value => '[;>] <a href=\"([^"]+)\" target=[^>]+>', Match => 1, No => 4);
		}

		@{$Prm{Type}} = ('Thread');
		%{$Reg{Main}{Title}}   = (Value => '<font color=[^>]+><b>(.*?)<\/b></font>', Match => 1, No => 2);
		%{$Reg{Main}{Mail}}    = (Value => '<b><a href="mailto:([^"]+)">.*?</a></b>', Match => 1, No => 2, Opt => 'm');
		%{$Reg{Main}{Name}}    = (Value => '<b>(<a [^>]+>)?(.*?)(<\/a>)?<\/b>', Match => 2, No => 3);
		$Prm{Main}{HeadBody}   = '<blockquote>';
		$Prm{Main}{Root}       = '\[<a href=\"[^\n\?]+\?[^\"]+">返信</a>\]';
		%{$Reg{Main}{Num}}     = (Value => '\[<b>(\d+)</b>\]', Match => 1, No => 1);
		%{$Reg{Main}{NumC}}    = (Value => '<small>\[?No\.(\d+)\]?<\/small>', Match => 1, No => 1);
		%{$Reg{Main}{Comment}} = (Value => '(.*?)<\/blockquote>', Match => 1, No => 4);
		$Prm{Main}{Step} = '</table>';
		$Prm{Main}{StepTop} = '<center><br>';
		$Prm{Main}{StepBottom} = '</TD></TR></TABLE>\n';

	# BBS PARK
	} elsif ($BBS_Name eq 'BBS PARK') {
		$CMT{Head}{Mode} = 'Head&Parent';
		$CMT{Head}{Parent}{Type}   = 'Fix';
		$CMT{Head}{Child}{Type}    = 'Dynamic';
		$CMT{Head}{Child}{Dynamic} = 'Num:no, TreeNo:oya';
		$CMT{Head}{Child}{Fix} = 'mode=regist&pview=on&action=res_msg';
		$CMT{Head}{Parent}{Fix} = $CMT{Head}{Child}{Fix}.'&no=new';
		$CMT{Head}{Parent}{FixCMT} = $CMT{Head}{Child}{FixCMT} = 'Name => name, Mail => email, Sub => sub, Mes => message, '
				 .'HP => url, Key => pwd, Opt4 => wrap, Opt5 => smail';

		%{$Prm{Pages}{Tree1}{NextPage}} = (Found => '\[<a href=[^\?]+\?([^"]+)">次の\d+件</a>\]', Type => 'Anchor', Match => 1);

		@{$Prm{Type}}    = ('Tree1','Date');
		$Prm{Tree1}{Found} = 'Num';
		$Prm{Tree1}{ReadPoint} = 'None';
		$Prm{Tree1}{Step} = '<br>';
		$Prm{Tree1}{StepTop} = '</center><hr>';
		$Prm{Tree1}{StepBottom} = '</table>';
		%{$Reg{Tree1}{Num}}    = (Value => '<font[^>]+>No\.(\d+)</font></small>', Match => 1, No => 1, Opt => 'm');
		%{$Reg{Tree1}{TreeNo}}    = (Value => '<font[^>]+>No\.(\d+)</font></small>', Match => 1, No => 2);
#		%{$Reg{Tree1}{ResNum}} = (Value => '<a href="[^\?]+\?.*?no=\d+&reno=(\d+)[^>]+>', Match => 1, No => 2, Opt => 'm');
		%{$Reg{Tree1}{List}} = (Value => '<a href="[^\?]+\?(.*?&Fx=0)">', Match => 1, No => 2, Opt => 'm');
		%{$Reg{Tree1}{TreePos}} = (Value => '<a href="[^\?]+\?.*?&Fx=(\d+)">', Match => 1, No => 3);
		%{$Prm{Tree1}{ParseTree}}   = (Root => '<a href="[^\?]+\?.*?&Fx=0">');

		$Prm{Main}{Step} = '<hr ';
		$Prm{Main}{StepTop} = '</center><hr>';
		$Prm{Main}{List} = 'Tree1';
		$Prm{Main}{PullList} = 'Shift';
		$Prm{Main}{ReadPoint} = 'None';
		%{$Reg{Main}{Num}}     = (Value => '<P>\n+<a href=".*?&Base=(\d+)&Fx=\d+">', Match => 1, No => 1);
		%{$Reg{Main}{ResNum}}  = (Value => 'TreeNumData', Set => 'Tree1');
		%{$Reg{Main}{Name}}    = (Value => '投稿者</b></font></td><td><font size=\d+>： <b>(.*?)</b></font></td></tr>', Match => 1, No => 2);
		%{$Reg{Main}{Title}}   = (Value => '\x83\x5eイトル</b></font></td><td><font size=\d+>： <b><font[^>]+>(.*?)</font></b></td></tr>', Match => 1, No => 3);
		%{$Reg{Main}{Mail}}    = (Value => 'Ｅメ\x81\x5bル</b></font></td><td><font size=3>： <a href="mailto:[^>]+>(.*?)</a>', Match => 1, No => 4);
		%{$Reg{Main}{Url}}     = (Value => 'URL</b></font></td><td><font size=\d+>： <a href=[^>]+>(.*?)</a>', Match => 1, No => 4);
		%{$Reg{Main}{Comment}} = (Value => '<blockquote>(.*?)<\/blockquote>', Match => 1, No => 5);
		%{$Reg{Main}{TreeNo}} = (Value => 'Pass', SetParse => 1);

		if ($BBS_Ver >= 0.0) { # 正式版
 		}

	}

	# GatWay用
	if ($BBS_Name eq 'GateWay') {
		if (!$INCM->GetParam('ID', 'L') || !$INCM->GetParam('Pass', 'L')) {
			$INCM->Fin; print STDOUT "\nIDまたはPassが未入力です"; exit;
		}
	}

	# 解析用定義を返す
	return ( Basic => \%Basic, CMT => \%CMT, Reg => \%Reg, Prm => \%Prm);
}

1;
