


/* ------------------------------------------------   Magic Vars   ------------------------------------------------ */
var globalPath = 'http://abc.utah.gov/' //this is the path to root that we can use for building common elements
var uiiOverride = false; //false allows the uii banner to load. true turns it off. used with the loadUII() function below

var theDate = new Date();
var currentYear = theDate.getYear();
if (currentYear < 2000) {
	currentYear += 1900;
}
//alert('currentYear = ' + currentYear);


//google analytics stuff
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));







/* ------------------------------------------------   Menu Arrays   ------------------------------------------------ */
//in the arrays below, the first set of quotes is the url, the second is the graphical button, the third is the alt attribute and title value.
var  homeArray = new Array();
	homeArray[0] = new Array('license/index.html', 'common/images/nav/home/license.png', 'License and Permits');
	homeArray[1] = new Array('laws/index.html', 'common/images/nav/home/laws.png', 'Liquor Laws');
//	homeArray[2] = new Array('http://utah.buyersvine.com/', 'common/images/nav/home/pairing.png', 'Wine Pairing');
	homeArray[2] = new Array('wine_pairing/index.html', 'common/images/nav/home/pairing.png', 'Wine Pairing');
	homeArray[3] = new Array('online/renew.html', 'common/images/nav/home/online.png', 'Online License Renewal');
	homeArray[4] = new Array('online/special_orders.html', 'common/images/nav/home/special.png', 'Special Orders');
	homeArray[5] = new Array('http://www.parentsempowered.org/', 'common/images/nav/home/parents.png', 'Parents Empowered');
	homeArray[6] = new Array('vendor/index.html', 'common/images/nav/home/vendor.png', 'Vendor Information');



var mainNavArray = new Array();
	mainNavArray[0] = new Array('index.html', 'imageHere', 'Home');
	mainNavArray[1] = new Array('about/index.html', 'imageHere', 'About DABC');
	mainNavArray[2] = new Array('new/index.html', 'imageHere', 'What\'s New?');
//	mainNavArray[2] = new Array('pricing/index.html', 'imageHere', 'Pricing');
	mainNavArray[3] = new Array('products/index.html', 'imageHere', 'Products');
	mainNavArray[4] = new Array('calendar/index.html', 'imageHere', 'Calendar');
	mainNavArray[5] = new Array('online/index.html', 'imageHere', 'Online Services');
	mainNavArray[6] = new Array('how/index.html', 'imageHere', 'How Do I ...');
	mainNavArray[7] = new Array('about/contact.html', 'imageHere', 'Contact Us');
	
	
var footerArray = new Array();
	footerArray[0] = new Array('http://www.utah.gov/privacypolicy.html', 'imageHere', 'Privacy Policy');
	footerArray[1] = new Array('http://www.utah.gov/disclaimer.html', 'imageHere', 'Terms of Use');


var aboutNavArray = new Array();
//	aboutNavArray[0] = new Array('about/index.html', 'imageHere', 'Executive Director\'s Message');  
	aboutNavArray[0] = new Array('about/index.html', 'imageHere', 'Origin and Purpose');
	aboutNavArray[1] = new Array('about/function.html', 'imageHere', 'Our Function');
	aboutNavArray[2] = new Array('about/commission.html', 'imageHere', 'DABC Commission');
	aboutNavArray[3] = new Array('about/control_states.html', 'imageHere', 'Liquor Control States');
	aboutNavArray[4] = new Array('about/advantages.html', 'imageHere', 'Advantages Of Being a Liquor Control State');
	aboutNavArray[5] = new Array('about/annual_report.html', 'imageHere', 'Annual Reports');
//	aboutNavArray[6] = new Array('about/expanded_annual_report.html', 'imageHere', 'Expanded Annual Reports');
	aboutNavArray[6] = new Array('about/liquor_stores.html', 'imageHere', 'Utah Liquor Stores');
	aboutNavArray[7] = new Array('about/wine_stores.html', 'imageHere', 'Utah Wine Stores');
	aboutNavArray[8] = new Array('about/package_agencies.html', 'imageHere', 'Utah Contract Stores');
	aboutNavArray[9] = new Array('about/contact.html', 'imageHere', 'Contact Us');
	aboutNavArray[10] = new Array('about/hours.html', 'imageHere', 'Hours of Operation');
	aboutNavArray[11] = new Array('about/holidays.html', 'imageHere', 'Observed Holidays');
	
	
