// -----------------------------------------------------
// Toggles between the expand and collapse of navigation sub-menus
// -----------------------------------------------------
function showPhotoAlbum(url) {
  var imageContents = document.getElementById("imageContents");
  if (imageContents != null) {
    imageContents.src = url;
  }
}


// -----------------------------------------------------
// Toggles between the expand and collapse of navigation sub-menus
// -----------------------------------------------------
function expandCollapseNav(menuId) {
  var menuObject = document.getElementById("menu_" + menuId);
  var subMenuObject = document.getElementById(menuId);
  if (menuObject.className == "navItemCategoryCollapsed") {
    menuObject.className = "navItemCategoryExpanded";
    subMenuObject.style.display = "block";
  }
  else {
    menuObject.className = "navItemCategoryCollapsed"
    subMenuObject.style.display = "none";
  }
}


// -----------------------------------------------------
// The centerDialog function is used for pop-up windows. It will automatically center a
// pop-up window, given the file name, window width and height, and any extra
// parameters used to change the window style (for example status bar)
// -----------------------------------------------------
function centerDialog(fileName, dialogWidth, dialogHeight, dialogParams, dialogTitle) {
	if (dialogParams == null) {
	 	dialogParams = "";
	}
	else {
		dialogParams = "," + dialogParams;
	}

	xpos = (screen.width - dialogWidth)/2;
	ypos = (screen.height - dialogHeight)/2;
	var dialogProperties = "left="+xpos+",top="+ypos+",width="+dialogWidth+",height="+dialogHeight;
	
  dialogProperties += dialogParams;
	window.open(fileName,dialogTitle,dialogProperties);
}

// -----------------------------------------------------
// Tooltip functionality
// -----------------------------------------------------
function showToolTip(e, msg) {
  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
  Tooltip.show(e, msg);
}

function hideToolTip() {
  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
  Tooltip.hide();
}

// -----------------------------------------------------
// Functions to hide e-mail addresses
// -----------------------------------------------------
function getInfoMail() {
   var _x = "com";
   var _d = "highclarityphoto";
   var _u = "info";
   var _l = _u + "@" + _d + "." + _x;
   var _a = "<a h";
   var _b = "ref=";
   var _c = "mai";
   
   return(_l);
}

function setInfoMail() {
   var _x = "com";
   var _d = "highclarityphoto";
   var _u = "info";
   var _l = _u + "@" + _d + "." + _x;
   var _a = "<a h";
   var _b = "ref=";
   var _c = "mai";
   
   document.write(_a + _b + "'" + _c + "lto:" + _l + "'>"+_l+"</a>");
}