function winstatus(str) {
    window.status = str;
}

function trim(text) {
    var newstr = text.replace(/^\s*/, "");
    newstr = newstr.replace(/\s*$/, "");
   
    return newstr;
}

function showImage(imgName, altText) {
    var imgTemp = new Image();
    imgTemp.src=imgName;
    
    var width = imgTemp.width;
    var height = imgTemp.height;
    if (width <= 40 ) {
	width=122;
	if (height <= 40 ) height=62;
    }
    if (width > 120 ){
    	height = parseInt(120 * height / width);
	width = 120;
    	}
    if (height > 60 ) {
    	width = parseInt(60 * width / height);
	height = 60;
    	}

    document.write ('<img src=' + imgTemp.src + ' width=' + width + ' height=' + height + ' alt=\'' + altText + '\'>');
}
