//表格行高亮显示
function changebg(i, s) {
	if (s == "over") {
		i.style.backgroundColor = "#FFF7D1";
	} else {
		i.style.backgroundColor = "#FFFFFF";
	}
}
//表格行高亮显示+鼠标手形显示
function changeBgAndPointer(i, s) {
	if (s == "over") {
		i.style.backgroundColor = "#FFF7D1";i.style.cursor="pointer";
	} else {
		i.style.backgroundColor = "#FFFFFF";
	}
}


function formToRequestString(form_obj) {
	var query_string = "<table><row";
	for (i = 0; i < form_obj.length; i++) {
		e = form_obj[i];
		if (e.name != "") {
			if (e.type == "select-one") {
				element_value = e.options[e.selectedIndex].value;
			} else if (e.type == "checkbox" || e.type == "radio") {
				element_value = e.value;
			} else {
				element_value = e.value;
			}
			// 单引号转义时，用双引号符号
			element_value = element_value.replace(/\&/g, "&amp;").replace(
					/\</g, "&lt;").replace(/\>/g, "&gt;").replace(/\'/g,
					"&quot;");
			query_string += " " + e.name + "='" + element_value + "'";

		}

	}
	query_string += "/></table>";
	return query_string;
}

function encodeValue(str) {
	return str.replace(/\&/g, "&amp;").replace(/\</g, "&lt;").replace(/\>/g,
			"&gt;").replace(/\'/g, "&quot;");
}

function add(url) {
	window.location.href = url;
}

function goAction(url) {
	window.location.href = url;
}

window.alert = function(str) {
	if(top == null)
		top = self;
	str = str.replace(/\n/g, "<br/>");  // 文本内容换行
	var msgw, msgh, bordercolor;
	msgw = 400;// 提示窗口的宽度
	msgh = 110;// 提示窗口的高度
	titleheight = 25 // 提示窗口标题高度
	bordercolor = "#03A4F1";// 提示窗口的边框颜色
	titlecolor = "#99CCFF";// 提示窗口的标题颜色

	var sWidth, sHeight;
	sWidth = top.document.body.offsetWidth;
	sHeight = screen.height;

//	setSelectState('hidden');
	// 背景变黑色
	var bgObj = top.document.createElement("div");
	bgObj.setAttribute('id', 'bgDiv');
	bgObj.style.position = "absolute";
	bgObj.style.top = "0";
	bgObj.style.background = "#777";
	bgObj.style.filter = "progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75";
	bgObj.style.opacity = "0.6";
	bgObj.style.left = "0";
	bgObj.style.width = sWidth + "px";
	bgObj.style.height = "600px";
	bgObj.style.zIndex = "10000";
	// 屏蔽优先级比iframe低的tag, 如:select
	iframeHtml = "<iframe src=\"javascript:false\" style=\"position:absolute; visibility:inherit;top:0px; left:0px; width:100%; height:200%; z-index:-1; filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';\"></iframe>";
	bgObj.innerHTML = iframeHtml;
	top.document.body.appendChild(bgObj);

	// msgObj:消息框, desc:系统提示, txt:显示文本, check:确定按钮
	var msgObj = top.document.createElement("div")
	msgObj.setAttribute("id", "msgDiv");
	msgObj.setAttribute("align", "center");
	msgObj.style.background = "white