// Text of project 
C:\Documents and Settings\Administrator.MEDIACENTER\My Documents\My Downloads\Newton\Programming\Newton Projects\Rush Hour\Rush.NTK
written on: 02/24/04 14:57:14
// Beginning of file about.lyt
aboutBox :=
    {viewBounds: {left: 1, top: 80, right: 174, bottom: 174},
     debug: "aboutBox",
     _proto: @180
    };

_view000 := /* child of aboutBox */
    {
     text:
       "Created by\nMichael Burks\ndumbstart@satx.rr.com\nOriginalGreenTablet \n at Yahoo Groups\nJuly 31, 2003"
     ,
     viewBounds: {left: -5, top: 5, bottom: -5, right: 5},
     viewJustify: 246,
     _proto: @218
    };




constant |layout_about.lyt| :=  aboutBox;
// End of file about.lyt
// Beginning of file help.lyt
_view001 :=
    {viewBounds: {left: -3, top: 100, bottom: 264, right: 191}, _proto: @180};

_view002 := /* child of _view001 */
    {
     text:
       "Object: Get your new car to the exit of the garage, unfortunately, you have to move the cars out of your way."
     ,
     viewBounds: {left: 82, top: 19, right: 182, bottom: 89},
     viewFormat: 0,
     viewFont: ROM_fontSystem9,
     viewJustify: 3,
     _proto: @218
    };



_view003 := /* child of _view001 */
    {text: "Cars and trucks can only move forward and backward. Just click a",
     viewBounds: {left: 82, top: 82, right: 182, bottom: 121},
     viewJustify: 0,
     viewFont: ROM_fontSystem9,
     _proto: @218
    };



_view004 := /* child of _view001 */
    {
     text:
       "car and then click a direction. Once the way is clear, just park your car on the exit sign."
     ,
     viewBounds: {left: 17, top: 119, right: 182, bottom: 157},
     viewJustify: 0
     ,
     viewFont: ROM_fontSystem9,
     _proto: @218
    };



_view005 := /* child of _view001 */
    {viewBounds: {left: 20, top: 14, right: 54, bottom: 84},
     buttonClickScript:
       func()
       begin
       end,
     icon:
       BuildPictureViewSlot({
       	imageFile4: "upmain.bmp", 
       	maskOption: 0}),
     _proto: @198
    };



_view006 := /* child of _view001 */
    {viewBounds: {left: 19, top: 94, right: 55, bottom: 115},
     buttonClickScript:
       func()
       begin
       end,
     icon:
       BuildPictureViewSlot({
       	imageFile4: "exit.bmp", 
       	maskOption: 0}),
     _proto: @198
    };




