var minHeight = 425;
function IFrameResize(ID){
	parent.document.getElementById("pltsTipLayer").innerHTML = "";
	parent.document.getElementById("pltsTipLayer").style.top = "0px";
	window.setInterval("reinitIframe('" + ID + "')", 10);
}

function IFrameResize_1(ID_1, ID_2, ID_3, num1, num2, num3){
	window.setInterval("reinitTopIframe('" + ID_1 + "', '" + ID_2 + "', '" + ID_3 + "', " + num1 + ", " + num2 + ", " + num3 + ")", 10);
}

function reinitIframe(ID){
    var obj = parent.document.getElementById(ID);
    try{
		var bHeight = obj.contentWindow.document.body.scrollHeight;
		var dHeight = obj.contentWindow.document.documentElement.scrollHeight;
		var height = Math.min(bHeight, dHeight);
		var thisPageHeight =  height;
		if(thisPageHeight < minHeight){
	    	thisPageHeight = minHeight;
	    }
	    obj.style.height = thisPageHeight + "px";
	}catch (ex){}
}

function reinitTopIframe(ID_1, ID_2, ID_3, num1, num2, num3){
    var obj_1 = parent.document.getElementById(ID_1);
    if(ID_2 != "")
    	var obj_2 = parent.parent.document.getElementById(ID_2);
    if(ID_3 != "")
	var obj_3 = parent.parent.parent.document.getElementById(ID_3);
    try{
		var bHeight = obj_1.contentWindow.document.body.scrollHeight;
		var dHeight = obj_1.contentWindow.document.documentElement.scrollHeight;
		var height = Math.min(bHeight, dHeight);
		var thisPageHeight =  height;
		if(thisPageHeight < minHeight){
	    	thisPageHeight = minHeight;
	    }
		if(num2 != 0)
	    obj_1.style.height = thisPageHeight + num1 + "px";
	    if(ID_2 != "")
	    obj_2.style.height = thisPageHeight + num2 + "px";
	    if(ID_3 != "")
	    obj_3.style.height = thisPageHeight + num2 + num3 + "px";
	}catch (ex){}
}

function iframeFitHeight(oIframe)
{
    try
    {
        var oWin = oIframe.name ? window.frames[oIframe.name] : oIframe.contentWindow; 
        oIframe.style.height = oWin.document.body.scrollHeight + "px";
        parent.document.documentElement.scrollTop = "0px";
    }
    catch(e){}
}
