function DrawImage(obj,w,h){
	var image= new Image(); 
	var w,h;
	image.src=obj.src;
	
	if(image.width>w || image.height>h){
		if((image.width/image.height)<=(w/h)){
			obj.height=h;
			obj.width=image.width*h/image.height;
			}
		else{
			obj.width=w;
			obj.height=image.height*w/image.width;
			}
	
		}
	
	
	}