var calendarNavArray = new Array();
	calendarNavArray[0] = new Array('calendar/index.html', 'imageHere', 'Commission Meeting');
	calendarNavArray[1] = new Array('about/holidays.html', 'imageHere', 'Observed Holidays');
	calendarNavArray[2] = new Array('calendar/fiscal_calendar.html', 'imageHere', 'Fiscal Calendar');
	calendarNavArray[3] = new Array('calendar/meetings.html', 'imageHere', 'View All DABC Public Meeting Notices');
	
var lawNavArray = new Array();
	lawNavArray[0] = new Array('laws/index.html', 'imageHere', 'Statutes and Rules');
	lawNavArray[1] = new Array('laws/law_residents.html', 'imageHere', 'Affecting Residents & Visitors');
	lawNavArray[2] = new Array('laws/law_enforcement.html', 'imageHere', 'Affecting Enforcement');
//	lawNavArray[3] = new Array('laws/local_ordinance.html', 'imageHere', 'Relationship Between State Alcohol Laws and Local Ordinances');
	lawNavArray[3] = new Array('laws/documents/local_ordinance_and_abc_act.pdf', 'imageHere', 'Relationship Between State Alcohol Laws and Local Ordinances');
	lawNavArray[4] = new Array('laws/beer_signage.html', 'imageHere', 'Required Signage and Placement of Beer in Stores');
	lawNavArray[5] = new Array('laws/law_faqs.html', 'imageHere', 'Frequently Asked Questions');
	
	
var licenseNavArray = new Array();
	licenseNavArray[0] = new Array('license/index.html', 'imageHere', 'General Information');
	licenseNavArray[1] = new Array('license/licenses_airport.html', 'imageHere', 'Airport Lounge');
	licenseNavArray[2] = new Array('license/licenses_club.html', 'imageHere', 'Club');
	licenseNavArray[3] = new Array('license/licenses_banquet.html', 'imageHere', 'On-premise Banquet & Catering');
	licenseNavArray[4] = new Array('license/licenses_beer.html', 'imageHere', 'On-premise Beer - Recreational');
	licenseNavArray[5] = new Array('license/licenses_beer_tavern.html', 'imageHere', 'On-premise Beer - Tavern');
	licenseNavArray[6] = new Array('license/licenses_package_agency.html', 'imageHere', 'Package Agency');
	licenseNavArray[7] = new Array('license/licenses_reception_center.html', 'imageHere', 'Reception Center');
	licenseNavArray[8] = new Array('license/licenses_resort.html', 'imageHere', 'Resort');
	licenseNavArray[9] = new Array('license/licenses_restaurant_beer.html', 'imageHere', 'Restaurant - Beer Only');
	licenseNavArray[10] = new Array('license/licenses_restaurant.html', 'imageHere', 'Restaurant - Full Service');
	licenseNavArray[11] = new Array('license/licenses_restaurant_limited.html', 'imageHere', 'Restaurant - Limited Service');
	licenseNavArray[12] = new Array('license/licenses_manufacturing.html', 'imageHere', 'Manufacturing License');
	licenseNavArray[13] = new Array('license/licenses_rep.html', 'imageHere', 'Local Industry Representative');
	licenseNavArray[14] = new Array('license/permits_single_event.html', 'imageHere', 'Single Event Permit');
	licenseNavArray[15] = new Array('license/permits_special_use.html', 'imageHere', 'Special Use Permit');
	licenseNavArray[16] = new Array('license/permits_temp_beer.html', 'imageHere', 'Temporary Beer Event Permit');
	licenseNavArray[17] = new Array('license/licenses_beer_wholesaler.html', 'imageHere', 'Beer Wholesaler');
	licenseNavArray[18] = new Array('license/licenses_liquor_whse.html', 'imageHere', 'Liquor Warehouse');
