Index: src/display.c
===================================================================
--- src/display.c	(revision 11503)
+++ src/display.c	(working copy)
@@ -462,12 +462,18 @@
 void processInput(void)
 {
 	BOOL mOverRadar = false;
+	BOOL mOverConstruction = false;
 	int WheelZoomIterator;
 
 	if(radarOnScreen && getHQExists(selectedPlayer) && CoordInRadar(mouseX(), mouseY()))
 	{
 		mOverRadar = true;
 	}
+	// if(intBuildMode() && CoordInBuild(mouseX(), mouseY()))
+	if(CoordInBuild(mouseX(), mouseY()))
+        {
+		mOverConstruction = true;
+	}
 
 	StartOfLastFrame = currentFrame;
 	currentFrame = frameGetFrameNumber();
@@ -491,6 +497,10 @@
 		{
 			kf_RadarZoomIn();
 		}
+		else if (mOverConstruction)
+		{
+			kf_BuildPrevPage();
+		}
 		else
 		{
 			for (WheelZoomIterator = 0; WheelZoomIterator < 10; WheelZoomIterator++)
@@ -510,6 +520,10 @@
 		{
 			kf_RadarZoomOut();
 		}
+		else if (mOverConstruction)
+		{
+			kf_BuildNextPage();
+		}
 		else
 		{
 			for (WheelZoomIterator = 0; WheelZoomIterator < 10; WheelZoomIterator++)
Index: src/keybind.c
===================================================================
--- src/keybind.c	(revision 11503)
+++ src/keybind.c	(working copy)
@@ -2992,3 +2992,75 @@
 	console("Asserts turned off");
 	debug(LOG_ERROR, "Asserts turned off");
 }
+
+// ---------------------------------------------------------------------------
+// author: noccy
+// purpose: change pages in the build menu
+
+void kf_BuildPrevPage()
+{
+	W_TABFORM *psTForm;
+	int temp;
+	int numTabs;
+	int maxTabs;
+	int tabPos;
+
+	assert(psWScreen != NULL);
+	psTForm = (W_TABFORM *)widgGetFromID(psWScreen, IDSTAT_TABFORM);	//get our form
+	if (psTForm == NULL) return;
+
+	if (psTForm->TabMultiplier < 1) psTForm->TabMultiplier = 1; // 1-based
+
+	numTabs = numForms(psTForm->numStats,psTForm->numButtons);
+	maxTabs = ((numTabs /TAB_SEVEN) + 1); // (Total tabs needed / 7(max tabs that fit))+1
+
+	temp = psTForm->majorT - 1;
+	psTForm->majorT = (temp<0)?0:temp;
+
+	tabPos = ((psTForm->majorT) % TAB_SEVEN); // The tabs position on the page
+	if ((tabPos == (TAB_SEVEN - 1)) && (psTForm->TabMultiplier > 1))
+	{
+		psTForm->TabMultiplier -= 1;
+	}
+
+	// console("Tabs: %d - MaxTabs: %d - MajorT: %d - numMajor: %d - TabMultiplier: %d",numTabs, maxTabs, psTForm->majorT, psTForm->numMajor, psTForm->TabMultiplier);
+
+}
+
+void kf_BuildNextPage()
+{
+	W_TABFORM	*psTForm;
+	int numTabs;
+	int maxTabs;
+	int tabPos;
+
+	assert(psWScreen != NULL);
+	psTForm = (W_TABFORM *)widgGetFromID(psWScreen, IDSTAT_TABFORM);
+	if (psTForm == NULL) return;
+
+	if (psTForm->TabMultiplier < 1) psTForm->TabMultiplier = 1; // 1-based
+
+	numTabs = numForms(psTForm->numStats,psTForm->numButtons);
+	maxTabs = ((numTabs /TAB_SEVEN)); // (Total tabs needed / 7(max tabs that fit))+1
+
+	if (psTForm->majorT < numTabs - 1)
+	{
+		// Increase tab if we are not on the last one
+		psTForm->majorT += 1; // TAB_SEVEN; // set tab # to next "page"
+	}
+	tabPos = ((psTForm->majorT) % TAB_SEVEN); // The tabs position on the page
+	// 7 mod 7 = 0, since we are going forward we can assume it's the next
+	// tab.
+	if ((tabPos == 0) && (psTForm->TabMultiplier <= maxTabs))
+	{
+		psTForm->TabMultiplier += 1;
+	}
+	if (psTForm->majorT >= psTForm->numMajor)
+	{
+		psTForm->majorT = psTForm->numMajor - 1;
+		//psTForm->TabMultiplier += 1;
+	}
+
+	// console("Tabs: %d - MaxTabs: %d - Pos: %d - MajorT: %d - numMajor: %d - TabMultiplier: %d",numTabs, maxTabs, tabPos, psTForm->majorT, psTForm->numMajor, psTForm->TabMultiplier);
+
+}
\ No newline at end of file
Index: src/keybind.h
===================================================================
--- src/keybind.h	(revision 11503)
+++ src/keybind.h	(working copy)
@@ -248,4 +248,7 @@
 
 bool runningMultiplayer(void);
 
+void	kf_BuildNextPage( void );
+void	kf_BuildPrevPage( void );
+
 #endif // __INCLUDED_SRC_KEYBIND_H__
Index: src/hci.c
===================================================================
--- src/hci.c	(revision 11503)
+++ src/hci.c	(working copy)
@@ -7289,3 +7289,22 @@
 {
 	return psObjSelected;
 }
+
+// Checks if a coordinate is over the build menu
+BOOL CoordInBuild(int x, int y)
+{
+	// This measurement is valid for the menu, so the buildmenu_height
+	// value is used to "nudge" it all upwards from the command menu.
+	const int buildmenu_height = 300;
+
+	Vector2f pos;
+	pos.x = x - RET_X;
+	pos.y = y - RET_Y + buildmenu_height; // guesstimation
+
+	if (pos.x<0 || pos.y<0 || pos.x>=RET_FORMWIDTH || pos.y>= buildmenu_height)
+	{
+		return false;
+	}
+	return true;
+
+}
\ No newline at end of file
Index: src/hci.h
===================================================================
--- src/hci.h	(revision 11503)
+++ src/hci.h	(working copy)
@@ -458,4 +458,6 @@
 
 extern void intDemolishCancel(void);
 
+extern BOOL CoordInBuild(int x, int y);
+
 #endif // __INCLUDED_SRC_HCI_H__
Index: lib/widget/form.c
===================================================================
--- lib/widget/form.c	(revision 11503)
+++ lib/widget/form.c	(working copy)
@@ -1385,7 +1385,7 @@
 	x = x0 + 2;
 	x1 = x + width - 2;
 	y1 = y0 + height;
-	if (number > MAX_TAB_SMALL_SHOWN)	//we can display 8 tabs fine with no extra voodoo.
+	if (number > (MAX_TAB_SMALL_SHOWN - 1))	//we can display 8 tabs fine with no extra voodoo.
 	{	// We do NOT want to draw all the tabs once we have drawn 7 tabs
 		// Both selected & hilite are converted from virtual tab range, to a range
 		// that is seen on the form itself.  This would be 0-6 (7 tabs)

