var timerLoop;
var simSpeed=100;

var ShowProgramID,MyInfo=false;

var Switch=0;
var ProgramID="";
var stopFlag,NextPic=false;
var OpaquePicture;
var nxtStepLeft,nxtStepTop,nxtStepWidth=38,nxtStepHeight=38;
var imgNxtStepSelected,imgNxtStepEnabled;
//int framerate=145;
var OpaquePercent=0;
var isButtonPressed,DrawingFinished=true;
var fontSize=24;
var mx,my;
var LetterColorR=59,LetterColorG=89,LetterColorB=153;
var BackR=255,BackG=255,BackB=255;
var MainAreaColor="rgb("+BackR+","+BackG+","+BackB+")";
var PanelColor="rgb(223,223,223)";
var LetterColor="rgb("+LetterColorR+","+LetterColorG+","+LetterColorB+")";
var ButtonFaceColor="rgb(162,178,212)";
var BottomPanelTop,BottomPanelHeight=80,TopPanelHeight=80;
var imgLogo;
var NoOfCategories=8;

var imgButtons=[];
for(var i=0;i<NoOfCategories;i++){
    imgButtons.push("");
}

var imgButtonsHovered=[];
for(var i=0;i<NoOfCategories;i++){
    imgButtonsHovered.push("");
}

var FileName=[];
for(var i=0;i<NoOfCategories;i++){
    FileName.push("");
}

var AvailableCaptions=[];
for(var i=0;i<NoOfCategories;i++){
    AvailableCaptions.push([]);
    for(var j=0;j<22;j++){
        AvailableCaptions[i].push("");
    }
}

var SelectedImage=[];
for(var i=0;i<NoOfCategories;i++){
    SelectedImage.push(0);
}

var ButtonHover=[];
for(var i=0;i<NoOfCategories;i++){
    ButtonHover.push(false);
}

var SelectedCategory=0;
var Column1Left=2,Column1Top=15;
var logoLeft,logoTop,logoWidth=23,logoHeight=23;


var ImageBorder=4;
//Dimension d;
var img,imgPixel;
var iw=0,ih=0;
var  p,r,g,b;
var  points=[],pixels=[],OpaquePrcnt=[];
var  w,h;

var Sections=[];
for(var i=0;i<NoOfCategories;i++){
    Sections.push("");
}

var SectionTitle=0;
var ImageTop=0;
var BTNTop=0;
var captionToShow="";
var imgData;
//εφφε fade in
var imgOpacity=0;
//εφφε οριζόντιας σάρωσης
var visiblePixels=0;
//εφφε κατακόρυφης σάρωσης
var visibleColumns=0;
//εφφε rgb
var rgbEffectStage=0;
//εφφε κύκλος
var effectRadius=0;
var xCenterOffset=0;
var yCenterOffset=0;
var radiusDenominatior=1;

var noOfEffects=5;
var effectSlctr=0;
