function setImagesSize(obj,w,h){
		var image=new Image();
		image.src = obj.src;
		var maxwidth=w;
		var maxheight=h;
		var iwidth=image.width;
		var iheight=image.height;
		if(iwidth>maxwidth){
			iheight=iheight*(maxwidth/iwidth);
			iwidth=maxwidth;
			obj.width=iwidth;
			obj.Height=iheight;
		}
		obj.width=iwidth;
		if(iheight>maxheight){
			iwidth=iwidth*(maxheight/iheight);
			iheight=maxheight;
			obj.width=iwidth;
			obj.Height=iheight;	
		}
		obj.height=iheight;

	}
	

 

