/*----------------------------------------------------------------------------------------------------------------------------------------*/
/*---------------------------------------------- ARIZONA DEPARTMENT OF REAL ESTATE WEB PAGE ----------------------------------------------*/
/*----------------------------------------------------------- JAVASCRIPT CODE ------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------------------------------------------*/

/*----------------------------------------------- Written by James R. De Silva / Webmaster -----------------------------------------------*/

/******************************************************************************************************************************************/



/*Start AlertLinkMessage Coding ----------------------------------------------------------------------------------------------------------*/

function LinkAlert() {																						/* Website Transision Message */
	
	var LinkMessage = alert('You are about to leave the State of Arizona Department of Real Estate website.\n\nYou will arrive ' + 
					'at a site managed by another entity.  If this link is broken, please bring it to the attension of the ADRE ' +
					'webmaster.  Once you are on the linked website, any issues (broken links, erroneous information, etc.) should ' +
					'be brought to the attention of the webmaster of that linked site.\n\nOnce you link to another website, you ' + 
					'become subject to the privacy policy of that new site.');
					
}

function LinkCopyrightAlert() {																	 /* Website Third-Party Copyright Message */
	
	var LinkMessage = alert('This material is copyrighted.  If you wish to distribute or reproduce this audio, please ' +
					'contact the Show for permission.');
	
}

function LinkCGDAlert() {																	 /* Website Consumer Guide Disclaimer Message */
	
	var LinkMessage = alert('The information contained herein should only be considered a guide.  This guide is designed to ' +
					'provide general information in regard to the subject matter covered and is based upon sources believed to ' +
					'be reliable; however, no representation or warranty is made as to its accuracy.  This guide is provided ' +
					'with the understanding that the Arizona Department of Real Estate is not rendering legal, accounting, or other ' +
					'professional advice.  If legal advice or other expert advice is required, the services of a competent ' +
					'professional should be sought.  Readers should check primary sources where appropriate and confirm that the ' +
					'information in this book has not been affected or changed by recent developments or jurisdictional differences ' +
					'with transactions occurring outside of the State of Arizona.\n\nIMPORTANT!  The Arizona Department of Real ' +
					'Estate cannot offer legal advice and nothing in this book should be construed as being legal advice.  The ' +
					'Arizona Department of Real Estate is not responsible for reliance on material in this guide.  Because real ' +
					'estate transactions in Mexico may be very different from and more complex than transactions in Arizona, the ' +
					'Arizona Department of Real Estate strongly recommends that all potential purchasers or sellers of real estate ' +
					'seek professional advice when buying or selling property in Mexico.');
					
}

function LinkBulletinAlert() {														   /* 01/08 - 02/08 Bulletin Links Disclaimer Message */
	
	var LinkMessage = alert('Note:  Some of the links in this bulletin do not work.  We are working to resolve this issue.\n\n ' +
					'Thank you for your patience.');
					
}

/*Stop LinkMessage Coding ----------------------------------------------------------------------------------------------------------------*/



/******************************************************************************************************************************************/	



/*Start 'function PrintFocusIframe()' Coding ---------------------------------------------------------------------------------------------*/

function PrintFocusIframe() {													 /*to print iframe contents from 'Printer Friendly' button*/
	
	if (parent.document.getElementById('NarrowContentIframe')) {
		
		parent.document.getElementById('NarrowContentIframe').contentWindow.document.body.focus();
		parent.document.getElementById('NarrowContentIframe').contentWindow.print();
	}
	else if (parent.document.getElementById('WideContentIframe')) {
		
		parent.document.getElementById('WideContentIframe').contentWindow.document.body.focus();
		parent.document.getElementById('WideContentIframe').contentWindow.print();
	}
	else if (parent.document.getElementById('FullPageContentIframe')) {
		
		parent.document.getElementById('FullPageContentIframe').contentWindow.document.body.focus();
		parent.document.getElementById('FullPageContentIframe').contentWindow.print();
	}
	
}
	
/*Stop 'function PrintFocusIframe()' Coding ----------------------------------------------------------------------------------------------*/



/******************************************************************************************************************************************/	



/*Start 'function CloseWindow()' Coding --------------------------------------------------------------------------------------------------*/

function CloseWindow() {		   /*to close browser window without "The Webpage you are viewing is trying to close the window..." prompt*/
	
	window.open('','_self','');
	
	window.close();
	
	window.open('http://www.azre.gov/PUBLIC_INFO/Documents/ADRE_Illegal_Subdivisions.kmz','_blank','');
	
}
	
/*Stop 'function CloseWindow()' Coding ---------------------------------------------------------------------------------------------------*/



/******************************************************************************************************************************************/	



/*Start 'function FlashText(FlashingText)' Coding ----------------------------------------------------------------------------------------*/

function FlashText(FlashingText) {
	
	if (document.getElementById('FlashingText')) {
		
		var interval = 1500;
		var colour1 = "red";
		var colour2 = "blue";
		var element = document.getElementById('FlashingText');
			
		element.style.color = (element.style.color == colour1) ? colour2 : colour1;
		setTimeout("FlashText('" + FlashingText + "')", interval);
	}
	
}

/*Stop 'function FlashText(FlashingText)' Coding -----------------------------------------------------------------------------------------*/


	
/******************************************************************************************************************************************/



/*Start 'function NewsAlertsPage()' & 'function NewsAlerts()' Coding ---------------------------------------------------------------------*/

function NewsAlertsPage(n) {													 /*to load webpage and display specific document in iframe*/
	
	parent.window.open("../../PUBLIC_INFO/News_Alerts/NEWS_ALERTS.html?" + n, '_parent');
	
}

