/* --- http://www.asaptickets.com/js/asaptickets/formFromList.js --- */ var html_code = ''; var fromArr = new Object (); function drawFromList () { html_code = ''; var from = document.getElementById ('formFromList'); from.innerHTML = html_code; } /* --- http://www.asaptickets.com/js/asaptickets/formToList.js --- */ var html_code = ''; var toArr = new Object (); function drawToList () { html_code = ''; var to = document.getElementById ('formToList'); to.innerHTML = html_code; } /* --- http://www.asaptickets.com/js/asaptickets/calendar.js --- */ var html_code = ''; // months var ARR_MONTHS = ["January","February","March","April","May","June","July","August","September","October","November","December"]; // short months var ARR_SHORTMONTHS = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]; // month days var ARR_MONTHDAYS = [31,28,31,30,31,30,31,31,30,31,30,31]; // week day titles as they appear on the calendar var ARR_WEEKDAYS = ["S","M","T","W","T","F","S"]; // day week starts from (normally 0-Su or 1-Mo) var NUM_WEEKSTART = 0; // departure/return date var ARR_DEPARR = ["Departure Date","Return Date"]; var ARR_DEPARR1 = ["leave","return"]; var CDDATE = 0; var CRDATE = 0; function drawCalendar (calendarId,year,month,init) { //alert(calendarId + '/' + year + '/' + month + '/' + init); if (showReturnCalendar || calendarId == 1) { // initiliaze calendar change flag _returnDateChanged = 0; var current_day = new Date (); //var current_day = new Date (year, month - 1, selected_date); var first_day = new Date (year,(month-1),1); if (!init && showReturnCalendar) { var d_y_el = ((calendarId == 2) ? document.getElementById ('formCalendar1month') : document.getElementById ('formCalendar2month')); var d_y = getYearFromVal (d_y_el.value); var d_m = getMonthFromVal (d_y_el.value); if (calendarId == 1) { var dep = (year * 100 + month); var arr = (d_y * 100 + d_m); if (dep > arr) { drawCalendar (2,year,month,0); } } else if (calendarId == 2) { var dep = (d_y * 100 + d_m); var arr = (year * 100 + month); if (dep > arr) { drawCalendar (1,year,month,0); } } } html_code = ''; if (!noCalendars) { html_code += ''; if ((year * 100 + month) > (current_day.getFullYear () * 100 + (current_day.getMonth () + 1))) { html_code += ''; } else { html_code += ''; } html_code += ''; var till = (((current_day.getMonth () + 1) == 1) ? (current_day.getFullYear () * 100 + 12) : ((current_day.getFullYear () + 1) * 100 + current_day.getMonth ())); if ((year * 100 + month) < till) { html_code += ''; } else { html_code += ''; } html_code += ''; } html_code += '
'; if (!noText) { html_code += ''+ARR_DEPARR[(calendarId-1)]+':
'; } // Year + month select html_code += ''; html_code += ''; html_code += '
'+ARR_MONTHS[month-1]+'
'; // var el = document.getElementById ('formCalendar'+calendarId+'month'+year+'-'+month); // el.selected = true; html_code += ''; for (var n = 0; n < 7; n++) { html_code += ''; } html_code += ''; for (var n = 0; n < ((7 - NUM_WEEKSTART + first_day.getDay ()) % 7); n++) { html_code += ''; } var corr = n; for (var a = 0; a < 6; a++) { for (var i = n; i < 7; i++) { if (year == current_day.getFullYear () && month == (current_day.getMonth () + 1) && current_day.getDate () > (a * 7 + i + 1 - corr)) { html_code += ''; } else if (year == current_day.getFullYear () && month == (current_day.getMonth () + 1) && current_day.getDate () == (a * 7 + i + 1 - corr)) { html_code += ''; } else if ((a * 7 + i + 1 - corr) <= getMonthDays (year,month)) { html_code += ''; } else { html_code += ''; } } html_code += ''; n = 0; } html_code += '
'+ARR_WEEKDAYS[(NUM_WEEKSTART+n)%7]+'
 '+(a * 7 + i + 1 - corr)+''+(a * 7 + i + 1 - corr)+''+(a * 7 + i + 1 - corr)+' 
