var SelectedLink = null;
var SelectedIMG  = null;

function SelectLink(obj, colorSet, colorSetBack)
{
  if (obj && obj.style) {
    if (SelectedLink) {
      SelectedLink.style.color = "";
    }
    
    obj.style.color = "#" + colorSet;
    SelectedLink = obj;
  }
}

function SelectMOO(objName, url, setIt)
{
  if (objName && url && window.document.getElementById && window.document.getElementById(objName)) {
    if (setIt && SelectedIMG && SelectedIMG != objName) {
      window.document.getElementById(SelectedIMG).src = url.replace("_over", "");
    }
    
    if (objName != SelectedIMG) {
      window.document.getElementById(objName).src = url;
    }
    
    if (setIt) {
      SelectedIMG = objName;
    }
  }
}

// Setzt den Cursor-Focus auf das übergebene Element.
// @param elementID ID des Elements.
function FokusSetzen(elementID)
{
  if (elementID) {
    if (window && window.focus) {
	    if (window.document.getElementById && window.document.getElementById(elementID)) {
	      window.focus();
		    window.document.getElementById(elementID).focus();
		    
		    if (window.document.getElementById(elementID).select) {
          window.document.getElementById(elementID).select();
        }
	    }
    }
  }
}