//	licenseNavArray[16] = new Array('license/licenses_nonstate_brewer.html', 'imageHere', 'Out of State Brewer');
	licenseNavArray[19] = new Array('license/licenses_certificate_of_approval.html', 'imageHere', 'Certificate of Approval');
	licenseNavArray[20] = new Array('license/proximity.html', 'imageHere', 'Proximity Restrictions');
	licenseNavArray[21] = new Array('license/dispensing.html', 'imageHere', 'Liquor Dispensing Systems');
	licenseNavArray[22] = new Array('license/application.html', 'imageHere', 'License Application Forms');
	licenseNavArray[23] = new Array('license/bond.html', 'imageHere', 'Surety Bond Forms');
	licenseNavArray[24] = new Array('license/warning_sign.html', 'imageHere', 'Health/DUI Warning Sign');
	licenseNavArray[25] = new Array('license/reports.html', 'imageHere', 'Current Licenses');
		
	
var newNavArray = new Array();
	newNavArray[0] = new Array('new/index.html', 'imageHere', 'New Hours of Operation');
	newNavArray[1] = new Array('new/proposed_rules.html', 'imageHere', 'Proposed Rules');
	newNavArray[2] = new Array('new/recent_approved_rules.html', 'imageHere', 'Recently Approved Rules');
	newNavArray[3] = new Array('new/legislative_update.html', 'imageHere', 'Legislative Update');
	newNavArray[4] = new Array('new/suggestion.html', 'imageHere', 'Suggestion Box');
	newNavArray[5] = new Array('license/warning_sign.html', 'imageHere', 'Health/DUI Warning Sign');
	newNavArray[6] = new Array('license/documents/new_licenses.pdf', 'imageHere', 'New Licenses');
	
	
var onlineNavArray = new Array();
	onlineNavArray[0] = new Array('online/index.html', 'imageHere', 'Online Services Unavailable');
	onlineNavArray[1] = new Array('online/special_orders.html', 'imageHere', 'Special Orders');
	onlineNavArray[2] = new Array('online/renew.html', 'imageHere', 'License Renewal');
	onlineNavArray[3] = new Array('vendor/price_calculator.html', 'imageHere', 'Product Price Calculator');
	onlineNavArray[4] = new Array('online/orders.html', 'imageHere', 'Online Orders');
	
	
var productsNavArray = new Array();
	productsNavArray[0] = new Array('products/index.html', 'imageHere', 'Monthly Product Price Books');
	productsNavArray[1] = new Array('products/products_app.html', 'imageHere', 'Interactive Product List');
	productsNavArray[2] = new Array('products/spa.html', 'imageHere', 'SPA Product List');
	productsNavArray[3] = new Array('products/status.html', 'imageHere', 'Product Status Codes');
	productsNavArray[4] = new Array('products/category.html', 'imageHere', 'Product Category Codes');


var specialEventsNavArray = new Array();
	specialEventsNavArray[0] = new Array('events/index.html', 'imageHere', 'Organizing An Event');
	specialEventsNavArray[1] = new Array('events/no_permit_events.html', 'imageHere', 'No Permit Required Events');
	specialEventsNavArray[2] = new Array('events/permit_events.html', 'imageHere', 'Special Event Permit Required');
	specialEventsNavArray[3] = new Array('events/diplomat_events.html', 'imageHere', 'Diplomatic Embassy Information');
	specialEventsNavArray[4] = new Array('events/diplomat_shipments.html', 'imageHere', 'Diplomatic Embassy Shipments and Purchases');
	specialEventsNavArray[5] = new Array('laws/law_faqs.html', 'imageHere', 'Frequently Asked Questions');


var trainingNavArray = new Array();
	trainingNavArray[0] = new Array('training/index.html', 'imageHere', 'Introduction');
	trainingNavArray[1] = new Array('training/who.html', 'imageHere', 'Who Has to Take the Seminar?');
	trainingNavArray[2] = new Array('training/what.html', 'imageHere', 'What Students Learn?');
	trainingNavArray[3] = new Array('training/when.html', 'imageHere', 'When Must the Class be Taken?');
	trainingNavArray[4] = new Array('training/how.html', 'imageHere', 'How Is The Class Taught?');
	
	