constant |layout_help.lyt| :=  _view001;
// End of file help.lyt
// Beginning of file Rush Hour.lyt
Main :=
    {boxType: nil,
     level16:
       func()
       begin
       
       //main box
       
       local bounds:=clone(mainCar.viewBounds);
       bounds.left:=72;
       bounds.right:=bounds.left + 36;
       bounds.top:=72;
       bounds.bottom:=bounds.top + 72;
       mainCar.viewBounds:=bounds;
       
       //long boxes that are 2
       
       local bounds:=clone(box1long2.viewBounds);
       bounds.left:=72;
       bounds.right:=bounds.left + 72;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 36;
       box1long2.viewBounds:=bounds;
       box1long2:Show();
       
       local bounds:=clone(box2long2.viewBounds);
       bounds.left:=144;
       bounds.right:=bounds.left + 72;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 36;
       box2long2.viewBounds:=bounds;
       box2long2:Show();
       
       local bounds:=clone(box3long2.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 72;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 36;
       box3long2.viewBounds:=bounds;
       box3long2:Show();
       
       local bounds:=clone(box4long2.viewBounds);
       bounds.left:=36;
       bounds.right:=bounds.left + 72;
       bounds.top:=144;
       bounds.bottom:=bounds.top + 36;
       box4long2.viewBounds:=bounds;
       box4long2:Show();
       
       local bounds:=clone(box5long2.viewBounds);
       bounds.left:=72;
       bounds.right:=bounds.left + 72;
       bounds.top:=180;
       bounds.bottom:=bounds.top + 36;
       box5long2.viewBounds:=bounds;
       box5long2:Show();
       
       local bounds:=clone(box6long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box6long2.viewBounds:=bounds;
       box6long2:Hide();
       
       //long boxes that are 3
       
       local bounds:=clone(box1long3.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 108;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box1long3.viewBounds:=bounds;
       box1long3:Hide();
       
       local bounds:=clone(box2long3.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 108;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box2long3.viewBounds:=bounds;
       box2long3:Hide();
       
       local bounds:=clone(box3long3.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 108;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box3long3.viewBounds:=bounds;
       box3long3:Hide();
       
       //tall boxes that are 2
       
       local bounds:=clone(box1tall2.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box1tall2.viewBounds:=bounds;
       box1tall2:Show();
       
       local bounds:=clone(box2tall2.viewBounds);
       bounds.left:=108;
       bounds.right:=bounds.left + 36;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 72;
       box2tall2.viewBounds:=bounds;
       box2tall2:Show();
       
       local bounds:=clone(box3tall2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 36;
       bounds.top:=144;
       bounds.bottom:=bounds.top + 72;
       box3tall2.viewBounds:=bounds;
       box3tall2:Show();
       
       local bounds:=clone(box4tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box4tall2.viewBounds:=bounds;
       box4tall2:Hide();
       
       local bounds:=clone(box5tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box5tall2.viewBounds:=bounds;
       box5tall2:Hide();
       
       local bounds:=clone(box6tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box6tall2.viewBounds:=bounds;
       box6tall2:Hide();
       
       //Tall Boxes with 3
       
       local bounds:=clone(box1tall3.viewBounds);
       bounds.left:=144;
       bounds.right:=bounds.left + 36;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 108;
       box1tall3.viewBounds:=bounds;
       box1tall3:Show();
       
       local bounds:=clone(box2tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 108;
       box2tall3.viewBounds:=bounds;
       box2tall3:Hide();
       
       local bounds:=clone(box3tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 108;
       box3tall3.viewBounds:=bounds;
       box3tall3:Hide();
       
       end,
     levelPopup: nil,
     ViewSetupDoneScript:
       func()
       begin
       end,
     icon3tall:
       BuildPictureViewSlot({
       	imageFile4: "uptruck.bmp", 
       	maskOption: 0}),
     viewFormat: 16777808,
     level5:
       func()
       begin
       
       //main box
       
       local bounds:=clone(mainCar.viewBounds);
       bounds.left:=72;
       bounds.right:=108;
       bounds.top:=72;
       bounds.bottom:=144;
       mainCar.viewBounds:=bounds;
       
       //long boxes that are 2
       
       local bounds:=clone(box1long2.viewBounds);
       bounds.left:=72;
       bounds.right:=144;
       bounds.top:=0;
       bounds.bottom:=36;
       box1long2.viewBounds:=bounds;
       box1long2:Show();
       
       local bounds:=clone(box2long2.viewBounds);
       bounds.left:=72;
       bounds.right:=144;
       bounds.top:=36;
       bounds.bottom:=72;
       box2long2.viewBounds:=bounds;
       box2long2:Show();
       
       local bounds:=clone(box3long2.viewBounds);
       bounds.left:=0;
       bounds.right:=72;
       bounds.top:=108;
       bounds.bottom:=144;
       box3long2.viewBounds:=bounds;
       box3long2:Show();
       
       local bounds:=clone(box4long2.viewBounds);
       bounds.left:=144;
       bounds.right:=216;
       bounds.top:=108;
       bounds.bottom:=144;
       box4long2.viewBounds:=bounds;
       box4long2:Show();
       
       local bounds:=clone(box5long2.viewBounds);
       bounds.left:=72;
       bounds.right:=144;
       bounds.top:=144;
       bounds.bottom:=180;
       box5long2.viewBounds:=bounds;
       box5long2:Show();
       
       local bounds:=clone(box6long2.viewBounds);
       bounds.left:=72;
       bounds.right:=144;
       bounds.top:=180;
       bounds.bottom:=216;
       box6long2.viewBounds:=bounds;
       box6long2:Show();
       
       //long boxes that are 3
       
       local bounds:=clone(box1long3.viewBounds);
       bounds.left:=0;
       bounds.right:=108;
       bounds.top:=216;
       bounds.bottom:=252;
       box1long3.viewBounds:=bounds;
       box1long3:Hide();
       
       local bounds:=clone(box2long3.viewBounds);
       bounds.left:=0;
       bounds.right:=108;
       bounds.top:=216;
       bounds.bottom:=252;
       box2long3.viewBounds:=bounds;
       box2long3:Hide();
       
       local bounds:=clone(box3long3.viewBounds);
       bounds.left:=0;
       bounds.right:=108;
       bounds.top:=216;
       bounds.bottom:=252;
       box3long3.viewBounds:=bounds;
       box3long3:Hide();
       
       //tall boxes that are 2
       
       local bounds:=clone(box1tall2.viewBounds);
       bounds.left:=36;
       bounds.right:=72;
       bounds.top:=0;
       bounds.bottom:=72;
       box1tall2.viewBounds:=bounds;
       box1tall2:Show();
       
       local bounds:=clone(box2tall2.viewBounds);
       bounds.left:=144;
       bounds.right:=180;
       bounds.top:=0;
       bounds.bottom:=72;
       box2tall2.viewBounds:=bounds;
       box2tall2:Show();
       
       local bounds:=clone(box3tall2.viewBounds);
       bounds.left:=108;
       bounds.right:=144;
       bounds.top:=72;
       bounds.bottom:=144;
       box3tall2.viewBounds:=bounds;
       box3tall2:Show();
       
       local bounds:=clone(box4tall2.viewBounds);
       bounds.left:=0;
       bounds.right:=36;
       bounds.top:=144;
       bounds.bottom:=216;
       box4tall2.viewBounds:=bounds;
       box4tall2:Show();
       
       local bounds:=clone(box5tall2.viewBounds);
       bounds.left:=180;
       bounds.right:=216;
       bounds.top:=144;
       bounds.bottom:=216;
       box5tall2.viewBounds:=bounds;
       box5tall2:Show();
       
       local bounds:=clone(box6tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=252;
       bounds.top:=36;
       bounds.bottom:=108;
       box6tall2.viewBounds:=bounds;
       box6tall2:Hide();
       
       //Tall Boxes with 3
       
       local bounds:=clone(box1tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=252;
       bounds.top:=36;
       bounds.bottom:=108;
       box1tall3.viewBounds:=bounds;
       box1tall3:Hide();
       
       local bounds:=clone(box2tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=252;
       bounds.top:=36;
       bounds.bottom:=108;
       box2tall3.viewBounds:=bounds;
       box2tall3:Hide();
       
       local bounds:=clone(box3tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=252;
       bounds.top:=36;
       bounds.bottom:=108;
       box3tall3.viewBounds:=bounds;
       box3tall3:Hide();
       
       
       
       
       
       
       
       end,
     theSoup: nil,
     ViewQuitScript:
       // must return the value of inherited:?ViewQuitScript()
       func()
       begin
       	newLevelPopup:=nil;
       	bounds:=nil;
       	boxBounds:=nil;
       	boxChosen:=nil;
       	inherited:?ViewQuitScript();
       end,
     levelPlaying: 1,
     levelTotal: nil,
     level13:
       func()
       begin
       
       //main box
       
       local bounds:=clone(mainCar.viewBounds);
       bounds.left:=72;
       bounds.right:=bounds.left + 36;
       bounds.top:=144;
       bounds.bottom:=bounds.top + 72;
       mainCar.viewBounds:=bounds;
       
       //long boxes that are 2
       
       local bounds:=clone(box1long2.viewBounds);
       bounds.left:=144;
       bounds.right:=bounds.left + 72;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 36;
       box1long2.viewBounds:=bounds;
       box1long2:Show();
       
       local bounds:=clone(box2long2.viewBounds);
       bounds.left:=144;
       bounds.right:=bounds.left + 72;
       bounds.top:=72;
       bounds.bottom:=bounds.top + 36;
       box2long2.viewBounds:=bounds;
       box2long2:Show();
       
       local bounds:=clone(box3long2.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 72;
       bounds.top:=144;
       bounds.bottom:=bounds.top + 36;
       box3long2.viewBounds:=bounds;
       box3long2:Show();
       
       local bounds:=clone(box4long2.viewBounds);
       bounds.left:=108;
       bounds.right:=bounds.left + 72;
       bounds.top:=180;
       bounds.bottom:=bounds.top + 36;
       box4long2.viewBounds:=bounds;
       box4long2:Show();
       
       local bounds:=clone(box5long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box5long2.viewBounds:=bounds;
       box5long2:Hide();
       
       local bounds:=clone(box6long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box6long2.viewBounds:=bounds;
       box6long2:Hide();
       
       //long boxes that are 3
       
       local bounds:=clone(box1long3.viewBounds);
       bounds.left:=108;
       bounds.right:=bounds.left + 108;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 36;
       box1long3.viewBounds:=bounds;
       box1long3:Show();
       
       local bounds:=clone(box2long3.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 108;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 36;
       box2long3.viewBounds:=bounds;
       box2long3:Show();
       
       local bounds:=clone(box3long3.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 108;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box3long3.viewBounds:=bounds;
       box3long3:Hide();
       
       //tall boxes that are 2
       
       local bounds:=clone(box1tall2.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 36;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 72;
       box1tall2.viewBounds:=bounds;
       box1tall2:Show();
       
       local bounds:=clone(box2tall2.viewBounds);
       bounds.left:=108;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box2tall2.viewBounds:=bounds;
       box2tall2:Show();
       
       local bounds:=clone(box3tall2.viewBounds);
       bounds.left:=108;
       bounds.right:=bounds.left + 36;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 72;
       box3tall2.viewBounds:=bounds;
       box3tall2:Show();
       
       local bounds:=clone(box4tall2.viewBounds);
       bounds.left:=144;
       bounds.right:=bounds.left + 36;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 72;
       box4tall2.viewBounds:=bounds;
       box4tall2:Show();
       
       local bounds:=clone(box5tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box5tall2.viewBounds:=bounds;
       box5tall2:Hide();
       
       local bounds:=clone(box6tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box6tall2.viewBounds:=bounds;
       box6tall2:Hide();
       
       //Tall Boxes with 3
       
       local bounds:=clone(box1tall3.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 36;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 108;
       box1tall3.viewBounds:=bounds;
       box1tall3:Show();
       
       local bounds:=clone(box2tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 108;
       box2tall3.viewBounds:=bounds;
       box2tall3:Hide();
       
       local bounds:=clone(box3tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 108;
       box3tall3.viewBounds:=bounds;
       box3tall3:Hide();
       
       end,
     theScores: nil,
     Move: 36,
     addNewLevel:
       func()
       begin
       	ScoreEntry.score:=levelTotal;
       	EntryChangeXmit(ScoreEntry,kAppSymbol);
       end;,
     leftValid:
       func()
       begin
       local doMove;
       if boxType then
       	doMove:=1;
       bounds:=clone(boxChosen.viewBounds);
       foreach box in [box1long2,box2long2,box3long2,box4long2,box5long2,box6long2,box1long3,box2long3,box3long3] do
       		begin
       			boxBounds:=box.viewBounds;
       			if bounds.top = boxBounds.top and bounds.left = boxBounds.right then
       				doMove:=nil;
       		end;
       foreach box in [mainCar,box1tall2,box2tall2,box3tall2,box4tall2,box5tall2,box6tall2] do
       		begin
       			boxBounds:=box.viewBounds;
       			if (bounds.top = boxBounds.top or (bounds.top - 36) = boxBounds.top) and bounds.left = boxBounds.right then
       				doMove:=nil;
       		end;
       foreach box in [box1tall3,box2tall3,box3tall3] do
       		begin
       			boxBounds:=box.viewBounds;
       			if (bounds.top = boxBounds.top or (bounds.top - 36) = boxBounds.top or (bounds.top - 72)= boxBounds.top) and bounds.left = boxBounds.right then
       				doMove:=nil;
       		end;
       return doMove;
       end;,
     downValid:
       func()
       begin
       local doMove;
       if not boxType then
       	doMove:=1;
       bounds:=clone(boxChosen.viewBounds);
       foreach box in [mainCar,box1tall2,box2tall2,box3tall2,box4tall2,box5tall2,box6tall2,box1tall3,box2tall3,box3tall3] do
       		begin
       			boxBounds:=box.viewBounds;
       			if bounds.bottom = boxBounds.top and bounds.right = boxBounds.right then
       				doMove:=nil;
       		end;
       foreach box in [box1long2,box2long2,box3long2,box4long2,box5long2,box6long2] do
       		begin
       			boxBounds:=box.viewBounds;
       			if bounds.bottom = boxBounds.top  and (bounds.right = boxBounds.right or bounds.right + 36 =boxBounds.right) then
       				doMove:=nil;
       		end;
       foreach box in [box1long3,box2long3,box3long3] do
       		begin
       			boxBounds:=box.viewBounds;
       			if bounds.bottom = boxBounds.top and (bounds.right = boxBounds.right or bounds.right + 36 = boxBounds.right or bounds.right + 72 = boxBounds.right) then
       				doMove:=nil;
       		end;
       return doMove;
       end;,
     viewFlags: 1,
     scoreCursor: nil,
     level18:
       func()
       begin
       
       //main box
       
       local bounds:=clone(mainCar.viewBounds);
       bounds.left:=72;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       mainCar.viewBounds:=bounds;
       
       //long boxes that are 2
       
       local bounds:=clone(box1long2.viewBounds);
       bounds.left:=108;
       bounds.right:=bounds.left + 72;
       bounds.top:=72;
       bounds.bottom:=bounds.top + 36;
       box1long2.viewBounds:=bounds;
       box1long2:Show();
       
       local bounds:=clone(box2long2.viewBounds);
       bounds.left:=36;
       bounds.right:=bounds.left + 72;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 36;
       box2long2.viewBounds:=bounds;
       box2long2:Show();
       
       local bounds:=clone(box3long2.viewBounds);
       bounds.left:=108;
       bounds.right:=bounds.left + 72;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 36;
       box3long2.viewBounds:=bounds;
       box3long2:Show();
       
       local bounds:=clone(box4long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box4long2.viewBounds:=bounds;
       box4long2:Hide();
       
       local bounds:=clone(box5long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box5long2.viewBounds:=bounds;
       box5long2:Hide();
       
       local bounds:=clone(box6long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box6long2.viewBounds:=bounds;
       box6long2:Hide();
       
       //long boxes that are 3
       
       local bounds:=clone(box1long3.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 108;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 36;
       box1long3.viewBounds:=bounds;
       box1long3:Show();
       
       local bounds:=clone(box2long3.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 108;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box2long3.viewBounds:=bounds;
       box2long3:Hide();
       
       local bounds:=clone(box3long3.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 108;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box3long3.viewBounds:=bounds;
       box3long3:Hide();
       
       //tall boxes that are 2
       
       local bounds:=clone(box1tall2.viewBounds);
       bounds.left:=108;
       bounds.right:=bounds.left + 36;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 72;
       box1tall2.viewBounds:=bounds;
       box1tall2:Show();
       
       local bounds:=clone(box2tall2.viewBounds);
       bounds.left:=144;
       bounds.right:=bounds.left + 36;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 72;
       box2tall2.viewBounds:=bounds;
       box2tall2:Show();
       
       local bounds:=clone(box3tall2.viewBounds);
       bounds.left:=36;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box3tall2.viewBounds:=bounds;
       box3tall2:Show();
       
       local bounds:=clone(box4tall2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 36;
       bounds.top:=144;
       bounds.bottom:=bounds.top + 72;
       box4tall2.viewBounds:=bounds;
       box4tall2:Hide();
       
       local bounds:=clone(box5tall2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 36;
       bounds.top:=144;
       bounds.bottom:=bounds.top + 72;
       box5tall2.viewBounds:=bounds;
       box5tall2:Hide();
       
       local bounds:=clone(box6tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box6tall2.viewBounds:=bounds;
       box6tall2:Hide();
       
       //Tall Boxes with 3
       
       local bounds:=clone(box1tall3.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 108;
       box1tall3.viewBounds:=bounds;
       box1tall3:Show();
       
       local bounds:=clone(box2tall3.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 108;
       box2tall3.viewBounds:=bounds;
       box2tall3:Show();
       
       local bounds:=clone(box3tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 108;
       box3tall3.viewBounds:=bounds;
       box3tall3:Hide();
       
       end,
     level2:
       func()
       begin
       
       //main box
       
       local bounds:=clone(mainCar.viewBounds);
       bounds.left:=72;
       bounds.right:=bounds.left + 36;
       bounds.top:=108;
       bounds.bottom:=180;
       mainCar.viewBounds:=bounds;
       
       //long boxes that are 2
       
       local bounds:=clone(box1long2.viewBounds);
       bounds.left:=144;
       bounds.right:=bounds.left + 72;
       bounds.top:=144;
       bounds.bottom:=bounds.top + 36;
       box1long2.viewBounds:=bounds;
       box1long2:Show();
       
       local bounds:=clone(box2long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box2long2.viewBounds:=bounds;
       box2long2:Hide();
       
       local bounds:=clone(box3long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box3long2.viewBounds:=bounds;
       box3long2:Hide();
       
       local bounds:=clone(box4long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box4long2.viewBounds:=bounds;
       box4long2:Hide();
       
       local bounds:=clone(box5long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box5long2.viewBounds:=bounds;
       box5long2:Hide();
       
       local bounds:=clone(box6long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box6long2.viewBounds:=bounds;
       box6long2:Hide();
       
       //long boxes that are 3
       
       local bounds:=clone(box1long3.viewBounds);
       bounds.left:=108;
       bounds.right:=bounds.left + 108;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 36;
       box1long3.viewBounds:=bounds;
       box1long3:Show();
       
       local bounds:=clone(box2long3.viewBounds);
       bounds.left:=72;
       bounds.right:=bounds.left + 108;
       bounds.top:=72;
       bounds.bottom:=bounds.top + 36;
       box2long3.viewBounds:=bounds;
       box2long3:Show();
       
       local bounds:=clone(box3long3.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 108;
       bounds.top:=216;
       bounds.bottom:=bounds.bottom + 36;
       box3long3.viewBounds:=bounds;
       box3long3:Hide();
       
       //tall boxes that are 2
       
       local bounds:=clone(box1tall2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 36;
       bounds.top:=72;
       bounds.bottom:=bounds.top + 72;
       box1tall2.viewBounds:=bounds;
       box1tall2:Show();
       
       local bounds:=clone(box2tall2.viewBounds);
       bounds.left:=108;
       bounds.right:=bounds.left + 36;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 72;
       box2tall2.viewBounds:=bounds;
       box2tall2:Show();
       
       local bounds:=clone(box3tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=108;
       box3tall2.viewBounds:=bounds;
       box3tall2:Hide();
       
       local bounds:=clone(box4tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=108;
       box4tall2.viewBounds:=bounds;
       box4tall2:Hide();
       
       local bounds:=clone(box5tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=108;
       box5tall2.viewBounds:=bounds;
       box5tall2:Hide();
       
       local bounds:=clone(box6tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=108;
       box6tall2.viewBounds:=bounds;
       box6tall2:Hide();
       
       //Tall Boxes with 3
       
       local bounds:=clone(box1tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=144;
       box1tall3.viewBounds:=bounds;
       box1tall3:Hide();
       
       local bounds:=clone(box2tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=144;
       box2tall3.viewBounds:=bounds;
       box2tall3:Hide();
       
       local bounds:=clone(box3tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=144;
       box3tall3.viewBounds:=bounds;
       box3tall3:Hide();
       
       end,
     scoreEntry: nil,
     level10:
       func()
       begin
       
       //main box
       
       local bounds:=clone(mainCar.viewBounds);
       bounds.left:=72;
       bounds.right:=bounds.left + 36;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 72;
       mainCar.viewBounds:=bounds;
       
       //long boxes that are 2
       
       local bounds:=clone(box1long2.viewBounds);
       bounds.left:=72;
       bounds.right:=bounds.left + 72;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 36;
       box1long2.viewBounds:=bounds;
       box1long2:Show();
       
       local bounds:=clone(box2long2.viewBounds);
       bounds.left:=144;
       bounds.right:=bounds.left + 72;
       bounds.top:=72;
       bounds.bottom:=bounds.top + 36;
       box2long2.viewBounds:=bounds;
       box2long2:Show();
       
       local bounds:=clone(box3long2.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 72;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 36;
       box3long2.viewBounds:=bounds;
       box3long2:Show();
       
       local bounds:=clone(box4long2.viewBounds);
       bounds.left:=144;
       bounds.right:=bounds.left + 72;
       bounds.top:=144;
       bounds.bottom:=bounds.top + 36;
       box4long2.viewBounds:=bounds;
       box4long2:Show();
       
       local bounds:=clone(box5long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box5long2.viewBounds:=bounds;
       box5long2:Hide();
       
       local bounds:=clone(box6long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box6long2.viewBounds:=bounds;
       box6long2:Hide();
       
       //long boxes that are 3
       
       local bounds:=clone(box1long3.viewBounds);
       bounds.left:=36;
       bounds.right:=bounds.left + 108;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 36;
       box1long3.viewBounds:=bounds;
       box1long3:Show();
       
       local bounds:=clone(box2long3.viewBounds);
       bounds.left:=72;
       bounds.right:=bounds.left + 108;
       bounds.top:=180;
       bounds.bottom:=bounds.top + 36;
       box2long3.viewBounds:=bounds;
       box2long3:Show();
       
       local bounds:=clone(box3long3.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 108;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box3long3.viewBounds:=bounds;
       box3long3:Hide();
       
       //tall boxes that are 2
       
       local bounds:=clone(box1tall2.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 36;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 72;
       box1tall2.viewBounds:=bounds;
       box1tall2:Show();
       
       local bounds:=clone(box2tall2.viewBounds);
       bounds.left:=144;
       bounds.right:=bounds.left + 36;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 72;
       box2tall2.viewBounds:=bounds;
       box2tall2:Show();
       
       local bounds:=clone(box3tall2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 36;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 72;
       box3tall2.viewBounds:=bounds;
       box3tall2:Show();
       
       local bounds:=clone(box4tall2.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 36;
       bounds.top:=144;
       bounds.bottom:=bounds.top + 72;
       box4tall2.viewBounds:=bounds;
       box4tall2:Show();
       
       local bounds:=clone(box5tall2.viewBounds);
       bounds.left:=36;
       bounds.right:=bounds.left + 36;
       bounds.top:=144;
       bounds.bottom:=bounds.top + 72;
       box5tall2.viewBounds:=bounds;
       box5tall2:Show();
       
       local bounds:=clone(box6tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box6tall2.viewBounds:=bounds;
       box6tall2:Hide();
       
       //Tall Boxes with 3
       
       local bounds:=clone(box1tall3.viewBounds);
       bounds.left:=108;
       bounds.right:=bounds.left + 36;
       bounds.top:=72;
       bounds.bottom:=bounds.top + 108;
       box1tall3.viewBounds:=bounds;
       box1tall3:Show();
       
       local bounds:=clone(box2tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 108;
       box2tall3.viewBounds:=bounds;
       box2tall3:Hide();
       
       local bounds:=clone(box3tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 108;
       box3tall3.viewBounds:=bounds;
       box3tall3:Hide();
       
       end,
     icon2long:
       BuildPictureViewSlot({
       	imageFile4: "sidecar.bmp", 
       	maskOption: 0}),
     startLevel:
       func(levelPicked)
       begin
       If levelPicked=1 then
       	:level1();
       If levelPicked=2 then
       	:level2();
       If levelPicked=3 then
       	:level3();
       If levelPicked=4 then
       	:level4();
       If levelPicked=5 then
       	:level5();
       If levelPicked=6 then
       	:level6();
       If levelPicked=7 then
       	:level7();
       If levelPicked=8 then
       	:level8();
       If levelPicked=9 then
       	:level9();
       If levelPicked=10 then
       	:level10();
       If levelPicked=11 then
       	:level11();
       If levelPicked=12 then
       	:level12();
       If levelPicked=13 then
       	:level13();
       If levelPicked=14 then
       	:level14();
       If levelPicked=15 then
       	:level15();
       If levelPicked=16 then
       	:level16();
       If levelPicked=17 then
       	:level17();
       If levelPicked=18 then
       	:level18();
       If levelPicked=19 then
       	:level19();
       If levelPicked=20 then
       	:level20();
       	
       end,
     viewBounds: {left: 14, top: 14, bottom: 323, right: 303},
     level7:
       func()
       begin
       
       //main box
       
       local bounds:=clone(mainCar.viewBounds);
       bounds.left:=72;
       bounds.right:=bounds.left + 36;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 72;
       mainCar.viewBounds:=bounds;
       
       //long boxes that are 2
       
       local bounds:=clone(box1long2.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 72;
       bounds.top:=72;
       bounds.bottom:=bounds.top + 36;
       box1long2.viewBounds:=bounds;
       box1long2:Show();
       
       local bounds:=clone(box2long2.viewBounds);
       bounds.left:=108;
       bounds.right:=bounds.left + 72;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 36;
       box2long2.viewBounds:=bounds;
       box2long2:Show();
       
       local bounds:=clone(box3long2.viewBounds);
       bounds.left:=144;
       bounds.right:=bounds.left + 72;
       bounds.top:=180;
       bounds.bottom:=bounds.top + 36;
       box3long2.viewBounds:=bounds;
       box3long2:Show();
       
       local bounds:=clone(box4long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box4long2.viewBounds:=bounds;
       box4long2:Hide();
       
       local bounds:=clone(box5long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box5long2.viewBounds:=bounds;
       box5long2:Hide();
       
       local bounds:=clone(box6long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box6long2.viewBounds:=bounds;
       box6long2:Hide();
       
       //long boxes that are 3
       
       local bounds:=clone(box1long3.viewBounds);
       bounds.left:=36;
       bounds.right:=bounds.left + 108;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 36;
       box1long3.viewBounds:=bounds;
       box1long3:Show();
       
       local bounds:=clone(box2long3.viewBounds);
       bounds.left:=36;
       bounds.right:=bounds.left + 108;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 36;
       box2long3.viewBounds:=bounds;
       box2long3:Show();
       
       local bounds:=clone(box3long3.viewBounds);
       bounds.left:=72;
       bounds.right:=bounds.left + 108;
       bounds.top:=72;
       bounds.bottom:=bounds.top + 36;
       box3long3.viewBounds:=bounds;
       box3long3:Show();
       
       //tall boxes that are 2
       
       local bounds:=clone(box1tall2.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 36;
       bounds.top:=144;
       bounds.bottom:=bounds.top + 72;
       box1tall2.viewBounds:=bounds;
       box1tall2:Show();
       
       local bounds:=clone(box2tall2.viewBounds);
       bounds.left:=36;
       bounds.right:=bounds.left + 36;
       bounds.top:=144;
       bounds.bottom:=bounds.top + 72;
       box2tall2.viewBounds:=bounds;
       box2tall2:Show();
       
       local bounds:=clone(box3tall2.viewBounds);
       bounds.left:=108;
       bounds.right:=bounds.left + 36;
       bounds.top:=144;
       bounds.bottom:=bounds.top + 72;
       box3tall2.viewBounds:=bounds;
       box3tall2:Show();
       
       local bounds:=clone(box4tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box4tall2.viewBounds:=bounds;
       box4tall2:Hide();
       
       local bounds:=clone(box5tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box5tall2.viewBounds:=bounds;
       box5tall2:Hide();
       
       local bounds:=clone(box6tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box6tall2.viewBounds:=bounds;
       box6tall2:Hide();
       
       //Tall Boxes with 3
       
       local bounds:=clone(box1tall3.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 36;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 108;
       box1tall3.viewBounds:=bounds;
       box1tall3:Show();
       
       local bounds:=clone(box2tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 108;
       box2tall3.viewBounds:=bounds;
       box2tall3:Hide();
       
       local bounds:=clone(box3tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 108;
       box3tall3.viewBounds:=bounds;
       box3tall3:Hide();
       
       end,
     hideControls:
       func()
       begin
       if boxType then
       	begin
       	left:Open();
       	right:Open();
       	up:Close();
       	down:Close();
       	end;
       else
       	begin
       	up:Open();
       	down:Open();
       	left:Close();
       	right:Close();
       	end;
       end,
     upValid:
       // This segment checks to see if up is a valid move
       func()
       begin
       local doMove;
       if not boxType then
       	doMove:=1;
       bounds:=clone(boxChosen.viewBounds);
       foreach box in [mainCar,box1tall2,box2tall2,box3tall2,box4tall2,box5tall2,box6tall2,box1tall3,box2tall3,box3tall3] do
       		begin
       			boxBounds:=box.viewBounds;
       			if bounds.top = boxBounds.bottom and bounds.right = boxBounds.right then
       				doMove:=nil;
       		end;
       foreach box in [box1long2,box2long2,box3long2,box4long2,box5long2,box6long2] do
       		begin
       			boxBounds:=box.viewBounds;
       			if bounds.top = boxBounds.bottom  and (bounds.right = boxBounds.right or bounds.right + 36 = boxBounds.right) then
       				doMove:=nil;
       		end;
       foreach box in [box1long3,box2long3,box3long3] do
       		begin
       			boxBounds:=box.viewBounds;
       			if bounds.top = boxBounds.bottom and (bounds.right = boxBounds.right or bounds.right + 36 = boxBounds.right or bounds.right + 72 = boxBounds.right) then
       				doMove:=nil;
       		end;
       return doMove;
       end;,
     level15:
       func()
       begin
       
       //main box
       
       local bounds:=clone(mainCar.viewBounds);
       bounds.left:=72;
       bounds.right:=bounds.left + 36;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 72;
       mainCar.viewBounds:=bounds;
       
       //long boxes that are 2
       
       local bounds:=clone(box1long2.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 72;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 36;
       box1long2.viewBounds:=bounds;
       box1long2:Show();
       
       local bounds:=clone(box2long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box2long2.viewBounds:=bounds;
       box2long2:Hide();
       
       local bounds:=clone(box3long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box3long2.viewBounds:=bounds;
       box3long2:Hide();
       
       local bounds:=clone(box4long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box4long2.viewBounds:=bounds;
       box4long2:Hide();
       
       local bounds:=clone(box5long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box5long2.viewBounds:=bounds;
       box5long2:Hide();
       
       local bounds:=clone(box6long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box6long2.viewBounds:=bounds;
       box6long2:Hide();
       
       //long boxes that are 3
       
       local bounds:=clone(box1long3.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 108;
       bounds.top:=72;
       bounds.bottom:=bounds.top + 36;
       box1long3.viewBounds:=bounds;
       box1long3:Show();
       
       local bounds:=clone(box2long3.viewBounds);
       bounds.left:=72;
       bounds.right:=bounds.left + 108;
       bounds.top:=180;
       bounds.bottom:=bounds.top + 36;
       box2long3.viewBounds:=bounds;
       box2long3:Show();
       
       local bounds:=clone(box3long3.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 108;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box3long3.viewBounds:=bounds;
       box3long3:Hide();
       
       //tall boxes that are 2
       
       local bounds:=clone(box1tall2.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 36;
       bounds.top:=144;
       bounds.bottom:=bounds.top + 72;
       box1tall2.viewBounds:=bounds;
       box1tall2:Show();
       
       local bounds:=clone(box2tall2.viewBounds);
       bounds.left:=36;
       bounds.right:=bounds.left + 36;
       bounds.top:=144;
       bounds.bottom:=bounds.top + 72;
       box2tall2.viewBounds:=bounds;
       box2tall2:Show();
       
       local bounds:=clone(box3tall2.viewBounds);
       bounds.left:=144;
       bounds.right:=bounds.left + 36;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 72;
       box3tall2.viewBounds:=bounds;
       box3tall2:Show();
       
       local bounds:=clone(box4tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box4tall2.viewBounds:=bounds;
       box4tall2:Hide();
       
       local bounds:=clone(box5tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box5tall2.viewBounds:=bounds;
       box5tall2:Hide();
       
       local bounds:=clone(box6tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box6tall2.viewBounds:=bounds;
       box6tall2:Hide();
       
       //Tall Boxes with 3
       
       local bounds:=clone(box1tall3.viewBounds);
       bounds.left:=108;
       bounds.right:=bounds.left + 36;
       bounds.top:=72;
       bounds.bottom:=bounds.top + 108;
       box1tall3.viewBounds:=bounds;
       box1tall3:Show();
       
       local bounds:=clone(box2tall3.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 36;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 108;
       box2tall3.viewBounds:=bounds;
       box2tall3:Show();
       
       local bounds:=clone(box3tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 108;
       box3tall3.viewBounds:=bounds;
       box3tall3:Hide();
       
       end,
     newHighScore:
       func(game,score,level)
       begin
       	local newHighScore := {game:nil,score:nil,level:nil};
       	Print("set newHighScore.game to game");
       	newHighScore.game := game;
       	newHighScore.score := score;
       	newHighScore.level := level;
       	return newHighScore;
       end;,
     icon2tall:
       BuildPictureViewSlot({
       	imageFile4: "upsuv.bmp", 
       	maskOption: 0}),
     level4:
       func()
       begin
       
       //main box
       
       local bounds:=clone(mainCar.viewBounds);
       bounds.left:=72;
       bounds.right:=108;
       bounds.top:=108;
       bounds.bottom:=180;
       mainCar.viewBounds:=bounds;
       
       //long boxes that are 2
       
       local bounds:=clone(box1long2.viewBounds);
       bounds.left:=144;
       bounds.right:=216;
       bounds.top:=0;
       bounds.bottom:=36;
       box1long2.viewBounds:=bounds;
       box1long2:Show();
       
       local bounds:=clone(box2long2.viewBounds);
       bounds.left:=108;
       bounds.right:=180;
       bounds.top:=108;
       bounds.bottom:=144;
       box2long2.viewBounds:=bounds;
       box2long2:Show();
       
       local bounds:=clone(box3long2.viewBounds);
       bounds.left:=180;
       bounds.right:=252;
       bounds.top:=216;
       bounds.bottom:=252;
       box3long2.viewBounds:=bounds;
       box3long2:Hide();
       
       local bounds:=clone(box4long2.viewBounds);
       bounds.left:=180;
       bounds.right:=252;
       bounds.top:=216;
       bounds.bottom:=252;
       box4long2.viewBounds:=bounds;
       box4long2:Hide();
       
       local bounds:=clone(box5long2.viewBounds);
       bounds.left:=180;
       bounds.right:=252;
       bounds.top:=216;
       bounds.bottom:=252;
       box5long2.viewBounds:=bounds;
       box5long2:Hide();
       
       local bounds:=clone(box6long2.viewBounds);
       bounds.left:=180;
       bounds.right:=252;
       bounds.top:=216;
       bounds.bottom:=252;
       box6long2.viewBounds:=bounds;
       box6long2:Hide();
       
       //long boxes that are 3
       
       local bounds:=clone(box1long3.viewBounds);
       bounds.left:=0;
       bounds.right:=108;
       bounds.top:=72;
       bounds.bottom:=108;
       box1long3.viewBounds:=bounds;
       box1long3:Show();
       
       local bounds:=clone(box2long3.viewBounds);
       bounds.left:=0;
       bounds.right:=108;
       bounds.top:=180;
       bounds.bottom:=216;
       box2long3.viewBounds:=bounds;
       box2long3:Show();
       
       local bounds:=clone(box3long3.viewBounds);
       bounds.left:=0;
       bounds.right:=108;
       bounds.top:=216;
       bounds.bottom:=252;
       box3long3.viewBounds:=bounds;
       box3long3:Hide();
       
       //tall boxes that are 2
       
       local bounds:=clone(box1tall2.viewBounds);
       bounds.left:=0;
       bounds.right:=36;
       bounds.top:=108;
       bounds.bottom:=180;
       box1tall2.viewBounds:=bounds;
       box1tall2:Show();
       
       local bounds:=clone(box2tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=252;
       bounds.top:=36;
       bounds.bottom:=108;
       box2tall2.viewBounds:=bounds;
       box2tall2:Hide();
       
       local bounds:=clone(box3tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=252;
       bounds.top:=36;
       bounds.bottom:=108;
       box3tall2.viewBounds:=bounds;
       box3tall2:Hide();
       
       local bounds:=clone(box4tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=252;
       bounds.top:=36;
       bounds.bottom:=108;
       box4tall2.viewBounds:=bounds;
       box4tall2:Hide();
       
       local bounds:=clone(box5tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=252;
       bounds.top:=36;
       bounds.bottom:=108;
       box5tall2.viewBounds:=bounds;
       box5tall2:Hide();
       
       local bounds:=clone(box6tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=252;
       bounds.top:=36;
       bounds.bottom:=108;
       box6tall2.viewBounds:=bounds;
       box6tall2:Hide();
       
       //Tall Boxes with 3
       
       local bounds:=clone(box1tall3.viewBounds);
       bounds.left:=108;
       bounds.right:=144;
       bounds.top:=0;
       bounds.bottom:=108;
       box1tall3.viewBounds:=bounds;
       box1tall3:Show();
       
       local bounds:=clone(box2tall3.viewBounds);
       bounds.left:=180;
       bounds.right:=216;
       bounds.top:=36;
       bounds.bottom:=144;
       box2tall3.viewBounds:=bounds;
       box2tall3:Show();
       
       local bounds:=clone(box3tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=252;
       bounds.top:=36;
       bounds.bottom:=108;
       box3tall3.viewBounds:=bounds;
       box3tall3:Hide();
       
       
       
       
       
       
       
       end,
     rightValid:
       func()
       begin
       local doMove;
       if boxType then
       	doMove:=1;
       
       bounds:=clone(boxChosen.viewBounds);
       foreach box in [box1long2,box2long2,box3long2,box4long2,box5long2,box6long2,box1long3,box2long3,box3long3] do
       		begin
       			boxBounds:=box.viewBounds;
       			if bounds.top = boxBounds.top and bounds.right = boxBounds.left then
       				doMove:=nil;
       		end;
       
       foreach box in [mainCar,box1tall2,box2tall2,box3tall2,box4tall2,box5tall2,box6tall2] do
       		begin
       			boxBounds:=box.viewBounds;
       			if (bounds.top = boxBounds.top or (bounds.top - 36) = boxBounds.top) and bounds.right = boxBounds.left then
       				doMove:=nil;
       		end;
       foreach box in [box1tall3,box2tall3,box3tall3] do
       		begin
       			boxBounds:=box.viewBounds;
       			if (bounds.top = boxBounds.top or (bounds.top - 36) = boxBounds.top or (bounds.top - 72)= boxBounds.top) and bounds.right = boxBounds.left then
       				doMove:=nil;
       		end;
       return doMove;
       end;,
     level12:
       func()
       begin
       
       //main box
       
       local bounds:=clone(mainCar.viewBounds);
       bounds.left:=72;
       bounds.right:=bounds.left + 36;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 72;
       mainCar.viewBounds:=bounds;
       
       //long boxes that are 2
       
       local bounds:=clone(box1long2.viewBounds);
       bounds.left:=36;
       bounds.right:=bounds.left + 72;
       bounds.top:=72;
       bounds.bottom:=bounds.top + 36;
       box1long2.viewBounds:=bounds;
       box1long2:Show();
       
       local bounds:=clone(box2long2.viewBounds);
       bounds.left:=72;
       bounds.right:=bounds.left + 72;
       bounds.top:=180;
       bounds.bottom:=bounds.top + 36;
       box2long2.viewBounds:=bounds;
       box2long2:Show();
       
       local bounds:=clone(box3long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box3long2.viewBounds:=bounds;
       box3long2:Hide();
       
       local bounds:=clone(box4long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box4long2.viewBounds:=bounds;
       box4long2:Hide();
       
       local bounds:=clone(box5long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box5long2.viewBounds:=bounds;
       box5long2:Hide();
       
       local bounds:=clone(box6long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box6long2.viewBounds:=bounds;
       box6long2:Hide();
       
       //long boxes that are 3
       
       local bounds:=clone(box1long3.viewBounds);
       bounds.left:=72;
       bounds.right:=bounds.left + 108;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 36;
       box1long3.viewBounds:=bounds;
       box1long3:Show();
       
       local bounds:=clone(box2long3.viewBounds);
       bounds.left:=108;
       bounds.right:=bounds.left + 108;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 36;
       box2long3.viewBounds:=bounds;
       box2long3:Show();
       
       local bounds:=clone(box3long3.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 108;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box3long3.viewBounds:=bounds;
       box3long3:Hide();
       
       //tall boxes that are 2
       
       local bounds:=clone(box1tall2.viewBounds);
       bounds.left:=36;
       bounds.right:=bounds.left + 36;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 72;
       box1tall2.viewBounds:=bounds;
       box1tall2:Show();
       
       local bounds:=clone(box2tall2.viewBounds);
       bounds.left:=108;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box2tall2.viewBounds:=bounds;
       box2tall2:Show();
       
       local bounds:=clone(box3tall2.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 36;
       bounds.top:=144;
       bounds.bottom:=bounds.top + 72;
       box3tall2.viewBounds:=bounds;
       box3tall2:Show();
       
       local bounds:=clone(box4tall2.viewBounds);
       bounds.left:=144;
       bounds.right:=bounds.left + 36;
       bounds.top:=144;
       bounds.bottom:=bounds.top + 72;
       box4tall2.viewBounds:=bounds;
       box4tall2:Show();
       
       local bounds:=clone(box5tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box5tall2.viewBounds:=bounds;
       box5tall2:Hide();
       
       local bounds:=clone(box6tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box6tall2.viewBounds:=bounds;
       box6tall2:Hide();
       
       //Tall Boxes with 3
       
       local bounds:=clone(box1tall3.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 36;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 108;
       box1tall3.viewBounds:=bounds;
       box1tall3:Show();
       
       local bounds:=clone(box2tall3.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 36;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 108;
       box2tall3.viewBounds:=bounds;
       box2tall3:Show();
       
       local bounds:=clone(box3tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 108;
       box3tall3.viewBounds:=bounds;
       box3tall3:Hide();
       
       end,
     level9:
       func()
       begin
       
       //main box
       
       local bounds:=clone(mainCar.viewBounds);
       bounds.left:=72;
       bounds.right:=bounds.left + 36;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 72;
       mainCar.viewBounds:=bounds;
       
       //long boxes that are 2
       
       local bounds:=clone(box1long2.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 72;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 36;
       box1long2.viewBounds:=bounds;
       box1long2:Show();
       
       local bounds:=clone(box2long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box2long2.viewBounds:=bounds;
       box2long2:Hide();
       
       local bounds:=clone(box3long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box3long2.viewBounds:=bounds;
       box3long2:Hide();
       
       local bounds:=clone(box4long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box4long2.viewBounds:=bounds;
       box4long2:Hide();
       
       local bounds:=clone(box5long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box5long2.viewBounds:=bounds;
       box5long2:Hide();
       
       local bounds:=clone(box6long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box6long2.viewBounds:=bounds;
       box6long2:Hide();
       
       //long boxes that are 3
       
       local bounds:=clone(box1long3.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 108;
       bounds.top:=72;
       bounds.bottom:=bounds.top + 36;
       box1long3.viewBounds:=bounds;
       box1long3:Show();
       
       local bounds:=clone(box2long3.viewBounds);
       bounds.left:=36;
       bounds.right:=bounds.left + 108;
       bounds.top:=180;
       bounds.bottom:=bounds.top + 36;
       box2long3.viewBounds:=bounds;
       box2long3:Show();
       
       local bounds:=clone(box3long3.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 108;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box3long3.viewBounds:=bounds;
       box3long3:Hide();
       
       //tall boxes that are 2
       
       local bounds:=clone(box1tall2.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 36;
       bounds.top:=144;
       bounds.bottom:=bounds.top + 72;
       box1tall2.viewBounds:=bounds;
       box1tall2:Show();
       
       local bounds:=clone(box2tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box2tall2.viewBounds:=bounds;
       box2tall2:Hide();
       
       local bounds:=clone(box3tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box3tall2.viewBounds:=bounds;
       box3tall2:Hide();
       
       local bounds:=clone(box4tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box4tall2.viewBounds:=bounds;
       box4tall2:Hide();
       
       local bounds:=clone(box5tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box5tall2.viewBounds:=bounds;
       box5tall2:Hide();
       
       local bounds:=clone(box6tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box6tall2.viewBounds:=bounds;
       box6tall2:Hide();
       
       //Tall Boxes with 3
       
       local bounds:=clone(box1tall3.viewBounds);
       bounds.left:=108;
       bounds.right:=bounds.left + 36;
       bounds.top:=72;
       bounds.bottom:=bounds.top + 108;
       box1tall3.viewBounds:=bounds;
       box1tall3:Show();
       
       local bounds:=clone(box2tall3.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 36;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 108;
       box2tall3.viewBounds:=bounds;
       box2tall3:Show();
       
       local bounds:=clone(box3tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 108;
       box3tall3.viewBounds:=bounds;
       box3tall3:Hide();
       
       end,
     winner:
       // This function checks with up arrow for the car exit
       func()
       begin
       	bounds:=mainCar.viewBounds;
       	if bounds.top=0 and bounds.left=72 and bounds.right=108 then
       		begin
       		:SysBeep();
       		if levelPlaying = 1 and levelTotal = 1 then
       			begin
       			levelTotal:=levelTotal + 1;
       			SetAdd(levelPopup,"Level 2",1);
       			:addNewLevel();
       			end;
       		if levelPlaying = 2 and levelTotal = 2 then
       			begin
       			levelTotal:=levelTotal + 1;
       			SetAdd(levelPopup,"Level 3",1);
       			:addNewLevel();
       			end;
       		if levelPlaying = 3 and levelTotal = 3 then	
       			begin
       			levelTotal:=levelTotal + 1;
       			SetAdd(levelPopup,"Level 4",1);
       			:addNewLevel();
       			end;
       		if levelPlaying = 4 and levelTotal = 4 then	
       			begin
       			levelTotal:=levelTotal + 1;
       			SetAdd(levelPopup,"Level 5",1);
       			:addNewLevel();
       			end;
       		if levelPlaying = 5 and levelTotal = 5 then	
       			begin
       			levelTotal:=levelTotal + 1;
       			SetAdd(levelPopup,"Level 6",1);
       			:addNewLevel();
       			end;
       		if levelPlaying = 6 and levelTotal = 6 then	
       			begin
       			levelTotal:=levelTotal + 1;
       			SetAdd(levelPopup,"Level 7",1);
       			:addNewLevel();
       			end;
       		if levelPlaying = 7 and levelTotal = 7 then	
       			begin
       			levelTotal:=levelTotal + 1;
       			SetAdd(levelPopup,"Level 8",1);
       			:addNewLevel();
       			end;
       		if levelPlaying = 8 and levelTotal = 8 then	
       			begin
       			levelTotal:=levelTotal + 1;
       			SetAdd(levelPopup,"Level 9",1);
       			:addNewLevel();
       			end;
       		if levelPlaying = 9 and levelTotal = 9 then	
       			begin
       			levelTotal:=levelTotal + 1;
       			SetAdd(levelPopup,"Level 10",1);
       			:addNewLevel();
       			end;
       		if levelPlaying = 10 and levelTotal = 10 then	
       			begin
       			levelTotal:=levelTotal + 1;
       			SetAdd(levelPopup,"Level 11",1);
       			:addNewLevel();
       			end;
       		if levelPlaying = 11 and levelTotal = 11 then	
       			begin
       			levelTotal:=levelTotal + 1;
       			SetAdd(levelPopup,"Level 12",1);
       			:addNewLevel();
       			end;
       		if levelPlaying = 12 and levelTotal = 12 then	
       			begin
       			levelTotal:=levelTotal + 1;
       			SetAdd(levelPopup,"Level 13",1);
       			:addNewLevel();
       			end;
       		if levelPlaying = 13 and levelTotal = 13 then	
       			begin
       			levelTotal:=levelTotal + 1;
       			SetAdd(levelPopup,"Level 14",1);
       			:addNewLevel();
       			end;
       		if levelPlaying = 14 and levelTotal = 14 then	
       			begin
       			levelTotal:=levelTotal + 1;
       			SetAdd(levelPopup,"Level 15",1);
       			:addNewLevel();
       			end;
       		if levelPlaying = 15 and levelTotal = 15 then	
       			begin
       			levelTotal:=levelTotal + 1;
       			SetAdd(levelPopup,"Level 16",1);
       			:addNewLevel();
       			end;
       		if levelPlaying = 16 and levelTotal = 16 then	
       			begin
       			levelTotal:=levelTotal + 1;
       			SetAdd(levelPopup,"Level 17",1);
       			:addNewLevel();
       			end;
       		if levelPlaying = 17 and levelTotal = 17 then	
       			begin
       			levelTotal:=levelTotal + 1;
       			SetAdd(levelPopup,"Level 18",1);
       			:addNewLevel();
       			end;
       		if levelPlaying = 18 and levelTotal = 18 then	
       			begin
       			levelTotal:=levelTotal + 1;
       			SetAdd(levelPopup,"Level 19",1);
       			:addNewLevel();
       			end;
       		if levelPlaying = 19 and levelTotal = 19 then	
       			begin
       			levelTotal:=levelTotal + 1;
       			SetAdd(levelPopup,"Level 20",1);
       			:addNewLevel();
       			end;
       		Print("Open level pikcer");
       		newMenu:ButtonClickScript();
       		left:open();
       		right:open();
       		up:open();
       		down:open();
       end;
       end;,
     level17:
       func()
       begin
       
       //main box
       
       local bounds:=clone(mainCar.viewBounds);
       bounds.left:=72;
       bounds.right:=bounds.left + 36;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 72;
       mainCar.viewBounds:=bounds;
       
       //long boxes that are 2
       
       local bounds:=clone(box1long2.viewBounds);
       bounds.left:=36;
       bounds.right:=bounds.left + 72;
       bounds.top:=72;
       bounds.bottom:=bounds.top + 36;
       box1long2.viewBounds:=bounds;
       box1long2:Show();
       
       local bounds:=clone(box2long2.viewBounds);
       bounds.left:=72;
       bounds.right:=bounds.left + 72;
       bounds.top:=180;
       bounds.bottom:=bounds.top + 36;
       box2long2.viewBounds:=bounds;
       box2long2:Show();
       
       local bounds:=clone(box3long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box3long2.viewBounds:=bounds;
       box3long2:Hide();
       
       local bounds:=clone(box4long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box4long2.viewBounds:=bounds;
       box4long2:Hide();
       
       local bounds:=clone(box5long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box5long2.viewBounds:=bounds;
       box5long2:Hide();
       
       local bounds:=clone(box6long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box6long2.viewBounds:=bounds;
       box6long2:Hide();
       
       //long boxes that are 3
       
       local bounds:=clone(box1long3.viewBounds);
       bounds.left:=72;
       bounds.right:=bounds.left + 108;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 36;
       box1long3.viewBounds:=bounds;
       box1long3:Show();
       
       local bounds:=clone(box2long3.viewBounds);
       bounds.left:=108;
       bounds.right:=bounds.left + 108;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 36;
       box2long3.viewBounds:=bounds;
       box2long3:Show();
       
       local bounds:=clone(box3long3.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 108;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box3long3.viewBounds:=bounds;
       box3long3:Hide();
       
       //tall boxes that are 2
       
       local bounds:=clone(box1tall2.viewBounds);
       bounds.left:=36;
       bounds.right:=bounds.left + 36;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 72;
       box1tall2.viewBounds:=bounds;
       box1tall2:Show();
       
       local bounds:=clone(box2tall2.viewBounds);
       bounds.left:=108;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box2tall2.viewBounds:=bounds;
       box2tall2:Show();
       
       local bounds:=clone(box3tall2.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 36;
       bounds.top:=144;
       bounds.bottom:=bounds.top + 72;
       box3tall2.viewBounds:=bounds;
       box3tall2:Show();
       
       local bounds:=clone(box4tall2.viewBounds);
       bounds.left:=144;
       bounds.right:=bounds.left + 36;
       bounds.top:=144;
       bounds.bottom:=bounds.top + 72;
       box4tall2.viewBounds:=bounds;
       box4tall2:Show();
       
       local bounds:=clone(box5tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box5tall2.viewBounds:=bounds;
       box5tall2:Hide();
       
       local bounds:=clone(box6tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box6tall2.viewBounds:=bounds;
       box6tall2:Hide();
       
       //Tall Boxes with 3
       
       local bounds:=clone(box1tall3.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 36;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 108;
       box1tall3.viewBounds:=bounds;
       box1tall3:Show();
       
       local bounds:=clone(box2tall3.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 36;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 108;
       box2tall3.viewBounds:=bounds;
       box2tall3:Show();
       
       local bounds:=clone(box3tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 108;
       box3tall3.viewBounds:=bounds;
       box3tall3:Hide();
       
       end,
     level1:
       func()
       begin
       
       //main box
       
       local bounds:=clone(mainCar.viewBounds);
       bounds.left:=72;
       bounds.right:=108;
       bounds.top:=108;
       bounds.bottom:=180;
       mainCar.viewBounds:=bounds;
       mainCar:Show();
       
       //long boxes that are 2
       
       local bounds:=clone(box1long2.viewBounds);
       bounds.left:=144;
       bounds.right:=216;
       bounds.top:=180;
       bounds.bottom:=216;
       box1long2.viewBounds:=bounds;
       box1long2:Show();
       
       local bounds:=clone(box2long2.viewBounds);
       bounds.left:=180;
       bounds.right:=252;
       bounds.top:=216;
       bounds.bottom:=252;
       box2long2.viewBounds:=bounds;
       box2long2:Hide();
       
       local bounds:=clone(box3long2.viewBounds);
       bounds.left:=180;
       bounds.right:=252;
       bounds.top:=216;
       bounds.bottom:=252;
       box3long2.viewBounds:=bounds;
       box3long2:Hide();
       
       local bounds:=clone(box4long2.viewBounds);
       bounds.left:=180;
       bounds.right:=252;
       bounds.top:=216;
       bounds.bottom:=252;
       box4long2.viewBounds:=bounds;
       box4long2:Hide();
       
       local bounds:=clone(box5long2.viewBounds);
       bounds.left:=180;
       bounds.right:=252;
       bounds.top:=216;
       bounds.bottom:=252;
       box5long2.viewBounds:=bounds;
       box5long2:Hide();
       
       local bounds:=clone(box6long2.viewBounds);
       bounds.left:=180;
       bounds.right:=252;
       bounds.top:=216;
       bounds.bottom:=252;
       box6long2.viewBounds:=bounds;
       box6long2:Hide();
       
       //long boxes that are 3
       
       local bounds:=clone(box1long3.viewBounds);
       bounds.left:=0;
       bounds.right:=108;
       bounds.top:=0;
       bounds.bottom:=36;
       box1long3.viewBounds:=bounds;
       box1long3:Show();
       
       local bounds:=clone(box2long3.viewBounds);
       bounds.left:=36;
       bounds.right:=144;
       bounds.top:=72;
       bounds.bottom:=108;
       box2long3.viewBounds:=bounds;
       box2long3:Show();
       
       local bounds:=clone(box3long3.viewBounds);
       bounds.left:=36;
       bounds.right:=144;
       bounds.top:=180;
       bounds.bottom:=216;
       box3long3.viewBounds:=bounds;
       box3long3:Show();
       
       //tall boxes that are 2
       
       local bounds:=clone(box1tall2.viewBounds);
       bounds.left:=144;
       bounds.right:=180;
       bounds.top:=0;
       bounds.bottom:=72;
       box1tall2.viewBounds:=bounds;
       box1tall2:Show();
       
       local bounds:=clone(box2tall2.viewBounds);
       bounds.left:=0;
       bounds.right:=36;
       bounds.top:=144;
       bounds.bottom:=216;
       box2tall2.viewBounds:=bounds;
       box2tall2:Show();
       
       local bounds:=clone(box3tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=252;
       bounds.top:=36;
       bounds.bottom:=108;
       box3tall2.viewBounds:=bounds;
       box3tall2:Hide();
       
       local bounds:=clone(box4tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=252;
       bounds.top:=36;
       bounds.bottom:=108;
       box4tall2.viewBounds:=bounds;
       box4tall2:Hide();
       
       local bounds:=clone(box5tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=252;
       bounds.top:=36;
       bounds.bottom:=108;
       box5tall2.viewBounds:=bounds;
       box5tall2:Hide();
       
       local bounds:=clone(box6tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=252;
       bounds.top:=36;
       bounds.bottom:=108;
       box6tall2.viewBounds:=bounds;
       box6tall2:Hide();
       
       //Tall Boxes with 3
       
       local bounds:=clone(box1tall3.viewBounds);
       bounds.left:=180;
       bounds.right:=216;
       bounds.top:=36;
       bounds.bottom:=144;
       box1tall3.viewBounds:=bounds;
       box1tall3:Show();
       
       local bounds:=clone(box2tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=252;
       bounds.top:=36;
       bounds.bottom:=108;
       box2tall3.viewBounds:=bounds;
       box2tall3:Hide();
       
       local bounds:=clone(box3tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=252;
       bounds.top:=36;
       bounds.bottom:=108;
       box3tall3.viewBounds:=bounds;
       box3tall3:Hide();
       
       end,
     boxSize: nil,
     boxArray: nil		,
     declareSelf: 'base,
     ViewSetupFormScript:
       // be sure to call inherited:?ViewSetupFormScript()
       func()
       begin
       	inherited:?ViewSetupFormScript();
       	internal:=GetStores()[0];
       	if internal:HasSoup("Levels") then
       		begin
       		Print("has levels");
       		end;
       	else
       		begin
       		Print("theScores create Levels soup");
       		theScores:= internal:CreateSoupXMit("Levels", [ 
       			{structure: 'slot, path: 'game, type: 'symbol},
       			{structure: 'slot, path: 'score, type: 'int},
       			{structure: 'slot, path: 'level, type: 'int}],
       			kAppSymbol);		
       		Print("create an entry");
       		theScores:AddXmit(call newHighScore with ('RushHour,1,1),'kAppSymbol);
       		end;
       	Print("Get Union Soup");
       	theSoup := GetUnionSoup("Levels");
       	Print("Get Cursor");
       	scoreCursor := theSoup:Query(nil);
       	Print("Get Entry");
       	scoreEntry:=scoreCursor:Entry();
       	Print("levelPlaying is equal to score");
       	levelTotal:=scoreEntry.score;
       
       levelPopup:=[];
       if levelTotal >=1 then
       	SetAdd(levelPopup,"Level 1",1);
       if levelTotal >=2 then
       	SetAdd(levelPopup,"Level 2",1);
       if levelTotal >=3 then
       	SetAdd(levelPopup,"Level 3",1);
       if levelTotal >=4 then
       	SetAdd(levelPopup,"Level 4",1);
       if levelTotal >=5 then
       	SetAdd(levelPopup,"Level 5",1);
       if levelTotal >=6 then
       	SetAdd(levelPopup,"Level 6",1);
       if levelTotal >=7 then
       	SetAdd(levelPopup,"Level 7",1);
       if levelTotal >=8 then
       	SetAdd(levelPopup,"Level 8",1);
       if levelTotal >=9 then
       	SetAdd(levelPopup,"Level 9",1);
       if levelTotal >=10 then
       	SetAdd(levelPopup,"Level 10",1);
       if levelTotal >=11 then
       	SetAdd(levelPopup,"Level 11",1);
       if levelTotal >=12 then
       	SetAdd(levelPopup,"Level 12",1);
       if levelTotal >=13 then
       	SetAdd(levelPopup,"Level 13",1);
       if levelTotal >=14 then
       	SetAdd(levelPopup,"Level 14",1);
       if levelTotal >=15 then
       	SetAdd(levelPopup,"Level 15",1);
       if levelTotal >=16 then
       	SetAdd(levelPopup,"Level 16",1);
       if levelTotal >=17 then
       	SetAdd(levelPopup,"Level 17",1);
       if levelTotal >=18 then
       	SetAdd(levelPopup,"Level 18",1);
       if levelTotal >=19 then
       	SetAdd(levelPopup,"Level 19",1);
       if levelTotal >=20 then
       	SetAdd(levelPopup,"Level 20",1);
       
       	inherited:?ViewSetupFormScript();
       	newLevelPopup:=Clone(newMenu.popup);
       	newLevelPopup:=levelPopup;
       	newMenu.popup:=newLevelPopup;
       
       
       
       end,
     level6:
       func()
       begin
       
       //main box
       
       local bounds:=clone(mainCar.viewBounds);
       bounds.left:=72;
       bounds.right:=108;
       bounds.top:=72;
       bounds.bottom:=144;
       mainCar.viewBounds:=bounds;
       
       //long boxes that are 2
       
       local bounds:=clone(box1long2.viewBounds);
       bounds.left:=36;
       bounds.right:=108;
       bounds.top:=36;
       bounds.bottom:=72;
       box1long2.viewBounds:=bounds;
       box1long2:Show();
       
       local bounds:=clone(box2long2.viewBounds);
       bounds.left:=108;
       bounds.right:=180;
       bounds.top:=36;
       bounds.bottom:=72;
       box2long2.viewBounds:=bounds;
       box2long2:Show();
       
       local bounds:=clone(box3long2.viewBounds);
       bounds.left:=0;
       bounds.right:=72;
       bounds.top:=108;
       bounds.bottom:=144;
       box3long2.viewBounds:=bounds;
       box3long2:Show();
       
       local bounds:=clone(box4long2.viewBounds);
       bounds.left:=72;
       bounds.right:=144;
       bounds.top:=144;
       bounds.bottom:=180;
       box4long2.viewBounds:=bounds;
       box4long2:Show();
       
       local bounds:=clone(box5long2.viewBounds);
       bounds.left:=180;
       bounds.right:=252;
       bounds.top:=216;
       bounds.bottom:=252;
       box5long2.viewBounds:=bounds;
       box5long2:Hide();
       
       local bounds:=clone(box6long2.viewBounds);
       bounds.left:=180;
       bounds.right:=252;
       bounds.top:=216;
       bounds.bottom:=252;
       box6long2.viewBounds:=bounds;
       box6long2:Hide();
       
       //long boxes that are 3
       
       local bounds:=clone(box1long3.viewBounds);
       bounds.left:=0;
       bounds.right:=108;
       bounds.top:=216;
       bounds.bottom:=252;
       box1long3.viewBounds:=bounds;
       box1long3:Hide();
       
       local bounds:=clone(box2long3.viewBounds);
       bounds.left:=0;
       bounds.right:=108;
       bounds.top:=216;
       bounds.bottom:=252;
       box2long3.viewBounds:=bounds;
       box2long3:Hide();
       
       local bounds:=clone(box3long3.viewBounds);
       bounds.left:=0;
       bounds.right:=108;
       bounds.top:=216;
       bounds.bottom:=252;
       box3long3.viewBounds:=bounds;
       box3long3:Hide();
       
       //tall boxes that are 2
       
       local bounds:=clone(box1tall2.viewBounds);
       bounds.left:=0;
       bounds.right:=36;
       bounds.top:=36;
       bounds.bottom:=108;
       box1tall2.viewBounds:=bounds;
       box1tall2:Show();
       
       local bounds:=clone(box2tall2.viewBounds);
       bounds.left:=108;
       bounds.right:=144;
       bounds.top:=72;
       bounds.bottom:=144;
       box2tall2.viewBounds:=bounds;
       box2tall2:Show();
       
       local bounds:=clone(box3tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=252;
       bounds.top:=36;
       bounds.bottom:=108;
       box3tall2.viewBounds:=bounds;
       box3tall2:Hide();
       
       local bounds:=clone(box4tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=252;
       bounds.top:=36;
       bounds.bottom:=108;
       box4tall2.viewBounds:=bounds;
       box4tall2:Hide();
       
       local bounds:=clone(box5tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=252;
       bounds.top:=36;
       bounds.bottom:=108;
       box5tall2.viewBounds:=bounds;
       box5tall2:Hide();
       
       local bounds:=clone(box6tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=252;
       bounds.top:=36;
       bounds.bottom:=108;
       box6tall2.viewBounds:=bounds;
       box6tall2:Hide();
       
       //Tall Boxes with 3
       
       local bounds:=clone(box1tall3.viewBounds);
       bounds.left:=144;
       bounds.right:=180;
       bounds.top:=72;
       bounds.bottom:=180;
       box1tall3.viewBounds:=bounds;
       box1tall3:Show();
       
       local bounds:=clone(box2tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=252;
       bounds.top:=36;
       bounds.bottom:=108;
       box2tall3.viewBounds:=bounds;
       box2tall3:Hide();
       
       local bounds:=clone(box3tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=252;
       bounds.top:=36;
       bounds.bottom:=108;
       box3tall3.viewBounds:=bounds;
       box3tall3:Hide();
       
       
       
       
       
       
       
       end,
     level14:
       func()
       begin
       
       //main box
       
       local bounds:=clone(mainCar.viewBounds);
       bounds.left:=72;
       bounds.right:=bounds.left + 36;
       bounds.top:=144;
       bounds.bottom:=bounds.top + 72;
       mainCar.viewBounds:=bounds;
       
       //long boxes that are 2
       
       local bounds:=clone(box1long2.viewBounds);
       bounds.left:=36;
       bounds.right:=bounds.left + 72;
       bounds.top:=72;
       bounds.bottom:=bounds.top + 36;
       box1long2.viewBounds:=bounds;
       box1long2:Show();
       
       local bounds:=clone(box2long2.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 72;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 36;
       box2long2.viewBounds:=bounds;
       box2long2:Show();
       
       local bounds:=clone(box3long2.viewBounds);
       bounds.left:=72;
       bounds.right:=bounds.left + 72;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 36;
       box3long2.viewBounds:=bounds;
       box3long2:Show();
       
       local bounds:=clone(box4long2.viewBounds);
       bounds.left:=144;
       bounds.right:=bounds.left + 72;
       bounds.top:=144;
       bounds.bottom:=bounds.top + 36;
       box4long2.viewBounds:=bounds;
       box4long2:Show();
       
       local bounds:=clone(box5long2.viewBounds);
       bounds.left:=144;
       bounds.right:=bounds.left + 72;
       bounds.top:=180;
       bounds.bottom:=bounds.top + 36;
       box5long2.viewBounds:=bounds;
       box5long2:Show();
       
       local bounds:=clone(box6long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box6long2.viewBounds:=bounds;
       box6long2:Hide();
       
       //long boxes that are 3
       
       local bounds:=clone(box1long3.viewBounds);
       bounds.left:=72;
       bounds.right:=bounds.left + 108;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 36;
       box1long3.viewBounds:=bounds;
       box1long3:Show();
       
       local bounds:=clone(box2long3.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 108;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box2long3.viewBounds:=bounds;
       box2long3:Hide();
       
       local bounds:=clone(box3long3.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 108;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box3long3.viewBounds:=bounds;
       box3long3:Hide();
       
       //tall boxes that are 2
       
       local bounds:=clone(box1tall2.viewBounds);
       bounds.left:=108;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box1tall2.viewBounds:=bounds;
       box1tall2:Show();
       
       local bounds:=clone(box2tall2.viewBounds);
       bounds.left:=144;
       bounds.right:=bounds.left + 36;
       bounds.top:=72;
       bounds.bottom:=bounds.top + 72;
       box2tall2.viewBounds:=bounds;
       box2tall2:Show();
       
       local bounds:=clone(box3tall2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 36;
       bounds.top:=72;
       bounds.bottom:=bounds.top + 72;
       box3tall2.viewBounds:=bounds;
       box3tall2:Show();
       
       local bounds:=clone(box4tall2.viewBounds);
       bounds.left:=108;
       bounds.right:=bounds.left + 36;
       bounds.top:=144;
       bounds.bottom:=bounds.top + 72;
       box4tall2.viewBounds:=bounds;
       box4tall2:Show();
       
       local bounds:=clone(box5tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box5tall2.viewBounds:=bounds;
       box5tall2:Hide();
       
       local bounds:=clone(box6tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box6tall2.viewBounds:=bounds;
       box6tall2:Hide();
       
       //Tall Boxes with 3
       
       local bounds:=clone(box1tall3.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 36;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 108;
       box1tall3.viewBounds:=bounds;
       box1tall3:Show();
       
       local bounds:=clone(box2tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 108;
       box2tall3.viewBounds:=bounds;
       box2tall3:Hide();
       
       local bounds:=clone(box3tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 108;
       box3tall3.viewBounds:=bounds;
       box3tall3:Hide();
       
       end,
     viewClass: 74,
     debug: "Main",
     boxChosen: nil,
     level19:
       func()
       begin
       
       //main box
       
       local bounds:=clone(mainCar.viewBounds);
       bounds.left:=72;
       bounds.right:=bounds.left + 36;
       bounds.top:=144;
       bounds.bottom:=bounds.top + 72;
       mainCar.viewBounds:=bounds;
       
       //long boxes that are 2
       
       local bounds:=clone(box1long2.viewBounds);
       bounds.left:=72;
       bounds.right:=bounds.left + 72;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 36;
       box1long2.viewBounds:=bounds;
       box1long2:Show();
       
       local bounds:=clone(box2long2.viewBounds);
       bounds.left:=36;
       bounds.right:=bounds.left + 72;
       bounds.top:=72;
       bounds.bottom:=bounds.top + 36;
       box2long2.viewBounds:=bounds;
       box2long2:Show();
       
       local bounds:=clone(box3long2.viewBounds);
       bounds.left:=108;
       bounds.right:=bounds.left + 72;
       bounds.top:=72;
       bounds.bottom:=bounds.top + 36;
       box3long2.viewBounds:=bounds;
       box3long2:Show();
       
       local bounds:=clone(box4long2.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 72;
       bounds.top:=180;
       bounds.bottom:=bounds.top + 36;
       box4long2.viewBounds:=bounds;
       box4long2:Show();
       
       local bounds:=clone(box5long2.viewBounds);
       bounds.left:=144;
       bounds.right:=bounds.left + 72;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 36;
       box5long2.viewBounds:=bounds;
       box5long2:Show();
       
       local bounds:=clone(box6long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box6long2.viewBounds:=bounds;
       box6long2:Hide();
       
       //long boxes that are 3
       
       local bounds:=clone(box1long3.viewBounds);
       bounds.left:=36;
       bounds.right:=bounds.left + 108;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 36;
       box1long3.viewBounds:=bounds;
       box1long3:Show();
       
       local bounds:=clone(box2long3.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 108;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box2long3.viewBounds:=bounds;
       box2long3:Hide();
       
       local bounds:=clone(box3long3.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 108;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box3long3.viewBounds:=bounds;
       box3long3:Hide();
       
       //tall boxes that are 2
       
       local bounds:=clone(box1tall2.viewBounds);
       bounds.left:=144;
       bounds.right:=bounds.left + 36;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 72;
       box1tall2.viewBounds:=bounds;
       box1tall2:Show();
       
       local bounds:=clone(box2tall2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box2tall2.viewBounds:=bounds;
       box2tall2:Show();
       
       local bounds:=clone(box3tall2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 36;
       bounds.top:=144;
       bounds.bottom:=bounds.top + 72;
       box3tall2.viewBounds:=bounds;
       box3tall2:Show();
       
       local bounds:=clone(box4tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box4tall2.viewBounds:=bounds;
       box4tall2:Hide();
       
       local bounds:=clone(box5tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box5tall2.viewBounds:=bounds;
       box5tall2:Hide();
       
       local bounds:=clone(box6tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box6tall2.viewBounds:=bounds;
       box6tall2:Hide();
       
       //Tall Boxes with 3
       
       local bounds:=clone(box1tall3.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 36;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 108;
       box1tall3.viewBounds:=bounds;
       box1tall3:Show();
       
       local bounds:=clone(box2tall3.viewBounds);
       bounds.left:=108;
       bounds.right:=bounds.left + 36;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 108;
       box2tall3.viewBounds:=bounds;
       box2tall3:Show();
       
       local bounds:=clone(box3tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 108;
       box3tall3.viewBounds:=bounds;
       box3tall3:Hide();
       
       end,
     level3:
       func()
       begin
       
       //main box
       
       local bounds:=clone(mainCar.viewBounds);
       bounds.left:=72;
       bounds.right:=108;
       bounds.top:=144;
       bounds.bottom:=216;
       mainCar.viewBounds:=bounds;
       
       //long boxes that are 2
       
       local bounds:=clone(box1long2.viewBounds);
       bounds.left:=72;
       bounds.right:=144;
       bounds.top:=0;
       bounds.bottom:=36;
       box1long2.viewBounds:=bounds;
       box1long2:Show();
       
       local bounds:=clone(box2long2.viewBounds);
       bounds.left:=144;
       bounds.right:=216;
       bounds.top:=0;
       bounds.bottom:=36;
       box2long2.viewBounds:=bounds;
       box2long2:Show();
       
       local bounds:=clone(box3long2.viewBounds);
       bounds.left:=36;
       bounds.right:=108;
       bounds.top:=72;
       bounds.bottom:=108;
       box3long2.viewBounds:=bounds;
       box3long2:Show();
       
       local bounds:=clone(box4long2.viewBounds);
       bounds.left:=144;
       bounds.right:=216;
       bounds.top:=108;
       bounds.bottom:=144;
       box4long2.viewBounds:=bounds;
       box4long2:Show();
       
       local bounds:=clone(box5long2.viewBounds);
       bounds.left:=0;
       bounds.right:=72;
       bounds.top:=144;
       bounds.bottom:=180;
       box5long2.viewBounds:=bounds;
       box5long2:Show();
       
       local bounds:=clone(box6long2.viewBounds);
       bounds.left:=180;
       bounds.right:=252;
       bounds.top:=216;
       bounds.bottom:=252;
       box6long2.viewBounds:=bounds;
       box6long2:Hide();
       
       //long boxes that are 3
       
       local bounds:=clone(box1long3.viewBounds);
       bounds.left:=72;
       bounds.right:=180;
       bounds.top:=36;
       bounds.bottom:=72;
       box1long3.viewBounds:=bounds;
       box1long3:Show();
       
       local bounds:=clone(box2long3.viewBounds);
       bounds.left:=108;
       bounds.right:=216;
       bounds.top:=180;
       bounds.bottom:=216;
       box2long3.viewBounds:=bounds;
       box2long3:Show();
       
       local bounds:=clone(box3long3.viewBounds);
       bounds.left:=0;
       bounds.right:=108;
       bounds.top:=216;
       bounds.bottom:=252;
       box3long3.viewBounds:=bounds;
       box3long3:Hide();
       
       //tall boxes that are 2
       
       local bounds:=clone(box1tall2.viewBounds);
       bounds.left:=0;
       bounds.right:=36;
       bounds.top:=0;
       bounds.bottom:=72;
       box1tall2.viewBounds:=bounds;
       box1tall2:Show();
       
       local bounds:=clone(box2tall2.viewBounds);
       bounds.left:=36;
       bounds.right:=72;
       bounds.top:=0;
       bounds.bottom:=72;
       box2tall2.viewBounds:=bounds;
       box2tall2:Show();
       
       local bounds:=clone(box3tall2.viewBounds);
       bounds.left:=0;
       bounds.right:=36;
       bounds.top:=72;
       bounds.bottom:=144;
       box3tall2.viewBounds:=bounds;
       box3tall2:Show();
       
       local bounds:=clone(box4tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=252;
       bounds.top:=36;
       bounds.bottom:=108;
       box4tall2.viewBounds:=bounds;
       box4tall2:Hide();
       
       local bounds:=clone(box5tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=252;
       bounds.top:=36;
       bounds.bottom:=108;
       box5tall2.viewBounds:=bounds;
       box5tall2:Hide();
       
       local bounds:=clone(box6tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=252;
       bounds.top:=36;
       bounds.bottom:=108;
       box6tall2.viewBounds:=bounds;
       box6tall2:Hide();
       
       //Tall Boxes with 3
       
       local bounds:=clone(box1tall3.viewBounds);
       bounds.left:=108;
       bounds.right:=144;
       bounds.top:=72;
       bounds.bottom:=180;
       box1tall3.viewBounds:=bounds;
       box1tall3:Show();
       
       local bounds:=clone(box2tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=252;
       bounds.top:=36;
       bounds.bottom:=108;
       box2tall3.viewBounds:=bounds;
       box2tall3:Hide();
       
       local bounds:=clone(box3tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=252;
       bounds.top:=36;
       bounds.bottom:=108;
       box3tall3.viewBounds:=bounds;
       box3tall3:Hide();
       
       end,
     level11:
       func()
       begin
       
       //main box
       
       local bounds:=clone(mainCar.viewBounds);
       bounds.left:=72;
       bounds.right:=bounds.left + 36;
       bounds.top:=144;
       bounds.bottom:=bounds.top + 72;
       mainCar.viewBounds:=bounds;
       
       //long boxes that are 2
       
       local bounds:=clone(box1long2.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 72;
       bounds.top:=72;
       bounds.bottom:=bounds.top + 36;
       box1long2.viewBounds:=bounds;
       box1long2:Show();
       
       local bounds:=clone(box2long2.viewBounds);
       bounds.left:=108;
       bounds.right:=bounds.left + 72;
       bounds.top:=144;
       bounds.bottom:=bounds.top + 36;
       box2long2.viewBounds:=bounds;
       box2long2:Show();
       
       local bounds:=clone(box3long2.viewBounds);
       bounds.left:=108;
       bounds.right:=bounds.left + 72;
       bounds.top:=180;
       bounds.bottom:=bounds.top + 36;
       box3long2.viewBounds:=bounds;
       box3long2:Show();
       
       local bounds:=clone(box4long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box4long2.viewBounds:=bounds;
       box4long2:Hide();
       
       local bounds:=clone(box5long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box5long2.viewBounds:=bounds;
       box5long2:Hide();
       
       local bounds:=clone(box6long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box6long2.viewBounds:=bounds;
       box6long2:Hide();
       
       //long boxes that are 3
       
       local bounds:=clone(box1long3.viewBounds);
       bounds.left:=108;
       bounds.right:=bounds.left + 108;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 36;
       box1long3.viewBounds:=bounds;
       box1long3:Show();
       
       local bounds:=clone(box2long3.viewBounds);
       bounds.left:=36;
       bounds.right:=bounds.left + 108;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 36;
       box2long3.viewBounds:=bounds;
       box2long3:Show();
       
       local bounds:=clone(box3long3.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 108;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box3long3.viewBounds:=bounds;
       box3long3:Hide();
       
       //tall boxes that are 2
       
       local bounds:=clone(box1tall2.viewBounds);
       bounds.left:=36;
       bounds.right:=bounds.left + 36;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 72;
       box1tall2.viewBounds:=bounds;
       box1tall2:Show();
       
       local bounds:=clone(box2tall2.viewBounds);
       bounds.left:=108;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box2tall2.viewBounds:=bounds;
       box2tall2:Show();
       
       local bounds:=clone(box3tall2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 36;
       bounds.top:=72;
       bounds.bottom:=bounds.top + 72;
       box3tall2.viewBounds:=bounds;
       box3tall2:Show();
       
       local bounds:=clone(box4tall2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 36;
       bounds.top:=144;
       bounds.bottom:=bounds.top + 72;
       box4tall2.viewBounds:=bounds;
       box4tall2:Show();
       
       local bounds:=clone(box5tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box5tall2.viewBounds:=bounds;
       box5tall2:Hide();
       
       local bounds:=clone(box6tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box6tall2.viewBounds:=bounds;
       box6tall2:Hide();
       
       //Tall Boxes with 3
       
       local bounds:=clone(box1tall3.viewBounds);
       bounds.left:=144;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 108;
       box1tall3.viewBounds:=bounds;
       box1tall3:Show();
       
       local bounds:=clone(box2tall3.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 36;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 108;
       box2tall3.viewBounds:=bounds;
       box2tall3:Show();
       
       local bounds:=clone(box3tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 108;
       box3tall3.viewBounds:=bounds;
       box3tall3:Hide();
       
       end,
     level20:
       func()
       begin
       
       //main box
       
       local bounds:=clone(mainCar.viewBounds);
       bounds.left:=72;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       mainCar.viewBounds:=bounds;
       
       //long boxes that are 2
       
       local bounds:=clone(box1long2.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 72;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 36;
       box1long2.viewBounds:=bounds;
       box1long2:Show();
       
       local bounds:=clone(box2long2.viewBounds);
       bounds.left:=108;
       bounds.right:=bounds.left + 72;
       bounds.top:=72;
       bounds.bottom:=bounds.top + 36;
       box2long2.viewBounds:=bounds;
       box2long2:Show();
       
       local bounds:=clone(box3long2.viewBounds);
       bounds.left:=144;
       bounds.right:=bounds.left + 72;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 36;
       box3long2.viewBounds:=bounds;
       box3long2:Show();
       
       local bounds:=clone(box4long2.viewBounds);
       bounds.left:=36;
       bounds.right:=bounds.left + 72;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 36;
       box4long2.viewBounds:=bounds;
       box4long2:Show();
       
       local bounds:=clone(box5long2.viewBounds);
       bounds.left:=36;
       bounds.right:=bounds.left + 72;
       bounds.top:=144;
       bounds.bottom:=bounds.top + 36;
       box5long2.viewBounds:=bounds;
       box5long2:Show();
       
       local bounds:=clone(box6long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box6long2.viewBounds:=bounds;
       box6long2:Hide();
       
       //long boxes that are 3
       
       local bounds:=clone(box1long3.viewBounds);
       bounds.left:=36;
       bounds.right:=bounds.left + 108;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 36;
       box1long3.viewBounds:=bounds;
       box1long3:Show();
       
       local bounds:=clone(box2long3.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 108;
       bounds.top:=180;
       bounds.bottom:=bounds.top + 36;
       box2long3.viewBounds:=bounds;
       box2long3:Show();
       
       local bounds:=clone(box3long3.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 108;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box3long3.viewBounds:=bounds;
       box3long3:Hide();
       
       //tall boxes that are 2
       
       local bounds:=clone(box1tall2.viewBounds);
       bounds.left:=144;
       bounds.right:=bounds.left + 36;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 72;
       box1tall2.viewBounds:=bounds;
       box1tall2:Show();
       
       local bounds:=clone(box2tall2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box2tall2.viewBounds:=bounds;
       box2tall2:Show();
       
       local bounds:=clone(box3tall2.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 36;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 72;
       box3tall2.viewBounds:=bounds;
       box3tall2:Show();
       
       local bounds:=clone(box4tall2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 36;
       bounds.top:=144;
       bounds.bottom:=bounds.top + 72;
       box4tall2.viewBounds:=bounds;
       box4tall2:Show();
       
       local bounds:=clone(box5tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box5tall2.viewBounds:=bounds;
       box5tall2:Hide();
       
       local bounds:=clone(box6tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box6tall2.viewBounds:=bounds;
       box6tall2:Hide();
       
       //Tall Boxes with 3
       
       local bounds:=clone(box1tall3.viewBounds);
       bounds.left:=108;
       bounds.right:=bounds.left + 36;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 108;
       box1tall3.viewBounds:=bounds;
       box1tall3:Show();
       
       local bounds:=clone(box2tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 108;
       box2tall3.viewBounds:=bounds;
       box2tall3:Hide();
       
       local bounds:=clone(box3tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 108;
       box3tall3.viewBounds:=bounds;
       box3tall3:Hide();
       
       end,
     icon3long:
       BuildPictureViewSlot({
       	imageFile4: "sidebus.bmp", 
       	maskOption: 0}),
     level8:
       func()
       begin
       
       //main box
       
       local bounds:=clone(mainCar.viewBounds);
       bounds.left:=72;
       bounds.right:=bounds.left + 36;
       bounds.top:=108;
       bounds.bottom:=bounds.top + 72;
       mainCar.viewBounds:=bounds;
       
       //long boxes that are 2
       
       local bounds:=clone(box1long2.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 72;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 36;
       box1long2.viewBounds:=bounds;
       box1long2:Show();
       
       local bounds:=clone(box2long2.viewBounds);
       bounds.left:=72;
       bounds.right:=bounds.left + 72;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 36;
       box2long2.viewBounds:=bounds;
       box2long2:Show();
       
       local bounds:=clone(box3long2.viewBounds);
       bounds.left:=144;
       bounds.right:=bounds.left + 72;
       bounds.top:=180;
       bounds.bottom:=bounds.top + 36;
       box3long2.viewBounds:=bounds;
       box3long2:Show();
       
       local bounds:=clone(box4long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box4long2.viewBounds:=bounds;
       box4long2:Hide();
       
       local bounds:=clone(box5long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box5long2.viewBounds:=bounds;
       box5long2:Hide();
       
       local bounds:=clone(box6long2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 72;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box6long2.viewBounds:=bounds;
       box6long2:Hide();
       
       //long boxes that are 3
       
       local bounds:=clone(box1long3.viewBounds);
       bounds.left:=36;
       bounds.right:=bounds.left + 108;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 36;
       box1long3.viewBounds:=bounds;
       box1long3:Show();
       
       local bounds:=clone(box2long3.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 108;
       bounds.top:=72;
       bounds.bottom:=bounds.top + 36;
       box2long3.viewBounds:=bounds;
       box2long3:Show();
       
       local bounds:=clone(box3long3.viewBounds);
       bounds.left:=36;
       bounds.right:=bounds.left + 108;
       bounds.top:=216;
       bounds.bottom:=bounds.top + 36;
       box3long3.viewBounds:=bounds;
       box3long3:Hide();
       
       //tall boxes that are 2
       
       local bounds:=clone(box1tall2.viewBounds);
       bounds.left:=144;
       bounds.right:=bounds.left + 36;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 72;
       box1tall2.viewBounds:=bounds;
       box1tall2:Show();
       
       local bounds:=clone(box2tall2.viewBounds);
       bounds.left:=180;
       bounds.right:=bounds.left + 36;
       bounds.top:=0;
       bounds.bottom:=bounds.top + 72;
       box2tall2.viewBounds:=bounds;
       box2tall2:Show();
       
       local bounds:=clone(box3tall2.viewBounds);
       bounds.left:=0;
       bounds.right:=bounds.left + 36;
       bounds.top:=144;
       bounds.bottom:=bounds.top + 72;
       box3tall2.viewBounds:=bounds;
       box3tall2:Show();
       
       local bounds:=clone(box4tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box4tall2.viewBounds:=bounds;
       box4tall2:Hide();
       
       local bounds:=clone(box5tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box5tall2.viewBounds:=bounds;
       box5tall2:Hide();
       
       local bounds:=clone(box6tall2.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 72;
       box6tall2.viewBounds:=bounds;
       box6tall2:Hide();
       
       //Tall Boxes with 3
       
       local bounds:=clone(box1tall3.viewBounds);
       bounds.left:=108;
       bounds.right:=bounds.left + 36;
       bounds.top:=72;
       bounds.bottom:=bounds.top + 108;
       box1tall3.viewBounds:=bounds;
       box1tall3:Show();
       
       local bounds:=clone(box2tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 108;
       box2tall3.viewBounds:=bounds;
       box2tall3:Hide();
       
       local bounds:=clone(box3tall3.viewBounds);
       bounds.left:=216;
       bounds.right:=bounds.left + 36;
       bounds.top:=36;
       bounds.bottom:=bounds.top + 108;
       box3tall3.viewBounds:=bounds;
       box3tall3:Hide();
       
       end
    };

_view007 := /* child of Main */
    {
     icon:
       BuildPictureViewSlot({
       	imageFile4: "back.bmp", 
       	maskOption: 0}),
     viewBounds: {left: 0, top: 0, right: 0, bottom: 0},
     viewFlags: 1,
     viewFormat: 0,
     viewJustify: 240,
     viewClass: 76
    };



trafficFrame := /* child of Main */
    {viewBounds: {left: 35, top: 24, bottom: 276, right: 287},
     viewFlags: 1,
     viewFormat: 8192,
     debug: "trafficFrame",
     viewClass: 74
    };

_view008 := /* child of trafficFrame */
    {viewBounds: {left: 0, top: 0, right: 215, bottom: 215},
     viewFormat: 595,
     _proto: @160
    };



exit := /* child of trafficFrame */
    {viewBounds: {left: 72, top: 0, right: 108, bottom: 72},
     buttonClickScript:
       func()
       begin
       end,
     icon:
       BuildPictureViewSlot({
       	imageFile4: "exit.bmp", 
       	maskOption: 0}),
     viewJustify: 6,
     viewFormat: 337,
     debug: "exit",
     _proto: @198
    };



box1long2 := /* child of trafficFrame */
    {
     buttonClickScript:
       func()
       begin
       	boxChosen:=box1long2;
       	boxType:=1;
       :hideControls();
       end,
     text: nil,
     viewBounds: {left: 36, top: 144, right: 108, bottom: 180}
     ,
     ViewDrawScript:
       func()
       begin
       SetValue(box1long2,'viewFormat,vfFillGray);
       end,
     viewFormat: 85,
     icon:
       BuildPictureViewSlot({
       	imageFile4: "sidecar.bmp", 
       	maskOption: 0}),
     debug: "box1long2",
     _proto: @198
    };
// View box1long2 is declared to Main



box1tall3 := /* child of trafficFrame */
    {
     buttonClickScript:
       func()
       begin
       	boxChosen:=box1tall3;
       	boxType:=nil;
       :hideControls();
       end,
     text: nil,
     viewBounds: {left: 108, top: 72, right: 144, bottom: 180}
     ,
     ViewDrawScript:
       func()
       begin
       SetValue(box1tall3,'viewFormat,vfFillLtGray);
       end,
     viewFormat: 85,
     icon:
       BuildPictureViewSlot({
       	imageFile4: "uptruck.bmp", 
       	maskOption: 0}),
     debug: "box1tall3",
     _proto: @198
    };
// View box1tall3 is declared to Main



box1long3 := /* child of trafficFrame */
    {
     buttonClickScript:
       func()
       begin
       	boxChosen:=box1long3;
       	boxType:=1;
       :hideControls();
       end,
     text: nil,
     viewBounds: {left: 36, top: 180, right: 144, bottom: 216}
     ,
     ViewDrawScript:
       func()
       begin
       SetValue(box1long3,'viewFormat,vfFillBlack);
       end,
     viewFormat: 85,
     icon:
       BuildPictureViewSlot({
       	imageFile4: "sidebus.bmp", 
       	maskOption: 0}),
     debug: "box1long3",
     _proto: @198
    };
// View box1long3 is declared to Main



box2long3 := /* child of trafficFrame */
    {
     buttonClickScript:
       func()
       begin
       	boxChosen:=box2long3;
       	boxType:=1;
       	:hideControls();
       end,
     text: nil,
     viewBounds: {left: 108, top: 36, right: 216, bottom: 72},
     ViewDrawScript:
       func()
       begin
       SetValue(box2long3,'viewFormat,vfFillBlack);
       end,
     viewFormat: 85,
     icon:
       BuildPictureViewSlot({
       	imageFile4: "sidebus.bmp", 
       	maskOption: 0}),
     debug: "box2long3",
     _proto: @198
    };
// View box2long3 is declared to Main



box3long3 := /* child of trafficFrame */
    {
     buttonClickScript:
       func()
       begin
       	boxChosen:=box3long3;
       	boxType:=1;
       	:hideControls();
       :hideControls();
       end,
     text: nil,
     viewBounds: {left: 108, top: 0, right: 216, bottom: 36},
     ViewDrawScript:
       func()
       begin
       SetValue(box3long3,'viewFormat,vfFillBlack);
       end,
     viewFormat: 85,
     icon:
       BuildPictureViewSlot({
       	imageFile4: "sidebus.bmp", 
       	maskOption: 0}),
     debug: "box3long3",
     _proto: @198
    };
// View box3long3 is declared to Main



box1tall2 := /* child of trafficFrame */
    {
     buttonClickScript:
       func()
       begin
       	boxChosen:=box1tall2;
       	boxType:=nil;
       	:hideControls();
       
       end,
     text: nil,
     viewBounds: {left: 0, top: 144, right: 36, bottom: 216},
     ViewDrawScript:
       func()
       begin
       SetValue(box1tall2,'viewFormat,vfFillDkGray);
       end,
     viewFormat: 85,
     icon:
       BuildPictureViewSlot({
       	imageFile4: "upsuv.bmp", 
       	maskOption: 0}),
     debug: "box1tall2",
     _proto: @198
    };
// View box1tall2 is declared to Main



box2tall2 := /* child of trafficFrame */
    {
     buttonClickScript:
       func()
       begin
       	boxChosen:=box2tall2;
       	boxType:=nil;
       :hideControls();
       end,
     text: nil,
     viewBounds: {left: 36, top: 37, right: 72, bottom: 109},
     ViewDrawScript:
       func()
       begin
       SetValue(box2tall2,'viewFormat,vfFillDkGray);
       end,
     viewFormat: 85,
     icon:
       BuildPictureViewSlot({
       	imageFile4: "upsuv.bmp", 
       	maskOption: 0}),
     debug: "box2tall2",
     _proto: @198
    };
// View box2tall2 is declared to Main



mainCar := /* child of trafficFrame */
    {
     buttonClickScript:
       func()
       begin
       	boxChosen:=mainCar;
       	boxType:=nil;
       :hideControls();
       end,
     text: nil,
     viewBounds: {left: 72, top: 72, right: 108, bottom: 144},
     viewFormat: 5,
     icon:
       BuildPictureViewSlot({
       	imageFile4: "upmain.bmp", 
       	maskOption: 0}),
     ViewDrawScript:
       func()
       begin
       SetValue(mainCar,'viewFormat,vfFillDkGray);
       end,
     debug: "mainCar",
     _proto: @198
    };
// View mainCar is declared to Main



box3tall2 := /* child of trafficFrame */
    {
     buttonClickScript:
       func()
       begin
       	boxChosen:=box3tall2;
       	boxType:=nil;
       :hideControls();
       end,
     text: nil,
     viewBounds: {left: 144, top: 108, right: 180, bottom: 180},
     ViewDrawScript:
       func()
       begin
       SetValue(box3tall2,'viewFormat,vfFillDkGray);
       end,
     viewFormat: 85,
     icon:
       BuildPictureViewSlot({
       	imageFile4: "upsuv.bmp", 
       	maskOption: 0}),
     debug: "box3tall2",
     _proto: @198
    };
// View box3tall2 is declared to Main



box4tall2 := /* child of trafficFrame */
    {
     buttonClickScript:
       func()
       begin
       	boxChosen:=box4tall2;
       	boxType:=nil;
       :hideControls();
       end,
     text: nil,
     viewBounds: {left: 0, top: 37, right: 36, bottom: 109},
     ViewDrawScript:
       func()
       begin
       SetValue(box4tall2,'viewFormat,vfFillDkGray);
       end,
     viewFormat: 85,
     icon:
       BuildPictureViewSlot({
       	imageFile4: "upsuv.bmp", 
       	maskOption: 0}),
     debug: "box4tall2",
     _proto: @198
    };
// View box4tall2 is declared to Main



box5tall2 := /* child of trafficFrame */
    {
     buttonClickScript:
       func()
       begin
       	boxChosen:=box5tall2;
       	boxType:=nil;
       :hideControls();
       end,
     text: nil,
     viewBounds: {left: 180, top: 108, right: 216, bottom: 180},
     ViewDrawScript:
       func()
       begin
       SetValue(box5tall2,'viewFormat,vfFillDkGray);
       end,
     viewFormat: 85,
     icon:
       BuildPictureViewSlot({
       	imageFile4: "upsuv.bmp", 
       	maskOption: 0}),
     debug: "box5tall2",
     _proto: @198
    };
// View box5tall2 is declared to Main



box2long2 := /* child of trafficFrame */
    {
     buttonClickScript:
       func()
       begin
       	boxChosen:=box2long2;
       	boxType:=1;
       :hideControls();
       end,
     text: nil,
     viewBounds: {left: 144, top: 72, right: 216, bottom: 108}
     ,
     ViewDrawScript:
       func()
       begin
       SetValue(box2long2,'viewFormat,vfFillGray);
       end,
     viewFormat: 85,
     icon:
       BuildPictureViewSlot({
       	imageFile4: "sidecar.bmp", 
       	maskOption: 0}),
     debug: "box2long2",
     _proto: @198
    };
// View box2long2 is declared to Main



box3long2 := /* child of trafficFrame */
    {
     buttonClickScript:
       func()
       begin
       	boxChosen:=box3long2;
       	boxType:=1;
       :hideControls();
       end,
     text: nil,
     viewBounds: {left: 144, top: 180, right: 216, bottom: 216},
     ViewDrawScript:
       func()
       begin
       SetValue(box3long2,'viewFormat,vfFillGray);
       end,
     viewFormat: 85,
     icon:
       BuildPictureViewSlot({
       	imageFile4: "sidecar.bmp", 
       	maskOption: 0}),
     debug: "box3long2",
     _proto: @198
    };
// View box3long2 is declared to Main



box4long2 := /* child of trafficFrame */
    {
     buttonClickScript:
       func()
       begin
       	boxChosen:=box4long2;
       	boxType:=1;
       :hideControls();
       end,
     text: nil,
     viewBounds: {left: 0, top: 1, right: 72, bottom: 37},
     ViewDrawScript:
       func()
       begin
       SetValue(box4long2,'viewFormat,vfFillGray);
       end,
     viewFormat: 85,
     icon:
       BuildPictureViewSlot({
       	imageFile4: "sidecar.bmp", 
       	maskOption: 0}),
     debug: "box4long2",
     _proto: @198
    };
// View box4long2 is declared to Main



box5long2 := /* child of trafficFrame */
    {
     buttonClickScript:
       func()
       begin
       	boxChosen:=box5long2;
       	boxType:=1;
       :hideControls();
       end,
     text: nil,
     viewBounds: {left: 0, top: 108, right: 72, bottom: 144},
     ViewDrawScript:
       func()
       begin
       SetValue(box5long2,'viewFormat,vfFillGray);
       end,
     viewFormat: 85,
     icon:
       BuildPictureViewSlot({
       	imageFile4: "sidecar.bmp", 
       	maskOption: 0}),
     debug: "box5long2",
     _proto: @198
    };
// View box5long2 is declared to Main



box2tall3 := /* child of trafficFrame */
    {
     buttonClickScript:
       func()
       begin
       	boxChosen:=box2tall3;
       	boxType:=nil;
       :hideControls();
       end,
     text: nil,
     viewBounds: {left: 108, top: 72, right: 144, bottom: 180}
     ,
     ViewDrawScript:
       func()
       begin
       SetValue(box2tall3,'viewFormat,vfFillLtGray);
       end,
     viewFormat: 85,
     icon:
       BuildPictureViewSlot({
       	imageFile4: "uptruck.bmp", 
       	maskOption: 0}),
     debug: "box2tall3",
     _proto: @198
    };
// View box2tall3 is declared to Main



box3tall3 := /* child of trafficFrame */
    {
     buttonClickScript:
       func()
       begin
       	boxChosen:=box3tall3;
       	boxType:=nil;
       :hideControls();
       end,
     text: nil,
     viewBounds: {left: 108, top: 72, right: 144, bottom: 180}
     ,
     ViewDrawScript:
       func()
       begin
       SetValue(box3tall3,'viewFormat,vfFillLtGray);
       end,
     viewFormat: 85,
     icon:
       BuildPictureViewSlot({
       	imageFile4: "uptruck.bmp", 
       	maskOption: 0}),
     debug: "box3tall3",
     _proto: @198
    };
// View box3tall3 is declared to Main



box6tall2 := /* child of trafficFrame */
    {
     buttonClickScript:
       func()
       begin
       	boxChosen:=box6tall2;
       	boxType:=nil;
       :hideControls();
       end,
     text: nil,
     viewBounds: {left: 180, top: 108, right: 216, bottom: 180},
     ViewDrawScript:
       func()
       begin
       SetValue(box6tall2,'viewFormat,vfFillDkGray);
       end,
     viewFormat: 85,
     icon:
       BuildPictureViewSlot({
       	imageFile4: "upsuv.bmp", 
       	maskOption: 0}),
     debug: "box6tall2",
     _proto: @198
    };
// View box6tall2 is declared to Main



box6long2 := /* child of trafficFrame */
    {
     buttonClickScript:
       func()
       begin
       	boxChosen:=box6long2;
       	boxType:=1;
       :hideControls();
       end,
     text: nil,
     viewBounds: {left: 144, top: 72, right: 216, bottom: 108}
     ,
     ViewDrawScript:
       func()
       begin
       SetValue(box6long2,'viewFormat,vfFillGray);
       end,
     viewFormat: 85,
     icon:
       BuildPictureViewSlot({
       	imageFile4: "sidecar.bmp", 
       	maskOption: 0}),
     debug: "box6long2",
     _proto: @198
    };
// View box6long2 is declared to Main





up := /* child of Main */
    {viewBounds: {left: 129, top: 241, bottom: 274, right: 160},
     buttonClickScript:
       func()
       begin
       	local bounds:=clone(boxChosen.viewBounds);
       	
       	if bounds.top - move >= 0 and :upValid() then
       	begin
       		bounds.top:=bounds.top-move;
       		bounds.bottom:=bounds.bottom-move;
       		boxChosen.viewBounds:=bounds;
       	end;
       	:winner();
       end,
     icon:
       BuildPictureViewSlot({
       	imageFile4: "carUp.bmp", 
       	maskFile: "!", 
       	maskOption: 1}),
     viewFormat: 81,
     viewFlags: 515,
     debug: "up",
     _proto: @198
    };
// View up is declared to Main



down := /* child of Main */
    {viewBounds: {left: 129, top: 275, bottom: 308, right: 160},
     buttonClickScript:
       func()
       begin
       	local bounds:=clone(boxChosen.viewBounds);
       	
       	if bounds.bottom + move <= 216 and :downValid() then
       	begin
       		bounds.top:=bounds.top+move;
       		bounds.bottom:=bounds.bottom+move;
       		boxChosen.viewBounds:=bounds;
       	end;
       end
       
       
       ,
     icon:
       BuildPictureViewSlot({
       	imageFile4: "carDown.bmp", 
       	maskOption: 0}),
     viewFormat: 81,
     debug: "down",
     _proto: @198
    };
// View down is declared to Main



right := /* child of Main */
    {viewBounds: {left: 159, top: 258, bottom: 289, right: 192},
     buttonClickScript:
       func()
       begin
       	local bounds:=clone(boxChosen.viewBounds);
       	if bounds.right+move <= 216 and :rightValid() then
       		begin
       			bounds.right:=bounds.right+move;
       			bounds.left:=bounds.left+move;
       			boxChosen.viewBounds:=bounds;
       		end;
       end,
     icon:
       BuildPictureViewSlot({
       	imageFile4: "carRight.bmp", 
       	maskOption: 0}),
     viewFormat: 81,
     debug: "right",
     _proto: @198
    };
// View right is declared to Main



left := /* child of Main */
    {viewBounds: {left: 97, top: 258, bottom: 289, right: 130},
     buttonClickScript:
       func()
       begin
       	local bounds:=clone(boxChosen.viewBounds);
       	if bounds.left-move >= 0 and :leftValid() then
       	begin
       		bounds.right:=bounds.right-move;
       		bounds.left:=bounds.left-move;
       		boxChosen.viewBounds:=bounds;
       	end;
       end,
     icon:
       BuildPictureViewSlot({
       	imageFile4: "carLeft.bmp", 
       	maskOption: 0}),
     viewFormat: 81,
     debug: "left",
     _proto: @198
    };
// View left is declared to Main



_view009 := /* child of Main */
    {viewBounds: {left: 271, top: 291, bottom: 304, right: 284},
     viewJustify: 6,
     _proto: @163
    };



_view010 := /* child of Main */
    {viewFlags: 515,
     viewBounds: {left: 6, top: 291, bottom: 304, right: 19},
     viewJustify: 6,
     DoInfoAbout:
       func()
       begin
       about:Open();
       end,
     DoInfoHelp:
       func()
       begin
       helpBox:Open();
       end,
     _proto: @478
    };


about := /* child of Main */ LinkedSubview(aboutBox,
{viewBounds: {left: 5, top: 58, right: 25, bottom: 78}, debug: "about"})// View 
about is declared to Main

_view011 := /* child of Main */
    {title: "Rush Hour",
     viewBounds: {left: -1, top: 1, bottom: 23, right: 111},
     viewFormat: 593,
     viewFont: ROM_fontSystem12Bold,
     _proto: @229
    };


helpBox := /* child of Main */ LinkedSubview(_view001,
{viewBounds: {left: 5, top: 98, right: 25, bottom: 118}, debug: "helpBox"})
// View helpBox is declared to Main

_view012 := /* child of Main */
    {
     buttonClickScript:
       func()
       begin
       :startLevel(levelPlaying);
       end,
     text: "Reset",
     viewBounds: {left: 203, top: 291, bottom: 304, right: 260},
     _proto: @226
    };



newMenu := /* child of Main */
    {viewBounds: {left: 30, top: 291, bottom: 304, right: 87},
     viewFlags: 515,
     text: "Level",
     PickActionScript:
       func(itemSelected)
       begin
       	inherited:?pickActionScript(itemSelected);
       	if itemSelected = 0 then
       		levelPlaying:=1;
       	if itemSelected = 1 then
       		levelPlaying:=2;
       	if itemSelected = 2 then
       		levelPlaying:=3;
       	if itemSelected = 3 then
       		levelPlaying:=4;
       	if itemSelected = 4 then
       		levelPlaying:=5;
       	if itemSelected = 5 then
       		levelPlaying:=6;
       	if itemSelected = 6 then
       		levelPlaying:=7;
       	if itemSelected = 7 then
       		levelPlaying:=8;
       	if itemSelected = 8 then
       		levelPlaying:=9;
       	if itemSelected = 9 then
       		levelPlaying:=10;
       	if itemSelected = 10 then
       		levelPlaying:=11;
       	if itemSelected = 11 then
       		levelPlaying:=12;
       	if itemSelected = 12 then
       		levelPlaying:=13;
       	if itemSelected = 13 then
       		levelPlaying:=14;
       	if itemSelected = 14 then
       		levelPlaying:=15;
       	if itemSelected = 15 then
       		levelPlaying:=16;
       	if itemSelected = 16 then
       		levelPlaying:=17;
       	if itemSelected = 17 then
       		levelPlaying:=18;
       	if itemSelected = 18 then
       		levelPlaying:=19;
       	if itemSelected = 19 then
       		levelPlaying:=20;
       	if itemSelected then
       		:startLevel(levelPlaying);
       
       end,
     popup: nil,
     viewJustify: 6,
     ViewSetupDoneScript:
       func()
       begin
       AddDeferredCall(
       		func()
       		begin
       			newMenu:ButtonClickScript();
       		end,
       		nil);
       end,
     debug: "newMenu",
     _proto: @377
    };
// View newMenu is declared to Main




constant |layout_Rush Hour.lyt| :=  Main;
// End of file Rush Hour.lyt



