			var searchFormVValue=-1;
			var today=new Date();
			var this_year=today.getYear();
			var next_year=this_year+1;
			var xmlHttp;
			var isMozilla = false;
						
		    var departurePointCountry;
		    var departurePointCode;
			var departurePoint;
			var arrivalPointCountry;
			var arrivalPointCode;
			var arrivalPoint;
			var departureDay;
			var departureMonth;
			var departureYear;
			var arrivalDay;
			var arrivalMonth;
			var arrivalYear;
			var numberOfAdults;
			var numberOfChildren;
			var numberOfInfants;
			
			var internalQueryParameters = new Array();
			
			var kelkooSearchResultsLoaded = false;
			var kayakSearchResultsLoaded = false;
			var travelFusionSearchResultsLoaded = false;
			var tsmSearchResultsLoaded = false;
			var mobSearchResultsLoaded = false;
			var skySearchResultsLoaded = false;
			var wegoResultsLoaded = false;
			var momondoResultsLoaded = false;
			var cheapflightsResultsLoaded = false;
			var lastminuteResultsLoaded = false;
			var ebookersResultsLoaded = false;
			var expediaResultsLoaded = false;
			var opodoResultsLoaded = false;
			var netflightsResultsLoaded = false;
			var globaltravelResultsLoaded = false;
			var pricelineResultsLoaded = false;
			var travelocityResultsLoaded = false;
			var thomascookResultsLoaded = false;
			var terminalaResultsLoaded = false;
			var flightsdirectResultsLoaded = false;
			var travelmarketResultsLoaded = false;
			var farecastResultsLoaded = false;
			var flyResultsLoaded = false;
			var easyvoyageResultsLoaded = false;
			var travelgroveResultsLoaded = false;
			var tripadvisorResultsLoaded = false;
			var travelfusionResultsLoaded = false;
			
			var airportMappings = new Array();
			
			var IS_IE = false;
			var IS_MOZILLA = false;
			function setBrowserType()
			{
				if (BrowserDetect.browser == "Firefox")
				{
					IS_MOZILLA = true;
					IS_IE = false;
				}
				else if (BrowserDetect.browser == "Explorer")
				{
					IS_MOZILLA = false;
					IS_IE = true;
				}
			}
			
			function SetCookie() 
			{
				if(arguments.length < 2) 
				{ 
					return; 
				}
				var n = arguments[0];
				var v = arguments[1];
				var d = 0;
				if(arguments.length > 2) 
				{ 
					d = parseInt(arguments[2]); 
				}
				var exp = '';
				if(d > 0) 
				{
					var now = new Date();
					then = now.getTime() + (d * 24 * 60 * 60 * 1000);
					now.setTime(then);
					exp = '; expires=' + now.toGMTString();
				}
				document.cookie = n + "=" + escape(String(v)) + '; path=/' + exp;
			} 
			
			function ReadCookie(n) 
			{
				var cookiecontent = new String();
				if(document.cookie.length > 0) 
				{
					var cookiename = n+ '=';
					var cookiebegin = document.cookie.indexOf(cookiename);
					var cookieend = 0;
					if(cookiebegin > -1) 
					{
						cookiebegin += cookiename.length;
						cookieend = document.cookie.indexOf(";",cookiebegin);
						if(cookieend < cookiebegin) { cookieend = document.cookie.length; }
						cookiecontent = document.cookie.substring(cookiebegin,cookieend);
					}
				}
				return unescape(cookiecontent);
			} 
			
			function setDepartureDateMainForm(y,m,d)
			{
				var departureDaySelect = document.getElementById("departureDay"); 
				var departureMonthSelect = document.getElementById("departureMonth"); 
				var departureYearSelect = document.getElementById("departureYear"); 
				

				departureDaySelect.selectedIndex = d;
				departureMonthSelect.selectedIndex = m;
				departureYearSelect.selectedIndex = y-this_year;								
			}
			
			function getCorrectDay(m,d)
			{
				if (d == 31 && (m==0 || m==2 || m==4 || m==6 || m ==7 || m==9 || m==11))
					return 0;
				else if (d == 30 && (m==1 || m==3 || m==5 || m==8 || m ==10))
					return 0;
				
				return d;
			}
			
			function getCorrectMonth(m,d)
			{
				if (d == 31 && (m==0 || m==2 || m==4 || m==6 || m ==7 || m==9 || m==11))
					return m+1;
				else if (d == 30 && (m==1 || m==3 || m==5 || m==8 || m ==10))
					return m+1;
				
				return m;
			}

			function setReturnDateMainForm(y,m,d)
			{
				var returnDaySelect = document.getElementById("returnDay"); 
				var returnMonthSelect = document.getElementById("returnMonth"); 
				var returnYearSelect = document.getElementById("returnYear"); 
				
				returnDaySelect.selectedIndex = d;
				returnMonthSelect.selectedIndex = m;
				returnYearSelect.selectedIndex = y-this_year;				
			}
			
			function resetDatesMainForm()
			{
				var correctDay = getCorrectDay(today.getMonth(),today.getDate());
				var correctMonth = getCorrectMonth(today.getMonth(),today.getDate());

				setDepartureDateMainForm(today.getYear(), correctMonth, correctDay);
				
				correctDay = getCorrectDay(correctMonth+1, correctDay);
				correctMonth = getCorrectMonth(correctMonth+1, correctDay);


				if (today.getMonth() == 11)
					setReturnDateMainForm(today.getYear()+1, 0, correctDay);
				else
					setReturnDateMainForm(today.getYear(), correctMonth, correctDay);
				
				departurePointCountry = document.getElementById("departurePointCountry");
				departurePointCode = document.getElementById("departurePointCode");
				departurePoint = document.getElementById("departurePoint");
				arrivalPointCountry = document.getElementById("arrivalPointCountry");
				arrivalPointCode = document.getElementById("arrivalPointCode");
				arrivalPoint = document.getElementById("arrivalPoint");
				departureDay = document.getElementById("departureDay");
				departureMonth = document.getElementById("departureMonth");
				departureYear = document.getElementById("departureYear");
				arrivalDay = document.getElementById("returnDay");
				arrivalMonth = document.getElementById("returnMonth");
				arrivalYear = document.getElementById("returnYear");
				numberOfAdults = document.getElementById("numberOfAdults");
				numberOfChildren = document.getElementById("numberOfChildren");
				numberOfInfants = document.getElementById("numberOfInfants");
				
				//populateCountries();
				
				//setBrowserType();
				
				populateDefaultValues();
			}
			
			function populateDefaultValues()
			{
                selectDefaultValue('departurePointCountry', ReadCookie('departurePointCountry'));
                selectDefaultValue('departurePointCode'   , ReadCookie('departurePointCode'));
                
                if (  ReadCookie('departurePoint').length > 0 )
                {
                    selectDefaultValue('departurePoint', ReadCookie('departurePoint'));
                }

                selectDefaultValue('arrivalPointCountry', ReadCookie('arrivalPointCountry'));
                selectDefaultValue('arrivalPointCode'   , ReadCookie('arrivalPointCode'));

                if (  ReadCookie('arrivalPoint').length > 0 )
                {
                    selectDefaultValue('arrivalPoint', ReadCookie('arrivalPoint'));
                }

                selectDefaultValue('departureDay'  , ReadCookie('departureDay'));
                selectDefaultValue('departureMonth', ReadCookie('departureMonth'));
                selectDefaultValue('departureYear' , ReadCookie('departureYear'));

                selectDefaultValue('returnDay'  , ReadCookie('returnDay'));
                selectDefaultValue('returnMonth', ReadCookie('returnMonth'));
                selectDefaultValue('returnYear' , ReadCookie('returnYear'));

                selectDefaultValue('numberOfAdults'  , ReadCookie('numberOfAdults'));
                selectDefaultValue('numberOfChildren', ReadCookie('numberOfChildren'));
                selectDefaultValue('numberOfInfants' , ReadCookie('numberOfInfants'));
			}
			
			function selectDefaultValue(selectObjID, value)
			{
			    var selectObj = document.getElementById(selectObjID); 
			 
				if ( typeof(selectObj.options) != 'undefined' )
				{
				    for (var i=0; i<selectObj.options.length; i++)
				    {
					    if (selectObj.options[i].value == value)
					    {
					 	    selectObj.selectedIndex = i;
						    break;
					    }
				    }
			    }
			    else
			    {
                    selectObj.value = value;
                }
			}
			
			function populateCities(countrySelectID, citySelectID)
			{
				var countrySelectObj = document.getElementById(countrySelectID);
				var selectedCountry = countrySelectObj[countrySelectObj.selectedIndex].value;
				
				var citySelectObj = document.getElementById(citySelectID);
				citySelectObj.length = 1;
				var allCities = airportMappings[selectedCountry];
				
				var counter = 1;
				for (var i=0; i<allCities.length; i+=2)
				{
					var option = new Option(allCities[i+1], allCities[i]);	
					citySelectObj[counter++] = option;
				} 
			}
			
			function submitCommonSearch()
			{
				var uri = 'departure=' + departurePointCode.value;
				uri += '&arrival=' + arrivalPointCode.value;
				uri += '&departureDay=' + departureDay[departureDay.selectedIndex].value;
				uri += '&departureMonth=' + departureMonth[departureMonth.selectedIndex].value;
				uri += '&departureYear=' + departureYear[departureYear.selectedIndex].value;
				uri += '&returnDay=' + arrivalDay[arrivalDay.selectedIndex].value;
				uri += '&returnMonth=' + arrivalMonth[arrivalMonth.selectedIndex].value;
				uri += '&returnYear=' + arrivalYear[arrivalYear.selectedIndex].value;
				uri += '&adults=' + numberOfAdults[numberOfAdults.selectedIndex].value;
				uri += '&children=' + numberOfChildren[numberOfChildren.selectedIndex].value;
				uri += '&infants=' + numberOfInfants[numberOfInfants.selectedIndex].value;
				
				uri += '&departureCountryName=' + departurePointCountry.value;
				uri += '&arrivalCountryName=' + arrivalPointCountry.value;
				uri += '&departureCityName=' + departurePoint.value;
				uri += '&arrivalCityName=' + arrivalPoint.value;
                
                SetCookie('departurePointCountry', departurePointCountry.value, 3000);
                SetCookie('departurePointCode'   , departurePointCode.value   , 3000);
                SetCookie('departurePoint'       , departurePoint.value       , 3000);

                SetCookie('arrivalPointCountry', arrivalPointCountry.value, 3000);
                SetCookie('arrivalPointCode'   , arrivalPointCode.value   , 3000);
                SetCookie('arrivalPoint'       , arrivalPoint.value       , 3000);

                SetCookie('departureDay'  , departureDay[departureDay.selectedIndex].value    , 3000);
                SetCookie('departureMonth', departureMonth[departureMonth.selectedIndex].value, 3000);
                SetCookie('departureYear' , departureYear[departureYear.selectedIndex].value  , 3000);

                SetCookie('returnDay'  , arrivalDay[arrivalDay.selectedIndex].value    , 3000);
                SetCookie('returnMonth', arrivalMonth[arrivalMonth.selectedIndex].value, 3000);
                SetCookie('returnYear' , arrivalYear[arrivalYear.selectedIndex].value  , 3000);

                SetCookie('numberOfAdults'  , numberOfAdults[numberOfAdults.selectedIndex].value, 3000);	
                SetCookie('numberOfChildren', numberOfChildren[numberOfChildren.selectedIndex].value, 3000);
                SetCookie('numberOfInfants' , numberOfInfants[numberOfInfants.selectedIndex].value, 3000);

				window.location="searchflights.html?" + uri;
			}
			
			function _submitCommonSearch()
			{
				searchKelkoo();
				searchKayak();
				searchDohop();
				searchMobissimo();
				searchSkyScanner();
				searchWego();
				searchMomondo();
				searchCheapflights();
				searchLastminute();
				searchEbookers();
				searchExpedia();
				searchOpodo();
				searchNetflights();
				searchGlobaltravel();
				searchPriceline();
				searchTravelocity();
				searchThomascook();
				searchTerminala();
				searchFlightsdirect();
				searchTravelmarket();
				searchFarecast();
				searchFly();
				searchEasyvoyage();
				searchTravelgrove();
				
				wait(2500);
			}

function createCookiev(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}
function readCookiev(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}	

			function searchKelkoo()
			{
			searchKelkooInNewWindow();
 	}

