  function fKlap(what) {
    oTarget = document.getElementById(what);
    sState  = oTarget.style.display;
	if (sState == 'none' || !sState)
	  oTarget.style.display = 'block';
	else {
	  oTarget.style.display = 'none';
	}
	textHeight()
  }
	
	function fHideLayers(selement, slayers) {
    var LayerItems = slayers.split(",");
    if (LayerItems.length > 1) {
			var LayerItems = slayers.split(",");
			for (var i=0; i<LayerItems.length; i++) {
        if (document.getElementById(selement+LayerItems[i])) {
          if (LayerItems[i] != LayerItems[i-1]) {
            //alert(selement+LayerItems[i])
				    eval("document.getElementById('"+selement+LayerItems[i]+"').style.display='none'")
          }  
        }
			}
    }
	}

	function fShowSelect(sobject) {
		var oSelect = document.getElementById(sobject)
		var iSelectItems = oSelect.length
		if (iSelectItems > 1) {
			for (var i=1; i < iSelectItems; i++) {
				oSelect.options[i].style.background='#ffffff';
			}
		}
		if (!oSelect[oSelect.selectedIndex] == 0) {
			oSelect[oSelect.selectedIndex].style.background='#99cc99';
		}
	}
	
	function fGetValue(otarget,selement,svalue) {
    //document.getElementById(otarget).value = svalue;
		if ((eval(svalue) > 0) && (!selement.length == 0)) {
      fKlap(selement+svalue)
		}
	}
	
	function fCheckProdCat(selement, svalue,sklap) {
    if (svalue == '3') {
			document.getElementById('catlevel').style.display = 'block';
			if (sklap.length > 0) {
				//setTimeout("fKlap("+temp+")", 100);
			}
		}
		else {
			document.getElementById('catlevel').style.display = 'none';
		}
	}
	
	function toggleButton (button) {
      if (typeof button.disabled != "undefined")
        button.disabled = !button.disabled;
      else if (button.clicked) {
        button.clicked = false;
        button.value = button.oldValue;
      }
      else {
        button.clicked = true;
        button.oldValue = button.value;
        button.value = 'DISABLED';
      }
    }
    function PopMeUpClean(PopupFile,myHeight,myWidth,myLeft,myTop){
	  myPopup = window.open (PopupFile, 'newwin', config='height='+myHeight+',width='+myWidth+',toolbar=no,menubar=no,scrollbars=no,resizable=yes,location=no,directories=no,status=no,left='+myLeft+',top='+myTop+'')
    }

    function fPopup(PopupFile,myHeight,myWidth,myLeft,myTop,scroll){
	  myPopup = window.open (PopupFile, 'newwin', config='height='+myHeight+',width='+myWidth+',toolbar=no,menubar=no,scrollbars='+scroll+',resizable=yes,location=no,directories=no,status=no,left='+myLeft+',top='+myTop+'')
    }

	function fShopOrder(sSite,sAction,sUser,sMod,sId) {
	  var fSource   = document.getElementById('frmOrderItem'+sId)
	  var sQuantity = fSource.options[fSource.selectedIndex].value
      window.open ( '/'+sSite+'/cmd.shop.asp?action='+sAction+'&user='+sUser+'&mod='+sMod+'&id='+sId+'&quantity='+sQuantity+'','shop', config='height=1,width=1,toolbar=no,menubar=no,scrollbars=no,resizable=yes,location=no,directories=no,status=no,left=0,top=0')
	}

	function textHeight() {
    if (document.getElementById('left_bm') && document.getElementById('content_bm') && document.getElementById('right-content_bm')) {
		var iScreenWidth = window.innerWidth || document.body.clientWidth //hoogte browservenster
		var iScreenHeight = window.innerHeight || document.body.clientHeight //hoogte browservenster
		var iHoogteLinks = document.getElementById('left_bm').offsetTop + 155 //hoogte linkerkant pagina + correctie
		var iHoogteMidden = document.getElementById('content_bm').offsetTop  + 290 //hoogte content gedeelte pagina + correctie
		var iHoogteRechts = document.getElementById('right-content_bm').offsetTop + 40 //hoogte rechterkant pagina + correctie
		var iScrollbarHoogte = 0
		//====== Correctie kleuren breedte ======//
		//Is het browservenster smaller dan de paginabreedte?
		//(Dit om de kleuren aan de rechterkant door te laten lopen.)
		if (iScreenWidth < 794) {
			//Nee, dan een vaste breedte van 794 px.
			//Let op: Nu is er een horizontale scrollbar in beeld!
			if ((document.getElementById) && (document.getElementById('overflow')!=null)) {
				document.getElementById('overflow').style.width = '794px'
			}
			iScrollbarHoogte = 17
		}
		else {
			//Ja, maar dan wel nogmaals de breedte op 100% zetten!
			if ((document.getElementById) && (document.getElementById('overflow')!=null)) {
				eval(document.getElementById('overflow')).style.width = '100%'
			}
		}
		
		if (!document.getElementById('middle4')) {
		iCorr = 184
	  } 
	  else {
		iCorr = 274
	  }
		
		//Bepalen welk gedeelte (lees kolom) v/d pagina het langst is.
		//De bepaald ook de lengte van de andere delen! Dit i.v.m. de kleuren.
		if (iHoogteLinks > iHoogteMidden && iHoogteLinks > iHoogteRechts) {
			iTotaleHoogte = iHoogteLinks
		}
		else if (iHoogteRechts > iHoogteMidden && iHoogteRechts > iHoogteLinks) {
			iTotaleHoogte = iHoogteRechts
		}
		else {
			iTotaleHoogte = iHoogteMidden
		}
		
		if (iScreenHeight > iTotaleHoogte) {
			if ((document.getElementById) && (document.getElementById('content')!=null)) {
				document.getElementById('content').style.height = (iScreenHeight-iCorr)+'px'
			}
			if ((document.getElementById) && (document.getElementById('left')!=null)) {
				document.getElementById('left').style.height = (iScreenHeight+iScrollbarHoogte)+'px'
			}
			if ((document.getElementById) && (document.getElementById('overflow')!=null)) {
				document.getElementById('overflow').style.height = (iScreenHeight+iScrollbarHoogte)+'px'
			}
		}
		else {
			if ((document.getElementById) && (document.getElementById('content-zone')!=null)) {
				document.getElementById('content-zone').style.height = (iTotaleHoogte-iCorr)+'px'
			}
			if ((document.getElementById) && (document.getElementById('left')!=null)) {
				document.getElementById('left').style.height = (iTotaleHoogte+iScrollbarHoogte)+'px'
			}
			if ((document.getElementById) && (document.getElementById('overflow')!=null)) {
				document.getElementById('overflow').style.height = (iTotaleHoogte+iScrollbarHoogte)+'px'			
			}
		}
	}	
		//strDebug1 = 'iScreenHeight = '+iScreenHeight+' | iTotaleHoogte = '+iTotaleHoogte+' | iHoogteLinks = '+iHoogteLinks+' | iHoogteRechts = '+iHoogteRechts+' | iHoogteMidden = '+iHoogteMidden
		//window.status = 'debug: ' +strDebug1
	}
	
  
  function fCheckChildren(form,start,level) {
      var formElements = form.elements;
      var cbState
      if (level == 0) {
        if (formElements[3].checked) {
          cbChangeState = true
        }
        else {
          cbChangeState = false
        }
        for (i=4; i<formElements.length; i++) {
          if (formElements[i].type == "checkbox") {
            formElements[i].checked = cbChangeState;
          }
        }
      }
      if (form.checkSubitems.checked == true) {
        for (i=0; i<formElements.length; i++) {
          if (formElements[i].type == "checkbox") {
            if (formElements[i].value == start) {
              if (formElements[i].checked) {
                cbChangeState = true
              }
              else {
                cbChangeState = false
              }
              for (j=i+1; j<formElements.length; j++) {
                if (formElements[j].param <= level) {
                  break;
                }
                else {
                  formElements[j].checked = cbChangeState;
                }
              }
            }   
          }
        }
      }
      for (i=4; i<formElements.length; i++) {
        if (formElements[i].type == "checkbox") {
          if (formElements[i].checked != true) {
            formElements[3].checked = false;
            //blnIsIeder = false;
            break;
          }
          else {
            formElements[3].checked = true;
            //blnIsIeder = true;
          }
        }
      }
      //return blnIsIeder;
    }
	 
   function fClassChange(element, state) {
      element.className = state;
    }
   
   function fTransferSelected(fSource, fTarget, sType){
	  if (sType == "add") {
		var tmpStr = document.all.fSource.options[document.all.fSource.selectedIndex].value
		tmpStr = tmpStr.split(":")
		var i = 0;
		var existalready = 0;
		while (i < document.all.fTarget.length && existalready == 0) {
			if (document.all.fTarget.options[i].value == tmpStr[1]) {
				existalready = 1;
			}
			else{
				i=i+1;
			}
		}		
		if (existalready == 0) {
			var Opt = new Option(tmpStr[0], tmpStr[1])
			document.all.fTarget.options[document.all.fTarget.length] = Opt
		}
	  }
	  if (sType == "delete") {
		document.all.fSource.options[document.all.fSource.selectedIndex] = null
	  }
    }  
	
   function copy_clip(meintext){
    if (window.clipboardData) 
      {
      window.clipboardData.setData("Text", meintext);
      }
      else if (window.netscape) 
      { 
      netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
      var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard);
      if (!clip) return;
      var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);
      if (!trans) return;
      trans.addDataFlavor('text/unicode');
      var str = new Object();
      var len = new Object();
      var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
      var copytext=meintext;
      str.data=copytext;
      trans.setTransferData("text/unicode",str,copytext.length*2);
      var clipid=Components.interfaces.nsIClipboard;
      if (!clip) return false;
      clip.setData(trans,null,clipid.kGlobalClipboard);
      }
      alert("De volgende tekst is op uw klembord geplaatst:\n\n" + meintext);
      return false;
    }

     function adjustFrame(frame,frameheight) {
       var iframeHeight
        iframeHeight = frameheight
       if (document.all) {
                document.all["ContentIframe"].height = iframeHeight;

        }
        else if (document.getElementById) {
                document.getElementById("ContentIframe").height = iframeHeight;
        }
				parent.textHeight()
      }

			function refreshParent() {
				this.location.reload();
			}
		
      function fHideShow( fwho ) {
		var item = document.getElementById(fwho);
		if (item.style.display == 'inline') {
			item.style.display = 'none';
		} else {
			item.style.display = 'inline';
		}		
    textHeight()
		}

    function selectAllData(fSource){
	  var strTemp = "";
	  for(var i = 0;i < document.getElementById(fSource).length;i++){
		document.getElementById(fSource).options[i].selected = true;
	  } 
    }
	function fShowHide(fshow, fhide){
	  document.getElementById(fshow).style.display = 'block';
	  document.getElementById(fhide).style.display = 'none';
	}

    function showtip(current,e,text){
      if (document.all||document.getElementById){
        thetitle=text.split('<br>')
        if (thetitle.length>1){
          thetitles=''
          for (i=0;i<thetitle.length;i++)
          thetitles+=thetitle[i]
          current.title=thetitles
        }
        else
          current.title=text
        }
        else if (document.layers){
          document.tooltip.document.write('<layer bgColor="white" style="border:1px solid black;font-size:12px;">'+text+'</layer>')
          document.tooltip.document.close()
          document.tooltip.left=e.pageX+5
          document.tooltip.top=e.pageY+5
          document.tooltip.visibility="show"
        }
     }

     function hidetip(){
       if (document.layers)
         document.tooltip.visibility="hidden"
     }

  function openLexikon(url){	
    var xPos = (screen.availWidth/2-334);
    var yPos = (screen.availHeight/2-334);	
    var lexikonPopup=window.open( url?url:"http://www.siemens.com/communications/lexicon","siemensLexikonPopup","left="+xPos+",top="+yPos+",width=790,height=570,resizable=no,scrollbars=no,status=no,menubar=no,locationbar=no,toolbar=0");
    lexikonPopup.focus();	
  }

