// this is used to toggle a specific div's status
function div_toggle (thisdiv) {
	var the_div = document.getElementById( thisdiv );
	if (the_div.style.display == 'block') {
		the_div.style.display='none'; }
	else { the_div.style.display='block';}
	}

// This function takes a single div name and an array of known div names and 
// changes the display to "none" and then the single given div to "block"
function make_option_active (thisdiv) {	
	
	// a list of div names. Please make sure these are the exact div names
	// you can add or subtract names of divs from this array, provided you 
	// maintain the array list.

	// EDIT THIS LINE 
	var thedivnames = new Array("option1","option2","option3","akpress","changethis","chelseagreen","fluoride","ise","palestine","colombia","ruralvt","treesit", "uchechi");
	
	// -- NO NEED TO EDIT BELOW HERE -- // 
	// -------------------------------- //

	// first we turn everything back to normal state, then we make the current div and its elements active
	// build array of elements

	for (var i = 0; i < thedivnames.length; i++) {			
		if (document.getElementById(thedivnames[i])){document.getElementById(thedivnames[i]).style.display='none';}
	}

	// make clicked option visible 			
	document.getElementById(thisdiv).style.display='block';
}


function openWindow(url, name, w, h, perc, scrollbars) {
  // initialize winX and winY to default values
  // for cases where Screen object isn't supported
  var winX = 0;
  var winY = 0;

  // only set new values if 4.0 browser
  if (parseInt(navigator.appVersion) >= 4) {
    winX = (screen.availWidth - w)*perc*.01;
    winY = (screen.availHeight - h)*perc*.01;
  }

  popupWin = window.open(url, name, 'width=' + w + ',height=' + h + ',left=' + winX + ',top=' + winY + ',scrollbars=' + scrollbars);
}
