

function addLoadEvent(func) 
{ var oldonload = window.onload;
  if (typeof window.onload != 'function') 
  { window.onload = func; } 
  else 
  { window.onload = function() 
    { oldonload();
      func();
    }
  }
}


function ReSizeProductImage() { 


	addLoadEvent(ReSizeProductImage2);

    
    


} 


function ReSizeProductImage2() { 


	 

    var theDiv = document.getElementById('divProductImage');

    

    if (theDiv != null) {

        if (navigator.userAgent.indexOf("Firefox")!=-1)
        {
        
         theImage = theDiv.getElementsByTagName("IMG")[0];
        
        
        
            //alert(theImage.width);
        
            //alert(theImage.offsetHeight);
            if (theImage.width > 295) {
            //alert('hello');
                //theImage.width= 300;
            imagewidth = 295;
            //theImage.width= imagewidth;
            theImage.style.width= imagewidth + 'px';
            }
        }
        
        if (navigator.userAgent.indexOf("MSIE")!=-1)
        {
            theImage = theDiv.childNodes[0];
        
        
        
            //alert(theImage.id);
        
            //alert(theImage.offsetHeight);
            if (theImage.offsetWidth > 295) {
                //alert('hello');
                //theImage.width= 300;
                imagewidth = 295;
                theImage.width= imagewidth;
                //theImage.style.width= 300 + 'px';
            }
        
        }


	if (navigator.userAgent.indexOf("Chrome")!=-1)
        {
        
         theImage = theDiv.getElementsByTagName("IMG")[0];
        
        
        
            //alert(theImage.width);
        
            //alert(theImage.offsetHeight);
            if (theImage.width > 295) {
            //alert('hello');
                //theImage.width= 300;
            imagewidth = 295;
            //theImage.width= imagewidth;
            theImage.style.width= imagewidth + 'px';
            }
        }

        
       

    }


} 



