LC = function(targetDiv){
	//this.gameStatusPage = "gameStatus.php"
	this.gameAreaXStart = 187;
	this.gameAreaXEnd = 790;
	this.gameStatusPage = "fakeStatus.xml";
	this.name = targetDiv;
	if(!window.lcGames) window.lcGames = [];
	window.lcGames[this.name] = this;
	
	this.cardsInRack = 8;
	this.expeditions = ["earth", "jungle", "water", "ice", "sand"];
	this.colors = ["red", "green", "blue", "white", "yellow"];
	this.numExps = this.expeditions.length;
	
	// -1 is unknown, 0 is self, 1 is opponent
	this.gameStarted = false;
	this.playersTurn = -1;
	
	this.lcDiv = document.getElementById(targetDiv);
	if(!this.lcDiv){
		this.debug("The game space could not be found. When calling LC(), you must pass the ID of the div that you wish the application to appear in");
		return;
	}
	
	this.createBoard();
	this.setDeckCards(0);
	window.setInterval("window.lcGames['" + this.name + "'].checkStatus()", 5000);
};

LC.prototype.createBoard = function(){
	this.lcDiv.innerHTML="";
	this.lcDiv.className = "lc_Game";
	this.chatDiv = this.createElement("div","lc_Chat")
	this.lcDiv.appendChild(this.chatDiv);
	this.statusField = this.createElement("div","lc_GameStatus");
	this.lcDiv.appendChild(this.statusField);
	this.showStatusMessage("<b>Welcome to Lost Cities!</b>");
	this.mainBoard = this.createElement("div", "lc_MainBoard");
	this.lcDiv.appendChild(this.mainBoard);
	this.mainBoard.appendChild(this.createElement("div","lc_YourCards"));
	this.mainBoard.appendChild(this.createElement("div","lc_Discard"));
	for(var i = 0; i < this.numExps; i++){
		var discardSlot = this.createElement("div","lc_DiscardSlot");
		discardSlot.style.left = (25 + (i * 121)) + "px";
		discardSlot.style.backgroundColor = this.colors[i];
		this.mainBoard.appendChild(discardSlot);
		var yourExpSlot = this.createElement("div", "lc_YourExpeditionSlots");
		yourExpSlot.style.left = (5 + (i * 121)) + "px";
		yourExpSlot.style.backgroundColor = this.colors[i];
		this.mainBoard.appendChild(yourExpSlot);
		var oppExpSlot = this.createElement("div", "lc_OppExpeditionSlots");
		oppExpSlot.style.left = (5 + (i * 121)) + "px";
		oppExpSlot.style.backgroundColor = this.colors[i];
		this.mainBoard.appendChild(oppExpSlot);
		var yourExpSlotScore = this.createElement("div", "lc_YourExpSlotScore");
		yourExpSlotScore.innerHTML = "2 Cards<br/>-60 points";
		yourExpSlotScore.style.left = (5 + (i * 121)) + "px";
		this.mainBoard.appendChild(yourExpSlotScore);
		var oppExpSlotScore = this.createElement("div", "lc_OppExpSlotScore");
		oppExpSlotScore.innerHTML = "2 Cards<br/>-60 points";
		oppExpSlotScore.style.left = (5 + (i * 121)) + "px";
		this.mainBoard.appendChild(oppExpSlotScore);
	}
	
	
	this.leftSide = this.createElement("div","lc_LeftSide");
	this.lcDiv.appendChild(this.leftSide);
	
	this.opp = new LC_PLAYER(this, "Waiting...", 0, 0, "opponent");

	this.you = new LC_PLAYER(this, "Waiting...", 0, 0, "player");
	
	this.hand = new LC_HAND(this);
	
	this.cardDeck = this.createElement("div", "lc_CardDeck");
	this.leftSide.appendChild(this.cardDeck);
	
	this.initChat();
	
};


LC.prototype.initChat = function(){
	this.chat = new LC_CHAT(this);
};

LC.prototype.setDeckCards = function(cards){
	if(cards == 0){
		this.cardDeck.style.backgroundColor = "#C96";
		this.cardDeck.style.color = "#000";
	}
	else{
		this.cardDeck.style.backgroundColor = "#669";
		this.cardDeck.style.color = "#FFF";
	}
	this.cardDeck.innerHTML = "<br/>Cards Left<br/><b>" + cards + "</b>";
	this.cardsLeft = cards;
};

