function SelectMenuItems(mainMenu, subMenu)
{
  if (document.getElementById)
  {
	if (document.getElementById(mainMenu))
	{
		document.getElementById(mainMenu).className = 'SelectedMenu';
	}
	if (subMenu.length > 0)
	{
		if (document.getElementById(subMenu))
		{
			document.getElementById(subMenu).className = 'SelectedMenu';
		}
	}
  }
}

function WriteEmailAddress (name, domain, topLevelDomain, css)
{
	document.write('<a');
//	if (css.length > 0)
	//{
//		document.write(' class=\"' + css + '\"');
//	}
	document.write(' href=\"mailto:' + name + '@' + domain + '.' + topLevelDomain + '\">');
	document.write(name + '@' + domain + '.' + topLevelDomain + '</a>');
}

var _win=null;

function closeWin()
{
  if(_win && !_win.closed && _win.open)
  {
      _win.close();
	  _win=null;
  }
}

function openWin(theURL,winName,features)
{
  closeWin();
  _win=window.open(theURL,winName,features);
  _win.focus();
}


function openMedewerkerWin(employeeId)
{
	var winLeft = (screen.width - 450) / 2;
	var winUp = (screen.height - 270) / 2;
	openWin('PopupMedewerker.asp?CID=' + employeeId, 'medewerker', 'width=450,height=270,left='+winLeft+',top='+winUp+',scrollbars=yes');
}

function openZoom(imagepath)
{
	var winLeft = (screen.width - 200) / 2;
	var winUp = (screen.height - 200) / 2;
	openWin('/Static/PopupZoom.asp?' + imagepath, 'MyPopup', 'width=100,height=100,left='+winLeft+',top='+winUp+',scrollbars=no');
}

function dm(msgStr) {
  document.returnValue = false;
  if (document.images) {
     window.status = msgStr;
     document.returnValue = true;
  }
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
 var thewin = window.open(theURL,winName,features);
 	 thewin.focus;
}