function reloadImgSize(imgD,FitWidth,FitHeight){
	var image1=new Image();  
	image1.onload = function () 
	{ 
		if(this.width>0 && this.height>0)  
		{  
			if(this.width/this.height>= FitWidth/FitHeight)  
			{  
				if(this.width>FitWidth)  
				{  
					imgD.width=FitWidth;  
					imgD.height=(this.height*FitWidth)/this.width;  
				}  
				else  
				{  
					imgD.width=this.width;  
					imgD.height=this.height;  
				}  
			}  
			else  
			{  
				if(this.height>FitHeight)  
				{  
					imgD.height=FitHeight;  
					imgD.width=(this.width*FitHeight)/this.height;  
				}  
				else  
				{  
					imgD.width=this.width;  
					imgD.height=this.height;  
				}  
			}  
		} 
		image1 = null; 
	} 
	image1.src=imgD.src;  
	imgD.style.cursor = 'hand';
}

function reinitIframe(elename){
	var iframe = document.getElementById(elename);
	try{
		var bHeight = iframe.contentWindow.document.body.scrollHeight;
		var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
		var height = Math.max(bHeight, dHeight);
		iframe.height =  height;
	}catch (ex){}
}