05/09/2002 23:45:25

Benjamí Vidiella Gironès
bvidiell@pie.xtec.es
----------------------------------------------------------------------
Book "C:\Signe2\Signe77.tbk"
----------------------------------------------------------------------
to handle IniciaVariables
	system vtipus
	system mtitol
	system mtexte
	system mgrafic
	system mparaula
	system vnumvideo
	system mcarrega
	system vnumsigne
	system vnumdibu	
	system mmester
	sysSuspend=false
	sysfontFace="Arial"
	sysFontSize="12"
	sysFontStyle="regular"
	
end	

to handle enterApplication
	forward
	send reader
end

to handle enterBook
	send IniciaVariables
end	

to handle reader
	state of mainWindow = maximized
	forward
end

to handle menuItemSelected mNom, mAlias
	system mparaula
	sysSuspend=false
	
	forward to system
end	menuItemSelected

to handle exit
	request "           Segur que voleu sortir?" with "SI" or "NO"
	if it is "SI" then
	
	sysSuspendMessages = true

	forward
	end if
end exit

to handle lectura

	system vtipus
	system mgrafic
	close viewer "histories"
	close viewer "videos"
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	if text of recordField "texte" of page frase is not null
	if vtipus=anima
	request "Quin tipus de lectura vols?" with "PICTOGRAMES" or "FILMACIONS"
	
			conditions
			when It is "PICTOGRAMES"
			
	sysCursor=4

	clear text of recordField "primerg1" of this page
	clear text of recordField "primer11" of this page
	un1=text of recordfield "texte" of this page
	step ctr from 1 to wordCount(un1)
	un= word ctr of un1
	show group visual1 of this background
	if keyState(keyEscape) is "Up"
	select word ctr of text of recordfield "texte" of this page
	send bold
	strokeColor of word ctr of text of recordfield "texte" of this page = blue
	fontStyle of text of recordfield "texte" of this page = null
	insert graphic bitmap un into text of RecordField "primerg1" of this page

	if text of RecordField "primerg1" of this page is not null
	send continue
	else
		put first char of un into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if

		
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if un is in meu
	put meu into text of recordField "solucio" of this page
	search in RecordField "solucio" for un as word
	if sysErrorNumber = 641
	continue
	else 
	put word 1 of meu into meu1
	end if
	end if
	end step
	insert graphic bitmap meu1 into text of RecordField primerg1 of this page
	clear meu1
	end if
	put un into text of RecordField primer11 of this page
	select word ctr of text of recordfield "texte" of this page
	send normal
	pause 150
	clear text of recordField "primer11" of this page
	clear text of recordField "primerg1" of this page
	else
	fontStyle of text of recordfield "texte" of this page = null
	strokeColor of text of recordfield "texte" of this page = black
	hide group visual1 of this background
	sysCursor=1
	break
	end if
	end step
	fontStyle of text of recordfield "texte" of this page = null
	strokeColor of text of recordfield "texte" of this page = black
	hide group visual1 of this background
	
	when It is "FILMACIONS"
	
	sysCursor=4

	show group visual of this background
	show recordField "primer1" of this page
	clear text of recordField "primerg1" of this page
	clear text of recordField "primer11" of this page
	clear text of recordField "primer1" of this page
	un1=text of recordfield "texte" of this page
	step ctr from 1 to wordCount(un1)
	un= word ctr of un1

		put first char of un into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if

	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if un is in meu
	put meu into text of recordField "solucio" of this page
	search in RecordField "solucio" for un as word
	if sysErrorNumber = 641
	continue
	else 
	put word 1 of meu into meu1
	end if
	end if
	end step

	if keyState(keyEscape) is "Up"
	select word ctr of text of recordfield "texte" of this page
	send bold
	strokeColor of word ctr of text of recordfield "texte" of this page = blue
	clear text of recordField "primer1" of this page
	put un into text of RecordField primer1 of this page
	mmOpen clip un
	if sysErrorNumber is not 8293
	mmPlay clip un in stage "lectura" of this background wait
	mmClose clip un
	clear un
	clear meu1
	else
	put meu1 into un
	mmOpen clip un
	mmPlay clip un in stage "lectura" of this background wait
	mmClose clip un
	mmclose meu1
	clear meu1
	clear un
	end
	select word ctr of text of recordfield "texte" of this page
	send normal
	pause 40
	else
	fontStyle of text of recordfield "texte" of this page = null
	strokeColor of text of recordfield "texte" of this page = black
	mmClose clip un
	hide group visual of this background
	break
	sysCursor=1
	end if
	end step
	fontStyle of text of recordfield "texte" of this page = null
	strokeColor of text of recordfield "texte" of this page = black
	hide group visual of this background
	end conditions

	else
	sysCursor=4

	sysCursor=4

	clear text of recordField "primerg1" of this page
	clear text of recordField "primer11" of this page
	un1=text of recordfield "texte" of this page
	step ctr from 1 to wordCount(un1)
	un= word ctr of un1
	show group visual1 of this background
	if keyState(keyEscape) is "Up"
	select word ctr of text of recordfield "texte" of this page
	send bold
	strokeColor of word ctr of text of recordfield "texte" of this page = blue
	fontStyle of text of recordfield "texte" of this page = null
	insert graphic bitmap un into text of RecordField "primerg1" of this page

	if text of RecordField "primerg1" of this page is not null
	send continue
	else
		put first char of un into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if		
		
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if un is in meu
	put meu into text of recordField "solucio" of this page
	search in RecordField "solucio" for un as word
	if sysErrorNumber = 641
	continue
	else 
	put word 1 of meu into meu1
	end if
	end if
	end step
	insert graphic bitmap meu1 into text of RecordField "primerg1" of this page
	clear meu1
	end if
	put un into text of RecordField "primer11" of this page
	select word ctr of text of recordfield "texte" of this page
	send normal
	pause 150
	clear text of recordField "primer11" of this page
	clear text of recordField "primerg1" of this page
	else
	fontStyle of text of recordfield "texte" of this page = null
	strokeColor of text of recordfield "texte" of this page = black
	hide group visual1 of this background
	sysCursor=1
	break
	end if
	end step
	fontStyle of text of recordfield "texte" of this page = null
	strokeColor of text of recordfield "texte" of this page = black
	hide group visual1 of this background
	end if				

	else
	request "No hi ha cap text"
	end if

	mmClose clip un
	mmClose clip meu1
	sysCursor=1
	focus=recordfield "titol" of this page