function NewsAlerts() {															 /*to load webpage and display specific document in iframe*/
	
	AnchorData = null;
	
	if (location.search.length > 0) {
		
		AnchorData = unescape(location.search.substring(1));
		
	}

	parent.document.getElementById('FullPageContentIframe').src = "../../PUBLIC_INFO/News_Alerts/Documents/NewsAlerts.html#" + AnchorData;
	
}

/*Stop 'function NewsAlertsPage()' & 'function NewsAlerts()' Coding ----------------------------------------------------------------------*/



/******************************************************************************************************************************************/	



/*Start 'function InvComplaintGuide()' Coding --------------------------------------------------------------------------------------------*/

function InvComplaintGuide() {									   /*to load webpage and display document in iframe depending on condition*/

	if (document.referrer == "http://www.azre.gov/INFO_FOR/CONSUMERS.html") {										/*must be complete URL*/
		
																		   /*IE does not report the referrer property when testing offline*/

		parent.document.getElementById('WideContentIframe').src = "../../INV/Documents/Complaint_Process_Consumers_Guide.html";
		
	}
	else {
		
		parent.document.getElementById('WideContentIframe').src = "../../INV/Inv_Intro.html";
		
	}
	
}
		
/*Stop 'function InvComplaintGuide()' Coding ---------------------------------------------------------------------------------------------*/



/******************************************************************************************************************************************/



/*Start 'function getBrowserProperties()' Coding -----------------------------------------------------------------------------------------*/

	/*Trigger for page-
	
	INSERT IN PAGE FOR IMMEDIATE SIZING-
	
	<div id="BrowserProperties">
		<script language="javascript">
			document.write(getBrowserProperties());
		</script>
	</div>
	
	OR USE IMAGE TO TROUBLESHHOOT SIZING ISSUE-
	
	<div id="BrowserProperties">
		<a href="javascript:document.write(getBrowserProperties());">&#127;</a>
	</div>
	
	OR USE AS AN ALERT-
	
	<div id="BrowserProperties">
		<a href="#" onclick="alertBrowserProperties()">&#127;</a>
	</div>
	
	*/
	
	/* Original Code *

function getBrowserProperties() {
	
	var props = new Array(
		'self.pageXOffset',
		'self.pageYOffset',
		'self.screenX',
		'self.screenY',
		'self.innerHeight',
		'self.innerWidth',
		'self.outerHeight',
		'self.outerWidth',
		'self.screen.height',
		'self.screen.width',
		'self.screen.availHeight',
		'self.screen.availWidth',
		'self.screen.availTop',
		'self.screen.availLeft',
		'self.screen.Top',
		'self.screen.Left',
		'self.screenTop',
		'self.screenLeft',
		'self.screen.colorDepth',
		'self.screen.pixelDepth',
		'document.body.clientHeight',
		'document.body.clientWidth',
		'document.body.scrollHeight',
		'document.body.scrollWidth',
		'document.body.scrollLeft',
		'document.body.scrollTop',
		'document.body.offsetHeight',
		'document.body.offsetWidth',
		'document.body.offsetTop',
		'document.body.offsetLeft'
	);
	
	*/
	
function getBrowserProperties() {
	
	var props = new Array(
	
		/*HEIGHT*/
	
		'self.pageXOffset',
		'self.screenX',
		'self.innerHeight',
		'self.outerHeight',
		'self.screen.height',
		'self.screen.availHeight',
		'self.screen.availTop',
		'self.screen.Top',
		'self.screenTop',
		'document.body.clientHeight',
		'document.body.scrollHeight',
		'document.body.scrollTop',
		'document.body.offsetHeight',
		'document.body.offsetTop',
		'document.documentElement.clientHeight',
		'document.documentElement.scrollHeight',
		'document.documentElement.offsetHeight',
		'document.documentElement.scrollTop'
		
		/*WIDTH*
		
		'self.pageYOffset',
		'self.screenY',
		'self.innerWidth',
		'self.outerWidth',
		'self.screen.width',
		'self.screen.availWidth',
		'self.screen.availLeft',
		'self.screen.Left',
		'self.screenLeft',
		'document.body.clientWidth',
		'document.body.scrollWidth',
		'document.body.scrollLeft',
		'document.body.offsetWidth',
		'document.body.offsetLeft',
		'document.documentElement.clientWidth',
		'document.documentElement.scrollLeft'
		
		/*MISC*

		'self.screen.colorDepth',
		'self.screen.pixelDepth'
		*/
	);

	var printstring = '';
	for (var i=0;i<props.length;i++) {
		if (!self.screen && props[i].indexOf('self.screen') != -1) continue;
		if (!document.body && props[i].indexOf('document.body') != -1) continue;
		if (eval(props[i])) printstring += '<br>' + '\r\n' + props[i] + ': ' + eval(props[i]);
		if (props[i].indexOf('document.body') != -1) {
			var end = props[i].substring(props[i].lastIndexOf('.')+1);
			newprop = 'document.documentElement.' + end;
			if (eval(newprop)) printstring += '<br>' + '\r\n' + newprop + ': ' + eval(newprop);
		}
	}
	return printstring;
	
}

function show() {
	
	alert('pageYOffset = ' + self.pageYOffset);
	
}

function reGet() {
	
	if (!document.getElementById) return;
	document.getElementById('BrowserProperties').innerHTML = getBrowserProperties();
	
}

function alertBrowserProperties() {
	
	var BrowserProperties = getBrowserProperties();
	
	alert(BrowserProperties);
	
}

