﻿// Image Gallery functions

var imgNo

// Change home page image
function ImgChange(imgCtrl) {
    //alert(imgCtrl);

    if (imgCtrl == 1) {
        document.getElementById("img1").src = "images/News Thumb Selected.gif";
        document.getElementById("img2").src = "images/Vacancy Thumb.gif";
        document.getElementById("img2").alt = "Vacancies";
        document.getElementById("img3").src = "images/FT Thumb.gif";
        document.getElementById("img3").alt = "Apply Online Today";

        document.getElementById("img4").src = "images/News web splash.jpg";
        document.getElementById("img4").alt = "News";
    }
    else if (imgCtrl == 2) {
        document.getElementById("img1").src = "images/News Thumb.gif";
        document.getElementById("img1").alt = "News";
        document.getElementById("img2").src = "images/Vacancy Thumb Selected.gif";
        document.getElementById("img3").src = "images/FT Thumb.gif";
        document.getElementById("img3").alt = "Apply Online Today";

        document.getElementById("img4").src = "images/Vacancy web splash.jpg";
        document.getElementById("img4").alt = "Vacancies";
    }
    else //if imgCtrl = 3
    {
        document.getElementById("img1").src = "images/News Thumb.gif";
        document.getElementById("img1").alt = "News";
        document.getElementById("img2").src = "images/Vacancy Thumb.gif";
        document.getElementById("img2").alt = "Vacancies";
        document.getElementById("img3").src = "images/FT Thumb Selected.gif"

        document.getElementById("img4").src = "images/FT web splash.jpg";
        document.getElementById("img4").alt = "Apply Online Today";
    }

    imgNo = imgCtrl
}

// Link to page
function ImgLink() {
    //alert('b');

    switch (window.imgNo) {
        case 2:
            window.location = "/work_for_us/current_vacancies.aspx";
            break;
        case 1:
            window.location = "/news.aspx";
            break;
        default:
            window.location = "/trust_members.aspx";
            break;
    }
}
	