function afrh(hvalue){
document.getElementById("k_main").style.height=hvalue+'px';
}

			function searchKayak()
			{
				var uri = _searchKayakInternal();
				
    			if (IS_MOZILLA)
    			{
    				var kayakIFrame = document.getElementById("kayakIFrame");
    				kayakIFrame.src = uri;
				}
				else if (IS_IE)
				{
					var kayakIFrame = document.getElementById("kayakIFrame");
					
    				kayakIFrame.src = uri;
    			}
			}
			
			function searchKayakInNewWindow()
			{
				var uri = _searchKayakInternal();
				window.open(uri, "kayakSearchResults", "status=1,resizable=yes,width=900,top=200,height=500,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,copyhistory=yes,scrollbars=yes");
			}
			
			function _searchKayakInternal()
			{
				var uri = 'http://trk.acetrk.com/r/BJ/TM/TJ/?url_id=180&url=';
				uri += 'http%3A%2F%2Fwww.kayak.com%2Fs%2Fsearch%2Fair%3Fai%3Datrinsic%26p%3D180%252FTJ%252FTM%26ft%3Drt%26ns%3Dn%26mc%3DGBP%26cb%3De%26l1%3D' + internalQueryParameters["departure"] + '%26l2%3D' + internalQueryParameters["arrival"];
				uri += '%26d1%3D' + internalQueryParameters["departureMonth"] + '%252F' + internalQueryParameters["departureDay"] + '%252F' + internalQueryParameters["departureYear"] + '%26d2%3D' + internalQueryParameters["returnMonth"] + '%252F' + internalQueryParameters["returnDay"] + '%252F' + internalQueryParameters["returnYear"];

				return uri;
			}

			function searchTravelFusion()
			{
				try
				{
					var tfform = null;
					
					if (IS_MOZILLA)
					{
						tfform = document.getElementById('tfIFrame').contentWindow.document.getElementById('TFForm');
					}
					else if (IS_IE)
					{
						tfform = document.frames['tfIFrame'].document.getElementById('TFForm');
					}
					tfform['from'].value = internalQueryParameters["departure"];
					tfform['to'].value = internalQueryParameters["arrival"];
					tfform['journeyType'].value = "return";
					
					tfform['outwardDay'].value = _get2DigitValueForTravelFusion(internalQueryParameters["departureDay"]);
					tfform['outwardMonth'].value = _get2DigitValueForTravelFusion(internalQueryParameters["departureMonth"]) + "-" + internalQueryParameters["departureYear"];
					tfform['returnDay'].value = _get2DigitValueForTravelFusion(internalQueryParameters["returnDay"]);
					tfform['returnMonth'].value = _get2DigitValueForTravelFusion(internalQueryParameters["returnMonth"]) + "-" + internalQueryParameters["returnYear"];
					
					try
					{
						tfform.submit();
						tfform["TFSearch"].click();
					}
					catch(e)
					{
						alert(e.message);
					}
			}
			catch(e)
			{
				alert(e.message);
			}
			}
			
			function searchDohop()
			{
				var uri = _searchDohopInternal();
				
				try
				{
					var tsmIFrame = document.getElementById("tsmIFrame");
					tsmIFrame.src = uri;
				}
				catch(e){}
			}
			
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 searchLiligoInNewWindow()
			{
document.getElementById('background_').style.backgroundPosition='-2010px 0';
				var uri = _searchLiligoInternal();

document.getElementById('k_main').style.position='relative';
document.getElementById('first_div').style.zIndex='1600';
document.getElementById('second_div').style.zIndex='1601';

check_exists('expedia_w');
check_exists('lastminute_w');
check_exists('netflights_w');
check_exists('cheapflights_w');
check_exists('wego_w');

check_exists('kelkoo_w');
check_exists('momondo_w');
check_exists('liligo_w');
check_exists('easyvoyage_w');
check_exists('dohop_w');

var pre_column=document.getElementById('first_column').innerHTML;

var q_chartes='liligo_w';
var do_exist=0;
   var strReplaceAll = pre_column;
var intIndexOfMatch = strReplaceAll.indexOf( q_chartes );
while (intIndexOfMatch != -1){
	strReplaceAll = strReplaceAll.replace( q_chartes, "" )
	intIndexOfMatch = strReplaceAll.indexOf(q_chartes);
	do_exist++;
}

if(do_exist=='0'){
$('#first_column').append('<div id="liligo_w" style="margin:0;padding:0;display:block;"><iframe id="kelkoolFramell" name="kelkoolFramell" frameborder="0" onload="searchResultsLoaded(\'kelkoo\')" style="float:right;width:800px;height:1750px;display:inline;margin:0;padding:0;position:relative;top:-128px;right:0;" scrolling="yes"></iframe></div>');
document.getElementById('kelkoolFramell').src=uri;
go_top();


}
else{
	document.getElementById('liligo_w').style.display='block'; go_top();
}

document.getElementById('kelkoolFramell').style.overflowX='hidden';
document.getElementById('kelkoolFramell').style.overflowY='hidden';

var ismd1=document.getElementById('ad_md1');
var ismd2=document.getElementById('ad_md2');
var ismd3=document.getElementById('ad_md3');
if(ismd1){
document.getElementById('ad_md1').style.display='block';
document.getElementById('ad_md1').style.top='2px';
}
if(ismd2){
document.getElementById('ad_md2').style.display='block';
document.getElementById('ad_md2').style.top='602px';
}
if(ismd3){
document.getElementById('ad_md3').style.display='block';
document.getElementById('ad_md3').style.top='1202px';
}

searchLiligoInNewWindowb();

/*				window.open(uri, "LiligoSearchResults", "status=1,resizable=yes,width=900,top=200,height=500,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,copyhistory=yes,scrollbars=yes");
*/
			}


							function searchLiligoInNewWindowb()
							{
document.getElementById('first_column').style.width='70%';
document.getElementById('second_column').style.width='30%';
document.getElementById('Layer2').style.marginTop='-220px';

						document.getElementById('k_main').style.left='0px';
						document.getElementById('k_main').style.top='0px';
						document.getElementById('k_main').style.height='1800px';
setTimeout('scrollto()',5500);
			}

            function _searchLiligoInternal()
            {

                var uri = 'http://www.anrdoezrs.net/click-3476948-10736967?url=http://www.liligo.co.uk/air/SearchFlights.jsp?roundTrip=roundTrip';
				uri += '&fromLocation=' + internalQueryParameters["departure"];
				uri += '&toLocation=' + internalQueryParameters["arrival"];
				uri += '&depDay=' + internalQueryParameters["departureDay"] + '&depMonth=' + _get1DigitValueForLiligo(internalQueryParameters["departureMonth"]) + '&depYear=' + internalQueryParameters["departureYear"];
				uri += '&retDay=' + internalQueryParameters["returnDay"] + '&retMonth=' + _get1DigitValueForLiligo(internalQueryParameters["returnMonth"]) + '&retYear=' + internalQueryParameters["returnYear"];
				uri += '&adults=' + internalQueryParameters["adults"] + '&children=' + internalQueryParameters["children"] + '&infants=' + internalQueryParameters["children"] + '&class=EC&includeNearbyAirports=on&dtime=anytime&rtime=anytime&depDayInterval=3&retDayInterval=3&searchDomain=liligo.co.uk&utm_medium=affiliationUK&utm_source=CJ&utm_campaign=engines&utm_term=468x60&utm_content=flight';
				return uri;
}
			function _getCodeForDohop(code)
			{
				// special check for London-All
				var newcode = code;
				
				if (code == "LON")
				{
					newcode = "LHR,STN,LTN,LGW,LCY"
				}
				
				return newcode;
			}

			function searchDohopInNewWindow()
			{
document.getElementById('background_').style.backgroundPosition='-4020px 0';
				var uri = _searchDohopInternal();

document.getElementById('k_main').style.position='relative';
document.getElementById('first_div').style.zIndex='1600';
document.getElementById('second_div').style.zIndex='1601';
check_exists('expedia_w');
check_exists('lastminute_w');
check_exists('netflights_w');
check_exists('cheapflights_w');
check_exists('wego_w');

check_exists('kelkoo_w');
check_exists('momondo_w');
check_exists('liligo_w');
check_exists('easyvoyage_w');
check_exists('dohop_w');

var pre_column=document.getElementById('first_column').innerHTML;

var q_chartes='dohop_w';
var do_exist=0;
   var strReplaceAll = pre_column;
var intIndexOfMatch = strReplaceAll.indexOf( q_chartes );
while (intIndexOfMatch != -1){
	strReplaceAll = strReplaceAll.replace( q_chartes, "" )
	intIndexOfMatch = strReplaceAll.indexOf(q_chartes);
	do_exist++;
}

if(do_exist=='0'){
$('#first_column').append('<div id="dohop_w" style="margin:0;padding:0;display:block;"><iframe id="kelkoolFramed" name="kelkoolFramed" frameborder="0" onload="searchResultsLoaded(\'kelkoo\')" style="float:right;width:948px;height:1450px;display:inline;margin:0;padding:0;position:relative;top:-10px;right:0;" scrolling="no"></iframe></div>');
document.getElementById('kelkoolFramed').src=uri;
go_top();


}
else{
	document.getElementById('dohop_w').style.display='block'; go_top();
}

document.getElementById('kelkoolFramed').style.overflowX='hidden';
document.getElementById('kelkoolFramed').style.overflowY='hidden';

var ismd1=document.getElementById('ad_md1');
var ismd2=document.getElementById('ad_md2');
var ismd3=document.getElementById('ad_md3');
if(ismd1){
document.getElementById('ad_md1').style.display='block';
document.getElementById('ad_md1').style.top='2px';
}
if(ismd2){
document.getElementById('ad_md2').style.display='block';
document.getElementById('ad_md2').style.top='602px';
}
if(ismd3){
document.getElementById('ad_md3').style.display='block';
document.getElementById('ad_md3').style.top='1202px';
}

searchDohopInNewWindowb();


/*				window.open(uri, "dohopSearchResults", "status=1,resizable=yes,width=900,top=200,height=500,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,copyhistory=yes,scrollbars=yes");
*/
			}


							function searchDohopInNewWindowb()
							{
if(screen.width<=1152){
document.getElementById('first_column').style.width='95%';
document.getElementById('second_column').style.width='5%';
}
else{
document.getElementById('first_column').style.width='70%';
document.getElementById('second_column').style.width='30%';
}
document.getElementById('Layer2').style.marginTop='-220px';

						document.getElementById('k_main').style.left='0px';
						document.getElementById('k_main').style.top='0px';
						document.getElementById('k_main').style.height='1500px';
setTimeout('scrollto()',5500);
			}
			
			function _searchDohopInternal()
			{
				var uri = 'http://whitelabel.dohop.com/w/cheapflightsfinder/?';
				
				var departureCode = _getCodeForDohop(internalQueryParameters["departure"]); 
				var arrivalCode = _getCodeForDohop(internalQueryParameters["arrival"]); 
				
				uri += 'a1=' + departureCode;
				uri += '&a2=' + arrivalCode;
				uri +='&return=1';
				uri += '&d1=' + _get2DigitValueForTravelFusion(internalQueryParameters["departureDay"]) + _get2DigitValueForTravelFusion(internalQueryParameters["departureMonth"]) + _get2DigitValueForYear(internalQueryParameters["departureYear"]);
				uri += '&d2=' + _get2DigitValueForTravelFusion(internalQueryParameters["returnDay"]) + _get2DigitValueForTravelFusion(internalQueryParameters["returnMonth"]) + _get2DigitValueForYear(internalQueryParameters["returnYear"]);

		return uri;
			}
			
			function searchMobissimo()
			{
				var uri = _searchMobissimoInternal();
				
				try
				{
					var tsmIFrame = document.getElementById("tsmIFrame");
					tsmIFrame.src = uri;
				}
				catch(e){}
			}
			
			function searchMobissimoInNewWindow()
			{
				var uri = _searchMobissimoInternal();
				window.open(uri, "mobissimoSearchResults", "status=1,resizable=yes,width=900,top=200,height=500,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,copyhistory=yes,scrollbars=yes");
			}
			
			function _searchMobissimoInternal()
			{
				var departureCountryName = internalQueryParameters["departureCountryName"];
				var arrivalCountryName = internalQueryParameters["arrivalCountryName"];
				var departureCityName = internalQueryParameters["departureCityName"];
				var arrivalCityName = internalQueryParameters["arrivalCityName"];
								
				var uri = 'http://www.bookingbuddy.co.uk/r/?r=i4398148&host=&argschk=1&search_mode=air&af=1274193&st=roundtrip&nt=1';
			    uri += '&dc=' + departureCityName + '%2C+' + departureCountryName + '+%28' + internalQueryParameters["departure"] + '%29';
				uri += '&ac=' + arrivalCityName + '%2C+' + arrivalCountryName + '+%28' + internalQueryParameters["arrival"] + '%29';
				uri += '&departure_date=' + internalQueryParameters["departureDay"] + '%2F' + _get2DigitValueForTravelFusion(internalQueryParameters["departureMonth"]) + '%2F' + internalQueryParameters["departureYear"] + '&dt=anytime';
				uri += '&return_date=' + internalQueryParameters["returnDay"] + '%2F' +  _get2DigitValueForTravelFusion(internalQueryParameters["returnMonth"]) + '%2F' + internalQueryParameters["returnYear"] + '&rt=anytime&sc=economy_coach';
				return uri;
			}
			
			function searchSkyscanner()
			{
				var uri = _searchSkyscannerInternal();
				
				try
				{
					var tsmIFrame = document.getElementById("tsmIFrame");
					tsmIFrame.src = uri;
				}
				catch(e){}
			}
			
			function searchSkyscannerInNewWindow()
			{
				var uri = _searchSkyscannerInternal();
				window.open(uri, "skyscannerSearchResults", "status=1,resizable=yes,width=900,top=200,height=500,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,copyhistory=yes,copycookies=yes,scrollbars=yes");
			}
			
			function _searchSkyscannerInternal()
			{
				var uri = 'http://www.jdoqocy.com/click-3476948-10644591?sid=&url=http://www.skyscanner.net/flights';
				
				var departureCode = (internalQueryParameters["departure"]); 
				var arrivalCode = _getCodeForDohop(internalQueryParameters["arrival"]); 
								
				uri += '/' + departureCode;
				uri += '/' + arrivalCode;
				uri += '/' + _get2DigitValueForYear(internalQueryParameters["departureYear"]) + _get2DigitValueForTravelFusion(internalQueryParameters["departureMonth"]) + _get2DigitValueForTravelFusion(internalQueryParameters["departureDay"]);
				uri += '/' + _get2DigitValueForYear(internalQueryParameters["returnYear"]) + _get2DigitValueForTravelFusion(internalQueryParameters["returnMonth"]) + _get2DigitValueForTravelFusion(internalQueryParameters["returnDay"]) + '/associateid%3dAFF_NTW_00014_00001%26pid%3d3476948%26aid%3d10644591%26ss%2Daid%3dSPL%26utm_campaign%3dAFF_NTW_00014%26utm_content%3d00001%26utm_source%3dsearchpanel%26utm_medium%3dintegration';
				return uri;
			}
			
			function searchWego()
			{
				var uri = _searchWegoInternal();
				
				try
				{
					var tsmIFrame = document.getElementById("tsmIFrame");
					tsmIFrame.src = uri;
				}
				catch(e){}
			}
			
					function searchWegoInNewWindow()
			{
document.getElementById('background_').style.backgroundPosition='-7035px 0';
				var uri = _searchWegoInternal();
document.getElementById('k_main').style.position='relative';
document.getElementById('first_div').style.zIndex='1600';
document.getElementById('second_div').style.zIndex='1601';

check_exists('expedia_w');
check_exists('lastminute_w');
check_exists('netflights_w');
check_exists('cheapflights_w');
check_exists('wego_w');

check_exists('kelkoo_w');
check_exists('momondo_w');
check_exists('liligo_w');
check_exists('easyvoyage_w');
check_exists('dohop_w');

var pre_column=document.getElementById('first_column').innerHTML;

var q_chartes='wego_w';
var do_exist=0;
   var strReplaceAll = pre_column;
var intIndexOfMatch = strReplaceAll.indexOf( q_chartes );
while (intIndexOfMatch != -1){
	strReplaceAll = strReplaceAll.replace( q_chartes, "" )
	intIndexOfMatch = strReplaceAll.indexOf(q_chartes);
	do_exist++;
}

if(do_exist=='0'){
$('#first_column').append('<div id="wego_w" style="margin:0;padding:0;display:block;"><iframe id="kelkoolFramew" name="kelkoolFramew" frameborder="0" onload="searchResultsLoaded(\'kelkoo\')" style="float:right;width:787px;height:1250px;display:inline;margin:0;padding:0;position:relative;top:-68px;right:0;" scrolling="yes"></iframe></div>');
document.getElementById('kelkoolFramew').src=uri;
go_top();


}
else{
	document.getElementById('wego_w').style.display='block'; go_top();
}

document.getElementById('kelkoolFramew').style.overflowX='hidden';
document.getElementById('kelkoolFramew').style.overflowY='hidden';

var ismd1=document.getElementById('ad_md1');
var ismd2=document.getElementById('ad_md2');
var ismd3=document.getElementById('ad_md3');
if(ismd1){
document.getElementById('ad_md1').style.display='block';
document.getElementById('ad_md1').style.top='2px';
}
if(ismd2){
document.getElementById('ad_md2').style.display='block';
document.getElementById('ad_md2').style.top='602px';
}
if(ismd3){
document.getElementById('ad_md3').style.display='block';
document.getElementById('ad_md3').style.top='1202px';
}

searchWegoInNewWindowb();

/*				window.open(uri, "dohopSearchResults", "status=1,resizable=yes,width=900,top=200,height=500,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,copyhistory=yes,scrollbars=yes");
*/
			}


							function searchWegoInNewWindowb()
							{
if(screen.width<=1152){
document.getElementById('first_column').style.width='90%';
document.getElementById('second_column').style.width='10%';
}
else{
document.getElementById('first_column').style.width='68%';
document.getElementById('second_column').style.width='32%';
}
document.getElementById('Layer2').style.marginTop='-290px';

						document.getElementById('k_main').style.left='0px';
						document.getElementById('k_main').style.top='0px';
						document.getElementById('k_main').style.height='1300px';
setTimeout('scrollto()',5500);
			}
			
			function _searchWegoInternal()
			{
				var departureCountryName = internalQueryParameters["departureCountryName"];
				var arrivalCountryName = internalQueryParameters["arrivalCountryName"];
				var departureCityName = internalQueryParameters["departureCityName"];
				var arrivalCityName = internalQueryParameters["arrivalCityName"];
								
				var uri = 'http://whitelabel.wego.com/flights/progress.html?roundTrip=true';
				uri += '&origin=' + departureCityName + '%2C+' + departureCountryName + '+%28' + internalQueryParameters["departure"] + '%29%2C&from=' + internalQueryParameters["departure"];
				uri += '&destination=' + arrivalCityName + '%2C+' + arrivalCountryName + '+%28' + internalQueryParameters["arrival"] + '%29&to=' + internalQueryParameters["arrival"];
				uri += '&outboundDate=' + internalQueryParameters["departureDay"] + '%2F' + internalQueryParameters["departureMonth"] + '%2F' + internalQueryParameters["departureYear"] + '&outboundTime=Anytime';
				uri += '&inboundDate=' + internalQueryParameters["returnDay"] + '%2F' + internalQueryParameters["returnMonth"] + '%2F' + internalQueryParameters["returnYear"] + '&inboundTime=Anytime';
				uri += '&adults=' + internalQueryParameters["adults"] + '&children=' + internalQueryParameters["children"] + '&cabinClass=Economy&dateformat=%25d%2F%25m%2F%25Y&dateformat_js=dd%2Fmm%2Fyy&siteId=whitelabel.wego.com&aff_aid=dc404691&aff_bid=123&wgz=65cc7'
				return uri;
			}
			
			function searchMomondo()
			{
				var uri = _searchMomondoInternal();
				
				try
				{
					var tsmIFrame = document.getElementById("tsmIFrame");
					tsmIFrame.src = uri;
				}
				catch(e){}
			}
			
	function scrollto(){document.getElementsByTagName('body')[0].style.overflowX='hidden';}

