

//changeForWhat = (height or width or all)
function jsFn_iFrameReSize(iFrmName, changeForWhat){
	if(changeForWhat == null)	changeForWhat = "all";
	try{   
		var oBody = eval(iFrmName+".document.body");
		var oFrame = document.getElementById(iFrmName);
		var ua=navigator.userAgent.toLowerCase();
		var IE=(ua.indexOf("msie")!=-1?true:false);
		if(changeForWhat=="height")
			oFrame.height = IE? (oBody.scrollHeight + oBody.offsetHeight - oBody.clientHeight) : (oBody.offsetHeight+25);
		else if(changeForWhat=="width")
			oFrame.width = IE? (oBody.scrollWidth + oBody.offsetWidth - oBody.clientWidth) : (oBody.offsetWidth+25); 
		else if(changeForWhat=="all"){
			oFrame.height = IE? (oBody.scrollHeight + oBody.offsetHeight - oBody.clientHeight) : (oBody.offsetHeight+25);
			oFrame.width = IE? (oBody.scrollWidth + oBody.offsetWidth - oBody.clientWidth) : (oBody.offsetWidth+25); 
		}//if 
		
	} catch(e) { //An error is raised if the IFrame domain != its container's domain
		//window.status = 'Error: ' + e.number + '; ' + e.description;
		//alert('Error: ' + e.number + '; ' + e.description);
	}//try
}//fn