end

	to handle formatlletra
	linkDLL "TBDLG.DLL"
		STRING chooseFontDlg(STRING,STRING)
	end linkDLL
	get chooseFontDlg("Arial,10,0,0,0,regular,normal", \
		"trueTypeOnly")
	if It is null
		break
	else
		fontFace of self = item 1 of It
		fontSize of self = item 2 of It	
		fontStyle of self= item 3 of It
		
				
		sysfontFace=item 1 of It
		sysfontSize=item 2 of It
		sysfontStyle=item 3 of It
		
		fontFace of text of recordfield "texte" of page "frase"= item 1 of It
		fontSize of text of recordfield "texte" of page "frase" = "11"
		
		fontFace of text of recordfield "titol" of page "frase"= item 1 of It
		fontSize of text of recordfield "titol" of page "frase" = "12"

		fontFace of text of recordfield "para1" = item 1 of It
		fontSize of text of recordfield "para1" = item 2 of It
		fontStyle of text of recordfield "para1" = item 3 of It
		
		fontFace of text of recordfield "para2" = item 1 of It
		fontSize of text of recordfield "para2" = item 2 of It
		fontStyle of text of recordfield "para2" = item 3 of It
		
		fontFace of text of recordfield "para3" = item 1 of It
		fontSize of text of recordfield "para3" = item 2 of It
		fontStyle of text of recordfield "para3" = item 3 of It
		
		fontFace of text of recordfield "para4" = item 1 of It
		fontSize of text of recordfield "para4" = item 2 of It
		fontStyle of text of recordfield "para4" = item 3 of It
		
		fontFace of text of recordfield "para5" = item 1 of It
		fontSize of text of recordfield "para5" = item 2 of It
		fontStyle of text of recordfield "para5" = item 3 of It
		
		fontFace of text of recordfield "para6" = item 1 of It
		fontSize of text of recordfield "para6" = item 2 of It
		fontStyle of text of recordfield "para6" = item 3 of It
		
		fontFace of text of recordfield "para7" = item 1 of It
		fontSize of text of recordfield "para7" = item 2 of It
		fontStyle of text of recordfield "para7" = item 3 of It
		
		fontFace of text of recordfield "para8" = item 1 of It
		fontSize of text of recordfield "para8" = item 2 of It
		fontStyle of text of recordfield "para8" = item 3 of It	
	
		fontFace of text of recordfield "para9" = item 1 of It
		fontSize of text of recordfield "para9" = item 2 of It
		fontStyle of text of recordfield "para9" = item 3 of It
		
		fontFace of text of recordfield "para10" = item 1 of It
		fontSize of text of recordfield "para10" = item 2 of It
		fontStyle of text of recordfield "para10" = item 3 of It
		
		fontFace of text of recordfield "para11" = item 1 of It
		fontSize of text of recordfield "para11" = item 2 of It
		fontStyle of text of recordfield "para11" = item 3 of It
		
		fontFace of text of recordfield "para12" = item 1 of It
		fontSize of text of recordfield "para12" = item 2 of It
		fontStyle of text of recordfield "para12" = item 3 of It
		
		fontFace of text of recordfield "para13" = item 1 of It
		fontSize of text of recordfield "para13" = item 2 of It
		fontStyle of text of recordfield "para13" = item 3 of It
		
		fontFace of text of recordfield "para14" = item 1 of It
		fontSize of text of recordfield "para14" = item 2 of It
		fontStyle of text of recordfield "para14" = item 3 of It
		
		fontFace of text of recordfield "para15" = item 1 of It
		fontSize of text of recordfield "para15" = item 2 of It
		fontStyle of text of recordfield "para15" = item 3 of It
		
		fontFace of text of recordfield "para16" = item 1 of It
		fontSize of text of recordfield "para16" = item 2 of It
		fontStyle of text of recordfield "para16" = item 3 of It	
		
		fontFace of text of recordfield "para17" = item 1 of It
		fontSize of text of recordfield "para17" = item 2 of It
		fontStyle of text of recordfield "para17" = item 3 of It
		
		fontFace of text of recordfield "para18" = item 1 of It
		fontSize of text of recordfield "para18" = item 2 of It
		fontStyle of text of recordfield "para18" = item 3 of It
		
		fontFace of text of recordfield "para19" = item 1 of It
		fontSize of text of recordfield "para19" = item 2 of It
		fontStyle of text of recordfield "para19" = item 3 of It
		
		fontFace of text of recordfield "para20" = item 1 of It
		fontSize of text of recordfield "para20" = item 2 of It
		fontStyle of text of recordfield "para20" = item 3 of It
		
		fontFace of text of recordfield "para21" = item 1 of It
		fontSize of text of recordfield "para21" = item 2 of It
		fontStyle of text of recordfield "para21" = item 3 of It
		
		fontFace of text of recordfield "para22" = item 1 of It
		fontSize of text of recordfield "para22" = item 2 of It
		fontStyle of text of recordfield "para22" = item 3 of It
		
		fontFace of text of recordfield "para23" = item 1 of It
		fontSize of text of recordfield "para23" = item 2 of It
		fontStyle of text of recordfield "para23" = item 3 of It
		
		fontFace of text of recordfield "para24" = item 1 of It
		fontSize of text of recordfield "para24" = item 2 of It
		fontStyle of text of recordfield "para24" = item 3 of It	
	
		fontFace of text of recordfield "para25" = item 1 of It
		fontSize of text of recordfield "para25" = item 2 of It
		fontStyle of text of recordfield "para25" = item 3 of It
		
		fontFace of text of recordfield "para26" = item 1 of It
		fontSize of text of recordfield "para26" = item 2 of It
		fontStyle of text of recordfield "para26" = item 3 of It
		
		fontFace of text of recordfield "para27" = item 1 of It
		fontSize of text of recordfield "para27" = item 2 of It
		fontStyle of text of recordfield "para27" = item 3 of It
		
		fontFace of text of recordfield "para28" = item 1 of It
		fontSize of text of recordfield "para28" = item 2 of It
		fontStyle of text of recordfield "para28" = item 3 of It
		
		fontFace of text of recordfield "para29" = item 1 of It
		fontSize of text of recordfield "para29" = item 2 of It
		fontStyle of text of recordfield "para29" = item 3 of It
		
		fontFace of text of recordfield "para30" = item 1 of It
		fontSize of text of recordfield "para30" = item 2 of It
		fontStyle of text of recordfield "para30" = item 3 of It
		
		fontFace of text of recordfield "para31" = item 1 of It
		fontSize of text of recordfield "para31" = item 2 of It
		fontStyle of text of recordfield "para31" = item 3 of It
		
		fontFace of text of recordfield "para32" = item 1 of It
		fontSize of text of recordfield "para32" = item 2 of It
		fontStyle of text of recordfield "para32" = item 3 of It	
		
		fontFace of text of recordfield "para33" = item 1 of It
		fontSize of text of recordfield "para33" = item 2 of It
		fontStyle of text of recordfield "para33" = item 3 of It
		
		fontFace of text of recordfield "para34" = item 1 of It
		fontSize of text of recordfield "para34" = item 2 of It
		fontStyle of text of recordfield "para34" = item 3 of It
		
		fontFace of text of recordfield "para35" = item 1 of It
		fontSize of text of recordfield "para35" = item 2 of It
		fontStyle of text of recordfield "para35" = item 3 of It
		
		fontFace of text of recordfield "para36" = item 1 of It
		fontSize of text of recordfield "para36" = item 2 of It
		fontStyle of text of recordfield "para36" = item 3 of It
		
		fontFace of text of recordfield "para37" = item 1 of It
		fontSize of text of recordfield "para37" = item 2 of It
		fontStyle of text of recordfield "para37" = item 3 of It
		
		fontFace of text of recordfield "para38" = item 1 of It
		fontSize of text of recordfield "para38" = item 2 of It
		fontStyle of text of recordfield "para38" = item 3 of It
		
		fontFace of text of recordfield "para39" = item 1 of It
		fontSize of text of recordfield "para39" = item 2 of It
		fontStyle of text of recordfield "para39" = item 3 of It
		
		fontFace of text of recordfield "para40" = item 1 of It
		fontSize of text of recordfield "para40" = item 2 of It
		fontStyle of text of recordfield "para40" = item 3 of It
		
		fontFace of text of recordfield "para41" = item 1 of It
		fontSize of text of recordfield "para41" = item 2 of It
		fontStyle of text of recordfield "para41" = item 3 of It	
	
		fontFace of text of recordfield "para42" = item 1 of It
		fontSize of text of recordfield "para42" = item 2 of It
		fontStyle of text of recordfield "para42" = item 3 of It
		
	fontface of text of field "titol1" of page "mostra1"=sysfontFace
	put sysfontsize into suma
	suma1=suma+2
	fontSize of text of field "titol1" of page "mostra1"=suma1
	fontStyle of text of field "titol1" of page "mostra1"=underline

	end if
end
----------------------------------------------------------------------
sharedscript id 103 ("WID_WebField")
----------------------------------------------------------------------
notifyBefore ASYM_Reset pMode
	my _updated = FALSE
end

notifyBefore enterPage
	conditions
		when my ASYM_INET_RefreshMode = "once" AND NOT (my _updated = TRUE)
		when my ASYM_INET_RefreshMode = "enterPage"
			get ASYM_INET_Update() of self
			my _updated = TRUE
	end conditions
end

to handle ASYM_Trigger
	get ASYM_INET_Update() of self
end

to get ASYM_INET_Update
	local LOGICAL retVal

	if my ASYM_INET_RemoteHREF = NULL
		return retVal
	end

	sc = sysCursor
	sysCursor = 4

	----
	-- Determine the file where the retrieved data will be stored.
	----
	local_file = my ASYM_INET_LocalFileName
	local_dir = my ASYM_INET_CacheDir
	if local_file = NULL OR local_dir = NULL
		local_file = tempFileName()
	else
		if NOT ASYM_IsDirectory(local_dir)
			local_file = tempFileName()
		else
			local_file = addBackslash(local_dir) & local_file
		end
	end

	overwrite = TRUE

	----
	-- Copy the remote file to a local file.
	----
	gotRemoteFile = FALSE
	remote_href = ASYM_INET_RemoteHREF of self
	remote_SecureSocket = (ASYM_INET_SecureSocket of self = true)
	gotRemoteFile = ASYM_GetFile_URL(remote_href, local_file, \
	   overwrite, remote_SecureSocket)

	----
	-- Update the text of this field with the retrieved file's contents.
	----
	if gotRemoteFile
		if ASYM_IsFile(local_file)
			clear richText of self
			openFile local_file
			readFile local_file to EOF
			text of self = it
			closeFile local_file
			if (ASYM_INET_KeepCacheFile of self) <> TRUE
				linkDLL "tbfile32.dll"
					INT removeFile32(STRING)
				end linkDLL
				get removeFile32(local_File)
			end
		end
	end

	sysCursor = sc
	return retVal
end

to get tempFileName
	return ASYM_GetTempFile("~$")
end

to get addBackslash p
	v = p
	if last char of v <> "\"
		put "\" after v
	end
	return v
end
----------------------------------------------------------------------
sharedscript id 100 ("pagines")
----------------------------------------------------------------------
to handle enterPage
	system mtexte
	system mgrafic
	system mespai
	system mparaula
	system mmester
	nombrep=1
	step nombre from 1 to 42
	paraulap="para"&nombrep
	quadrep="parag"&nombrep
	clear text of recordField paraulap of this page
	clear text of recordField quadrep of this page
	nombrep=nombrep+1
	end step

	sysPageScroll= 0,0
	
	clear mgrafic
	clear meu1
	
	if this page is page "mostra1" of this book
	mtitol=text of recordField titol of page "frase"
	clear text of field "titol1" of page "mostra1"
	put mtitol into text of field "titol1" of page "mostra1"
	mparaula=1
	end if
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	mmester=mmester+42
	mmbenji=mmester
	nombre=1
	
	un1=text of recordfield "texte" of page "frase"
	step ctr from mparaula to mmbenji
	mgrafic= word ctr of un1
	if mgrafic is not null
	paraula=para&nombre
	put mgrafic into text of RecordField paraula of this page
	quadre=parag&nombre
	insert graphic bitmap mgrafic into text of RecordField quadre of this page
	nombre=nombre+1

	if text of RecordField quadre of this page is not null
	send continue
	else
		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	insert graphic bitmap meu1 into text of RecordField quadre of this page
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page
	end if
	clear mgrafic
	else 
	break
	end if
	end step
	sysCursor=1
end
----------------------------------------------------------------------
Button id 5 ("categoria") of Background id 7
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	
to handle buttonClick
	syscursor = 4
	go to page "catego"
	syscursor = 1
end	
----------------------------------------------------------------------
Button id 4 ("Mostrar") of Background id 7
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	

to handle buttonClick
	syscursor = 4
	close viewer "histories"
	close viewer "videos"
	if text of recordField "texte" of page "frase" is null 
	go to page "mostra1"
	else
		if text of recordField "texte" is not null
	
	search in recordField "texte" for ","by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	search in recordField "texte" for "("by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	search in recordField "texte" for ")"by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	search in recordField "texte" for ";"by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	search in recordField "texte" for "-"by case
	while "not found" is not in sysError
	send clear
	search again
	end while
		search in recordField "texte" for ":"by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	search in recordField "texte" for "!"by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	search in recordField "texte" for "CRLF"by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	
		go to page "mostra1"
		syscursor = 1
	end if
	end if
end	
----------------------------------------------------------------------
Button id 3 ("Acabar") of Background id 7
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	

to handle buttonClick
	send exit
end	

----------------------------------------------------------------------
Button id 2 ("frase") of Background id 7
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	

to handle buttonClick
	syscursor = 4
	clear text of recordField "titol" of page "frase"
	clear text of recordField "texte" of page "frase"
	go to page "frase"
	syscursor = 1
end	
----------------------------------------------------------------------
Button id 1 ("ajuda") of Background id 7
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	

to handle buttonClick
		sysCursor=4
		open viewer "ajuda"
		currentPage of viewer "ajuda" = page "ajuda"
		show viewer "ajuda"
		sysCursor=1
end
----------------------------------------------------------------------
Button id 0 ("gestio") of Background id 7
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	
to handle buttonClick
	syscursor = 4
	go to page "gestio"
	syscursor = 1
end	
----------------------------------------------------------------------
Page id 16 ("inicial") of Book "C:\Signe2\Signe77.tbk"
----------------------------------------------------------------------
to handle enterPage
	system vtipus
	vtipus=anima

	hide group "entrada" of this page
	show button "gestio" of this page
	show button "frase" of this page	
	forward
--  a la pagina	gestio s'oculten botons PICTO GIF i AVI
--  per carregar grups de filmacions i objectes
--  tot i que cal carregar de pocs en pocs
end	


----------------------------------------------------------------------
Field id 35 of Page id 16 (p. 1)
----------------------------------------------------------------------
-- This object has hyperlink properties
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	
----------------------------------------------------------------------
RecordField id 0 ("llista") of Background id 11
----------------------------------------------------------------------
notifyBefore enterPage
	system ARRAY STRING itemArray[]
	
	fill itemArray with my text in [textline] order
	set my selectedTextlines to 1
	set my scroll to 0
