/**
 * Swaps visibility for submenu
 */
function toggleNavigationElement(ddSpan, image) {
  if (ddSpan.style.display == "none" || ddSpan.style.display == "") {
    ddSpan.style.display = "block";
    src = image.src.replace("down", "up");
  } else {
    ddSpan.style.display = "none";
    src = image.src.replace("up", "down");
  }
  image.src = src;
}

/**
 * Toggle visibility of menu
 */
function toggleDetailSmallNew(ddSpan,ddMain,ddButton){
  margin = 0;
  width = parseFloat(getStyle(ddSpan, "width"));

  if (ddSpan.style.display == "none"){
    ddSpan.style.display = "block";
    if (ddMain) {
      ddMain.style.marginLeft = width;
      ddMain.style.width = document.body.clientWidth - width;
    }
    ddButton.innerHTML = "&laquo;";
  } else {
    ddSpan.style.display = "none";
    if (ddMain) {
      ddMain.style.marginLeft = margin;
      ddMain.style.width = document.body.clientWidth - margin;
    }
    ddButton.innerHTML="<span class=\"show_navigation\">&raquo;</span>";
  }
}

function swapMenu(image, over) {
  if (over == undefined || over == null) {
    over = false;
  }
  if (over) {
    src = image.src.replace(".gif", "_over.gif");
  } else {
    src = image.src.replace("_over.gif", ".gif");
  }
  image.src = src;
}

	/**
	 * Return a style property as rendered by the user-agent.
	 * @param object obj The object which style is considered.
	 * @param string property The name of the style property.
	 * @return string The style property, if any.
	 */
	function getStyle(obj, property) {	  
		if(obj.currentStyle && obj.currentStyle[ property ]) {
			return obj.currentStyle[ property ];
		} else if(window.getComputedStyle) {
			return document.defaultView.getComputedStyle(obj, null)[ property ];
		}
	}
