var cpTool = null;

function showCyberparkToolTip(id, objTemp) {
  cpTool = null;
  topTemp = 0;
  leftTemp = 0;
  
  //objekt zuweisen
  if (document.getElementById){
	  cpTool = document.getElementById(id);
	}
  else if (document.layers){
	  cpTool = document.layers[id];
	}
  else if (document.all){
	  cpTool = document.all[id];
	}
  
  if (objTemp.offsetTop && objTemp.offsetLeft)
  {
    while (objTemp.tagName != "BODY") {
      topTemp = topTemp + objTemp.offsetTop;
      leftTemp = leftTemp + objTemp.offsetLeft;
      objTemp = objTemp.offsetParent;
    }
  }
  
	if (cpTool != null)	{
	
	  if (topTemp > 0)
	  {
      topTemp = topTemp + 15;
      cpTool.style.top = topTemp + "px";
    }
    
    if (leftTemp > 0)
    {
      leftTemp = leftTemp + 20;	  
      cpTool.style.left = leftTemp + "px";
    }
    
    cpTool.style.display = "block";
	}
}

function hideCyberparkToolTip() {
  if(cpTool != null) cpTool.style.display = "none";
}

function redCMSopenPopup(URLtmp,NAMEtmp,heightTMP,widthTMP,topTMP,leftTMP,resizableTMP,locationTMP,menubarTMP,scrollbarsTMP,statusTMP,toolbarTMP) {
  window.open(URLtmp,NAMEtmp,"height=" + heightTMP + ",width=" + widthTMP + ",top=" + topTMP + ",left=" + leftTMP + ",resizable=" + resizableTMP + ",location=" + locationTMP + ",menubar=" + menubarTMP + ",scrollbars=" + scrollbarsTMP + ",status=" + statusTMP + ",toolbar=" + toolbarTMP);
}

function SwitchAumaWorldwide()
{
  var liLevel0 = document.getElementById('aumaWeltweitLevel0');
  if(liLevel0) {
    if(liLevel0.className  == "inactive over") liLevel0.className = "inactive";
    else liLevel0.className = "inactive over";
  }
}

function SwitchAumaInternational()
{
  var liLevel0 = document.getElementById('aumaInternationalLevel0');
  if(liLevel0) {
    if(liLevel0.className  == "inactive over") liLevel0.className = "inactive";
    else liLevel0.className = "inactive over";
  }
}

function startList() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("AumaNav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
		
		//aumaWeltweit
		navRoot = document.getElementById("aumaWeltweit");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}

function DoSearch(phrase) {
    var obj = document.getElementById("searchString");
    obj.value = phrase;
    document.getElementById("formSearch").submit();
}


function SearchFormSubmit(initphrase) {
    var phrase = document.getElementById('searchString').value;
    var regexp_name = /^\s*$/;

    if (regexp_name.test(phrase) == true) {
        return false;
    } else if (phrase == initphrase) {
        return false;
    }
    else {
        return true;
    }

}