'; // document.write (html_code); // html_code += '
year - '+current_day.getFullYear ()+'
month - '+(current_day.getMonth () + 1)+'
date - '+current_day.getDate ()+'
day - '+first_day.getDay ()+'
first day - '+first_day.getDay ()+'
last date - '+getMonthDays (year,month); var elmntById = document.getElementById ('formCalendar'+calendarId); elmntById.innerHTML = html_code; var sDate; if (calendarId == 1) sDate = (!CDDATE) ? selected_date : CDDATE; else if (calendarId == 2) sDate = (!CRDATE) ? selected_date : CRDATE; clickDay (sDate, calendarId); } } function getMonthDays (year,month) { if ((month) != 2) { return ARR_MONTHDAYS[(month - 1)]; } else { var corr = ((year % 4) == 0 && ((year % 400) == 0 || (year % 100) != 0)) ? 1 : 0; return ARR_MONTHDAYS[(month - 1)] + corr; } } function hiDay (elementId) { if (elementId.className != 'sel1Date') { elementId.className = 'activeDate'; } } function loDay (elementId) { if (elementId.className != 'sel1Date') { elementId.className = 'normalDate'; } } function clearPeriod (calType) { for (var i = 1; i <= 31; i++) { if (document.getElementById ('formCalendar'+calType+i)) { var elmntById = document.getElementById ('formCalendar'+calType+i); if (elmntById.className != 'pastDate') { elmntById.className = 'normalDate'; } } } } function clickDay (elementId,calType) { clearPeriod (calType); if (document.getElementById ('formCalendar'+calType+elementId)) { var el = document.getElementById ('formCalendar'+calType+elementId); if (el.className != 'pastDate') { if (calType == 1) CDDATE = elementId; else if (calType == 2) CRDATE = elementId; el.className = 'sel1Date'; var el1 = document.getElementById ('formCalendar'+calType+'day'); el1.value = elementId; } } } function getYearFromVal (val) { var ar = val.split (/-/); return parseInt (ar[0], 10); } function getMonthFromVal (val) { var ar = val.split (/-/); return parseInt (ar[1], 10); } /* Day in departure calendar was changed */ function changeReturnDate() { var departureMonthElement = document.getElementById('formCalendar1month'); var departureDayElement = document.getElementById('formCalendar1day'); if (_returnDateChanged != 1) { var date = new Date(); date.setFullYear(getYearFromVal(departureMonthElement.value)); date.setMonth(getMonthFromVal(departureMonthElement.value) - 1); // 0-11 date.setDate(parseInt(departureDayElement.value, 10) + 7); drawCalendar(2, date.getFullYear(), date.getMonth() + 1, 0); setCalendarDay(2, date.getDate()); } } function setCalendarDay(calendarId, day) { var dayElement = document.getElementById('formCalendar' + calendarId + 'day'); dayElement.value = day; clickDay(day, calendarId); } function onSelectDepartureDay() { var departureDayElement = document.getElementById('formCalendar1day'); clickDay(departureDayElement.value, '1'); var dayElement = document.getElementById('formCalendar2day'); if (dayElement) { changeReturnDate(); } } /* --- http://www.asaptickets.com/js/asaptickets/main.js --- */ function drawTravelers () { var html_code = ''; html_code += ''; html_code += ''; html_code += ''; html_code += ''; html_code += ''; html_code += ''; html_code += ''; html_code += ''; html_code += ''; var travelers = ['adult','child','infant']; html_code += ''; for (var i = 0; i < travelers.length; i++) { html_code += ''; } html_code += ''; html_code += '
Travellers :
Adult
(12+)
Child
(2-11)
Infant
(< 2)
'; var elmntById = document.getElementById ('formTravelers'); elmntById.innerHTML = html_code; } function drawAbout () { var html_code = ''; html_code += '

'; html_code += ''; html_code += 'Speak to a professional travel agent live by calling toll-free '+phone+'. Our ability to instantly check availability allows us to surpass our competition by manually searching and combining the flights and connections that an automatic reservation system bypasses, thus giving you more options to get the best value for your money. Let us know if you prefer a specific airline so we can offer you the lowest fares and your choice of carrier. Most of the airlines that we represent allow Frequent Flier Mileage Accrual. Live experienced travel agents will look for the availability, research and design the most convenient and specific discounted travel routings.

'; html_code += 'Travel on only the reputable Major airline carriers. With discounts up to 50 percents off of the published airfares - even on last minute departures encourages you to compare our unbeatable rates. By applying our volume discounts to already lowered published fares, we have emerged as one of the Nations leading travel brokerages with access to several wholesale fare-banks, low-yield inventories and consolidated net fares.'; html_code += '
'; html_code += '

