<?xml version="1.0" encoding="UTF-8"?>
<rmml>
<!--
$RCSfile: rnmc_stdCheckBox.xml,v $
$Revision: 1027 $

last change: $Date: 2009-03-24 12:01:04 +0300 (Вт, 24 мар 2009) $
             $Author: faja $

	Lacerta Project
	version 1.0.0.1
	Copyright (C) 2007-2009 RNMC
-->

<composition name="rnmc_stdCheckBox" class="rnmc_stdObject">
	<button name="zone" depth="-1" enabled="true"/>
	<script event="zone.onRollOver">
		rolloverButton();
	</script>
	<script event="zone.onRollOut">
		rolloutButton()
	</script>
	<script event="zone.onPress">
		pressButton();
	</script>
	<script event="zone.onRelease">
		releaseButton();
	</script>

<script><![CDATA[
	this.type = "rnmc_stdCheckBox";
	this.id = "";
	this.visited = false;

	this.objectEnabled = true;
	this.changeEvent = CHECKBOX_CHANGE_EVENT_PRESS;
	this.state = CHECKBOX_STATE_UNCHECKED;

	this.boxSrcNormal = null;
	this.markSrcNormal = null;		
	this.boxSrcDisabled = null;
	this.markSrcDisabled = null;

//	элементы чекбокса
	this.checkBoxBorderNormal = null;
	this.checkBoxMarkNormal = null;
	this.checkBoxBorderDisabled = null;
	this.checkBoxMarkDisabled = null;

//	аттач
	this.autoAttachTarget = null;
	this.autoAttachStyle = AUTOATTACH_NO;
	this.autoAttachOffsetX = 0;
	this.autoAttachOffsetY = 0;

//	actions
	this.onRollOverActions = null;
	this.onRollOutActions = null;
	this.onPressActions = null;
	this.onReleaseActions = null;
	this.onCheckActions = null;
	this.onUncheckActions = null;

//	для callback'ов
	this.pressCallBackObject = null;
	this.pressCallBackFunction = null;
	this.releaseCallBackObject = null;
	this.releaseCallBackFunction = null;
	this.rollOutCallBackObject = null;
	this.rollOutCallBackFunction = null;
	this.rollOverCallBackObject = null;
	this.rollOverCallBackFunction = null;

// инициализация из узла
	function initFromNode(srcNode){
		var xmlAttributeMap = null;
		var xmlAttribute = null;

		var srcBase = null;
		if (srcNode.ownerDocument.source){
			var tmp = new String(srcNode.ownerDocument.source).replace("/\/.g", "\\").split("\\")
			tmp.pop();
			srcBase = tmp.join("\\");
		}

		xmlAttributeMap = srcNode.attributes;
		if (xmlAttributeMap){
			xmlAttribute = xmlAttributeMap.getNamedItem("visible");
			if (xmlAttribute != null && xmlAttribute.specified){
				if(xmlAttribute.value == "true")
					this.visibility = OBJECT_VISIBILITY_TRUE;
				else if(xmlAttribute.value == "false")
					this.visibility = OBJECT_VISIBILITY_FALSE;
			}
			xmlAttribute =  xmlAttributeMap.getNamedItem("id");
			if (xmlAttribute != null && xmlAttribute.specified)
				this.id = xmlAttribute.value;
		}

		var xmlNode = srcNode.firstChild;
		while(xmlNode){
			if(xmlNode.nodeName == "param"){
				xmlAttributeMap = xmlNode.attributes;
				if (xmlAttributeMap){
					xmlAttribute =  xmlAttributeMap.getNamedItem("x");
					if (xmlAttribute != null && xmlAttribute.specified)
						this.objectX = parseInt(xmlAttribute.value);
					xmlAttribute =  xmlAttributeMap.getNamedItem("y");
					if (xmlAttribute != null && xmlAttribute.specified)
						this.objectY = parseInt(xmlAttribute.value);

					xmlAttribute =  xmlAttributeMap.getNamedItem("borderSrcNormal");
					if (xmlAttribute != null && xmlAttribute.specified)
						this.boxSrcNormal = scene.Utils.makePathSrc(srcBase, xmlAttribute.value);
					xmlAttribute =  xmlAttributeMap.getNamedItem("markSrcNormal");
					if (xmlAttribute != null && xmlAttribute.specified)
						this.markSrcNormal = scene.Utils.makePathSrc(srcBase, xmlAttribute.value);
					xmlAttribute =  xmlAttributeMap.getNamedItem("borderSrcDisabled");
					if (xmlAttribute != null && xmlAttribute.specified)
						this.boxSrcDisabled = scene.Utils.makePathSrc(srcBase, xmlAttribute.value);
					xmlAttribute =  xmlAttributeMap.getNamedItem("markSrcDisabled");
					if (xmlAttribute != null && xmlAttribute.specified)
						this.markSrcDisabled = scene.Utils.makePathSrc(srcBase, xmlAttribute.value);
					xmlAttribute =  xmlAttributeMap.getNamedItem("changeOnEvent");
					if (xmlAttribute != null && xmlAttribute.specified){
						if(xmlAttribute.value == "onPress"){
							this.changeEvent = CHECKBOX_CHANGE_EVENT_PRESS;
						} else if(xmlAttribute.value == "onRelease"){
							this.changeEvent = CHECKBOX_CHANGE_EVENT_RELEASE;
						}
					}
				}
			} else if(xmlNode.nodeName == "actions"){
				this.onCheckActions = scene.Utils.parseActionsNode(xmlNode, "onCheck");
				this.onUncheckActions = scene.Utils.parseActionsNode(xmlNode, "onUnCheck");
				this.onPressActions = scene.Utils.parseActionsNode(xmlNode, "onPress");
				this.onReleaseActions = scene.Utils.parseActionsNode(xmlNode, "onRelease");
				this.onRollOverActions = scene.Utils.parseActionsNode(xmlNode, "onRollOver");
				this.onRollOutActions = scene.Utils.parseActionsNode(xmlNode, "onRollOut");
			
			} if(srcNode.nodeName == "attach"){
				xmlAttributeMap = srcNode.attributes;
				if (xmlAttributeMap){
					this.rolloverMenuDefined = true;
					xmlAttribute =  xmlAttributeMap.getNamedItem("target");
					if (xmlAttribute != null && xmlAttribute.specified)
						this.autoAttachTarget = xmlAttribute.value;
					xmlAttribute =  xmlAttributeMap.getNamedItem("direction");
					if (xmlAttribute != null && xmlAttribute.specified){
						switch((xmlAttribute.value).toUpperCase()){
						case "LEFT_ABOVE":
							this.autoAttachStyle = AUTOATTACH_LEFT_ABOVE;
							break;
						case "LEFT_TOP":
							this.autoAttachStyle = AUTOATTACH_LEFT_TOP;
							break;
						case "LEFT_CENTER":
							this.autoAttachStyle = AUTOATTACH_LEFT_CENTER;
							break;
						case "LEFT_BOTTOM":
							this.autoAttachStyle = AUTOATTACH_LEFT_BOTTOM;
							break;
						case "LEFT_BELOW":
							this.autoAttachStyle = AUTOATTACH_LEFT_BELOW;
							break;
						case "TOP_LEFT":
							this.autoAttachStyle = AUTOATTACH_TOP_LEFT;
							break;
						case "TOP_CENTER":
							this.autoAttachStyle = AUTOATTACH_TOP_CENTER;
							break;
						case "TOP_RIGHT":
							this.autoAttachStyle = AUTOATTACH_TOP_RIGHT;
							break;
						case "RIGHT_ABOVE":
							this.autoAttachStyle = AUTOATTACH_RIGHT_ABOVE;
							break;
						case "RIGHT_TOP":
							this.autoAttachStyle = AUTOATTACH_RIGHT_TOP;
							break;
						case "RIGHT_CENTER":
							this.autoAttachStyle = AUTOATTACH_RIGHT_CENTER;
							break;
						case "RIGHT_BOTTOM":
							this.autoAttachStyle = AUTOATTACH_RIGHT_BOTTOM;
							break;
						case "RIGHT_BELOW":
							this.autoAttachStyle = AUTOATTACH_RIGHT_BELOW;
							break;
						case "BOTTOM_LEFT":
							this.autoAttachStyle = AUTOATTACH_BOTTOM_LEFT;
							break;
						case "BOTTOM_CENTER":
							this.autoAttachStyle = AUTOATTACH_BOTTOM_CENTER;
							break;
						case "BOTTOM_RIGHT":
							this.autoAttachStyle = AUTOATTACH_BOTTOM_RIGHT;
							break;
						}
					}
					xmlAttribute =  xmlAttributeMap.getNamedItem("offsetX");
					if (xmlAttribute != null && xmlAttribute.specified)
						this.autoAttachOffsetX = parseInt(xmlAttribute.value);
					xmlAttribute =  xmlAttributeMap.getNamedItem("offsetY");
					if (xmlAttribute != null && xmlAttribute.specified)
						this.autoAttachOffsetY = parseInt(xmlAttribute.value);
				}
			}
			xmlNode = xmlNode.nextSibling;
		}
		if(!this.boxSrcNormal  || !this.markSrcNormal){
			return false;
		}
		return true;
	};

	function setPressCallBack(pointerToObject, callbackFunction){
		this.pressCallBackObject = pointerToObject;
		this.pressCallBackFunction = callbackFunction;
	};
  
	function clearPressCallBack(){
		this.pressCallBackObject = null;
		this.pressCallBackFunction = null;
	}

	function setReleaseCallBack(pointerToObject, callbackFunction){
		this.releaseCallBackObject = pointerToObject;
		this.releaseCallBackFunction = callbackFunction;
	};

	function clearReleaseCallBack(){
		this.releaseCallBackObject = null;
		this.releaseCallBackFunction = null;
	}
  
  function setRollOutCallBack(pointerToObject, callbackFunction){
		this.rollOutCallBackObject = pointerToObject;
		this.rollOutCallBackFunction = callbackFunction;
	};
  
  function clearRollOutCallBack(){
		this.rollOutCallBackObject = null;
		this.rollOutCallBackFunction = null;
	}
	
   function setRollOverCallBack(pointerToObject, callbackFunction){  //<f
		this.rollOverCallBackObject = pointerToObject;
		this.rollOverCallBackFunction = callbackFunction;
	};
  
  function clearRollOverCallBack(){
		this.rollOverCallBackObject = null;
		this.rollOverCallBackFunction = null;     //f>
	}
	function showObject(){
		if(this.boxSrcNormal && !this.checkBoxBorderNormal){
			this.checkBoxBorderNormal = new Image();
			this.checkBoxBorderNormal.parent = this;
			this.checkBoxBorderNormal.visible = false;
			this.checkBoxBorderNormal.x = 0;
			this.checkBoxBorderNormal.y = 0;
			this.checkBoxBorderNormal.depth = 1;
			this.checkBoxBorderNormal.src = this.boxSrcNormal;
		}
		if(this.markSrcNormal && !this.checkBoxMarkNormal){
			this.checkBoxMarkNormal = new Image();
			this.checkBoxMarkNormal.parent = this;
			this.checkBoxMarkNormal.visible = false;
			this.checkBoxMarkNormal.x = 0;
			this.checkBoxMarkNormal.y = 0;
			this.checkBoxMarkNormal.depth = -1;
      this.checkBoxMarkNormal.hitArea = "[0,0,0,0]";
			this.checkBoxMarkNormal.src = this.markSrcNormal;
		}
		if(this.boxSrcDisabled && !this.checkBoxBorderDisabled){
			this.checkBoxBorderDisabled = new Image();
			this.checkBoxBorderDisabled.parent = this;
			this.checkBoxBorderDisabled.visible = false;
			this.checkBoxBorderDisabled.x = 0;
			this.checkBoxBorderDisabled.y = 0;
			this.checkBoxBorderDisabled.depth = 1;
			this.checkBoxBorderDisabled.src = this.boxSrcDisabled;
		}
		if(this.markSrcDisabled && !this.checkBoxMarkDisabled){
			this.checkBoxMarkDisabled = new Image();
			this.checkBoxMarkDisabled.parent = this;
			this.checkBoxMarkDisabled.visible = false;
			this.checkBoxMarkDisabled.x = 0;
			this.checkBoxMarkDisabled.y = 0;
			this.checkBoxMarkDisabled.depth = -1;
			this.checkBoxMarkDisabled.src = this.markSrcDisabled;
		}
		this.updateView();
		
		if(this.autoAttachTarget){	//	объект к чему то присоединён
			var attachCoords = this.getAttachPosition();
			this.x = attachCoords[0];
			this.y = attachCoords[1];
		} else {
			this.x = this.objectX;
			this.y = this.objectY;
		}		

	//	запуск присоединённых эффектов для показа
		this.effectsTarget = this;
		var showEffectsCount = this.startEffects(EVENT_ON_SHOW);
		if(showEffectsCount == 0){
			this.visible = true;
		}
		if(this.showCallBackFunction != null && this.showCallBackObject != null)
			this.showCallBackFunction.call(this.showCallBackObject, this.id);
	};

	function hideObject(){
		if(this.checkBoxBorderNormal){
			this.checkBoxBorderNormal.parent = null;
			this.checkBoxBorderNormal = null;
		}
		if(this.checkBoxMarkNormal){
			this.checkBoxMarkNormal.parent = null;
			this.checkBoxMarkNormal = null;
		}
		if(this.checkBoxBorderDisabled){
			this.checkBoxBorderDisabled.parent = null;
			this.checkBoxBorderDisabled = null;
		}
		if(this.checkBoxMarkDisabled){
			this.checkBoxMarkDisabled.parent = null;
			this.checkBoxMarkDisabled = null;
		}
		zone.hitArea = null;
		zone.enabled = false;
		this.visible = false;
	};

	function updateView(){
		if(this.objectEnabled){
			if(this.checkBoxBorderDisabled)
				this.checkBoxBorderDisabled.visible = false;
			if(this.state == CHECKBOX_STATE_CHECKED){
				if(this.checkBoxMarkDisabled)
					this.checkBoxMarkDisabled.visible = false;
			} else if(this.state == CHECKBOX_STATE_UNCHECKED){
				if(this.checkBoxMarkDisabled)
					this.checkBoxMarkDisabled.visible = false;
			}

			if(this.checkBoxBorderNormal){
				this.checkBoxBorderNormal.visible = true;
				zone.hitArea = "[0,0," + this.checkBoxBorderNormal.width + ","
					+ this.checkBoxBorderNormal.height + "]";
				zone.enabled = true;
			}
			if(this.state == CHECKBOX_STATE_CHECKED){
				if(this.checkBoxMarkNormal)
					this.checkBoxMarkNormal.visible = true;
			} else if(this.state == CHECKBOX_STATE_UNCHECKED){
				if(this.checkBoxMarkNormal)
					this.checkBoxMarkNormal.visible = false;
			}
		} else {
			zone.enabled = false;
			if(this.checkBoxBorderDisabled)
				this.checkBoxBorderDisabled.visible = true;
			if(this.state == CHECKBOX_STATE_CHECKED){
				if(this.checkBoxMarkDisabled)
					this.checkBoxMarkDisabled.visible = true;
			} else if(this.state == CHECKBOX_STATE_UNCHECKED){
				if(this.checkBoxMarkDisabled)
					this.checkBoxMarkDisabled.visible = false;
			}
		}
	}

//	для работы с аттачем
	function attachToObject(targetObject, attachStyle, attachXOffset, attachYOffset){
		if(targetObject != undefined)
			this.autoAttachTarget = targetObject;
		if(attachStyle != undefined)
			this.autoAttachStyle = attachStyle;
		if(attachXOffset != undefined)
			this.autoAttacheffsetX = attachXOffset;
		if(attachYOffset != undefined)
			this.autoAttacheffsetY = attachYOffset;
	}

	function getAttachPosition(){
		var positionArray = new Array();
		var realX = 0;
		var realY = 0;
		var realWidth = 0;
		var realHeight = 0;

		realWidth = this.width;
		realHeight = this.height;

		var targetObjPosition = parent.getChildPosition(this.autoAttachTarget);
		if(!targetObjPosition)
			return null;
		switch(this.autoAttachStyle){
		case AUTOATTACH_TOP_FROMLEFT:
			realX = targetObjPosition[0] - targetObjPosition[2] + this.autoAttacheffsetX;
			realY = targetObjPosition[1] - realHeight + this.autoAttacheffsetY;
			break;
		case AUTOATTACH_TOP_LEFT:
			realX = targetObjPosition[0] + this.autoAttacheffsetX;
			realY = targetObjPosition[1] - realHeight + this.autoAttacheffsetY;
			break;
		case AUTOATTACH_TOP_CENTER:
			realX = parseInt(targetObjPosition[0] + (targetObjPosition[2] - realWidth)/2);
			realY = targetObjPosition[1] - realHeight - this.autoAttachOffsetY;
			break;
		case AUTOATTACH_TOP_RIGHT:
			realX = targetObjPosition[0] + targetObjPosition[2] - realWidth;
			realY = targetObjPosition[1] - realHeight - this.autoAttachOffsetY;
			break;
		case AUTOATTACH_TOP_FROMRIGHT:
			realX = targetObjPosition[0] + targetObjPosition[2] + this.autoAttacheffsetX;
			realY = targetObjPosition[1] - realHeight + this.autoAttacheffsetY;
			break;
		case AUTOATTACH_LEFT_TOP:
			realX = targetObjPosition[0] - realWidth - this.autoAttachOffsetX;
			realY = targetObjPosition[1] + this.autoAttachOffsetY;
			break;
		case AUTOATTACH_LEFT_CENTER:
			realX = targetObjPosition[0] - realWidth - this.autoAttachOffsetX;
			realY = parseInt(targetObjPosition[1] + (targetObjPosition[3] - realHeight)/2) + this.autoAttachOffsetY;
			break;
		case AUTOATTACH_LEFT_BOTTOM:
			realX = targetObjPosition[0] - realWidth - this.autoAttachOffsetX;
			realY = targetObjPosition[1] + targetObjPosition[3] - realHeight + this.autoAttachOffsetY;
			break;
		case AUTOATTACH_LEFT_ABOVE:
			realX = targetObjPosition[0] + targetObjPosition[2] + this.autoAttachOffsetX;
			realY = targetObjPosition[1] + targetObjPosition[3] - realHeight + this.autoAttachOffsetY;
			break;
		case AUTOATTACH_LEFT_BELOW:
			realX = targetObjPosition[0] + targetObjPosition[2] + this.autoAttachOffsetX;
			realY = targetObjPosition[1] + targetObjPosition[3] - realHeight + this.autoAttachOffsetY;
			break;
		case AUTOATTACH_BOTTOM_FROMLEFT:
			realX = targetObjPosition[0] - targetObjPosition[2] + this.autoAttachOffsetX;
			realY = targetObjPosition[1] + targetObjPosition[3] + this.autoAttachOffsetY;
			break;
		case AUTOATTACH_BOTTOM_LEFT:
			realX = targetObjPosition[0] + this.autoAttachOffsetX;
			realY = targetObjPosition[1] + targetObjPosition[3] + this.autoAttachOffsetY;
			break;
		case AUTOATTACH_BOTTOM_CENTER:
			realX = parseInt(targetObjPosition[0] + (targetObjPosition[2] - realWidth)/2) + this.autoAttachOffsetX;
			realY = targetObjPosition[1] + targetObjPosition[3] + this.autoAttachOffsetY;
			break;
		case AUTOATTACH_BOTTOM_RIGHT:
			realX = targetObjPosition[0] + targetObjPosition[2] - realWidth + this.autoAttachOffsetX;
			realY = targetObjPosition[1] + targetObjPosition[3] + this.autoAttachOffsetY;
			break;
		case AUTOATTACH_BOTTOM_FROMRIGHT:
			realX = targetObjPosition[0] + targetObjPosition[2] + this.autoAttachOffsetX;
			realY = targetObjPosition[1] + targetObjPosition[3] + this.autoAttachOffsetY;
			break;
		case AUTOATTACH_RIGHT_TOP:
			realX = targetObjPosition[0] + targetObjPosition[2] + this.autoAttachOffsetX;
			realY = targetObjPosition[1] + this.autoAttachOffsetY;
			break;
		case AUTOATTACH_RIGHT_CENTER:
			realX = targetObjPosition[0] + targetObjPosition[2] + this.autoAttachOffsetX;
			realY = parseInt(targetObjPosition[1] + (targetObjPosition[3] - realHeight)/2) + this.autoAttachOffsetY;
			break;
		case AUTOATTACH_RIGHT_BOTTOM:
			realX = targetObjPosition[0] + targetObjPosition[2] + this.autoAttachOffsetX;
			realY = targetObjPosition[1] + targetObjPosition[3] - realHeight + this.autoAttachOffsetY;
			break;
		case AUTOATTACH_RIGHT_ABOVE:
			realX= targetObjPosition[0] + targetObjPosition[2] + this.autoAttachOffsetX;
			realY = targetObjPosition[1] + targetObjPosition[3] - realHeight + this.autoAttachOffsetY;
			break;
		case AUTOATTACH_RIGHT_BELOW:
			realX = targetObjPosition[0] + targetObjPosition[2] + this.autoAttachOffsetX;
			realY = targetObjPosition[1] + targetObjPosition[3] + this.autoAttachOffsetY;
			break;
		}
		positionArray.push(realX, realY, realWidth, realHeight);
		return positionArray;
	}

	function rolloverButton(){
//trace("rnmc_stdCheckBox.rolloverButton()");
		if(this.objectEnabled){
			//	обработка callback'а
			if(this.rollOverCallBackFunction != null && this.rollOverCallBackObject != null)
				this.rollOverCallBackFunction.call(this.rollOverCallBackObject, this.id, this.state);
		}

	};

	function rolloutButton(){
//	trace("rnmc_stdCheckBox.rolloutButton()");
		if(this.objectEnabled){
			//	обработка callback'а
		if(this.rollOutCallBackFunction != null && this.rollOutCallBackObject != null)
				this.rollOutCallBackFunction.call(this.rollOutCallBackObject, this.id, this.state);
		}
	};

	function pressButton(){
//trace("rnmc_stdCheckBox.pressButton()");
		if(this.objectEnabled){
			//	обработка callback'а
			if(this.changeEvent == CHECKBOX_CHANGE_EVENT_PRESS){
				if(this.state == CHECKBOX_STATE_UNCHECKED){
					this.checkObject();
				} else if(this.state == CHECKBOX_STATE_CHECKED){
					this.uncheckObject();
				}
			}
			if(this.pressCallBackFunction != null && this.pressCallBackObject != null)
				this.pressCallBackFunction.call(this.pressCallBackObject, this.id, this.state);
			if(this.onPressActions){
				for(var i = 0; i < this.onPressActions.length; i++){
					parent.dispatchAction(this.onPressActions[i]);
				}
			}
		}
	};

	function releaseButton(){
//	trace("rnmc_stdCheckBox.releaseButton()");
		if(this.objectEnabled){
			if(this.changeEvent == CHECKBOX_CHANGE_EVENT_RELEASE){
				if(this.state == CHECKBOX_STATE_UNCHECKED){
					this.checkObject();
				} else if(this.state == CHECKBOX_STATE_CHECKED){
					this.uncheckObject();
				}
			}
			if(this.releaseCallBackFunction != null && this.releaseCallBackObject != null)
				this.releaseCallBackFunction.call(this.releaseCallBackObject, this.id, this.state);
			if(this.onReleaseActions){
				for(var i = 0; i < this.onReleaseActions.length; i++){
					parent.dispatchAction(this.onReleaseActions[i]);
				}
			}
		}	
	}

	//	=================================== CONDITIONS =====================================
	function getObjectProperty(objectId, propertyName){
		if(objectId != this.id)
			return null;
		switch(propertyName){
		case "visited":
			return this.visited;
			break;
		default:
			return null;
		}
	}

	function enableObject(){
		this.objectEnabled = true;
		this.updateView();
	}

	function disableObject(){
		this.objectEnabled = false;
		this.updateView();
	}

	function checkObject(){
		if(this.objectEnabled){
			this.state = CHECKBOX_STATE_CHECKED;
			this.updateView();
			if(this.onCheckActions){
				for(var i = 0; i < this.onCheckActions.length; i++){
					parent.dispatchAction(this.onCheckActions[i]);
				}
			}
		}
	}

	function uncheckObject(){
		if(this.objectEnabled){
			this.state = CHECKBOX_STATE_UNCHECKED;
			this.updateView();
			if(this.onUncheckActions){
				for(var i = 0; i < this.onUncheckActions.length; i++){
					parent.dispatchAction(this.onUncheckActions[i]);
				}
			}
		}
	}

// Установка функции обратного вызова на события
//	показ объекта
	function setShowCallBack(pointerToObject, callbackFunction){
		this.showCallBackObject = pointerToObject;
		this.showCallBackFunction = callbackFunction;
	};

//	Установка функции обратного вызова на события
//	убирания объекта (будет вызвана тогда когда все эффекты завершатся)
	function setHideCallBack(pointerToObject, callbackFunction){
		this.hideCallBackObject = pointerToObject;
		this.hideCallBackFunction = callbackFunction;
	};

]]></script>
</composition>
</rmml>