function lastphoto()
{
    if(document.getElementById("content") != null)
    { 
        var lbcontent = document.getElementById("content");
        var comtentPhoto = lbcontent.getElementsByTagName("img");
		
        for(var i = 0;i< comtentPhoto.length;i++)
        {
            comtentPhoto[i].onerror=function(){this.src="/upfile/nophoto.gif";}
            comtentPhoto[i].style.cursor = "hand";
            comtentPhoto[i].onclick = function(){window.open(this.src)}
            var img = new Image();
            img.src = comtentPhoto[i].src;		
            var oldw = img.width;
			var oldh = img.height;
            if(img.width > 400)
            {			
                comtentPhoto[i].width = 400;
				comtentPhoto[i].height = 400 * (oldh*1 / oldw*1);
				//alert(img.width+";"+img.height);
            }
            
        }
    }
}
