﻿/* CROSS-BROWSER EVENT HANDLER */
function addEvent(obj, evType, fn){
	 if (obj.addEventListener){
		 obj.addEventListener(evType, fn, true);
		 return true;
	 } else if (obj.attachEvent){
		 var r = obj.attachEvent("on"+evType, fn);
		return r;
	 } else {
		return false;
	 }
}
/* END EVENT HANDLER */

initializeGlobalNav = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("global-nav");
		if (navRoot != null) {
		for (var i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			/*if the item is an LI and it hasn't already been set to *-selected, 
				then add the following events (for IE only)*/
			if (node.nodeName=="LI" && node.className.indexOf("-selected") < 0) {
				node.onmouseover=function() {
					this.className+="-selected";		
				}
				node.onmouseout=function() {
					this.className=this.className.replace("-selected", "");
				}
			}
		}
		}
	}	
}

initializeSectionNav = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("section-nav");
		if (navRoot)
		{
			for (var i=0; i<navRoot.childNodes.length; i++) {
				node = navRoot.childNodes[i];
				/*if the item is an LI and it hasn't already been set to *-selected, 
					then add the following events (for IE only)*/
				if (node.nodeName=="LI") {
					node.onmouseover=function() {
						this.className+=" over";		
					}
					node.onmouseout=function() {
						this.className=this.className.replace(" over", "");
					}
				}
			}
		}
	}	
}

function SiemensHiPath()
{
    var diasettings="";
    diasettings="dialogWidth:650px;dialogHeight:100px;center:yes;resizable:no;status:no;";
    window.open('/TalkToUs/siemenshipath/hppcwis.dll?varUserRequest=REQ_CALLBACK_AVAILABILITY&varUserLanguage=english','self','height=690,width=750,screenX=550,screenY=60,modal=1,dialog=1,menubar=0,location=0,resizable=0,scrollbars=1,status=0,toolbar=0,directories=0');
 
    return false;
}

addEvent(window, "load", initializeGlobalNav);
addEvent(window, "load", initializeSectionNav);


    function openConceptWindow(url) { //v2.0
      window.open(url,"","scrollbars=yes,resizable=yes,width=550,height=400");
    }  
    