function check_exists(s){
var exists_=document.getElementById(s);
if(exists_){
	exists_.style.display='none';
}
	
}

function go_top(){
SoftScroll.scrollTo(0,0);	
}

function searchKelkooInNewWindow(){
document.getElementById('background_').style.backgroundPosition='0px 0';


check_exists('expedia_w');
check_exists('lastminute_w');
check_exists('netflights_w');
check_exists('cheapflights_w');
check_exists('wego_w');

check_exists('kelkoo_w');
check_exists('momondo_w');
check_exists('liligo_w');
check_exists('easyvoyage_w');
check_exists('dohop_w');

var pre_column=document.getElementById('first_column').innerHTML;

var q_chartes='kelkoo_w';
var do_exist=0;
   var strReplaceAll = pre_column;
var intIndexOfMatch = strReplaceAll.indexOf( q_chartes );
while (intIndexOfMatch != -1){
	strReplaceAll = strReplaceAll.replace( q_chartes, "" )
	intIndexOfMatch = strReplaceAll.indexOf(q_chartes);
	do_exist++;
}


document.getElementById('k_main').style.position='relative';
document.getElementById('first_div').style.zIndex='1600';
document.getElementById('second_div').style.zIndex='1601';


if(do_exist=='0'){
	document.getElementById('first_column').innerHTML='';
if(screen.width<1152){
document.getElementById('first_column').innerHTML='<div id="kelkoo_w" style="margin:0;padding:0;display:block;"><iframe id="kelkoolFramek" name="kelkoolFramek" frameborder="0" onload="searchResultsLoaded(\'kelkoo\')" style="width:862px;float:right;height:2695px;display:inline;margin:0;padding:0;position:relative;top:-225px;z-index:91;" scrolling="yes"></iframe></div>';

}
else{
document.getElementById('first_column').innerHTML='<div id="kelkoo_w" style="margin:0;padding:0;display:block;"><iframe id="kelkoolFramek" name="kelkoolFramek" frameborder="0" onload="searchResultsLoaded(\'kelkoo\')" style="width:1062px;float:right;height:2695px;display:inline;margin:0;padding:0;position:relative;top:-225px;z-index:91;" scrolling="yes"></iframe></div>';

}
}
else{
	document.getElementById('kelkoo_w').style.display='block'; go_top();
}

if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){
			var ieversion=new Number(RegExp.$1)
			 if (ieversion>=6)
			{var bvdt = 'ie';}
			}

if(bvdt=='ie'){
var pointc1='91%';
var pointc2='9%';
var pointc3='86%';
var pointc4='14%';
var pointc5='79%';
var pointc6='21%';
}
else{
var pointc1='90%';
var pointc2='10%';
var pointc3='85%';
var pointc4='15%';
var pointc5='78%';
var pointc6='22%';
}

if(screen.width<1152){
document.getElementById('first_column').style.width=pointc1;
document.getElementById('second_column').style.width=pointc2;
}


else if(screen.width<1440){
document.getElementById('first_column').style.width=pointc3;
document.getElementById('second_column').style.width=pointc4;
}

else if(screen.width<9000){
document.getElementById('first_column').style.width=pointc5;
document.getElementById('second_column').style.width=pointc6;
}

document.getElementById('Layer2').style.marginTop='0px';

var ismd1=document.getElementById('ad_md1');
var ismd2=document.getElementById('ad_md2');
var ismd3=document.getElementById('ad_md3');
if(ismd1){
document.getElementById('ad_md1').style.display='block';
document.getElementById('ad_md1').style.top='12px';
}
if(ismd2){
document.getElementById('ad_md2').style.display='block';
document.getElementById('ad_md2').style.top='612px';
}
if(ismd3){
document.getElementById('ad_md3').style.display='block';
document.getElementById('ad_md3').style.top='1212px';
}

						document.getElementById('k_main').style.left='0px';
						document.getElementById('k_main').style.top='0px';
						document.getElementById('k_main').style.height='2695px';
document.getElementById('Layer2').style.marginTop='-250px';


if(do_exist=='0'){
var kuri='http://clkuk.tradedoubler.com/click?p=3431&a=1209556&g=11468138&url=http://travel.kelkoo.co.uk/ctl/do/checkFlight?catId=172201&departure='+internalQueryParameters['departure']+'&arrival='+internalQueryParameters['arrival']+'&type=Round%2FTrip&departureDate='+_get2DigitValueForTravelFusion(internalQueryParameters["departureDay"])+'%2F'+_get2DigitValueForTravelFusion(internalQueryParameters["departureMonth"])+'%2F'+internalQueryParameters['departureYear']+'&departureTimeOutbounds=&returnDate='+_get2DigitValueForTravelFusion(internalQueryParameters["returnDay"])+'%2F'+_get2DigitValueForTravelFusion(internalQueryParameters["returnMonth"])+'%2F'+internalQueryParameters['returnYear']+'&departureTimeReturn=&nbadults='+internalQueryParameters['adults']+'&nbchilds='+internalQueryParameters['children']+'&nbbabies='+internalQueryParameters['infants'] + '&kpartnerid=96937066';
document.getElementById('kelkoolFramek').src=kuri;
go_top();

}
}

			function searchMomondoInNewWindow()
			{
document.getElementById('background_').style.backgroundPosition='-1005px 0';
				var uri = _searchMomondoInternal();

document.getElementById('k_main').style.position='relative';
document.getElementById('first_div').style.zIndex='1600';
document.getElementById('second_div').style.zIndex='1601';

check_exists('expedia_w');
check_exists('lastminute_w');
check_exists('netflights_w');
check_exists('cheapflights_w');
check_exists('wego_w');

check_exists('kelkoo_w');
check_exists('momondo_w');
check_exists('liligo_w');
check_exists('easyvoyage_w');
check_exists('dohop_w');

var pre_column=document.getElementById('first_column').innerHTML;

var q_chartes='momondo_w';
var do_exist=0;
   var strReplaceAll = pre_column;
var intIndexOfMatch = strReplaceAll.indexOf( q_chartes );
while (intIndexOfMatch != -1){
	strReplaceAll = strReplaceAll.replace( q_chartes, "" )
	intIndexOfMatch = strReplaceAll.indexOf(q_chartes);
	do_exist++;
}

if(do_exist=='0'){
$('#first_column').append('<div id="momondo_w" style="margin:0;padding:0;display:block;"><iframe id="kelkoolFramem" name="kelkoolFramem" frameborder="0" onload="searchResultsLoaded(\'kelkoo\')" style="width:1024px;float:right;height:3600px;display:inline;margin:0;padding:0;position:relative;top:-400px;" scrolling="yes"></iframe></div>');
document.getElementById('kelkoolFramem').src=uri;
go_top();


}
else{
	document.getElementById('momondo_w').style.display='block'; go_top();
}


document.getElementById('kelkoolFramem').style.overflowX='hidden';
document.getElementById('kelkoolFramem').style.overflowY='visible';

var ismd1=document.getElementById('ad_md1');
var ismd2=document.getElementById('ad_md2');
var ismd3=document.getElementById('ad_md3');
if(ismd1){
document.getElementById('ad_md1').style.display='block';
document.getElementById('ad_md1').style.top='2px';
}
if(ismd2){
document.getElementById('ad_md2').style.display='block';
document.getElementById('ad_md2').style.top='602px';
}
if(ismd3){
document.getElementById('ad_md3').style.display='block';
document.getElementById('ad_md3').style.top='1202px';
}

searchMomondoInNewWindowb();
			}

							function searchMomondoInNewWindowb(){
if(screen.width=='1024'){
document.getElementById('first_column').style.width='100%';
document.getElementById('second_column').style.width='0%';
document.getElementById('kelkoolFramem').style.left='-11px';
}
else{
document.getElementById('first_column').style.width='75%';
document.getElementById('second_column').style.width='25%';
}
document.getElementById('Layer2').style.marginTop='-320px';

						document.getElementById('k_main').style.left='0px';
						document.getElementById('k_main').style.top='0px';
						document.getElementById('k_main').style.height='1185px';
setTimeout('scrollto()',5500);
			}
			
			function _searchMomondoInternal()
			{
				var uri = 'http://cheapflightsfinder.momondo.com/Compare_Flights.aspx?Search=true';
				uri += '&O=' + internalQueryParameters["departure"];
				uri += '&D=' + internalQueryParameters["arrival"];
				uri += '&DD=' + _get2DigitValueForTravelFusion(internalQueryParameters["departureDay"]) + '-' + _get2DigitValueForTravelFusion(internalQueryParameters["departureMonth"]) + '-' + internalQueryParameters["departureYear"];
				uri += '&RT=true&RD=' + _get2DigitValueForTravelFusion(internalQueryParameters["returnDay"]) + '-' + _get2DigitValueForTravelFusion(internalQueryParameters["returnMonth"]) + '-' + internalQueryParameters["returnYear"];
				return uri;
			}
			
			function searchCheapflights()
			{
				var uri = _searchCheapflightsInternal();
				
				try
				{
					var tsmIFrame = document.getElementById("tsmIFrame");
					tsmIFrame.src = uri;
				}
				catch(e){}
			}
			
