//////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Globals
/////////////////////////////////////////////////////////////////////////////////////////////////////////////

	//set the window name so our links can refer to it without messing up when framed.
	window.name = "Top";
	
	//////////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Don't modify these, they are specified during initialization
	//////////////////////////////////////////////////////////////////////////////////////////////////////////////
	var FV3_heightModifiers = new Array();
	var FV3_widthModifiers = new Array();
	var FV3_ContentHeight = 0;
	var FV3_ContentWidth = 0;
	var FV3_SiteStyle = "";
	//////////////////////////////////////////////////////////////////////////////////////////////////////////////

	//////////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Don't modify these unless the BackOffice framework is updated to support the new type
	//////////////////////////////////////////////////////////////////////////////////////////////////////////////
	//The extensions of content that should be rendered with the "embed" tag
	var FV3_embedded=[".pdf",".doc"]
	//The extensions of pages that should not have a unique id appended
	var FV3_uidexclusions=[".asp",".aspx"]
	//The extensions of content that should be rendered with the "div" tag
	var FV3_divtypes=[".htm",".asp",".html"]
	//////////////////////////////////////////////////////////////////////////////////////////////////////////////

	//////////////////////////////////////////////////////////////////////////////////////////////////////////////
	// These can be modified in a local version of this file
	//////////////////////////////////////////////////////////////////////////////////////////////////////////////
	//Input the IDs of the DIVs you wish to dynamically resize:
	//Separate each ID with a comma. Examples: ["div1", "div2"] or ["div_content"] or [] for none:
	var FV3_divids=["div_content"]
	//Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:
	//Input the IDs of the IFRAMEs you wish to dynamically resize:
	var FV3_iframeids=["iframe_content"]
	//Should script hide iframe from browsers that don't support this script (non IE5+/NS6+ browsers. Recommended):
	var FV3_iframehide="no"
	//Browser detection
	var FV3_getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
	var FV3_FFextraHeight=parseFloat(FV3_getFFVersion)>=0.1? 36 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers
	var FV3_ie4 = document.all;
	var FV3_ns4 = document.layers;
	var FV3_ns6 = document.getElementById && !document.all; 
	//////////////////////////////////////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
// End Globals
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
	
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Methods
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
	///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name: FV3_initCoreFuncFluid(heightOffsetters, widthOffsetters)
	// Params:
	//		heightOffsetters: an array of elements that affect the height of the content frame
	//		widthOffsetters: an array of elements that affect the width of the content frame
	// Last Change: 11.10.2007
	// Notes: Initialization function that specifies that this is a "Fluid" style site
	//		and sets the height and width modifiers for the content region
	///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	function FV3_initCoreFuncFixed(height, width)
	{
		FV3_SiteStyle = "Fixed";
		FV3_ContentHeight = height;
		FV3_ContentWidth = width;
		if (window.addEventListener)
		{
			window.addEventListener("resize", FV3_resizeCaller, false);
		}
		else if (window.attachEvent)
		{
			window.attachEvent("onresize", FV3_resizeCaller);
		}
		else
		{
			window.onresize=FV3_resizeCaller;
		}
		FV3_resizeCaller();
	}
	
	///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Name: FV3_initCoreFuncFluid(height, width)
	// Params:
	//		height: the desired height of the content frame
	//		width: the desired width of the content frame
	// Last Change: 11.10.2007
	// Notes: Initialization function that specifies that this is a "Fixed" style site
	//		and sets the height and width of the content region
	///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	function FV3_initCoreFuncFluid(heightOffsetters, widthOffsetters)
	{
		FV3_SiteStyle = "Fluid";
		FV3_heightModifiers = heightOffsetters;
		FV3_widthModifiers = widthOffsetters;
		if (window.addEventListener)
		{
			window.addEventListener("resize", FV3_resizeCaller, false);
		}
		else if (window.attachEvent)
		{
			window.attachEvent("onresize", FV3_resizeCaller);
		}
		else
		{
			window.onresize=FV3_resizeCaller;
		}
		FV3_resizeCaller();
	}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Name: FV3_getHeightOffset
