   var delim=0;
   var width=105;
   var height=105;
function getImageSize( node) {
    var oHlpr = document.createElement( 'IMG');
    var oPic = node;
    oHlpr.style.visibility = 'hidden';
    oHlpr.style.position = 'absolute';
    oHlpr.top = 0; oHlpr.left = 0;
    oHlpr.src = oPic.src;
    document.body.appendChild( oHlpr);
    var imSize = { 'width':oHlpr.offsetWidth,'height':oHlpr.offsetHeight }
    document.body.removeChild( oHlpr);
    return imSize;
}

   function imageResize() {
   var fotoImg= document.getElementsByTagName('img');
    for (var i=0;fotoImg.length>i;i++) {
          var currentNode = fotoImg[i];

		
                 var tempw=currentNode.width;
                 var temph=currentNode.height;
		if(parseInt(temph)==105 && parseInt(tempw) == 95)
		{
		if(!currentNode.naturalWidth)
		{
		 var is=getImageSize(currentNode);
                 currentNode.naturalWidth=is.width;
                 currentNode.naturalHeight=is.height;
		}
	    
                delim=0;
            	if(currentNode.naturalWidth > currentNode.naturalHeight) {
		 delim=parseInt(currentNode.naturalWidth)/parseInt(width);
		}
            	else if(currentNode.naturalWidth == currentNode.naturalHeight) {
		 delim=parseInt(currentNode.naturalHeight)/parseInt(height);
		}
            	else if(currentNode.naturalWidth < currentNode.naturalHeight) {
		 delim=parseInt(currentNode.naturalHeight)/parseInt(height);
		}

            	if(currentNode.naturalWidth > width) {
		 delim=parseInt(currentNode.naturalWidth)/parseInt(width);
		}
            	else if(height < currentNode.naturalHeight) {
		//alert('delim: '+delim+'\ncurrentNode.height: '+currentNode.height+'\ncurrentNode.width: '+currentNode.width+'\ncurrentNode.naturalHeight: '+currentNode.naturalHeight+'\ncurrentNode.naturalWidth: '+currentNode.naturalWidth+'\ntempw: '+tempw+'\ntemph: '+temph);
		 delim=parseInt(currentNode.naturalHeight)/parseInt(height);
		}

		if(delim > 0)
		{
		currentNode.height=parseInt(currentNode.naturalHeight)/delim;
		currentNode.width=parseInt(currentNode.naturalWidth)/delim;
		}
          	}
        }
      }
