//Functii ptr schimbarea imaginilor din  pagina expeditie:

var nav = ["Voy1", "Voy2", "Voy3"];
function choosennav(idx)
{
    document.getElementById("navfin").src = document.getElementById(nav[idx]).src;
}

var star = ["star1", "star2", "star3"];
function choosestar(idx)
{
    document.getElementById("starfin").src = document.getElementById(star[idx]).src;
}

var cos = ["cos1", "cos2", "cos3"];
function choosecosm(idx)
{
    document.getElementById("cosfin").src = document.getElementById(cos[idx]).src;
}

Apelarea functiilor se face pe evenimentul onclick pus pe imagini

//Functie ptr transmiterea navei spatiale dintr-o pag in alta:

var nav = ["Voy1", "Voy2", "Voy3"];
function choosennav(idx)
{
    document.getElementById("navfin").src = document.getElementById(nav[idx]).src;
    window.localStorage.clear();
    window.localStorage.setItem("nav-selection", document.getElementById(nav[idx]).src);
}


//formular.js

if(!!window.localStorage.getItem("nav-selection"))
{
    document.getElementById("spaceShip").src = window.localStorage.getItem("nav-selection");
}


apelarea din html a formularului.js:
<script src="formular.js"></script>

