//*******************************************************************
//** SMR_RESIZE_MOD: CONFIGURATION **********************************
//*******************************************************************
//SMR_confMaxDim = 220; // pixels

//*******************************************************************
//** SMR_RESIZE_MOD: START CODE *************************************
//*******************************************************************
function SMR_resize(obj,SMR_confMaxDim) {
   if(SMR_confMaxDim > 450) SMR_confMaxDim = 450;
   if(SMR_confMaxDim == null) SMR_confMaxDim = 180;
   thisWidth = obj.width;
   thisHeight = obj.height;

   thisMaxDim = thisWidth
   //if(thisWidth > thisHeight) thisMaxDim = thisWidth;
   //else thisMaxDim = thisHeight;
   
   if(thisMaxDim > SMR_confMaxDim) {
      thisMinDim = Math.round(((thisHeight) * SMR_confMaxDim) / thisMaxDim); 
      
     
         thisWidth = SMR_confMaxDim;
         thisHeight = thisMinDim;


   } // if(thisMaxDim > SMR_confMaxDim)

   obj.height = thisHeight;
   obj.width = thisWidth;
}
function SMR_setLink(obj) {
   thisInnerHtml = obj.innerHTML;
   tmpArray = thisInnerHtml.split(' src=\"');
   tmpArray = tmpArray[1].split('"');
   obj.href = tmpArray[0];
}
//*******************************************************************
//** SMR_RESIZE_MOD: END ********************************************
//*******************************************************************
