Here is my script to preview an image when its been selected on a webpage it works fine for the IE but don't work for FF.

Code:

Code:
<HTML>
<HEAD>
  <TITLE>Visual Dice Demo</TITLE>
<script language="javascript">
var imgRe = /^.+\.(jpg|jpeg|gif|png)$/i;
function previewImage(pathField, previewName)
{
	var path = pathField.value;
	if (path.search(imgRe) != -1)
	{
		document.getElementById("ee").innerHTML = "<img src="+path+" width=\"100\" height=\"100\">";
	}
	else
	{
		alert("JPG, PNG, and GIFs only!");
	}
}
</script>
</HEAD>
</BODY>
<form name="imageTest">
<input type="file" name="myImage" size="30" onChange="previewImage(document.imageTest.myImage,'replaceMe')"/>


</form> 
<div id="ee">
</div>
</HTML>
Please have a look on code and suggest.

thank you
dizyn