// JavaScript Document
if (document.images) {

// main menu rollover images //
	img1off = new Image();
	img1off.src = "/images/menu/bttn_home_off.jpg";
	img1on = new Image();
	img1on.src = "/images/menu/bttn_home_on.jpg";
	img2off = new Image();
	img2off.src = "/images/menu/bttn_about_gsc_off.jpg";
	img2on = new Image();
	img2on.src = "/images/menu/bttn_about_gsc_on.jpg";
	img3off = new Image();
	img3off.src = "/images/menu/bttn_contact_us_off.jpg";
	img3on = new Image();
	img3on.src = "/images/menu/bttn_contact_us_on.jpg";
	img4off = new Image();
	img4off.src = "/images/menu/bttn_partners_and_links_off.jpg";
	img4on = new Image();
	img4on.src = "/images/menu/bttn_partners_and_links_on.jpg";
	img5off = new Image();
	img5off.src = "/images/menu/bttn_publications_off.jpg";
	img5on = new Image();
	img5on.src = "/images/menu/bttn_publications_on.jpg";
	img6off = new Image();
	img6off.src = "/images/menu/bttn_learn_more_off.jpg";
	img6on = new Image();
	img6on.src = "/images/menu/bttn_learn_more_on.jpg";
	img7off = new Image();
	img7off.src = "/images/menu/bttn_sitemap_off.jpg";
	img7on = new Image();
	img7on.src = "/images/menu/bttn_sitemap_on.jpg";
// end main menu rollover images //
	img991off = new Image();
	img991off.src = "/images/menu/bttn_gwichcouncil_off.jpg";
	img991on = new Image();
	img991on.src = "/images/menu/bttn_gwichcouncil_on.jpg";
	img992off = new Image();
	img992off.src = "/images/menu/bttn_gdc_off.jpg";
	img992on = new Image();
	img992on.src = "/images/menu/bttn_gdc_on.jpg";
	img993off = new Image();
	img993off.src = "/images/menu/bttn_gwichsoccinst_off.jpg";
	img993on = new Image();
	img993on.src = "/images/menu/bttn_gwichsoccinst_on.jpg";
}

function img_toggle(imgName,state) {
	if (document.images) {
		document[imgName].src = eval(imgName + state + ".src");
	}
}

function toggle_mapmenu(id,li,a) {
	if(document.getElementById) {
		var el = document.getElementById(id);
		el.style.display = (el.style.display == 'none') ? 'block' : 'none';
		var el = document.getElementById(li);
		el.className = (el.className == "sitemap_sub_menu") ? "sitemap_sub_open" : "sitemap_sub_menu";
		var el = document.getElementById(a);
		el.className = (el.className == "sitemap_sub") ? "sitemap_sub_sel" : "sitemap_sub";
	}
}

function toggle_section(id,image) {
	if (document.getElementById) {
		var el = document.getElementById(id);
		el.style.display = (el.style.display == 'none') ? 'block' : 'none';
		img_state = (el.style.display == "none") ? "off" : "on";
		img_toggle(image,img_state);
	}
}

function winOpen(addy,w,h) {
	LeftPosition = (screen.width) ? (screen.width - w)/2 : 0;
	TopPosition = (screen.height) ? ((screen.height - h)/2)-50 : 0;
	settings = 'width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+",status=yes,scrollbars=yes";
	mwin = window.open(addy,'win1',settings);
}

function action_confirm(text,url) {
	if (confirm(text)) {
		top.location.href = url;
	}
}

function check_searchbox(form,element,text) {
	searchbox = document.forms[form].elements[element];
	if (searchbox.value == "") {
		searchbox.value = text;
	}
	else if (searchbox.value == text) {
		searchbox.value = "";
	}
}

function WriteFlashObject(URL,WIDTH,HEIGHT)
{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+WIDTH+'" height="'+HEIGHT+'">');
	document.write('\r\n<param name="movie" value="'+URL+'">');
	document.write('\r\n<param name="quality" value="high">');
	document.write('\r\n<param name="autoStart" value="-1">');
	document.write('\r\n<embed src="'+URL+'" width="'+WIDTH+'" height="'+HEIGHT+'" autostart="-1" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>');
	document.write('\r\n</object>');
}