end enterPage

to handle buttonUp
	set text of recordfield "text" to selectedText
end buttonUp


to handle sortSelf
	local ARRAY dataArray[]
	local STRING sortedText
	sysCursor = 4
	-- put the textlines into an array
	fill dataArray with my text in [textline] order
	-- sort the array
	send quickSort dataArray
	-- convert the array back into textlines
	step i from 1 to dimensions(dataArray)
		put dataArray[i] & CRLF after sortedText
	end step
	-- get rid of trailing crlf's
	clear last char of sortedText
	clear last char of sortedText
	-- update the text
	set my text to sortedText
	sysCursor = default
end sortSelf

-- The next three handlers make up a Standard recursive QuickSort.
-- Keep in mind that arrays are passed by reference, not by value.
to handle quickSort fArray[] by reference
	system s_noSwap
	set s_noSwap to 0
    send quickSrt fArray, 1, dimensions ( fArray )
end quickSort

to handle quickSrt fArray[] by reference, lo, hi
    system  s_noSwap
    if hi > lo 
		send swap  fArray, lo, ((lo+hi) div 2)
		set lst to lo
		step i from (lo+1) to hi
        	if fArray[i] < fArray[lo] as text
        		increment lst
        		send swap fArray, lst, i
        	else
        		increment s_noswap
        	end if
        end step
        send swap fArray,lo,lst 
   		send quicksrt fArray, lo, lst-1
    	send quicksrt fArray, lst+1,hi
   	end if
end quickSrt

to handle swap fArray[] by reference, x, y
	local temp
	set temp to fArray[x]
	set fArray[x] to fArray[y]
	set fArray[y] to temp
end swap


-- use if inserting a single line. Will maintain sorted order
to handle insertLine newLine
	set my text to insertLineAux(my text,newLine)
end insertLine

-- inserts newLine into txt, maintaining sorted order.
-- works only if txt is already sorted.
to get insertLineAux txt,newLine
	if txt is null
		return newLine
	end if
	set start to 1  -- first textline
	set tlc to textlinecount(txt)
	set ending to tlc -- last textline
	local insertSpot
	while start <= ending 
		set midPoint to (start+ending) div 2 
		set middleLine to textline midPoint of txt
		conditions
		when newLine < middleLine as text
			-- start looking at values less than current midPoint
			set ending to midPoint-1
			set insertSpot to midPoint
		when newLine > middleLine as text
			-- start looking at values greater than current midPoint
			set start to midPoint+1
			set insertSpot to midPoint+1
		else
			-- the item already exists
			set insertSpot to midPoint
			break while
		end conditions
	end while
	if insertSpot > tlc
		put newLine before textline insertSpot of txt
	else
		put newLine&crlf before textline insertSpot of txt
	end if
	return txt
end insertLineAux


----------------------------------------------------------------------
Page id 17 ("Gestio") of Book "C:\Signe2\Signe77.tbk"
----------------------------------------------------------------------
to handle enterPage
	system vtipus
	system vnumvideo
	system vnumdibu
	system mcarrega
	hide button "AVI" of this page
	hide button "PICTO" of this page
	hide button "GIF" of this page
	restore menuBar
	disable menu "Llegir" at reader
	disable menu "Pàgina" at reader
	disable menu "Edició" at reader
	disable menu "Lletra" at reader
	disable menu "Categories" at reader
	disable menuItem "Editor de gràfics" at reader
--	disable menuItem "Editor de text bilingüe" at reader
	disable menuItem "Importar text" at reader
	disable menuItem "Imprimir el text" at reader
	disable menuItem "Imprimir la pàgina" at reader	

	if vtipus=anima
	mmOpen vnumvideo

	text of comboBox "llistat" of background "frase"= "                TRIA UN CONTE O UNA HISTÒRIA:"	
	enabled of button "pelicula" of page "frase" = false
	show stage "videos" of this page
	show group mmCOntrols of this page	
	
	clear text of field "item" of this page
	clear text of recordField "primerg1" of this page
	clear text of recordField "primer1" of this page
	mmClose all
	mmPlay clip signe2 in stage "videos" of this page
	mmPlay clip signe2p in stage "dibuix" of this page
	focus=field "item" of this page
	
	
	else
	hide stage "videos" of this page
	hide group mmCOntrols of this page
	clear text of field "item" of this page
	clear text of recordField "primerg1" of this page
	clear text of recordField "primer1" of this page



	end if
end	

to handle leavePage
	clear text of field "item" of this page
	clear text of recordField "primerg1" of this page
	clear text of recordField "primer1" of this page
	

	restore menuBar
	disable menu "Llegir" at reader	
	disable menu "Categories" at reader
	close viewer "videos"
	close viewer "histories"
	mmPlay clip signe2 in stage "videos" of this page
	mmPlay clip signe2p in stage "dibuix" of this page
	mmClose all
	forward
end




----------------------------------------------------------------------
Button id 126 ("PICTO") of Page id 17 (p. 2)
----------------------------------------------------------------------
to handle buttonClick
	system mpeli
		sysCursor=4
	clear text of recordField "primerg1" of this page
	clear text of recordField "primer1" of this page
	request "Per importar un grup de gràfics llegiu prèviament l'ajuda.Voleu continuar la importació?" with "SI" or "NO" or "Ajuda"

	conditions
	
			when It is "AJUDA"
	
		open viewer "ajuda"
		currentPage of viewer "ajuda" = page "ajuimportar"
		show viewer "ajuda"
		
			when It is "NO"
			sysCursor=1
			break
			when It is "SI"
			

	linkDll "tbdlg.dll"
		STRING OpenFileDlg(STRING,STRING,STRING,STRING,int)
	end linkDll
	
	strCaption = "Importar un text"
	strFilterList = ""
	
	push "Tots els fitxers (*.*),*.*" onto strFilterList
	push "TXT(.Txt),*.txt" onto strFilterList
	get OpenFileDlg(strCaption,"","",strFilterList,1)
	

	if (it is not null)
	dades=It
	OpenFile dades
	readFile dades for 24242
	closeFile dades
	dades=it
	put It into fselect
	 step i from 1 to itemCount(fselect)
	--Place chaque élément de la sélection tour à tour dans It
		pop fselect into vobra 
		search in RecordField "llista" for vobra as word
			
			if sysErrorNumber is not 641
			clear text of recordField "primerg1" of this page
			clear text of recordField "primer1" of this page
			insert graphic bitmap vobra after last word of text of recordField "primerg1" of page "gestio"
			put vobra after last word of text of recordField "primer1" of page "gestio"
			request "Vols canviar el gràfic" && vobra && "?" with "SI" or "NO"
		
			conditions

			when It is "No"
			
			continue
			
			when It is "SI"
			clear text of recordField "primerg1" of this page
			clear text of recordField "primer1" of this page
			send clear
			send clear
			mmclose all
			mmPlay clip signe2 in stage "videos" of this page
			mmPlay clip signe2p in stage "dibuix" of this page
			tres="7"&vobra
			export resource bitmap vobra as vmemoria&"."&"bmp"
			remove resource bitmap vobra of this book
			remove resource clip tres
			remove resource clip vobra
			import bitmap resource vobra&"."&"bmp" as vobra
			mdibu= "\signe2\dibuix\"&tres&"."&"gif"
			new clip from mdibu
			name of It = tres
			mpeli= "\signe2\videos\"&vobra&"."&"avi"
			new clip from mpeli
			name of It = vobra
			
			insert graphic bitmap vobra after last word of text of recordField "primerg1" of page "gestio"
			put vobra after last word of text of recordField "primer1" of page "gestio"
			
			if text of recordField "primerg1" of this page is null
			request "No ha trobat el dibuix" && vobra && "Vols triar-lo ara?" with "SI" or "NO"
	
				conditions
					when It is "NO"
					newLine = vobra
			send insertLine newLine to recordfield "llista" of this page
			clear text of recordField "primerg1" of this page
			clear text of recordField "primer1" of this page
			tres="7"&vobra
			import bitmap resource vmemoria&"."&"bmp" as vobra			
		
			mgrafic=vmemoria
			insert graphic bitmap vobra after last word of text of recordField "primerg1" of page "gestio"
			put vobra into text of recordField "primer1" of this page
			continue
				
					when It is "SI"
			
			linkDll "tbdlg.dll"
			STRING OpenFileDlg(STRING,STRING,STRING,STRING,int)
			end linkDll
			strCaption = "Trieu un fitxer gràfic"
			strFilterList = ""
	
			push "Tots els fitxers (*.*),*.*" onto strFilterList
			push "Device Independent Bitmap (*.DIB),*.DIB" onto strFilterList
			push "Bitmap(*.BMP),*.BMP" onto strFilterList

			get OpenFileDlg(strCaption,"","",strFilterList,1)
					if (it is null)
			newLine = vobra
			send insertLine newLine to recordfield "llista" of this page
			clear text of recordField "primerg1" of this page
			clear text of recordField "primer1" of this page

			tres="7"&vobra	
			import bitmap resource vmemoria&"."&"bmp" as vobra
	
			mgrafic=vmemoria
			insert graphic bitmap vobra after last word of text of recordField "primerg1" of page "gestio"
			put vobra into text of recordField "primer1" of this page
			continue
		
		else
		
			newLine = vobra
			send insertLine newLine to recordfield "llista" of this page

			tres="7"&vobra
			remove resource bitmap vobra of this book
	
			import bitmap resource It as vobra
	

			search in recordField "llista" for vobra as word
			clear text of recordField "primerg1" of this page
			clear text of recordField "primer1" of this page
			send clear
			send clear
			mmclose all
			mmPlay clip signe2 in stage "videos" of this page
			mmPlay clip signe2p in stage "dibuix" of this page
			tres="7"&vobra
			export resource bitmap vobra as vmemoria&"."&"bmp"
			remove resource bitmap vobra of this book
			remove resource clip tres
			remove resource clip vobra
			import bitmap resource vobra&"."&"bmp" as vobra
			mdibu= "\signe2\dibuix\"&tres&"."&"gif"
			new clip from mdibu
			name of It = tres
			mpeli= "\signe2\videos\"&vobra&"."&"avi"
			new clip from mpeli
			name of It = vobra
			mgrafic=word vobra of the text of field "item" of page "gestio"	
			insert graphic bitmap vobra after last word of text of recordField primerg1 of page "gestio"
			

		end if	
		
		end conditions	
		
		
		
		
