function captcha(pHideID,pShowID,pSiteKey,pAction,pFunktion,pPara1,pKurvPara,pSession,pMD5,pSender) {
	var docaptcha=1;
	if (pHideID!='') {
		var hideIDs = pHideID.split("!");
		for (i = 0; i < hideIDs.length; i++) {
			$('#'+hideIDs[i]).hide();
		}
	}
	if (pShowID!='') {
		var showIDs = pShowID.split("!");
		for (i = 0; i < showIDs.length; i++) {
			$('#'+showIDs[i]).show();
		}
	}
	if (pAction=='opret_acceptbeting') {
		if (!$(pSender).is(':checked')) {
			docaptcha=0;
		}
	}

	if (docaptcha==1) {
		//giver syntax fejl i ie - kiosk skal opdateres!
		const promise = new Promise((resolve, reject) => {
			grecaptcha.execute(pSiteKey, { action: pAction })
			.then(token => {
				resolve(token);
			},
			reject)
		})
		.then(function(token) {
			document.getElementById('g-recaptcha-response').value = token;
			var pTil='';
			if (pAction=='opretbruger') {
				pTil='proc_tilopretkonto.asp';
				sende(pTil,pFunktion,pPara1,'',pSession,pMD5);
			}
			if (pAction=='formular') {
				pTil='proc_tilformular.asp';
				sende(pTil,'',pPara1,pKurvPara,'',pMD5);
			}
			if (pAction=='sendsupportmail') {
				sende('proc_side.asp?s=sendsupportemail','','','','','')
			}
		})
		.catch(err => {
			//mulighed for V2 captcha
		});
	}
}