pleaseSelectMsgs = new Array();
pleaseSelectMsgs['en'] = "Please select";
pleaseSelectMsgs['de'] = "Bitte w\u00E4hlen Sie";
pleaseSelectMsgs['es'] = "Por favor, seleccione";
pleaseSelectMsgs['fr'] = "Veuillez s\u00E9lectionner";
pleaseSelectMsgs['it'] = "La preghiamo di selezionare";
function smeTitleDropdown(selectedParam)
{

if (typeof selectedParam == 'undefined' || selectedParam == '')
{
selectedParam = "";
}

var languageCode = document.forms.nav_form.language.value;
if (languageCode != 'en' && languageCode != 'de' && languageCode != 'it' && languageCode != 'fr' && languageCode != 'es')
{
languageCode = 'en';
}
var pleaseSelect = pleaseSelectMsgs[languageCode];

document.writeln('<option value="">' + pleaseSelect + '</option>');

for(var i=0; i < TitleList.length; i++)
{
if(titleList[i] == selectedParam)
{
document.writeln('<option value="' + titleList[i] + '" selected>' + titleList[i] + '</option>');
}
else
{
document.writeln('<option value="' + titleList[i] + '">' + titleList[i] + '</option>');
}
}
}
function smeTitleList(titleList, selectedTitle, elementname)
{

var languageCode = document.forms.nav_form.language.value;
if (languageCode != 'en' && languageCode != 'de' && languageCode != 'it' && languageCode != 'fr' && languageCode != 'es')
{
languageCode = 'en';
}
var pleaseSelect = pleaseSelectMsgs[languageCode];
selectBox = document.getElementById(elementname);


var titlesArray = new Array();
titlesArray = titleList.split(":");
for (var counter = 0; counter < titlesArray.length; counter++)
{
var title = titlesArray[counter];
if (title != "" && title != " ")
{
var option = document.createElement("option");
option.text = title;
option.value = title;
selectBox.options.add(option);
if (title == selectedTitle)
{



selectBox.options[counter + 1].selected=true;
}
}
}
}
function smeDropdown(selectedArray,selectedParam,plsSel,id,plsSelValue)
{

if (plsSel == 'Please select')
{
var languageCode = document.forms.nav_form.language.value;
if (languageCode == 'de' || languageCode == 'it' || languageCode == 'fr' || languageCode == 'es')
{
var plsSel = pleaseSelectMsgs[languageCode];
}
}
var hasId = true;
if (typeof id == 'undefined' || id == '' || id == null)
{
id= "";
hasId = false;
}
if (typeof selectedParam == 'undefined' || selectedParam == '' || selectedParam == null)
{
selectedParam = "";
}
if(hasId)
{
var el=document.getElementById(id);
el.remove(0);
if (typeof plsSel != 'boolean' || plsSel)
{
var opt0 = document.createElement("OPTION");
el.appendChild(opt0);
opt0.text = plsSel;
if ( typeof plsSelValue == 'undefined' )
{
opt0.value = plsSel;
}
else
{
opt0.value = plsSelValue;
}
}
for(var i=0; i < selectedArray.length; i++)
{
var opt = document.createElement("OPTION");
el.appendChild(opt);
opt.value = selectedArray[i++];
opt.text =selectedArray[i];

if(opt.value.toLowerCase() == selectedParam.toLowerCase())
{
opt.selected = true;
}
}
}
else
{


if (typeof plsSel != 'boolean' || plsSel)
{
document.writeln('<option value="">' + plsSelect + '</option>');
}
for(var i=0; i < selectedArray.length; i++)
{
if(selectedArray[i].toLowerCase() == selectedParam.toLowerCase())
{
document.writeln('<option value="' + selectedArray[i++] + '" selected>' + selectedArray[i] + '</option>');
}
else
{
document.writeln('<option value="' + selectedArray[i++] + '">' + selectedArray[i] + '</option>');
}
}
}
}
function smeCountryDropdown (countryCode, selectedParam, plsSel, id)
{	
var hasId = true;
var selectedArray;
if (typeof id == 'undefined' || id == '' || id == null)
{
id= "";
hasId = false;
}




if (typeof selectedParam == 'undefined' || selectedParam == '')
{
selectedParam = "";
}


if (typeof countryCode == 'undefined' || countryCode == '' || countryCode == null)
{
selectedArray = countryList;
}

else if (countryCode == "GB" || countryCode == "IE" || countryCode == "IR" || countryCode == "UK")
{
selectedArray = countryListUKorI;
}
else if (countryCode == "US")
{
selectedArray = countryListUS;
}
else if (countryCode == "CA")
{
selectedArray = countryListCA;
}
else if (countryCode == "BE")
{
selectedArray = countryListBenelux;
}
else if (countryCode == "NL")
{
selectedArray = countryListNl;
}
else if (countryCode == "AU")
{
selectedArray = countryListAU;
}
else if (countryCode == "SE")
{
selectedArray = countryListSE;
}

else if (countryCode == "NO")
{
selectedArray = countryListNO;
}

else if (countryCode == "DK")
{
selectedArray = countryListDK;
}
else if (countryCode == "QA" || countryCode == "AE" || countryCode == "BH" || countryCode == "KW" || countryCode == "SA" || countryCode == "OM")
{
selectedArray = countryListMidEast;
}
else if (countryCode == "PK")
{
selectedArray = countryListPK;
}
else if (countryCode == "CN") { selectedArray = new Array("CN", "China"); }
else if (countryCode == "FR") { selectedArray = new Array("FR", "France"); }
else if (countryCode == "PL") { selectedArray = new Array("PL", "Poland"); }
else if (countryCode == "FI") { selectedArray = new Array("FI", "Finland"); }
else if (countryCode == "DE") { selectedArray = new Array("DE", "Germany"); }
else if (countryCode == "HK") { selectedArray = new Array("HK", "Hong Kong"); }
else if (countryCode == "IN") { selectedArray = new Array("IN", "India"); }
else if (countryCode == "IT") { selectedArray = new Array("IT", "Italy"); }
else if (countryCode == "JP") { selectedArray = new Array("JP", "Japan"); }
else if (countryCode == "SG") { selectedArray = new Array("SG", "Singapore"); }
else if (countryCode == "ES") { selectedArray = new Array("ES", "Spain"); }
else if (countryCode == "CH") { selectedArray = new Array("CH", "Switzerland"); }
else if (countryCode == "ZA") { selectedArray = new Array("ZA", "South Africa"); }
else if (countryCode == "BD") { selectedArray = new Array("BD", "Bangladesh"); }
else if (countryCode == "GR") { selectedArray = new Array("GR", "Greece"); }
else if (countryCode == "CZ") { selectedArray = new Array("CZ", "Czech Republic"); }
else if (countryCode == "CY") { selectedArray = new Array("CY", "Cyprus"); }
else if (countryCode == "AT") { selectedArray = new Array("AT", "Austria"); }
else if (countryCode == "HU") { selectedArray = new Array("HU", "Hungary"); }
else if (countryCode == "RO") { selectedArray = new Array("RO", "Romania"); }
else if (countryCode == "RU") { selectedArray = new Array("RU", "Russia"); }
else if (countryCode == "TR") { selectedArray = new Array("TR", "Turkey"); }
else if (countryCode == "EG") { selectedArray = new Array("EG", "Egypt"); }
else if (countryCode == "FI") { selectedArray = new Array("FI", "Finland"); }
else if (countryCode == "IL") { selectedArray = new Array("IL", "Israel"); }
else if (countryCode == "KE") { selectedArray = new Array("KE", "Kenya"); }
else if (countryCode == "UG") { selectedArray = new Array("UG", "Uganda"); }
else if (countryCode == "ZM") { selectedArray = new Array("ZM", "Zambia"); }
else if (countryCode == "ZW") { selectedArray = new Array("ZW", "Zimbabwe"); }
else if (countryCode == "TZ") { selectedArray = new Array("TZ", "Tanzania"); }
else
{
selectedArray = countryList;
}

if(hasId)
{
var el=document.getElementById(id);
el.remove(0);


if (typeof plsSel != 'boolean' || plsSel)
{
var opt0 = document.createElement("OPTION");
el.appendChild(opt0);
if ( typeof plsSel == 'boolean' && plsSel == true )
{
opt0.text = plsSelect;
opt0.value = "";
}
else
{
opt0.text = plsSel;
opt0.value = plsSel;
}
}
for(var i=0; i < selectedArray.length; i++)
{
var opt = document.createElement("OPTION");
el.appendChild(opt);
opt.value = selectedArray[i++];
opt.text =selectedArray[i];
if(opt.value.toLowerCase() == selectedParam.toLowerCase())
{
opt.selected = true;
}
}
}
else
{
if (typeof plsSel != 'boolean' || plsSel)
{
document.writeln('<option value="">' + plsSelect + '</option>');
}
for(var i=0; i < selectedArray.length; i++)
{
if(selectedArray[i].toLowerCase() == selectedParam.toLowerCase())
{
document.writeln('<option value="' + selectedArray[i++] + '" selected>' + selectedArray[i] + '</option>');
}
else
{
document.writeln('<option value="' + selectedArray[i++] + '">' + selectedArray[i] + '</option>');
}
}
}
}
function convertCountriesArray(countries)
{
outputArray = new Array();
for (value in countries)
{
outputArray.push(value);
outputArray.push(countries[value]);
}
return outputArray;
}
function buttonGoBack(formParam)
{
with(formParam)
{
eId.value = eIdGoBack.value;
submit();
}
}
function buttonCancel(formParam)
{
with(formParam)
{
eId.value = eIdCancel.value;
submit();
}
}
function buttonPrevious(formParam)
{
with(formParam)
{
eId.value = eIdPrevious.value;
submit();
}
}
function buttonNext(formParam)
{
with(formParam)
{
eId.value = eIdNext.value;
submit();
}
}
function cb_buildTrail(trailPos, crumbs)
{
var tableWidth = crumbs.length * 150;
document.writeln('<center>');
document.writeln('<table width="' + tableWidth + '" cellpadding="0" cellspacing="3" border="0">');
document.writeln('<tr><td colspan="' + (crumbs.length + 2) + '" height="15"><img src="/cms/s.gif" height="1" width="1" alt=""></td></tr>');
document.writeln('<tr>');
document.writeln('<td width="20"><img src="/cms/s.gif" height="1" width="1"></td>');
for(var i=1; i<=crumbs.length;i++)
{
if(i==trailPos)
{
document.writeln('<td class="statusbarselected">' + i + '</td>');
}
else
{
document.writeln('<td class="statusbarnotselected">' + i + '</td>');
}
}
document.writeln('<td width="20"><img src="/cms/s.gif" height="1" width="1" alt=""></td>');
document.writeln('</tr>');
document.writeln('<tr>');
document.writeln('<td width="20"><img src="/cms/s.gif" height="1" width="1" alt=""></td>');
for(var i=1; i<=crumbs.length;i++)
{
if(i==trailPos)
{
document.writeln('<td class="nlselectedsteptxt" align="center">' + crumbs[i-1] + '</td>');
}
else
{
document.writeln('<td class="nlnonselectedsteptxt" align="center">' + crumbs[i-1] + '</td>');
}
}
document.writeln('<td width="20"><img src="/cms/s.gif" height="1" width="1"></td>');
document.writeln('</tr>');
document.writeln('<tr><td colspan="' + (crumbs.length + 2) + '" height="15"><img src="/cms/s.gif" height="1" width="1"></td></tr>');
document.writeln('</table>');
document.writeln('</center>');
}
function smeShowDiv( id, show )
{
if( show )
{
getElm( id ).style.display = block;
}
else
{
getElm( id ).style.display = none;
}
}
function smeHighLightTab( container, selected, contents )
{

smeSelectTab( selected, contents );


var children = container.childNodes;
for( var y = 0; y < children.length; y++ )
{
var x = children[ y ];
if( x !== selected )
{
smeDeselectTab( x );
}
}
}