end if
		newLine=vobra
		send insertLine newLine to recordfield "llista" of this page
		
		
		end conditions	
	
		else
		clear text of recordField "primerg1" of this page
		clear text of recordField "primer1" of this page

		tres="7"&vobra
		import bitmap resource vobra&"."&"bmp" as vobra

		mdibu= "\signe2\dibuix\"&tres&"."&"gif"
		new clip from mdibu
		name of It = tres
		mpeli= "\signe2\videos\"&vobra&"."&"avi"
		new clip from mpeli
		name of It = vobra
		insert graphic bitmap vobra after last word of text of recordField "primerg1" of page "gestio"
		put vobra after last word of text of recordField "primer1" of page "gestio"
		if text of recordField "primerg1" of this page is null
		
		request "No ha trobat el dibuix" && vobra && "Vols triar-lo ara?" with "SI" or "NO"
		conditions
			when It is "No"
			continue
			when It is "SI"
		
		
			linkDll "tbdlg.dll"
			STRING OpenFileDlg(STRING,STRING,STRING,STRING,int)
			end linkDll
			strCaption = "Trieu un fitxer gràfic"
			strFilterList = ""
	
			push "Tots els fitxers (*.*),*.*" onto strFilterList
			push "Device Independent Bitmap (*.DIB),*.DIB" onto strFilterList
			push "Bitmap(*.BMP),*.BMP" onto strFilterList

			get OpenFileDlg(strCaption,"","",strFilterList,1)
			if (it is null)

			continue
		


		else
		
		newLine = vobra
		send insertLine newLine to recordfield "llista" of this page
		tres="7"&vobra
		remove resource bitmap vobra of this book
		import bitmap resource It as vobra
		search in RecordField "llista" for vobra as word
		clear text of recordField "primerg1" of this page
		clear text of recordField "primer1" of this page
		send clear
		send clear
		mmclose all
		mmPlay clip signe2 in stage "videos" of this page
		mmPlay clip signe2p in stage "dibuix" of this page
		remove resource clip vobra
		remove resource clip tres
		mdibu= "\signe2\dibuix\"&tres&"."&"gif"
		new clip from mdibu
		name of It = tres
		mpeli= "\signe2\videos\"&vobra&"."&"avi"
		new clip from mpeli
		name of It = vobra
		
		mgrafic=word vobra of the text of field "item" of page "gestio"	
		insert graphic bitmap vobra after last word of text of recordField "primerg1" of page "gestio"
		end if	
		
		end conditions	
		
		end if

		newLine=vobra
		send insertLine newLine to recordfield "llista" of this page
		go to page "categories" of this book
		newLine = vobra
		send insertLine newLine to recordfield "llista" of page "categories"
		search in RecordField "llista" of page "categories" for vobra as word
		put text of recordfield "llista" of page "categories" into vbenji
		put vbenji into text of field "index" of page "categories"
		go to page gestio of this book
				
		end if
	
	end step

end
end conditions
	put text of recordfield "llista" into vbenji
	put vbenji into text of field "index" of this page
	clear text of recordfield "primer1" of this page
	clear text of recordfield "primerg1" of this page
	clear text of field "item" of this page
	go to page "frase" of this book
	go to page "gestio" of this book
	focus=field "item"
	sysCursor=1

end

----------------------------------------------------------------------
Field id 125 of Page id 17 (p. 2)
----------------------------------------------------------------------
-- This object has hyperlink properties
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	
----------------------------------------------------------------------
Button id 122 ("categoria") of Page id 17 (p. 2)
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	
to handle buttonClick
	syscursor = 4
	go to page "catego"
	syscursor = 1
end	
----------------------------------------------------------------------
Button id 121 ("Mostrar") of Page id 17 (p. 2)
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	

to handle buttonClick
	syscursor = 4
	close viewer "histories"
	close viewer "videos"
	if text of recordField "texte" of page "frase" is null 
	go to page "mostra1"
	else
		if text of recordField "texte" is not null
	
	search in recordField "texte" for ","by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	search in recordField "texte" for "("by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	search in recordField "texte" for ")"by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	search in recordField "texte" for ";"by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	search in recordField "texte" for "-"by case
	while "not found" is not in sysError
	send clear
	search again
	end while
		search in recordField "texte" for ":"by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	search in recordField "texte" for "!"by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	search in recordField "texte" for "CRLF"by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	
		go to page "mostra1"
		syscursor = 1
	end if
	end if
end	
----------------------------------------------------------------------
Button id 117 ("cercar") of Page id 17 (p. 2)
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end

to handle buttonClick
	system vtipus
	system vnumsigne
	system vnumdibu	
	system mgrafic

	if vtipus=anima
	sysCursor=4

	mmPlay clip signe2 in stage "videos" of this page
	mmPlay clip signe2p in stage "dibuix" of this page
	un=text of field "item" of this page
	dos="7"&un
	clear text of recordField "primerg1" of this page
	clear text of recordField "primer1" of this page
	insert graphic bitmap un after last word of text of RecordField "primerg1" of this page
	put un after last word of text of RecordField "primer1" of this page
	put text of recordfield "primer1" of this page into vnumsigne
	put dos into vnumdibu
	mmClose clip vnumdibu
	mmClose clip vnumsigne
	mmPlay clip vnumdibu in stage "dibuix" of this page
	mmOpen clip vnumsigne
	mmPlay clip vnumsigne in stage "videos" of this page
	mmSeek clip vnumsigne to 0
	if text of RecordField "primerg1" of this page is not null
	sysCursor=1
	break
	else
	request "No hi ha el gràfic del signe" && un
	end if
	sysCursor=1
	
	else

	sysCursor=4
	un=text of field "item" of this page
	clear text of recordField "primerg1" of this page
	clear text of recordField "primer1" of this page
	insert graphic bitmap un after last word of text of RecordField "primerg1" of page "Gestio"
	put un after last word of text of RecordField primer1 of page "Gestio"
	put text of recordfield "primer1" of this page into vnumsigne
	put dos into vnumdibu
	if text of RecordField "primerg1" of this page is not null
	sysCursor=1
	break
	else
	sysCursor=1
	request "No hi ha el gràfic del signe" && un
	end if
	sysCursor=1
	
	end if
end
----------------------------------------------------------------------
Button id 116 ("GIF") of Page id 17 (p. 2)
----------------------------------------------------------------------
to handle buttonClick
	system mdibu
	linkDll "tbdlg.dll"
		STRING OpenFileDlg(STRING,STRING,STRING,STRING,int)
	end linkDll
	
	strCaption = "Importar un text"
	strFilterList = ""
	
	push "Tots els fitxers (*.*),*.*" onto strFilterList
	push "TXT(.Txt),*.txt" onto strFilterList
	get OpenFileDlg(strCaption,"","",strFilterList,1)
	

	if (it is not null)
	dades=It
	OpenFile dades
	readFile dades for 24242
	closeFile dades
	dades=it
	put It into fselect
	 step i from 1 to itemCount(fselect)
	--Place chaque élément de la sélection tour à tour dans It
		pop fselect into vobra 
			mdibu= "\signe2\dibuix\"&vobra&"."&"gif"
			new clip from mdibu
			name of It = vobra
					
	end step

	end if		

end

----------------------------------------------------------------------
Button id 115 ("AVI") of Page id 17 (p. 2)
----------------------------------------------------------------------
to handle buttonClick
	system mpeli
	linkDll "tbdlg.dll"
		STRING OpenFileDlg(STRING,STRING,STRING,STRING,int)
	end linkDll
	
	strCaption = "Importar un text"
	strFilterList = ""
	
	push "Tots els fitxers (*.*),*.*" onto strFilterList
	push "TXT(.Txt),*.txt" onto strFilterList
	get OpenFileDlg(strCaption,"","",strFilterList,1)
	

	if (it is not null)
	dades=It
	OpenFile dades
	readFile dades for 24242
	closeFile dades
	dades=it
	put It into fselect
	 step i from 1 to itemCount(fselect)
	--Place chaque élément de la sélection tour à tour dans It
		pop fselect into vobra 
			mpeli= "\signe2\videos\"&vobra&"."&"avi"
			new clip from mpeli
			name of It = vobra
					
	end step

	end if		

end

----------------------------------------------------------------------
Button id 101 ("Acabar") of Page id 17 (p. 2)
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	

to handle buttonClick
	send exit
end	

	
----------------------------------------------------------------------
Field id 85 ("item") of Page id 17 (p. 2)
----------------------------------------------------------------------
to handle keyChar
	system ARRAY STRING itemArray[]
	
	local WORD itemNumber, stringLength
	local STRING string
	
	--vérifie que la matrice est initialisée
	if itemArray[1] = null
		--sinon, initialisez-la
		sendnotifyBefore enterPage to field "index"
	end if
	
	--fait suivre le caractère tapé pour que le nouveau caractère soit placé dans le champ
	forward
	
	--verrouille l'écran pendant la recherche de la corresondance la plus proche
	sysLockScreen = TRUE
	
	--met le texte en antémémoire pour ne pas avoir à rechercher la propriété si souvent.
	clear text of recordField "primerg1" of this page
	clear text of recordField "primer1" of this page
	clear text of recordField "primer77" of this page
		mmclose all
	string = my text
	
	--stocke la longueur de la chaîne courante
	stringLength = charCount(my text)
	
	--stocke le nombre d'éléments du champ dans lequel la recherche s'effectue
	numberItems = dimensions(itemArray)
	
	--s'il y a du texte dans le champ, effectue une recherche pour trouver la correspondance 
	--la plus proche
	if stringLength > 0
		-- s'il y a un seul caractère dans le champ, effectue une recherche binaire pour aller
		-- au début du groupe alphabétique de cette lettre
		if stringLength = 1

			get binarySearch(string)

			--sélectionne la ligne de texte trouvée et fait défiler le champ pour l'atteindre
			set selectedTextlines of field "index" to it
			set scroll of field "index" to it - 1

		--il y a plusieurs caractères dans ce champ, donc commence la recherche séquentielle
		-- pour trouver la correspondance la plus proche
		else

			--commence à la ligne actuellement sélectionnée qui est l'ancienne 					--correspondance la plus proche
			itemNumber = selectedTextlines of field "index"

			conditions
				
			--lorsque les premiers n caractères de l'élément de la matrice sont inférieurs à la 			--chaîne courante, il faut effectuer une recherche séquentielle vers le bas dans
			-- la matrice jusqu'à ce que l'élément suivant soit supérieur ou égal à la chaîne
			-- courante ou jusqu'à atteindre la fin de la matrice
			when chars 1 to stringLength of itemArray[itemNumber] < string as text
				while chars 1 to stringLength of itemArray[itemNumber + 1] < string as text and \
				      itemNumber <= numberItems
					increment itemNumber
				end
				
				-- si l'on arrête la recherche parce que les chaînes sont égales, le
				-- nombre d'éléments devrait être incrémenté pour que la ligne égale,
				-- et non pas celle au-dessus, soit mise en surbrillance.
				if chars 1 to stringLength of itemArray[itemNumber + 1] = string as text
					increment itemNumber
				end
				
			-- lorsque les premiers n caractères de l'élément de la matrice sont supérieurs 				-- ou égaux à la chaîne courante, il faut effectuer une recherche séquentielle
			-- vers le haut dans la matrice jusqu'à ce que l'élément suivant soit le premier
			-- dans la matrice ou soit l'élément < de matrice.
			when chars 1 to stringLength of itemArray[itemNumber] >= string as text
				while itemNumber > 1 and \
				  chars 1 to stringLength of itemArray[itemNumber - 1] >= string as text    
					decrement itemNumber
				end				
			end conditions
			
			--sélectionne la ligne de texte avec la correspondance la plus proche
			-- et la fait défiler
			set selectedTextlines of field "index" to itemNumber
			set scroll of field "index" to itemNumber - 1
		end if
	else
		--s'il n'y a pas de texte dans le champ, sélectionne la première ligne de texte
		--et la fait défiler vers le haut du champ
		set selectedTextlines of field "index" to 1
		set scroll of field "index" to 0
	end if
	sysLockScreen = FALSE
