var imgratio;
var screenw;
var screenh;

function showpic(src, nam, w, h, alt, aln) {
if (src == null) return;
if (window.innerWidth == null) {
screenw = document.body.clientWidth;
screenh = document.body.clientHeight;
}
else {
screenw = window.innerWidth;
screenh = window.innerHeight;
}
imgratio = w/h;
 rw = screenw * .9;
 rh =  Math.round(rw / imgratio);
document.write('<img src="'+src+'" name="'+nam+'" alt="'+alt+'" width="'+rw+'" height="'+rh+'" align="'+aln+'" border=0>'); 
}

