function CMqRelIssueCol()
{
	var m_arrRelIssues=new Array();
	
	function Add(lngFieldID, lngProjectID, arrSrcFlds, arrTgtFlds, strCreateRelIssueView, strEditRelIssueView, 
						strSrc1, strSrc2, strLinkedIssueQS, strSrcIssueQS, 
						strLinkedProjDS, strLinkedProjColor, strRelTblName, lngRelTableDS)
	{
		var objTempRelIssue=new CMqRelIssue(arrSrcFlds, arrTgtFlds, strCreateRelIssueView, strEditRelIssueView, 
						strSrc1, strSrc2, strLinkedIssueQS, strSrcIssueQS, 
						strLinkedProjDS, strLinkedProjColor, strRelTblName, lngRelTableDS, lngFieldID);
		
		m_arrRelIssues[lngProjectID+"."+lngFieldID]=objTempRelIssue;				
	}
	
	function Item(lngFieldID, lngProjectID)
	{
		var objRelIssue;
		
		if(m_arrRelIssues){
			if(lngFieldID && lngProjectID){
				if(m_arrRelIssues[lngProjectID+"."+lngFieldID]){
					objRelIssue=m_arrRelIssues[lngProjectID+"."+lngFieldID];
				}
			}
		}
		
		return objRelIssue;
	}
	
	this.Add=Add;				
	this.Item=Item;	
}

function CMqRelIssue(arrSrcFlds, arrTgtFlds, strCreateRelIssueView, strEditRelIssueView, 
						strSrc1, strSrc2, strLinkedIssueQS, strSrcIssueQS, 
						strLinkedProjDS, strLinkedProjColor, strRelTblName, lngRelTableDS, lngFieldID)
{	
	var m_arrSrcFlds=arrSrcFlds;
	var m_arrTgtFlds=arrTgtFlds;
	var m_strCreateRelIssueView=strCreateRelIssueView;
	var m_strEditRelIssueView=strEditRelIssueView;
	var m_strSrc1=strSrc1;
	var m_strSrc2=strSrc2;
	var m_strLinkedIssueQS=strLinkedIssueQS;
	var m_strSrcIssueQS=strSrcIssueQS;
	var m_strLinkedProjDS=strLinkedProjDS;
	var m_strLinkedProjColor=strLinkedProjColor;
	var m_strRelTblName=strRelTblName;
	var m_lngRelTableDS=lngRelTableDS;
	
	function GetSrcFields()
	{
		var arrReturn=new Array();
		if(m_arrSrcFlds){
			arrReturn=m_arrSrcFlds;
		}
		return arrReturn;
	}
	
	function GetTargetFields()
	{
		var arrReturn=new Array();
		if(m_arrTgtFlds){
			arrReturn= m_arrTgtFlds;
		}		
		return arrReturn;			
	}
	
	function GetCreateView()
	{
		var strReturn="";
		if(m_strCreateRelIssueView){
			strReturn=m_strCreateRelIssueView;
		}
		return strReturn;
	}
	
	function GetEditView()
	{
		var strReturn="";
		if(m_strEditRelIssueView){
			strReturn=m_strEditRelIssueView;
		}
		return strReturn;
	}
	
	function GetSource1()
	{
		var strReturn="";
		if(m_strSrc1){
			strReturn=m_strSrc1;
		}
		return strReturn;
	}
	
	function GetSource2()
	{
		var strReturn="";
		if(m_strSrc2){
			strReturn=m_strSrc2;
		}
		return strReturn;
	}
	
	function GetLinkedIssueQSParam()
	{
		var strReturn="";
		if(m_strLinkedIssueQS){
			strReturn=m_strLinkedIssueQS;
		}
		return strReturn;
	}
	
	function GetSourceIssueQSParam()
	{
		var strReturn="";
		if(m_strSrcIssueQS){
			strReturn=m_strSrcIssueQS;
		}
		return strReturn;
	}
	
	function GetLinkedProjDS()
	{
		var lngDS="1025";
		if(m_strSrcIssueQS){
			lngDS=m_strLinkedProjDS;
		}
		return lngDS;
	}
	
	function GetLinkedProjColor()
	{
		var strColor="#ffffff";
		if(m_strSrcIssueQS){
			strColor=m_strLinkedProjColor;
		}
		return strColor;
	}
	
	function GetRelTableName()
	{
		var strReturn="tblRelIssue";
		if(m_strRelTblName){
			strReturn=m_strRelTblName;
		}
		return strReturn;
	}
	
	function GetRelTableDSType()
	{
		var lngReturn=8; //cenLicenses
		if(m_lngRelTableDS){
			lngReturn=m_lngRelTableDS;
		}
		return lngReturn;
	}
	
	this.FieldID=lngFieldID;
	this.GetSrcFields=GetSrcFields;
	this.GetTargetFields=GetTargetFields;
	this.GetCreateView=GetCreateView;
	this.GetEditView=GetEditView;
	this.GetSource1=GetSource1;
	this.GetSource2=GetSource2;
	this.GetLinkedIssueQSParam=GetLinkedIssueQSParam;
	this.GetSourceIssueQSParam=GetSourceIssueQSParam;
	this.GetLinkedProjDS=GetLinkedProjDS;
	this.GetLinkedProjColor=GetLinkedProjColor;
	this.GetRelTableName=GetRelTableName;
	this.GetRelTableDSType=GetRelTableDSType;
}