end keyChar

to get binarySearch string
	system ARRAY STRING itemArray[]
	
	--initialise les limites supérieures et inférieures et le point de départ de la recherche
	upper = dimensions (itemArray)
	lower = 1
	currentPosition = (lower + upper)  DIV 2
	
	found = FALSE
	
	-- diminue l'ampleur de la recherche jusqu'à la découverte d'une correspondance ou jusqu'à ce
	-- qu'il n'y a plus d'éléments à rechercher
	while not found and (upper >= lower)
		conditions
		-- lorsque la chaîne est inférieure à l'élément de la matrice, les éléments situés 				-- au-dessus de l'élément de la matrice sont éliminés et la recherche s'effectue				-- sur la moitié inférieure
		when string < char 1 of itemArray[currentPosition] as text
			upper = currentPosition - 1
			currentPosition = (lower + upper) DIV 2
			
		-- lorsque la chaîne est supérieure à l'élément de la matrice, les éléments situés 
		--au-dessous de l'élément de la matrice sont éliminés et la recherche s'effectue
		-- sur la moitié supérieure
		when string > char 1 of itemArray[currentPosition] as text
			lower = currentPosition + 1
			currentPosition = (lower + upper) DIV 2
		else
		--soit nous avons une correspondance, soit la chaîne ne se trouve pas dans la matrice
			found = TRUE
		end conditions
	end while

	--si la recherche est arrêtée parce que la correspondance exacte n'est pas trouvée, il faut
	--vérifier s'il est nécessaire d'aller d'un élément plus loin car l'élément après lequel
	--la chaîne devrait aller est sélectionné dans la chaîne sans correspondance.
	if not found and string > char 1 of itemArray[currentPosition] as text
		increment currentPosition
	end if

	--nous devons nous assurer de sélectionner le premier élément qui correspond à la chaîne,
	--ainsi, lorsqu'une correspondance est trouvée, il faut se déplacer vers le haut de la matrice
	--pour trouver l'élément.
	while currentPosition > 1 and string = char 1 of itemArray[currentPosition - 1] as text
		decrement currentPosition
	end while
	return currentPosition
end binarySearch
----------------------------------------------------------------------
Button id 81 ("ajuda") of Page id 17 (p. 2)
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	

to handle buttonClick
		sysCursor=4
		open viewer "ajuda"
		currentPage of viewer "ajuda" = page "ajuda"
		show viewer "ajuda"
		sysCursor=1
end
----------------------------------------------------------------------
Button id 79 ("frases") of Page id 17 (p. 2)
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	

to handle buttonClick
	syscursor = 4
	clear text of recordField "titol" of page "frase"
	clear text of recordField "texte" of page "frase"
	go to page "frase"
	syscursor = 1
end	
----------------------------------------------------------------------
Field id 58 ("index") of Page id 17 (p. 2)
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	

notifyBefore enterPage
	system ARRAY STRING itemArray[]
	
	fill itemArray with my text in [textline] order
	set my selectedTextlines to 1
	set my scroll to 0
end enterPage

to handle buttonUp

	set text of field "item" to selectedText
	un=text of field "item" of this page
	mmPlay clip signe2 in stage "videos" of this page
	mmPlay clip signe2p in stage "dibuix" of this page
	un=text of field "item" of this page
	dos="7"&un
	clear text of recordField "primerg1" of this page
	clear text of recordField "primer1" of this page
	insert graphic bitmap un after last word of text of RecordField "primerg1" of this page
	put un after last word of text of RecordField "primer1" of this page
	put text of recordfield "primer1" of this page into vnumsigne
	put dos into vnumdibu
	mmClose clip vnumdibu
	mmClose clip vnumsigne
	mmPlay clip vnumdibu in stage "dibuix" of this page
	mmOpen clip vnumsigne
	mmPlay clip vnumsigne in stage "videos" of this page
	mmSeek clip vnumsigne to 0
	if text of RecordField "primerg1" of this page is not null
	sysCursor=1
	break
	else
	request "No hi ha el gràfic del signe" && un
	end if
end buttonUp


to handle sortSelf
	local ARRAY dataArray[]
	local STRING sortedText
	sysCursor = 4
	-- put the textlines into an array
	fill dataArray with my text in [textline] order
	-- sort the array
	send quickSort dataArray
	-- convert the array back into textlines
	step i from 1 to dimensions(dataArray)
		put dataArray[i] & CRLF after sortedText
	end step
	-- get rid of trailing crlf's
	clear last char of sortedText
	clear last char of sortedText
	-- update the text
	set my text to sortedText
	sysCursor = default
end sortSelf

-- The next three handlers make up a Standard recursive QuickSort.
-- Keep in mind that arrays are passed by reference, not by value.
to handle quickSort fArray[] by reference
	system s_noSwap
	set s_noSwap to 0
    send quickSrt fArray, 1, dimensions ( fArray )
end quickSort

to handle quickSrt fArray[] by reference, lo, hi
    system  s_noSwap
    if hi > lo 
		send swap  fArray, lo, ((lo+hi) div 2)
		set lst to lo
		step i from (lo+1) to hi
        	if fArray[i] < fArray[lo] as text
        		increment lst
        		send swap fArray, lst, i
        	else
        		increment s_noswap
        	end if
        end step
        send swap fArray,lo,lst 
   		send quicksrt fArray, lo, lst-1
    	send quicksrt fArray, lst+1,hi
   	end if
end quickSrt

to handle swap fArray[] by reference, x, y
	local temp
	set temp to fArray[x]
	set fArray[x] to fArray[y]
	set fArray[y] to temp
end swap


-- use if inserting a single line. Will maintain sorted order
to handle insertLine newLine
	set my text to insertLineAux(my text,newLine)
end insertLine

-- inserts newLine into txt, maintaining sorted order.
-- works only if txt is already sorted.
to get insertLineAux txt,newLine
	if txt is null
		return newLine
	end if
	set start to 1  -- first textline
	set tlc to textlinecount(txt)
	set ending to tlc -- last textline
	local insertSpot
	while start <= ending 
		set midPoint to (start+ending) div 2 
		set middleLine to textline midPoint of txt
		conditions
		when newLine < middleLine as text
			-- start looking at values less than current midPoint
			set ending to midPoint-1
			set insertSpot to midPoint
		when newLine > middleLine as text
			-- start looking at values greater than current midPoint
			set start to midPoint+1
			set insertSpot to midPoint+1
		else
			-- the item already exists
			set insertSpot to midPoint
			break while
		end conditions
	end while
	if insertSpot > tlc
		put newLine before textline insertSpot of txt
	else
		put newLine&crlf before textline insertSpot of txt
	end if
	return txt
end insertLineAux


----------------------------------------------------------------------
Button id 54 of Page id 17 (p. 2)
----------------------------------------------------------------------
to handle buttonClick
	system vnumsigne
	mmSeek clip vnumsigne to 0 from end

end
----------------------------------------------------------------------
Button id 53 of Page id 17 (p. 2)
----------------------------------------------------------------------
to handle doStep
	system vnumsigne
	mmStep clip vnumsigne by 50 wait

end


to handle buttonClick
	send doStep
end

to handle buttonStillDown
	send doStep
end
----------------------------------------------------------------------
Button id 52 of Page id 17 (p. 2)
----------------------------------------------------------------------
to handle doStep
	system vnumsigne
	mmStep clip vnumsigne back by 1 wait

end


to handle buttonClick
	send doStep
end

to handle buttonStillDown
	send doStep
end
----------------------------------------------------------------------
Button id 51 of Page id 17 (p. 2)
----------------------------------------------------------------------
to handle buttonClick
	system vnumsigne
	mmSeek clip vnumsigne to 0
end
----------------------------------------------------------------------
Button id 50 of Page id 17 (p. 2)
----------------------------------------------------------------------
to handle buttonClick
		system vnumsigne
	mmPause clip vnumsigne
end
----------------------------------------------------------------------
Button id 49 of Page id 17 (p. 2)
----------------------------------------------------------------------
to handle buttonClick
	system vnumsigne
	vnumsigne=text of recordfield "primer1" of this page
	mmOpen clip vnumsigne
	mmPlay clip vnumsigne in stage videos hold
end
----------------------------------------------------------------------
Group id 55 ("mmCOntrols") of Page id 17 (p. 2)
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	
----------------------------------------------------------------------
Field id 38 of Page id 323 (p. 3)
----------------------------------------------------------------------
-- This object has hyperlink properties
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	
----------------------------------------------------------------------
Button id 35 ("gestio") of Page id 323 (p. 3)
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	
to handle buttonClick
	syscursor = 4
	close viewer "histories"
	close viewer "videos"
	clear text of recordField "titol"
	clear text of recordField "texte"
	go to page "gestio"
	syscursor = 1
end	
----------------------------------------------------------------------
Button id 34 ("Mostrar") of Page id 323 (p. 3)
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	

to handle buttonClick
	syscursor = 4
	close viewer "histories"
	close viewer "videos"
	if text of recordField "texte" of page "frase" is null 
	go to page "mostra1"
	else
		if text of recordField "texte" is not null
	
	search in recordField "texte" for ","by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	search in recordField "texte" for "("by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	search in recordField "texte" for ")"by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	search in recordField "texte" for ";"by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	search in recordField "texte" for "-"by case
	while "not found" is not in sysError
	send clear
	search again
	end while
		search in recordField "texte" for ":"by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	search in recordField "texte" for "!"by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	search in recordField "texte" for "CRLF"by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	
		go to page "mostra1"
		syscursor = 1
	end if
	end if