function PopUpCenter(sUrl,sName,sFeatures)
{
	//		**********************************************************************************************
	//		COPY AND PASTE THIS LINE OF CODE. USE DIFFERENT VARIABLES FOR DIFFERENT WINDOWS!!
	//		OTHERWISE YOU OPEN THE SAME WINDOW INSTEAD OF ANOTHER, AND YOU CANNOT RESIZE IT IF WANTED!
	//		onClick="oMyPopup=PopUpCenter('myPage.html','myPage','width=500,height=296');oMyPopup.focus()"
	//		**********************************************************************************************
	//		IF YOU ONLY WANT TO DISPLAY AN IMAGE INSIDE THE NEW WINDOW, USE THIS BODY TAG IN THE HTML PAGE YOU OPEN:
	//		<body leftmargin="0" bottommargin="0" rightmargin="0" topmargin="0" marginheight="0" marginwidth="0">
	//		**********************************************************************************************
	var ns4 = (document.layers)? true:false
	var ie4 = (document.all)? true:false
	if (!ns4 && !ie4) return true
	
	var iBrowserWidth					//	integer indicating width of clientArea
	var iBrowserHeight					//	integer indicating height of clientArea
	var iLeftCurrentWindow				//	integer indicating the horizontal position of current window
	var iTopCurrentWindow				//	integer indicating the vertical position of current window
	var sWidth							//	string containing specified width in sFeatures argument
	var sHeight							//	string containing specified height in sFeatures argument
	var iPositionWidth					//	position 'width' substring in string sFeatures
	var iPositionNextCommaAfterWidth	//	position ',' substring after width in string sFeatures
	var iPositionHeight					//	position 'height' substring in string sFeatures
	var iPositionNextCommaAfterHeight	//	position ',' substring after height in string sFeatures
	var iLeftPosition					//	integer containing wanted horizontal position
	var iTopPosition					//	integer containing wanted vertical position
	var sFeaturesAdjusted				//	string containing comma separated list of Windowfeatures, 
										//	with the calculated position added to it
	
	//		checks on specified arguments
	if (sUrl == "" || sName == "" || sFeatures == "") 
	{
		alert('PopUpCenter misses one or more arguments!')
		return true
	}
	if (sFeatures.search('width') == -1 || sFeatures.search('height') == -1)
	{
		alert('PopUpCenter needs a width and a height specified in the sFeatures argument!')
		return true
	}
	if (sFeatures.search('screenX') != -1 || sFeatures.search('screenY') != -1 || sFeatures.search('left') != -1 || sFeatures.search('top') != -1)
	{
		alert('PopUpCenter doesn\'t take screenX, screenY, left or top in its sFeatures argument!')
		return true
	}
	
	//		get proportions display area of current browser-window
	if (ns4)
	{
		iBrowserWidth = window.innerWidth
		iBrowserHeight = window.innerHeight
		iLeftCurrentWindow = window.screenX
		iTopCurrentWindow = window.screenY
	}
	if (ie4)
	{
		iBrowserWidth = window.document.body.clientWidth
		iBrowserHeight = window.document.body.clientHeight
		iLeftCurrentWindow = window.screenLeft
		iTopCurrentWindow = window.screenTop
	}
	
	//		get specified width
	iPositionWidth = sFeatures.indexOf('width')
	iPositionNextCommaAfterWidth = sFeatures.indexOf(',',iPositionNextCommaAfterWidth)
	if (iPositionNextCommaAfterWidth == -1)
	{
		iPositionNextCommaAfterWidth = sFeatures.length
	}
	//		+6, because we want to skip the characters 'width='
	sWidth = sFeatures.substring(iPositionWidth+6,iPositionNextCommaAfterWidth)
	
	//		get specified height
	iPositionHeight = sFeatures.indexOf('height')
	iPositionNextCommaAfterHeight = sFeatures.indexOf(',',iPositionHeight)
	if (iPositionNextCommaAfterHeight == -1)
	{
		iPositionNextCommaAfterHeight = sFeatures.length
	}
	//		+7, because we want to skip the characters 'height='
	sHeight = sFeatures.substring(iPositionHeight+7,iPositionNextCommaAfterHeight)
	
	//		calculate position
	iLeftPosition = iLeftCurrentWindow + ((iBrowserWidth/2) - (sWidth/2))
	iTopPosition = iTopCurrentWindow + ((iBrowserHeight/2) - (sHeight/2))
	
	//		adjust sFeatures string
	sFeaturesAdjusted = sFeatures + ',screenX='+iLeftPosition+',screenY='+iTopPosition+',left='+iLeftPosition+',top='+iTopPosition+''
	
	//		call window.open method
	return window.open(sUrl,sName,sFeaturesAdjusted)
}