function smeSelectTab( tab, contents )
{
tab.className = "smeTabOpen";


var info = document.getElementById( contents );
info.style.display = "block";

var others = info.parentNode.childNodes;
for( var z = 0; z < others.length; z++ )
{
var a = others[ z ];
if( a.nodeType == 1 && a !== info )
{
a.style.display = "none";
}
}
}
function smeDeselectTab( tab )
{
tab.className = "smeTabClosed";
}
function sme_cabinClasses()
{
document.writeln('<option value="econ">Economy (lowest price)</option>');
document.writeln('<option value="econFlex">Economy (flexible ticket)</option>');
document.writeln('<option value="premEcon">Premier Economy (lowest)</option>');
document.writeln('<option value="premEconFlex">Premier Economy (flexible)</option>');
document.writeln('<option value="clubLow">Business/Club (lowest)</option>');
document.writeln('<option value="clubFlex">Business/Club (flexible)</option>');
document.writeln('<option value="firstLow">First (lowest)</option>');
document.writeln('<option value="firstFlex">First (flexible)</option>');
}
function sme_numberDropDown(startNum, maxNum, selectedNum)
{
document.writeln('<option value="">' + plsSelect + '</option>');
for(var i=startNum; i<=maxNum; i++)
{
if (i != selectedNum)
{
document.writeln('<option value="' + i + '">' + i + '</option>');
}
else
{
document.writeln('<option value="' + i + '" selected>' + i + '</option>');
}
}

}
function smeCompleteClaimsFields (count)
{
for(var i=count; i<20; i++)
{
document.writeln('<div id="claimDetails' + i + '">');
document.writeln('<tr>');
document.writeln('<td><input type="text" id="name" name="PassengerLastName' + i + '" size="20" /></td>');
document.writeln('<td><input type="text" id="airlineNo" size="2" name="AirlineNumber' + i + '" /><xsl:text> - </xsl:text><input type="text" id="tktNo" size="8" name="TicketNumber' + i + '" /></td>');
document.writeln('<td><select id="day" name="DayOfFirstFlight' + i + '">');

smeDayDropDownStartBlank();

document.writeln('</td>');
document.writeln('<td style="border-left:0px;"><select id="month" name="MonthOfFirstFlight' + i + '">');

UI_shortMonthDropDownStartBlank();

document.writeln('</td>');

document.writeln('<td style="border-left:0px;"><select id="month" name="YearOfFirstFlight' + i + '">');

smePreviousYearsDropDownStartBlank();

document.writeln('</td></tr></div>');
}
}
function smeClickLink(text, linkurl)
{
document.writeln('<img src="/cms/global/images/icons/smeQuickLinkArrow.gif" alt="'+text+'" /><a style="padding-left:8px; text-decoration:underline; cursor:pointer;" href="'+linkurl+'" title="'+text+'">'+text+'</a>');
}
function validateDateSet( fromDay, fromMonth, fromYear, toDay, toMonth, toYear )
{

var fDay = document.getElementById( fromDay ).value;
var fMonth = document.getElementById( fromMonth ).value;
var fYear = document.getElementById( fromYear ).value;
var tDay = document.getElementById( toDay ).value;
var tMonth = document.getElementById( toMonth ).value;
var tYear = document.getElementById( toYear ).value;


var fDate = new Date( fYear, fMonth, fDay );
var tDate = new Date( tYear, tMonth, tDay );


if( fDate != null && tDate != null )
{


return ( fDate <= tDate );
}
else
{

return false;
}
}
function getMonthIndex( monthName )
{
return refMonth[monthName];
}
function getTodayXmlDate()
{
var today = new Date();
var tDay = today.getDate();
var tMonth = today.getMonth() + 1;
if( tMonth < 10 )
{
tMonth = "0" + tMonth;
}
var tYear = today.getFullYear();
var dateStr = tYear + "-" + tMonth + "-" + tDay;
return dateStr;
}
function hideBLSErrors()
{
if(typeof blsErrors != "undefined")
{
getIdElement("blsErrors").style.display="none";
}
}
<!-- Added for UCT -->
function selectValue(selectElementId,selectedValue){
var elementObj=eval('document.enrol1.'+selectElementId);
var length=elementObj.options.length;
var flag=0;
for(i=0;i<length;i++){
if(elementObj.options[i].value==selectedValue){
elementObj.options.selectedIndex=i;
break;
}
}
}
<!-- UCT ends here-->
