function cardControl()
{
	this.updateCardPhoto = updateCardPhoto;
		var myPhotoHolder = this.control.content.findName("card_photo_CM"+this.id);
		this.card_photo_anim_intro = SeasonCards.control.content.findName("animCardOpenIntro_CM"+this.id);
		this.card_photo_anim_complete = card_photo_anim_complete;
		this.card_photo_anim_intro.addEventListener("Completed", preserveScope(this, card_photo_anim_complete));
	myPhotoHolder.source = this.params;
}

function updateCardPhoto(photo){
	
	var myPhotoHolder = this.control.content.findName("card_photo_CM"+this.id);
		
	this.card_photo_anim = SeasonCards.control.content.findName("animCardOpen_CM"+this.id);
	this.card_photo_anim_intro = SeasonCards.control.content.findName("animCardOpenIntro_CM"+this.id);
	
	this.card_photo_anim_complete = card_photo_anim_complete;
	
	this.card_photo_anim.addEventListener("Completed", preserveScope(this, card_photo_anim_complete));
	this.card_photo_anim_intro.addEventListener("Completed", preserveScope(this, card_photo_anim_complete));
	
	document.getElementById("card_message").style.visibility = "hidden";
	this.card_photo_anim.begin();
	myPhotoHolder.source = photo;
}

function card_photo_anim_complete(){
	//alert("this");
	if(!SeasonCards.cardLocked){
		document.getElementById("card_message").style.visibility = "visible";
	}
}