/*Stop 'function getBrowserProperties()' Coding ------------------------------------------------------------------------------------------*/



/******************************************************************************************************************************************/	



/*Start - Never really had to use --------------------------------------------------------------------------------------------------------*/

function browserIE6() {
	
	if (NEWhsbHeight > NEWhciHeight && NEWnewsHeight) {
		hci.style.height = NEWhsbHeight + "px";
		news.style.height = NEWhsbHeight + "px";
		hfi.style.top = parseInt(headerHeight + NEWhsbHeight + 33) + "px";
		lbi.style.top = parseInt(headerHeight + NEWhsbHeight + hfiHeight + 34) + "px";
		cbi.style.top = parseInt(headerHeight + NEWhsbHeight + hfiHeight + lbiHeight + 39) + "px";
	}
	else if (hciHeight > (NEWhsbHeight && NEWnewsHeight) || (NEWhsbHeight && newsHeight)) {
		hci.style.height = hciHeight + "px";
		hsb.style.height = hciHeight + "px";
		news.style.height = hciHeight + "px";
		hfi.style.top = parseInt(headerHeight + hciHeight + 34) + "px";
		lbi.style.top = parseInt(headerHeight + hciHeight + hfiHeight + 34) + "px";
		cbi.style.top = parseInt(headerHeight + hciHeight + hfiHeight + lbiHeight + 39) + "px";
	}	
	else if (NEWnewsHeight > NEWhciHeight && NEWhsbHeight) {
		hci.style.height = NEWnewsHeight + "px";
		hsb.style.height = NEWnewsHeight + "px";
		hfi.style.top = parseInt(headerHeight + NEWnewsHeight + 33) + "px";
		lbi.style.top = parseInt(headerHeight + NEWnewsHeight + hfiHeight + 34) + "px";
		cbi.style.top = parseInt(headerHeight + NEWnewsHeight + hfiHeight + lbiHeight + 39) + "px";
	}
	
}

function browserIE7() {
	
	if (NEWhsbHeight > NEWhciHeight && newsHeight) {
		hci.style.height = NEWhsbHeight + "px";
		news.style.height = NEWhsbHeight + "px";
		hfi.style.top = parseInt(headerHeight + NEWhsbHeight + 33) + "px";
		lbi.style.top = parseInt(headerHeight + NEWhsbHeight + hfiHeight + 34) + "px";
		acbi.style.top = parseInt(headerHeight + NEWhsbHeight + hfiHeight + lbiHeight + 39) + "px";
	}
	else if (hciHeight > (NEWhsbHeight && newsHeight) || (NEWhsbHeight && newsHeight)) {
		hci.style.height = hciHeight + "px";
		hsb.style.height = hciHeight + "px";
		news.style.height = hciHeight + "px";
		hfi.style.top = parseInt(headerHeight + hciHeight + 34) + "px";
		lbi.style.top = parseInt(headerHeight + hciHeight + hfiHeight + 34) + "px";
		bcbi.style.top = parseInt(headerHeight + hciHeight + hfiHeight + lbiHeight + 39) + "px";
	}	
	else if (NEWnewsHeight > NEWhciHeight && NEWhsbHeight) {
		hci.style.height = NEWnewsHeight + "px";
		hsb.style.height = NEWnewsHeight + "px";
		hfi.style.top = parseInt(headerHeight + NEWnewsHeight + 33) + "px";
		lbi.style.top = parseInt(headerHeight + NEWnewsHeight + hfiHeight + 34) + "px";
		cbi.style.top = parseInt(headerHeight + NEWnewsHeight + hfiHeight + lbiHeight + 39) + "px";
	}
	
}

/*Stop - Never really had to use ---------------------------------------------------------------------------------------------------------*/



/******************************************************************************************************************************************/	

	
	
/*Start 'function loadContent()' Coding --------------------------------------------------------------------------------------------------*/
	