'; var elmntById = document.getElementById ('About'); elmntById.innerHTML = html_code; } function drawIATAN () { var html_code = ''; html_code += ''; html_code += ''; html_code += ''; html_code += ''; html_code += ''; html_code += ''; html_code += ''; html_code += '
'; html_code += 'Airfare Wire is a Member of the IATAN Team
Airfare Wire - Member of IATAN Team
'; var elmntById = document.getElementById ('IATAN'); elmntById.innerHTML = html_code; } function drawh1 () { var html_code = '

Cheap International Airline Tickets

'; var elmntById = document.getElementById ('drawh1'); elmntById.innerHTML = html_code; } function change_class (val) { setCookie ('airfarewire_business_class',val,1); } function setCookie (name,value) { document.cookie = name + "=" + escape (value); } function MM_openBrWindow(theURL,winName,features) { window.open(theURL,winName,features); } function addBookmark (title,url) { if (window.sidebar) { // Mozilla Firefox Bookmark window.sidebar.addPanel(title, url,""); } else if( window.external ) { // IE Favorite window.external.AddFavorite( url, title); } else if(window.opera && window.print) { // Opera Hotlist return true; } url_ifr = url + 'add_to_favorites.php'; document.getElementById('ajaxifr').src = url_ifr; } function selectCity (city,cityEl, fc) { document.getElementById ('to').value = city; if (window._lastCitySelection != null) window._lastCitySelection.className = ''; cityEl.className = fc + 'SelCity'; window._lastCitySelection = cityEl; document.getElementById ('to').className = fc + 'SelCityBox'; } function changeCalendars (tripType) { var calendar1 = document.getElementById ('formCalendar1month'); var calendar2 = document.getElementById ('formCalendar2'); if (!tripType) { showReturnCalendar = false; calendar2.innerHTML = ''; } else { showReturnCalendar = true; drawCalendar (2,getYearFromVal (calendar1.value),getMonthFromVal (calendar1.value),0); } } function redirect() { var url = window.src.document.body.innerHTML; url = url.replace(/&/g, "&"); url = url.replace(/^ */g, ""); if (url.match(/^https?:\/\//)) document.location = url; else if (url.match('business')) document.location = './business-class-tickets/?_err_html_code='+escape('

• Unfortunately, we are not able to process your request at this time.To enquire about our discounted airfares, please call our live travel agents get real-time assistance..

')+'&_err_code='+escape(url); else document.location = './?_err_html_code='+escape('

• Unfortunately, we are not able to process your request at this time.To enquire about our discounted airfares, please call our live travel agents get real-time assistance..

')+'&_err_code='+escape(url); } function openOrderTrackingWindow(url) { var width = 763; var height = 450; var centerLeft =Math.floor((screen.width - width) / 2); var properties = "width=" + width + ", height=" + height + ", left=" + centerLeft + ", top=100, scrollbars = 1"; window.open(url, "orderTrackingWindow", properties); } document.getElementsByClassName = function(cl) { var retnode = []; var myclass = new RegExp('\\b'+cl+'\\b'); var elem = this.getElementsByTagName('*'); for (var i = 0; i < elem.length; i++) { var classes = elem[i].className; if (myclass.test(classes)) retnode.push(elem[i]); } return retnode; }; function addDisclaimer(className, discText, fc) { // var i, elems = document.getElementsByClassName(className); // for (i=0; iYour browser either doesn't know how to handle cookies, or refuses to handle them.
" + "

For Internet Explorer

  1. Click on Tools - Internet Options
  2. Select the Privacy tab.
  3. Click the Advanced button.
  4. Check \"Override automatic cookie handling.\"
  5. Check \"Accept\" under \"First-party Cookies\" and \"Third-party Cookies.\"
  6. Click OK to save changes.
  7. Click on \"click here\" in the main window. If the error persists, close and restart your browser.
" + "

Firefox

  1. Click on Tools - Options.
  2. Select the Privacy tab.
  3. Check the \"Accept cookies from sites\" box.
  4. Click OK to save changes.
  5. Click on \"click here\" in the main window. If the error persists, close and restart your browser.
  6. " + "

"; document.getElementById("srchForm").innerHTML = msg; ajax_do('cookie_error.php'); } function removeSearchForm() { document.getElementById("srchForm").innerHTML = ''; } /* --- http://www.asaptickets.com/js/asaptickets/ajax.js --- */ function ajax_do(url) { var jsel = document.createElement('SCRIPT'); jsel.type = 'text/javascript'; jsel.src = url; document.body.appendChild (jsel); }