let spellcardnumber=1;
let SPpoints=GetCommonDataDefault("SpellcardPoints",0);
let SPtime=0;
let SPscroll=1;
let SPspellnr=0;
let SPverticalscroll=20;
let SPpage=1;
let SPscrolltime=0;
let SPpagetime=-60;
let SPpagemaxscroll=0;
let SPrememberscroll=[0,0,0,0,0,0,0,0,0,0];
let SPplayspellcard=0;

let SEmenumove1=("\script\SoundEffects\menumove1.wav");
let SEmenuselect1=("\script\SoundEffects\menuselect1.wav");
let SEmenucancel1=("\script\SoundEffects\menucancel1.wav");
let SEmenuunlock=("\script\SoundEffects\menuunlock.wav");

let EFsptext=("\script\Images\OtherEffects\Text.png");

let BGbackgraphic1=("\script\Images\Menu\SpellSelect1.png");
let BGbackgraphic2=("\script\Images\Menu\SpellSelect2.png");
let BGbackgraphic3=("\script\Images\Menu\SpellSelect3.png");
let BGselectiongraphic1=("\script\Images\Menu\Selection1.png");
let BGselectiongraphic2=("\script\Images\Menu\Selection2.png");
let BGdifficultygraphic=("\script\Images\Menu\Difficulties.png");
let BGstagesgraphic1=("\script\Images\Menu\Stages1.png");
let BGstagesgraphic2=("\script\Images\Menu\Stages2.png");
let BGpointsgraphic=("\script\Images\Menu\Points.png");

let BGback1=0;
let BGback2=0;
let BGback3=0;
let BGdifficulty=0;
let BGstages1=0;
let BGstages2=0;
let BGselection1=0;
let BGselection2=0;
let BGpoints=0;
let BGpointsnumbers=[0,0,0];
let BGfade=0;

let letter=0;
let letters=[];
let namexpos=GetClipMinX+50;
let nameypos=GetClipMinY+82;
let namefade=255;
let namecolor=1;
let namered=255;
let namegreen=255;
let nameblue=255;

LoadSE("\script\SoundEffects\menumove1.wav");
LoadSE("\script\SoundEffects\menuselect1.wav");
LoadSE("\script\SoundEffects\menucancel1.wav");
LoadSE("\script\SoundEffects\menuunlock.wav");

LoadGraphic("\script\Images\OtherEffects\Text.png");

LoadGraphic("\script\Images\Menu\SpellSelect1.png");
LoadGraphic("\script\Images\Menu\SpellSelect2.png");
LoadGraphic("\script\Images\Menu\SpellSelect3.png");
LoadGraphic("\script\Images\Menu\Selection1.png");
LoadGraphic("\script\Images\Menu\Selection2.png");
LoadGraphic("\script\Images\Menu\Difficulties.png");
LoadGraphic("\script\Images\Menu\Stages1.png");
LoadGraphic("\script\Images\Menu\Stages2.png");
LoadGraphic("\script\Images\Menu\Points.png");

SetCommonData("BackToSpellcardPractise",0);