function CMqRuleMgr(){
	
	var m_objHTTPRequest;
	var m_strCurrentLocation;
	
	function AddRule(strCurrentProject,lngGroupID,strRuleName){

			var objRequest=this.HTTPRequest;

			var strAddRule = objRequest.Get(this.CurrentLocation + "MqWorkflow.ASP?WCI=AddRule&CurrentProject=" 
								+ escape(strCurrentProject) + "&RuleName=" + escape(strRuleName) + "&GroupID=" 
								+ lngGroupID, "ADMIN");
			var arrRuleInfo = strAddRule.split(LOG_CONN_SEPARATOR);

			if (arrRuleInfo.length >0){
				return arrRuleInfo[0];
			}else{
				if (strAddRule!=HTTP_REQ_CANCEL_PROCESS) {
					alert(strAddRule);
				}
				return false;
			}
	}

	function CopyRule(strCurrentProject,lngGroupID,lngRuleID,strRuleName)
	{
		var objRequest=this.HTTPRequest;
		var strRuleInfo = objRequest.Get(this.CurrentLocation + "MqWorkflow.ASP?WCI=CopyRule&CurrentProject=" 
								+ escape(strCurrentProject) + "&GroupID=" + lngGroupID +
								 "&RuleID=" + lngRuleID + "&RuleName=" + escape(strRuleName), "ADMIN");
		var arrRuleInfo = strRuleInfo.split(LOG_CONN_SEPARATOR);

		if (arrRuleInfo.length >0){
			return arrRuleInfo[0];
		}else{
			if (strRuleInfo!=HTTP_REQ_CANCEL_PROCESS) {
				alert(strRuleInfo);
			}
			return false;
		}
	}
	
	function ResetAll()
	{
		var objRequest=this.HTTPRequest;

		var sRes = objRequest.Get(this.CurrentLocation + 
					"MqWorkflow.ASP?wci=ApplyWorkflow&Recreate=1" );

		if (sRes)
		{
			if (sRes==RESULT_FALSE)
			{
				alert(MSG_WORKFLOW_NOT_APPLIED);
			}else{
				if (sRes!=HTTP_REQ_CANCEL_PROCESS){
					alert(MSG_WORKFLOW_APPLIED);
				}
			}
		}

	}

	this.AddRule=AddRule;
	this.CopyRule=CopyRule;
	this.HTTPRequest=m_objHTTPRequest;
	this.CurrentLocation=m_strCurrentLocation;
	this.ResetAll=ResetAll;
	
}