var counter=4;
var maxlevel=6;
var titles = ["Νικηφόρος Λύτρας-Κάλαντα, 1872 (λεπτομέρεια)", "Βίλχεμ Τρούμπνερ,«Δωμάτιο με μπαλκόνι», 1912", "Νικόλαος Γύζης - Η αποστήθιση, 1883"];

function next(){
if (counter<maxlevel) {
counter=counter+1;
document.getElementById("leftimage").src="images/image"+counter+".jpg";
document.getElementById("lezand").innerHTML=titles[counter-4];
}
if (counter==maxlevel) {
document.getElementById("nextbutton").style.visibility='hidden';
}
document.getElementById("previousbutton").style.visibility='visible';
}

function previous(){
if (counter>4) {
counter=counter-1;
document.getElementById("leftimage").src="images/image"+counter+".jpg";
document.getElementById("lezand").innerHTML=titles[counter-4];
}
if (counter==4) document.getElementById("previousbutton").style.visibility='hidden';
document.getElementById("nextbutton").style.visibility='visible';
}

