countriesddl_js
var CountryDDLID;
var CountryFirstOption;
var ResortDDLID;
var ResortFirstOptionWithoutCountry;
var ResortFirstOptionWithCountry;
var ResortEmpty;
var HREFNewWindow = false;
var HREFPrefix = '';
var HREFSuffix = '';
function ChangeCountry(ddl)
{
var resortsddl = document.getElementById(ResortDDLID);
if (ddl.selectedIndex > 0)//BECAUSE ZERO IS THE CHOOSE COUNTRY OPTION
{
var iCountryIndex = (ddl.selectedIndex - 1);
resortsddl.options.length = 0;
if (aCou[iCountryIndex][1].length > 0)
{
resortsddl.options[0] = new Option(ResortFirstOptionWithCountry, '');
for (var i = 0; i < aCou[iCountryIndex][1].length; i++)
{
resortsddl.options[resortsddl.options.length] = new Option(aCou[iCountryIndex][1][i][0], '/resorts/' + aCou[iCountryIndex][1][i][2] + '/' + aCou[iCountryIndex][1][i][1] + '/index.htm');
}
}
else { resortsddl.options[0] = new Option(ResortEmpty, ''); }
}
else
{
resortsddl.options.length = 0;
resortsddl.options[0] = new Option(ResortFirstOptionWithoutCountry, '');
}
}
function ResortChosen(ddl)
{
var v = ddl.options[ddl.selectedIndex].value;
if (v.length > 0)
{
if(HREFNewWindow == true)
{
window.open(HREFPrefix + v + HREFSuffix);
}
else
{
location.href = HREFPrefix + v + HREFSuffix;
}
}
}
function PopulateCountriesDDL(ddlid)
{
var ddl = document.getElementById(ddlid);
ddl.options.length = 0
ddl.options[0] = new Option(CountryFirstOption, '');
for (var i = 0; i < aCou.length; i++)
{
ddl.options[ddl.options.length] = new Option(aCou[i][0][1], aCou[i][0][0]);
}
}
//> DO NOT REMOVE THIS LINE - FOR OMNI BUILD >