LC.prototype.showStatusMessage = function(msg){
	if(!this.lastStatusMessage || this.lastStatusMessage != msg){
		this.lastStatusMessage = msg;
		this.statusField.innerHTML += "<p>" + msg + "</p>";
		this.statusField.scrollTop = this.statusField.scrollHeight;
	}
};

LC.prototype.debug = function(txt){
	this.showStatusMessage("<font color=\"green\">" + txt + "</font>");
};



LC.prototype.createElement = function(type, className, id){
	var el = document.createElement(type);
	if(className) el.className = className;
	if(id) el.id = id;
	return el;
};

LC.prototype.checkStatus = function(){
	this.statusChecker = this.makeXHR();
	this.sendQuery(this.statusChecker, this.gameStatusPage + "?chatLastId=" + this.chat.lastId, "window.lcGames['" + this.name + "'].processStatus()");
	
};

LC.prototype.processStatus = function(){
	if(!this.isXHRReady(this.statusChecker)) return;
	var status = this.statusChecker.responseXML.documentElement;
	this.processGame(status.getElementsByTagName('game').item(0));
	this.chat.processChatUpdate(status.getElementsByTagName('chat').item(0));
};

LC.prototype.processGame = function(game){
	var status = game.getAttribute("status");
	this.opp.processUpdate(game.getElementsByTagName('opp').item(0));
	this.you.processUpdate(game.getElementsByTagName('you').item(0));
	this.setDeckCards(game.getElementsByTagName('cards').item(0).getAttribute("deckSize"));
	switch(status){
		case "waiting":
			break;
		case "inprogress":
			if(this.gameStarted == false) this.beginGame();
			this.setTurn(game.getElementsByTagName('turn').item(0).getAttribute('who'));
			this.hand.process(game.getElementsByTagName('hand').item(0));
			break;
	}
			
			
};
	



LC.prototype.beginGame = function(){
	this.gameStarted = true;
	this.showStatusMessage("The game begins!");

};

LC.prototype.beginPlayerTurn = function(){

};

LC.prototype.endPlayerTurn = function(){

};

LC.prototype.setTurn = function(who){
	if(who != this.playersTurn){
		this.playersTurn = who;
		if(this.playersTurn == 0){
			this.opp.gainTurnPossession();
			this.you.loseTurnPossession();
		}
		else if(this.playersTurn == 1){
			this.you.gainTurnPossession();
			this.opp.loseTurnPossession();		
		}
	}

};



LC.prototype.makeXHR = function(){
	try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) {}
	try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {}
	try { return new XMLHttpRequest(); } catch(e) {}
	alert("XMLHttpRequest not supported");
	return null;
};

LC.prototype.sendQuery = function(xhr, url, receiver){
	// Ugh. Eval. Trying to get everything working in IE and FF. IE is complaining about types.
	xhr.onreadystatechange = function(){ eval(receiver) };
	//alert(typeof url);
	xhr.open("GET", url, true);
	xhr.send(null);	
};

LC.prototype.sendPostQuery = function(xhr, url, receiver, data){
	xhr.onreadystatechange = function(){ eval(receiver) };
	xhr.open("POST", url, true);
	var params = null;
	for(key in data){
		if(params == null) params = key + "=" + escape(data[key]);
		else params += "&" + key + "=" + escape(data[key]);
	}
	xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	xhr.send(params);	
};

LC.prototype.isXHRReady = function(xhr){
	//this.showStatusMessage(xhr.readyState + " " + xhr.status);
	// status is 0 when running locally as a file
	try{return (xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0));}
	// accessing xhr attributes can cause problems sometimes.
	catch(E){return false;}
};

//returns where on the page the person clicked
LC.prototype.getClientX = function(event){
	return event.clientX
};

        
LC.prototype.getClientY = function(event){
	return event.clientY;
};
        
        //gets where on the card the person clicked
LC.prototype.getLayerX = function(event){
	return event.layerX;
};
        