end	
----------------------------------------------------------------------
Button id 33 ("Acabar") of Page id 323 (p. 3)
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	

to handle buttonClick
	send exit
end	


	
----------------------------------------------------------------------
Button id 31 ("ajuda") of Page id 323 (p. 3)
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	

to handle buttonClick
		sysCursor=4
		open viewer "ajuda"
		currentPage of viewer "ajuda" = page "ajuda"
		show viewer "ajuda"
		sysCursor=1
end
----------------------------------------------------------------------
Button id 30 ("frases") of Page id 323 (p. 3)
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	

to handle buttonClick
	syscursor = 4
	clear text of recordField "titol" of page "frase"
	clear text of recordField "texte" of page "frase"
	go to page "frase"
	syscursor = 1
end	
----------------------------------------------------------------------
Group id 28 ("CBT Radio Buttons") of Page id 323 (p. 3)
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	

to handle buttonClick
	sysCursor=4
	vmot=caption of target
	send (answerMessage of target) to target
	sysCursor=1
end buttonClick


to set editWidget to val
	send customEdit to item 1 of my objects
end editWidget

to handle answer1
	vmot=caption of target
	dades=text of recordField vmot of page "categories1" of this book
	go to page frase
	clear text of recordField "titol" of page "frase"
	clear text of recordField "texte" of page "frase"
	put vmot into text of recordField "titol" of page "frase"
	put space & dades after text of recordField "texte" of page "frase"
end answer1

to handle answer2
	vmot=caption of target
	dades=text of recordField vmot of page "categories1" of this book
	go to page frase
	clear text of recordField "titol" of page "frase"
	clear text of recordField "texte" of page "frase"
	put vmot into text of recordField "titol" of page "frase"
	put space & dades after text of recordField "texte" of page "frase"
end answer2

to handle answer3
	vmot=caption of target
	dades=text of recordField vmot of page "categories1" of this book
	go to page frase
	clear text of recordField "titol" of page "frase"
	clear text of recordField "texte" of page "frase"
	put vmot into text of recordField "titol" of page "frase"
	put space & dades after text of recordField "texte" of page "frase"
end answer3

to handle answer4
	vmot=caption of target
	dades=text of recordField vmot of page "categories1" of this book
	go to page frase
	clear text of recordField "titol" of page "frase"
	clear text of recordField "texte" of page "frase"
	put vmot into text of recordField "titol" of page "frase"
	put space & dades after text of recordField "texte" of page "frase"
end answer4



----------------------------------------------------------------------
Page id 18 ("FRASE") of Book "C:\Signe2\Signe77.tbk"
----------------------------------------------------------------------
to handle enterPage
	system vtipus
	system vnumvideo
	system mcarrega
	restore menuBar
	enable menuItem "Llegir" at reader
	disable menu "Pàgina" at reader
	disable menuItem "Editor de frases" at reader
	disable menuItem "Imprimir el text" at reader
	disable menuItem "Imprimir la pàgina" at reader	
	disable menuItem "Importar dibuixos d'objectes" at reader
	disable menuItem "Importar filmacions de signes" at reader
	disable menuItem "Exportar pictograma del signe" at reader
	disable menuItem "Importar grups de signes" at reader
	clear text of recordField "solucio" of this page

	if vtipus=anima
	mmOpen vnumvideo
	
	show combobox "llistat" of this background
	show button "pelicula" of this page
	show button "contes" of this page
	else
	hide combobox "llistat" of this background
	hide button "pelicula" of this page
	hide button "contes" of this page
		
	hide group visual of this background
	hide group visual1 of this background
	
	sysPageScroll=0,0

	put text of recordfield titol into comprova
	if comprova is not in mmllista
	enabled of button "pelicula" of this page = false
	else
	end if
	selectedItem of comboBox "llistat" of this background=1
	focus=recordfield "titol" of this page
	forward
	end if

end	
	

to handle leavePage
	restore menuBar
	disable menu "Llegir" at reader	
	disable menu "Categories" at reader
	close viewer "videos"
	close viewer "histories"
	mmClose all
	forward
end




----------------------------------------------------------------------
Field id 59 of Page id 18 (p. 4)
----------------------------------------------------------------------
-- This object has hyperlink properties
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	
----------------------------------------------------------------------
Button id 56 ("categoria") of Page id 18 (p. 4)
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	
to handle buttonClick
	syscursor = 4
	go to page "catego"
	syscursor = 1
end	
----------------------------------------------------------------------
Button id 54 ("Acabar") of Page id 18 (p. 4)
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	

to handle buttonClick
	send exit
end	

	
----------------------------------------------------------------------
Button id 53 ("llegir") of Page id 18 (p. 4)
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end
to handle buttonClick
	sysCursor=4
	system vtipus
	send lectura
	sysCursor=1
end
----------------------------------------------------------------------
Button id 51 ("ajuda") of Page id 18 (p. 4)
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	

to handle buttonClick
		sysCursor=4
		open viewer "ajuda"
		currentPage of viewer "ajuda" = page "ajuda"
		show viewer "ajuda"
		sysCursor=1
end
----------------------------------------------------------------------
Button id 49 ("gestio") of Page id 18 (p. 4)
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	
to handle buttonClick
	syscursor = 4
	close viewer "histories"
	close viewer "videos"
	clear text of recordField "titol"
	clear text of recordField "texte"
	go to page "gestio"
	syscursor = 1
end	
----------------------------------------------------------------------
Button id 48 ("importar") of Page id 18 (p. 4)
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	

to handle buttonClick

	system sLastResPlayed
	close viewer "histories"
	close viewer "videos"

	linkDll "tbdlg.dll"
		STRING OpenFileDlg(STRING,STRING,STRING,STRING,int)
	end linkDll
	
	strCaption = "Importar un text"
	strFilterList = ""
	
	push "Tots els fitxers (*.*),*.*" onto strFilterList
	push "TXT(.Txt),*.txt" onto strFilterList
	get OpenFileDlg(strCaption,"","",strFilterList,1)
	

	if (it is not null)

	clear text of recordField "titol"
	clear text of recordField "texte"
	mmClose all
	enabled of button "pelicula" of this page = false
	selectedItem of comboBox "llistat" of this background=1
	dades=It
	OpenFile dades
	readFile dades for 24242
	closeFile dades
	dades=it
	put space & It after text of recordField "texte" of page "frase"
	closeFile dades
	end if
	search in recordField "texte" for ","by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	search in recordField "texte" for "("by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	search in recordField "texte" for ")"by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	search in recordField "texte" for ";"by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	search in recordField "texte" for "-"by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	search in recordField "texte" for ":"by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	search in recordField "texte" for "!"by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	search in recordField "texte" for "CRLF"by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	search in recordField "texte" for "/"by case
	while "not found" is not in sysError
	send clear
	search again
	end while
end
----------------------------------------------------------------------
Button id 47 ("Nou") of Page id 18 (p. 4)
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	

to handle buttonClick
	close viewer "histories"
	close viewer "videos"
	if text of recordField "texte" of page "frase" is not null 
	syscursor = 4
	request "Començar un nou document i perdre l'actual text?" with "SI" or "NO"
	conditions
	when It is "SI"
	clear text of recordField "titol"
	clear text of recordField "texte"
	mmClose all
	enabled of button "pelicula" of this page = false
	selectedItem of comboBox "llistat" of this background=1
	end conditions
	focus=recordfield "titol" of this page
	syscursor = 1
	end if
end
----------------------------------------------------------------------
Button id 46 ("Mostrar") of Page id 18 (p. 4)
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	

to handle buttonClick
	syscursor = 4
	close viewer "histories"
	close viewer "videos"
	if text of recordField "texte" of page "frase" is null 
	go to page "mostra1"
	else
		if text of recordField "texte" is not null
	
	search in recordField "texte" for ","by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	search in recordField "texte" for "("by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	search in recordField "texte" for ")"by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	search in recordField "texte" for ";"by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	search in recordField "texte" for "-"by case
	while "not found" is not in sysError
	send clear
	search again
	end while
		search in recordField "texte" for ":"by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	search in recordField "texte" for "!"by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	search in recordField "texte" for "CRLF"by case
	while "not found" is not in sysError
	send clear
	search again
	end while
	
		go to page "mostra1"
		syscursor = 1
	end if
	end if
end	
----------------------------------------------------------------------
Background id 9 ("mostra") of Book "C:\Signe2\Signe77.tbk"
----------------------------------------------------------------------
to handle enterBackground
	system mmester
	enable menu "Llegir" at reader
	disable menuItem "Importar text" at reader
	disable menuItem "Editor de text bilingüe" at reader
	disable menuItem "Importar dibuixos d'objectes" at reader
	disable menuItem "Importar filmacions de signes" at reader
	disable menuItem "Exportar pictograma del signe" at reader
	disable menuItem "Importar grups de signes" at reader
	disable menu "Llegir" at reader
	mmester=0
	forward
end	

to handle leaveBackground
	restore menuBar

	clear text of field "titol1" of page "mostra1"
	step i from 1 to pageCount of background "mostra"
	if text of recordField "para1" = null
	break
	else

	nombrep=1
	step nombre from 1 to 42
	paraulap="para"&nombrep
	quadrep="parag"&nombrep
	clear text of recordField paraulap of page i of this background
	clear text of recordField quadrep of page i of this background
	nombrep=nombrep+1
	end step
	end if
	end step
	clear mmester
	forward
end
----------------------------------------------------------------------
Button id 175 ("categoria") of Background id 9
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	
to handle buttonClick
	syscursor = 4
	go to page "catego"
	syscursor = 1
end	
----------------------------------------------------------------------
Button id 174 ("imprimir") of Background id 9
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	

to handle buttonClick

	request " Seleccioneu l'opció a imprimir. Per imprimir tot el text cal anar abans, pàgina a pàgina, fins el darrer full amb text. Heu de configurar la impressora en l'orientació vertical" with "PÀGINA" or "TOT EL TEXT" or "CONFIGURAR"

	if it is "CONFIGURAR" then
	sysCursor = 4
	send printsetup
	sysCursor = 1
	end if
	
	if it is "PÀGINA" then
	
	hide button "gestio" of this background
	hide button "imprimir" of this background
	hide button "frases" of this background
	hide button "seguent" of this background
	hide button "anterior" of this background
	hide button "categoria" of this background
	fillColor of this background=white
	start spooler
		print 1 pages 
	end spooler
	show button "gestio" of this background
	show button "imprimir" of this background
	show button "frases" of this background
	show button "seguent" of this background
	show button "anterior" of this background
	show button "categoria" of this background
	
	end if
	
	if it is "TOT EL TEXT" then
		hide button "gestio" of this background
	hide button "imprimir" of this background
	hide button "frases" of this background
	hide button "seguent" of this background
	hide button "anterior" of this background
	hide button "categoria" of this background
	fillColor of this background=white
	start spooler
		go to page "mostra1"
		print 128 pages 
	end spooler
	show button "gestio" of this background
	show button "imprimir" of this background
	show button "frases" of this background
	show button "seguent" of this background
	show button "anterior" of this background
	show button "categoria" of this background
	
	end if
	
