function updatePicture(src) 
{
	if(src != null){
		var frm = document.forms["picturesForm"];
		var pic = document.getElementById("photo:chosenPicture");
		var pic1 = document.getElementById("chosenPicture1");
		var ratio = pic.width/pic.height;
		if (pic.width > 190 || pic.height > 190) {
			if (pic.width > pic.height || pic.width > 190) {
				pic.width = 190;
				pic.height = 190/ratio;
			}
			else {
				pic.height = 190;
				pic.width = 190*ratio;
			}
		}
		if(pic1 != null){
		if(pic1.width > 400){
		pic1.width = 400;
		}
		
		}
		if(pic1 != null){
		pic1.src = src;
		}
		
		
			
		
		pic.src = src;
		
	}
}