LC.prototype.getLayerY = function(event){
	return event.layerY;
};

	
LC.prototype.getSection = function(x, y){
	if(x < this.gameAreaXStart || x > this.gameAreaXEnd) return false;
	if(y >= 159 && y <= 237) return "discard";
	if(y >= 238 && y <= 387) return "expeditions";
	if(y >= 388 && y <= 470) return "rack";
	return false;

}	
	
	




LC_PLAYER = function(game, name, score, totalscore, type){
	if(parent) this.game = game;
	else this.debug("Error initializing player: " + name);
	this.div = this.game.createElement("div", "lc_PlayerSlot");
	this.type = type;
	if(type == "player"){
		this.div.style.top = "312px";
		this.playerColor = "blue";
	}
	else if(type == "opponent"){
		this.div.style.top = "5px";
		this.playerColor = "red";
	}
	this.nameDiv = this.game.createElement("div", "lc_PlayerName");
	this.div.appendChild(this.nameDiv);
	this.roundScoreDiv = this.game.createElement("div", "lc_PlayerRoundScore");
	this.div.appendChild(this.roundScoreDiv);
	this.totalScoreDiv = this.game.createElement("div", "lc_PlayerTotalScore");
	this.div.appendChild(this.totalScoreDiv);
	this.setName(name);
	this.setRoundScore(score);
	this.setTotalScore(totalscore);
	this.game.leftSide.appendChild(this.div);
};

LC_PLAYER.prototype.setName = function(name){
	if(this.name != name && name != "Waiting..."){
		this.game.showStatusMessage("<font color=\"" + this.playerColor + "\">" + name + "</font> joins the game.");
	}
	this.name = name;
	this.nameDiv.innerHTML = name;
};

LC_PLAYER.prototype.setRoundScore = function(score){
	this.roundScore = score;
	this.roundScoreDiv.innerHTML = "Round Score: " + score;
};

LC_PLAYER.prototype.setTotalScore = function(score){
	this.totalScore = score;
	this.totalScoreDiv.innerHTML = "Total Score: " + score;
};

LC_PLAYER.prototype.processUpdate = function(update){
	if((update.hasAttribute && update.hasAttribute("name")) || (update.getAttribute("name") != null)) this.setName(update.getAttribute("name"));
	if((update.hasAttribute && update.hasAttribute("roundscore")) || (update.getAttribute("roundscore") != null)) this.setRoundScore(update.getAttribute("roundscore"));
	if((update.hasAttribute && update.hasAttribute("totalscore")) || (update.getAttribute("totalscore") != null)) this.setTotalScore(update.getAttribute("totalscore"));	
};

LC_PLAYER.prototype.gainTurnPossession = function(){
	this.div.style.backgroundColor = "#CCF";
	this.game.showStatusMessage("It's <font color=\"" + this.playerColor + "\">" + this.name + "</font>'s turn");
};

LC_PLAYER.prototype.loseTurnPossession = function(){
	this.div.style.backgroundColor = null;
};

LC_HAND = function(game){
	this.game = game;
	this.cards = [];
	this.cardSize = 75;
	for(var i = 0; i < this.game.cardsInRack; i++){
		var cardSlot = this.game.createElement("div","lc_CardSlot");
		cardSlot.style.left = (5 + (i * this.cardSize)) + "px";
		this.game.mainBoard.appendChild(cardSlot);
	}
}

LC_HAND.prototype.process = function(hand){
	this.setHand(hand.getAttribute('cards'));
};

LC_HAND.prototype.setHand = function(hand){
	var cards = hand.divide(2);
	for(var x = 0; x < cards.length; x++){
		if(!this.hasCard(cards[x])){
			this.addCard(cards[x]);
		}
	}
};

LC_HAND.prototype.addCard = function(cardStr){
	var slot = this.availableSlot();
	if(slot == -1) return;
	this.sendCardToSlot(new LC_CARD(this.game, cardStr, slot), slot);
};

LC_HAND.prototype.sendCardToSlot = function(card, slot){
	this.cards[slot] = card;
	card.moveCard(this.getXCoordFromSlot(slot), 397);
	card.resize(this.cardSize-5, this.cardSize-5);
}
	
	
LC_HAND.prototype.availableSlot = function(){
	for(var x = 0; x < this.game.cardsInRack; x++){
		if(this.cards[x] == null) return x;
	}
	return -1;
};

