function NodeObjectCollection(){
	this.node = getXMLDocument().createElement("nodeObjectCollection");
	
	//Functions
	this.getSize = function(){
		try{
			for(var i=0; i <this.node.attributes.length; i++){
				if(this.node.attributes[i].nodeName == "count")
					return parseInt(this.node.attributes[i].nodeValue);
			}
		}catch(exc){}
		return 0;
	}
	
	this.toArray = function(){
		var arr = new Array();
		for(var i =0; i < this.getSize(); i++){
			arr[i] = this.getAt(i);
		}
		return arr;
	}


	this.getAt = function(num){
		var children = this.node.childNodes;
		if( num < 0 || num >= children.length)
			return null;
		var itt = 0;
		for(var i=0; i < children.length; i++){
			if(itt ==  num){
				return new NodeObject(children[i]);
			}
			else if(children[i].nodeName == "nodeObject"){
				itt++;
			}
		}
		return null;
	}

	this.add = function(item){
		this.node.appendChild(item.getNode());
	}

	this.loadFromXML = function(node){
		this.node = node;
	}
	
	this.getNode = function(){
		return this.node;
	}
}