
x=1; //initialize the first variable
y=5; //initialize the variable used to reset the buttons on mouse out
linx = new Array()
linx[1] = new Array(); //First set of links for the top level category
linx[1][1] = "c_late/juris/jurisdiction";
linx[1][2] = "clate/holday/holiday09";
linx[1][3] = "clate/map";
linx[1][4] = "clate/directory/th_il.html";
linx[1][5] = "clate/tmission";

linx[2] = new Array(); //Second set of Links for next top level cateogry
linx[2][1] = "clate/visa";
linx[2][2] = "clate/o-a";
linx[2][3] = "clate/visa2";
linx[2][4] = "clate/diplomatic";
linx[2][5] = "clate/yfever";

linx[3] = new Array(); //Third set of Links for the last top level cateogry
linx[3][1] = "clate/vat";
linx[3][2] = "clate/cus-clear";
linx[3][3] = "clate/au_cuis";
linx[3][4] = "clate/thailand";
linx[3][5] = "clate/anthem";

//This is the function populates the first set of buttons ...
function rollover1() {
document.menu.nav1.value = "Jurisdiction";
document.menu.nav2.value = "Office Hours";
document.menu.nav3.value = "Map";
document.menu.nav4.value = "Directory";
document.menu.nav5.value = "Thai Embassies";
document.menu.dummy.value = 1;
x = document.menu.dummy.value;
return(x);
}
//Function populates the second set of buttons ...
function rollover2() {
document.menu.nav1.value = "General Info";
document.menu.nav2.value = "Retiring Visa";
document.menu.nav3.value = "Investor Visa";
document.menu.nav4.value = "Diplomatic Visa";
document.menu.nav5.value = "Yellow Fever";
document.menu.dummy.value = 2;
x = document.menu.dummy.value;
return(x);
}
//Function populates the third set of buttons ...
function rollover3() {
document.menu.nav1.value = "Tax Refund";
document.menu.nav2.value = "Customs Clearance";
document.menu.nav3.value = "Thailand Brand";
document.menu.nav4.value = "Thailand Info";
document.menu.nav5.value = "Anthem";
document.menu.dummy.value = 3;
x = document.menu.dummy.value;
return(x);
}

//This sends 
function go2url(hlink) {
// set temporary variable temp1 to the value of the dummy hidden field
var temp1 = document.menu.dummy.value;
// set the temporary variable temp2 to link array
var temp2 = (linx[temp1][hlink]);
// Construct the url for the link to point to
window.location = "http://www.thaichicago.net/"+temp2+".html";
}

//If there are no lower tier navigation buttons, this function closes the buttons as the mouse moves off the prevoius link to this.
function rollout() {
//
for (var j=0; j<y; j++) {
document.menu.elements[j].value = "            ";
   }
}


