﻿generalSettings = new Object();
     generalSettings["deployFilename"] =   "360frames2_minimal.deploy";//"360frames2.deploy";
     generalSettings["deploy360Extension"] =  ".png";// ".jpg";
     
     navBarSettings = new Object();
     navBarSettings["height"] = 22;
     
     mainDialogSettings = new Object();
     mainDialogSettings["WipeOrientation"] = "vertical";
        mainDialogSettings["x"] = 10;
        mainDialogSettings["y"] = 40;
        
     livingRoomDialogSettings = new Object();
     livingRoomDialogSettings["WipeOrientation"] = "horizontal";
        livingRoomDialogSettings["x"] = 490;
        livingRoomDialogSettings["y"] = 120;
        livingRoomDialogSettings["bbx"] = -0.30;
        livingRoomDialogSettings["bby"] = -0.7;
        livingRoomDialogSettings["bbz"] = 0.1;
     
     gameRoomDialogSettings = new Object();
     gameRoomDialogSettings["WipeOrientation"] = "horizontal";
        gameRoomDialogSettings["x"] = 30;
        gameRoomDialogSettings["y"] = 130;
        gameRoomDialogSettings["bbx"] = -0.32;
        gameRoomDialogSettings["bby"] = 0.1;
        gameRoomDialogSettings["bbz"] = -0.02;
            
     homeOfficeDialogSettings = new Object();
     homeOfficeDialogSettings["WipeOrientation"] = "vertical";
        homeOfficeDialogSettings["x"] = 515;
        homeOfficeDialogSettings["y"] = 144;
        homeOfficeDialogSettings["bbx"] = -0.04;
        homeOfficeDialogSettings["bby"] = -0.7;
        homeOfficeDialogSettings["bbz"] = 0.01; // depth into screen
        
        // To go to a room, call one of these:
        // GoToRoom("Home Office");
        // GoToRoom('Living Room');
        // GoToRoom('Game Room');
        //
        //  To go to a room and THEN open a menu item OTHER THAN the default
        // for that room, do the following: (where the second arg is an index
        // based on 0 = the first,  1 = the second,  2 = third.
        // GoToRoomAndOpenMenu('Game Room', 1);
        
        // The function below is called whenever the ROOM CHANGES and whenever a MENU CHANGES.
        // Examples for name/value:
        //      "RoomChanged"    "HomeOffice"
        //      "RoomChanged"    "GameRoom"
        //      "RoomChanged"    "LivingRoom"
        //
        //      "MenuChanged"   "Share photos"
        //      "MenuChanged"   "Get more done"
        //      "MenuChanged"   "Smarter software"
        //
        //
        //      So...just find the one you need and stick in some js.
        //
        //
        //  NOTE: These events get fired whenever a room is entered or a menu
        //        selection changes. So, if you yourself trigger a room change
        //        using GoToRoom() or GoToRoomAndOpenMenu or menu.SetSelectedHeader,
        //        you should take the usual amount of care not to "respond" to
        //        the event as if it were "spontaneous."
        //
        //        I.e., do something like this:
        //              freezeEvents = true;
        //              GoToRoom("Home Office");
        //              freezeEvents = false;
        //
        //         ...and form your Room Change event handling like:
        //              if (freezeEvents == false)
        //              {
        //                   show a div, etc.
        //              }
        //
        function OnSilverlightEvent(name, value)
        {
            eventManager.BroadcastEvent(name, value);
                   
                  
            if (name == "RoomChanged")
            {
                if (value == "HomeOffice")
                {
                    // Put javascript here. Show a DIV, hide a DIV, go nuts.
                }
                else if (value == "GameRoom")
                {
                }            
                else if (value == "LivingRoom")
                {
                }            
            }
            
            else if (name == "MenuChanged")
            {
                if (value == "Share photos")
                {
    openTab('tab2');
                }
                else if (value == "Get more done")
                {
    openTab('tab4');
                }            
                else if (value == "Smarter software")
                {
    openTab('tab7');
                }
                else if (value == "Get your game on")
                {
    openTab('tab5');
                }
                else if (value == "Keep in touch")
                {
    openTab('tab3');
                }
                else if (value == "Prime-time PC")
                {
    openTab('tab6');
                }
                else if (value == "Game Room")
                {
                    // When the MENU is selected -- not when the ROOM is entered.
                }           
                else if (value == "Living Room")
                {
                    // When the MENU is selected -- not when the ROOM is entered.
                }
                else if (value == "Home Office")
                {
                    // When the MENU is selected -- not when the ROOM is entered.
                }   
            }  
        }         