function set_head(headInfo){
	document.write("<table id='head_table' width='100%' height=54 cellspacing=0 cellpadding=0 border=0 align=top>");
	document.write("<tr class=''>");
	document.write("<td width='100%' class='head_td_m' height=54 align=center>");
	document.write(headInfo);
	document.write("</td>");
	document.write("</tr>");
	document.write("<tr class='' height=1 bgcolor=black>");
	document.write("<td width='100%' class='' align=center>");
	document.write("</td>");
	document.write("</tr>");
	document.write("</table><BR><BR>");
}
function set_cursor(info){
	document.write("<table id='table_cursor' width='96%' height=24 cellspacing=0 cellpadding=0 border=0 align=top>");
	document.write("<tr>");
	document.write("<td width='20'><img src='/images/redarrow.gif'></img></td>");
	document.write("<td width=''>"+info+"</td>");
	document.write("</tr>");
	document.write("</table>");
}
function setClose(){
	document.write("<table align=center height=100>");
	document.write("<tr valign=bottom>");
	document.write("<td>");
	document.write("<A HREF='javascript:window.close()'>[关闭窗口]</A>");
	document.write("</td>");
	document.write("</tr>");
	document.write("</table>");
}
function checkAll(frm,me){
	var eles = frm.elements;
	for(var i=0;i<eles.length;i++){
		if(eles[i].name=="system_where" && eles[i].type=="checkbox"){
			if(!eles[i].disabled){
				eles[i].checked = me.checked;
			}
		}
	}
}

function delSelect(frm){
	try{
		for(var i=0;i<frm.elements.length;i++){
			if(frm.elements[i].name=="system_where" && frm.elements[i].checked){
				if(confirm("确定删除所有选中的记录吗?")){
					frm.innerHTML += "<input type=hidden name='system_flag' value='common_del'>";
					frm.action = "common_do.asp";
					frm.submit();
					return;
				}
				return;
			}
		}
	}catch(e){}
	alert("您没有选中任何记录!");
	return;
}

function do_del(tableName,colValue){
	if(confirm("确定要删除该记录吗?")){
		var html = "";
		html += "<form name=FORMDEL method=POST action='common_do.asp' target='newwin'>";
		html += "<input type=hidden name='system_flag' value='common_del'>";
		html += "<input type=hidden name='system_table' value='"+tableName+"'>";
		html += "<input type=hidden name='system_where' value=\""+colValue+"\">";
		html += "</form>";
		SPAN_FOOT.innerHTML = html;
		//alert(html);
		FORMDEL.submit();
	}
	return;
}
function do_Userdel(tableName,colValue){
	if(confirm("确定要删除该记录吗?")){
		var html = "";
		html += "<form name=FORMDEL method=POST action='common_do.asp' target='newwin'>";
		html += "<input type=hidden name='system_flag' value='common_del'>";
		html += "<input type=hidden name='system_table' value='"+tableName+"'>";
		html += "<input type=hidden name='system_where' value=\""+colValue+"\">";
		html += "<input type=hidden name='Flag' value='UserName'>";
		html += "</form>";
		SPAN_FOOT.innerHTML = html;
		
		FORMDEL.submit();
	}
	return;
}
function d_format(val){
	if(val == ""){
		return ""
	}
	if(val.substring(0,8)=="1900-1-1"){
		return "";
	}
	//2002-1-2
	var d_time = "";
	var d_array = splitStr(val,"-");
	d_time = d_array[0]+"-";
	if(d_array[1]*1 <= 9){
		d_time += "0";
	}
	d_time += d_array[1]+"-";
	if(d_array[2]*1 <= 9){
		d_time += "0";
	}
	d_time += d_array[2];
	return d_time;
}

function muti_getUser(){
	showModalDialog("/common/multi_getUser_1.asp",window,"status:0;dialogWidth:500px;dialogHeight:520px");
}
function muti_getDept(){
	showModalDialog("/common/multi_getDept_1.asp",window,"status:0;dialogWidth:500px;dialogHeight:520px");
}