end	


----------------------------------------------------------------------
Button id 173 ("gestio") of Background id 9
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	
to handle buttonClick
	syscursor = 4
	clear text of recordField "titol"
	clear text of recordField "texte"
	go to page "gestio"
	syscursor = 1
end	
----------------------------------------------------------------------
Button id 172 ("frases") of Background id 9
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	

to handle buttonClick
	syscursor = 4
	go to page "frase"
	syscursor = 1
end	
----------------------------------------------------------------------
Button id 171 ("Seguent") of Background id 9
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	
to handle buttonClick
	system mparaula
	if this page is last page of this background
	request "És la última pàgina"
	else
	if text of recordField para42 is null
	request "No hi ha més pàgines de text"
	else
	syscursor = 4	
	mparaula=mparaula+42
	go to next page

	sysPageScroll= 0,0
	syscursor = 1
	end if
	end if
end	
----------------------------------------------------------------------
Button id 170 ("Anterior") of Background id 9
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	
to handle buttonClick
	system mparaula
	if this page is not page "mostra1"
	syscursor = 4
	mparaula=mparaula-42
	go to previous page
	
	sysPageScroll= 0,0
	syscursor = 1
	else
	request "És la primera pàgina"
	end if
end	
----------------------------------------------------------------------
RecordField id 164 ("para42") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag42" of this page
		insert graphic bitmap aa into text of RecordField "parag42" of this page
		if text of recordField "parag42" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag42" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 161 ("para41") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag41" of this page
		insert graphic bitmap aa into text of RecordField "parag41" of this page
		if text of recordField "parag41" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag41" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 159 ("para40") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag40" of this page
		insert graphic bitmap aa into text of RecordField "parag40" of this page
		if text of recordField "parag40" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag40" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 157 ("para39") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag39" of this page
		insert graphic bitmap aa into text of RecordField "parag39" of this page
		if text of recordField "parag39" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag39" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 155 ("para38") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag38" of this page
		insert graphic bitmap aa into text of RecordField "parag38" of this page
		if text of recordField "parag38" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag38" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 153 ("para37") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag37" of this page
		insert graphic bitmap aa into text of RecordField "parag37" of this page
		if text of recordField "parag37" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag37" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 151 ("para36") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag36" of this page
		insert graphic bitmap aa into text of RecordField "parag36" of this page
		if text of recordField "parag36" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag36" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 149 ("para35") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag35" of this page
		insert graphic bitmap aa into text of RecordField "parag35" of this page
		if text of recordField "parag35" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag35" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 147 ("para34") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag34" of this page
		insert graphic bitmap aa into text of RecordField "parag34" of this page
		if text of recordField "parag34" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag34" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 145 ("para33") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag33" of this page
		insert graphic bitmap aa into text of RecordField "parag33" of this page
		if text of recordField "parag33" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag33" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 89 ("para32") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag32" of this page
		insert graphic bitmap aa into text of RecordField "parag32" of this page
		if text of recordField "parag32" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag32" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 88 ("para31") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag31" of this page
		insert graphic bitmap aa into text of RecordField "parag31" of this page
		if text of recordField "parag31" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag31" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 87 ("para30") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag30" of this page
		insert graphic bitmap aa into text of RecordField "parag30" of this page
		if text of recordField "parag30" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag30" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 86 ("para29") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag29" of this page
		insert graphic bitmap aa into text of RecordField "parag29" of this page
		if text of recordField "parag29" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag29" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 85 ("para28") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag28" of this page
		insert graphic bitmap aa into text of RecordField "parag28" of this page
		if text of recordField "parag28" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag28" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 84 ("para27") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag27" of this page
		insert graphic bitmap aa into text of RecordField "parag27" of this page
		if text of recordField "parag27" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag27" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 83 ("para26") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag26" of this page
		insert graphic bitmap aa into text of RecordField "parag26" of this page
		if text of recordField "parag26" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag26" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 82 ("para25") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag25" of this page
		insert graphic bitmap aa into text of RecordField "parag25" of this page
		if text of recordField "parag25" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag25" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 81 ("para24") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag24" of this page
		insert graphic bitmap aa into text of RecordField "parag24" of this page
		if text of recordField "parag24" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag24" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 80 ("para23") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag23" of this page
		insert graphic bitmap aa into text of RecordField "parag23" of this page
		if text of recordField "parag23" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag23" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 79 ("para22") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag22" of this page
		insert graphic bitmap aa into text of RecordField "parag22" of this page
		if text of recordField "parag22" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag22" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 78 ("para21") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag21" of this page
		insert graphic bitmap aa into text of RecordField "parag21" of this page
		if text of recordField "parag21" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag21" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 77 ("para20") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag20" of this page
		insert graphic bitmap aa into text of RecordField "parag20" of this page
		if text of recordField "parag20" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag20" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 76 ("para19") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag19" of this page
		insert graphic bitmap aa into text of RecordField "parag19" of this page
		if text of recordField "parag19" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag19" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 75 ("para18") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag18" of this page
		insert graphic bitmap aa into text of RecordField "parag18" of this page
		if text of recordField "parag18" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag18" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 74 ("para17") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag17" of this page
		insert graphic bitmap aa into text of RecordField "parag17" of this page
		if text of recordField "parag17" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag17" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 73 ("para16") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag16" of this page
		insert graphic bitmap aa into text of RecordField "parag16" of this page
		if text of recordField "parag16" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag16" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 72 ("para15") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag15" of this page
		insert graphic bitmap aa into text of RecordField "parag15" of this page
		if text of recordField "parag15" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag15" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 71 ("para14") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag14" of this page
		insert graphic bitmap aa into text of RecordField "parag14" of this page
		if text of recordField "parag14" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag14" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 70 ("para13") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag13" of this page
		insert graphic bitmap aa into text of RecordField "parag13" of this page
		if text of recordField "parag13" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag13" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown

----------------------------------------------------------------------
RecordField id 69 ("para12") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag12" of this page
		insert graphic bitmap aa into text of RecordField "parag12" of this page
		if text of recordField "parag12" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag12" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown

----------------------------------------------------------------------
RecordField id 68 ("para11") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag11" of this page
		insert graphic bitmap aa into text of RecordField "parag11" of this page
		if text of recordField "parag11" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag11" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown

----------------------------------------------------------------------
RecordField id 67 ("para10") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag10" of this page
		insert graphic bitmap aa into text of RecordField "parag10" of this page
		if text of recordField "parag10" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag10" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown

----------------------------------------------------------------------
RecordField id 66 ("para9") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag9" of this page
		insert graphic bitmap aa into text of RecordField "parag9" of this page
		if text of recordField "parag9" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag9" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown

----------------------------------------------------------------------
RecordField id 65 ("para8") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag8" of this page
		insert graphic bitmap aa into text of RecordField "parag8" of this page
		if text of recordField "parag8" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag8" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 64 ("para7") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag7" of this page
		insert graphic bitmap aa into text of RecordField "parag7" of this page
		if text of recordField "parag7" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag7" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 63 ("para6") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag6" of this page
		insert graphic bitmap aa into text of RecordField "parag6" of this page
		if text of recordField "parag6" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag6" of this page
	forward
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 62 ("para5") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag5" of this page
		insert graphic bitmap aa into text of RecordField "parag5" of this page
		if text of recordField "parag5" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag5" of this page
	forward
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 61 ("para4") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag4" of this page
		insert graphic bitmap aa into text of RecordField "parag4" of this page
		if text of recordField "parag4" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag4" of this page
	forward
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 59 ("para3") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag3" of this page
		insert graphic bitmap aa into text of RecordField "parag3" of this page
		if text of recordField "parag3" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag3" of this page
	forward
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 58 ("para2") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	clear It
	conditions
	when key = keyTab

		get text of self
		put It into aa
		clear text of recordfield "parag2" of this page
		insert graphic bitmap aa into text of RecordField "parag2" of this page
		if text of recordField "parag2" is null
	
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag2" of this page
	forward
	forward
	end if
	end if
	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
--	clear text of recordfield "texte" of page "frase"
	put " "&&aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

--	forward
	clear aa
end keyDown
----------------------------------------------------------------------
RecordField id 2 ("para1") of Background id 9
----------------------------------------------------------------------
 to handle keyDown key
	system mgrafic
	fontface of self=sysfontFace
	fontSize of self=sysfontSize
	fontStyle of self=sysfontStyle
	conditions
	when key = keyTab
		get text of self
		put It into aa
		clear text of recordfield "parag1" of this page
		insert graphic bitmap aa into text of RecordField "parag1" of this page
		if text of recordField "parag1" is null
		
		
	clear mgrafic
	clear meu1
	
	ae=text of recordField "recerca1" of page "recercat1" of this book
	push text of recordField "recerca2" of page "recercat1" of this book onto ae
	fk=text of recordField "recerca1" of page "recercat2" of this book
	push text of recordField "recerca2" of page "recercat2" of this book onto fk
	lñ=text of recordField "recerca1" of page "recercat3" of this book
	push text of recordField "recerca2" of page "recercat3" of this book onto lñ
	op=text of recordField "recerca1" of page "recercat4" of this book
	push text of recordField "recerca2" of page "recercat4" of this book onto ot	
	rt=text of recordField "recerca1" of page "recercat5" of this book
	push text of recordField "recerca2" of page "recercat5" of this book onto uz
	uz=text of recordField "recerca1" of page "recercat6" of this book
	push text of recordField "recerca2" of page "recercat6" of this book onto uz	
	
	ae1= "a b c ç q "
	fk1= "f g h i j k"
	lñ1= "l ll m n ñ"
	op1= "o p"
	rt1= "r s t"
	uz1= "u v w d e x y z"

	un1=aa
	mgrafic= un1

		put first char of mgrafic into davant
		if davant is in ae1
		put ae into ab
		end if
		if davant is in fk1
		put fk into ab
		end if
		if davant is in lñ1
		put lñ into ab
		end if
		if davant is in op1
		put op into ab
		end if
		if davant is in rt1
		put rt into ab
		end if
		if davant is in uz1
		put uz into ab
		end if
	
	step i from 1 to textlineCount(ab)
	meu= textline i of ab
	if mgrafic is in meu
	put meu into text of recordField "solucio1" of this page
	search in RecordField "solucio1" for mgrafic as word
	if sysErrorNumber = 641
	continue
	else 
	put first word of meu into meu1
	end if
	end if
	end step
	if meu1 is not null
	insert graphic bitmap meu1 into text of RecordField "parag1" of this page
	forward
	end if
	end if

	clear meu
	clear meu1
	clear mgrafic
	clear text of recordField "solucio1" of this page

	sysCursor=1
	clear text of recordfield "texte" of page "frase"
	put aa after last word of text of recordfield "texte" of page "frase"

	forward
	end conditions

