function logon(){
	if (document.login.username.value=="") {
	alert("U bent vergeten uw gebruikersnaam in te vullen");
	return false}
	if (document.login.password.value=="") {
	alert("U bent vergeten uw wachtwoord in te vullen");
	return false}
}

function mouseDown(e) {
	var ctrlPressed=0;
	var altPressed=0;
	//a = document.getElementById("divContentLeft")
	b = document.getElementById("divContentRight")

	 if (parseInt(navigator.appVersion)>3) {
	  if (navigator.appName=="Netscape") {
	   var mString =(e.modifiers+32).toString(2).substring(3,6);
	   ctrlPressed =(mString.charAt(1)=="1");
	   altPressed  =(mString.charAt(2)=="1");
	   self.status="modifiers="+e.modifiers+" ("+mString+")"
	  }
	  else {
	   altPressed  =event.altKey;
	   ctrlPressed =event.ctrlKey;
	  }

	   if(ctrlPressed){
		  // 	a.contentEditable 	= false;
			b.contentEditable 	= false;
		   }
		  else{
		  // 	a.contentEditable 	= true;
			b.contentEditable 	= true;
		  }
	 }
}

function detectTextSelection()
{
	//var a = document.selection.createRange()
	var a = document.getElementById("maincontent").document.selection.createRange()

	if(a.text.length > 0 ){return true;}
	else{return false;}
}

function mouseButton(){
	var whichButton = event.button;
	return whichButton;
}

function showDisclaimerByRight()
{
	if(mouseButton() == 2){showDisclaimer();}
}

function showDisclaimerBySelection()
{
	if(detectTextSelection()){showDisclaimer();}
}

function showDisclaimerByKeyTouch()
{
	   altPressed  =event.altKey;
	   ctrlPressed =event.ctrlKey;
	   if(altPressed || ctrlPressed){showDisclaimer();}
}

function showDisclaimer()
{
	//getOldContent()

	//var sDisclaimer = "<b>Disclaimer Natuur- & gezondheidsProducten Nederland (NPN)</b><br><br>";
	//sDisclaimer = sDisclaimer + "Alle informatie die NPN via het internet verspreidt is met zorg samengesteld. <br><br>";
	//sDisclaimer = sDisclaimer + "NPN zal alles doen wat redelijkerwijs binnen haar vermogen ligt om op deze website actuele en accurate informatie te verschaffen.<br><br>";
	//sDisclaimer = sDisclaimer + "Aan de inhoud van deze informatie kunnen op geen enkele wijze rechten worden ontleend. <br>NPN aanvaardt evenmin aansprakelijkheid voortvloeiende uit onjuiste informatie of anderszins.<br><br>";
	//sDisclaimer = sDisclaimer + "Niets van deze website mag openbaar worden gemaakt in enige vorm of op enige wijze, zonder voorafgaande schriftelijke toestemming van NPN.<br><br>";
	//sDisclaimer = sDisclaimer + "<a href=\"javascript: showOldContent(); \">Ga terug</a>";

	//document.getElementById("maincontent").innerHTML = sDisclaimer;
	self.document.location = "/internet/articles/disclaimer.asp";
}

function getOldContent()
{
	oldContent  = document.getElementById("maincontent").innerHTML;
}

function showOldContent()
{
	document.getElementById("maincontent").innerHTML = oldContent;	
}


function resetMenu()
{
	b = document.getElementsByName("subbox")
	for(i=0;i<b.length;i++){b[i].style.display = "none";}
}

function setMenu(nSubId)
{
	resetMenu()
	openMenu(nSubId)

}

function openMenu(nSubId)
{
	if(document.getElementById("subbox_" + nSubId))
	{
		a = document.getElementById("subbox_" + nSubId)
		a.style.display = "";
		a.parentNode.style.display = "";
	}
}

function gotoChapter(nChapterId)
{
	document.location = "/internet/articles/articles.asp?chapterId=" + nChapterId
}