function br_detect(){
			if (/Opera[\/\s](\d+\.\d+)/.test(navigator.userAgent)){
			var oprversion=new Number(RegExp.$1)
			 if (oprversion>=7)
			{var bvdt = 'opera';}
			}
			else if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){
			var ieversion=new Number(RegExp.$1)
			 if (ieversion>=8)
			{var bvdt = 'ie8';}
			 else if (ieversion>=7)
			{var bvdt = 'ie7';}
			 else if (ieversion>=6)
			{var bvdt = 'ie6';}
			}
			else if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){
			var ffversion=new Number(RegExp.$1)
			 if (ffversion>=3)
			  {var bvdt = 'firefox';}
			else if (ffversion>=1)
			  {var bvdt = 'ofirefox';}
			}
			else if (/Chrome[\/\s](\d+\.\d+)/.test(navigator.userAgent)){
			var chromeversion=new Number(RegExp.$1)
			 if (chromeversion>=1)
			  {var bvdt = 'chrome';}
			}
			else if (/Safari[\/\s](\d+\.\d+)/.test(navigator.userAgent)){
			var safariversion=new Number(RegExp.$1)
			 if (safariversion>=1)
			  {var bvdt = 'safari';}
			}
			  return bvdt;
}

	function searchCheapflightsInNewWindow(o)
			{
document.getElementById('background_').style.backgroundPosition='-8040px 0';
				var uri = _searchCheapflightsInternal();
				
				check_exists('expedia_w');
check_exists('lastminute_w');
check_exists('netflights_w');
check_exists('cheapflights_w');
check_exists('wego_w');

check_exists('kelkoo_w');
check_exists('momondo_w');
check_exists('liligo_w');
check_exists('easyvoyage_w');
check_exists('dohop_w');

var pre_column=document.getElementById('first_column').innerHTML;

var q_chartes='cheapflights_w';
var do_exist=0;
   var strReplaceAll = pre_column;
var intIndexOfMatch = strReplaceAll.indexOf( q_chartes );
while (intIndexOfMatch != -1){
	strReplaceAll = strReplaceAll.replace( q_chartes, "" )
	intIndexOfMatch = strReplaceAll.indexOf(q_chartes);
	do_exist++;
}

if(uri=='nonukdep'){
document.getElementById('k_main').style.position='relative';
document.getElementById('first_div').style.zIndex='1600';
document.getElementById('second_div').style.zIndex='1601';

if(do_exist=='0'){
$('#first_column').append('<div id="cheapflights_w" style="margin:0;padding:0;display:block;"><table style="width:100%;margin:0;border:0;border-collapse:collapse;text-align:center;vertical-align:top;position:relative;left:0px;"><tr><td style="width:100%;text-align:center;vertical-align:top;margin:0;padding:0;"><div style="width:400px;display:inline;font-size:13px;font-family:helvetica,arial,verdana,sans-serif;color:#333333;font-weight:bolder;position:relative;top:1px;right:5px;padding:0;margin:0;float:right;">Cheapflights.co.uk only searches for deals departing from the UK - Please select another site from the tabs above</div></td></tr></table></div>');
go_top();


}
else{
	document.getElementById('cheapflights_w').style.display='block'; go_top();
}


var ismd1=document.getElementById('ad_md1');
var ismd2=document.getElementById('ad_md2');
var ismd3=document.getElementById('ad_md3');
if(ismd1){
document.getElementById('ad_md1').style.display='block';
document.getElementById('ad_md1').style.top='2px';
}
if(ismd2){
document.getElementById('ad_md2').style.display='block';
document.getElementById('ad_md2').style.top='602px';
}
if(ismd3){
document.getElementById('ad_md3').style.display='block';
document.getElementById('ad_md3').style.top='1202px';
}


document.getElementById('first_column').style.width='70%';
document.getElementById('second_column').style.width='30%';
document.getElementById('Layer2').style.marginTop='-320px';

						document.getElementById('k_main').style.left='0px';
						document.getElementById('k_main').style.top='0px';
						document.getElementById('k_main').style.height='1185px';
}
else{
if(o!='.'){
document.getElementById('k_main').style.position='relative';
document.getElementById('first_div').style.zIndex='1600';
document.getElementById('second_div').style.zIndex='1601';

if(do_exist=='0'){
$('#first_column').append('<div id="cheapflights_w" style="margin:0;padding:0;display:block;"><table style="width:100%;margin:0;border:0;border-collapse:collapse;text-align:center;vertical-align:top;position:relative;left:0px;padding-bottom:0;"><tr><td style="width:100%;text-align:center;vertical-align:top;margin:0;padding:0;"><iframe id="kelkoolFramec" name="kelkoolFramec" frameborder="0" onload="searchResultsLoaded(\'kelkoo\')" style="width:1024px;height:3200px;display:inline;position:relative;top:-220px;margin:0;padding:0;right:0px;" scrolling="yes"></iframe></td></tr></table></div>');
document.getElementById('kelkoolFramec').src=uri;
go_top();


}
else{
	document.getElementById('cheapflights_w').style.display='block'; go_top();
}


if(screen.width=='1280'){
document.getElementById('kelkoolFramec').style.right='-91px';
document.getElementById('Layer2').style.marginTop='-320px';
}

document.getElementById('kelkoolFramec').style.overflowX='hidden';
document.getElementById('kelkoolFramec').style.overflowY='visible';

var ismd1=document.getElementById('ad_md1');
var ismd2=document.getElementById('ad_md2');
var ismd3=document.getElementById('ad_md3');
if(ismd1){
document.getElementById('ad_md1').style.display='none';
document.getElementById('ad_md1').style.top='2px';
}
if(ismd2){
document.getElementById('ad_md2').style.display='none';
document.getElementById('ad_md2').style.top='602px';
}
if(ismd3){
document.getElementById('ad_md3').style.display='none';
document.getElementById('ad_md3').style.top='1202px';
}

document.getElementById('first_column').style.width='100%';
document.getElementById('second_column').style.width='0%';

var br_tkv=br_detect();
if(br_tkv!='firefox'){
document.getElementById('br_tk').style.top='0px';
}
searchCheapflightsInNewWindowb();


}
if(o=='.'){				window.open(uri, "CheapflightsSearchResults", "status=1,resizable=yes,width=900,top=200,height=500,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,copyhistory=yes,scrollbars=yes");}
}
			}

							function searchCheapflightsInNewWindowb(){

document.getElementById('first_column').style.width='100%';
document.getElementById('second_column').style.width='0%';
document.getElementById('Layer2').style.marginTop='-320px';

						document.getElementById('k_main').style.left='0px';
						document.getElementById('k_main').style.top='0px';
						document.getElementById('k_main').style.height='1185px';
setTimeout('scrollto()',5500);
}
			
			function _searchCheapflightsInternal()
			{
				var uri = 'http://www.qksrv.net/click-1915490-10817109&SID=';
				uri += '?cf-to=' + internalQueryParameters["arrival"];
				uri += '&cf-from=' + internalQueryParameters["departure"];
				uri += '&cf-affiliatenetwork=CommissionJunction&cf-controlname=Banner468x60&cf-url=Home&URL=http%3A%2F%2Fwww.cheapflights.co.uk%2Fworkers%2Fsyndication%2Fredirect.aspx%3Fcf-affiliatenetwork%3DCommissionJunction%26cf-controlname%3DBanner468x60%26cf-url%3DHome%26cf-to%3D' + internalQueryParameters["arrival"] + '%26cf-from%3D' + internalQueryParameters["departure"] + '&SID='; 
var dep=internalQueryParameters["departure"];
if((dep=='ABB') || (dep=='ABZ') || (dep=='ADV') || (dep=='ADX') || (dep=='AYH') || (dep=='BBP') || (dep=='BBS') || (dep=='BEB') || (dep=='BEQ') || (dep=='BEX') || (dep=='BFS') || (dep=='BHD') || (dep=='BHX') || (dep=='BLK') || (dep=='BOH') || (dep=='BOL') || (dep=='BQH') || (dep=='BRR') || (dep=='BRS') || (dep=='BUT') || (dep=='BWF') || (dep=='BZZ') || (dep=='CAX') || (dep=='CBG') || (dep=='CEG') || (dep=='COL') || (dep=='CRN') || (dep=='CSA') || (dep=='CVT') || (dep=='CWL') || (dep=='FAB') || (dep=='FZO') || (dep=='GCI') || (dep=='GLA') || (dep=='GLO') || (dep=='HAW') || (dep=='HUY') || (dep=='IOM') || (dep=='JER') || (dep=='KOI') || (dep=='LBA') || (dep=='LCY') || (dep=='LGW') || (dep=='LHR') || (dep=='LON') || (dep=='LPL') || (dep=='LSI') || (dep=='LTN') || (dep=='NCL') || (dep=='NQY') || (dep=='NWI') || (dep=='MAN') || (dep=='MHZ') || (dep=='MME') || (dep=='MSE') || (dep=='ODH') || (dep=='ORM') || (dep=='PIK') || (dep=='PLH') || (dep=='PSY') || (dep=='QCY') || (dep=='QLA') || (dep=='QUG') || (dep=='RCS') || (dep=='SCS') || (dep=='SOU') || (dep=='STN') || (dep=='SWS') || (dep=='SYY') || (dep=='UHF') || (dep=='DGX') || (dep=='DND') || (dep=='DOC') || (dep=='DSA') || (dep=='EDI') || (dep=='EMA') || (dep=='ENK') || (dep=='ESH') || (dep=='EXT')) {
return uri;
}
				else{return 'nonukdep';}
			}
			
			function searchLastminute()
			{
				var uri = _searchLastminuteInternal();
				
				try
				{
					var tsmIFrame = document.getElementById("tsmIFrame");
					tsmIFrame.src = uri;
				}
				catch(e){}
			}

