// JavaScript Document
function autoSizeFrame(iframeId)
{
//	parent.autoSizeFrame = autoSizeFrame;
	iframe = document.getElementById(iframeId);
	if(!iframe) return;
	var frmwin;
	if(document.all)
	{
		frmwin = document.frames(iframeId);
		//iframe.scrolling = 'no';
		
		iframe.height = frmwin.document.body.scrollHeight;
	}
	else
	{
		frmwin = iframe.contentWindow;
		iframe.height = frmwin.document.body.scrollHeight + 1;
		iframe.scrolling = 'no';
		if(iframe.offsetWidth < frmwin.innerWidth + frmwin.scrollMaxX)
			iframe.width = frmwin.innerWidth + frmwin.scrollMaxX;
	}

	var iframe_location = self.location;
	if(top.location !== iframe_location)
	{
		//there is a frame on top
		pframe = top.document.getElementsByTagName('iframe');
		try{
		for(i=0;i<pframe.length;i++)
		{
			var top_location
			if(document.all)
				top_location = top.document.frames(pframe[i].id).location;
			else
				top_location = pframe[i].id.contentWindow;
			if(top_location === iframe_location)
			{
				//resize
				if(pframe[i].height !== iframe.document.body.scrollHeight)
				{
					pframe[i].height = iframe.document.body.scrollHeight;
				}
				break;
			}
		}
		}catch(e){}
	}
}

function showsubmenu(sid)
{
whichEl = eval("submenu" + sid);
if (whichEl.style.display == "none")
{
eval("submenu" + sid + ".style.display=\"\";");
}
else
{
eval("submenu" + sid + ".style.display=\"none\";");
}
}
