function groupSelected()
{
  var ThisForm = document.frmArticledetails;	                      
  ThisForm.articlegroupid.value = ThisForm.drdGroups.options[ThisForm.drdGroups.options.selectedIndex].value;	
}

function Save(action)
{	
	WYSIWYG.stripHTML('DescriptionNL');
	WYSIWYG.stripHTML('DescriptionEN');
  WYSIWYG.updateTextArea('DescriptionNL');
  WYSIWYG.updateTextArea('DescriptionEN');
	var ThisForm = document.frmArticledetails;
  var blnValid = true;
  var strError = "";	
	
	if(action == "cancel")
	{
	  blnValid = true;	  
	}
	else
	{	  
		if(ThisForm.nameNL.value == "")
	  {	  
			
			strError += "Naam (NL) is verplicht \n";
			blnValid = false;
		}
	  	
		if((ThisForm.nameEN.value == ""))
		{
		  strError += "Naam (EN) is verplicht \n";
			blnValid = false;
		}
		
		if((ThisForm.descriptionNL.value == ""))
		{
		  strError += "Omschrijving (NL) is verplicht \n";
			blnValid = false;
		}		
		
		if((ThisForm.descriptionEN.value == ""))
		{
		  strError += "Omschrijving (EN) is verplicht \n";
			blnValid = false;
		}			
	  
	}
		
	if(blnValid)
	{	  
  	ThisForm.btnAction.value = action ;
		ThisForm.submit();
	}
	else
	{
	  alert(strError);
	}  
}

function Upload(action)
{	
	
	var ThisForm = document.frmArticleimages;
  var blnValid = true;
  var strError = "";	
	
	if(action == "cancel" || action == "delete")
	{
	  blnValid = true;	  
	}
	else
	{		
		
		if((ThisForm.descriptionNL.value == ""))
		{
		  strError += "Omschrijving (NL) is verplicht \n";
			blnValid = false;
		}		
		
		if((ThisForm.descriptionEN.value == ""))
		{
		  strError += "Omschrijving (EN) is verplicht \n";
			blnValid = false;
		}			
	  
	}
		
	if(blnValid)
	{	  
  	ThisForm.btnAction.value = action ;
		ThisForm.submit();
	}
	else
	{
	  alert(strError);
	}  
}

//aan te passen
vanaf_links = 100;
vanaf_boven = 100;
grootste_breedte  = 800+20;//afmetingen van het grootste beeld +20
grootste_hoogte = 800+20;  //afmetingen van het grootste beeld +20
//hieronder niets wijzigen
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+grootste_breedte+',height='+grootste_hoogte+',left='+vanaf_links+',top='+vanaf_boven;
var optIE='scrollbars=no,width=150,height=100,left='+vanaf_links+',top='+vanaf_boven;
function popBeeld(BeeldURL,BeeldTitel){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Bezig met inladen ...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function aanpassen_aan_beeldgrootte(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
writeln('width=100-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
writeln('window.innerWidth=document.images["BeeldNaam"].width;');writeln('window.innerHeight=document.images["BeeldNaam"].height;}}');
writeln('function maak_titel(){document.title="'+BeeldTitel+'";}');writeln('</sc'+'ript>');
writeln('</head><body bgcolor=000000 scroll="no" onload="aanpassen_aan_beeldgrootte();maak_titel();self.focus()" onblur="self.close()">');
writeln('<img name="BeeldNaam" src='+BeeldURL+' style="display:block"></body></html>');
close();		
}}