function increase_width(){
var total_width=document.getElementById('wait_lastminute').style.width;
var total_widthvv=total_width.substr(0,3);
var total_widthvvv=parseInt(total_widthvv);
if(total_widthvvv<320){
document.getElementById('pre_wait_lm').style.display='block';
var p_w=(total_widthvvv+1-0);
document.getElementById('wait_lastminute').style.width=p_w+'px';
setTimeout("increase_width()",260);
}
else{document.getElementById('pre_wait_lm').style.display='none';}
}

		
	function searchLastminuteInNewWindow(o)
			{
document.getElementById('background_').style.backgroundPosition='-6030px 0';
				var uri = _searchLastminuteInternal();
if(o!='.'){
document.getElementById('k_main').style.position='relative';
document.getElementById('first_div').style.zIndex='1600';
document.getElementById('second_div').style.zIndex='1601';
check_exists('expedia_w');
check_exists('lastminute_w');
check_exists('netflights_w');
check_exists('cheapflights_w');
check_exists('wego_w');

check_exists('kelkoo_w');
check_exists('momondo_w');
check_exists('liligo_w');
check_exists('easyvoyage_w');
check_exists('dohop_w');

var pre_column=document.getElementById('first_column').innerHTML;

var q_chartes='lastminute_w';
var do_exist=0;
   var strReplaceAll = pre_column;
var intIndexOfMatch = strReplaceAll.indexOf( q_chartes );
while (intIndexOfMatch != -1){
	strReplaceAll = strReplaceAll.replace( q_chartes, "" )
	intIndexOfMatch = strReplaceAll.indexOf(q_chartes);
	do_exist++;
}

if(do_exist=='0'){
$('#first_column').append('<div id="lastminute_w" style="margin:0;padding:0;display:block;"><table style="width:100%;margin:0;border:0;border-collapse:collapse;text-align:center;vertical-align:top;position:relative;left:-101px;"><tr><td style="width:100%;text-align:center;vertical-align:top;margin:0;padding:0;"><div style="width:100%;margin:0 auto;padding:0;position:relative;text-align:center;" id="pre_wait_lm"><div id="wait_lastminute" style="background:#82abc4;color:#fcfcfc;z-index:1850;padding:0;height:16px;width:101px;margin:0 auto;margin-top:8px;border:1px solid #e1e1e1;border-bottom:1px solid #d3d3d3;border-right:1px solid #d3d3d3;font-family:helvetica,arial,verdana,sans-serif;font-weight:bold;font-size:11px;text-align:left;padding-left:4px;padding-top:2px;">Loading<span id="inside">...</span></div></div><iframe id="kelkoolFramel" name="kelkoolFramel" frameborder="0" onload="searchResultsLoaded(\'kelkoo\')" style="width:800px;height:1600px;display:inline;position:relative;top:-217px;margin:0;padding:0;" scrolling="yes"></iframe><a href=\'javascript:searchLastminuteInNewWindow(".");\' style="text-decoration:none!important;border:0!important;"><img src="http://www.cheapflightsfinder.com/mirror/imagesNEW/NEW_window_Lastminute.gif" style="width:200px;margin:0;border:0!important;display:inline;padding:0;position:absolute;top:165px;" id="br_tk"></a></td></tr></table></div>');
document.getElementById('kelkoolFramel').src=uri;
go_top();


}
else{
	document.getElementById('lastminute_w').style.display='block'; go_top();
}

increase_width();

document.getElementById('kelkoolFramel').style.overflowX='hidden';
document.getElementById('kelkoolFramel').style.overflowY='visible';

var ismd1=document.getElementById('ad_md1');
var ismd2=document.getElementById('ad_md2');
var ismd3=document.getElementById('ad_md3');
if(ismd1){
document.getElementById('ad_md1').style.display='block';
document.getElementById('ad_md1').style.top='2px';
}
if(ismd2){
document.getElementById('ad_md2').style.display='block';
document.getElementById('ad_md2').style.top='602px';
}
if(ismd3){
document.getElementById('ad_md3').style.display='block';
document.getElementById('ad_md3').style.top='1202px';
}

var br_tkv=br_detect();
if(br_tkv!='firefox'){
document.getElementById('br_tk').style.top='0px';
}
searchLastminuteInNewWindowb();

}
if(o=='.'){				window.open(uri, "LastminuteSearchResults", "status=1,resizable=yes,width=900,top=200,height=500,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,copyhistory=yes,scrollbars=yes");}
			}

							function searchLastminuteInNewWindowb(){
document.getElementById('first_column').style.width='100%';
document.getElementById('second_column').style.width='0%';
document.getElementById('Layer2').style.marginTop='-320px';

						document.getElementById('k_main').style.left='0px';
						document.getElementById('k_main').style.top='0px';
						document.getElementById('k_main').style.height='1185px';
setTimeout('scrollto()',5500);
}
	
			
			function _searchLastminuteInternal()
			{
				var uri = 'http://clkuk.tradedoubler.com/click?p(118779)a(1747856)g(17957074)url(http://www.lastminute.com/site/travel/flights/interstitial_page.html?skin=engb.lastminute.com&DPCAT=flights&TRANS=ViewTransportationSearchBox%2CdoSearchForTransportation&DPCLS=X&DPSAC=LMZ&DPDCC=GBP&DPCID=0&DPFIT=&DPSRT=FA&DPHSI=0&DPHEI=9&DPFSI=0&DPFEI=9&DPSFT=&DPLOC=en_GB&DPPID=0&DPTRT=&DPTTT=R&DPDES=&DPXIN=T&DPXCH=T&DPXTR=F&DPXCP=T&DPXAL=F&DPXMG=F&mondial_auto=true&failureURL=http%3A%2F%2Fwww.lastminute.com%2Fsite%2Ftravel%2Fflights%2Fflights-search-error.html&successURL=%2Ftravel%2Fflights%2Ftransport-results.html&intcmp=home1_flights&DPAIR=NONE&isEurostarSearch=False&DP1WF=0'
				uri += '&DPDAP=' + internalQueryParameters["departure"]; 
				uri += '&DPAAP=' + internalQueryParameters["arrival"];
				uri += '&date_out_day=' + internalQueryParameters["departureDay"] + '&date_out_month=' + _get1DigitValueForFlexible(internalQueryParameters["departureMonth"]) + '&DPODT=0001';
				uri += '&date_in_day=' + internalQueryParameters["returnDay"] + '&date_in_month=' + _get1DigitValueForFlexible(internalQueryParameters["returnMonth"]) + '&DPIDT=0001';
				uri += '&DPNOA=' + internalQueryParameters["adults"] + '&DPNOS=0&DPNOC=' + internalQueryParameters["children"] + '&DPNOI=' + internalQueryParameters["infants"] + ')';
				return uri;
			}
			
			function searchEbookers()
			{
				var uri = _searchEbookersInternal();
				
				try
				{
					var tsmIFrame = document.getElementById("tsmIFrame");
					tsmIFrame.src = uri;
				}
				catch(e){}
			}
			
			function searchEbookersInNewWindow()
			{
				var uri = _searchEbookersInternal();
				window.open(uri, "ebookersSearchResults", "status=1,resizable=yes,width=900,top=200,height=500,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,copyhistory=yes,scrollbars=yes");
			}
			
			function _searchEbookersInternal()
			{
				var uri = 'http://clkuk.tradedoubler.com/click?p=190953&a=1747856&g=18698536&url=http://www.netflights.com/flights/flight-results.aspx?';
				uri += 'from=' + internalQueryParameters["departure"];
				uri += '&to=' + internalQueryParameters["arrival"];
				uri += '&itf=False&sof=True&nf=True&chf=True&pf=True&caf=True&depdate=';
				uri +=_get2DigitValueForTravelFusion(internalQueryParameters["departureDay"])+'/';
				uri +=_get2DigitValueForTravelFusion(internalQueryParameters["departureMonth"])+'/';
				uri +=internalQueryParameters["departureYear"];
				uri +='&arrdate=';
				uri +=_get2DigitValueForTravelFusion(internalQueryParameters["returnDay"])+'/';
				uri +=_get2DigitValueForTravelFusion(internalQueryParameters["returnMonth"])+'/';
				uri +=internalQueryParameters["returnYear"];
				uri +='&adults='+internalQueryParameters["adults"];
				uri +='&cabin=Economy';
				return uri;
			}
			
			function searchExpedia()
			{
				var uri = _searchExpediaInternal();
				

				try
				{
					var tsmIFrame = document.getElementById("tsmIFrame");
					tsmIFrame.src = uri;
				}
				catch(e){}
			}
			
			function searchExpediaInNewWindow(o)
			{
document.getElementById('background_').style.backgroundPosition='-5025px 0';
				var uri = _searchExpediaInternal();
if(o!='.'){
document.getElementById('k_main').style.position='relative';
document.getElementById('first_div').style.zIndex='1600';
document.getElementById('second_div').style.zIndex='1601';
check_exists('expedia_w');
check_exists('lastminute_w');
check_exists('netflights_w');
check_exists('cheapflights_w');
check_exists('wego_w');

check_exists('kelkoo_w');
check_exists('momondo_w');
check_exists('liligo_w');
check_exists('easyvoyage_w');
check_exists('dohop_w');

var pre_column=document.getElementById('first_column').innerHTML;

var q_chartes='expedia_w';
var do_exist=0;
   var strReplaceAll = pre_column;
var intIndexOfMatch = strReplaceAll.indexOf( q_chartes );
while (intIndexOfMatch != -1){
	strReplaceAll = strReplaceAll.replace( q_chartes, "" )
	intIndexOfMatch = strReplaceAll.indexOf(q_chartes);
	do_exist++;
}

if(do_exist=='0'){
$('#first_column').append('<div id="expedia_w" style="margin:0;padding:0;display:block;"><table style="width:100%;margin:0;border:0;border-collapse:collapse;text-align:center;vertical-align:top;position:relative;left:-101px;"><tr><td style="width:100%;text-align:center;vertical-align:top;margin:0;padding:0;"><iframe id="kelkoolFrameee" name="kelkoolFrameee" frameborder="0" onload="searchResultsLoaded(\'kelkoo\')" style="width:800px;height:1600px;display:inline;position:relative;top:-101px;margin:0;padding:0;" scrolling="yes"></iframe><a href=\'javascript:searchExpediaInNewWindow(".");\' style="text-decoration:none!important;border:0!important;"><img src="http://www.cheapflightsfinder.com/mirror/imagesNEW/NEW_window_Expedia.gif" style="width:200px;margin:0;border:0!important;display:inline;padding:0;position:absolute;top:165px;" id="br_tk"></a></td></tr></table></div>');
document.getElementById('kelkoolFrameee').src=uri;
go_top();


}
else{
	document.getElementById('expedia_w').style.display='block'; go_top();
}


document.getElementById('kelkoolFrameee').style.overflowX='hidden';
document.getElementById('kelkoolFrameee').style.overflowY='visible';

var ismd1=document.getElementById('ad_md1');
var ismd2=document.getElementById('ad_md2');
var ismd3=document.getElementById('ad_md3');
if(ismd1){
document.getElementById('ad_md1').style.display='block';
document.getElementById('ad_md1').style.top='2px';
}
if(ismd2){
document.getElementById('ad_md2').style.display='block';
document.getElementById('ad_md2').style.top='602px';
}
if(ismd3){
document.getElementById('ad_md3').style.display='block';
document.getElementById('ad_md3').style.top='1202px';
}

var br_tkv=br_detect();

if(br_tkv!='firefox'){
document.getElementById('br_tk').style.top='0px';
}
searchExpediaInNewWindowb();


}
if(o=='.'){				window.open(uri, "ExpediaSearchResults", "status=1,resizable=yes,width=900,top=200,height=500,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,copyhistory=yes,scrollbars=yes");}
			}

							function searchExpediaInNewWindowb(){

document.getElementById('first_column').style.width='100%';
document.getElementById('second_column').style.width='0%';
document.getElementById('Layer2').style.marginTop='-320px';

						document.getElementById('k_main').style.left='0px';
						document.getElementById('k_main').style.top='0px';
						document.getElementById('k_main').style.height='1185px';
setTimeout('scrollto()',5500);
			}
			
			function _searchExpediaInternal()
			{
				var uri = 'http://clkgb.tradedoubler.com/click?p=21874&a=1747856&g=17466108&url=http://www.expedia.co.uk/pub/agent.dll?qscr=fexp&flag=q';
				uri += '&city1=' + internalQueryParameters["departure"];
				uri += '&citd1=' + internalQueryParameters["arrival"];
				uri += '&date1=' + internalQueryParameters["departureDay"] + '/' + _get1DigitValueForFlexible(internalQueryParameters["departureMonth"]) + '/' + internalQueryParameters["departureYear"] + '&time1=362';
				uri += '&date2=' + internalQueryParameters["returnDay"] + '/' + _get1DigitValueForFlexible(internalQueryParameters["returnMonth"]) + '/' + internalQueryParameters["returnYear"] + '&time2=362';
				uri += '&cAdu=' + internalQueryParameters["adults"] + '&cSen=&cChi=' + internalQueryParameters["children"] + '&cInf=' + internalQueryParameters["infants"] + '&infs=1&tktt=&trpt=2&ecrc=&eccn=&qryt=1&load=1&rdct=1&rfrr=&affcid=expe.uk.001.000.1747856.17466108&eapid=737-3';
				return uri;
			}
			
			function searchOpodo()
			{
				var uri = _searchOpodoInternal();
				
				try
				{
					var tsmIFrame = document.getElementById("tsmIFrame");
					tsmIFrame.src = uri;
				}
				catch(e){}
			}
			
			function searchOpodoInNewWindow()
			{
				var uri = _searchOpodoInternal();
				window.open(uri, "opodoSearchResults", "status=1,resizable=yes,width=900,top=200,height=500,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,copyhistory=yes,scrollbars=yes");
			}
			
			function _searchOpodoInternal()
			{
				var uri = 'http://www.opodo.co.uk/opodo/StrutsServlet/AeroSearchFlights?CMP=uk-awin-104251&awc=2729_1275361782_51d3977bd079f0a051b9f2a09388a741&TripType=R&departureTime=ANY&returnTime=ANY&cabinType=E&searchLowCost=1';
				uri += '&departureAirportCode=' + internalQueryParameters["departure"];
				uri += '&arrivalAirportCode=' + internalQueryParameters["arrival"];
				uri += '&CMP=&departureAirport=' + internalQueryParameters["departure"];
				uri += '&arrivalAirport=' + internalQueryParameters["arrival"];
				uri += '&departureDay=' + _get2DigitValueForTravelFusion(internalQueryParameters["departureDay"]);
				uri += '&departureMonth=20' + _get2DigitValueForYear(internalQueryParameters["departureYear"]) + _get2DigitValueForTravelFusion(internalQueryParameters["departureMonth"]) + '&departureTime=ANY';
				uri += '&returnDay=' + _get2DigitValueForTravelFusion(internalQueryParameters["returnDay"]);
				uri += '&returnMonth=20' + _get2DigitValueForYear(internalQueryParameters["returnYear"]) + _get2DigitValueForTravelFusion(internalQueryParameters["returnMonth"]) + '&flexible=1';
				uri += '&numberOfAdults=' + internalQueryParameters["adults"] + '&numberOfChildren=' + internalQueryParameters["children"] + '&numberOfInfants=' + internalQueryParameters["infants"];
				return uri;
			}
			
			function searchNetflights()
			{
				var uri = _searchNetflightsInternal();
				
				try
				{
					var tsmIFrame = document.getElementById("tsmIFrame");
					tsmIFrame.src = uri;
				}
				catch(e){}
			}
