var s1n = new CreateArray(
    "Kladno",
    "Rakovník");

var s2n1 = new CreateArray(
    "všechny oblasti",
    "Kladensko",
    "Slánsko",
    "Novostrašecko",
    "Berounsko" );

var s2u1 = new CreateArray(
    "zobraz.php?lok=2&t=2&p=1&o=0",
    "jaguar.htm",
    "../luxusni/rols.asp",
    "www",
    "www" );

var s2n2 = new CreateArray(
    "všechny oblasti",
    "Rakovncko",
    "Žatecko",
    "Lounsko" );

var s2u2 = new CreateArray(
    "www.yamaha.com",
    "www.honda.com",
    "www",
    "www" );


function CreateArray(){
    this.length = CreateArray.arguments.length
    for (var i = 0; i < this.length; i++)
    this[i + 1] = CreateArray.arguments[i]
} 

var maxLength = 10;
var trueLength = s2n1.length;
var lst = s2n1.length; 

function Jump(theSelect){
    selindex = theSelect.selectedIndex
    selvalue = theSelect.options[selindex].value
    if ( selindex > 0 )
       window.location.href = selvalue
}  


function changeMenu() {
    menuNum = document.menu.select1.selectedIndex;
    if (menuNum == null) return;

    var tempArray1;
    var tempArray2;

    if (menuNum == 0) {
        tempArray1 = s2n1;
        tempArray2 = s2u1;
    }

    if (menuNum == 1) {
        tempArray1 = s2n2;
        tempArray2 = s2u2;
    }


    for (i = lst; i > 0; i--) 
        document.menu.select2.options[i] = null;

    document.menu.select2.options[0] = new Option( "-- Vyberte --" );
    document.menu.select2.options[0].value = "javascript:void()"; 

    for (i = 1; i <= tempArray1.length; i++) { 
        document.menu.select2.options[i] = new Option( tempArray1[i] );
        document.menu.select2.options[i].value = tempArray2[i]; 
    }

    document.menu.select2.options[0].selected = true;
    lst = tempArray1.length;
} 

