/***********************************************************************
 *
 * Klasa {@link CMS} .  eQUEST Library, http://www.equest.pl
 * 
 * @copyright (C) 2001-2006 by DBX Sp. z o.o. All rights reserved.
 *            ul. Marczukowska 6 p.203, 15-724 Bialystok, POLAND.
 *            http://www.dbx.pl  e-mail: biuro@dbx.pl
 *
 * @license This product is commercial use only. You can`t redistribute
 *          it and/or modify without permission. Before the code can be
 *          downloaded or installed or used you must read and agree to
 *          the terms of eQUEST software license: 
 *
 * @author Robert Borys <robert@dbx.pl>
 *
 * @category eQUEST cms
 * @package CmsCommon
 *
 ***********************************************************************/

/**
 * Klasa operujaca na danych CMS-a
 */
function CMS() {

	/**
	 * Inicjalizacja klasy
	 */
	this.initialize = function() {
		this.phpIndex = "";	// adres do pliku cms/index.php
		this.site = "";		// skrot biezacej witryny
		this.page = "";		// skrot biezacej strony
		this.fullPage = "";	// pelny skrot do biezacej strony (witryna+strona)
		
		this.skin = "";		// nazwa glownej skorki (zerowej ze skins)
		this.skins = null;	// tablica nazw skorek uzytych na stronie
							// posortowana wg. waznosci - najwazniejsza na
							// wierzchu
		
		this.skinsPath = "";		// webowa sciezka do katalogu skins
		this.jsPath = "";			// webowa sciezka do katalogu js
		this.pagesPath = "";		// webowa sciezka do katalogu pages
		this.componentsPath = "";	// webowa sciezka do katalogu components
		this.websitePath = "";		// webowa sciezka do katalogu website
		
		this.coreSkinsPath = "";	// sciezka do skinka equesta
	}
	
	/**
	 * Na podstawie sciezki glownej do cms-a, ustawia pozostale
	 */
	this.setWebsitePaths = function(websitePath) {
		this.websitePath = websitePath;
		this.componentsPath = websitePath + "/components";
		this.pagesPath = websitePath + "/pages";
		this.jsPath = websitePath + "/js";
		this.skinsPath = websitePath + "/skins";
	}
	
	this.initialize();
}


var cms = new CMS();
