/*************************
Farmington MPO Menu Script
**************************/
//This list must contain the names of all menus.
menulist = Array('mpo');

//Menu for Farmington MPO - name: mpo
menus = '' +
'<div class="menu1" id="mpo_menu" style="position:absolute;top:155; left:173;" onmouseover="onmenu=\'mpo\'" onmouseout="HideMenu(\'mpo\')">'+
'<p class="menu1">'+
'<a href="vision.html" class="menu1" onmouseover="this.style.color=\'#303093\'" onmouseout="this.style.color=\'#FFFFFF\'">Mission, Vision and Goals</a>'+
'<p class="menu1">'+
'<a href="mpo_schedule.html" class="menu1" onmouseover="this.style.color=\'#303093\'" onmouseout="this.style.color=\'#FFFFFF\'">Committee Schedules</a>'+
'<p class="menu1">'+
'<a href="documents.html" class="menu1" onmouseover="this.style.color=\'#303093\'" onmouseout="this.style.color=\'#FFFFFF\'">Documents</a>'+
'<p class="menu1">'+
'<a href="newsletters.html" class="menu1" onmouseover="this.style.color=\'#303093\'" onmouseout="this.style.color=\'#FFFFFF\'">Newsletters</a>'+
'</div>';
document.write(menus);

//This pre-loads the blue LSA logo
bluelsa = new Image();
bluelsa.src = 'images/lsa_logo_blue.gif';

//This checks for the browser type (general IE or Mozilla only)
if (document.all) {bw = 'ie';}
else {bw = 'mz';}

//This adjusts the spacing for the Mozilla/Netscape browsers
if (bw == 'mz') {
	document.write('<style> a.leftlinks,a.leftlinksdisable {line-height:1em;}</style>');}

//document.getElementById('mpo_menu').style.visibility='visible';

//THE FUNCTIONS BELOW ARE USED TO CONTROL THE MENUS//
onmenu = '';
function ShowMenu(name) {
    onmenu = name;
	HideAllMenus();
	bname = name + '_button';
	mname = name + '_menu';
	document.getElementById(bname).style.color='#303093';
	document.getElementById(mname).style.visibility='visible';
}

function HideMenu(name, timeout) {
	onmenu = '';
	if (timeout == null) { timeout = 1000; }
	setTimeout('HideMenuB(\''+name+'\')', timeout);
	return;
}

function HideMenuB(name) {
	if (onmenu != name) {
		bname = name + '_button';
		mname = name + '_menu';
		document.getElementById(bname).style.color='#FFFFFF';
		document.getElementById(mname).style.visibility='hidden';
	}
	return;
}

function HideAllMenus() {
	for (var i = 0; i < menulist.length; i++) {
		HideMenuB(menulist[i]);
	}
	return;
}

//THE FUNCTIONS BELOW ARE USED FOR OTHER THINGS

//This opens a url (e.g. a pdf) in a new window
function OpenPdf (url) {
    PdfWin = window.open(url, 'pdfWindow');
    PdfWin.focus();
}
function OpenImage (url) {
	features = 'toolbars=0, scrollbars=0, menubar=0, width=700, height=600, left=10, top=10';
    PdfWin = window.open(url, 'ImageWindow', features);
    PdfWin.focus();
}

function Email() {
    var url = 'pop_email.htm';
    features = 'toolbars=0, scrollbars=0, menubar=0, resizable=0, width=700, height=525, left=10, top=10';
    window.open(url, name, features);
}
