// JavaScript Document
/**
* @author Cody Swann
* @version 1.0 sept, 2004
*/
function Model()
{
	this.m_strClass = "Model";
	this.m_sModelText;
	
	this.m_iOrigName = 0;
	this.m_iOrigTextColor = 1;
	this.m_iOrigBgColor = 2;
	this.m_iOrigWidth = 3;
	this.m_iOrigHeight = 4;
	this.m_iOrigContent = 5;
	this.m_iOrigFontSize = 6;
	this.m_iCurrName = 7;
	this.m_iCurrTextColor = 8;
	this.m_iCurrBgColor = 9;
	this.m_iCurrWidth = 10;
	this.m_iCurrHeight = 11;
	this.m_iCurrContent = 12;
	this.m_iCurrFontSize = 13;
	this.m_arrHolders = new Array();
}

Model.method("typeOf", function()
{
	return this.m_strClass;
});


/********************
*RESETERS
********************/
Model.method('resetWidth', function(/*String*/ strHolderId)
{
	alert("Error: You must override methods from an abstract class");
});

Model.method('resetHeight', function(/*String*/ strHolderId)
{
	alert("Error: You must override methods from an abstract class");
});

Model.method('resetTextColor', function(/*String*/ strHolderId)
{
	alert("Error: You must override methods from an abstract class");
});

Model.method('resetBgColor', function(/*String*/ strHolderId)
{
	alert("Error: You must override methods from an abstract class");
});

Model.method('resetFontSize', function(/*String*/ strHolderId)
{
	alert("Error: You must override methods from an abstract class");
});
/********************
********************/

/**
* ABSTRACT
*
* returns the element specified by strHolderID
*/
Model.method('getHolder', function(/*String*/ strHolderId)
{
	alert("Error: You must override methods from an abstract class");
});

/**
* function sets all properties to their original/default values
* @param strHolderId, a string indicating the holder whose pro
* properties you are targeting;
*/
Model.method('resetAll', function(/*String*/ strHolderId)
{
	this.resetBgColor(strHolderId);
	this.resetTextColor(strHolderId);
	this.resetHeight(strHolderId);
	this.resetWidth(strHolderId);
	this.resetFontSize(strHolderId);
});

/**
* function that searches for the specified array and returns
* an index containing it's properties
* @param strHolderId, a string indicating the holder whose pro
* properties you are targeting;
*/
Model.method('findHolder', function(/*String*/ strHolderId)
{
	var targetArrayIndex = null;
	for(var i=0; i<this.m_arrHolders.length; i++)
	{
		if(this.m_arrHolders[i][0] == strHolderId)
		{
			targetArrayIndex = i;
		}	
	}
	return targetArrayIndex;
});


/**
* function that will build the appropriate holder based on the user's
* browser
* @param strId string indicating the id for the holder being created
* @param boolean, indicating whether the holder should be written to
* screen or just stored
*/
/*void*/ Model.method('makeHolder',function(/*String*/ strId, /*Boolean*/ writeNow)
{
	this.m_arrHolders.push(new Array(strId, null, null, null, null, null, null, null, null, null, null, null, null, null));
});

/**
* function that will fill a holder based the id passed, using the user's 
* browser object model
* @param strHolderId string indicating the id for the holder being 
* targeted
* @param strHolderId, string indicating the content that should flow
* into the target holder
*/
Model.method('fillHolder',function(/*String*/ strHolderId, /*String*/ strHolderContent)
{
	alert("Error: You must override methods from an abstract class");
}); 


/**
* function that changes the size of target element 
* @param strHolderId string indicating the id for the holder being 
* targeted
* @param mWidth, either string or int that holds desired width 
* @param mHeight, either string or int that holds desired height
*/
Model.method('resizeHolder', function(/*String*/strHolderId, /*mixed*/mWidth, /*mixed*/mHeight)
{
	alert("Error: You must override methods from an abstract class");
});


/**
* function that changes hides target element 
* @param strHolderId string indicating the id for the holder being 
* targeted
*/
Model.method('hideHolder', function(/*String*/ strHolderId)
{
	alert("Error: You must override methods from an abstract class");
});

/**
* function that changes reshows target element 
* @param strHolderId string indicating the id for the holder being 
* targeted
*/

Model.method('showHolder', function(/*String*/ strHolderId)
{
	alert("Error: You must override methods from an abstract class");
});

/**
* DEBUG
*/
Model.method('callParent', function(/*String*/ message)
{
	alert("message= " + message);
});


/**
* function that changes the text color of targetelement 
* @param strHolderId string indicating the id for the holder being 
* targeted
* @param hColor, string that can contain either the hexadecimal 
* definition of the color or its literal description
*/
Model.method('changeFontColor', function(/*String*/ strHolderId, /*Hex*/hColor)
{
	alert("Error: You must override methods from an abstract class");
});

/**
* function that changes the text color of targetelement 
* @param strHolderId string indicating the id for the holder being 
* targeted
* @param mSize, string or int that indicates the new font size
*/
Model.method('changeFontSize', function(/*String*/ strHolderId, /*mixed*/mSize)
{
	alert("Error: You must override methods from an abstract class");
});


/**
* function that changes the background color of targetelement 
* @param strHolderId string indicating the id for the holder being 
* targeted
* @param hColor, string that can contain either the hexadecimal 
* definition of the color or its literal description
*/
Model.method('changeBgColor', function(/*String*/ strHolderId, /*Hex*/hColor)
{
	alert("Error: You must override methods from an abstract class");
});

