function doSubmit(formName, actionName) {
	window.document.getElementsByName(formName)[0].action = actionName;
	window.document.getElementsByName(formName)[0].submit();
}

function doSubmitExhibition(formName, actionName, exhibitionCode) {
	window.document.getElementsByName(formName)[0].exhibitionCode.value = exhibitionCode;
	window.document.getElementsByName(formName)[0].action = actionName;
	window.document.getElementsByName(formName)[0].submit();
}

function doSubmitExhibitor(formName, actionName, exhibitorId) {
	window.document.getElementsByName(formName)[0].selectedExhibitor.value = exhibitorId;
	window.document.getElementsByName(formName)[0].action = actionName;
	window.document.getElementsByName(formName)[0].submit();
}

function doSubmitVisitor(formName, actionName, visitorId) {
	window.document.getElementsByName(formName)[0].selectedVisitor.value = visitorId;
	window.document.getElementsByName(formName)[0].action = actionName;
	window.document.getElementsByName(formName)[0].submit();
}

function doSubmitProject(formName, actionName, projectId) {
	window.document.getElementsByName(formName)[0].selectedProject.value = projectId;
	window.document.getElementsByName(formName)[0].action = actionName;
	window.document.getElementsByName(formName)[0].submit();
}

function doSubmitVisitorAndProject(formName, actionName, visitorId, projectId) {
	window.document.getElementsByName(formName)[0].selectedVisitor.value = visitorId;
	window.document.getElementsByName(formName)[0].selectedProject.value = projectId;
	window.document.getElementsByName(formName)[0].action = actionName;
	window.document.getElementsByName(formName)[0].submit();
}

function doSubmitAnswer(formName, actionName, answerId) {
	window.document.getElementsByName(formName)[0].selectedAnswer.value = answerId;
	window.document.getElementsByName(formName)[0].action = actionName;
	window.document.getElementsByName(formName)[0].submit();
}

function addActivity(){


if (document.getElementsByName("typeActivites[2]")[0].value!=-1) {document.getElementById("blocActivites2").style.display="block";}

	if (document.getElementById("blocActivites1").style.display=="none") {
		document.getElementById("blocActivites1").style.display="block";
	}else {
		document.getElementById("blocActivites2").style.display="block";
	}
	
}


function loadPage(){

	if (document.getElementsByName("typeActivites[1]")[0].value!=-1) {
document.getElementById("blocActivites1").style.display="block";
}

if (document.getElementsByName("typeActivites[2]")[0].value!=-1) {
document.getElementById("blocActivites2").style.display="block";
}
}

function checkAndSend(path){
document.getElementById('btnValidSubscribe').disabled="disabled";
doSubmit('visitorProfileForm', path+'/do/subscribeValidate?reqCode=button.subscribe');

return false;

}