LC_HAND.prototype.hasCard = function(cardStr){
	for(var x = 0; x < this.game.cardsInRack; x++){
		if(this.cards[x] && this.cards[x].matches(cardStr)) return true;
	}
	return false;
};

LC_HAND.prototype.getSlotFromCoords = function(x, y){
	if(this.game.getSection(x,y) != "rack") return false;
	return Math.floor((x - 5 - this.game.gameAreaXStart) / this.cardSize);
};

LC_HAND.prototype.getXCoordFromSlot = function(slot){
	if(slot !== false) return this.game.gameAreaXStart + 5 + (slot * this.cardSize);
	return false;
};


LC_CARD = function(game, str, slot){
	var cardValues = ['2','3','4','5','6','7','8','9','10','x','x','x'];
	this.game = game;
	this.str = str;
	this.slot = slot;
	this.color = this.str.charAt(0);
	this.value = cardValues[parseInt('0x' + this.str.charAt(1))];	
	this.cardDiv = this.game.createElement("div", "lc_Card");
	this.cardDiv.style.backgroundColor = this.game.colors[this.color];
	var cardExpedition = this.game.createElement("div", "lc_CardExpedition");
	cardExpedition.innerHTML = this.game.expeditions[this.color];
	this.cardDiv.appendChild(cardExpedition);
	var cardValue = this.game.createElement("div", "lc_CardValue");
	cardValue.innerHTML = this.value;
	this.cardDiv.appendChild(cardValue);
	this.cardDiv.ownerCard = this;
	this.game.lcDiv.appendChild(this.cardDiv);
	this.setY(168);
	this.setX(23);
	this.cardDiv.onmousedown = this.dragCardHandler;
};

LC_CARD.prototype.matches = function(str){
	return this.str == str;
};

LC_CARD.prototype.setX = function(x){
	if(x < 0) x = 0;
	this.x = x;
	this.cardDiv.style.left = this.x + "px";
};

LC_CARD.prototype.setY = function(y){
	if(y < 0) y = 0;
	this.y = y;
	this.cardDiv.style.top = this.y + "px";
};


//I created these handlers because the definition of 'this' and the difference in event handling between browsers can cause confusion.
LC_CARD.prototype.dragCardHandler = function(evt){
	var e;
	if(evt) e = evt;
	else e = event;
	this.ownerCard.dragCard(e);
};


LC_CARD.prototype.dragCard = function(event){
	this.game.showStatusMessage("woo woo");
	this.xSave = this.x;
	this.ySave = this.y;
	this.offsetX = this.game.getLayerX(event);
	this.offsetY = this.game.getLayerY(event);
         
	var zindexSave = this.cardDiv.style.zIndex; 
   
	this.cardDiv.style.zIndex = 99;

	if(this.cardDiv.addEventListener){
		this.cardDiv.addEventListener("mousemove", this.moveCardHandler, true);
		this.cardDiv.addEventListener("mouseup", this.dropCardHandler, true);
	}
	else{
		this.cardDiv.attachEvent("onmousemove", this.moveCardHandler);
		this.cardDiv.attachEvent("onmouseup", this.dropCardHandler);
	}
	event.stopPropagation();
	
	
};

LC_CARD.prototype.moveCardHandler = function(evt){
	var e;
	if(evt) e = evt;
	else e = event;
	this.ownerCard.moveCardEvent(e);
	e.stopPropagation();
};

LC_CARD.prototype.moveCardEvent = function(event){
	this.moveCard(this.game.getClientX(event) - this.offsetX, this.game.getClientY(event) - this.offsetY);
};

LC_CARD.prototype.moveCard = function(x, y) {
	this.game.showStatusMessage("go!");
	this.setX(x);
	this.setY(y);       
};

LC_CARD.prototype.dropCardHandler = function(evt){
	var e;
	if(evt) e = evt;
	else e = event;
	this.ownerCard.dropCard(e);
};
        

LC_CARD.prototype.dropCard = function(event) {
	this.game.showStatusMessage("dropped here: " + this.game.hand.getSlotFromCoords(this.game.getClientX(event), this.game.getClientY(event)));
	
	if(this.cardDiv.addEventListener){
		this.cardDiv.removeEventListener("mouseup", this.dropCardHandler, true);
		this.cardDiv.removeEventListener("mousemove", this.moveCardHandler, true);
	}
	else{
		this.cardDiv.detachEvent("onmousemove", this.moveCardHandler);
		this.cardDiv.detachEvent("onmouseup", this.dropCardHandler);
	}
	//snapCard((getClientX(event)), getClientY(event));
	this.cardDiv.style.zIndex = 5;
	event.stopPropagation();
};

