	var fdWinName = "";
var wname = 0;
function showDetails(soln,sec,cnt,col,eId) {
url=urlrewrite('SCHEDULES');
url += "?eId=" + eId + "&soln=" + soln + "&sec=" + sec + "&cnt=" + cnt +"&col=" + col;
w = 550 + cnt * 50;
str = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width="
str = str + w + ",height=600"
fdWinName = window.open(url,"flightDetails"+wname,str);
wname = wname + 1;
}

function daysOfOperation(orderedDayNumbers, daysOp, solutionPosition, sectorPosition, segmentCount, eId){
for(j=1; j<8; j++)
{


dayNumber = orderedDayNumbers.substring(j-1, j);
if(daysOp.indexOf(dayNumber)>-1)
{
var link = "javascript:showDetails(" + solutionPosition + "," + sectorPosition + "," + segmentCount + "," + j + "," + eId +")";
document.write('<td rowspan="' + segmentCount + '"><a href="'+link+'" title="Click here for flight details"><img src="/cms/global/assets/images/site/icon/planeIconSml.gif" alt="Click here for flight details."/></a></td>');
} else {
document.write('<td rowspan="' + segmentCount + '">&nbsp;</td>');
}
}
}

function isChecked()
{
if(document.schedulesquery.ShowReturn.checked == true)
{
document.schedulesquery.ShowReturn.value = "False";
}
else
{
document.schedulesquery.ShowReturn.value = "True";
}
}

function bookFlights(bookingLink)
{
var bookingLinkURL = urlrewrite('fx');
bookingLinkURL += "?" + bookingLink + "&refEvent=scheduleBookNow";
window.location = bookingLinkURL;
}

function lowPrices(lpbmLink)
{
var bookingLinkURL = urlrewrite('low-price-finder');
bookingLinkURL += "?" + lpbmLink + "&refEvent=scheduleFindPrices";
window.location = bookingLinkURL;
}



function dayDropdown(dropdownName, selected)
{
document.writeln('<select class="nlflightbookingselect" name="' + dropdownName + '" id="' + dropdownName + '">');
day=new Array();


for(j=1; j<32; j++)
{
day[j]=j;
}


if(selected=="")
{
today = new Date();
dayIdx = today.getDate();
selected = day[dayIdx];
}



for(i=1; i < day.length; i++)
{
if(selected==day[i])
document.writeln('<option value="' + day[i] + '" selected>');
else
document.writeln('<option value="' + day[i] + '">');

document.writeln(day[i] + '</option>');
}
document.writeln('</select>');
}



var returnMonthFlag=true;
var departMonthFlag=false;


function setMonth(theOB)
{
var myForm=window.document.schedulesquery;
var myOBList=myForm.depMonth;
var myIBList=myForm.retMonth;
if(myOBList.selectedIndex>myIBList.selectedIndex)
{
if(theOB)
{
myIBList.selectedIndex=myOBList.selectedIndex;
}
else
{
myOBList.selectedIndex=myIBList.selectedIndex;
}
}
}
