/*
 * Common functions to be used across all flow pages
 */

function doSubmit(eventId){
	addEventId(eventId);
	document.forms[0].submit();
	
}

function addEventId(eventId){
	
	if(!document.forms[0]._eventId){
		var e = document.createElement('input');
		e.setAttribute('type', 'hidden');
		e.setAttribute('name', '_eventId');
		e.setAttribute('value', eventId);
		document.forms[0].appendChild(e);
	}else{
		document.forms[0]._eventId.value=eventId;
	}
}

function doGet(flowExecutionURL, eventId){
	
	this.document.location.href = flowExecutionURL+"&eventId="+eventId;
}
