function Delete_click(frm,strCheckBoxName,operate)
{
	flgCheck = 0;
	if (typeof(document.all(strCheckBoxName).checked)!="undefined")
	{
		if (!(document.all(strCheckBoxName).checked))
		{
			alert("\u8bf7\u9009\u62e9\u8bb0\u5f55\u4ee5\u4fbf"+operate);
			document.all(strCheckBoxName).focus();
			return false;
		}
		else
		{
			flgCheck = 1;
		}
	}
	else
	{
		if(typeof(document.all(strCheckBoxName))!="undefined"){
			for (i = 0 ; document.all(strCheckBoxName).length > i ; i ++)
			{
				if(document.all(strCheckBoxName)[i].checked)
				{
					flgCheck = 1;
				}
			}
		}
	}

	if (flgCheck == 0)
	{
		alert("\u8bf7\u9009\u62e9\u8bb0\u5f55\u4ee5\u4fbf"+operate);
		document.all(strCheckBoxName)[0].focus();
		return false;
	}
	
	if (confirm("\u4f60\u786e\u8ba4\u8981"+operate+"\u8fd9\u4e9b\u8bb0\u5f55"))
	{		
		frm.submit();
	}
	else
		return false;
}



function page_delete_click(frm,strCheckBoxName,operate, actionName)
{
    flgCheck = 0;
    if (actionName != "null" && actionName != "") {
        frm.action = actionName;
    }
    
    if (typeof(document.all(strCheckBoxName).checked)!="undefined")
    {
        if (!(document.all(strCheckBoxName).checked))
        {
            alert("\u8bf7\u9009\u62e9\u8bb0\u5f55\u4ee5\u4fbf"+operate);
            document.all(strCheckBoxName).focus();
            return false;
        }
        else
        {
            flgCheck = 1;
        }
    }
    else
    {
        if(typeof(document.all(strCheckBoxName))!="undefined"){
            for (i = 0 ; document.all(strCheckBoxName).length > i ; i ++)
            {
                if(document.all(strCheckBoxName)[i].checked)
                {
                    flgCheck = 1;
                }
            }
        }
    }

    if (flgCheck == 0)
    {
        alert("\u8bf7\u9009\u62e9\u8bb0\u5f55\u4ee5\u4fbf"+operate);
        document.all(strCheckBoxName)[0].focus();
        return false;
    }
    
    if (confirm("\u4f60\u786e\u8ba4\u8981"+operate+"\u8fd9\u4e9b\u8bb0\u5f55"))
    {       
        frm.submit();
    }
    else
        return false;
}

function check_select(frm,strCheckBoxName,operate)
{
    flgCheck = 0;
    if (typeof(document.all(strCheckBoxName).checked)!="undefined")
    {
        if (!(document.all(strCheckBoxName).checked))
        {
            alert("\u8bf7\u9009\u62e9\u8bb0\u5f55\u4ee5\u4fbf"+operate);
            document.all(strCheckBoxName).focus();
            return false;
        }
        else
        {
            flgCheck = 1;
        }
    }
    else
    {
        if(typeof(document.all(strCheckBoxName))!="undefined"){
            for (i = 0 ; document.all(strCheckBoxName).length > i ; i ++)
            {
                if(document.all(strCheckBoxName)[i].checked)
                {
                    flgCheck = 1;
                }
            }
        }
    }

    if (flgCheck == 0)
    {
        alert("\u8bf7\u9009\u62e9\u8bb0\u5f55\u4ee5\u4fbf"+operate);
        document.all(strCheckBoxName)[0].focus();
        return false;
    }
    
    if (confirm("\u4f60\u786e\u8ba4\u8981"+operate+"\u8fd9\u4e9b\u8bb0\u5f55"))
    {       
        return true;
    }
    else
        return false;
}

function SeletAll(strCheckBoxName)
{	
	SelectAction(strCheckBoxName,true);
}
		
function ClearAll(strCheckBoxName)
{
	SelectAction(strCheckBoxName,false);
}

function SelectAction(strCheckBoxName,straction)
{
	if(document.all(strCheckBoxName)!=null){
	if (typeof(document.all(strCheckBoxName).checked)=="undefined")
	{
		if(typeof(document.all(strCheckBoxName))!="undefined"){
			for (i = 0 ; document.all(strCheckBoxName).length > i ; i ++)
			{
				document.all(strCheckBoxName)[i].checked = straction;
			}
		}
	}
	 else
	 {
	  	document.all(strCheckBoxName).checked=straction;
	 }
	 }
}

