<?xml version="1.0" encoding="UTF-8"?>
<scenario begin="age_check">

	<!-- Loteria Romana-->
	<screen id="age_check" type="numeric" title="CNP">
		<!-- online request list open games or error dialog for over 18 or closed games -->
		<fields>
			<text-field id="id2" keyboard="Digital" max-len="13" title="CNP">
				<validator type="regex">
					<rules>
						<rule regex="^[0-9]{13}$"/>
					</rules>
				</validator>
				<help>
					<![CDATA[<html>Introduceti CNP-ul dvs. pentru validarea varstei]]>
				</help>
			</text-field>
		</fields>
		<actions>
			<action type="Next" title="Inainte">
				<set key="actionType" value="getOpenPeriods"/>
				<online-request type="default" function="check_games" params="actionType,id2">
					<actions>
						<action type="success">
							<if condition="code == 0">
								<then>
									<goto target="choose_game"/>
								</then>
								<else>
									<dialog type="Info" title="Eroare" message="Atentie: {0}" timeout="10" default="okay" mess-params="exception">
										<actions>
											<action type="okay" title="OK">
												<cancel/>
											</action>
										</actions>
									</dialog>
								</else>
							</if>
						</action>
						<action type="error">
							<dialog type="Info" title="Eroare" message="A intervenit o eroare, va rugam sa incercati din nou" timeout="10" default="okay">
								<actions>
									<action type="okay" title="OK">
										<cancel/>
									</action>
								</actions>
							</dialog>
						</action>
					</actions>
				</online-request>
			</action>
			<action type="Prev" title="Inapoi">
				<goto target="previous"/>
			</action>
			<action type="Exit" title="Acasa">
				<goto target="exit"/>
			</action>
		</actions>
	</screen>

	<screen id="choose_game" type="selector/image" title="Alegeti jocul dorit">
		<fields>
			<selector-field id="sel_game" title="Selectati jocul dorit">
				<items type="static">
					<item value="1" title="6 / 49" image="loto649.png"/>
					<item value="2" title="5 / 40" image="loto540.png"/>
					<item value="3" title="Joker" image="lotojoker.png"/>
				</items>
			</selector-field>
		</fields>
		<actions>
			<action type="Next" title="Inainte">
				<switch value="sel_game">
					<case value="1">
						<set key="gameType" value="g649"/>
						<set key="game" value="Loto 6/49" key-title="Joc"/>
						<dialog type="Info" title="Info" message="Selectati metoda de introducere a numerelor" timeout="10" default="cancel" mess-params="name">
							<actions>
								<action type="okay" title="Manual">
									<goto target="g649_v1"/>
								</action>
								<action type="cancel" title="Quick Pick">
									<set key="varianta" value="g649_v1"/>
									<set key="actionType" value="getVar"/>
									<online-request type="default" function="get_var" params="actionType,gameType,varianta">
										<actions>
											<action type="success">
												<if condition="code == 0">
													<then>
														<goto target="g649_v1"/>
													</then>
													<else>
														<dialog type="Info" title="Eroare" message="{0}" timeout="10" default="okay" mess-params="exception">
															<actions>
																<action type="okay" title="OK">
																	<cancel/>
																</action>
															</actions>
														</dialog>
													</else>
												</if>
											</action>
											<action type="error">
												<dialog type="Info" title="Eroare" message="A intervenit o eroare, va rugam sa incercati din nou" timeout="10" default="okay">
													<actions>
														<action type="okay" title="OK">
															<cancel/>
														</action>
													</actions>
												</dialog>
											</action>
										</actions>
									</online-request>
								</action>
							</actions>
						</dialog>
					</case>
					<case value="2">
						<set key="gameType" value="g540"/>
						<set key="game" value="Loto 5/40" key-title="Joc"/>
						<dialog type="Info" title="Info" message="Selectati metoda de introducere a numerelor" timeout="10" default="cancel" mess-params="name">
							<actions>
								<action type="okay" title="Manual">
									<goto target="g540_v1"/>
								</action>
								<action type="cancel" title="Quick Pick">
									<set key="varianta" value="g540_v1"/>
									<set key="actionType" value="getVar"/>
									<online-request type="default" function="get_var" params="actionType,gameType,varianta">
										<actions>
											<action type="success">
												<if condition="code == 0">
													<then>
														<goto target="g540_v1"/>
													</then>
													<else>
														<dialog type="Info" title="Eroare" message="{0}" timeout="10" default="okay" mess-params="exception">
															<actions>
																<action type="okay" title="OK">
																	<cancel/>
																</action>
															</actions>
														</dialog>
													</else>
												</if>
											</action>
											<action type="error">
												<dialog type="Info" title="Eroare" message="A intervenit o eroare, va rugam sa incercati din nou" timeout="10" default="okay">
													<actions>
														<action type="okay" title="OK">
															<cancel/>
														</action>
													</actions>
												</dialog>
											</action>
										</actions>
									</online-request>
								</action>
							</actions>
						</dialog>
					</case>
					<case value="3">
						<set key="gameType" value="gjok"/>
						<set key="game" value="Loto Joker" key-title="Joc"/>
						<dialog type="Info" title="Info" message="Selectati metoda de introducere a numerelor" timeout="10" default="cancel" mess-params="name">
							<actions>
								<action type="okay" title="Manual">
									<goto target="gjok_v1"/>
								</action>
								<action type="cancel" title="Quick Pick">
									<set key="varianta" value="gjok_v1"/>
									<set key="actionType" value="getVar"/>
									<online-request type="default" function="get_var" params="actionType,gameType,varianta">
										<actions>
											<action type="success">
												<if condition="code == 0">
													<then>
														<goto target="gjok_v1"/>
													</then>
													<else>
														<dialog type="Info" title="Eroare" message="{0}" timeout="10" default="okay" mess-params="exception">
															<actions>
																<action type="okay" title="OK">
																	<cancel/>
																</action>
															</actions>
														</dialog>
													</else>
												</if>
											</action>
											<action type="error">
												<dialog type="Info" title="Eroare" message="A intervenit o eroare, va rugam sa incercati din nou" timeout="10" default="okay">
													<actions>
														<action type="okay" title="OK">
															<cancel/>
														</action>
													</actions>
												</dialog>
											</action>
										</actions>
									</online-request>
								</action>
							</actions>
						</dialog>
					</case>
				</switch>
			</action>
			<action type="Prev" title="Inapoi">
				<goto target="previous"/>
			</action>
			<action type="Exit" title="Acasa">
				<goto target="exit"/>
			</action>
		</actions>
	</screen>

	<screen id="g649_v1" type="group" title="6/49 var 1">
		<fields>
			<text-field id="g649_v1" keyboard="any:[ro]:upper:false" max-len="17" message="Numere alese" title="Varianta A">
				<validator type="regex">
					<rules>
						<rule regex="^([1-9]|[1-4][0-9])[ ]([1-9]|[1-4][0-9])[ ]([1-9]|[1-4][0-9])[ ]([1-9]|[1-4][0-9])[ ]([1-9]|[1-4][0-9])[ ]([1-9]|[1-4][0-9])$"/>
					</rules>
				</validator>
				<help>
					<![CDATA[<html>Introduceti numerele variantei A pentru jocul 6/49 separate de spatii]]>
				</help>
			</text-field>
		</fields>
		<actions>
			<action type="Next" title="Inainte">
				<dialog type="Info" title="Info" message="Doriti sa jucati si varianta B?" timeout="10" default="cancel" mess-params="name">
					<actions>
						<action type="okay" title="Da">
							<dialog type="Info" title="Info" message="Selectati metoda de introducere a numerelor" timeout="10" default="cancel" mess-params="name">
								<actions>
									<action type="okay" title="Manual">
										<goto target="g649_v2"/>
									</action>
									<action type="cancel" title="Quick Pick">
										<set key="varianta" value="g649_v2"/>
										<set key="actionType" value="getVar"/>
										<online-request type="default" function="get_var" params="actionType,gameType,varianta">
											<actions>
												<action type="success">
													<if condition="code == 0">
														<then>
															<goto target="g649_v2"/>
														</then>
														<else>
															<dialog type="Info" title="Eroare" message="{0}" timeout="10" default="okay" mess-params="exception">
																<actions>
																	<action type="okay" title="OK">
																		<cancel/>
																	</action>
																</actions>
															</dialog>
														</else>
													</if>
												</action>
												<action type="error">
													<dialog type="Info" title="Eroare" message="A intervenit o eroare, va rugam sa incercati din nou" timeout="10" default="okay">
														<actions>
															<action type="okay" title="OK">
																<cancel/>
															</action>
														</actions>
													</dialog>
												</action>
											</actions>
										</online-request>
									</action>
								</actions>
							</dialog>
						</action>
						<action type="cancel" title="Nu">
							<dialog type="Info" title="Info" message="Doriti sa jucati si numar noroc?" timeout="10" default="cancel" mess-params="name">
								<actions>
									<action type="okay" title="Da">
										<goto target="lucky_number"/>
									</action>
									<action type="cancel" title="Nu">
										<set key="actionType" value="checkVars"/>
										<set key="luckyNo" value=""/>
										<set key="luckyNoX" value=""/>
										<set key="g649_v2" value=""/>
										<set key="g649_v3" value=""/>
										<online-request type="default" function="check_vars" params="actionType,gameType,g649_v1,g649_v2,g649_v3,luckyNo,luckyNoX">
											<actions>
												<action type="success">
													<if condition="code == 0">
														<then>
															<goto target="account"/>
														</then>
														<else>
															<dialog type="Info" title="Eroare" message="{0}" timeout="10" default="okay" mess-params="exception">
																<actions>
																	<action type="okay" title="OK">
																		<cancel/>
																	</action>
																</actions>
															</dialog>
														</else>
													</if>
												</action>
												<action type="error">
													<dialog type="Info" title="Eroare" message="A intervenit o eroare, va rugam sa incercati din nou" timeout="10" default="okay">
														<actions>
															<action type="okay" title="OK">
																<cancel/>
															</action>
														</actions>
													</dialog>
												</action>
											</actions>
										</online-request>
									</action>
								</actions>
							</dialog>
						</action>
					</actions>
				</dialog>
			</action>
			<action type="Prev" title="Inapoi">
				<goto target="choose_game"/>
			</action>
			<action type="Exit" title="Acasa">
				<goto target="exit"/>
			</action>
		</actions>
	</screen>

	<screen id="g649_v2" type="group" title="6/49 var 2">
		<fields>
			<text-field id="g649_v2" keyboard="any:[en]:upper:false" max-len="17" message="Numere alese" title="Varianta B">
				<validator type="regex">
					<rules>
						<rule regex="^([1-9]|[1-4][0-9])[ ]([1-9]|[1-4][0-9])[ ]([1-9]|[1-4][0-9])[ ]([1-9]|[1-4][0-9])[ ]([1-9]|[1-4][0-9])[ ]([1-9]|[1-4][0-9])$"/>
					</rules>
				</validator>
				<help>
					<![CDATA[<html>Introduceti numerele variantei B pentru jocul 6/49 separate de spatii]]>
				</help>
			</text-field>
		</fields>
		<actions>
			<action type="Next" title="Inainte">
				<dialog type="Info" title="Info" message="Doriti sa jucati si varianta C?" timeout="10" default="cancel" mess-params="name">
					<actions>
						<action type="okay" title="Da">
							<dialog type="Info" title="Info" message="Selectati metoda de introducere a numerelor" timeout="10" default="cancel" mess-params="name">
								<actions>
									<action type="okay" title="Manual">
										<goto target="g649_v3"/>
									</action>
									<action type="cancel" title="Quick Pick">
										<set key="varianta" value="g649_v3"/>
										<set key="actionType" value="getVar"/>
										<online-request type="default" function="get_var" params="actionType,gameType,varianta">
											<actions>
												<action type="success">
													<if condition="code == 0">
														<then>
															<goto target="g649_v3"/>
														</then>
														<else>
															<dialog type="Info" title="Eroare" message="{0}" timeout="10" default="okay" mess-params="exception">
																<actions>
																	<action type="okay" title="OK">
																		<cancel/>
																	</action>
																</actions>
															</dialog>
														</else>
													</if>
												</action>
												<action type="error">
													<dialog type="Info" title="Eroare" message="A intervenit o eroare, va rugam sa incercati din nou" timeout="10" default="okay">
														<actions>
															<action type="okay" title="OK">
																<cancel/>
															</action>
														</actions>
													</dialog>
												</action>
											</actions>
										</online-request>
									</action>
								</actions>
							</dialog>
						</action>
						<action type="cancel" title="Nu">
							<dialog type="Info" title="Info" message="Doriti sa jucati si numar noroc?" timeout="10" default="cancel" mess-params="name">
								<actions>
									<action type="okay" title="Da">
										<goto target="lucky_number"/>
									</action>
									<action type="cancel" title="Nu">
										<set key="actionType" value="checkVars"/>
										<set key="luckyNo" value=""/>
										<set key="luckyNoX" value=""/>
										<set key="g649_v3" value=""/>
										<online-request type="default" function="check_vars" params="actionType,gameType,g649_v1,g649_v2,g649_v3,luckyNo,luckyNoX">
											<actions>
												<action type="success">
													<if condition="code == 0">
														<then>
															<goto target="account"/>
														</then>
														<else>
															<dialog type="Info" title="Eroare" message="{0}" timeout="10" default="okay" mess-params="exception">
																<actions>
																	<action type="okay" title="OK">
																		<cancel/>
																	</action>
																</actions>
															</dialog>
														</else>
													</if>
												</action>
												<action type="error">
													<dialog type="Info" title="Eroare" message="A intervenit o eroare, va rugam sa incercati din nou" timeout="10" default="okay">
														<actions>
															<action type="okay" title="OK">
																<cancel/>
															</action>
														</actions>
													</dialog>
												</action>
											</actions>
										</online-request>
									</action>
								</actions>
							</dialog>
						</action>
					</actions>
				</dialog>
			</action>
			<action type="Prev" title="Inapoi">
				<goto target="g649_v1"/>
			</action>
			<action type="Exit" title="Acasa">
				<goto target="exit"/>
			</action>
		</actions>
	</screen>

	<screen id="g649_v3" type="group" title="6/49 var 3">
		<fields>
			<text-field id="g649_v3" keyboard="any:[en]:upper:false" max-len="17" message="Numere alese" title="Varianta C">
				<validator type="regex">
					<rules>
						<rule regex="^([1-9]|[1-4][0-9])[ ]([1-9]|[1-4][0-9])[ ]([1-9]|[1-4][0-9])[ ]([1-9]|[1-4][0-9])[ ]([1-9]|[1-4][0-9])[ ]([1-9]|[1-4][0-9])$"/>
					</rules>
				</validator>
				<help>
					<![CDATA[<html>Introduceti numerele variantei 3 pentru jocul 6/49 separate de spatii]]>
				</help>
			</text-field>
		</fields>
		<actions>
			<action type="Next" title="Inainte">
				<dialog type="Info" title="Info" message="Doriti sa jucati si numar noroc?" timeout="10" default="cancel" mess-params="name">
					<actions>
						<action type="okay" title="Da">
							<goto target="lucky_number"/>
						</action>
						<action type="cancel" title="Nu">
							<set key="actionType" value="checkVars"/>
							<set key="luckyNo" value=""/>
							<set key="luckyNoX" value=""/>
							<online-request type="default" function="check_vars" params="actionType,gameType,g649_v1,g649_v2,g649_v3,luckyNo,luckyNoX">
								<actions>
									<action type="success">
										<if condition="code == 0">
											<then>
												<goto target="account"/>
											</then>
											<else>
												<dialog type="Info" title="Eroare" message="{0}" timeout="10" default="okay" mess-params="exception">
													<actions>
														<action type="okay" title="OK">
															<cancel/>
														</action>
													</actions>
												</dialog>
											</else>
										</if>
									</action>
									<action type="error">
										<dialog type="Info" title="Eroare" message="A intervenit o eroare, va rugam sa incercati din nou" timeout="10" default="okay">
											<actions>
												<action type="okay" title="OK">
													<cancel/>
												</action>
											</actions>
										</dialog>
									</action>
								</actions>
							</online-request>
						</action>
					</actions>
				</dialog>
			</action>
			<action type="Prev" title="Inapoi">
				<goto target="g649_v2"/>
			</action>
			<action type="Exit" title="Acasa">
				<goto target="exit"/>
			</action>
		</actions>
	</screen>

	<screen id="g540_v1" type="group" title="5/40 var 1">
		<fields>
			<text-field id="g540_v1" keyboard="any:[en]:upper:false" max-len="17" message="Numere alese" title="Varianta A">
				<validator type="regex">
					<rules>
						<rule regex="^([1-9]|[1-3][0-9]|40)[ ]([1-9]|[1-3][0-9]|40)[ ]([1-9]|[1-3][0-9]|40)[ ]([1-9]|[1-3][0-9]|40)[ ]([1-9]|[1-3][0-9]|40)$"/>
					</rules>
				</validator>
				<help>
					<![CDATA[<html>Introduceti numerele variantei A pentru jocul 5/40 separate de spatii]]>
				</help>
			</text-field>
		</fields>
		<actions>
			<action type="Next" title="Inainte">
				<dialog type="Info" title="Info" message="Doriti sa jucati si varianta B?" timeout="10" default="cancel" mess-params="name">
					<actions>
						<action type="okay" title="Da">
							<dialog type="Info" title="Info" message="Selectati metoda de introducere a numerelor" timeout="10" default="cancel" mess-params="name">
								<actions>
									<action type="okay" title="Manual">
										<goto target="g540_v2"/>
									</action>
									<action type="cancel" title="Quick Pick">
										<set key="varianta" value="g540_v2"/>
										<set key="actionType" value="getVar"/>
										<online-request type="default" function="get_var" params="actionType,gameType,varianta">
											<actions>
												<action type="success">
													<if condition="code == 0">
														<then>
															<goto target="g540_v2"/>
														</then>
														<else>
															<dialog type="Info" title="Eroare" message="{0}" timeout="10" default="okay" mess-params="exception">
																<actions>
																	<action type="okay" title="OK">
																		<cancel/>
																	</action>
																</actions>
															</dialog>
														</else>
													</if>
												</action>
												<action type="error">
													<dialog type="Info" title="Eroare" message="A intervenit o eroare, va rugam sa incercati din nou" timeout="10" default="okay">
														<actions>
															<action type="okay" title="OK">
																<cancel/>
															</action>
														</actions>
													</dialog>
												</action>
											</actions>
										</online-request>
									</action>
								</actions>
							</dialog>
						</action>
						<action type="cancel" title="Nu">
							<dialog type="Info" title="Info" message="Doriti sa jucati si numar noroc?" timeout="10" default="cancel" mess-params="name">
								<actions>
									<action type="okay" title="Da">
										<goto target="lucky_number"/>
									</action>
									<action type="cancel" title="Nu">
										<set key="actionType" value="checkVars"/>
										<set key="luckyNo" value=""/>
										<set key="luckyNoX" value=""/>
										<set key="g540_v2" value=""/>
										<set key="g540_v3" value=""/>
										<set key="g540_v4" value=""/>
										<online-request type="default" function="check_vars" params="actionType,gameType,g540_v1,g540_v2,g540_v3,g540_v4,luckyNo,luckyNoX">
											<actions>
												<action type="success">
													<if condition="code == 0">
														<then>
															<goto target="account"/>
														</then>
														<else>
															<dialog type="Info" title="Eroare" message="{0}" timeout="10" default="okay" mess-params="exception">
																<actions>
																	<action type="okay" title="OK">
																		<cancel/>
																	</action>
																</actions>
															</dialog>
														</else>
													</if>
												</action>
												<action type="error">
													<dialog type="Info" title="Eroare" message="A intervenit o eroare, va rugam sa incercati din nou" timeout="10" default="okay">
														<actions>
															<action type="okay" title="OK">
																<cancel/>
															</action>
														</actions>
													</dialog>
												</action>
											</actions>
										</online-request>
									</action>
								</actions>
							</dialog>
						</action>
					</actions>
				</dialog>
			</action>
			<action type="Prev" title="Inapoi">
				<goto target="choose_game"/>
			</action>
			<action type="Exit" title="Acasa">
				<goto target="exit"/>
			</action>
		</actions>
	</screen>

	<screen id="g540_v2" type="group" title="5/49 var 2">
		<fields>
			<text-field id="g540_v2" keyboard="any:[en]:upper:false" max-len="17" message="Numere alese" title="Varianta B">
				<validator type="regex">
					<rules>
						<rule regex="^([1-9]|[1-3][0-9]|40)[ ]([1-9]|[1-3][0-9]|40)[ ]([1-9]|[1-3][0-9]|40)[ ]([1-9]|[1-3][0-9]|40)[ ]([1-9]|[1-3][0-9]|40)$"/>
					</rules>
				</validator>
				<help>
					<![CDATA[<html>Introduceti numerele variantei B pentru jocul 5/40 separate de spatii]]>
				</help>
			</text-field>
		</fields>
		<actions>
			<action type="Next" title="Inainte">
				<dialog type="Info" title="Info" message="Doriti sa jucati si varianta C?" timeout="10" default="cancel" mess-params="name">
					<actions>
						<action type="okay" title="Da">
							<dialog type="Info" title="Info" message="Selectati metoda de introducere a numerelor" timeout="10" default="cancel" mess-params="name">
								<actions>
									<action type="okay" title="Manual">
										<goto target="g540_v3"/>
									</action>
									<action type="cancel" title="Quick Pick">
										<set key="varianta" value="g540_v3"/>
										<set key="actionType" value="getVar"/>
										<online-request type="default" function="get_var" params="actionType,gameType,varianta">
											<actions>
												<action type="success">
													<if condition="code == 0">
														<then>
															<goto target="g540_v3"/>
														</then>
														<else>
															<dialog type="Info" title="Eroare" message="{0}" timeout="10" default="okay" mess-params="exception">
																<actions>
																	<action type="okay" title="OK">
																		<cancel/>
																	</action>
																</actions>
															</dialog>
														</else>
													</if>
												</action>
												<action type="error">
													<dialog type="Info" title="Eroare" message="A intervenit o eroare, va rugam sa incercati din nou" timeout="10" default="okay">
														<actions>
															<action type="okay" title="OK">
																<cancel/>
															</action>
														</actions>
													</dialog>
												</action>
											</actions>
										</online-request>
									</action>
								</actions>
							</dialog>
						</action>
						<action type="cancel" title="Nu">
							<dialog type="Info" title="Info" message="Doriti sa jucati si numar noroc?" timeout="10" default="cancel" mess-params="name">
								<actions>
									<action type="okay" title="Da">
										<goto target="lucky_number"/>
									</action>
									<action type="cancel" title="Nu">
										<set key="actionType" value="checkVars"/>
										<set key="luckyNo" value=""/>
										<set key="luckyNoX" value=""/>
										<set key="g540_v3" value=""/>
										<set key="g540_v4" value=""/>
										<online-request type="default" function="check_vars" params="actionType,gameType,g540_v1,g540_v2,g540_v3,g540_v4,luckyNo,luckyNoX">
											<actions>
												<action type="success">
													<if condition="code == 0">
														<then>
															<goto target="account"/>
														</then>
														<else>
															<dialog type="Info" title="Eroare" message="{0}" timeout="10" default="okay" mess-params="exception">
																<actions>
																	<action type="okay" title="OK">
																		<cancel/>
																	</action>
																</actions>
															</dialog>
														</else>
													</if>
												</action>
												<action type="error">
													<dialog type="Info" title="Eroare" message="A intervenit o eroare, va rugam sa incercati din nou" timeout="10" default="okay">
														<actions>
															<action type="okay" title="OK">
																<cancel/>
															</action>
														</actions>
													</dialog>
												</action>
											</actions>
										</online-request>
									</action>
								</actions>
							</dialog>
						</action>
					</actions>
				</dialog>
			</action>
			<action type="Prev" title="Inapoi">
				<goto target="g540_v1"/>
			</action>
			<action type="Exit" title="Acasa">
				<goto target="exit"/>
			</action>
		</actions>
	</screen>

	<screen id="g540_v3" type="group" title="5/49 var 3">
		<fields>
			<text-field id="g540_v3" keyboard="any:[en]:upper:false" max-len="17" message="Numere alese" title="Varianta C">
				<validator type="regex">
					<rules>
						<rule regex="^([1-9]|[1-3][0-9]|40)[ ]([1-9]|[1-3][0-9]|40)[ ]([1-9]|[1-3][0-9]|40)[ ]([1-9]|[1-3][0-9]|40)[ ]([1-9]|[1-3][0-9]|40)$"/>
					</rules>
				</validator>
				<help>
					<![CDATA[<html>Introduceti numerele variantei C pentru jocul 5/40 separate de spatii]]>
				</help>
			</text-field>
		</fields>
		<actions>
			<action type="Next" title="Inainte">
				<dialog type="Info" title="Info" message="Doriti sa jucati si varianta D?" timeout="10" default="cancel" mess-params="name">
					<actions>
						<action type="okay" title="Da">
							<dialog type="Info" title="Info" message="Selectati metoda de introducere a numerelor" timeout="10" default="cancel" mess-params="name">
								<actions>
									<action type="okay" title="Manual">
										<goto target="g540_v4"/>
									</action>
									<action type="cancel" title="Quick Pick">
										<set key="varianta" value="g540_v4"/>
										<set key="actionType" value="getVar"/>
										<online-request type="default" function="get_var" params="actionType,gameType,varianta">
											<actions>
												<action type="success">
													<if condition="code == 0">
														<then>
															<goto target="g540_v4"/>
														</then>
														<else>
															<dialog type="Info" title="Eroare" message="{0}" timeout="10" default="okay" mess-params="exception">
																<actions>
																	<action type="okay" title="OK">
																		<cancel/>
																	</action>
																</actions>
															</dialog>
														</else>
													</if>
												</action>
												<action type="error">
													<dialog type="Info" title="Eroare" message="A intervenit o eroare, va rugam sa incercati din nou" timeout="10" default="okay">
														<actions>
															<action type="okay" title="OK">
																<cancel/>
															</action>
														</actions>
													</dialog>
												</action>
											</actions>
										</online-request>
									</action>
								</actions>
							</dialog>
						</action>
						<action type="cancel" title="Nu">
							<dialog type="Info" title="Info" message="Doriti sa jucati si numar noroc?" timeout="10" default="cancel" mess-params="name">
								<actions>
									<action type="okay" title="Da">
										<goto target="lucky_number"/>
									</action>
									<action type="cancel" title="Nu">
										<set key="actionType" value="checkVars"/>
										<set key="luckyNo" value=""/>
										<set key="luckyNoX" value=""/>
										<set key="g540_v4" value=""/>
										<online-request type="default" function="check_vars" params="actionType,gameType,g540_v1,g540_v2,g540_v3,g540_v4,luckyNo,luckyNoX">
											<actions>
												<action type="success">
													<if condition="code == 0">
														<then>
															<goto target="account"/>
														</then>
														<else>
															<dialog type="Info" title="Eroare" message="{0}" timeout="10" default="okay" mess-params="exception">
																<actions>
																	<action type="okay" title="OK">
																		<cancel/>
																	</action>
																</actions>
															</dialog>
														</else>
													</if>
												</action>
												<action type="error">
													<dialog type="Info" title="Eroare" message="A intervenit o eroare, va rugam sa incercati din nou" timeout="10" default="okay">
														<actions>
															<action type="okay" title="OK">
																<cancel/>
															</action>
														</actions>
													</dialog>
												</action>
											</actions>
										</online-request>
									</action>
								</actions>
							</dialog>
						</action>
					</actions>
				</dialog>
			</action>
			<action type="Prev" title="Inapoi">
				<goto target="g540_v2"/>
			</action>
			<action type="Exit" title="Acasa">
				<goto target="exit"/>
			</action>
		</actions>
	</screen>

	<screen id="g540_v4" type="group" title="5/49 var 4">
		<fields>
			<text-field id="g540_v4" keyboard="any:[en]:upper:false" max-len="17" message="Numere alese" title="Varianta D">
				<validator type="regex">
					<rules>
						<rule regex="^([1-9]|[1-3][0-9]|40)[ ]([1-9]|[1-3][0-9]|40)[ ]([1-9]|[1-3][0-9]|40)[ ]([1-9]|[1-3][0-9]|40)[ ]([1-9]|[1-3][0-9]|40)$"/>
					</rules>
				</validator>
				<help>
					<![CDATA[<html>Introduceti numerele variantei D pentru jocul 5/40 separate de spatii]]>
				</help>
			</text-field>
		</fields>
		<actions>
			<action type="Next" title="Inainte">
				<dialog type="Info" title="Info" message="Doriti sa jucati si numar noroc?" timeout="10" default="cancel" mess-params="name">
					<actions>
						<action type="okay" title="Da">
							<goto target="lucky_number"/>
						</action>
						<action type="cancel" title="Nu">
							<set key="actionType" value="checkVars"/>
							<set key="luckyNo" value=""/>
							<set key="luckyNoX" value=""/>
							<online-request type="default" function="check_vars" params="actionType,gameType,g540_v1,g540_v2,g540_v3,g540_v4,luckyNo,luckyNoX">
								<actions>
									<action type="success">
										<if condition="code == 0">
											<then>
												<goto target="account"/>
											</then>
											<else>
												<dialog type="Info" title="Eroare" message="{0}" timeout="10" default="okay" mess-params="exception">
													<actions>
														<action type="okay" title="OK">
															<cancel/>
														</action>
													</actions>
												</dialog>
											</else>
										</if>
									</action>
									<action type="error">
										<dialog type="Info" title="Eroare" message="A intervenit o eroare, va rugam sa incercati din nou" timeout="10" default="okay">
											<actions>
												<action type="okay" title="OK">
													<cancel/>
												</action>
											</actions>
										</dialog>
									</action>
								</actions>
							</online-request>
						</action>
					</actions>
				</dialog>
			</action>
			<action type="Prev" title="Inapoi">
				<goto target="g540_v3"/>
			</action>
			<action type="Exit" title="Acasa">
				<goto target="exit"/>
			</action>
		</actions>
	</screen>

	<screen id="gjok_v1" type="group" title="Joker var 1">
		<fields>
			<text-field id="gjok_v1" keyboard="any:[en]:upper:false" max-len="17" message="Numere alese" title="Varianta A">
				<validator type="regex">
					<rules>
						<rule regex="^([1-9]|[1-3][0-9]|4[0-5])[ ]([1-9]|[1-3][0-9]|4[0-5])[ ]([1-9]|[1-3][0-9]|4[0-5])[ ]([1-9]|[1-3][0-9]|4[0-5])[ ]([1-9]|[1-3][0-9]|4[0-5])$"/>
					</rules>
				</validator>
				<help>
					<![CDATA[<html>Introduceti numerele variantei A pentru jocul Joker separate de spatii]]>
				</help>
			</text-field>
			<selector-field id="gjok_v1_X" message="" title="Extra">
				<items>
					<item title="1" value="1"/>
					<item title="2" value="2"/>
					<item title="3" value="3"/>
					<item title="4" value="4"/>
					<item title="5" value="5"/>
					<item title="6" value="6"/>
					<item title="7" value="7"/>
					<item title="8" value="8"/>
					<item title="9" value="9"/>
					<item title="10" value="10"/>
					<item title="11" value="11"/>
					<item title="12" value="12"/>
					<item title="13" value="13"/>
					<item title="14" value="14"/>
					<item title="15" value="15"/>
					<item title="16" value="16"/>
					<item title="17" value="17"/>
					<item title="18" value="18"/>
					<item title="19" value="19"/>
					<item title="20" value="20"/>
				</items>
			</selector-field>
		</fields>
		<actions>
			<action type="Next" title="Inainte">
				<dialog type="Info" title="Info" message="Doriti sa jucati si varianta B?" timeout="10" default="cancel" mess-params="name">
					<actions>
						<action type="okay" title="Da">
							<dialog type="Info" title="Info" message="Selectati metoda de introducere a numerelor" timeout="10" default="cancel" mess-params="name">
								<actions>
									<action type="okay" title="Manual">
										<goto target="gjok_v2"/>
									</action>
									<action type="cancel" title="Quick Pick">
										<set key="varianta" value="gjok_v2"/>
										<set key="actionType" value="getVar"/>
										<online-request type="default" function="get_var" params="actionType,gameType,varianta">
											<actions>
												<action type="success">
													<if condition="code == 0">
														<then>
															<goto target="gjok_v2"/>
														</then>
														<else>
															<dialog type="Info" title="Eroare" message="{0}" timeout="10" default="okay" mess-params="exception">
																<actions>
																	<action type="okay" title="OK">
																		<cancel/>
																	</action>
																</actions>
															</dialog>
														</else>
													</if>
												</action>
												<action type="error">
													<dialog type="Info" title="Eroare" message="A intervenit o eroare, va rugam sa incercati din nou" timeout="10" default="okay">
														<actions>
															<action type="okay" title="OK">
																<cancel/>
															</action>
														</actions>
													</dialog>
												</action>
											</actions>
										</online-request>
									</action>
								</actions>
							</dialog>
						</action>
						<action type="cancel" title="Nu">
							<dialog type="Info" title="Info" message="Doriti sa jucati si numar noroc?" timeout="10" default="cancel" mess-params="name">
								<actions>
									<action type="okay" title="Da">
										<goto target="lucky_number"/>
									</action>
									<action type="cancel" title="Nu">
										<set key="actionType" value="checkVars"/>
										<set key="luckyNo" value=""/>
										<set key="luckyNoX" value=""/>
										<set key="gjok_v2" value=""/>
										<set key="gjok_v2_X" value=""/>
										<online-request type="default" function="check_vars" params="actionType,gameType,gjok_v1,gjok_v2,gjok_v1_X,gjok_v2_X,luckyNo,luckyNoX">
											<actions>
												<action type="success">
													<if condition="code == 0">
														<then>
															<goto target="account"/>
														</then>
														<else>
															<dialog type="Info" title="Eroare" message="{0}" timeout="10" default="okay" mess-params="exception">
																<actions>
																	<action type="okay" title="OK">
																		<cancel/>
																	</action>
																</actions>
															</dialog>
														</else>
													</if>
												</action>
												<action type="error">
													<dialog type="Info" title="Eroare" message="A intervenit o eroare, va rugam sa incercati din nou" timeout="10" default="okay">
														<actions>
															<action type="okay" title="OK">
																<cancel/>
															</action>
														</actions>
													</dialog>
												</action>
											</actions>
										</online-request>
									</action>
								</actions>
							</dialog>
						</action>
					</actions>
				</dialog>
			</action>
			<action type="Prev" title="Inapoi">
				<goto target="choose_game"/>
			</action>
			<action type="Exit" title="Acasa">
				<goto target="exit"/>
			</action>
		</actions>
	</screen>

	<screen id="gjok_v2" type="group" title="Joker var 2">
		<fields>
			<text-field id="gjok_v2" keyboard="any:[en]:upper:false" max-len="17" message="Numere alese" title="Varianta B">
				<validator type="regex">
					<rules>
						<rule regex="^([1-9]|[1-3][0-9]|4[0-5])[ ]([1-9]|[1-3][0-9]|4[0-5])[ ]([1-9]|[1-3][0-9]|4[0-5])[ ]([1-9]|[1-3][0-9]|4[0-5])[ ]([1-9]|[1-3][0-9]|4[0-5])$"/>
					</rules>
				</validator>
				<help>
					<![CDATA[<html>Introduceti numerele variantei B pentru jocul Joker separate de spatii]]>
				</help>
			</text-field>
			<selector-field id="gjok_v2_X" message="" title="Extra">
				<items>
					<item title="1" value="1"/>
					<item title="2" value="2"/>
					<item title="3" value="3"/>
					<item title="4" value="4"/>
					<item title="5" value="5"/>
					<item title="6" value="6"/>
					<item title="7" value="7"/>
					<item title="8" value="8"/>
					<item title="9" value="9"/>
					<item title="10" value="10"/>
					<item title="11" value="11"/>
					<item title="12" value="12"/>
					<item title="13" value="13"/>
					<item title="14" value="14"/>
					<item title="15" value="15"/>
					<item title="16" value="16"/>
					<item title="17" value="17"/>
					<item title="18" value="18"/>
					<item title="19" value="19"/>
					<item title="20" value="20"/>
				</items>
			</selector-field>
		</fields>
		<actions>
			<action type="Next" title="Inainte">
				<dialog type="Info" title="Info" message="Doriti sa jucati si numar noroc?" timeout="10" default="cancel" mess-params="name">
					<actions>
						<action type="okay" title="Da">
							<goto target="lucky_number"/>
						</action>
						<action type="cancel" title="Nu">
							<set key="actionType" value="checkVars"/>
							<set key="luckyNo" value=""/>
							<set key="luckyNoX" value=""/>
							<online-request type="default" function="check_vars" params="actionType,gameType,gjok_v1,gjok_v2,gjok_v1_X,gjok_v2_X,luckyNo,luckyNoX">
								<actions>
									<action type="success">
										<if condition="code == 0">
											<then>
												<goto target="account"/>
											</then>
											<else>
												<dialog type="Info" title="Eroare" message="{0}" timeout="10" default="okay" mess-params="exception">
													<actions>
														<action type="okay" title="OK">
															<cancel/>
														</action>
													</actions>
												</dialog>
											</else>
										</if>
									</action>
									<action type="error">
										<dialog type="Info" title="Eroare" message="A intervenit o eroare, va rugam sa incercati din nou" timeout="10" default="okay">
											<actions>
												<action type="okay" title="OK">
													<cancel/>
												</action>
											</actions>
										</dialog>
									</action>
								</actions>
							</online-request>
						</action>
					</actions>
				</dialog>
			</action>
			<action type="Prev" title="Inapoi">
				<goto target="choose_game"/>
			</action>
			<action type="Exit" title="Acasa">
				<goto target="exit"/>
			</action>
		</actions>
	</screen>

	<screen id="lucky_number" type="selector/image" title="Variante noroc">
		<fields>
			<selector-field id="luckyNo" title="Numere noroc">
				<items type="static">
					<item value="1" title="1" image="loto_1.png"/>
					<item value="2" title="2" image="loto_2.png"/>
					<item value="3" title="3" image="loto_3.png"/>
					<item value="4" title="4" image="loto_4.png"/>
					<item value="5" title="5" image="loto_5.png"/>
					<item value="6" title="6" image="loto_6.png"/>
					<item value="7" title="7" image="loto_7.png"/>
					<item value="8" title="8" image="loto_8.png"/>
				</items>
			</selector-field>
		</fields>
		<actions>
			<action type="Next" title="Inainte">
				<dialog type="Info" title="Info" message="Doriti sa jucati si multiplicator?" timeout="10" default="cancel" mess-params="name">
					<actions>
						<action type="okay" title="Da">
							<goto target="lucky_numberX"/>
						</action>
						<action type="cancel" title="Nu">
							<set key="actionType" value="checkVars"/>
							<set key="luckyNoX" value=""/>
							<if condition="is-null g649_v1"><then><set key="g649_v1" value=""/></then></if>
							<if condition="is-null g649_v2"><then><set key="g649_v2" value=""/></then></if>
							<if condition="is-null g649_v3"><then><set key="g649_v3" value=""/></then></if>
							<if condition="is-null g540_v1"><then><set key="g540_v1" value=""/></then></if>
							<if condition="is-null g540_v2"><then><set key="g540_v2" value=""/></then></if>
							<if condition="is-null g540_v3"><then><set key="g540_v3" value=""/></then></if>
							<if condition="is-null g540_v4"><then><set key="g540_v4" value=""/></then></if>
							<if condition="is-null gjok_v1"><then><set key="gjok_v1" value=""/></then></if>
							<if condition="is-null gjok_v1_X"><then><set key="gjok_v1_X" value=""/></then></if>
							<if condition="is-null gjok_v2"><then><set key="gjok_v2" value=""/></then></if>
							<if condition="is-null gjok_v2_X"><then><set key="gjok_v2_X" value=""/></then></if>
							<online-request type="default" function="check_vars" params="actionType,gameType,g649_v1,g649_v2,g649_v3,g540_v1,g540_v2,g540_v3,g540_v4,gjok_v1,gjok_v1_X,gjok_v2,gjok_v2_X,luckyNo,luckyNoX">
								<actions>
									<action type="success">
										<if condition="code == 0">
											<then>
												<goto target="account"/>
											</then>
											<else>
												<dialog type="Info" title="Eroare" message="{0}" timeout="10" default="okay" mess-params="exception">
													<actions>
														<action type="okay" title="OK">
															<cancel/>
														</action>
													</actions>
												</dialog>
											</else>
										</if>
									</action>
									<action type="error">
										<dialog type="Info" title="Eroare" message="A intervenit o eroare, va rugam sa incercati din nou" timeout="10" default="okay">
											<actions>
												<action type="okay" title="OK">
													<cancel/>
												</action>
											</actions>
										</dialog>
									</action>
								</actions>
							</online-request>
						</action>
					</actions>
				</dialog>
			</action>
			<action type="Prev" title="Inapoi">
				<goto target="choose_game"/>
			</action>
			<action type="Exit" title="Acasa">
				<goto target="exit"/>
			</action>
		</actions>
	</screen>

	<screen id="lucky_numberX" type="selector/image" title="Variante noroc">
		<fields>
			<selector-field id="luckyNoX" message="" title="Multiplicator">
				<items type="static">
					<item value="5" title="x5" image="loto_x5.png"/>
					<item value="8" title="x8" image="loto_x8.png"/>
					<item value="10" title="x10" image="loto_x10.png"/>
					<item value="20" title="x20" image="loto_x20.png"/>
				</items>
			</selector-field>
		</fields>
		<actions>
			<action type="Next" title="Inainte">
				<set key="actionType" value="checkVars"/>
				<if condition="is-null g649_v1"><then><set key="g649_v1" value=""/></then></if>
				<if condition="is-null g649_v2"><then><set key="g649_v2" value=""/></then></if>
				<if condition="is-null g649_v3"><then><set key="g649_v3" value=""/></then></if>
				<if condition="is-null g540_v1"><then><set key="g540_v1" value=""/></then></if>
				<if condition="is-null g540_v2"><then><set key="g540_v2" value=""/></then></if>
				<if condition="is-null g540_v3"><then><set key="g540_v3" value=""/></then></if>
				<if condition="is-null g540_v4"><then><set key="g540_v4" value=""/></then></if>
				<if condition="is-null gjok_v1"><then><set key="gjok_v1" value=""/></then></if>
				<if condition="is-null gjok_v1_X"><then><set key="gjok_v1_X" value=""/></then></if>
				<if condition="is-null gjok_v2"><then><set key="gjok_v2" value=""/></then></if>
				<if condition="is-null gjok_v2_X"><then><set key="gjok_v2_X" value=""/></then></if>
				<online-request type="default" function="check_vars" params="actionType,gameType,g649_v1,g649_v2,g649_v3,g540_v1,g540_v2,g540_v3,g540_v4,gjok_v1,gjok_v1_X,gjok_v2,gjok_v2_X,luckyNo,luckyNoX">
					<actions>
						<action type="success">
							<if condition="code == 0">
								<then>
									<goto target="account"/>
								</then>
								<else>
									<dialog type="Info" title="Eroare" message="{0}" timeout="10" default="okay" mess-params="exception">
										<actions>
											<action type="okay" title="OK">
												<cancel/>
											</action>
										</actions>
									</dialog>
								</else>
							</if>
						</action>
						<action type="error">
							<dialog type="Info" title="Eroare" message="A intervenit o eroare, va rugam sa incercati din nou" timeout="10" default="okay">
								<actions>
									<action type="okay" title="OK">
										<cancel/>
									</action>
								</actions>
							</dialog>
						</action>
					</actions>
				</online-request>
			</action>
			<action type="Prev" title="Inapoi">
				<goto target="choose_game"/>
			</action>
			<action type="Exit" title="Acasa">
				<goto target="exit"/>
			</action>
		</actions>
	</screen>

	<screen id="account" type="numeric" title="Telefon">
		<fields>
			<text-field id="id1" keyboard="any:[en,symb]:upper:true" max-len="10" title="Telefon">
				<validator type="regex">
					<rules>
						<rule regex="^07(\d{8})$"/>
					</rules>
				</validator>
				<formatter type="regex">
					<rules default="**** *** ***"/>
				</formatter>
				<help>
					<![CDATA[<html>Introduceti numarul de telefon.]]>
				</help>
			</text-field>
		</fields>
		<actions>
			<action type="Next" title="Inainte">
				<set key="summ" value="1"/>
				<goto target="confirm"/>
			</action>
			<action type="Prev" title="Inapoi">
				<goto target="choose_game"/>
			</action>
			<action type="Exit" title="Pagina principala">
				<goto target="exit"/>
			</action>
		</actions>
	</screen>

	<screen id="confirm" type="confirm" title="Confirmare">
<!--		scos variabile game, telefon  pentru ca nu incap -->
		<fields list="var1,var2,var3,var4,var1X,var2X,lucky,price,report,reportNoroc,gameDate"/>
		<actions>
			<action type="Next" title="Achita">
				<set-sum from="price" type="units"/>
				<dialog type="Info" title="Info" message="Sunteti de acord cu prelucrarea datelor cu caracter personal in scopuri de marketing?" timeout="10" default="cancel" mess-params="name">
					<actions>
						<action type="okay" title="Da">
							<set key="gdpr" value="1"/>
							<goto target="pay"/>
						</action>
						<action type="cancel" title="Nu">
							<set key="gdpr" value="0"/>
							<goto target="pay"/>
						</action>
					</actions>
				</dialog>
			</action>
			<action type="Prev" title="Inapoi">
				<goto target="account"/>
			</action>
			<action type="Exit" title="Acasa">
				<goto target="exit"/>
			</action>
		</actions>
	</screen>
</scenario>
