function artikelToevoegen(frmNaam,intMinAfname,intProductId,strErr,strURL){
	if((document.forms[frmNaam]["aantal"+intProductId].value > 0 && document.forms[frmNaam]["aantal"+intProductId].value < 99999) && document.forms[frmNaam]["aantal"+intProductId].value >= intMinAfname){
		document.forms[frmNaam].cmdActie.value = "artikelToevoegen";
		document.forms[frmNaam].artikelid.value = intProductId;
		document.forms[frmNaam].aantal.value = document.forms[frmNaam]["aantal"+intProductId].value;
		//alert(document.forms[frmNaam].artikelid.value + " = " +document.forms[frmNaam].aantal.value);
		document.forms[frmNaam].action = strURL;
		document.forms[frmNaam].submit();
	}
	else{
		alert(strErr);//"Het opgegeven aantal is niet correct!"
		return false;
	}
}

function artikelVerwijderen(strFrm,lngArtikel_ID,strMsg,strURL){
	var blnVerwijderen = false;
	blnVerwijderen = confirm(strMsg);//"Weet u zeker dat u het artikel wilt verwijderen?"
	if(blnVerwijderen == true){
		document.forms[strFrm].cmdActie.value = "artikelVerwijderen";
		document.forms[strFrm].artikelid.value = lngArtikel_ID;
		document.forms[strFrm].action = strURL;
		document.forms[strFrm].submit();
	}
	else{
		return false;
	}
}

function artikelWijzigen(strFrm,lngArtikelID, intMinAfname,strErr,strURL){
	if((document.forms[strFrm]["aantal"+lngArtikelID].value > 0 && document.forms[strFrm]["aantal"+lngArtikelID].value < 99999) && document.forms[strFrm]["aantal"+lngArtikelID].value >= intMinAfname){
		document.forms[strFrm].cmdActie.value = "artikelWijzigen";
		document.forms[strFrm].artikelid.value = lngArtikelID;
		document.forms[strFrm].action = strURL;
		document.forms[strFrm].submit();
	}
	else{
		alert(strErr);
		return false;
	}
}

function doeActie(strFrm,strActie,strURL){
	//alert(strFrm+","+strActie+","+strURL);
	document.forms[strFrm].action = strURL;
	document.forms[strFrm].cmdActie.value = strActie;
	document.forms[strFrm].submit();
	return true;
}

function doeActie2(strFrm,strURL){
	//alert(strFrm+","+strActie+","+strURL);
	document.forms[strFrm].action = strURL;
	document.forms[strFrm].submit();
	return true;
}

function zetlb(){
	element = document.getElementsByTagName('img');
	huidige=-1;
	for(i=0;i<element.length-1;i++){
		if(element[i].title!= null && element[i].title !='' && huidige!=element[i].id){
			//alert(element[i].title);
			//alert(element[i].id);
			huidige=element[i].id;
			newDiv = document.createElement("span");
			newDiv.innerHTML = "<a class='lightbox' href='"+element[i].title+"' rel='riethorst["+element[i].id+"]'><img src='"+element[i].src+"' width='"+element[i].width+"' height='"+element[i].height+"'></a>";

			// add the newly created element and it's content into the DOM
			my_div = document.getElementById(element[i].id);
			my_div.parentNode.insertBefore(newDiv, my_div);
			my_div.parentNode.removeChild(my_div);
		}
	}

}