// Last Change: 11.10.2007
// Notes: Utility function, returns the total height of all height offsetting elements
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	function FV3_getHeightOffset()
	{
		var cHeight = 0;
		for (var i=0;i<FV3_heightModifiers.length;i++)
		{
			elem = document.getElementById(FV3_heightModifiers[i]);
			if (elem){
				cHeight += elem.clientHeight;
				}
		}
		return cHeight;
	}

	
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Name: FV3_getWidthOffset
// Last Change: 11.10.2007
// Notes: Utility function, returns the total width of all width offsetting elements
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	function FV3_getWidthOffset()
	{
		var cWidth = 0;
		for (var i=0;i<FV3_widthModifiers.length;i++)
		{
			elem = document.getElementById(FV3_widthModifiers[i]);
			if (elem)
			{
				cWidth += elem.clientWidth;
			}
		}
		return cWidth;
	}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Name: FV3_resizeCaller()
// Last Change: 7.26.2006
// Notes: Utility function, loops through our Iframes declared in the globals section and calls our dynamic resize function
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	function FV3_resizeCaller() 
	{
		var dyniframe=new Array();
		for (i=0; i<FV3_iframeids.length; i++)
		{
			if (document.getElementById)
				FV3_resizeIframe(FV3_iframeids[i]);
			//reveal iframe for lower end browsers? (see var above):
			if ((document.all || document.getElementById) && FV3_iframehide=="no")
			{
				var tempobj=document.all? document.all[FV3_iframeids[i]] : document.getElementById(FV3_iframeids[i]);
				if (tempobj != null)
					tempobj.style.display="block";
			}
		}
		for (i=0; i<FV3_iframeids.length; i++)
		{
			if (document.getElementById)
				FV3_resizeIframe(FV3_divids[i]);
		}
	}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Name: FV3_resizeIframe(frameid)
// Last Change: 11.10.2007
// Notes: Utility function, sizes an IFrame based on its contents height
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	function FV3_resizeIframe(frameid)
	{
		var currentfr=document.getElementById(frameid)
		if (currentfr && !window.opera)
		{		
			currentfr.style.display="block";
			if (FV3_SiteStyle == "Fixed")
			{
				if (document.getElementById && !document.all)
				{
					window.innerWidth = FV3_ContentWidth + "px";
					window.innerHeight = FV3_ContentHeight + "px";
				}
				else
				{
					currentfr.style.width = FV3_ContentWidth + "px";
					currentfr.style.height = FV3_ContentHeight + "px";
				}
			}
			else
			{
				var widthOffset = FV3_getWidthOffset();
				var heightOffset = FV3_getHeightOffset();
				if (document.getElementById && !document.all)
				{
					if (window.innerWidth - widthOffset > 0 && widthOffset > 0)
						currentfr.style.width = (window.innerWidthh - widthOffset) + "px";
					if (window.innerHeight - heightOffset > 0 && heightOffset > 0)
						currentfr.style.height = (window.innerHeight - heightOffset) + "px";
				}
				else
				{
					if (this.document.body.clientWidth - widthOffset > 0 && widthOffset > 0)
						currentfr.style.width = (this.document.body.clientWidth - widthOffset) + "px";
					if (this.document.body.clientHeight - heightOffset > 0 && heightOffset > 0)
						currentfr.style.height = (this.document.body.clientHeight - heightOffset) + "px";
				}
			}
		}
	}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Name: FV3_readjustIframe(loadevt)
// Last Change: 7.26.2006
// Notes: Utility function
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	function FV3_readjustIframe(loadevt) 
	{
		var crossevt=(window.event)? event : loadevt;
		var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement;
		
		if (iframeroot)
		{
			FV3_resizeIframe(iframeroot.id);
		}
	}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
// End Methods
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
