var $G=function(tagName){
return document.getElementById(tagName);};
var $N=function(tagName){
return document.getElementsByName(tagName);};
var $T=function(tagName){
return document.getElementsByTagName(tagName);};
function suitPic(divID,maxWidth,maxHeight){
var width=0;
var height=0;
var changed=0;
var setwidth=maxWidth;
var setheight=maxHeight;
var imgs=document.getElementById(divID).getElementsByTagName('img');
try{
for(i=0;i<imgs.length;i++){
width=imgs[i].width;
height=imgs[i].height;
changed=0;
if(imgs[i].width>setwidth){
n=imgs[i].width/setwidth;
imgs[i].width=setwidth;
imgs[i].height=height/n;
changed=1;}
if(imgs[i].height>setheight){
n=imgs[i].height/setheight
imgs[i].width=imgs[i].width/n;
imgs[i].height=setheight;
changed=1;}
if(changed==1){}}}
catch(e){}}

