var flag=false;  
function DrawImage(ImgD)
{
	var image=new Image();  
    image.src=ImgD.src;  
    if(image.width>0 && image.height>0)
	{
		flag=true;  
		if(image.width/image.height>= 450/357)
		{  
			if(image.width>450)
			{
				ImgD.width=450;  
				ImgD.height=(image.height*450)/image.width;  
			}
			else
			{
				ImgD.width=image.width;      
				ImgD.height=image.height;  
			}
			ImgD.alt="Actual size:"+image.width+"×"+image.height;  
		}
		else
		{
			if(image.height>357)
			{
				ImgD.height=357;
				ImgD.width=(image.width*357)/image.height;            
			}
			else
			{  
				ImgD.width=image.width;      
				ImgD.height=image.height;  
			}
			ImgD.alt="Actual size:"+image.width+"×"+image.height;  
		}
	}  
}

function DrawImage2(ImgD)
{
	var image=new Image();  
    image.src=ImgD.src;  
    if(image.width>0 && image.height>0)
	{
		flag=true;  
		if(image.width>212)
		{
			ImgD.width=212;  
			ImgD.height=(image.height*212)/image.width;  
		}
		else
		{
			ImgD.width=image.width;      
			ImgD.height=image.height;  
		}
		ImgD.alt="Actual size:"+image.width+"×"+image.height;
	}  
}
