﻿/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Jay M. Rumsey, OD | http://www.nova.edu/~rumsey */

var num = 0;

imgArray = [
  ['static/header_menu_1.png', '', ''],
  ['static/header_menu_2.png', '', ''],
  ['static/header_menu_3.png', '', ''],
  ['static/header_menu_4.png', '', ''],
  ['static/header_menu_5.png', '', ''],
  ['static/header_menu_6.png', '', '']
]

$(document).ready(function () {

    var page = window.location;
    var page2 = new String(page);
    var divisao = page2.split('/');

    page = divisao[divisao.length - 1]

    if (page == "Resumo1aCopa.aspx") {
        document.getElementById('ctl00_menu_mypic').src = 'static/header_menu_1.png';
    }
    else if (page == "Campeonato.aspx") {
        document.getElementById('ctl00_menu_mypic').src = 'static/header_menu_2.png';
    }
    else if (page == "EventoTeatro.aspx") {
        document.getElementById('ctl00_menu_mypic').src = 'static/header_menu_3.png';
    }
    else if (page == "EventoRodeio.aspx") {
        document.getElementById('ctl00_menu_mypic').src = 'static/header_menu_4.png';
    }
    else if (page == "EventoGerais.aspx") {
        document.getElementById('ctl00_menu_mypic').src = 'static/header_menu_5.png';
    }
    else if (page == "Genericos.aspx") {
        document.getElementById('ctl00_menu_mypic').src = 'static/header_menu_6.png';
    }

});

function slideshow(slide_num) {
    document.getElementById('ctl00_menu_mypic').src = imgArray[slide_num][0];
    document.getElementById('ctl00_menu_mypic').alt = imgArray[slide_num][1];
}

function slideshowUp() {
    num++;
    num = num % imgArray.length;
    slideshow(num);
}

function slideshowBack() {
    num--;
    if (num < 0) { num = imgArray.length - 1; }
    num = num % imgArray.length;
    slideshow(num);
}
