

blnDOM = (document.getElementById) ? true : false;
blnNS4 = (document.layers) ? true : false;
blnIE = (document.all) ? true : false;
blnIE4 = blnIE && !blnDOM;
blnIE5 = (navigator.appVersion.indexOf("MSIE 5.0") != -1);
blnNS6 = blnDOM && !blnIE;
blnMac = (navigator.appVersion.indexOf("Mac") != -1);
blnOpera = (navigator.userAgent.indexOf("Opera")!=-1);
blnKonqueror = (navigator.userAgent.indexOf("Konqueror")!=-1);

//Swap images with an optional fade effect
var transitionToggle = 0;

function imgToggle(id,name,transitionDisable)
	{
	if (transitionDisable || !document.images[id].filters || blnIE5 || blnNS4)
		{
		if (document.images)
			{
			document.images[id].src=eval(name+".src");
			}
		}
	else
		{
		document.images[id].filters[0].Apply();
		// After setting Apply, changes to the object
		// are not displayed until Play is called.

		if (transitionToggle)
			{
			transitionToggle = 0;
			document.images[id].src=eval(name+".src");
			}
		else
			{
			transitionToggle = 1;
			document.images[id].src=eval(name+".src");
			}
		document.images[id].filters[0].Play();
		}
	}

if (document.images)
	{
//BUTTON
	b_home_off = new Image();b_home_off.src = '/images/wildlife/b_home_off.gif';
	b_home_2_off = new Image();b_home_2_off.src = '/images/wildlife/b_home_2_off.gif';
	b_home_on = new Image();b_home_on.src = '/images/wildlife/b_home_on.gif';
	b_home_2_on = new Image();b_home_2_on.src = '/images/wildlife/b_home_2_on.gif';
	b_graphs_off = new Image();b_graphs_off.src = '/images/wildlife/b_graphs_off.gif';
	b_graphs_2_off = new Image();b_graphs_2_off.src = '/images/wildlife/b_graphs_2_off.gif';
	b_graphs_on = new Image();b_graphs_on.src = '/images/wildlife/b_graphs_on.gif';
	b_graphs_2_on = new Image();b_graphs_2_on.src = '/images/wildlife/b_graphs_2_on.gif';
	b_habitat_off = new Image();b_habitat_off.src = '/images/wildlife/b_habitat_off.gif';
	b_habitat_2_off = new Image();b_habitat_2_off.src = '/images/wildlife/b_habitat_2_off.gif';
	b_habitat_on = new Image();b_habitat_on.src = '/images/wildlife/b_habitat_on.gif';
	b_habitat_2_on = new Image();b_habitat_2_on.src = '/images/wildlife/b_habitat_2_on.gif';
	b_curriculum_off = new Image();b_curriculum_off.src = '/images/wildlife/b_curriculum_off.gif';
	b_curriculum_on = new Image();b_curriculum_on.src = '/images/wildlife/b_curriculum_on.gif';
	b_curriculum_2_off = new Image();b_curriculum_2_off.src = '/images/wildlife/b_curriculum_2_off.gif';
	b_curriculum_2_on = new Image();b_curriculum_2_on.src = '/images/wildlife/b_curriculum_2_on.gif';
	b_faqs_off = new Image();b_faqs_off.src = '/images/wildlife/b_faqs_off.gif';
	b_faqs_on = new Image();b_faqs_on.src = '/images/wildlife/b_faqs_on.gif';
	b_faqs_2_off = new Image();b_faqs_2_off.src = '/images/wildlife/b_faqs_2_off.gif';
	b_faqs_2_on = new Image();b_faqs_2_on.src = '/images/wildlife/b_faqs_2_on.gif';
	
	b_ant_graph_OFF = new Image();b_ant_graph_OFF.src = '/images/wildlife/b_ant_graph_OFF.gif';
	b_ant_graph_ON = new Image();b_ant_graph_ON.src = '/images/wildlife/b_ant_graph_ON.gif';
	b_bat_graph_OFF = new Image();b_bat_graph_OFF.src = '/images/wildlife/b_bat_graph_OFF.gif';
	b_bat_graph_ON = new Image();b_bat_graph_ON.src = '/images/wildlife/b_bat_graph_ON.gif';
	b_kook_graph_OFF = new Image();b_kook_graph_OFF.src = '/images/wildlife/b_kook_graph_OFF.gif';
	b_kook_graph_ON = new Image();b_kook_graph_ON.src = '/images/wildlife/b_kook_graph_ON.gif';
	b_sugar_graph_OFF = new Image();b_sugar_graph_OFF.src = '/images/wildlife/b_sugar_graph_OFF.gif';
	b_sugar_graph_ON = new Image();b_sugar_graph_ON.src = '/images/wildlife/b_sugar_graph_ON.gif';

	b_ant_OFF = new Image();b_ant_OFF.src = '/images/wildlife/b_ant_OFF.gif';
	b_ant_ON = new Image();b_ant_ON.src = '/images/wildlife/b_ant_ON.gif';
	b_bat_OFF = new Image();b_bat_OFF.src = '/images/wildlife/b_bat_OFF.gif';
	b_bat_ON = new Image();b_bat_ON.src = '/images/wildlife/b_bat_ON.gif';
	b_kook_OFF = new Image();b_kook_OFF.src = '/images/wildlife/b_kook_OFF.gif';
	b_kook_ON = new Image();b_kook_ON.src = '/images/wildlife/b_kook_ON.gif';
	b_sugar_OFF = new Image();b_sugar_OFF.src = '/images/wildlife/b_sugar_OFF.gif';
	b_sugar_ON = new Image();b_sugar_ON.src = '/images/wildlife/b_sugar_ON.gif';	
	
	b_blue_off = new Image();b_blue_off.src = '/images/wildlife/b_blue_off.gif';
	b_blue_on = new Image();b_blue_on.src = '/images/wildlife/b_blue_on.gif';
	
	b_credits_off = new Image();b_credits_off.src = '/images/wildlife/b_credits_off.gif';
	b_credits_on = new Image();b_credits_on.src = '/images/wildlife/b_credits_on.gif';
	b_credits_2_off = new Image();b_credits_2_off.src = '/images/wildlife/b_credits_2_off.gif';
	b_credits_2_on = new Image();b_credits_2_on.src = '/images/wildlife/b_credits_2_on.gif';
	
	b_view_online_green = new Image();b_view_online_green.src = '/images/wildlife/b_view_online_green.gif';
	b_view_online_green_ON = new Image();b_view_online_green_ON.src = '/images/wildlife/b_view_online_green_ON.gif';
	b_download_pdf_green = new Image();b_download_pdf_green.src = '/images/wildlife/b_download_pdf_green.gif';
	b_download_pdf_green_ON = new Image();b_download_pdf_green_ON.src = '/images/wildlife/b_download_pdf_green_ON.gif';
    b_back_to_habitat = new Image();b_back_to_habitat.src = '/images/wildlife/b_back_to_habitat.gif';
	b_back_to_habitat_ON = new Image();b_back_to_habitat_ON.src = '/images/wildlife/b_back_to_habitat_ON.gif';

    b_download_data = new Image();b_download_data.src = '/images/wildlife/b_download_data.gif';
	b_download_data_ON = new Image();b_download_data_ON.src = '/images/wildlife/b_download_data_ON.gif';
	b_info_page = new Image();b_info_page.src = '/images/wildlife/b_information_page.gif';
	b_info_page_ON = new Image();b_info_page_ON.src = '/images/wildlife/b_information_page_ON.gif';
	b_pre_recorded = new Image();b_pre_recorded.src = '/images/wildlife/b_prerecorded_movie.gif';
	b_pre_recorded_ON = new Image();b_pre_recorded_ON.src = '/images/wildlife/b_prerecorded_movie_ON.gif';
	
	b_back = new Image();b_back.src = '/images/wildlife/b_back.gif';
	b_back_ON = new Image();b_back_ON.src = '/images/wildlife/b_back_ON.gif';
	
	popup_close = new Image();popup_close.src = '/images/wildlife/popup_close.gif';
	popup_close_ON = new Image();popup_close_ON.src = '/images/wildlife/popup_close_ON.gif';
	
	
	graph_graph_bat = new Image();graph_graph_bat.src = '/images/wildlife/b_bat_cumul.gif';
	graph_graph_bat_ON = new Image();graph_graph_bat_ON.src = '/images/wildlife/b_bat_cumul_ON.gif';
	graph_graph_bullant = new Image();graph_graph_bullant.src = '/images/wildlife/b_bullant_cumul.gif';
	graph_graph_bullant_ON = new Image();graph_graph_bullant_ON.src = '/images/wildlife/b_bullant_cumul_ON.gif';
	graph_graph_sugarglider = new Image();graph_graph_sugarglider.src = '/images/wildlife/b_glider_cumul.gif';
	graph_graph_sugarglider_ON = new Image();graph_graph_sugarglider_ON.src = '/images/wildlife/b_glider_cumul_ON.gif';
	graph_graph_kookaburra = new Image();graph_graph_kookaburra.src = '/images/wildlife/b_kooka_cumul.gif';
	graph_graph_kookaburra_ON = new Image();graph_graph_kookaburra_ON.src = '/images/wildlife/b_kooka_cumul_ON.gif';

	}
	
