////////////////////////////////////////////////////////////////////////////////
// (c) 2004 by LINee multimediaagency - www.linee.it - info@linee.it
// All rights reserved.
//
// License
// =======
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// The origin of this software must not be misrepresented; you must not
// claim that you wrote the original software. If you use this software in
// a product, an acknowledgment in the product documentation would be
// appreciated but is not required.
//
// The copyright notice must not be modified or removed from any of the
// source code.  If the source is reorganised into different files
// then the copyright notice must be included in each file that contains
// some or all of the original source.
//
// Redistributions of source code must retain all copyright notices in the
// source and must be accompanied by this license.
//
// Altered source versions must be plainly marked as such, and must not be
// misrepresented as being the original software.
//
// Neither the name of LINee multimediaagency nor the names of its contributors
// may be used to endorse or promote products derived from this software without
// specific prior written permission.

// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
// OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
// OF THE POSSIBILITY OF SUCH DAMAGE. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN
// ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY ORIGINAL CODE IS AUTHORIZED
// HERE UNDER EXCEPT UNDER THIS DISCLAIMER.
// =======
//
// this code is an the intellectual property of LINee multimediaagency (c)2004
// All rights reserved.
////////////////////////////////////////////////////////////////////////////////

/*

interfaccia per la definizione degli elementi da utilizzare

*/

_DOCUMENT_TITLE = document.title;

_menu_bar = document.getElementById('menu_bar');
_menu = document.getElementById('menu_1');
_submenu = document.getElementById('menu_2');
_foto_part = document.getElementById('foto_part');
_foto = document.getElementById('foto');
_foto_default = document.getElementById('foto-0');
_area_testo = document.getElementById('areatesto');
_langSelector = document.getElementById('langSelector');
_areamenufoto = document.getElementById('areamenufoto');
_area_foto_part = document.getElementById('area_foto_part');
_area_foto = document.getElementById('area_foto');

// solo nell'editor
_formedit = document.getElementById('formedit');
_filename = document.getElementById('filename');
_filenameaction = document.getElementById('filenameaction');
_submenuEditor = document.getElementById('submenu');
_menuEditor = document.getElementById('menu');
_submenutext = document.getElementById('submenutext');
_menutext = document.getElementById('menutext');
_langSelectorEditor = document.getElementById('langSelectorEditor');

current_editing_text = '';
current_menu_editor_text = '';
current_submenu_editor_text = '';

_currentmenu = 'undefined';

/* media image extension*/

//mediaext = '.jpg';
//mediaext = '.gif';
//mediaext = '.png';
mediaext = '.swf';

/* struttura menu */

ita = 0;
eng = 1;
langtext = 2;

current_lang = eng;

menu_item_1 = 0;
menu_item_2 = 1;
menu_item_3 = 2;
menu_item_4 = 3;

sotto_menu_1 = 0;
sotto_menu_2 = 1;
sotto_menu_3 = 2;

nomenu = 'undefined';
slash = '/'

current_menu = menu_item_1;
current_submenu = nomenu;

current_menu_editor = menu_item_1;
current_submenu_editor = nomenu;

nolang = -1;

MENULANG = new Array();
    MENULANG[ita] = new Array();
        MENULANG[ita][ita] = '&nbsp;italiano';
        MENULANG[ita][eng] = '&nbsp;english';
        MENULANG[ita][langtext] = '<a href=mailto:info@lafratta.it> &nbsp;contatti </a> &nbsp;&nbsp;&nbsp; Selezione lingua: &nbsp;';
    MENULANG[eng] = new Array();
        MENULANG[eng][ita] = '&nbsp;italiano';
        MENULANG[eng][eng] = '&nbsp;english';
        MENULANG[eng][langtext] = '<a href=mailto:info@lafratta.it> &nbsp;contact </a> &nbsp;&nbsp;&nbsp; Select language: &nbsp;';


MENU = new Array();

