﻿/*iframe 自动适应高度 - Anrin Wu - 2008.03.14*/
Yifu.IFrame=function(id){this.id=id;this.iframe=null;var _this=this;insertEventListener(window,'load',function(){_this.init();});}
Yifu.IFrame.prototype={getFrame:function(){if(!this.iframe)this.iframe=$(this.id);return this.iframe;},adjustHeight : function(){var i=this.getFrame();if(typeof i!='undefined'){if(i.Document){i.height=i.Document.body.scrollHeight;}else{i.height=i.contentDocument.body.scrollHeight;}}},init:function(){var i=this.getFrame();if(typeof i=='object'&&i.tagName.toLowerCase()=='iframe'){if(typeof i.name=='undefined')return false;this.adjustHeight();var _this=this;insertEventListener(i, 'load',function(){_this.adjustHeight();});}}}
