﻿var links = new Array ("index", "program", "rada_programowa", "mowcy", "patronaty", "sponsoring", "rejestracja", "dla_autorow_referatow", "lider_its", "wazne_pytania", "do_pobrania", "kontakt", "2011index", "2010index", "2009index", "2008index");
var links_text = new Array (">> Strona główna", ">> Program", ">> Rada programowa", ">> Mówcy", ">> Patronaty, Partnerzy", ">> Sponsoring", ">> Rejestracja", ">> Dla autorów referatów", ">> LIDER ITS", ">> Ważne pytania", ">> Do pobrania", ">> Kontakt", ">> PKITS w 2011 r", ">> PKITS w 2010 r", ">> PKITS w 2009 r", ">> PKITS w 2008 r");
var links_url = new Array ("index.php", "program.php", "rada_programowa.php", "mowcy.php", "patronaty.php", "sponsoring.php", "rejestracja.php", "dla_autorow_referatow.php", "http://www.itspolska.pl/?page=197", "wazne_pytania.php", "do_pobrania.php", "kontakt.php", "2011index.php", "2010index.php", "2009index.php", "2008index.php");
var links_alt =  new Array ("Strona główna", "Program", "Rada programowa", "Mówcy", "atronaty, Partnerzy", "Sponsoring", "Rejestracja", "Dla autorów referatów", "LIDER ITS", "Ważne pytania", "Do pobrania", "Kontakt", "PKITS w 2011 r", "PKITS w 2010 r", "PKITS w 2009 r", "PKITS w 2008 r");
var links_title =  new Array ("Strona główna Polskiego Kongresu ITS", "Program Polskiego Kongresu ITS", "Rada programowa Polskiego Kongresu ITS", "Mówcy Polskiego Kongresu ITS", "Patronaty i Partnerzy Polskiego Kongresu ITS", "Sponsoring na Polskim Kongresie ITS", "Rejestracja na Polski Kongres ITS", "Dla autorów referatów Polskiego Konresu ITS", "LIDER ITS", "Ważne pytania o Polskim Konresie ITS", "Materiały promocyjne do pobrania", "Kontakt z organizatorami Polskiego Konresu ITS", "Edycja 2011 Polskiego Kongresu ITS", "Edycja 2010 Polskiego Kongresu ITS", "Edycja 2009 Polskiego Kongresu ITS", "Edycja 2008 Polskiego Konresu ITS");

/* Resolve the location */
var loc=String(this.location);
loc=loc.split("/");
loc=loc[loc.length-1].split(".");
loc=loc[loc.length-4];

/* Menu generating function */
function dyn_menu_gen()
{ 
    for(var i=0; i<links.length - 4; i++)
    {
        if(loc==links[i] || loc=='')
        { 
            document.write('<tr><a class="strong" style="padding-top:10px; padding-left:10px" href="' + links_url[i] + '" alt="' + links_alt[i] + '" title="' + links_title[i] +'"><strong>' + links_text[i] + '</strong></a></tr>');
        } 
        else
        {
            document.write('<tr><a class="links" style="padding-top:10px; padding-left:10px" href="' + links_url[i] + '" alt="' + links_alt[i] + '" title="' + links_title[i] +'"><strong>' + links_text[i] + '</strong></a></tr>');
        }
    }
	document.write('<tr><a class="old" style="padding-top:10px; padding-left:10px" href="' + links_url[links.length - 4] + '" alt="' + links_alt[i] + '" title="' + links_title[i] + '"><strong>' + links_text[links.length - 4] + '</strong></a></tr>');
	
	document.write('<tr><a class="old" style="padding-top:10px; padding-left:10px" href="' + links_url[links.length - 3] + '" alt="' + links_alt[i] + '" title="' + links_title[i] + '"><strong>' + links_text[links.length - 3] + '</strong></a></tr>');

	document.write('<tr><a class="old" style="padding-top:10px; padding-left:10px" href="' + links_url[links.length - 2] + '" alt="' + links_alt[i] + '" title="' + links_title[i] + '"><strong>' + links_text[links.length - 2] + '</strong></a></tr>');
	
	document.write('<tr><a class="old" style="padding-top:10px; padding-left:10px" href="' + links_url[links.length - 1] + '" alt="' + links_alt[i] + '" title="' + links_title[i] + '"><strong>' + links_text[links.length - 1] + '</strong></a></tr>');
} 

/* Generate the menu */
dyn_menu_gen(); 