MENU[menu_item_1] = new Array();
    MENU[menu_item_1][ita]='la fratta';
    MENU[menu_item_1][eng]='la fratta';

MENU[menu_item_2] = new Array();
    MENU[menu_item_2][ita]='alloggi';
    MENU[menu_item_2][eng]='bed&amp;breakfast';

MENU[menu_item_3] = new Array();
    MENU[menu_item_3][ita]='corsi';
    MENU[menu_item_3][eng]='stages';

MENU[menu_item_4] = new Array();
   // MENU[menu_item_4][ita]='esposizioni';
    MENU[menu_item_4][ita]='l&#39;artista'
   // MENU[menu_item_4][eng]='show room';
    MENU[menu_item_4][eng]='the artist';


SUBMENU = new Array();

SUBMENU[menu_item_1] = new Array();
    SUBMENU[menu_item_1][sotto_menu_1] = new Array();
            SUBMENU[menu_item_1][sotto_menu_1][ita]='chi siamo';
            SUBMENU[menu_item_1][sotto_menu_1][eng]='who are';

    SUBMENU[menu_item_1][sotto_menu_2] = new Array();
            SUBMENU[menu_item_1][sotto_menu_2][ita]='dove siamo';
            SUBMENU[menu_item_1][sotto_menu_2][eng]='where are';

    SUBMENU[menu_item_1][sotto_menu_3] = new Array();
            SUBMENU[menu_item_1][sotto_menu_3][ita]='informazioni';
            SUBMENU[menu_item_1][sotto_menu_3][eng]='information';

SUBMENU[menu_item_2] = new Array();
    SUBMENU[menu_item_2][sotto_menu_1] = new Array();
            SUBMENU[menu_item_2][sotto_menu_1][ita]='le camere';
            SUBMENU[menu_item_2][sotto_menu_1][eng]='bedroom';

    SUBMENU[menu_item_2][sotto_menu_2] = new Array();
            SUBMENU[menu_item_2][sotto_menu_2][ita]='tariffe e servizi';
            SUBMENU[menu_item_2][sotto_menu_2][eng]='price &amp; service';

    SUBMENU[menu_item_2][sotto_menu_3] = new Array();
            SUBMENU[menu_item_2][sotto_menu_3][ita]='prenotazione';
            SUBMENU[menu_item_2][sotto_menu_3][eng]='reservation';

SUBMENU[menu_item_3] = new Array();
    SUBMENU[menu_item_3][sotto_menu_1] = new Array();
           // SUBMENU[menu_item_3][sotto_menu_1][ita]='l&#39;artista';
           // SUBMENU[menu_item_3][sotto_menu_1][eng]='the artist';
            SUBMENU[menu_item_3][sotto_menu_1][ita]='il maestro';
            SUBMENU[menu_item_3][sotto_menu_1][eng]='the master';

    SUBMENU[menu_item_3][sotto_menu_2] = new Array();
            SUBMENU[menu_item_3][sotto_menu_2][ita]='corsi brevi';
            SUBMENU[menu_item_3][sotto_menu_2][eng]='short courses';//work shop

    SUBMENU[menu_item_3][sotto_menu_3] = new Array();
            SUBMENU[menu_item_3][sotto_menu_3][ita]='corsi avanzati';
            SUBMENU[menu_item_3][sotto_menu_3][eng]='advanced stages';

SUBMENU[menu_item_4] = new Array();
    SUBMENU[menu_item_4][sotto_menu_1] = new Array();
            SUBMENU[menu_item_4][sotto_menu_1][ita]='gallerie';
            SUBMENU[menu_item_4][sotto_menu_1][eng]='show room';

    SUBMENU[menu_item_4][sotto_menu_2] = new Array();
            SUBMENU[menu_item_4][sotto_menu_2][ita]='mostre-attivit&agrave;';
            SUBMENU[menu_item_4][sotto_menu_2][eng]='exhibitions';

