function adjustIFrameSize (iframeWindow) 
{
	if (iframeWindow.document.height) 
	{
		var iframeElement = document.getElementById(iframeWindow.name);
		var div = document.getElementById('strech');
		var nodiv = document.getElementById('side_strech');
		var r_tr = document.getElementById('r_tr');
		amount = iframeWindow.document.height+15;
		iframeElement.style.height = amount+'px';
		sub_amount = (amount-397);
		sub2_amount= (amount-369);
		if(sub_amount<1)
			sub_amount = 0;
		if(sub2_amount<42)
			sub2_amount = 42;
		
		div.style.height = sub_amount+'px';
		nodiv.style.height = sub_amount+'px';
		r_tr.style.height = sub2_amount+'px';
		//iframeElement.style.width = iframeWindow.document.width+5 + 'px';
	}
	else if (document.all) 
	{
		var iframeElement = document.all[iframeWindow.name];
		var div = document.getElementById('strech');
		var nodiv = document.getElementById('side_strech');
		var r_tr = document.getElementById('r_tr');
		if (iframeWindow.document.compatMode && iframeWindow.document.compatMode != 'BackCompat') 
		{
			amount = iframeWindow.document.documentElement.scrollHeight + 15;
			sub_amount = (amount-399);
			sub2_amount= (amount-371);
			if(sub_amount<1)
				sub_amount = 0;
			if(sub2_amount<42)
				sub2_amount = 42;
			
			iframeElement.style.height = amount+'px';
			div.style.height = sub_amount+'px';
			nodiv.style.height = sub_amount+'px';
			r_tr.style.height = sub2_amount+'px';
			//iframeElement.style.width =  iframeWindow.document.documentElement.scrollWidth + 5 + 'px';
		}
		else 
		{
			amount = iframeWindow.document.body.scrollHeight + 15 ;
			sub_amount = (amount-399);
			sub2_amount= (amount-371);
			if(sub_amount<1)
				sub_amount = 0;
			if(sub2_amount<42)
				sub2_amount = 42;
			
			iframeElement.style.height = amount+'px';
			div.style.height = sub_amount+'px';
			nodiv.style.height = sub_amount+'px';
			r_tr.style.height = sub2_amount+'px';
			//	iframeElement.style.width = iframeWindow.document.body.scrollWidth + 5 + 'px';
		}
	}
}
//to use
//in body tage of page displayed by frame put
//onload="if (parent.adjustIFrameSize)parent.adjustIFrameSize(window);"

