function setImgSize(o,w,h)
 {
	if(w/h<=o.width/o.height){	
		if(o.width > w ){
					o.style.width=w+'px';
				}
	 }
	 else
	 {
		if(o.height > h){
					o.style.height=h+'px';
				}
			
	 }
 }