var vendorNavArray = new Array();
	vendorNavArray[0] = new Array('vendor/index.html', 'imageHere', 'Product Listing Policy');
	vendorNavArray[1] = new Array('vendor/delisting.html', 'imageHere', 'Product Delisting Policy');
	vendorNavArray[2] = new Array('vendor/delisted_pricing.html', 'imageHere', 'Pricing on Delisted Merchandise Policy');
	vendorNavArray[3] = new Array('vendor/postoff.html', 'imageHere', 'Product Post-off Policy');
	vendorNavArray[4] = new Array('vendor/product_listing.html', 'imageHere', 'Listing a Product');
	vendorNavArray[5] = new Array('vendor/listing_packet.html', 'imageHere', 'Product Listing Packet');
	vendorNavArray[6] = new Array('vendor/extension_packet.html', 'imageHere', 'Product Brand Extension Packet');
	vendorNavArray[7] = new Array('vendor/trade_packet.html', 'imageHere', 'Product Trade Packet');
	vendorNavArray[8] = new Array('vendor/price_calculator.html', 'imageHere', 'Product Price Calculator');
	vendorNavArray[9] = new Array('vendor/fmb.html', 'imageHere', 'Flavored Malt Beverages');
	vendorNavArray[10] = new Array('vendor/vendor_forms.html', 'imageHere', 'More Vendor Forms');
	vendorNavArray[11] = new Array('calendar/fiscal_calendar.html', 'imageHere', 'Fiscal Calendar');
	vendorNavArray[12] = new Array('vendor/rep_list.html', 'imageHere', 'Current Manufacturer Representatives');
	
	

/*
var licenseArray = [];
licenseArray.push({ name:'General Information', theLink:'license/index.html', heading:false, last:false });
licenseArray.push({ name:'Retail Licenses', theLink:'', heading:true, last:false });
licenseArray.push({ name:'Airport Lounge', theLink:'license/licenses_airport.html', heading:false, last:false });
licenseArray.push({ name:'Club', theLink:'license/licenses_club.html', heading:false, last:false });
licenseArray.push({ name:'On premise Banquet and Catering', theLink:'license/licenses_banquet.html', heading:false, last:false });
licenseArray.push({ name:'On premise Beer/Tavern', theLink:'license/licenses_beer.html', heading:false, last:false });
licenseArray.push({ name:'Package Agencies', theLink:'license/licenses_package_agency.html', heading:false, last:false });
licenseArray.push({ name:'Resort', theLink:'license/licenses_resort.html', heading:false, last:false });
licenseArray.push({ name:'Restaurant - Full Service', theLink:'license/licenses_restaurant.html', heading:false, last:false });
licenseArray.push({ name:'Restaurant - Limited Service', theLink:'license/licenses_restaurant_limited.html', heading:false, last:true });
licenseArray.push({ name:'Retail Permits', theLink:'', heading:true, last:false });
licenseArray.push({ name:'Single Event', theLink:'license/permits_single_event.html', heading:false, last:false });
licenseArray.push({ name:'Temporary Beer', theLink:'license/permits_temp_beer.html', heading:false, last:true });
licenseArray.push({ name:'Special Use Permits', theLink:'license/permits_special_use.html', heading:false, last:false });
licenseArray.push({ name:'Manufacturing Licenses', theLink:'', heading:true, last:false });
licenseArray.push({ name:'Brewery, Distillery, Winery', theLink:'license/licenses_manufacturing.html', heading:false, last:false });
licenseArray.push({ name:'Local Industry Representative', theLink:'license/licenses_rep.html', heading:false, last:true });
licenseArray.push({ name:'Distribution Licenses', theLink:'', heading:true, last:false });
licenseArray.push({ name:'Beer Wholesaler', theLink:'license/licenses_beer_wholesaler.html', heading:false, last:false });
licenseArray.push({ name:'Liquor Warehouse', theLink:'license/licenses_liquor_whse.html', heading:false, last:false });
licenseArray.push({ name:'Out of State Brewer', theLink:'license/licenses_nonstate_brewer.html', heading:false, last:true });
licenseArray.push({ name:'Liquor Dispensing Systems', theLink:'license/dispensing.html', heading:false, last:false });
licenseArray.push({ name:'Proximity Restrictions', theLink:'license/proximity.html', heading:false, last:false });
licenseArray.push({ name:'Forms', theLink:'', heading:true, last:false });
licenseArray.push({ name:'License Application Forms', theLink:'license/application.html', heading:false, last:false });
licenseArray.push({ name:'Surety Bond Forms', theLink:'license/bond.html', heading:false, last:true });
licenseArray.push({ name:'License Report', theLink:'license/reports.html', heading:false, last:true });
*/
	
	
	
	
	
