No te compliques la vida, con ésto funcionará:
Código HTML:
Ver original<script languaje="javascript"> var contenedor=document.getElementById("imagen");
var xx = parent.location.href;
var xx = xx.toUpperCase();
if (xx.indexOf('INDEX.ASP')!=-1){
contenedor.src="images/LOGOHSI.JPG"
}else{
contenedor.src="../images/LOGOHSI.JPG"
}
<img id="imagen" width=168 height=66>