end keyDown
----------------------------------------------------------------------
Field id 8 ("titol1") of Page id 19 (p. 5)
----------------------------------------------------------------------
to handle enterfield	
	fontface of field "titol1" of page "mostra1"=sysfontFace
	put sysfontsize into suma
	suma1=suma+2
	fontSize of field "titol1" of page "mostra1"=suma1
	fontStyle of field "titol1" of page "mostra1"=underline
end	
----------------------------------------------------------------------
Button id 7 ("despres") of Background id 87
----------------------------------------------------------------------
to handle buttonClick
		sysCursor=4
		open viewer "ajuda"
		go to next page
		show viewer "ajuda"
		sysCursor=1
end buttonClick

----------------------------------------------------------------------
Button id 6 ("abans") of Background id 87
----------------------------------------------------------------------
to handle buttonClick
		sysCursor=4
		open viewer "ajuda"
		go to previous page
		show viewer "ajuda"
		sysCursor=1
end buttonClick

----------------------------------------------------------------------
Button id 5 ("Index") of Background id 87
----------------------------------------------------------------------
to handle buttonClick
		sysCursor=4
		open viewer "ajuda"
		currentPage of viewer "ajuda" = page "ajuda"
		show viewer "ajuda"
		sysCursor=1
end buttonClick

----------------------------------------------------------------------
Group id 9 ("botons") of Background id 87
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end
----------------------------------------------------------------------
RecordField id 0 of Background id 87
----------------------------------------------------------------------
to handle buttonClick
		open viewer "ajuda"
		currentPage of viewer "ajuda" = page "ajugrafics"

		show viewer "ajuda"
end buttonClick


----------------------------------------------------------------------
Page id 293 ("ajuda") of Book "C:\Signe2\Signe77.tbk"
----------------------------------------------------------------------
to handle enterPage
	show group botons of this background
	hide button "abans" of this background
	hide button "index" of this background
	show button "despres" of this background
	system vtipus
	if vtipus=noanima
	hide field "ocult1" of this page
	else
	show field "ocult1" of this page
	end if
end	
to handle leavePage
	show button "abans" of this background
	show button "index" of this background
end	

----------------------------------------------------------------------
Hotword id 59 of Page id 293 (p. 134)
----------------------------------------------------------------------
to handle buttonClick
		open viewer "autor"
		currentPage of viewer "autor" = page "autor"

		show viewer "autor"
end buttonClick
----------------------------------------------------------------------
Hotword id 58 of Page id 293 (p. 134)
----------------------------------------------------------------------
to handle buttonClick
		open viewer "materia"
		currentPage of viewer "materia" = page "materia"

		show viewer "materia"
end buttonClick
----------------------------------------------------------------------
Hotword id 55 of Page id 293 (p. 134)
----------------------------------------------------------------------
to handle buttonClick
		open viewer "colabora"
		currentPage of viewer "colabora" = page "cola"

		show viewer "colabora"
end buttonClick

----------------------------------------------------------------------
Hotword id 64 of Page id 293 (p. 134)
----------------------------------------------------------------------
to handle buttonClick
		open viewer "ajuda"
		currentPage of viewer "ajuda" = page "ajubilingue"

		show viewer "ajuda"
end buttonClick
----------------------------------------------------------------------
Hotword id 61 of Page id 293 (p. 134)
----------------------------------------------------------------------
to handle buttonClick
		open viewer "ajuda"
		currentPage of viewer "ajuda" = page "ajufrases"

		show viewer "ajuda"
end buttonClick
----------------------------------------------------------------------
Hotword id 67 of Page id 293 (p. 134)
----------------------------------------------------------------------
to handle buttonClick
		open viewer "ajuda"
		currentPage of viewer "ajuda" = page "ajudacate"

		show viewer "ajuda"
end buttonClick
----------------------------------------------------------------------
Hotword id 52 of Page id 293 (p. 134)
----------------------------------------------------------------------
to handle buttonClick
		open viewer "ajuda"
		currentPage of viewer "ajuda" = page "ajugrafics"

		show viewer "ajuda"
end buttonClick
----------------------------------------------------------------------
Button id 13 ("despres") of Background id 103
----------------------------------------------------------------------
to handle buttonClick
		sysCursor=4
		open viewer "ajuda"
		go to next page
		show viewer "ajuda"
		sysCursor=1
end buttonClick

----------------------------------------------------------------------
Button id 12 ("abans") of Background id 103
----------------------------------------------------------------------
to handle buttonClick
		sysCursor=4
		open viewer "ajuda"
		go to previous page
		show viewer "ajuda"
		sysCursor=1
end buttonClick

----------------------------------------------------------------------
Button id 11 ("Index") of Background id 103
----------------------------------------------------------------------
to handle buttonClick
		sysCursor=4
		open viewer "ajuda"
		currentPage of viewer "ajuda" = page "ajuda"
		show viewer "ajuda"
		sysCursor=1
end buttonClick

----------------------------------------------------------------------
Group id 14 ("botons") of Background id 103
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end
----------------------------------------------------------------------
Page id 320 ("ajugrafics") of Book "C:\Signe2\Signe77.tbk"
----------------------------------------------------------------------
to handle enterPage
	system vtipus
	if vtipus=noanima
	hide field "ocult1" of this page
	hide picture "ocult1" of this page
	else
	show field "ocult1" of this page
	show picture "ocult1" of this page
	end if
end
----------------------------------------------------------------------
Button id 13 ("despres") of Background id 81
----------------------------------------------------------------------
to handle buttonClick
		sysCursor=4
		open viewer "ajuda"
		go to next page
		show viewer "ajuda"
		sysCursor=1
end buttonClick

----------------------------------------------------------------------
Button id 12 ("abans") of Background id 81
----------------------------------------------------------------------
to handle buttonClick
		sysCursor=4
		open viewer "ajuda"
		go to previous page
		show viewer "ajuda"
		sysCursor=1
end buttonClick

----------------------------------------------------------------------
Button id 11 ("Index") of Background id 81
----------------------------------------------------------------------
to handle buttonClick
		sysCursor=4
		open viewer "ajuda"
		currentPage of viewer "ajuda" = page "ajuda"
		show viewer "ajuda"
		sysCursor=1
end buttonClick

----------------------------------------------------------------------
Group id 14 ("botons") of Background id 81
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end
----------------------------------------------------------------------
Page id 287 ("ajufrases") of Book "C:\Signe2\Signe77.tbk"
----------------------------------------------------------------------
to handle enterPage
	system vtipus
	if vtipus=noanima
	hide field "ocult1" of this page
	hide picture "ocult1" of this page
	hide field "ocult2" of this page
	hide picture "ocult2" of this page
	else
	show field "ocult1" of this page
	show picture "ocult1" of this page
	show field "ocult2" of this page
	show picture "ocult2" of this page
	end if
end
----------------------------------------------------------------------
Button id 13 ("despres") of Background id 82
----------------------------------------------------------------------
to handle buttonClick
		sysCursor=4
		open viewer "ajuda"
		go to next page
		show viewer "ajuda"
		sysCursor=1
end buttonClick

----------------------------------------------------------------------
Button id 12 ("abans") of Background id 82
----------------------------------------------------------------------
to handle buttonClick
		sysCursor=4
		open viewer "ajuda"
		go to previous page
		show viewer "ajuda"
		sysCursor=1
end buttonClick

----------------------------------------------------------------------
Button id 11 ("Index") of Background id 82
----------------------------------------------------------------------
to handle buttonClick
		sysCursor=4
		open viewer "ajuda"
		currentPage of viewer "ajuda" = page "ajuda"
		show viewer "ajuda"
		sysCursor=1
end buttonClick

----------------------------------------------------------------------
Group id 14 ("botons") of Background id 82
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end
----------------------------------------------------------------------
Page id 288 ("ajubilingue") of Book "C:\Signe2\Signe77.tbk"
----------------------------------------------------------------------
to handle enterPage
	show group botons of this background
	hide button "despres" of this background
	show button "index" of this background
	show button "abans" of this background
	system vtipus
	if vtipus=noanima
	hide field "ocult1" of this page
	else
	show field "ocult1" of this page
	end if
end	
to handle leavePage
	show button "despres" of this background
	show button "index" of this background
end	
----------------------------------------------------------------------
Button id 7 of Background id 15
----------------------------------------------------------------------
to handle buttonClick
	system vnumvideo
	mmSeek clip vnumvideo to 0 from end
end
----------------------------------------------------------------------
Button id 6 of Background id 15
----------------------------------------------------------------------
to handle doStep
	system vnumvideo
	mmStep clip vnumvideo by 50 wait

end


to handle buttonClick
	send doStep
end

to handle buttonStillDown
	send doStep
end
----------------------------------------------------------------------
Button id 5 of Background id 15
----------------------------------------------------------------------
to handle doStep
	system vnumvideo
	mmStep clip vnumvideo back by 1 wait

end


to handle buttonClick
	send doStep
end

to handle buttonStillDown
	send doStep
end
----------------------------------------------------------------------
Button id 4 of Background id 15
----------------------------------------------------------------------
to handle buttonClick
	system vnumvideo
	mmSeek clip vnumvideo to 0

end
----------------------------------------------------------------------
Button id 3 of Background id 15
----------------------------------------------------------------------
to handle buttonClick
	system vnumvideo
	mmPause clip vnumvideo
end

----------------------------------------------------------------------
Button id 2 of Background id 15
----------------------------------------------------------------------
to handle buttonClick
	system vnumvideo
	mmPlay clip vnumvideo in stage videos1 of this background
end
----------------------------------------------------------------------
Group id 8 ("mmCOntrols") of Background id 15
----------------------------------------------------------------------
to handle mouseEnter
	sysCursor=44
end

to handle mouseleave
	sysCursor=1
end	
----------------------------------------------------------------------
Page id 191 ("videos1") of Book "C:\Signe2\Signe77.tbk"
----------------------------------------------------------------------
to handle enterPage
	system vnumvideo
	mmplay clip signe2 in stage "videos1" of this background
	mmPlay clip vnumvideo in stage "videos1" of this background hold
end	

to handle leavePage
	system vnumvideo
	mmRewind clip vnumvideo
	
end	

135 objects with script, 7514 script lines