/*	=======================================================================	*/
/// <remarks>
/// Version:
///		- number:	2.0.0
///		- build:	20070925
///		- status:	live
/// </remarks>
/*	=======================================================================	*/
/// <remarks>
/// Global Variables
/// </remarks>
	var x_lifeline = new ClassLifelineX(x_debug);
/*	=======================================================================	*/
/// <remarks>
/// Class: ClassLifelineX
/// The ClassLifelineX object class has the following purpose/function:
///	- 
/// </remarks>
/*	-----------------------------------------------------------------------	*/
/// <summary>
/// The ClassLifelineX object class is constructed as follows:
///		var thisobj = new ClassLifelineX(dbg);
/// - where:
///		- dbg:	debugging switch
/// </summary>
function ClassLifelineX(dbg) {
	/*	-------------------------------------------	*/
	/// <remarks>Properties: Public</remarks>
	/*	-------------------------------------------	*/
	this.parameter = "";
	/*	-------------------------------------------	*/
	/// <remarks>Properties: Private</remarks>
	/*	-------------------------------------------	*/
	var _self = this;	// self allows for a method/property to be called internally
	var _debug = (dbg)? dbg : false;
	var _id = "ClassLifelineX";
	var _imgdir = "images/";
	/*	-------------------------------------------	*/
	/// <remarks>Region: Accessor methods</remarks>
	/*	-------------------------------------------	*/
	this.GetID = function() { return(_id); }
	/*	-------------------------------------------	*/
	/// <remarks>Region: Public methods</remarks>
	/*	-------------------------------------------	*/
	this.SetType = _SetType;
	this.SetOver = _SetOver;
	this.SetValue = _SetValue;
	this.SetCentre = _SetCentre;
	this.Template = _Template;
	
	/// <summary>Method:_SetType</summary>
	function _SetType(thisvar) {
		_Debug("_SetType:", "thisvar", thisvar);
	}
	/// <summary>Method:_SetOver</summary>
	function _SetOver(img, val, nme, isov) {
		var fl = document.getElementById(nme);
		if (!fl.value || fl.value != val) {
			img.style.cursor = (isov)? "hand":"default"
			var sc = _imgdir.concat(val, (isov)? "_over.gif":"_icon.gif");
			img.src = sc;
		}
	}
	/// <summary>Method:_SetValue</summary>
	function _SetValue(nme, val, img, arrid, arrval) {
		_Debug("_SetValue:", "arrid", typeof(arrid));
		var fl = document.getElementById(nme);
		fl.value = val;
		for (var i=0; i<arrid.length; i++) {
			_Debug("_SetValue:", "id", arrid[i], "val", arrval[i]);
			var pic = document.getElementById(arrid[i]);
			pic.src = _imgdir.concat(arrval[i], "_icon.gif");
		}
		img.src = _imgdir.concat(val, "_over.gif");
	}
	/// <summary>Method:_SetCentre</summary>
	function _SetCentre(thisvar) {
		_Debug("_SetCentre:", "thisvar", thisvar);
	}
	/// <summary>Method:_Template</summary>
	function _Template(thisvar) {
		_Debug("_Template:", "thisvar", thisvar);
	}
	/*	-------------------------------------------	*/
	/// <remarks>Region: Private methods</remarks>
	/*	-------------------------------------------	*/
	/// <summary>Method:_RaiseError</summary>
	function _RaiseError(thiserr) {
		_Debug("RaiseError:", "thiserr", thiserr);
		throw (thiserr);
	}
	/// <summary>Method:_Debug - write debugging message. First param is the method label, followed by name, value pairs</summary>
	function _Debug(arg) {
		if (_debug) {
			var s = "<!-- ClassLifelineX::"
			s = s.concat(arguments[0], ":");
			var argn = arguments.length;
			for(var i=1; i<argn; i=i+2)
				s = s.concat(arguments[i], ":", arguments[i+1], " ");
			alert(s.concat("-->\n"));
		}
	}
	
}