function rds(){
alert('3');
}
	function searchNetflightsInNewWindow(o)
			{
document.getElementById('background_').style.backgroundPosition='-9045px 0';
				var uri = _searchNetflightsInternal();
if(o!='.'){
document.getElementById('k_main').style.position='relative';
document.getElementById('first_div').style.zIndex='1600';
document.getElementById('second_div').style.zIndex='1601';

check_exists('expedia_w');
check_exists('lastminute_w');
check_exists('netflights_w');
check_exists('cheapflights_w');
check_exists('wego_w');

check_exists('kelkoo_w');
check_exists('momondo_w');
check_exists('liligo_w');
check_exists('easyvoyage_w');
check_exists('dohop_w');

var pre_column=document.getElementById('first_column').innerHTML;

var q_chartes='netflights_w';
var do_exist=0;
   var strReplaceAll = pre_column;
var intIndexOfMatch = strReplaceAll.indexOf( q_chartes );
while (intIndexOfMatch != -1){
	strReplaceAll = strReplaceAll.replace( q_chartes, "" )
	intIndexOfMatch = strReplaceAll.indexOf(q_chartes);
	do_exist++;
}

if(o=='c'){var ts='1';}
else{var ts='2';}

if(do_exist=='0'){
$('#first_column').append('<div id="netflights_w" style="margin:0;padding:0;display:block;"><table style="width:100%;margin:0;border:0;border-collapse:collapse;text-align:center;vertical-align:top;position:relative;left:-101px;"><tr><td style="width:100%;text-align:center;vertical-align:top;margin:0;padding:0;"><iframe id="kelkoolFramen" name="kelkoolFramen" frameborder="0" onload="searchResultsLoaded(\'kelkoo\')" style="width:880px;height:1600px;display:inline;position:relative;top:-192px;margin:0;padding:0;" scrolling="yes"></iframe><a href=\'javascript:searchNetflightsInNewWindow(".");\' style="text-decoration:none!important;border:0!important;"><img src="http://www.cheapflightsfinder.com/imagesNEW/NEW_window_Ebookers.gif" style="width:200px;margin:0;border:0!important;display:inline;padding:0;position:absolute;top:165px;" id="br_tk"></a><inpu type="hidden" id="ie_hd" value="'+ts+'"></td></tr></table></div>');
document.getElementById('kelkoolFramen').src=uri;
go_top();


}
else{
	document.getElementById('netflights_w').style.display='block'; go_top();
	document.getElementById('ie_hd').value=ts;
}

document.getElementById('kelkoolFramen').style.overflowX='hidden';
document.getElementById('kelkoolFramen').style.overflowY='visible';
var ismd1=document.getElementById('ad_md1');
var ismd2=document.getElementById('ad_md2');
var ismd3=document.getElementById('ad_md3');
if(ismd1){
document.getElementById('ad_md1').style.display='block';
document.getElementById('ad_md1').style.top='2px';
}
if(ismd2){
document.getElementById('ad_md2').style.display='block';
document.getElementById('ad_md2').style.top='602px';
}
if(ismd3){
document.getElementById('ad_md3').style.display='block';
document.getElementById('ad_md3').style.top='1202px';
}

var br_tkv=br_detect();
if(br_tkv!='firefox'){
document.getElementById('br_tk').style.top='0px';
}

searchNetflightsInNewWindowb();


}
if(o=='.'){				window.open(uri, "NetflightsSearchResults", "status=1,resizable=yes,width=900,top=200,height=500,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,copyhistory=yes,scrollbars=yes");}
			}

							function searchNetflightsInNewWindowb(){

document.getElementById('first_column').style.width='100%';
document.getElementById('second_column').style.width='0%';
document.getElementById('Layer2').style.marginTop='-320px';

						document.getElementById('k_main').style.left='0px';
						document.getElementById('k_main').style.top='0px';
						document.getElementById('k_main').style.height='1185px';


var br_tkv=br_detect();
if((br_tkv=='ie8') || (br_tkv=='ie7') || (br_tkv=='ie6')){
var pre_ie=document.getElementById('ie_hd').value;
if(pre_ie!='1'){
setTimeout('searchNetflightsInNewWindow("c")',4000);
setTimeout('scrollto()',5500);
}
else{
setTimeout('scrollto()',5500);
}
}

}

			
			function _searchNetflightsInternal()
			{
				var uri = 'http://clkgb.tradedoubler.com/click?p=288&a=1209556&g=962061&url=http://www.ebookers.com/shop/airsearch?type=air&search=Search&ar.type=roundTrip';
				uri += '&ar.rt.numAdult=' + internalQueryParameters["adults"] + '&ar.rt.returnSlice.time=Anytime&ar.rt.leaveSlice.time=Anytime';
				uri += '&ar.rt.leaveSlice.dest.key=' + internalQueryParameters["arrival"];
				uri += '&ar.rt.returnSlice.date=' + _get2DigitValueForTravelFusion(internalQueryParameters["returnDay"]) + '%2F' + _get2DigitValueForTravelFusion(internalQueryParameters["returnMonth"]) + '%2F' + _get2DigitValueForYear(internalQueryParameters["returnYear"]);
				uri += '&ar.rt.leaveSlice.date=' + _get2DigitValueForTravelFusion(internalQueryParameters["departureDay"]) + '%2F' + _get2DigitValueForTravelFusion(internalQueryParameters["departureMonth"]) + '%2F' + _get2DigitValueForTravelFusion(internalQueryParameters["departureYear"]);
				uri += '&ar.rt.leaveSlice.orig.key=' + internalQueryParameters["departure"] + '&ar.rt.cabin=C';

				return uri;
			}
			
			function searchGlobaltravel()
			{
				var uri = _searchGlobaltravelInternal();
				
				try
				{
					var tsmIFrame = document.getElementById("tsmIFrame");
					tsmIFrame.src = uri;
				}
				catch(e){}
			}
			
			function searchGlobaltravelInNewWindow()
			{
				var uri = _searchGlobaltravelInternal();
				window.open(uri, "globaltravelSearchResults", "status=1,resizable=yes,width=900,top=200,height=500,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,copyhistory=yes,scrollbars=yes");
			}
			
			function _searchGlobaltravelInternal()
			{
				var uri = 'http://www.globaltravelmarket.co.uk/flights-engine/?action=search&client=gtmCorporateSite';
				uri += '&passengers=' + internalQueryParameters["adults"];
				uri += '&departureDate=' + _get2DigitValueForTravelFusion(internalQueryParameters["departureDay"]) + _get2DigitValueForTravelFusion(internalQueryParameters["departureMonth"]) + internalQueryParameters["departureYear"];
				uri += '&returnDate=' + _get2DigitValueForTravelFusion(internalQueryParameters["returnDay"]) + _get2DigitValueForTravelFusion(internalQueryParameters["returnMonth"]) + internalQueryParameters["returnYear"];
				uri += '&departure=' + internalQueryParameters["departure"];
				uri += '&destination=' + internalQueryParameters["arrival"] + '&cabin=e&trip=2&popup=true&departureTime=0&returnTime=0';
				return uri;
			}
			
			function searchPriceline()
			{
				var uri = _searchPricelineInternal();
				
				try
				{
					var tsmIFrame = document.getElementById("tsmIFrame");
					tsmIFrame.src = uri;
				}
				catch(e){}
			}
			
			function searchPricelineInNewWindow()
			{
				var uri = _searchPricelineInternal();
				window.open(uri, "pricelineSearchResults", "status=1,resizable=yes,width=900,top=200,height=500,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,copyhistory=yes,scrollbars=yes");
			}
			
			function _searchPricelineInternal()
			{
				var uri = 'http://ww3.priceline.co.uk/site/travel/flights/interstitial_page.html?skin=engb_priceline&DPCAT=flights_list&TRANS=ViewTransportationSearchBox%2CdoSearchForTransportation&DPSAC=TPR&DPDCC=GBP&DPCID=0&DPFIT=&DPSRT=FA&DPHSI=0&DPHEI=2&DPFSI=0&DPFEI=9&DPSFT=&DPLOC=en_GB&DPPID=4000&DPTRT=flights&DPTTT=R&DPDES=&DPXIN=F&DPXCH=F&DPXTR=F&DPXCP=F&DPXAL=F&DPXMG=F&mondial_auto=true&failureURL=http%3A%2F%2Fww3.priceline.co.uk%2Fsite%2Ftravel%2Fflights%2Fflights-search-error.html&successURL=%2Ftravel%2Fflights%2Ftransport-results.html&isEurostarSearch=False&DP1WF=0';
				uri += '&DPDAP=' + internalQueryParameters["departure"];
				uri += '&DPAAP=' + internalQueryParameters["arrival"];
				uri += '&date_out_day=' + internalQueryParameters["departureDay"];
				uri += '&date_out_month=' + _get1DigitValueForFlexible(internalQueryParameters["departureMonth"]) + '&DPODT=0001'
				uri += '&date_in_day=' + internalQueryParameters["returnDay"];
				uri += '&date_in_month=' + _get1DigitValueForFlexible(internalQueryParameters["returnMonth"]) + '&DPIDT=0001&DPCAL=1&DPCLS=X&DPAIR=NONE&DPNOA=' + internalQueryParameters["adults"] + '&DPNOS=0&DPNOC=' + internalQueryParameters["children"] + '&DPNOI=' + internalQueryParameters["infants"] + '&x=11&y=17';
				return uri;
			}
			
			function searchTravelocity()
			{
				var uri = _searchTravelocityInternal();
				
				try
				{
					var tsmIFrame = document.getElementById("tsmIFrame");
					tsmIFrame.src = uri;
				}
				catch(e){}
			}
			
			function searchTravelocityInNewWindow()
			{
				var uri = _searchTravelocityInternal();
				window.open(uri, "travelocitySearchResults", "status=1,resizable=yes,width=900,top=200,height=500,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,copyhistory=yes,scrollbars=yes");
			}
			
			function _searchTravelocityInternal()
			{
				var uri = 'http://www.travelocity.co.uk/site/travel/flights/transport-results.html?skin=engb.travelocity.co.uk&mondial_auto=true&DPSRT=FA&DPNOC=' + internalQueryParameters["children"] + '&DPNOA=' + internalQueryParameters["adults"] + '&DPNOI=' + internalQueryParameters["infants"] + '&DPLOC=en_GB&DPNOS=0&DPHSI=0';
				uri += '&date_in_month=' + _get1DigitValueForFlexible(internalQueryParameters["returnMonth"]) + '&DPXCP=T&DPFSI=0&DPCID=0&DPXAL=F&DPTRT=flights&DPSFT=&DPXTR=F&DPTTT=R&DPBFT=False&DPXCH=F&DPXMG=F&DPHEI=9&failureURL=http%3A%2F%2Fwww.travelocity.co.uk%2Fsite%2Ftravel%2Fflights%2Fflights-search-error.html';
				uri += '&DPDAP=' + internalQueryParameters["departure"] + '&DPBFE=False&DPXIN=F&DPCLS=X&DPPID=8000';
				uri += '&date_out_month=' + _get1DigitValueForFlexible(internalQueryParameters["departureMonth"]) + '&DPFEI=9&TRANS=ViewTransportationSearchBox%2CdoSearchForTransportation&DPSAC=T1F';
				uri += '&date_out_day=' + internalQueryParameters["departureDay"] + '&DPDCC=GBP&DPIDT=0001&DP1WF=0&DPFIT=flights&DPODT=0001';
				uri += '&DPAAP=' + internalQueryParameters["arrival"] + '&DPAIR=NONE';
				uri += '&date_in_day=' + internalQueryParameters["returnDay"];
				return uri;
			}
			
			function searchThomascook()
			{
				var uri = _searchThomascookInternal();
				
				try
				{
					var tsmIFrame = document.getElementById("tsmIFrame");
					tsmIFrame.src = uri;
				}
				catch(e){}
			}
			
			function searchThomascookInNewWindow()
			{
				var uri = _searchThomascookInternal();
				window.open(uri, "thomascookSearchResults", "status=1,resizable=yes,width=900,top=200,height=500,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,copyhistory=yes,scrollbars=yes");
			}
			
			function _searchThomascookInternal()
			{
				var uri = 'http://www.jdoqocy.com/click-3476948-10644875?url=http://www.skyscanner.net/redir?url=www%2Ethomascook%2Ecom&w=a272&t=p';
				uri += '&fromport=' + internalQueryParameters["departure"];
				uri += '&toport=' + internalQueryParameters["arrival"] + '&langid=en';
				uri += '&departuredate=' + _get2DigitValueForYear(internalQueryParameters["departureYear"]) + _get2DigitValueForTravelFusion(internalQueryParameters["departureMonth"]) + _get2DigitValueForTravelFusion(internalQueryParameters["departureDay"]);
				uri += '&returndate=' + _get2DigitValueForYear(internalQueryParameters["returnYear"]) + _get2DigitValueForTravelFusion(internalQueryParameters["returnMonth"]) + _get2DigitValueForTravelFusion(internalQueryParameters["returnDay"]) + '&src=alsoflies&cat=trava&wl=23472076&rtn=true&aid=';
				uri += '&adults=' + internalQueryParameters["adults"] + '&children=' + internalQueryParameters["children"] + '&infants=' + internalQueryParameters["infants"] + '&window=1?associateid=AFF_NTW_00014_00001';
				return uri;
			}
			
			function searchTerminala()
			{
				var uri = _searchTerminalaInternal();
				
				try
				{
					var tsmIFrame = document.getElementById("tsmIFrame");
					tsmIFrame.src = uri;
				}
				catch(e){}
			}
			
			function searchTerminalaInNewWindow()
			{
				var uri = _searchTerminalaInternal();
				window.open(uri, "terminalaSearchResults", "status=1,resizable=yes,width=900,top=200,height=500,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,copyhistory=yes,scrollbars=yes");
			}
			
			function _searchTerminalaInternal()
			{
				var uri = 'http://www.jdoqocy.com/click-3476948-10644875?url=http://www.skyscanner.net/redir?url=www%2Eterminala%2Ecom&w=a942&t=p';
				uri += '&fromport=' + internalQueryParameters["departure"];
				uri += '&toport=' + internalQueryParameters["arrival"] + '&langid=en';
				uri += '&departuredate=' + _get2DigitValueForYear(internalQueryParameters["departureYear"]) + _get2DigitValueForTravelFusion(internalQueryParameters["departureMonth"]) + _get2DigitValueForTravelFusion(internalQueryParameters["departureDay"]);
				uri += '&returndate=' + _get2DigitValueForYear(internalQueryParameters["returnYear"]) + _get2DigitValueForTravelFusion(internalQueryParameters["returnMonth"]) + _get2DigitValueForTravelFusion(internalQueryParameters["returnDay"]) + '&src=alsoflies&cat=trava&wl=23472076&rtn=true&aid=';
				uri += '&adults=' + internalQueryParameters["adults"] + '&children=' + internalQueryParameters["children"] + '&infants=' + internalQueryParameters["infants"] + '&window=1?associateid=AFF_NTW_00014_00001';
				return uri;
			}
			
			function searchFlightsdirect()
			{
				var uri = _searchFlightsdirectInternal();
				
				try
				{
					var tsmIFrame = document.getElementById("tsmIFrame");
					tsmIFrame.src = uri;
				}
				catch(e){}
			}
			
			function searchFlightsdirectInNewWindow()
			{
				var uri = _searchFlightsdirectInternal();
				window.open(uri, "flightsdirectSearchResults", "status=1,resizable=yes,width=900,top=200,height=500,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,copyhistory=yes,scrollbars=yes");
			}
			
			function _searchFlightsdirectInternal()
			{
				var uri = 'http://www.flightsdirect.com/buildyourown/results/results_xsl.aspx?rating=0&r3c_ages=2,%202,%202&_stage=search&currentSearchMethodFlag=predictiveSearchDiv&duration= a number of&rooms=1&car_hire_selected=no&search_type=Flight';
				uri += '&seats_adult=' + internalQueryParameters["adults"] + '&r1a=1&r2c=0';
				uri += '&rtnDate=' + _get2DigitValueForTravelFusion(internalQueryParameters["returnDay"]) + '/' + _get2DigitValueForTravelFusion(internalQueryParameters["returnMonth"]) + '/' + internalQueryParameters["returnYear"];
				uri += '&seats_infant=' + internalQueryParameters["infants"] + '&r2i_ages=0&r3i=0&optSearchType=Flight&freetext=' + internalQueryParameters["arrival"] + '&r1i=0&requestType=airports&r2i=0&lstCountry=-&flexibility=3&oneway=false&r1c_ages=2,%202,%202&r3a=1&r3i_ages=0&locationto=' + internalQueryParameters["arrival"] + '&r2a=1&r2c_ages=2,%202,%202&r3c=0';
				uri += '&startdate=' + _get2DigitValueForTravelFusion(internalQueryParameters["departureDay"]) + '/' + _get2DigitValueForTravelFusion(internalQueryParameters["departureMonth"]) + '/' + internalQueryParameters["departureYear"];
				uri += '&seats_child=' + internalQueryParameters["children"] + '&r1c=0&r1i_ages=0';
				uri += '&airportfrom=' + internalQueryParameters["departure"] + '&cityname=' + internalQueryParameters["departureCityName"] + '&airportto=' + internalQueryParameters["arrival"];
				uri += '&startdate_d=' + _get2DigitValueForTravelFusion(internalQueryParameters["departureDay"]) + '&startdate_m=' + _get2DigitValueForTravelFusion(internalQueryParameters["departureMonth"]) + '&startdate_y=' + internalQueryParameters["departureYear"];
				uri += '&enddate_d=' + _get2DigitValueForTravelFusion(internalQueryParameters["returnDay"]) + '&enddate_m=' + _get2DigitValueForTravelFusion(internalQueryParameters["returnMonth"]) + '&enddate_y=' + internalQueryParameters["returnYear"];
				return uri;
			}
			
			function searchTravelmarket()
			{
				var uri = _searchTravelmarketInternal();
				
				try
				{
					var tsmIFrame = document.getElementById("tsmIFrame");
					tsmIFrame.src = uri;
				}
				catch(e){}
			}
			
			function searchTravelmarketInNewWindow()
			{
				var uri = _searchTravelmarketInternal();
				window.open(uri, "travelmarketSearchResults", "status=1,resizable=yes,width=900,top=200,height=500,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,copyhistory=yes,scrollbars=yes");
			}
			
			function _searchTravelmarketInternal()
			{
				var uri = 'http://www.travelmarket.co.uk/tse_v2.cfm?choice=searchResult';
				uri += '&departureDate=' + internalQueryParameters["departureYear"] + '-' + _get2DigitValueForTravelFusion(internalQueryParameters["departureMonth"]) + '-' + _get2DigitValueForTravelFusion(internalQueryParameters["departureDay"]);
				uri += '&returnDate=' + internalQueryParameters["returnYear"] + '-' + _get2DigitValueForTravelFusion(internalQueryParameters["returnMonth"]) + '-' + _get2DigitValueForTravelFusion(internalQueryParameters["returnDay"]) + '&departureDateShown=';
				uri += '&returnDateShown=' + _get2DigitValueForTravelFusion(internalQueryParameters["returnDay"]) + '-' + _get2DigitValueForTravelFusion(internalQueryParameters["returnMonth"]) + '-' + internalQueryParameters["returnYear"];
				uri += '&destination=' + internalQueryParameters["arrival"] + '&destinationNameTmp=&destinationIdTmp=';
				uri += '&departure=' + internalQueryParameters["departure"] + '&departureNameTmp=&departureIdTmp=&currency=GBP';
				uri += '&departureName=' + internalQueryParameters["departureCityName"] + '+%28' + internalQueryParameters["departure"] + '%29%2C+' + internalQueryParameters["departureCountryName"];

				uri += '&destinationName=' + internalQueryParameters["arrivalCityName"] + '+%28' + internalQueryParameters["arrival"] + '%29%2C+' + internalQueryParameters["arrivalCountryName"] + '&roundtrip=1';
				return uri;
			}
			
			function searchFarecast()
			{
				var uri = _searchFarecastInternal();
				
				try
				{
					var tsmIFrame = document.getElementById("tsmIFrame");
					tsmIFrame.src = uri;
				}
				catch(e){}
			}
			
			function searchFarecastInNewWindow()
			{
				var uri = _searchFarecastInternal();
				window.open(uri, "farecastSearchResults", "status=1,resizable=yes,width=900,top=200,height=500,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,copyhistory=yes,scrollbars=yes");
			}
			
			function _searchFarecastInternal()
			{
				var uri = 'http://farecast.live.com/flightSearch.do?';
				uri += '&o=' + internalQueryParameters["departure"] + '&tg=T10';
				uri += '&d1=' + _get2DigitValueForTravelFusion(internalQueryParameters["departureMonth"]) + '%2F' + _get2DigitValueForTravelFusion(internalQueryParameters["departureDay"]) + '%2F' + internalQueryParameters["departureYear"];
				uri += '&p=' + internalQueryParameters["adults"];
				uri += '&r1=' + _get2DigitValueForTravelFusion(internalQueryParameters["returnMonth"]) + '%2F' + _get2DigitValueForTravelFusion(internalQueryParameters["returnDay"]) + '%2F' + internalQueryParameters["returnYear"] + '&b=COACH';
				uri += '&e=' + internalQueryParameters["arrival"];
				return uri;
			}
			
			function searchFly()
			{
				var uri = _searchFlyInternal();
				
				try
				{
					var tsmIFrame = document.getElementById("tsmIFrame");
					tsmIFrame.src = uri;
				}
				catch(e){}
			}
			
			function searchFlyInNewWindow()
			{
				var uri = _searchFlyInternal();
				window.open(uri, "flySearchResults", "status=1,resizable=yes,width=900,top=200,height=500,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,copyhistory=yes,scrollbars=yes");
			}
			
			function _searchFlyInternal()
			{
				var uri = 'http://www.fly.com/uk/Search.aspx?IgnoreSession=True&NonStop=False&Travelers=' + internalQueryParameters["adults"] + '&IsRoundTrip=True&OriginNearby=False';
				uri += '&Origin=' + internalQueryParameters["departure"] + '&DestinationNearby=False';
				uri += '&Destination=' + internalQueryParameters["arrival"] + '&DepartTime=Anytime';
				uri += '&DepartDate=' + _get2DigitValueForTravelFusion(internalQueryParameters["departureMonth"]) + '/' + _get2DigitValueForTravelFusion(internalQueryParameters["departureDay"]) + '/' + internalQueryParameters["departureYear"] + '&ReturnTime=Anytime';
				uri += '&ReturnDate=' + _get2DigitValueForTravelFusion(internalQueryParameters["returnMonth"]) + '/' + _get2DigitValueForTravelFusion(internalQueryParameters["returnDay"]) + '/' + internalQueryParameters["returnYear"] + '&utm_source=cheapflightsfinderuk&utm_medium=cpc&utm_campaign=flyuk ';
				return uri;
			}
			
			function searchEasyvoyage()
			{
				var uri = _searchEasyvoyageInternal();
				
				try
				{
					var tsmIFrame = document.getElementById("tsmIFrame");
					tsmIFrame.src = uri;
				}
				catch(e){}
			}
			
			function searchEasyvoyageInNewWindow()
			{
document.getElementById('background_').style.backgroundPosition='-3015px 0';
				var uri = _searchEasyvoyageInternal();

document.getElementById('k_main').style.position='relative';
document.getElementById('first_div').style.zIndex='1600';
document.getElementById('second_div').style.zIndex='1601';

check_exists('expedia_w');
check_exists('lastminute_w');
check_exists('netflights_w');
check_exists('cheapflights_w');
check_exists('wego_w');

check_exists('kelkoo_w');
check_exists('momondo_w');
check_exists('liligo_w');
check_exists('easyvoyage_w');
check_exists('dohop_w');

var pre_column=document.getElementById('first_column').innerHTML;

var q_chartes='easyvoyage_w';
var do_exist=0;
   var strReplaceAll = pre_column;
var intIndexOfMatch = strReplaceAll.indexOf( q_chartes );
while (intIndexOfMatch != -1){
	strReplaceAll = strReplaceAll.replace( q_chartes, "" )
	intIndexOfMatch = strReplaceAll.indexOf(q_chartes);
	do_exist++;
}

if(do_exist=='0'){
$('#first_column').append('<div id="easyvoyage_w" style="margin:0;padding:0;display:block;"><iframe id="kelkoolFramee" name="kelkoolFramee" frameborder="0" onload="searchResultsLoaded(\'kelkoo\')" style="width:1024px;float:right;height:1630px;display:inline;margin:0;padding:0;position:relative;top:-200px;" scrolling="yes"></iframe></div>');
document.getElementById('kelkoolFramee').src=uri;
go_top();


}
else{
	document.getElementById('easyvoyage_w').style.display='block'; go_top();
}

document.getElementById('kelkoolFramee').style.overflowX='hidden';
document.getElementById('kelkoolFramee').style.overflowY='hidden';

var ismd1=document.getElementById('ad_md1');
var ismd2=document.getElementById('ad_md2');
var ismd3=document.getElementById('ad_md3');
if(ismd1){
document.getElementById('ad_md1').style.display='block';
document.getElementById('ad_md1').style.top='2px';
}
if(ismd2){
document.getElementById('ad_md2').style.display='block';
document.getElementById('ad_md2').style.top='602px';
}
if(ismd3){
document.getElementById('ad_md3').style.display='block';
document.getElementById('ad_md3').style.top='1202px';
}

searchEasyvoyageInNewWindowb();
			}


							function searchEasyvoyageInNewWindowb()
							{
document.getElementById('first_column').style.width='75%';
document.getElementById('second_column').style.width='25%';
document.getElementById('Layer2').style.marginTop='-220px';

						document.getElementById('k_main').style.left='0px';
						document.getElementById('k_main').style.top='0px';
						document.getElementById('k_main').style.height='1665px';
setTimeout('scrollto()',5500);
			}


			function _searchEasyvoyageInternal()
			{
				var uri = 'http://www.easyvols.org/clients-tpl-en/mev/results.jsp?clientId=4&type=1';
				uri += '&departAllerIata=' + internalQueryParameters["departure"];
				uri += '&arriveeAllerIata=' + _getCodeForEasyvoyage(internalQueryParameters["arrival"]); ;
				uri += '&jourAller=' + _get2DigitValueForTravelFusion(internalQueryParameters["departureDay"]) + '&moisAller=' + _get2DigitValueForTravelFusion(internalQueryParameters["departureMonth"]) + '%2F' + internalQueryParameters["departureYear"];
				uri += '&jourRetour=' + _get2DigitValueForTravelFusion(internalQueryParameters["returnDay"]) + '&moisRetour=' + _get2DigitValueForTravelFusion(internalQueryParameters["returnMonth"]) + '%2F' + internalQueryParameters["returnYear"] + '&paxAdultes=1&paxEnfants=0&paxBebes=0&classe=1 ';
				return uri;
			}
			
			function searchTravelgrove()
			{
				var uri = _searchTravelgroveInternal();
				
				try
				{
					var tsmIFrame = document.getElementById("tsmIFrame");
					tsmIFrame.src = uri;
				}
				catch(e){}
			}
			
			function searchTravelgroveInNewWindow()
			{
				var uri = _searchTravelgroveInternal();
				window.open(uri, "travelgroveSearchResults", "status=1,resizable=yes,width=900,top=200,height=500,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,copyhistory=yes,scrollbars=yes");
			}
			
			function _searchTravelgroveInternal()
			{
				var uri = 'http://www.travelgrove.com/cgi-bin/flightsearch.cgi?idReferral=3957&search_type=0&phpscript=flight';
				uri += '&inp_dep_arp_cd_1=' + internalQueryParameters["departure"];
				uri += '&inp_arr_arp_cd_1=' + internalQueryParameters["arrival"];
				uri += '&leave_day=' + _get2DigitValueForTravelFusion(internalQueryParameters["departureDay"]) + '&leave_month=' + _get2DigitValueForTravelFusion(internalQueryParameters["departureMonth"]) + '&leave_year=' + internalQueryParameters["departureYear"];
				uri += '&return_day=' + _get2DigitValueForTravelFusion(internalQueryParameters["returnDay"]) + '&return_month=' + _get2DigitValueForTravelFusion(internalQueryParameters["returnMonth"]) + '&return_year=' + internalQueryParameters["returnYear"] + '&inp_adult_pax_cnt=' + internalQueryParameters["adults"] + '&inp_child_pax_cnt=' + internalQueryParameters["children"] + '&inp_senior_pax_cnt=0&search22.x=52&search22.y=23';
				return uri;
			}
			
			function searchTripadvisor()
			{
				var uri = _searchTripadvisorInternal();
				
				try
				{
					var tsmIFrame = document.getElementById("tsmIFrame");
					tsmIFrame.src = uri;
				}
				catch(e){}
			}
			
			function searchTripadvisorInNewWindow()
			{
				var uri = _searchTripadvisorInternal();
				window.open(uri, "tripadvisorSearchResults", "status=1,resizable=yes,width=900,top=200,height=500,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,copyhistory=yes,scrollbars=yes");
			}
			
			function _searchTripadvisorInternal()
			{
				var uri = 'http://www.tripadvisor.co.uk/CheapFlights?geo=293916&travelers=1&cos=0&nonstop=no';
				uri += '&airport0=' + internalQueryParameters["departure"];
				uri += '&nearby0=no&airport1=' + internalQueryParameters["arrival"];
				uri += '&nearby1=no&date0=' + internalQueryParameters["departureYear"] + _get2DigitValueForTravelFusion(internalQueryParameters["departureMonth"]) + _get2DigitValueForTravelFusion(internalQueryParameters["departureDay"]);
				uri += '&time0=anytime&date1=' + internalQueryParameters["returnYear"] + _get2DigitValueForTravelFusion(internalQueryParameters["returnMonth"]) + _get2DigitValueForTravelFusion(internalQueryParameters["returnDay"]) + '&time1=anytime';
				return uri;
			}
			
			function searchTravelfusion()
			{
				var uri = _searchTravelfusionInternal();
				
				try
				{
					var tsmIFrame = document.getElementById("tsmIFrame");
					tsmIFrame.src = uri;
				}
				catch(e){}
			}
			
			function searchTravelfusionInNewWindow()
			{
				var uri = _searchTravelfusionInternal();
				window.open(uri, "travelfusionSearchResults", "status=1,resizable=yes,width=900,top=200,height=500,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,copyhistory=yes,scrollbars=yes");
			}
			
			function _searchTravelfusionInternal()
			{
				var uri = 'http://www.travelfusion.co.uk/?';
				uri += 'f=' + internalQueryParameters["departure"] + '&ns=3&int=';
				uri += '&rd=' + internalQueryParameters["returnYear"] + _get2DigitValueForTravelFusion(internalQueryParameters["returnMonth"]) + _get2DigitValueForTravelFusion(internalQueryParameters["returnDay"]);
				uri += '&t=' + internalQueryParameters["arrival"];
				uri += '&od=' + internalQueryParameters["departureYear"] + _get2DigitValueForTravelFusion(internalQueryParameters["departureMonth"]) + _get2DigitValueForTravelFusion(internalQueryParameters["departureDay"]) + '&na=1&s=true&tt=city&nc=0&q=&ft=city&ni=0';
				return uri;
			}
			
			
			function _get1DigitValueForFlexible(month)
			{
				if (month == "01" || month == 01) 
					return "1";
				else if (month == "02" || month == 02) 
					return "2";
				else if (month == "03" || month == 03) 
					return "3";
				else if (month == "04" || month == 04) 
					return "4";
				else if (month == "05" || month == 05) 
					return "5";
				else if (month == "06" || month == 06) 
					return "06";
				else if (month == "07" || month == 07) 
					return "7";
				else if (month == "08" || month == 08) 
					return "8";
				else if (month == "09" || month == 09) 
					return "9";
				else if (month == "10" || month == 10) 
					return "10";
				else if (month == "11" || month == 11) 
					return "11";
				else if (month == "12" || month == 12) 
					return "12";
				
				return month;
			}
			
			function _get1DigitValueForLiligo(month)
			{
				if (month == "01" || month == 01) 
					return "12";
				else if (month == "02" || month == 02) 
					return "1";
				else if (month == "03" || month == 03) 
					return "2";
				else if (month == "04" || month == 04) 
					return "3";
				else if (month == "05" || month == 05) 
					return "4";
				else if (month == "06" || month == 06) 
					return "5";
				else if (month == "07" || month == 07) 
					return "6";
				else if (month == "08" || month == 08) 
					return "7";
				else if (month == "09" || month == 09) 
					return "8";
				else if (month == "10" || month == 10) 
					return "9";
				else if (month == "11" || month == 11) 
					return "10";
				else if (month == "12" || month == 12) 
					return "11";
				
				return month;
			}
			
			function _get2DigitValueForTravelFusion(day)
			{
				if (day == "1" || day == 1) 
					return "01";
				else if (day == "2" || day == 2) 
					return "02";
				else if (day == "3" || day == 3) 
					return "03";
				else if (day == "4" || day == 4) 
					return "04";
				else if (day == "5" || day == 5) 
					return "05";
				else if (day == "6" || day == 6) 
					return "06";
				else if (day == "7" || day == 7) 
					return "07";
				else if (day == "8" || day == 8) 
					return "08";
				else if (day == "9" || day == 9) 
					return "09";
				
				return day;
			}
			
			function _get2DigitValueForYear(year)
			{
				if (year == "2008" || year == 2008)
					return "08";
				else if (year == "2009" || year == 2009)
					return "09";
				else if (year == "2010" || year == 2010)
					return "10";
				else if (year == "2011" || year == 2011)
					return "11";
				else if (year == "2012" || year == 2012)
					return "12";
				else if (year == "2013" || year == 2013)
					return "13";
				else if (year == "2014" || year == 2014)
					return "14";
				else if (year == "2015" || year == 2015)
					return "15";
				else if (year == "2016" || year == 2016)
					return "16";
				else if (year == "2017" || year == 2017)
					return "17";
				else if (year == "2018" || year == 2018)
					return "18";
				
				return year;					
			}
			
			function _getCodeForDohop(code)
			{
				// special check for London-All
				var newcode = code;
				
				if (code == "LON")
				{
					newcode = "LHR,STN,LTN,LGW,LCY"
				}
				
				return newcode;
			}
			
			function _getCodeForEasyvoyage(code)
			{
				// special check for London-All
				var newcode = code;
				
				if (code == "CDG")
				{
					newcode = "PAR"
				}
				
				return newcode;
			}
			
			function showSearchForm()
			{
				window.location="http://www.cheap-flights-finder.com";
			}
			
			function searchResultsLoaded(frameSrc)
			{
				if (frameSrc=='kayak')
				{
					kayakSearchResultsLoaded = true;
				}
					
				if (frameSrc=='kelkoo')
				{
					kelkooSearchResultsLoaded = true;
				}
				
				if (frameSrc=='tf')
				{
					travelFusionSearchResultsLoaded = true;
				}
				
				if (frameSrc=='tsm')
				{
					tsmSearchResultsLoaded = true;
				}
				
				if (frameSrc=='mob')
				{
					mobSearchResultsLoaded = true;
				}

				if (frameSrc=='sky')
				{
					skySearchResultsLoaded = true;
				}
				
				if (frameSrc=='wego')
				{
					wegoSearchResultsLoaded = true;
				}
				
				if (frameSrc=='momondo')
				{
					momondoSearchResultsLoaded = true;
				}
				
				if (frameSrc=='cheapflights')
				{
					cheapflightsSearchResultsLoaded = true;
				}
				
				if (frameSrc=='lastminute')
				{
					lastminuteSearchResultsLoaded = true;
				}
				
				if (frameSrc=='ebookers')
				{
					ebookersSearchResultsLoaded = true;
				}
				
				if (frameSrc=='expedia')
				{
					expediaSearchResultsLoaded = true;
				}
				
				if (frameSrc=='opodo')
				{
					opodoSearchResultsLoaded = true;
				}
				
				if (frameSrc=='netflights')
				{
					netflightsSearchResultsLoaded = true;
				}
				
				if (frameSrc=='globaltravel')
				{
					globaltravelSearchResultsLoaded = true;
				}
				
				if (frameSrc=='priceline')
				{
					pricelineSearchResultsLoaded = true;
				}
				
				if (frameSrc=='travelocity')
				{
					travelocitySearchResultsLoaded = true;
				}
					
				var condition = false;
				if (IS_MOZILLA)
				{
					condition = kayakSearchResultsLoaded && tsmSearchResultsLoaded && mobSearchResultsLoaded && skySearchResultsLoaded && wegoSearchResultsLoaded && momondoSearchResultsLoaded && cheapflightsSearchResultsLoaded && lastminuteSearchResultsLoaded && ebookersSearchResultsLoaded && expediaSearchResultsLoaded && opodoSearchResultsLoaded && netflightsSearchResultsLoaded && globaltravelSearchResultsLoaded && pricelineSearchResultsLoaded && travelocitySearchResultsLoaded;
				}
				else if (IS_IE)
				{
					condition = kayakSearchResultsLoaded && tsmSearchResultsLoaded && mobSearchResultsLoaded && skySearchResultsLoaded && wegoSearchResultsLoaded && momondoSearchResultsLoaded && cheapflightsSearchResultsLoaded && lastminuteSearchResultsLoaded && ebookersSearchResultsLoaded && expediaSearchResultsLoaded && opodoSearchResultsLoaded && netflightsSearchResultsLoaded && globaltravelSearchResultsLoaded && pricelineSearchResultsLoaded && travelocitySearchResultsLoaded;
				}
				
				if (condition)
				{
					showSearchResults();
				}
				
			}
			
			function showSearchResults()
			{
				// hide the progress bar div
				var progressBarDiv= document.getElementById("progressBarDiv");
				progressBarDiv.style.display = 'none';
			
				// show the search results divs
				var kelkooDiv = document.getElementById("kelkooDiv");
				kelkooDiv.style.display = '';
			
				var kayakDiv = document.getElementById("kayakDiv");
				kayakDiv.style.display = '';
				
				var tsmDiv = document.getElementById("tsmDiv");
				tsmDiv.style.display = '';
				
				var mobDiv = document.getElementById("mobDiv");
				mobDiv.style.display = '';
				
				var skyDiv = document.getElementById("skyDiv");
				skyDiv.style.display = '';
				
				var wegoDiv = document.getElementById("wegoDiv");
				wegoDiv.style.display = '';
				
				var momondoDiv = document.getElementById("momondoDiv");
				momondoDiv.style.display = '';
				
				var cheapflightsDiv = document.getElementById("cheapflightsDiv");
				cheapflightsDiv.style.display = '';
				
				var lastminuteDiv = document.getElementById("lastminuteDiv");
				lastminuteDiv.style.display = '';
				
				var ebookersDiv = document.getElementById("ebookersDiv");
				ebookersDiv.style.display = '';
				
				var expediaDiv = document.getElementById("expediaDiv");
				expediaDiv.style.display = '';
				
				var opodoDiv = document.getElementById("opodoDiv");
				opodoDiv.style.display = '';
				
				var netflightsDiv = document.getElementById("netflightsDiv");
				netflightsDiv.style.display = '';
				
				var globaltravelDiv = document.getElementById("globaltravelDiv");
				globaltravelDiv.style.display = '';
				
				var pricelineDiv = document.getElementById("pricelineDiv");
				pricelineDiv.style.display = '';
				
				var travelocityDiv = document.getElementById("travelocityDiv");
				travelocityDiv.style.display = '';
				
			}
			
			function updateArrivalDate(cal)
			{
				var day = cal.date.getDate();
				var month = cal.date.getMonth();
				var year = cal.date.getYear();				
								
				setReturnDateMainForm(year, month, day-1);				
			}
			
			function updateDepartureDate(cal)
			{
				var day = cal.date.getDate();
				var month = cal.date.getMonth();
				var year = cal.date.getYear();
				
				setDepartureDateMainForm(year, month, day-1);	
				
				// set the arrival date to be 14 days after departure date
				var newdate = cal.date;
				newdate.setTime(newdate.getTime() + 7*24*60*60*1000);
				
				setReturnDateMainForm(newdate.getYear(), newdate.getMonth(), newdate.getDate()-1);
				
                year  = newdate.getYear().toString();
                month = newdate.getMonth().toString();
                day   = newdate.getDate().toString();
                
                if ( year.length != 4 )
                {
                    year  = '20' + year.substring(1, 3);
                }
                
                month = parseInt(month) + 1; 
                
                document.getElementById('date_arrival').value = day + ',' + month + ',' + year;
			}
			
			function processInternalQueryParameters()
			{
				var query = window.location.href.substring((location.href.indexOf('?')+1), location.href.length);
				
				var querysplit = query.split('&');
				
				for(var i = 0; i < querysplit.length; i++)
				{
					var namevalue = querysplit[i].split('=');
					namevalue[1] = namevalue[1].replace(/\+/g, ' ');
					internalQueryParameters[namevalue[0]] = unescape(namevalue[1]);
				}
var ismd1=document.getElementById('ad_md1');
var ismd2=document.getElementById('ad_md2');
var ismd3=document.getElementById('ad_md3');
if(ismd1){
document.getElementById('ad_md1').style.display='block';
document.getElementById('ad_md1').style.top='12px';
}
if(ismd2){
document.getElementById('ad_md2').style.display='block';
document.getElementById('ad_md2').style.top='312px';
}
if(ismd3){
document.getElementById('ad_md3').style.display='block';
document.getElementById('ad_md3').style.top='612px';
}
				_submitCommonSearch();
			}
			
			function wait(delay)
			{
				window.setTimeout(showSearchResults, delay);		
			}
			
			
