var currPhoto = 1;
var maxPhoto = 1;

function showHideTip(id)
{
    if(document.getElementById("tip"+id).style.display =="none")
        document.getElementById("tip"+id).style.display ="block";
    else
        document.getElementById("tip"+id).style.display ="none";
}

function showPhoto(id)
{
    document.getElementById("main_photo").src = document.getElementById("photo" + id).src;
    document.getElementById("main_description").innerHTML = document.getElementById("div" + id).innerHTML;
}

function showNextPhoto()
{
    if(currPhoto +1 >= maxPhoto)
        currPhoto = 1;
    else
        currPhoto ++;
        
    showPhoto(currPhoto);
}

function showPrevPhoto()
{
    if(currPhoto -1 < 1)
        currPhoto = maxPhoto-1;
    else
        currPhoto --;
        
    showPhoto(currPhoto);
}
