/* Maintains constant gutter when a two column floating layout is resized
   and simulates CSS-2 min-width property */

function scaleWidth(otherWidth,minWidth)
{
  if (document.getElementById) /* W3 standard DOM */
  {
  	var colWidth = document.body.offsetWidth-otherWidth;
  	var minColWidth = minWidth-otherWidth;

		/* Create the constant gutter, then the minimum width for the document.
		   Note:  Can't use the CSS-2 min-width property since IE6 and below
		   don't understand it */
		if (document.body.offsetWidth <= minWidth)
		{
  		document.getElementById('column-one').style.width=minColWidth + "px";
			document.getElementById('min-width-container').style.width=minWidth + "px";
		}
		else
		{
  		document.getElementById('column-one').style.width=colWidth + "px";
			document.getElementById('min-width-container').style.width=100 + "%";
		}
  }

  else if (document.all) /* IE4 DOM */
  {
  	var colWidth = document.body.offsetWidth-otherWidth;
  	var minColWidth = minWidth-otherWidth;

		if (document.body.offsetWidth <= minWidth)
		{
  		document.all['column-one'].style.width=minColWidth + "px";
			document.all['min-width-container'].style.width=minWidth + "px";
		}
		else
		{
  		document.all['column-one'].style.width=colWidth + "px";
			document.all['min-width-container'].style.width=100 + "%";
		}
  }
  else return false;
}


/* Maintains constant gutter when a two column floating layout is resized,
   simulates CSS-2 min-width property and smoothly rescales image */

function imageScaleWidth(otherWidth,imageWidth,minWidth)
{
  if (document.getElementById) /* W3 standard DOM */
  {
  	var colWidth = document.body.offsetWidth-otherWidth;
  	var minColWidth = minWidth-otherWidth;

		/* Create the constant gutter, then the minimum width for the document.
		   Note:  Can't use the CSS-2 min-width property since IE6 and below
		   don't understand it */
		if (document.body.offsetWidth <= minWidth)
		{
  		document.getElementById('column-one').style.width=minColWidth + "px";
			document.getElementById('min-width-container').style.width=minWidth + "px";
		}
		else
		{
  		document.getElementById('column-one').style.width=colWidth + "px";
			document.getElementById('min-width-container').style.width=100 + "%";
		}

  	/* Rescale image when browser resized to exactly fill column (up to actual
  	   image size) */
		if (colWidth <= imageWidth)
		{
  		document.getElementById('dimensions').style.width=colWidth + "px";
			document.getElementById('dimensions').style.height=colWidth*.66667 + "px";
			document.getElementById('caption_lg').style.width=colWidth*.93 + "px";
		}
		else
		{
  		document.getElementById('dimensions').style.width=imageWidth + "px";
			document.getElementById('dimensions').style.height=imageWidth*.66667 + "px";
			document.getElementById('caption_lg').style.width=imageWidth*.93 + "px";
		}

  	/* Prevent tiny image after scroll bar is added in browsers that understand
  	   min-width property; IE6 and below don't understand it, but also do not
  	   continue shrinking the image after the scroll bar is added! */
  	document.getElementById('dimensions').style.minWidth=minColWidth + "px";
		document.getElementById('dimensions').style.minHeight=minColWidth*.66667 + "px";
		document.getElementById('caption_lg').style.minWidth=minColWidth*.93 + "px";
  }

  else if (document.all) /* IE4 DOM */
  {
  	var colWidth = document.body.offsetWidth-otherWidth;
  	var minColWidth = minWidth-otherWidth;

		if (document.body.offsetWidth <= minWidth)
		{
  		document.all['column-one'].style.width=minColWidth + "px";
			document.all['min-width-container'].style.width=minWidth + "px";
		}
		else
		{
  		document.all['column-one'].style.width=colWidth + "px";
			document.all['min-width-container'].style.width=100 + "%";
		}

		if (colWidth <= imageWidth)
		{
  		document.all['dimensions'].style.width=colWidth + "px";
			document.all['dimensions'].style.height=colWidth*.66667 + "px";
			document.all['caption_lg'].style.width=colWidth*.93 + "px";
		}
		else
		{
  		document.all['dimensions'].style.width=imageWidth + "px";
			document.all['dimensions'].style.height=imageWidth*.66667 + "px";
			document.all['caption_lg'].style.width=imageWidth*.93 + "px";
		}
  }
  else return false;
}


/*Reloads NN4 if resized.  Source -- Alex Robinson's "3Col_NN4_FFFF:" www.fu2k.org/alex/css .  */
function ResizeReloadNN4(init)
	{
	if (init==true) with (navigator)
		{
		if (document.layers)
			{
			pageW = innerWidth;
			pageH = innerHeight;
			onresize = ResizeReloadNN4();
			}
		}
	else if (innerWidth != pageW || innerHeight != pageH)
		{
		history.go(0);
		}
	}

ResizeReloadNN4(true);