LC_CARD.prototype.resize = function(width, height) {
	this.setWidth(width);
	this.setHeight(height);
};

LC_CARD.prototype.setWidth = function(width){
	this.width = width;
	this.cardDiv.style.width = width + "px";
};

LC_CARD.prototype.setHeight = function(height){
	this.height = height;
	this.cardDiv.style.height = height + "px";
}

	
	
	
	
/*


	
	// If moving card from cards to cards, move displaced to first free index in cards
	// If moving card from discard, move displaced card to first free index in cards
	// If moving card from registers to registers, move displaced card to first free index in registers
	// if moving card from cards to registers, move displaced card to first free index in cards
	function snapCard(x, y){
		var cl = getCardDropLocation(x, y);
		var displacedCardIndex = getCardDropIndex(cl.x, cl.y);
		
		var originalCardPosition = getCardDropIndex(xSave, ySave);
		//doAnimation(card.id, cl.x, cl.y, card.style.zIndex, card.image, 10, 10);
		if(originalCardPosition.column == "cards"){
			if(displacedCardIndex.column == "cards"){
				if(displacedCardIndex.index != originalCardPosition.index){
					if(cardOrder[displacedCardIndex.index] != null){
						var ffi = arrayFirstFreeIndex(cardOrder);
						if(ffi < originalCardPosition.index){
							var tempCard = makeCardIndex("cards", ffi);
							swapCards(cardOrder, displacedCardIndex, cardOrder, tempCard);
						}
					}
				}
				swapCards(cardOrder, displacedCardIndex, cardOrder, originalCardPosition);
			}
			else{
				if(registerOrder[displacedCardIndex.index] != null){
					var ffi = arrayFirstFreeIndex(cardOrder);
					if(ffi < originalCardPosition.index){
						var tempCard = makeCardIndex("cards", ffi);
						swapCards(registerOrder, displacedCardIndex, cardOrder, tempCard);
					}
				}
				swapCards(registerOrder, displacedCardIndex, cardOrder, originalCardPosition);
			}
		}
		else{
			if(displacedCardIndex.column == "cards"){
				if(cardOrder[displacedCardIndex.index] != null){
					var tempCard = makeCardIndex("cards", arrayFirstFreeIndex(cardOrder));
					swapCards(cardOrder, displacedCardIndex, cardOrder, tempCard);
				}
				swapCards(cardOrder, displacedCardIndex, registerOrder, originalCardPosition);				
			}
			else{
				if(displacedCardIndex.index != originalCardPosition.index){
					if(registerOrder[displacedCardIndex.index] != null){
						var ffi = arrayFirstFreeIndex(registerOrder);
						if(ffi < originalCardPosition.index){
							var tempCard = makeCardIndex("registers", ffi);
							swapCards(registerOrder, displacedCardIndex, registerOrder, tempCard);
						}
					}
				}
				swapCards(registerOrder, displacedCardIndex, registerOrder, originalCardPosition);
			}
		}
	}
	
	function getSection(x, y){
		if(x < 187 || x > 790) return false;
		if(y >= 159 && y <= 237) return "discard";
		if(y >= 238 && y <= 387) return "expeditions";
		if(y >= 388 && y <= 470) return "rack";
		return false;
	}
	
	
	
	function getCardDropLocation(x,y){
		var cdi = getCardDropIndex(x,y);
		var cardLocation = new Object();
		if(cdi.column == null){
			cardLocation.x = xSave;
			cardLocation.y = ySave;
			return cardLocation;
		}
		else{
			cardLocation.x = getCardXByColumn(cdi.column);
		}
		cardLocation.y = getCardYByIndex(cdi.index);
		return cardLocation;
	}
	
	function getCardDropIndex(x,y){
		cardInfo = new Object();
		var index = Math.floor((y-cardOffsetY)/cardHeight);
		if(x >= cardOffsetX && x <= cardOffsetX + cardWidth){
			if(index >= 0 && index < card_count){
				cardInfo = makeCardIndex("cards", index);
			}
		}
		else if(x >= registerOffsetX && x <= registerOffsetX + cardWidth){
			if(index >= 0 && index < register_count){
				cardInfo = makeCardIndex("registers", index);
			}
		}
		return cardInfo;
	}
		
};
*/

