function sourceControl(control)
{
    this.control = control;
    this.button_source_back = this.control.content.findName("button_source_back");
    
    this.button_flickr = this.control.content.findName("btn_flickr");
	this.button_spaces = this.control.content.findName("btn_spaces");
    this.dialogue_flickr_username = this.control.content.findName("dialogue_flickr_username");
    this.dialogue_spaces = this.control.content.findName("dialogue_spaces");
    
	//Functions
    this.button_flickr_Press = button_flickr_Press;
	this.button_spaces_Press = button_spaces_Press;
    
    //Set Cursor
	this.button_flickr.cursor = "Hand";
	this.button_spaces.cursor = "Hand";
    
	this.button_flickr.addEventListener("mouseLeftButtonDown", preserveScope(this, button_flickr_Press));
	this.button_spaces.addEventListener("mouseLeftButtonDown", preserveScope(this, button_spaces_Press));
	
}
function button_flickr_Press()
{
	SeasonCards.changeDialogue("", 0);
	SeasonCards.storyboards.username_in.begin();
    SeasonCards.cardItems.photoSource = 'flickr';
	SeasonCards.changeDialogue("dialogue_flickr_username", 1);
	
	document.getElementById("flickr_username_input").style.visibility = "visible";
	document.getElementById("flickr_username_input").focus();
	
}
function button_spaces_Press()
{
		SeasonCards.changeDialogue("", 0);
    SeasonCards.cardItems.photoSource = 'spaces';
	SeasonCards.storyboards.spaces_in.begin();
	SeasonCards.changeDialogue("dialogue_spaces", 1);
	document.getElementById("displaySpaces").style.visibility = "visible";
	document.getElementById("displaySpaces").style.top = '88px';
	document.getElementById("flickr_username_input").style.visibility = "hidden";
	
}


