////////////////////////////////////////////////////
// runtime code
////////////////////////////////////////////////////
stop();
// prepare mode
var login_mode:Boolean = false;
if (_root.loginc && _root.loginc !== "" && _root.loginc !== "fun") {
        _global['systemUserName'] = _root.loginc;
        _global['systemUserPass'] = _root.passc;
        if (_root.passc && _root.passc !== "") login_mode = true;
}
// set top menu text
_root['menu1_mc'].sltgames_txt = _global['interface_ar'][_global['gameLanguage']][6].toUpperCase();
_root['menu1_mc'].vpkgames_txt = _global['interface_ar'][_global['gameLanguage']][7].toUpperCase();
_root['menu1_mc'].tblgames_txt = _global['interface_ar'][_global['gameLanguage']][8].toUpperCase();
_root['menu1_mc'].newgames_txt = _global['interface_ar'][_global['gameLanguage']][9].toUpperCase();
_root['menu1_mc'].schgames_txt = _global['interface_ar'][_global['gameLanguage']][10].toUpperCase();
// refresh news
_root.set_actus();
// refresh interface mode
_root.set_mode();
// refresh banner
_root.set_banner();
// reset content movieclip
_root.reset_content();
// refresh mode
if (login_mode) {
        // perform login
        _global['systemSection']  = _global['sectionGames'];
        _global['categoryActive'] = _global['categorySlots'];
        sock_init(true);
} else {
        // load slot games
        _root.load_menu_category(_global['categorySlots'], _global['casinoGamesXML'], 'allgames', _global['sectionGames']);
}
// slot games button
_root['menu1_mc']['sltgames_btn'].onRelease = function() {
        _root.load_menu_category(_global['categorySlots'], _global['casinoGamesXML'], 'allgames', _global['sectionGames']);
};
// video poker button
_root['menu1_mc']['vpgames_btn'].onRelease = function() {
        _root.load_menu_category(_global['categoryVPoker'], _global['casinoGamesXML'], 'allgames', _global['sectionGames']);
};
// table games button
_root['menu1_mc']['tblgames_btn'].onRelease = function() {
        _root.load_menu_category(_global['categoryTable'], _global['casinoGamesXML'], 'allgames', _global['sectionGames']);
};
// new games button
_root['menu1_mc']['newgames_btn'].onRelease = function() {
        _root.load_menu_category(_global['categoryNewGames'], _global['casinoGamesXML'], 'allgames', _global['sectionGames']);
};
// search games button
_root['menu1_mc']['schgames_btn'].onRelease = function() {
        _root.load_game_search();
}
// search field listener
_root['menu1_mc']['search_txt'].onSubmit = _root.load_game_search;
Key.addListener(_root['menu1_mc']['search_txt']);