

var globalPath = "http://siec.utah.gov/" //this is the path to root that we can use for building common elements


// -----------------------------------------------------------------  Navigation  ----------------------------------------------------------------- //
//in the array below, the first set of quotes is the url, the second is the graphical button, the thrid is the alt attribute and title value.
var mainMenuArray = new Array();
	mainMenuArray[0] = new Array('index.html', 'common/images/leftNav/01home.gif', 'Home');
	mainMenuArray[1] = new Array('about/index.html', 'common/images/leftNav/02about.gif', 'About Us');
	mainMenuArray[2] = new Array('membership/index.html', 'common/images/leftNav/03membership.gif', 'Membership');
	mainMenuArray[3] = new Array('omnilink/index.html', 'common/images/leftNav/04omniLink.gif', 'Omni-link');
	mainMenuArray[4] = new Array('http://www.fcc.gov/pshs/spectrum/700mhz/regions/region41.html', 'common/images/leftNav/05rpc41.gif', 'RPC-41');
//	mainMenuArray[5] = new Array('calendar/index.html', 'common/images/leftNav/06calendar.gif', 'Calendar');
	mainMenuArray[5] = new Array('minutes/index.html', 'common/images/leftNav/09meetingMinutes.gif', 'Meeting Minutes');
//	mainMenuArray[7] = new Array('glossary/index.html', 'common/images/leftNav/07glossary.gif', 'Glossary');
//	mainMenuArray[8] = new Array('links/index.html', 'common/images/leftNav/08links.gif', 'Links');
	


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);
	//document.write('  Hi Marc  ');
	
}


// -----------------------------------------------------------------  Other  ----------------------------------------------------------------- //
function emailLink(theEmail, theName) {
	document.write("<a href=" + "mail" + "to:" + theEmail + "@utah.gov>" + theName + "</a>");
}


// Added 05-14-2007 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, daHeight, daWidth, 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(daHeight == 'null' || daHeight == '') {
		  h = screen.availHeight / 2; //height default
		} else {
		  h = daHeight;
		}

		if(daWidth == 'null' || daWidth == '') {
		  w = screen.availWidth / 2; //width default
		} else {
		  w = daWidth;
		}

		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();
}







	