Alright, this is a 3 part problem (HTML/JS/CSS) and I need help for the last 2 parts:

the first part concerns the layout of the webpage, a basic calculator that allows the user to input the quantity and hit either the "Calculate" (which spits out the math in both "Add-on" and "Grand total" textboxes) or "Exit" (which gives a "thank you" pop-up and then brings them to a homepage) buttons.

If a user types in a negative number, 0 or anything more than 5 a pop-up will appear, or if the user calculates with any letters.

Javascript will handle the math while CSS will handle the formatting and popups

The javascript and/or the CSS portions must be either separate or in the HTML document.

I have the basic layout, it's everything else that I and 10 other people are stuck on
HTML code
Code:
<!DOCTYPE html>
<!-- EX02.html-->

<html lang = "en">
<head>

<title> Basic Computer Store </title>
				</head>

<body>
<h2> Welcome to the Basic Computer Store </h2>
<h3> choose your Basic Upgrades for a basic price </h3>

<img class = "Left" src = "download.png" alt = "Picture of computer"/>
<table>

<tr> 
<th>   </th>
<th>    </th>
<th> Base Price </th>
<th> $999.99 </th>
			</tr>
<tr> 
<th> Add-on </th>
<th> quantity </th>
<th> Add-on Price </th>
<th> Add-on Total </th>
			</tr>
<tr>
<td> 1.21 Jiggawatt Powersupply </td>
<td> <input type="text" name="PowerSupply" id="PowerSupply" alt="PowerSupply" value=" " size = "2" /> </td>
<td> $1985 </td>
<td> <input type="text" name="PowerSupplyPrice" size = "2" /> </td>
</tr>

<tr>
<td> Brainpower (tm) Memory Upgrade </td>
<td> <input type= text" name="Memory" size="2" /> </td>
<td> $1337 </td>
<td> <input type="text" name="MemoryPrice" size="2" /> </td>
</tr>

<tr>
<td> Mouse </td>
<td> <input type = "text" name = "Mouse" size = "2" /> </td>
<td> $1 </td>
<td> <input type = "text" name = "MousePrice" size = "2" /> </td>
</tr>

<tr>
<td>   </td>
<td>   </td>
<td> Grand Total </td>
<td> <input type = "text" name = "TotalPrice" value =" " size = "2" /> </td>
</tr>

<p>
<input type="button" value="Calculate" onClick="">
<a href = "http://www.hpu.edu/"> <input type="button" value="exit" onClick=""> </a>
I have the basic CSS popup code but I don't know how to implement it to the exceptions above (-n, 0, 6 or letters)

Code:
<script type="text/javascript"> 
<!--
	function Over() { 
		alert("the amount you ordered is too much, too few, or undefined");
 	}
--> 
</script>
</head>
<body>
	<script type="text/javascript">
	<!--
		Over();
	-->
	</script>