//***********************************************************************************************
// implements a class which represents menue items: CItem
//
//***********************************************************************************************

function CItem(strHref, strText, strTarget)
{
		// location the link points to
	this.m_strHref = strHref;
	
		// link text
	this.m_strText = strText;
	
		// frame the document at location strHref is
		// loaded into
	this.m_strTarget = strTarget;
	
		// array index of the item in the parent CMenue object
	this.m_nMyIndex = -1;
	
		// array index of the parent CMenue object in its parent CMenueList object
	this.m_nParentIndex = -1;
		
			//----------- methods ----------
			
	this.RegisterCreateFunc = CItem_RegisterCreateFunc;	
	this.Create = CItem_Create;
	this.Print = CItem_Print;
};


function CItem_RegisterCreateFunc(pFunc)
{
	this.Create = pFunc;
	return(pFunc);
};


function CItem_Create()
{
	var str = "<a href=\""+this.m_strHref+"\" target="+this.m_strTarget+">"+this.m_strText+"</a>\n";
	
	return(str);
};


function CItem_Print()
{
	alert("m_nMyIndex: "+this.m_nMyIndex+"\nm_nParentIndex: "+this.m_nParentIndex+"\n"+this.Create());
};