function Popup(wPage,wID,wWidth,wHeight,wScrollbars,wLocation,wToolbar,wStatus,wResizable) {
	if (!wID) { wID = "Popup" }
	if (!wWidth) { wWidth = 400 }
	if (!wHeight) { wHeight = 260 }
	if (!wScrollbars) { wScrollbars = "yes" }
	if (!wLocation) { wLocation = "no" }
	if (!wToolbar) { wToolbar = "no" }
	if (!wStatus) { wStatus = "no" }
	if (!wResizable) { wResizable = "no" }
	popupWindow = window.open(wPage,wID,"width=" + wWidth + ",height=" + wHeight + ",scrollbars=" + wScrollbars + ",location=" + wLocation + ",toolbar=" + wToolbar + ",status=" + wStatus + ",resizable=" + wResizable)
	if (window.focus) { popupWindow.focus() }
}

var da = (document.all) ? 1 : 0;
var pr = (window.print) ? 1 : 0;
var mac = (navigator.userAgent.indexOf("Mac") != -1);
var ie = false
var ns4 = false
var ns6 = false

function printPage() {
	if (pr) { // NS4, IE5
		window.print();
	}
	else {
		if (da && !mac) { // IE4 (Windows)
			vbPrintPage();
		}
		else { // other browsers
			alert("To Print this page please select the Print option from the File menu.");
		}
	}
}

if (document.all) { ie = true }
else if (document.layers) { ns4 = true }
else if (document.getElementById) { ns6 = true }

if (ns6) {
	document.write('<link rel="stylesheet" type="text/css" href="/includes/styles_global_ns6.css">')
}

if (da && !pr && !mac) with (document) {
	writeln('<object id="wb" width="0" height="0" classid="clsid:8856f961-340a-11d0-a96b-00c04fd705a2"></object>');
	writeln('<scr' + 'ipt language="vbscript" type="text/vbscript">');
	writeln('sub window_onunload');
	writeln('	on error resume next');
	writeln('	set wb = nothing');
	writeln('end sub');
	writeln('sub vbprintpage');
	writeln('	olecmdid_print = 6');
	writeln('	olecmdexecopt_dontpromptuser = 2');
	writeln('	olecmdexecopt_promptuser = 1');
	writeln('	on error resume next');
	writeln('	wb.execwb olecmdid_print, olecmdexecopt_dontpromptuser');
	writeln('end sub');
	writeln('</scr' + 'ipt>');
}

