//                         Stuff should only go into this file IF and ONLY IF it cannot be filtered down to a controller-specific JS file.

//=========================================================================================================================================================
// Setup Functions - init() function and setup functions for each chunk of functionality ==================================================================

document.observe('dom:loaded', function(){talents_init()});

function talents_init() {          // This function should exist (with sensible namespacing) in each file, and be added to Window.onload using the Prototype helper 
	// Call setup functions here

}

//=========================================================================================================================================================
// Functional Functions - Functions that do stuff, interact with the DOM, etc =============================================================================

var counter = 1; //UNIVERSAL CONSTANTS FTW! USE THIS WHERE POSSIBLE
function add_another_image() {
	counter += 1;
	try {
		$('add_image_' + counter).style.display = "";
	} catch(err) {
		$('add_another').innerHTML = "You have reached your limit of photos"
	}	
}

function add_another_attachment() {
	counter += 1;
	try {
		$('add_attachment_' + counter).style.display = "";
	} catch(err) {
		$('add_another_attachment').innerHTML = "You have reached your limit of attachments"
	}	
}

function view_image_large(id) {
	if (!window.focus) 
             return true;

	window.open('/talent/profile_view/view_image?image_id=' + id, 'viewImage', 'left=20,top=20,width=450,height=550,toolbar=0,menubar=0');
	
	return false;
}

function change_dashboard_profile(el) {
	Element.extend(el);
    var form = el.up();

    form.submit();
}

//=========================================================================================================================================================
// Process Functions - these functions process data and return values, but do not edit or interact with the DOM in any way ================================



//=========================================================================================================================================================
// Socket Functions - These functions are called by RJS templates, used when they get bulky and writing a socket becomes more elegant =====================






