function chkAll(mainChk,childChkName)
{
	var i
	var fm=mainChk.form
	
	for (i=0;i<fm.elements.length;i++)
		if (fm.elements[i].name==childChkName)
			fm.elements[i].checked=mainChk.checked
	if(mainChk.checked)
		mainChk.title="取消所有条目"
	else
		mainChk.title="选取所有条目"

}

function successTips(msg,isClose,isBack,backUrl)
{
	//msg: 提示信息
	//isClose:  true "关闭按钮"显示
	//isBack: true "返回按钮"显示
	//isrefresh: true "返回后重新刷新页面"，isBack=true时生效
	switch(successTips.arguments.length)
	{
		case 0:
			msg="";	
		case 1:
			isClose=true;
		case 2:
			isBack=true;
		case 3:
			backUrl="";
		
	}

	document.write("<table width=100% height=100%><tr><td align=center>");
	document.write(' <table width="360"  border="2" bordercolor="#63659C" align="center" cellpadding="2" cellspacing="0" style="border-collapse: collapse; ">');
	document.write('   <tr>');
	document.write('     <td height="21" align="center" bgcolor="#9C9ACE"><strong>提示信息</strong></td>');
	document.write('   </tr>');
	document.write('   <tr>');
	document.write('     <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">');
	document.write('       <tr>');
	document.write('         <td align="center" height="60" valign="middle" style="color:cc3300;font-size:14px; ">');
	document.write(msg);
	document.write('</td>');
	document.write('       </tr>');
	document.write('     </table></td>');
	document.write('   </tr>');
	document.write('   <tr>');
	document.write('     <td height="30" align="center">');
	document.write('      <table  border="0" cellspacing="1" cellpadding="1">');
	document.write('        <tr align="center">');
	if(isClose)
	{
		document.write('          <td width="50" height="20"><input type="button" value="关 闭" onclick="window.close()"></td>');
		if(isBack)
			document.write('          <td width="10">&nbsp;</td>');
	}
	if(isBack)
	{
		if(backUrl=="")
			document.write('          <td width="50" height="20"><input type="button" value="确 定" onclick="history.back()"></td>');
		else
			document.write('          <td width="50" height="20"><input type="button" value="确 定" onclick="window.location=\''+backUrl+'\'"></td>');
	}
	
	document.write('        </tr>');
	document.write('      </table>');
	document.write(' </td>');
	document.write('   </tr>');
	document.write(' </table>');
	document.write("</td></tr></table>");
}

function failTips(msg,isClose,isBack,backUrl)
{
	//msg: 提示信息
	//isClose:  true "关闭按钮"显示
	//isBack: true "返回按钮"显示
	//isrefresh: true "返回后重新刷新页面"，isBack=true时生效
	switch(failTips.arguments.length)
	{
		case 0:
			msg="";	
		case 1:
			isClose=true;
		case 2:
			isBack=true;
		case 3:
			backUrl="";
//		case 3:
//			isRefresh=false;
		
	}
	document.write("<table width=100% height=100% border=0><tr><td align=center>");
	document.write(' <table width="360"  border="2" bordercolor="#63659C" align="center" cellpadding="2" cellspacing="0" style="border-collapse: collapse; ">');
	document.write('   <tr>');
	document.write('     <td height="21" align="center" bgcolor="#9C9ACE"><strong>出错啦！！！</strong></td>');
	document.write('   </tr>');
	document.write('   <tr>');
	document.write('     <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">');
	document.write('       <tr>');
	document.write('         <td align="center" height="60" valign="middle" style="color:cc3300;font-size:14px; ">');
	document.write(msg);
	document.write('</td>');
	document.write('       </tr>');
	document.write('     </table></td>');
	document.write('   </tr>');
	document.write('   <tr>');
	document.write('     <td height="30" align="center">');
	document.write('      <table  border="0" cellspacing="1" cellpadding="1">');
	document.write('        <tr align="center">');
	if(isClose)
	{
		document.write('          <td width="50" height="20"><input type="button" value="关 闭" onclick="window.close()"></td>');
		if(isBack)
			document.write('          <td width="10">&nbsp;</td>');
	}
	if(isBack)
	{
		if(backUrl=="")
			document.write('          <td width="50" height="20"><input type="button" value="返 回" onclick="history.back()"></td>');
		else
			document.write('          <td width="50" height="20"><input type="button" value="返 回" onclick="window.location=\''+backUrl+'\'"></td>');
	}
	
	document.write('        </tr>');
	document.write('      </table>');
	document.write(' </td>');
	document.write('   </tr>');
	document.write(' </table>');
	document.write("</td></tr></table>");
}