/* ------------------------------------------------   Menu Functions   ------------------------------------------------ */
// !! this uses an array to build menu items. it relies on the global variable called globalPath (defined at top of page) to point to the current domain.
// Provide the array you want to build.
// Answer 'yes' to hardReturn if you want the menu organized as paragraphs
// Answer 'yes' to listItem if you want the menu organized as a list
function buildTextMenu(theArray, hardReturn, listItem) { 
	var htmlCode = '';
	
	var listOpen = '';
	var listClose = '';
	var listItemBegin = '';
	var listItemEnd = '';
	var hardReturnBegin = '';
	var hardReturnEnd = '';
	
	if (hardReturn == 'yes') {
		hardReturnBegin = '<p>';
		hardReturnEnd = '</p>';
	}
	
	if (listItem == 'yes') {
		listOpen = '<ul class="menuList">';
		listClose = '</ul>';
		listItemBegin = '<li>';
		listItemEnd = '</li>';
	}
	
	htmlCode += listOpen;
	
	for(i=0; i<theArray.length; i++) {
		if( theArray[i][0].indexOf('http://') != -1 || theArray[i][0].indexOf('https://') != -1){ //check for absolute url
			htmlCode += hardReturnBegin + listItemBegin + '<a href="' + theArray[i][0] + '" alt="' + theArray[i][2] + '" title="' + theArray[i][2] + '" />' + theArray[i][2] + '</a>' + listItemEnd + hardReturnEnd;
		} else { //if url is not absolute, then add the global path
			htmlCode += hardReturnBegin + listItemBegin + '<a href="' + globalPath + theArray[i][0] + '" alt="' + theArray[i][2] + '" title="' + theArray[i][2] + '">' + theArray[i][2] + '</a>' + listItemEnd + hardReturnEnd;
		}
	}
	
	htmlCode += listClose;
	//alert(htmlCode);
	
	document.write(htmlCode);
}


//buildGraphicMenu(mainNavArray);
function buildGraphicMenu(theArray) { // !! this uses an array to build menu items. it relies on the global variable called globalPath (defined at top of page) to point to the current domain. 
	var htmlCode = '';

	for(i=0; i<theArray.length; i++) {
		if( theArray[i][0].indexOf('http://') != -1 ){ //check for absolute url
			htmlCode += '<a href="' + theArray[i][0] + '"><img src="' + globalPath + theArray[i][1] + '" alt="' + theArray[i][2] + '" title="' + theArray[i][2] + '" /></a>';
		} else { //if url is not absolute, then add the global path
			htmlCode += '<a href="' + globalPath + theArray[i][0] + '"><img src="' + globalPath + theArray[i][1] + '" alt="' + theArray[i][2] + '" title="' + theArray[i][2] + '" /></a>';
		}
	}
	
	document.write(htmlCode);
}




