tm.widget.Alert.config = {
  wid: "tm_widget_Alert",
  className: "frm alert",
  handle: "tm_widget_Alert_handle",
  btnClose: "tm_widget_Alert_close",
  btnOk: "tm_widget_Alert_ok",
  content: "tm_widget_Alert_content",
  icon: "tm_widget_Alert_icon",
  modalFrameId: "tm_widget_Alert_modal",
  zIndex: 100
};
tm.widget.Alert.config.fnCreateElement = function(e) {
  var cfg = tm.widget.Alert.config;
  var elem = document.createElement("DIV");
  elem.id = cfg.wid;
  elem.className = cfg.className;
  elem.innerHTML = 
    '<div class="frmWrap">\
		<table cellspacing="0" cellpadding="0">\
			<thead>\
				<tr>\
					<td class="tl"></td>\
					<td class="tc" id="' + cfg.handle + '">提示</td>\
					<td class="tb"><img id="' + cfg.btnClose + '" src="/images/close.gif" alt="关闭" /></td>\
					<td class="tr"></td>\
				</tr>\
			</thead>\
			<tbody>\
				<tr>\
					<td class="ml"></td>\
					<td class="mc" colspan="2">\
						<p>\
						  <img id="' + cfg.icon + '" src="/images/ok.gif" alt="提示图片" />\
						  <span id="' + cfg.content + '">这里是提示内容</span>\
						</p>\
						<div>\
							<br />\
							<input type="button" id="' + cfg.btnOk + '" value="确定" class="btn" />\
						</div>\
					</td>\
					<td class="mr"></td>\
				</tr>\
			</tbody>\
			<tfoot>\
				<tr>\
					<td class="bl"></td>\
					<td class="bc" colspan="2"></td>\
					<td class="br"></td>\
				</tr>\
			</tfoot>\
		</table>\
	</div>';
  document.body.appendChild(elem);
}

tm.widget.Confirm.config = {
  wid: "tm_widget_Confirm",
  className: "frm confirm",
  handle: "tm_widget_Confirm_handle",
  btnClose: "tm_widget_Confirm_close",
  btnOk: "tm_widget_Confirm_ok",
  btnCancel: "tm_widget_Confirm_cancel",
  title: "tm_widget_Confirm_title",
  content: "tm_widget_Confirm_content",
  icon: "tm_widget_Confirm_icon",
  modalFrameId: "tm_widget_Confirm_modal",
  zIndex: 98
};
tm.widget.Confirm.config.fnCreateElement = function(e) {
  var cfg = tm.widget.Confirm.config;
  var elem = document.createElement("DIV");
  elem.id = cfg.wid;
  elem.className = cfg.className;
  elem.innerHTML = 
	'<div class="frmWrap">\
		<table cellspacing="0" cellpadding="0" style="border-collapse:collapse;">\
			<thead>\
				<tr>\
					<td class="tl"></td>\
					<td class="tc" id="' + cfg.title + '">确认</td>\
					<td class="tb"><img id="' + cfg.btnClose + '" src="/images/close.gif" alt="关闭" /></td>\
					<td class="tr"></td>\
				</tr>\
			</thead>\
			<tbody>\
				<tr>\
					<td class="ml"></td>\
					<td class="mc" colspan="2">\
						<p>\
						  <img src="/images/question.gif" />\
						  <span id="' + cfg.content + '">这里是提示内容</span>\
						</p>\
						<div>\
							<br />\
							<input type="button" id="' + cfg.btnOk + '" value="确定" class="btn" />\
							<input type="button" id="' + cfg.btnCancel + '" value="取消" class="btn" />\
						</div>\
					</td>\
					<td class="mr"></td>\
				</tr>\
			</tbody>\
			<tfoot>\
				<tr>\
					<td class="bl"></td>\
					<td class="bc" colspan="2"></td>\
					<td class="br"></td>\
				</tr>\
			</tfoot>\
		</table>\
	</div>';
  
  document.body.appendChild(elem);
}

tm.widget.Information.config = {
  wid: "tm_widget_Information",
  className: "info",
  content: "tm_widget_Information_content",
  icon: "tm_widget_Information_icon",
  modalFrameId: "tm_widget_Information_modal",
  zIndex: 98
};
tm.widget.Information.config.fnCreateElement = function(e) {
  var cfg = tm.widget.Information.config;
  var elem = document.createElement("DIV");
  elem.id = cfg.wid;
  elem.className = cfg.className;
  elem.innerHTML = 
	'\
						  <img src="/images/ok.gif" />\
						  <span id="' + cfg.content + '">这里是提示内容</span>';
  document.body.appendChild(elem);
}

tm.widget.LoginWindow.config = {
  wid: "tm_widget_LoginFrame",
  btnClose: "tm_widget_LoginWindow_close",
  txtUsername: "tomid",
  backurl: "tm_widget_backurl",
  className: "loginFrame"
};
tm.widget.LoginWindow.config.fnCreateElement = function(e) {
  var cfg = tm.widget.LoginWindow.config;
  var elem = document.createElement("DIV");
  elem.id = cfg.wid;
  elem.className = cfg.className;
  elem.innerHTML = 
	'\
	<form id="formLogin" action="http://pass.tom.com/dologin.php?svcid=3" method="POST" onsubmit="return true;">\
	<input type="hidden" id="tm_widget_backurl" name="backurl" value="" />\
		<div class="loginTitle">\
			<strong><img src="/images/log_logo.gif" /></strong>\
			<span><a href="#" id="tm_widget_LoginWindow_close"><img src="/images/close.gif" /></a></span>\
		</div>\
		<div class="loginContent">\
			<h3>登录TOM博客</h3>\
			<div><label for="' + tm.widget.LoginWindow.config.txtUsername + '">邮　箱：</label><input type="text"  id="' + tm.widget.LoginWindow.config.txtUsername + '" name="tomid" size="32" onblur="Utils.autoComplete(' + "'tomid'" + ');"/></div>\
			<div><label for="password">密　码：</label><input type="password" id="tompwd" name="tompwd" size="32" /></div>\
			<div><button type="submit">登 录</button></div>\
			<div>\
				<a href="http://pass.tom.com/recover.php" target="_blank">忘记密码</a>&nbsp;&nbsp;\
				<a href="http://pass.tom.com/register.php" target="_blank">注册用户</a>&nbsp;&nbsp;\
			</div>\
		</div>\
	</form>';
  document.body.appendChild(elem);
}