function resizeInner(width,height){
 if(window.innerWidth){
	 window.innerWidth  = width;
   window.innerHeight = height;
 }else{
   width  += 5;
   height += 30;
   resizeTo(width,height);
 }
}

function getImageInfo(){
 if(!document.getElementsByTagName) return;

 var img    = document.getElementsByTagName('img').item(0);
 var width  = img.getAttribute('width');
 var height = img.getAttribute('height');
 
 resizeInner(width,height);
}

window.onload = function(){
 getImageInfo();
 focus();
}