function loadContent() {
	
	parent.window.scrollTo(0,0);
		
/*Start Common Page Coding ---------------------------------------------------------------------------------------------------------------*/
	
	/* parent.document.X.height does not exist (undefined)- NEVER use */
	/* parent.document.body.XHeight always equals 0 */

	var iHeight = document.body.scrollHeight; 								/*IE7 & FF2 - final scrolled height of the browser screen*/
	var iWidth = document.body.clientWidth;													/*IE4+ - physical width of the browser screen*/
	var bHeight = document.documentElement.scrollHeight;									/*IE6 - physical height of the browser screen*/
	var bWidth = parent.document.body.clientWidth;
	/* var iWidth = window.innerWidth; */												 /*FF & NS6 - physical width of the browser screen*/
	/* var bHeight = window.innerHeight; */												/*FF & NS6 - physical height of the browser screen*/
	
	headerHeight = 110 + 5 + 20 + 5;													/*height of header and nav/breadcrumb bar combined*/
	
/*------------------------------------------------------------------*/

	if (parent.document.getElementById('HeaderIframe')) {
	
		var hiHeight = parent.document.getElementById('HeaderIframe').offsetHeight;						/*all - retrieve height of element*/
	
		hi = parent.document.getElementById('HeaderIframe');
	
		if (hi) {
			hiWidth = (bWidth);
		}
	
		if (hiWidth < 640) {
			hi.style.width = 640 + "px";
		}
		else {
			hi.style.width = hiWidth + "px";
		}
	
	}
	
/*End Common Page Coding -----------------------------------------------------------------------------------------------------------------*/


/*Start Home Page Coding -----------------------------------------------------------------------------------------------------------------*/

	if (parent.document.getElementById('HomeContentIframe')) {
		
		parent.document.getElementById('HomeContentIframe').contentWindow.document.body.focus();
		
		parent.document.getElementById('HomeContentIframe').contentWindow.document.body.style.backgroundColor = "white";
		
		var hsbScrollHeight = parent.document.getElementById('HomeSideBar').scrollHeight;
		var hciHeight = parent.document.getElementById('HomeContentIframe').contentWindow.document.body.offsetHeight;
		var hciScrollHeight = parent.document.getElementById('HomeContentIframe').contentWindow.document.body.scrollHeight;
		var newsScrollHeight = parent.document.getElementById('NewsColumn').scrollHeight;
		
		var nbHeight = parent.document.getElementById('NavBarIframe').offsetHeight;						/*all - retrieve height of element*/
		var hsbtbHeight = parent.document.getElementById('HomeSideBarTitleBox').offsetHeight;			/*all - retrieve height of element*/
		var NEWhsbHeight = parent.document.getElementById('HomeSideBar').offsetHeight;					/*all - retrieve height of element*/
		var hctbHeight = parent.document.getElementById('HomeContentTitleBox').offsetHeight;			/*all - retrieve height of element*/
		var NEWhciHeight = parent.document.getElementById('HomeContentIframe').offsetHeight;			/*all - retrieve height of element*/
		var newstbHeight = parent.document.getElementById('NewsColumnTitleBox').offsetHeight;			/*all - retrieve height of element*/
		var NEWnewsHeight = parent.document.getElementById('NewsColumn').offsetHeight;					/*all - retrieve height of element*/
		var hfiHeight = parent.document.getElementById('HomeFooterIframe').offsetHeight;				/*all - retrieve height of element*/
		var lbiHeight = parent.document.getElementById('LegalBarIframe').offsetHeight;					/*all - retrieve height of element*/
		var cbiHeight = parent.document.getElementById('CopyrightBarIframe').offsetHeight;				/*all - retrieve height of element*/
		
		var NEWnbWidth = parent.document.getElementById('NavBarIframe').offsetWidth;					 /*all - retrieve width of element*/
		var NEWhctbWidth = parent.document.getElementById('HomeContentTitleBox').offsetWidth;			 /*all - retrieve width of element*/
		var NEWhciWidth = parent.document.getElementById('HomeContentIframe').offsetWidth;				 /*all - retrieve width of element*/
		var NEWhfiWidth = parent.document.getElementById('HomeFooterIframe').offsetWidth;				 /*all - retrieve width of element*/
		var NEWlbiWidth = parent.document.getElementById('LegalBarIframe').offsetWidth;					 /*all - retrieve width of element*/
		var NEWcbiWidth = parent.document.getElementById('CopyrightBarIframe').offsetWidth;				 /*all - retrieve width of element*/
		
		nb = parent.document.getElementById('NavBarIframe');
		kws = parent.document.getElementById('KeywordSearchBar');
		hsbtb = parent.document.getElementById('HomeSideBarTitleBox');
		hsb = parent.document.getElementById('HomeSideBar');
		hctb = parent.document.getElementById('HomeContentTitleBox');
		hci = parent.document.getElementById('HomeContentIframe');
		newstb = parent.document.getElementById('NewsColumnTitleBox');
		news = parent.document.getElementById('NewsColumn');
		hfi = parent.document.getElementById('HomeFooterIframe');
		lbi = parent.document.getElementById('LegalBarIframe');
		cbi = parent.document.getElementById('CopyrightBarIframe');
		
		kwsWidth = 250;
		hsbWidth = 185 + 5;
		newsWidth = 185 + 5;
		hsbnewsWidth = 380;
		hciWidth = bWidth - hsbnewsWidth;									 /*need 'else {}' to eliminate error of negative width*/
		hfiWidth = bWidth;
		lbiWidth = bWidth;
		cbiWidth = bWidth;
		
/*------------------------------------------------------------------*/
	
	if (nb) {
		nbWidth = parseInt(bWidth - kwsWidth);										 /*need 'else {}' to eliminate error of negative width*/
		nb.style.top = parseInt(headerHeight - nbHeight) + "px";
	}
	
	if (nbWidth < 390) {
		nb.style.width = 390 + "px";
	}
	else {																							/*eliminates error of negative nbWidth*/
		nb.style.width = nbWidth + "px";
	}
	
/*------------------------------------------------------------------*/
	
	if (kws) {
		kws.style.top = parseInt(headerHeight - nbHeight) + "px";
	}
	
	if (nbWidth < 390) {
		kws.style.left = 390 + "px";
	}
	else {
		kws.style.left = nbWidth + "px";
	}
	
/*------------------------------------------------------------------*/
	
	if (hsbtb) {
		hsbtb.style.top = parseInt(headerHeight + 5) + "px";
		hsb.style.top = parseInt(headerHeight + hsbtbHeight + 5) + "px";
	}
	
/*------------------------------------------------------------------*/

	if (hctb) {
		hctb.style.left = hsbWidth + "px";
		hctbWidth = parseInt(bWidth - hsbnewsWidth - 4);							 /*need 'else {}' to eliminate error of negative width*/
		hctb.style.top = parseInt(headerHeight + 5) + "px";
		
		if (hctbWidth < 256) {
			hctb.style.width = 256 + "px";
		}
		else {																					  /*eliminates error of negative hctbWidth*/
			hctb.style.width = hctbWidth + "px";
		}
	}
	
/*------------------------------------------------------------------*/

	if (newstb) {
		newstb.style.top = parseInt(headerHeight + 5) + "px";
		news.style.top = parseInt(headerHeight + newstbHeight + 5) + "px";
		
		if ((hciWidth + hsbWidth + 5) < 455) {
			newstb.style.left = 455 + "px";
			news.style.left = 455 + "px";
		}
		else {
			newstb.style.left = parseInt(hciWidth + hsbWidth + 5) + "px";
			news.style.left = parseInt(hciWidth + hsbWidth + 5) + "px";
		}
	}
		
/*------------------------------------------------------------------*/
	
	if (hci) {
		hci.style.left = hsbWidth + "px";
		hci.style.top = parseInt(headerHeight + hctbHeight + 5) + "px";
	}
	
	if ((hsbScrollHeight > hciScrollHeight) && (hsbScrollHeight > newsScrollHeight)) {					/*when hsb is tallest column*/
		hsb.style.height = hsbScrollHeight + "px";
		hci.style.height = hsbScrollHeight + "px";
		news.style.height = hsbScrollHeight + "px";
		hfi.style.top = parseInt(headerHeight + hsbtbHeight + hsbScrollHeight + 10) + "px";
		lbi.style.top = parseInt(headerHeight + hsbtbHeight + hsbScrollHeight + hfiHeight + 10) + "px";
		cbi.style.top = parseInt(headerHeight + hsbtbHeight + hsbScrollHeight + hfiHeight + lbiHeight + 15) + "px";
	}
	else if ((hciScrollHeight > hsbScrollHeight) && (hciScrollHeight > newsScrollHeight)) {			/*when hci is tallest column*/
		hsb.style.height = hciScrollHeight + "px";
		hci.style.height = hciScrollHeight + "px";
		news.style.height = hciScrollHeight + "px";
		hfi.style.top = parseInt(headerHeight + hctbHeight + hciScrollHeight + 10) + "px";
		lbi.style.top = parseInt(headerHeight + hctbHeight + hciScrollHeight + hfiHeight + 10) + "px";
		cbi.style.top = parseInt(headerHeight + hctbHeight + hciScrollHeight + hfiHeight + lbiHeight + 15) + "px";
	}
	else if ((newsScrollHeight > hsbScrollHeight) && (newsScrollHeight > hciScrollHeight)) {			/*when news is tallest column*/
		hsb.style.height = newsScrollHeight + "px";
		hci.style.height = newsScrollHeight + "px";
		news.style.height = newsScrollHeight + "px";
		hfi.style.top = parseInt(headerHeight + hsbtbHeight + newsScrollHeight + 10) + "px";
		lbi.style.top = parseInt(headerHeight + hsbtbHeight + newsScrollHeight + hfiHeight + 10) + "px";
		cbi.style.top = parseInt(headerHeight + hsbtbHeight + newsScrollHeight + hfiHeight + lbiHeight + 15) + "px";
	}
	
	if (hciWidth < 260) {
		hci.style.width = 260 + "px";							/*prevents header text from over lappinp Top left & right images*/
	}
	else {																						   /*eliminates error of negative hciWidth*/
		hci.style.width = hciWidth + "px";
	}


/*------------------------------------------------------------------*/
	

/*------------------------------------------------------------------

	if (hfiWidth < 640) {
		hfi.style.width = 525 + "px";
		hfi.style.left = 57 + "px";
	}
	else if (hfiWidth < 725) {
		hfi.style.width = 525 + "px";
		hfiMargins = parseInt(bWidth - 525) + "px";
		hfi.style.left = parseInt(hfiMargins) / 2 + "px";					/*FF - divide by 2 needs to stay OUTSIDE brackets/
	}	
	else {
		hfi.style.width = 725 + "px";
		hfiMargins = parseInt(bWidth - 725) + "px";
		hfi.style.left = parseInt(hfiMargins) / 2 + "px";
	}

------------------------------------------------------------------*/

/*------------------------------------------------------------------*/

	if (hfiWidth < 640) {											/*prevents header text from over lappinp Top left & right images*/
		hfi.style.width = 500 + "px";
		hfi.style.left = 70 + "px";
	}
	else {
		hfi.style.width = 500 + "px";
		hfiMargins = parseInt(bWidth - 500) + "px";
		hfi.style.left = parseInt(hfiMargins) / 2 + "px";			/*FF - divide by 2 needs to stay OUTSIDE brackets*/
	}
		
/*------------------------------------------------------------------*/
	
	if (lbiWidth < 640) {											/*prevents header text from over lappinp Top left & right images*/
		lbi.style.width = 640 + "px";
	}
	/*
	else if (lbiWidth < 725) {																				 *when hfi goes to three rows*
		lbi.style.width = lbiWidth + "px";
	}
	*/
	else {
		lbi.style.width = lbiWidth + "px";
	}

/*------------------------------------------------------------------*/
	
	if (cbiWidth < 640) {											/*prevents header text from over lappinp Top left & right images*/
		cbi.style.width = 640 + "px";
	}
	/*
	else if (cbiWidth < 725) {																				 *when hfi goes to three rows*
		cbi.style.width = cbiWidth + "px";
	}
	*/
	else {
		cbi.style.width = cbiWidth + "px";
	}
	
	}
	
/*End Home Page Coding -------------------------------------------------------------------------------------------------------------------*/


/*Start Narrow Content Page Coding -------------------------------------------------------------------------------------------------------*/

	if (parent.document.getElementById('NarrowContentIframe')) {
		
		parent.document.getElementById('NarrowContentIframe').contentWindow.document.body.focus();
		
		parent.document.getElementById('NarrowContentIframe').contentWindow.document.body.style.backgroundColor = "white";
		
		var nciHeight = parent.document.getElementById('NarrowContentIframe').contentWindow.document.body.offsetHeight;
		var wsbHeight = parent.document.getElementById('WideSideBar').height;
	
		var nbHeight = parent.document.getElementById('NavBarIframe').offsetHeight;						/*all - retrieve height of element*/
		var bcbHeight = parent.document.getElementById('BreadcrumbBar').offsetHeight;					/*all - retrieve height of element*/
		var wsbtbHeight = parent.document.getElementById('WideSideBarTitleBox').offsetHeight;			/*all - retrieve height of element*/
		var NEWwsbHeight = parent.document.getElementById('WideSideBar').offsetHeight;					/*all - retrieve height of element*/
		var NEWnciHeight = parent.document.getElementById('NarrowContentIframe').offsetHeight;			/*all - retrieve height of element*/
		var lbiHeight = parent.document.getElementById('LegalBarIframe').offsetHeight;					/*all - retrieve height of element*/
		var cbiHeight = parent.document.getElementById('CopyrightBarIframe').offsetHeight;				/*all - retrieve height of element*/
		
		var NEWnbWidth = parent.document.getElementById('NavBarIframe').offsetWidth;					 /*all - retrieve width of element*/
		var NEWnciWidth = parent.document.getElementById('NarrowContentIframe').offsetWidth;			 /*all - retrieve width of element*/
		
		nb = parent.document.getElementById('NavBarIframe');
		kws = parent.document.getElementById('KeywordSearchBar');
		bcb = parent.document.getElementById('BreadcrumbBar');
		wsbtb = parent.document.getElementById('WideSideBarTitleBox');
		wsb = parent.document.getElementById('WideSideBar');
		nci = parent.document.getElementById('NarrowContentIframe');
		lbi = parent.document.getElementById('LegalBarIframe');
		cbi = parent.document.getElementById('CopyrightBarIframe');
		
		kwsWidth = 250;
		wsbWidth = 360 + 5;
		bcbWidth = bWidth;
		lbiWidth = bWidth;
		cbiWidth = bWidth;
			
/*------------------------------------------------------------------*/
	
	if (nb) {
		nbWidth = parseInt(bWidth - kwsWidth);										 /*need 'else {}' to eliminate error of negative width*/
		nb.style.top = parseInt(headerHeight - nbHeight) + "px";
	}
	
	if (nbWidth < 390) {
		nb.style.width = 390 + "px";
	}
	else {																							/*eliminates error of negative nbWidth*/
		nb.style.width = nbWidth + "px";
	}
	
/*------------------------------------------------------------------*/
	
	if (kws) {
		kws.style.left = NEWnbWidth + "px";
		kws.style.top = parseInt(headerHeight - nbHeight) + "px";
	}
	
/*------------------------------------------------------------------*/

	if (bcb) {
		bcb.style.top = parseInt(headerHeight + 5) + "px";
	}
	
	if (bcbWidth < 640) {
		bcb.style.width = 640 + "px";
	}
	else {
		bcb.style.width = bWidth + "px";
	}
	
/*------------------------------------------------------------------*/
	
	if (wsbtb) {
		wsbtb.style.top = parseInt(headerHeight + bcbHeight + 10) + "px";
	}
	
/*------------------------------------------------------------------*/
	
	if (wsb) {
		wsb.style.top = parseInt(headerHeight + bcbHeight + wsbtbHeight + 10) + "px";
	}
	
/*------------------------------------------------------------------*/
	
	if (nci) {
		nci.style.left = wsbWidth + "px";
		nciWidth = parseInt(bWidth - wsbWidth);										 /*need 'else {}' to eliminate error of negative width*/
		nci.style.top = parseInt(headerHeight + bcbHeight + 10) + "px";
	}

	if (NEWwsbHeight > NEWnciHeight && nciHeight) {												/*for short content*/
		nci.style.height = parseInt(NEWwsbHeight + wsbtbHeight) + "px";						  /*prevents space at bottom of content page*/
		wsb.style.height = NEWwsbHeight + "px";
		lbi.style.top = parseInt(headerHeight + bcbHeight + NEWwsbHeight + wsbtbHeight + 15) + "px";/*below sidebar when short content page*/
		cbi.style.top = parseInt(headerHeight + bcbHeight + NEWwsbHeight + wsbtbHeight + lbiHeight + 20) + "px";/*below sidebar when short content page*/
	}	
	else if (nciHeight > NEWwsbHeight && NEWnciHeight) {                               /*for short sidebar*/
		nci.style.height = parseInt(nciHeight + wsbtbHeight) + "px";
		wsb.style.height = nciHeight + "px";
		lbi.style.top = parseInt(headerHeight + bcbHeight + wsbtbHeight + nciHeight + 15) + "px";	/*below sidebar when short sidebar page*/
		cbi.style.top = parseInt(headerHeight + bcbHeight + wsbtbHeight + nciHeight + lbiHeight + 20) + "px";	/*below sidebar when short sidebar page*/
	}

	if (nciWidth < 275) {
		nci.style.width = 275 + "px";
	}
	else {
		nci.style.width = nciWidth + "px";														   /*eliminates error of negative wciWidth*/
	}
	
/*------------------------------------------------------------------*/

	if (lbiWidth < 640) {
		lbi.style.width = 640 + "px";
	}
	else {
		lbi.style.width = lbiWidth + "px";
	}

/*------------------------------------------------------------------*/
	
	if (cbiWidth < 640) {
		cbi.style.width = 640 + "px";
	}
	else {
		cbi.style.width = cbiWidth + "px";
	}
	
	}
	
/*End Narrow Content Page Coding ---------------------------------------------------------------------------------------------------------*/


/*Start Wide Content Page Coding ---------------------------------------------------------------------------------------------------------*/

	if (parent.document.getElementById('WideContentIframe')) {
		
		parent.document.getElementById('WideContentIframe').contentWindow.document.body.focus();
		
		parent.document.getElementById('WideContentIframe').contentWindow.document.body.style.backgroundColor = "white";
	
		var wciHeight = parent.document.getElementById('WideContentIframe').contentWindow.document.body.offsetHeight;
		var nsbHeight = parent.document.getElementById('NarrowSideBar').height;
		
		var nbHeight = parent.document.getElementById('NavBarIframe').offsetHeight;						/*all - retrieve height of element*/
		var bcbHeight = parent.document.getElementById('BreadcrumbBar').offsetHeight;
		var nsbtbHeight = parent.document.getElementById('NarrowSideBarTitleBox').offsetHeight;
		var NEWnsbHeight = parent.document.getElementById('NarrowSideBar').offsetHeight;
		var NEWwciHeight = parent.document.getElementById('WideContentIframe').offsetHeight;
		var lbiHeight = parent.document.getElementById('LegalBarIframe').offsetHeight;
		var cbiHeight = parent.document.getElementById('CopyrightBarIframe').offsetHeight;
		
		var NEWnbWidth = parent.document.getElementById('NavBarIframe').offsetWidth;					 /*all - retrieve width of element*/
		var NEWwciWidth = parent.document.getElementById('WideContentIframe').offsetWidth;
		
		nb = parent.document.getElementById('NavBarIframe');
		kws = parent.document.getElementById('KeywordSearchBar');
		bcb = parent.document.getElementById('BreadcrumbBar');
		nsbtb = parent.document.getElementById('NarrowSideBarTitleBox');
		nsb = parent.document.getElementById('NarrowSideBar');
		wci = parent.document.getElementById('WideContentIframe');
		lbi = parent.document.getElementById('LegalBarIframe');
		cbi = parent.document.getElementById('CopyrightBarIframe');
		
		kwsWidth = 250;
		nsbWidth = 185 + 5;
		bcbWidth = bWidth;
		lbiWidth = bWidth;
		cbiWidth = bWidth;
	
/*------------------------------------------------------------------*/
	
	if (nb) {
		nbWidth = parseInt(bWidth - kwsWidth);										 /*need 'else {}' to eliminate error of negative width*/
		nb.style.top = parseInt(headerHeight - nbHeight) + "px";
	}
	
	if (nbWidth < 390) {
		nb.style.width = 390 + "px";
	}
	else {																							/*eliminates error of negative nbWidth*/
		nb.style.width = nbWidth + "px";
	}
	
/*------------------------------------------------------------------*/
	
	if (kws) {
		kws.style.left = NEWnbWidth + "px";
		kws.style.top = parseInt(headerHeight - nbHeight) + "px";
	}
	
/*------------------------------------------------------------------*/

	if (bcb) {
		bcb.style.top = parseInt(headerHeight + 5) + "px";
	}
	
	if (bcbWidth < 640) {
		bcb.style.width = 640 + "px";
	}
	else {
		bcb.style.width = bWidth + "px";
	}
	
/*------------------------------------------------------------------*/
	
	if (nsbtb) {
		nsbtb.style.top = parseInt(headerHeight + bcbHeight + 10) + "px";
	}
	
/*------------------------------------------------------------------*/
	
	if (nsb) {
		nsb.style.top = parseInt(headerHeight + bcbHeight + nsbtbHeight + 10) + "px";
	}
	
/*------------------------------------------------------------------*/	
	
	if (wci) {
		wci.style.left = nsbWidth + "px";
		wciWidth = parseInt(bWidth - nsbWidth);										 /*need 'else {}' to eliminate error of negative width*/
		wci.style.top = parseInt(headerHeight + bcbHeight + 10) + "px";
	}
	
	if (NEWnsbHeight > NEWwciHeight && wciHeight) {																/*for short content pages*/
		wci.style.height = parseInt(NEWnsbHeight + nsbtbHeight) + "px";							/*prevents space at bottom of content page*/
		nsb.style.height = NEWnsbHeight + "px";													   /*prevents space at bottom of sidebar*/
		lbi.style.top = parseInt(headerHeight + bcbHeight + nsbtbHeight + NEWnsbHeight + 15) + "px";	/*below sidebar when short content page*/
		cbi.style.top = parseInt(headerHeight + bcbHeight + nsbtbHeight + NEWnsbHeight + lbiHeight + 20) + "px";/*below sidebar when short content page*/
	}
	else if (wciHeight > NEWnsbHeight && NEWwciHeight) {												/*for short sidebar*/
		wci.style.height = parseInt(wciHeight + nsbtbHeight) + "px";						/*prevents space at bottom of content page*/
		nsb.style.height = wciHeight + "px";													   /*prevents space at bottom of sidebar*/
		lbi.style.top = parseInt(headerHeight + bcbHeight + nsbtbHeight + wciHeight + 15) + "px";		/*below content when short sidebar*/
		cbi.style.top = parseInt(headerHeight + bcbHeight + nsbtbHeight + wciHeight + lbiHeight + 20) + "px";	/*below content when short sidebar*/
	}
	
	if (wciWidth < 450) {
		wci.style.width = 450 + "px";
	}
	else {
		wci.style.width = wciWidth + "px";														   /*eliminates error of negative wciWidth*/
	}
		
/*------------------------------------------------------------------*/

	if (lbiWidth < 640) {
		lbi.style.width = 640 + "px";
	}
	else {
		lbi.style.width = lbiWidth + "px";
	}

/*------------------------------------------------------------------*/
	
	if (cbiWidth < 640) {
		cbi.style.width = 640 + "px";
	}
	else {
		cbi.style.width = cbiWidth + "px";
	}
	
	}
	
/*End Wide Content Page Coding -----------------------------------------------------------------------------------------------------------*/


/*Start Full Page Content Page Coding ----------------------------------------------------------------------------------------------------*/

	if (parent.document.getElementById('FullPageContentIframe')) {
		
		parent.document.getElementById('FullPageContentIframe').contentWindow.document.body.focus();
		
		parent.document.getElementById('FullPageContentIframe').contentWindow.document.body.style.backgroundColor = "white";
		
		var fpciHeight = parent.document.getElementById('FullPageContentIframe').contentWindow.document.body.offsetHeight;	/*fix for O9*/
		var fpciScrollHeight = parent.document.getElementById('FullPageContentIframe').contentWindow.document.body.scrollHeight;
		var fpciScrollWidth = parent.document.getElementById('FullPageContentIframe').contentWindow.document.body.scrollWidth;
		var fpciWidth = parent.document.getElementById('FullPageContentIframe').contentWindow.document.body.offsetWidth;	/*fix for O9*/
	
		var nbHeight = parent.document.getElementById('NavBarIframe').offsetHeight;						/*all - retrieve height of element*/
		var bcbHeight = parent.document.getElementById('BreadcrumbBar').offsetHeight;					/*all - retrieve height of element*/
		var NEWfpciHeight = parent.document.getElementById('FullPageContentIframe').offsetHeight;		/*all - retrieve height of element*/
		var lbiHeight = parent.document.getElementById('LegalBarIframe').offsetHeight;					/*all - retrieve height of element*/
		var cbiHeight = parent.document.getElementById('CopyrightBarIframe').offsetHeight;				/*all - retrieve height of element*/
		
		var NEWnbWidth = parent.document.getElementById('NavBarIframe').offsetWidth;					 /*all - retrieve width of element*/
		var NEWfpciWidth = parent.document.getElementById('FullPageContentIframe').offsetWidth;			 /*all - retrieve width of element*/
		
		nb = parent.document.getElementById('NavBarIframe');
		kws = parent.document.getElementById('KeywordSearchBar');
		bcb = parent.document.getElementById('BreadcrumbBar');
		fpci = parent.document.getElementById('FullPageContentIframe');
		lbi = parent.document.getElementById('LegalBarIframe');
		cbi = parent.document.getElementById('CopyrightBarIframe');
		
		kwsWidth = 250;
		fpciWidth = bWidth;
		bcbWidth = bWidth;
		lbiWidth = bWidth;
		cbiWidth = bWidth;
	
/*------------------------------------------------------------------*/
	
	if (nb) {
		nbWidth = parseInt(bWidth - kwsWidth);										 /*need 'else {}' to eliminate error of negative width*/
		nb.style.top = parseInt(headerHeight - nbHeight) + "px";
	}
	
	if (nbWidth < 520) {
		nb.style.width = 520 + "px";
	}
	else {																							/*eliminates error of negative nbWidth*/
		nb.style.width = nbWidth + "px";
	}
	
/*------------------------------------------------------------------*/
	
	if (kws) {
		kws.style.top = parseInt(headerHeight - nbHeight) + "px";
	}
	
	if (nbWidth < 520) {
		kws.style.left = 520 + "px";
	}
	else {
		kws.style.left = nbWidth + "px";
	}
	
/*------------------------------------------------------------------*/

	if (bcb) {
		bcb.style.top = parseInt(headerHeight + 5) + "px";
	}
	
	if (bcbWidth < 770) {
		bcb.style.width = 770 + "px";
	}
	else {
		bcb.style.width = bcbWidth + "px";
	}
	
/*------------------------------------------------------------------*/
	
	if (fpci) {
		fpci.style.top = parseInt(headerHeight + bcbHeight + 10) + "px";
		fpci.style.width = 770 + "px";
		
		if (fpciScrollHeight < 360) {
			fpci.style.height = 360 + "px";
			lbi.style.top = parseInt(headerHeight + bcbHeight + 360 + 15) + "px";
			cbi.style.top = parseInt(headerHeight + bcbHeight + 360 + lbiHeight + 20) + "px";
		}
		else {
			fpci.style.height = fpciScrollHeight + "px";
			lbi.style.top = parseInt(headerHeight + bcbHeight + fpciScrollHeight + 15) + "px";
			cbi.style.top = parseInt(headerHeight + bcbHeight + fpciScrollHeight + lbiHeight + 20) + "px";
		}
	}
	
/*------------------------------------------------------------------*/

	if (lbiWidth < 770) {
		lbi.style.width = 770 + "px";
	}
	else {
		lbi.style.width = lbiWidth + "px";
	}

/*------------------------------------------------------------------*/
	
	if (cbiWidth < 770) {
		cbi.style.width = 770 + "px";
	}
	else {
		cbi.style.width = cbiWidth + "px";
	}
	
	}
	
/*End Full Page Content Page Coding ------------------------------------------------------------------------------------------------------*/
		
}
	
/*Stop 'function loadContent()' Coding ---------------------------------------------------------------------------------------------------*/