When using an <INPUT type="image"> tag, the browser is supposed to send the x and y coordinates of the user's click. The standard is that the x variable will be input_name_x and the y variable is input_name_y.
So, what you could do is, first you would have to have two fields that are different names:
<input type = "image" name = "pan_north" value = "north">
<input type = "image" name = "pan_east" value = "east">
And then, at the top of your file, add something like this:
if (isset($_POST[ 'pan_north_x' ], $_POST[ 'pan_north_y' ])) {
// user clicked on pan_north
// you can use these variables if you want the coordinates
// $_POST[ 'pan_north_x' ] and $_POST[ 'pan_north_y' ]
}
You can just swap out all the 'north's for 'east' or whatever and it will work.
Hope that helps,
-Percy