LC_CARD.prototype.animateToPosition = function(goalX, goalY, goalWidth, goalHeight, zIndex){


}; 
	

LC_CHAT = function(game){
	this.game = game;
	this.sendChatPage = "chatSendComment.php";
	this.lastId = 0;
	this.chatSender = this.game.makeXHR();
	this.game.chatDiv.innerHTML += "<div class=\"lc_ChatBox\"></div>"
		+ "<input type=\"text\" maxlength=\"300\" class=\"lc_ChatInput\" onKeyDown=\"return window.lcGames['" + this.game.name + "'].chat.messageKeyDown(event);\"/>"
		+ "<input type=\"button\" onClick=\"window.lcGames['" + this.game.name + "'].chat.sendComment()\" value=\"Send\" CLASS=\"lc_ChatBtn\"/>";
	//Messing with innerHTML causes the pointers to lose track of where they are
	this.chatBox = this.game.chatDiv.firstChild;
	this.chatMessage = this.chatBox.nextSibling;
	this.chatBtn = this.chatMessage.nextSibling;
};

// borrowed from http://www.webreference.com/programming/java_dhtml/chap8/2/
LC_CHAT.prototype.messageKeyDown = function(evt) {
	evt = (evt) ? evt : event;
	var charCode = (evt.charCode) ? evt.charCode : ((evt.which) ? evt.which : evt.keyCode);
	if (charCode == 13 || charCode == 3) {
		this.sendComment();
		return false;
	} else {
		return true;
	}
};

// Sends the comment to the server
LC_CHAT.prototype.sendComment = function(){
	if(this.chatMessage.value != ""){
		this.disableChat();
		this.game.sendPostQuery(this.chatSender, this.sendChatPage, "window.lcGames['" + this.game.name + "'].chat.commentSent()", {"msg" : this.chatMessage.value});
	}
};

// After the comment is sent, re-enables the chat boxes.
LC_CHAT.prototype.commentSent = function(){
	if(this.game.isXHRReady(this.chatSender)){
		this.enableChat();
		this.chatMessage.value = "";
		this.chatMessage.focus();
	}
};

LC_CHAT.prototype.enableChat = function(){
	this.chatMessage.disabled = false;
	this.chatBtn.disabled = false;
	this.chatMessage.className = "lc_ChatInput";
	this.chatBtn.className = "lc_ChatBtn";
};

LC_CHAT.prototype.disableChat = function(){
	this.chatMessage.disabled = true;
	this.chatBtn.disabled = true;
	this.chatMessage.className = "lc_ChatInput lc_Disabled";
	this.chatBtn.className = "lc_ChatBtn lc_Disabled";
};

LC_CHAT.prototype.processChatUpdate = function(update){
	if(update.getAttribute("lastId") != "")this.lastId = update.getAttribute("lastId");
	newPosts = update.getElementsByTagName('msg');
	for(var i = 0; i < newPosts.length; i++){
		this.postMessage(newPosts[i].getAttribute('name'), newPosts[i].firstChild.data);
	}
	if(newPosts.length > 0) this.chatBox.scrollTop = this.chatBox.scrollHeight;
};

LC_CHAT.prototype.postMessage = function(name, message){
	var className;
	if(name == "Guest") className="lc_ChatGuest";
	else if(name == this.game.you.name) className = "lc_ChatPlayerName";
	else className = "lc_ChatOppName";
	this.chatBox.innerHTML += "<span class=\"" + className + "\">" + name + ":</SPAN>&nbsp;&nbsp;&nbsp;<span>" + message + "</span><br/>";
};

//divides a string into an array of substrings, each with the passed length
String.prototype.divide = function(length){
	if(length <= 0) return;
	var arr = [];
	for(var x = 0; x * length < this.length; x++){
		arr[arr.length] = this.substring(x*length, Math.min((x+1)*length, this.length));
	}
	return arr;
		
};


