// ------- nadrazena trida dialogu -------
function photoDialog(iIdentify) {
	this.commandName = ""; // prikaz executoru
	this.additionalParams = ""; // dodatecne parametry
	this.beforeState = ""; // predchozi stav dialogu
	this.identify = iIdentify; // identifikator
	this.finishFlag = false;
	this.dialogMod = "default";
	this.hideFunction = null; // funkce pro schovani dialogu
	
	this.composeCommand = function() {
		var composeStr = "";
		var f;
		
		composeStr = this.commandName + "("
		if (this.additionalParams != "") composeStr += this.additionalParams;
		if (dialogs.collection.length > 0) {
			if (this.additionalParams != "") composeStr += ",";
		
			for (f = 0; f < dialogs.collection.length; f++) {
				if (f != 0) composeStr += ",";
				composeStr += dialogs.collection[f].photo_ID;
			}
		}
		composeStr += ")";
		return composeStr;
	}
	
	this.setState = function(stateValue) {
		if (this.beforeState != "")
			document.getElementById(this.identify + this.beforeState).style.display = "none";
		
		document.getElementById(this.identify + stateValue).style.display = "block";
		this.beforeState = stateValue;
	}
	
	this.execCmd = function(cmd) {
		exec.make(cmd, this);
		this.finishFlag = true;
	}
	
	this.execCmdPost = function(cmd) {
        exec.makePost(cmd, this);
        this.finishFlag = true;
    }
	
	// -------- virtualni metody ---------
	this.inicialize = function() {
		// virtual
	}
	
	this.execute = function() {
		// virtual
	}
	
	this.finish = function(success) {
		// virtual
	}
	
	this.finishQuiet = function(success) {
		// virtual
	}

	this.updateSelection = function(iRef) {
		// virtual
	}

	this.selectAlbum = function(albumID, title) {
		// virtual
	}
}