function buildTreeMenu(whatArray) {
	var menuItems = whatArray.length;
	var htmlCode = '';
	
	htmlCode += '<div id="sidetree">\r';
	htmlCode += '<div id="sidetreecontrol"><a href="#">Collapse All</a> | <a href="#">Expand All</a></div><!-- end sidetreecontrol -->\r';
	htmlCode += '<ul class="treeview" id="tree">\r';
	
	for(i=0; i<menuItems; ++i) {
		if(whatArray[i].heading==true && whatArray[i].last==false ) {
			htmlCode += '<li><span>' + whatArray[i].name + '</span>\r';
			htmlCode += '<ul style="display: none;">\r';
		}
		
		if(whatArray[i].heading==false && whatArray[i].last==true) {
			htmlCode += '<li class="last"><a href="' + globalPath +  whatArray[i].theLink + '">' + whatArray[i].name + '</a></li>\r';
			htmlCode += '</ul>';
		}
		
		if(whatArray[i].heading==true && whatArray[i].last==true) {
			htmlCode += '<li class="last"><span>' + whatArray[i].name + '</span>\r';
			htmlCode += '<ul style="display: none;">\r';
		}
		
		if(whatArray[i].heading==false && whatArray[i].last==false) {
			htmlCode += '<li><a href="' + globalPath + whatArray[i].theLink + '">' + whatArray[i].name + '</a></li>\r';
		}
	}
	
	htmlCode += '</div><!-- end of sidetree-->\r';
	document.write(htmlCode);
}



//buildGraphicMenu(mainNavArray);
function buildHomeMenu(theArray, hardReturn, listItem) { 
	var htmlCode = '';
	
	var listOpen = '';
	var listClose = '';
	var listItemBegin = '';
	var listItemEnd = '';
	var hardReturnBegin = '';
	var hardReturnEnd = '';
	
	if (hardReturn == 'yes') {
		hardReturnBegin = '<p>';
		hardReturnEnd = '</p>';
	}
	
	if (listItem == 'yes') {
		listOpen = '<ul class="menuList">';
		listClose = '</ul>';
		listItemBegin = '<li>';
		listItemEnd = '</li>';
	}
	
	htmlCode += listOpen;
	
	for(i=0; i<theArray.length; i++) {
		if( theArray[i][0].indexOf('http://') != -1 || theArray[i][0].indexOf('https://') != -1){ //check for absolute url
			htmlCode += hardReturnBegin + listItemBegin + '<a href="' + theArray[i][0] + '" alt="' + theArray[i][2] + '" title="' + theArray[i][2] + '"><img src="' + globalPath + theArray[i][1] + '" alt="' + theArray[i][2] + '" title="' + theArray[i][2] + '" /><p class="homeLink">' + theArray[i][2] + '</p></a>' + listItemEnd + hardReturnEnd;
		} else { //if url is not absolute, then add the global path
			htmlCode += hardReturnBegin + listItemBegin + '<a href="' + globalPath + theArray[i][0] + '" alt="' + theArray[i][2] + '" title="' + theArray[i][2] + '"><img src="' + globalPath + theArray[i][1] + '" alt="' + theArray[i][2] + '" title="' + theArray[i][2] + '" /><p class="homeLink">' + theArray[i][2] + '</p></a>' + listItemEnd + hardReturnEnd;
		}
	}
	
	htmlCode += listClose;
	//alert(htmlCode);
	
	document.write(htmlCode);
}





/* ------------------------------------------------   Search   ------------------------------------------------ */
function buildSearchBox() {
	var htmlCode = '';
	
	//htmlCode+= 'search area';

	htmlCode += '<form action="' + globalPath + 'search/index.html" id="cse-search-box">';
	//htmlCode += '<div>';
	
	htmlCode += '<button id="sa" name="sa" type="submit" class="searchButton">Site Search</button>';
	htmlCode += '<input type="hidden" name="cx" value="015797132617248936942:yhj5jtt9fiu" />';
	htmlCode += '<input type="hidden" name="cof" value="FORID:10" />';
	htmlCode += '<input type="hidden" name="ie" value="UTF-8" />';
	htmlCode += '<input type="text" name="q" />';
	//htmlCode += '<input type="submit" name="sa" value="Search" />';
	
	htmlCode += '<h2><span class="grey">Search</span> DABC.Utah.gov</h2>';
	htmlCode += '<div class="clear"></div>';
	//htmlCode += '</div>';
	htmlCode += '</form>';
	
	document.write(htmlCode);

	document.write(unescape("%3Cscript type='text/javascript' src='http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en'%3E%3C/script%3E"));
}





/* ------------------------------------------------   Content   ------------------------------------------------ */
function brandingContent() {
	var htmlCode = '';
	document.write(htmlCode);
}




