var lock;
function iFrameHeight(iframename, UseDefaultSize, hoffset, woffset, pause){
	try{
	
	if (lock == null || lock == 'False')
	{
		lock = 'True';
		
		if (UseDefaultSize == 'False')
		{
		var newheight;
		var newwidth;
		var id = iframename.name;
		if (document.getElementById(id) != null)
		{
			if (navigator.appName == "Microsoft Internet Explorer")
			{
	       			newheight=document.frames(id).document.body.scrollHeight + 5 + hoffset;
					newwidth=document.frames(id).document.body.scrollWidth + 5 + woffset;
			}
			else
			{
	      			newheight=document.getElementById(id).contentWindow.document.body.scrollHeight + 16 + hoffset;
					newwidth=document.getElementById(id).contentWindow.document.body.scrollWidth +  16 + woffset; 
			}
			
    		document.getElementById(id).style.height= (newheight) + 'px';
			document.getElementById(id).style.width= (newwidth) + 'px';
			document.getElementById(id).top = 100;
		
		}
		}
		
		setTimeout("lock = 'False';",1250 + pause);
		
	}
	}
	catch(e)
	{window.status=e.description}
	
}
