//function iframeAuto()
//{
//	try
//	{
//			//定位需要调整的frame框架（在父级窗口中查找）
//			var a = document.getElementsByTagName("iframe");
//			for(var i=0; i<a.length; i++)
//			{
//					var h1=0, h2=0;
//					a[i].style.height = "10px";              //首先设置高度为10px,后面会修改
//					if(a[i].contentWindow.document.documentElement&&a[i].contentWindow.document.documentElement.scrollHeight)
//					{
//						h1=a[i].contentWindow.document.documentElement.scrollHeight;
//					}
//					if(document.body) h2=a[i].contentWindow.document.body.scrollHeight;
//					var h=Math.max(h1, h2);               //取两者中的较大值
//					if(a[i].contentWindow.document.all) {h += 4;}
//					if(window.opera) {h += 1;}
//					//调整框架的大小
//					a[i].style.height = h +"px";
//			}
//		

//	}
//	catch (ex){}
//}
////事件绑定的方法，支持IE5以上版本
//if(window.attachEvent)
//{
//	window.attachEvent("onload", iframeAuto);
//}
//else if(window.addEventListener)
//{

//	window.addEventListener('load', iframeAuto, false);
//}

function iframeAuto(myframe)
{
	try
	{
		var h1=0, h2=0;
		myframe.style.height = "4px";              //首先设置高度为10px,后面会修改
		if(myframe.contentWindow.document.documentElement&&myframe.contentWindow.document.documentElement.scrollHeight)
		{
			h1=myframe.contentWindow.document.documentElement.scrollHeight;
		}
		if(document.body) h2=myframe.contentWindow.document.body.scrollHeight;
		var h=Math.max(h1, h2);               //取两者中的较大值
//		if(myframe.contentWindow.document.all) {h += 4;}
		if(window.opera) {h += 1;}
		//调整框架的大小
		myframe.style.height = h +"px";
	}
	catch (ex){}
}