// **************************************************************************
// Menu Items Coming Soon and Back
// **************************************************************************

// Function to change Menu Items to "Coming Soon"
function showComingSoon(menuitem) {
  document.getElementById(menuitem).innerHTML = "Coming Soon";
}

// Return Menu Item to original state
function showOriginal(menuitem, oldtext) {
	document.getElementById(menuitem).innerHTML = oldtext;
}

// **************************************************************************
// Open pop-up window with varying parameters
// **************************************************************************
function newWindow(mypage, myname, w, h, scroll) {
  var winl = (screen.width - w) / 2;
  var wint = (screen.height - h) / 2;
  
  winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
  win = window.open(mypage, myname, winprops)
  if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

// **************************************************************************
// Change the displayed picture with the one we clicked on
// **************************************************************************
function change_pic(pic) {
	picture = document[pic].src;
	picture = picture.substr(0, picture.length - 10);
	picture = picture.concat("250x250h.gif");
//	document.write(picture);
	document['main_pic'].src = picture; }

// **************************************************************************
// For the generic type select checkbox forms, either select all of the
// boxes, or clear them all, depending on the current state of the toggle
// checkbox
// **************************************************************************
function toggle(frm, cls, sel_chk, tgl_chk) {
	check = (tgl_chk.checked) ? true : false;
	if (check) { document.getElementById(sel_chk).innerText="Clear All"; }
	else { document.getElementById(sel_chk).innerText="Select All"; }
  for (i=0,n=frm.elements.length;i<n;i++) {
		if (frm.elements[i].className.indexOf(cls) !=-1) {
      frm.elements[i].checked = check;
		} } }

// **************************************************************************
// Initialize the Google Maps API
// **************************************************************************
function initialize_maps(mapLat, mapLong, mapZoom, nbrMark, markLatLong, markOptions) {
  if (GBrowserIsCompatible()) {
    var map = new GMap2(document.getElementById("map_canvas"));
    map.setCenter(new GLatLng(mapLat,mapLong), mapZoom);
    map.setUIToDefault();
    // Add markers to the map at passed-in locations
		for (var i=1; i<(nbrMark*2); i=i+2) {
			// Create our "tiny" marker icon
      var parkIcon = new GIcon(G_DEFAULT_ICON);
      parkIcon.image = markOptions[i+1];
			var ptOpts = {title: markOptions[i],clickable: false,icon: parkIcon};
      var point = new GLatLng(markLatLong[i],markLatLong[i+1]);
      map.addOverlay(new GMarker(point, ptOpts));
		}
	}
}






