// JavaScript Document
function $(obj){
	return document.getElementById(obj);
}
function DrawImage(ImgD,w){ 
 var image=new Image(); 
 image.src=ImgD.src; 
 if(image.width>0 && image.height>0){ 
  if(image.width/image.height>= 1){ 
   if(image.width>w){
    ImgD.width=w; 
    ImgD.height=(image.height*w)/image.width; 
   }else{ 
    ImgD.width=image.width;
    ImgD.height=image.height; 
   } 
  } 
  else{ 
   if(image.height>w){
    ImgD.height=w; 
    ImgD.width=(image.width*w)/image.height; 
   }else{ 
    ImgD.width=image.width;
    ImgD.height=image.height; 
   } 
  } 
 }
} 

function ChangePic(ob){
	$("showpic").src=ob.src;
}