// this is the default language ID to use for the template if 

// the language of the page cannot be determined

var templateLangID = "en";





// ================================================





// ================================================

// gov_showHeader() 

// - the top table header output 

// - if print version is selected, then only shows

//   the printer header image

// ================================================

function gov_showHeader() {



	// set the default values for the google search box

	// if the calling web page has not set these values, it will go to the default search results template

	if (!isDefined(window.resourceSearch_client)) {

		resourceSearch_client = "";

	}

	if (!isDefined(window.resourceSearch_proxystylesheet)) {

		resourceSearch_proxystylesheet = "";

	}

	if (!isDefined(window.resourceSearch_site)) {

		resourceSearch_site = "";

	}



	if (resourceSearch_client == "") {

		resourceSearch_client = "manitoba";

	}

	if (resourceSearch_proxystylesheet == "") {

		resourceSearch_proxystylesheet = "manitoba";

	}

	if (resourceSearch_site == "") {

	//	resourceSearch_site = "manitoba";

		resourceSearch_site = "default_collection";

	}





	var html = "";

	var obj = document.getElementById("header");

	if (obj) {

	

		if (tempURL.indexOf("?print") > -1 || tempURL.indexOf("#printerfriendly") > -1) {

			html += '<div align="center" style="margin-left:-20px;"><img src="'+resourcePath+'images/printer_header.jpg"></div>';

		} else {

		



		html += "<a href=\"http://www.gov.mb.ca/index.html\" id=\"logo\" accesskey=\"1\" title=\"Government of Manitoba\"><img src=\""+resourcePath+"images/mb_logo.jpg\" width=\"190\" height=\"134\" alt=\"Government of Manitoba\" /></a>\n";

		html += "<ul id=\"navbar\">\n";

		html += "	<li><a href=\"http://www.gov.mb.ca/government/index.html\"><img src=\""+resourcePath+"images/nav/government.gif\" width=\"107\" height=\"43\" alt=\"Government\"/></a></li>\n";

		html += "	<li><a href=\"http://www.gov.mb.ca/business/index.html\"><img src=\""+resourcePath+"images/nav/business.gif\" width=\"75\" height=\"43\" alt=\"Business\"/></a></li>\n";

		html += "	<li><a href=\"http://www.gov.mb.ca/residents/index.html\"><img src=\""+resourcePath+"images/nav/residents.gif\" width=\"77\" height=\"43\" alt=\"Residents\"/></a></li>\n";

		html += "	<li><a href=\"http://www.gov.mb.ca/tourism/index.html\"><img src=\""+resourcePath+"images/nav/tourism.gif\" width=\"72\" height=\"43\" alt=\"Tourism\"/></a></li>\n";

		html += "	<li><a href=\"http://www.gov.mb.ca/services/index.html\"><img src=\""+resourcePath+"images/nav/services.gif\" width=\"80\" height=\"43\" alt=\"Services\"/></a></li>\n";

		html += "	<li id=\"search\">\n";

		html += "		<form name=\"gs\" method=\"GET\" action=\"http://discovery.gov.mb.ca/search\">\n";

		html += "		<a name=\"search\"></a><label for=\"topsearchbox\" title=\"Enter Search Criteria\"></label><input name=\"q\" type=\"text\" id=\"topsearchbox\" class=\"searchbox\" value=\"Search...\" size=\"15\" onfocus=\"if (this.value == 'Search...') this.value = '';\" title=\"Enter Search Text\" alt=\"Enter Search Text\" />\n";

		html += "		<input type=\"image\" src=\""+resourcePath+"images/header_button_go.jpg\" alt=\"Begin Search\" title=\"Begin Search\" />\n";

		html += "		<input type=\"hidden\" name=\"entqr\" value=\"0\" />\n";

		html += "		<input type=\"hidden\" name=\"output\" value=\"xml_no_dtd\" />\n";

		html += "		<input type=\"hidden\" name=\"sort\" value=\"date:D:L:d1\" />\n";

		html += "		<input type=\"hidden\" name=\"ud\" value=\"1\" />\n";

		html += "		<input type=\"hidden\" name=\"client\" value=\""+resourceSearch_client+"\">\n";

		html += "		<input type=\"hidden\" name=\"oe\" value=\"UTF-8\">\n";

		html += "		<input type=\"hidden\" name=\"ie\" value=\"UTF-8\">\n";

		html += "		<input type=\"hidden\" name=\"proxystylesheet\" value=\""+resourceSearch_proxystylesheet+"\">\n";

		html += "		<input type=\"hidden\" name=\"site\" value=\""+resourceSearch_site+"\">\n";

		html += "		</form>\n";

		html += "	</li>\n";



		html += "</ul>";





		}



		obj.innerHTML = html;

	}

}



// ================================================

// gov_showFooter()

// - displays the bottom table of text links

// ================================================

