Ahh, then you can do this without javascript. Try doing somehting like this:
<img src="
<?
if ($_SERVER['PHP_SELF'] == "Page1.php") {
echo "Image4Page1.jpg"; }
elseif ($_SERVER['PHP_SELF'] == "Page2.php") {
echo "Image4Page2.jpg"; }
?>
">
That will work if the page is actually going to page1.php or page2.php. If page1 & 2 are being insert into another page, that won't work because php_self will always be the same page. In that case, you can insert a var into page 1 & 2, such as:
<?
$PageController = "Page1";
?>
and so on...
Then, you would use something like this to change the graphics:
<img src="
<?
if ($PageController == "Page1") {
echo "Image4Page1.jpg"; }
elseif ($PageController == "Page2") {
echo "Image4Page2.jpg"; }
?>
">
Remember, it's important that you perform the check for $PageController after Page1.php has been included, or the variable will not be set.