function addAnalytics() { //adds google anayltics

	try {
		var pageTracker = _gat._getTracker("UA-16236807-1");
		pageTracker._trackPageview();
		} 
		catch(err) {}
}



function footer() {
	var htmlCode = '';
	
	htmlCode += '<hr />';
	htmlCode += '<br />';
	htmlCode += '<address>' + currentYear + ' &copy;Utah Department of Alcoholic Beverage Control - ';
	htmlCode += '1625 South 900 West - ';
	htmlCode += 'Salt Lake City, Utah 84104 <br />';
	htmlCode += 'Phone:(801) 977-6800 - Fax: (801) 977-6888 - ';
	htmlCode += '<a href="' + globalPath + 'about/hours.html" alt="Hours of Operation" Title="Hours of Operation">Hours of Operation</a>';
	htmlCode += '</address>';
	document.write(htmlCode);
	
	htmlCode  = '<p><a href="' + globalPath + 'sitemap/index.html" alt="Site Map" Title="Site Map">Site Map</a>';
	document.write(htmlCode);
	buildTextMenu(mainNavArray, 'no', 'no');
	document.write('<br />');
	buildTextMenu(footerArray, 'no', 'no');
	document.write('</p>');
	
	addAnalytics();
}




/* ------------------------------------------------   Custom Popup   ------------------------------------------------ */
// daParams means include parameters or don't; parameter passed here should be 'y' for yes or 'n' for no
// You can use defaults for the parameters by leaving them between empty quote marks. Example: ('http:// url', '', '', '', '', 'y')
// You can specify the parameters you want to by adding numeric values. DO NOT, however, put the numeric values in quotes.

function popup(daURL, daWidth, daHeight, daTop, daLeft, daParams) {

	var h = ''; // New window height. Defined by daHeight, but has a default if daHeight is empty.
	var w = ''; // New window width. Defined by daWidth, but has a default if daWidth is empty.
	var t = ''; // New window location from screen top. Defined by daTop, but has a default if daTop is empty.
	var l = ''; // New window location from screen left. Defined by daLeft, but has a default if daLeft is empty.

		if(daWidth == 'null' || daWidth == '') {
		  w = screen.availWidth / 2; //width default
		} else {
		  w = daWidth;
		}
		
		if(daHeight == 'null' || daHeight == '') {
		  h = screen.availHeight / 2; //height default
		} else {
		  h = daHeight;
		}

		if(daTop == 'null' || daTop == '') {
		  t = 75; //top default
		} else {
		  t = daTop
		}

		if(daLeft == 'null' || daLeft == '') {
		  l = screen.availWidth / 2.5; //left default
		} else {
		  l = daLeft
		}

	var params = 'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+ w +',height='+ h +',top='+ t +',left='+ l +'';
	var params2 = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width='+ w +',height='+ h +',top='+ t +',left='+ l +'';
	var newWindow = '';

		if (daParams == 'y') {
		  newWindow = window.open(daURL, 'daWindow', params);
		} else {
		  newWindow = window.open(daURL, 'daWindow', params2);
		}
		
	newWindow.focus();
}







/* ------------------------------------------------   IE Style   ------------------------------------------------ */
function ieStyle() {
	//alert('ieStyle() fired');
	var htmlCode = '';
	htmlCode += '<!--[if IE 6]><link href="' + globalPath + 'common/css/ieStyle.css" rel="stylesheet" type="text/css"><![endif]-->';
	htmlCode += '<!--[if IE 7]><link href="' + globalPath + 'common/css/ieStyle7.css" rel="stylesheet" type="text/css"><![endif]-->';
	htmlCode += '<!--[if IE 8]><link href="' + globalPath + 'common/css/ieStyle.css" rel="stylesheet" type="text/css"><![endif]-->';
	document.write(htmlCode);
}



/* ------------------------------------------------   UII Loader   ------------------------------------------------ */
function loadUII(pleaseLoad) {
	var htmlCode =  '';
	
	if(uiiOverride == true ) {
		document.getElementById('uiiBanner').innerHTML = '<img src="../../common/script/' + globalPath + 'common/images/uii/uiiLeft.gif">';
	}
}
