function gov_showFooter() {



	// set the default values for the google search box

	// if the calling web page has not set these values, it will go to the default search results template

	if (!isDefined(window.resourceSearch_client)) {

		resourceSearch_client = "";

	}

	if (!isDefined(window.resourceSearch_proxystylesheet)) {

		resourceSearch_proxystylesheet = "";

	}

	if (!isDefined(window.resourceSearch_site)) {

		resourceSearch_site = "";

	}



	if (resourceSearch_client == "") {

		resourceSearch_client = "manitoba";

	}

	if (resourceSearch_proxystylesheet == "") {

		resourceSearch_proxystylesheet = "manitoba";

	}

	if (resourceSearch_site == "") {

		resourceSearch_site = "default_collection";

	}





	var html = "\n";

	var obj = document.getElementById("footer");

	if (obj) {

		html += "<ul class=\"nav\">\n";

		html += "	<li class=\"government\"><a href=\"http://www.gov.mb.ca/government/index.html\">Government</a></li>\n";

		html += "	<li class=\"business\"><a href=\"http://www.gov.mb.ca/business/index.html\">Business</a></li>\n";

		html += "	<li class=\"residents\"><a href=\"http://www.gov.mb.ca/residents/index.html\">Residents</a></li>\n";

		html += "	<li class=\"tourism\"><a href=\"http://www.gov.mb.ca/tourism/index.html\">Tourism</a></li>\n";

		html += "	<li class=\"services\"><a href=\"http://www.gov.mb.ca/services/index.html\">Services</a></li>\n";

		html += "	<li class=\"search\">\n";

		html += "	<form method=\"get\" action=\"http://discovery.gov.mb.ca/search\">\n";

		html += "		<label for=\"bottomsearchbox\" title=\"Enter Search Criteria\"></label><input name=\"q\" type=\"text\" id=\"bottomsearchbox\" class=\"searchbox\" value=\"Search...\" size=\"15\" onfocus=\"if (this.value == 'Search...') this.value = '';\" title=\"Enter Search Text\" alt=\"Enter Search Text\" />\n";

		html += "		<input type=\"image\" src=\""+resourcePath+"images/header_button_go.jpg\" alt=\"Begin Search\" title=\"Begin Search\" />\n";

		html += "		<input type=\"hidden\" name=\"entqr\" value=\"0\" />\n";

		html += "		<input type=\"hidden\" name=\"output\" value=\"xml_no_dtd\" />\n";

		html += "		<input type=\"hidden\" name=\"sort\" value=\"date:D:L:d1\" />\n";

		html += "		<input type=\"hidden\" name=\"ud\" value=\"1\" />\n";

		html += "		<input type=\"hidden\" name=\"client\" value=\""+resourceSearch_client+"\">\n";

		html += "		<input type=\"hidden\" name=\"oe\" value=\"UTF-8\">\n";

		html += "		<input type=\"hidden\" name=\"ie\" value=\"UTF-8\">\n";

		html += "		<input type=\"hidden\" name=\"proxystylesheet\" value=\""+resourceSearch_proxystylesheet+"\">\n";

		html += "		<input type=\"hidden\" name=\"site\" value=\""+resourceSearch_site+"\">\n";

		html += "		</form>\n";

		html += "	</li>\n";

		html += "</ul>\n";

		html += "<div id=\"links\">\n";

		

		html += "<a href=\"http://www.spiritedenergy.ca/index.php\" class=\"energy\" title=\"Manitoba Spirited Energy\" ><img src=\""+resourcePath+"images/footer_energy.gif\" width=\"103\" height=\"43\" alt=\"Manitoba Spirited Energy\" /></a><div id=\"acl3\">---</div>\n";

		html += "<a href=\"http://www.gov.mb.ca/index.html\" class=\"manitoba\" title=\"Manitoba Government\"><img src=\""+resourcePath+"images/footer_govmb_logo.gif\" width=\"118\" height=\"33\" alt=\"Manitoba Government\" /></a>\n";

		html += "<ul>\n";

		html += "<li><a href=\"http://news.gov.mb.ca/news/\" title=\"Government News\">News</a> &nbsp;|&nbsp;</li>\n";

		html += "<li><a href=\"http://www.gov.mb.ca/government/departments.html\" title=\"Government Departments\">Departments</a> &nbsp;|&nbsp;</li>\n";

		html += "<li><a href=\"http://www.gov.mb.ca/legal/disclaimer.html\" title=\"Disclaimer\">Disclaimer</a> &nbsp;|&nbsp;</li>\n";

		html += "<li><a href=\"http://www.gov.mb.ca/legal/copyright.html\" title=\"Copyright\">Copyright</a> &nbsp;|&nbsp;</li>\n";

		html += "<li><a href=\"http://www.gov.mb.ca/legal/privacy.html\" title=\"Privacy Policy\">Privacy</a> &nbsp;|&nbsp;</li>\n";

		html += "<li><a href=\"http://www.gov.mb.ca/contact/\">Contact Us 1-866-626-4862</a></li>\n";

		html += "</ul>\n";



		

		html += "</div>\n";





		obj.innerHTML = html;

	}

}





















// =================================================================

// gov_replaceIFR()

// - replaces elements with Inman Flash Replacement SWFs

// - if you have more elements to replace, then create a javascript 

//   function in your web page header call it before 

//   gov_setupPage() in the OnLoad() Event

// =================================================================

function gov_replaceIFR() {



/* Replacement calls. Please see documentation for more information. */

if(typeof sIFR == "function"){

	sIFR.replaceElement(named({sSelector:"div#banners ul li", sFlashSrc:resourcePath+"swf/banner_ifr.swf", sWmode:"transparent", sFlashVars:"", sWidth:"207", sHeight:"60"}));

	sIFR.replaceElement(named({sSelector:"#organization", sFlashSrc:resourcePath+"swf/title_ifr.swf", sWmode:"transparent",sFlashVars:"", sWidth:"620", sHeight:"38"}));

	sIFR.replaceElement(named({sSelector:"#menuheading", sFlashSrc:resourcePath+"swf/above_sidemenu_ifr.swf", sWmode:"transparent",sFlashVars:"", sWidth:"189", sHeight:"60"}));

};



}


