а как ще стане да го покаже само ако има раширение на картинка нещо текоа амм не стаа
<script>
var b = 'I.am.a.JavaScript.crazy.asd'
var temp = new Array();
temp = b.split('.');
if((document.write(temp[temp.length-1]) == "jpg") && (document.write(temp[temp.length-1]) == "gif"))
{
(document.write(temp[temp.length-1]))
}
</script>