<!-- 
//GOOGLE MAP Funtions
  var geocoder;
  var map;
  var boxpolys = null;
  var directions = null;
  var routeBoxer = null;
  var distance = null; // km
  var markers = [];
    var address = [];
    var address_description = [];
    var address_images = [];


  function initialize(google_div,fadeshow_div) {
	if(fadeshow_div!="")
	{
		document.getElementById(fadeshow_div).style.visibility="hidden";
	}
    geocoder = new google.maps.Geocoder(); 
	var myOptions = {
		zoom: 8,
		center: new google.maps.LatLng(-33, 151),
		mapTypeControl: true,
		mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU,
			position: google.maps.ControlPosition.TOP},
		navigationControl: true,
		navigationControlOptions: {
			style: google.maps.NavigationControlStyle.ZOOM_PAN,
			position: google.maps.ControlPosition.TOP_RIGHT
		},
		scaleControl: true,
		scaleControlOptions: {
			position: google.maps.ControlPosition.BOTTOM_LEFT
		},
		mapTypeId: google.maps.MapTypeId.ROADMAP   
    }
    map = new google.maps.Map(document.getElementById(google_div), myOptions);  
	routeBoxer = new RouteBoxer();
      
    directionService = new google.maps.DirectionsService();
    directionsRenderer = new google.maps.DirectionsRenderer({ map: map }); 
  }
//Mapping the location
 /* function codeAddress(location_of_request,request_name) {
    var address = location_of_request;
    if (geocoder) {
      geocoder.geocode( { 'address': address}, function(results, status) {
        if (status == google.maps.GeocoderStatus.OK) {
          map.setCenter(results[0].geometry.location);
          var marker = new google.maps.Marker({
              map: map, 
              position: results[0].geometry.location,
			  title: request_name
          });
        } else {
          alert("Geocode was not successful for the following reason: " + status);
        }
      });
    }
  }*/
// Creating route and path of tour and journey
    function route_tours(orign_location,destination_location,waypoints) {
      // Clear any previous route boxes from the map
      clearBoxes();
      
      // Convert the distance to box around the route from miles to km
      distance = parseFloat(150) * 1.609344;
      
	  var waypts = [];
	  for (var i = 0; i < waypoints.length; i++) {
		if (waypoints[i] != "") {
		  waypts.push({
			  location:waypoints[i],
			  stopover:true
		  });
		}
	  }
      var request = {
        origin: orign_location,
        destination: destination_location,
		waypoints: waypts,
        travelMode: google.maps.DirectionsTravelMode.DRIVING,
		unitSystem: google.maps.DirectionsUnitSystem.METRIC,
		provideRouteAlternatives: true
      }

      // Make the directions request
      directionService.route(request, function(result, status) {
        if (status == google.maps.DirectionsStatus.OK) {
          directionsRenderer.setDirections(result);
          
          // Box around the overview path of the first route
          var path = result.routes[0].overview_path;
          var boxes = routeBoxer.box(path, distance);
          drawBoxes(boxes);
        } else {
          alert("Directions query failed: " + status);
        }
      });
    }
    function route(orign_location,destination_location) {
      // Clear any previous route boxes from the map
      clearBoxes();
      
      // Convert the distance to box around the route from miles to km
      distance = parseFloat(150) * 1.609344;
      
      var request = {
        origin: orign_location,
        destination: destination_location,
        travelMode: google.maps.DirectionsTravelMode.DRIVING,
		unitSystem: google.maps.DirectionsUnitSystem.METRIC,
		provideRouteAlternatives: true
      }

      // Make the directions request
      directionService.route(request, function(result, status) {
        if (status == google.maps.DirectionsStatus.OK) {
          directionsRenderer.setDirections(result);
          
          // Box around the overview path of the first route
          var path = result.routes[0].overview_path;
          var boxes = routeBoxer.box(path, distance);
          drawBoxes(boxes);
        } else {
          alert("Directions query failed: " + status);
        }
      });
    }
    
    // Draw the array of boxes as polylines on the map
    function drawBoxes(boxes) {
      boxpolys = new Array(boxes.length);
      for (var i = 0; i < boxes.length; i++) {
        boxpolys[i] = new google.maps.Rectangle({
          bounds: boxes[i],
          fillOpacity: 0,
          strokeOpacity: 1.0,
          strokeColor: '#000000',
          strokeWeight: 1,
          map: map
        });
      }
    }
    
    // Clear boxes currently on the map
    function clearBoxes() {
      if (boxpolys != null) {
        for (var i = 0; i < boxpolys.length; i++) {
          boxpolys[i].setMap(null);
        }
      }
      boxpolys = null;
    }

//Creating icons and points 
  function pathCodeAddress(location_of_request,request_name,images) {
    address = location_of_request;
    address_description = request_name;
    address_images = images;
	var q=0;
	for(a = 0; a < address.length; a++){
		if (geocoder) {
		  geocoder.geocode( { 'address': address[a]}, function(results, status) {
			if (status == google.maps.GeocoderStatus.OK) {
			  map.setCenter(results[0].geometry.location);
			  
			  // Add multiple markers in a few random locations around Location.
			  // First random marker
			  var marker = new google.maps.Marker({
				  map: map, 
				  position: results[0].geometry.location,
				  title: address_description[q]
			  });
			  // Create a single instance of the InfoWindow object which will be shared
			  // by all Map objects to display information to the user.
			  info_window.infoWindow = new google.maps.InfoWindow();
			  
			  // Make the info window close when clicking anywhere on the map.
			  google.maps.event.addListener(map, 'click', info_window.closeInfoWindow);
			  // Register event listeners to each marker to open a shared info
			  // window displaying the marker's position when clicked or dragged.
  			  var content = '<div style="text-align: center; font-size:14px;"><center><b>'+address_description[q]+'</b></center><img width="160" height="100" src="http://www.travelsrilanka.co.uk/images/hotel/'+address_images[q]+'"/><div style="margin: auto; text-align: right; width: 160px;" class="linkbutton"><br/><div class="linkbutton" style="text-align: left; font-size: 10px;"><a href="http://www.google.com/search?q=site:wikipedia.org+'+address_description[q]+'&amp;btnI=I\'m+Feeling+Lucky" target="_blank">Read more about this location</a></div></div>';
			  q++;
			  google.maps.event.addListener(marker, 'click', function() {
				info_window.openInfoWindow(marker,content);
			  });
			} else {
			  alert("Geocode was not successful for the following reason: " + status);
			}
		  });
		}
	}
  }

var info_window = {
  infoWindow: null
};
  
/**
 * Called when clicking anywhere on the map and closes the info window.
 */
info_window.closeInfoWindow = function() {
  info_window.infoWindow.close();
};

/**
 * Opens the shared info window, anchors it to the specified marker, and
 * displays the marker's position as its content.
 */
info_window.openInfoWindow = function(marker,content) {
  var markerLatLng = marker.getPosition();
  info_window.infoWindow.setContent(content);
  info_window.infoWindow.open(map, marker);
};

//Ajax functions
// JavaScript Document
var xmlHttp_ajax;
var elementID;
var xmlHttp_ajax2;
var elementID2;


function show_page(str, elem) {
	if (elem != null) {
		elementID = elem;	
	}
	
	if (str.length==0) { 
		document.getElementById(elementID).innerHTML="";
		return;
	}
	
	xmlHttp_ajax=GetXmlHttpObject_new();
	
	if (xmlHttp_ajax==null) {
		alert ("Browser does not support HTTP Request");
		return;
	} 
	
	var url=str;
	xmlHttp_ajax.onreadystatechange=stateChanged;
	xmlHttp_ajax.open("GET",url,true);
	xmlHttp_ajax.send(null);
} 

function stateChanged() { 
	if (xmlHttp_ajax.readyState==4 || xmlHttp_ajax.readyState=="complete") { 
		document.getElementById(elementID).innerHTML=xmlHttp_ajax.responseText; 
	} else {
		document.getElementById(elementID).innerHTML="<img src='/images/loading.gif'>";
	}
} 

function show_page_2(str2, elem2) {
	if (elem2 != null) {
		elementID2 = elem2;	
	}
	
	if (str2.length==0) { 
		document.getElementById(elementID2).innerHTML="";
		return;
	}
	
	xmlHttp_ajax2=GetXmlHttpObject_new2();
	
	if (xmlHttp_ajax2==null) {
		alert ("Browser does not support HTTP Request");
		return;
	} 
	
	var url2=str2;
	xmlHttp_ajax2.onreadystatechange=stateChanged2;
	xmlHttp_ajax2.open("GET",url2,true);
	xmlHttp_ajax2.send(null);
} 

function stateChanged2() { 
	if (xmlHttp_ajax2.readyState==4 || xmlHttp_ajax2.readyState=="complete") { 
		document.getElementById(elementID2).innerHTML=xmlHttp_ajax2.responseText; 
	} else {
		document.getElementById(elementID2).innerHTML="<img src='/images/loading.gif'>";
	}
} 

function GetXmlHttpObject_new() { 
	var objXMLHttp=null;
	if (window.XMLHttpRequest) {
		objXMLHttp=new XMLHttpRequest();
	} else if (window.ActiveXObject) {
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	return objXMLHttp;
}
function GetXmlHttpObject_new2() { 
	var objXMLHttp2=null;
	if (window.XMLHttpRequest) {
		objXMLHttp2=new XMLHttpRequest();
	} else if (window.ActiveXObject) {
		objXMLHttp2=new ActiveXObject("Microsoft.XMLHTTP");
	}
	return objXMLHttp2;
} 
//Ajax get functions for tours section
function get_information(send_url,div_display)
{
	show_page(send_url,div_display);
}
function send_TAILOR_mail(send_url,div_display)
{
	var randomnumber = Math.floor(Math.random()*1000002);
	send_url +="?dummyva="+randomnumber;
	document.getElementById(div_display).value="Loding...";
	show_page(send_url,div_display);
}
function TAILOR_Reosrt(beach_id,category_id,type_id,lifestyle_id,div_display,selection_type,sort_by,webregion,locationID)
{
	var RequestULR="/sri-lanka-holidays/gethot_details.aspx?";
	var beach_cat=document.getElementById(beach_id).options[document.getElementById(beach_id).selectedIndex].value;
	var category_resort=document.getElementById(category_id).options[document.getElementById(category_id).selectedIndex].value;
	var type_resort=document.getElementById(type_id).options[document.getElementById(type_id).selectedIndex].value;
	var lifestyle_resort=document.getElementById(lifestyle_id).options[document.getElementById(lifestyle_id).selectedIndex].value;
	var Location_resort=document.getElementById(locationID).options[document.getElementById(locationID).selectedIndex].value;
	if(beach_cat!="-1")
	{
		RequestULR+="beach="+beach_cat;
	}
	else
	{
		RequestULR+="beach=2";
	}
	if(category_resort!="-1")
	{
		RequestULR+="&category="+category_resort;
	}
	else
	{
		RequestULR+="&category=0";
	}
	if(type_resort!="-1")
	{
		RequestULR+="&type="+type_resort;
	}
	else
	{
		RequestULR+="&type=0";
	}
	if(lifestyle_resort!="-1")
	{
		RequestULR+="&lifestyle="+lifestyle_resort;
	}
	else
	{
		RequestULR+="&lifestyle=0";
	}
	RequestULR+="&selection="+selection_type+"&sortby="+document.getElementById(sort_by).value;
	RequestULR+="&location="+Location_resort;
	if(webregion!="none")
	{
		RequestULR+="&region="+webregion;
	}
	document.getElementById(div_display).innerHTML="Loding...";
	show_page(RequestULR,div_display);
}
function TAILOR_ResortsTEST()
{
	var RequestULR="/sri-lanka-holidays/getall_Resorts.aspx";
	document.getElementById(divDisplay).innerHTML="Loding...";
	show_page(RequestULR,divDisplay);
}
function TAILOR_Transfers(divDisplay,TypeID,MethodID,ComfortID,ChargeID)
{
	var RequestULR="/sri-lanka-holidays/getEX_details.aspx?";
	RequestULR+="TypeID="+document.getElementById(TypeID).options[document.getElementById(TypeID).selectedIndex].value;
	RequestULR+="&MethodID="+document.getElementById(MethodID).options[document.getElementById(MethodID).selectedIndex].value;
	RequestULR+="&ComfortID="+document.getElementById(ComfortID).options[document.getElementById(ComfortID).selectedIndex].value;
	RequestULR+="&ChargeID="+document.getElementById(ChargeID).value;
	document.getElementById(divDisplay).innerHTML="Loding...";
	show_page(RequestULR,divDisplay);
}
function TAILOR_Excrusion(divDisplay,TopValue,RegionID,LifestyleID,OrderID)
{
	var RequestULR="/sri-lanka-holidays/getExcursion_details.aspx?";
	if(TopValue=="confirm" || TopValue=="minor")
	{
		RequestULR+="TopValue="+TopValue;
	}
	if(document.getElementById(RegionID).options[document.getElementById(RegionID).selectedIndex].value!="-1")
	{
		RequestULR+="&RegionID="+document.getElementById(RegionID).options[document.getElementById(RegionID).selectedIndex].value;
	}
	if(document.getElementById(LifestyleID).options[document.getElementById(LifestyleID).selectedIndex].value!="-1")
	{
		RequestULR+="&LifestyleID="+document.getElementById(LifestyleID).options[document.getElementById(LifestyleID).selectedIndex].value;
	}
	if(document.getElementById(OrderID).options[document.getElementById(OrderID).selectedIndex].value!="-1")
	{
		RequestULR+="&OrderID="+document.getElementById(OrderID).options[document.getElementById(OrderID).selectedIndex].value;
	}
	var randomnumber = Math.floor(Math.random()*1000001);
	RequestULR+="&DummyMath="+randomnumber;
	document.getElementById(divDisplay).innerHTML="Loding...";
	show_page(RequestULR,divDisplay);
}
function TAILORdriverhire_func(TEMP_Id,ChargeID,sednID)
{
	var selectedindex_;
	var NewVal_;
	var Val_Count=document.getElementById(TEMP_Id).length;
	for(t=0;t<Val_Count;t++)
	{
		if(document.getElementById(TEMP_Id).checked==false)
		{
			if(document.getElementById(TEMP_Id).options[t].value=="KM")
			{
				selectedindex_=t;
			}
		}
		else if(document.getElementById(sednID).checked==true)
		{
			if(document.getElementById(TEMP_Id).options[t].value=="Per Day")
			{
				selectedindex_=t;
			}
		}
	}
	document.getElementById(TEMP_Id).selectedIndex=selectedindex_;
	NewVal_=document.getElementById(TEMP_Id).options[document.getElementById(TEMP_Id).selectedIndex].value;
	document.getElementById(ChargeID).value=NewVal_;
}
function TAILOR_ExcrusionOther(divDisplay,TopValue,RegionID,LifestyleID,OrderID)
{
	var RequestULR="/sri-lanka-holidays/getExcursionOther_details.aspx?";
	if(TopValue=="confirm")
	{
		RequestULR+="TopValue="+TopValue;
	}
	if(document.getElementById(RegionID).options[document.getElementById(RegionID).selectedIndex].value!="-1")
	{
		RequestULR+="&RegionID="+document.getElementById(RegionID).options[document.getElementById(RegionID).selectedIndex].value;
	}
	if(document.getElementById(LifestyleID).options[document.getElementById(LifestyleID).selectedIndex].value!="-1")
	{
		RequestULR+="&LifestyleID="+document.getElementById(LifestyleID).options[document.getElementById(LifestyleID).selectedIndex].value;
	}
	if(document.getElementById(OrderID).options[document.getElementById(OrderID).selectedIndex].value!="-1")
	{
		RequestULR+="&OrderID="+document.getElementById(OrderID).options[document.getElementById(OrderID).selectedIndex].value;
	}
	document.getElementById(divDisplay).innerHTML="Loding...";
	show_page_2(RequestULR,divDisplay);
}
var selectionResortDIVID;
var ResortDIV_COUNT;
var ResortDIV_TEMP;
function show_hidden_DIV(div_name,call_idNAME,contentDIV, ResortDIV)
{
	if(document.getElementById(call_idNAME).checked==true)
	{
		document.getElementById(div_name).style.visibility="visible";
		document.getElementById(div_name).style.height="100%";
		document.getElementById(contentDIV).style.visibility="visible";
		document.getElementById(contentDIV).style.height="100%";	
		if(ResortDIV_TEMP==ResortDIV)
		{
			if(ResortDIV_COUNT!=null && ResortDIV_COUNT!="")
			{		
				for(i=0;i<ResortDIV_COUNT;i++)
				{
					if(selectionResortDIVID!=null && selectionResortDIVID!="")
					{
						if(i==selectionResortDIVID)
						{
						  document.getElementById("tslResortInfo"+ResortDIV+i).style.visibility="visible";
						  document.getElementById("tslResortInfo"+ResortDIV+i).style.height="100%";
						}
						else
						{
							document.getElementById("tslResortInfo"+ResortDIV+i).style.visibility="hidden";
							document.getElementById("tslResortInfo"+ResortDIV+i).style.height="0px";
						}
					}
					else
					{
						document.getElementById("tslResortInfo"+ResortDIV+i).style.visibility="hidden";
						document.getElementById("tslResortInfo"+ResortDIV+i).style.height="0px";
					}
				}
			}
		}
	}
	else
	{
		document.getElementById(div_name).style.visibility="hidden";
		document.getElementById(div_name).style.height="0px";
		document.getElementById(contentDIV).style.visibility="hidden";
		document.getElementById(contentDIV).style.height="0px";
		if(ResortDIV_COUNT!=null && ResortDIV_COUNT!="")
		{
			for(i=0;i<ResortDIV_COUNT;i++)
			{
				document.getElementById("tslResortInfo"+ResortDIV+i).style.visibility="hidden";
				document.getElementById("tslResortInfo"+ResortDIV+i).style.height="0px";
			}
		}
	}
	ResortDIV_TEMP=ResortDIV;
}
//Javascript Operations Function for TMH Accommodations
function showDIV_Accordion()
{
	 document.getElementById('acco_rex_1').style.height='400px';
}
function clearOtherRESORTS(selectedID,CountID,ResortTYPE)
{
	for(i=0; i < CountID; i++)
	{
		if(selectedID==i)
		{
			document.getElementById("ResortID"+ResortTYPE+i).checked=true;
		}
		else
		{
			document.getElementById("ResortID"+ResortTYPE+i).checked=false;
		}
	}
}
//Image Gallery Sections
// Images for hotels section
var img_selection=[];
function hotel_details_img_chang_88e(img_s,hotel_name)
{
	img_selection=img_s;
	alert (img_selection);
	document.getElementById("tsl_map_case_hotels").innerHTML="<img name=\"tsl_hotel_image_main\" id=\"tsl_hotel_image_main\" src=\"http://www.travelsrilanka.co.uk/images/hotel/" + img_selection[0] + "\" border=\"0\" alt=\"Sri Lanka " + hotel_name + "\" title=\"Sri Lanka " + hotel_name + "\" height=\"348\" width=\"538\" />";
	document.getElementById("tsl_hotel_image_main").src="http://www.travelsrilanka.co.uk/images/hotel/" + img_selection[0] ;
}

function hotel_details_img_change(img_set,hotel_names,img_div,fadeshow_div,image_location,width_div,height_div)
{
	if(fadeshow_div!="")
	{
		document.getElementById(fadeshow_div).style.visibility="visible";
	}
var imagearry_load=[img_set.length];
for(i = 0 ; i < img_set.length ; i++)
{
	imagearry_load[i]=[4];
}

for(i = 0 ; i < img_set.length ; i++)
{
	imagearry_load[i][0]="http://www.travelsrilanka.co.uk/images/"+image_location+"/"+img_set[i];
	imagearry_load[i][1]="";
	imagearry_load[i][2]="";
	imagearry_load[i][3]=hotel_names[i];
}

var mygallery=new fadeSlideShow({
	wrapperid: img_div, //ID of blank DIV on page to house Slideshow
	dimensions: [width_div, height_div], //width/height of gallery in pixels. Should reflect dimensions of largest image
	imagearray: imagearry_load,
	displaymode: {type:'auto', pause:4000, cycles:0, wraparound:true},
	persist: false, //remember last viewed slide and recall within same session?
	fadeduration: 800, //transition duration (milliseconds)
	descreveal: "peekaboo",
	togglerid: fadeshow_div
})

}

//Site functionalities
//Tours Section
function tsl_group_change_tour(no_of_gourps,select_option_id,passenger_info_div)//Tour Enquiries (root/sri-lanka-holidays/Default.aspx line: 8170)
{
	var group_no=no_of_gourps;
	var selected_group=document.getElementById(select_option_id).options[document.getElementById(select_option_id).selectedIndex].value;
	var max_pax;
	var min_pax;
	var day_date;
	var month_date;
	var year_date;	
	if(selected_group=="-1")
	{
		document.getElementById(passenger_info_div).innerHTML="";
		document.getElementById("tsl_hb_dd_day").disabled=false;
		document.getElementById("tsl_hb_dd_month").disabled=false;
		document.getElementById("tsl_hb_dd_year").disabled=false;
	}
	else
	{
		if(group_no>0)
		{
			max_pax=document.getElementById("tour_group_max_pax"+selected_group).value;
			min_pax=document.getElementById("tour_group_min_pax"+selected_group).value;
			day_date=parseInt(document.getElementById("tour_group_day"+selected_group).value);
			month_date=parseInt(document.getElementById("tour_group_month"+selected_group).value);
			year_date=parseInt(document.getElementById("tour_group_year"+selected_group).value);
			document.getElementById(passenger_info_div).innerHTML="Between "+min_pax+" to "+max_pax+" passengers per group";
			for(i=0; i < document.getElementById("tsl_hb_dd_day").options.length; i++)
			{
				if(document.getElementById("tsl_hb_dd_day").options[i].value==day_date)
				{
					document.getElementById("tsl_hb_dd_day").selectedIndex=i;
				}
			}
			for(i=0; i < document.getElementById("tsl_hb_dd_month").options.length; i++)
			{
				if(document.getElementById("tsl_hb_dd_month").options[i].value==month_date)
				{
					document.getElementById("tsl_hb_dd_month").selectedIndex=i;
				}
			}
			for(i=0; i < document.getElementById("tsl_hb_dd_year").options.length; i++)
			{
				if(document.getElementById("tsl_hb_dd_year").options[i].value==year_date)
				{
					document.getElementById("tsl_hb_dd_year").selectedIndex=i;
				}
			}
			document.getElementById("tsl_hb_dd_day").disabled="disabled";
			document.getElementById("tsl_hb_dd_month").disabled="disabled";
			document.getElementById("tsl_hb_dd_year").disabled="disabled";
		}
		else
		{
			document.getElementById(passenger_info_div).innerHTML="Group Selection Error please refresh page!";
		}
		
	}
	
}
function tsl_hol_tour_category_change(div_id_cat,change_event_id,items_count)
{
	var category_val=document.getElementById(change_event_id).options[document.getElementById(change_event_id).selectedIndex].value;
	for(i=0;i<items_count;i++)
	{
		if(i==category_val)
		{
			document.getElementById(div_id_cat+i).style.visibility="visible";
			document.getElementById(div_id_cat+i).style.height="100%";
			selectionResortDIVID=i;
			ResortDIV_COUNT=items_count;
		}
		else
		{
			document.getElementById(div_id_cat+i).style.visibility="hidden";
			document.getElementById(div_id_cat+i).style.height="0px";
		}
	}
}
var div_timer;
function get_flights_pasanger_info(selected_in)
{
	var pasanger_code=" ";
	var temp_code=" ";
	var date_validate=new Date();
	//var pasanger_code_existing=document.getElementById("tsl_flights_pasanger_info_get");
	var adult_no=document.getElementById("ffi_adult_no"+selected_in).options[document.getElementById("ffi_adult_no"+selected_in).selectedIndex].value;
	var child_no=document.getElementById("ffi_child_no"+selected_in).options[document.getElementById("ffi_child_no"+selected_in).selectedIndex].value;
	var infant_no=document.getElementById("ffi_infant_no"+selected_in).options[document.getElementById("ffi_infant_no"+selected_in).selectedIndex].value;
	if(adult_no>1)
	{
		for(i=1;i<adult_no;i++)
		{
			pasanger_code=pasanger_code+"<table width=\"100%\" align=\"left\" border=\"0\"><tr><td align=\"right\">Addtional Passenger Name (as Passport) *: </td><td align=\"left\"><select name=\"ffi_name_title"+i+"\" id=\"ffi_name_title"+i+"\" style=\"font-size:10px;\"><option value=\"Mr.\" selected=\"selected\">Mr.</option><option value=\"Mrs.\">Mrs.</option><option value=\"Ms.\">Ms.</option><option value=\"Miss.\">Miss.</option><option value=\"Mstr.\">Mstr.</option><option value=\"Dr.\">Dr.</option><option value=\"Rev.\">Rev.</option><option value=\"Prof.\">Prof.</option><option value=\"Sir.\">Sir.</option><option value=\"Lady.\">Lady.</option></select><input type=\"text\" id=\"ffi_surname"+i+selected_in+"\" name=\"ffi_surname"+i+selected_in+"\" value=\"Surname\" size=\"20\" style=\"font-size:10px;color:#CCC;\"	onkeyup=\"document.getElementById('ffi_surname"+i+selected_in+"').style.color ='#000000';\" onfocus=\"document.getElementById('ffi_surname"+i+selected_in+"').style.color ='#000000';if(document.getElementById('ffi_surname"+i+selected_in+"').value=='Surname'){document.getElementById('ffi_surname"+i+selected_in+"').value ='';}\" onblur=\"if(document.getElementById('ffi_surname"+i+selected_in+"').value==''){document.getElementById('ffi_surname"+i+selected_in+"').value ='Surname'; document.getElementById('ffi_surname"+i+selected_in+"').style.color ='#CCC';}\"/>&nbsp;<input type=\"text\" id=\"ffi_first"+i+selected_in+"\" name=\"ffi_first"+i+selected_in+"\" value=\"First Name\" size=\"20\" style=\"font-size:10px;color:#CCC;\"	onkeyup=\"document.getElementById('ffi_first"+i+selected_in+"').style.color ='#000000';\" onfocus=\"document.getElementById('ffi_first"+i+selected_in+"').style.color ='#000000';if(document.getElementById('ffi_first"+i+selected_in+"').value=='First Name'){document.getElementById('ffi_first"+i+selected_in+"').value ='';}\" onblur=\"if(document.getElementById('ffi_first"+i+selected_in+"').value==''){document.getElementById('ffi_first"+i+selected_in+"').value ='First Name'; document.getElementById('ffi_first"+i+selected_in+"').style.color ='#CCC';}\"/></td></tr></table>";
		}
	}
	if(child_no>0 && adult_no>0)
	{
		for(i=0;i<child_no;i++)
		{
			pasanger_code=pasanger_code+"<table width=\"100%\" align=\"left\" border=\"0\"><tr><td align=\"right\">Child Name (as Passport) *: </td><td align=\"left\"><input type=\"text\" id=\"ffi_surnamec"+i+selected_in+"\" name=\"ffi_surnamec"+i+selected_in+"\" value=\"Surname\" size=\"20\" style=\"font-size:10px;color:#CCC;\"	onkeyup=\"document.getElementById('ffi_surnamec"+i+selected_in+"').style.color ='#000000';\" onfocus=\"document.getElementById('ffi_surnamec"+i+selected_in+"').style.color ='#000000';if(document.getElementById('ffi_surnamec"+i+selected_in+"').value=='Surname'){document.getElementById('ffi_surnamec"+i+selected_in+"').value ='';}\" onblur=\"if(document.getElementById('ffi_surnamec"+i+selected_in+"').value==''){document.getElementById('ffi_surnamec"+i+selected_in+"').value ='Surname'; document.getElementById('ffi_surnamec"+i+selected_in+"').style.color ='#CCC';}\"/>&nbsp;<input type=\"text\" id=\"ffi_firstc"+i+selected_in+"\" name=\"ffi_firstc"+i+selected_in+"\" value=\"First Name\" size=\"20\" style=\"font-size:10px;color:#CCC;\"	onkeyup=\"document.getElementById('ffi_firstc"+i+selected_in+"').style.color ='#000000';\" onfocus=\"document.getElementById('ffi_firstc"+i+selected_in+"').style.color ='#000000';if(document.getElementById('ffi_firstc"+i+selected_in+"').value=='First Name'){document.getElementById('ffi_firstc"+i+selected_in+"').value ='';}\" onblur=\"if(document.getElementById('ffi_firstc"+i+selected_in+"').value==''){document.getElementById('ffi_firstc"+i+selected_in+"').value ='First Name'; document.getElementById('ffi_firstc"+i+selected_in+"').style.color ='#CCC';}\"/></td></tr>";
			temp_code="";
			temp_code="<tr><td align=\"right\">Child DOB *: </td><td align=\"left\"><select name=\"ffi_child_dob_d"+i+"\" id=\"ffi_child_dob_d"+i+"\" style=\"font-size:10px;\"><option value=\"-1\" selected=\"selected\">Day</option>";
			for(a=1;a<32;a++)
			{
				temp_code+="<option value=\""+a+"\">"+a+"</option>";
			}
			temp_code+="</select>&nbsp;";
			temp_code+="<select name=\"ffi_child_dob_m"+i+"\" id=\"ffi_child_dob_m"+i+"\" style=\"font-size:10px;\"><option value=\"-1\" selected=\"selected\">Month</option>";
			for(b=1;b<13;b++)
			{
				
				temp_code+="<option value=\""+b+"\">"+b+"</option>";
			}
			temp_code+="</select>&nbsp;";
			temp_code+="<select name=\"ffi_child_dob_y"+i+"\" id=\"ffi_child_dob_y"+i+"\" style=\"font-size:10px;\"><option value=\"-1\" selected=\"selected\">Year</option>";
			for(c=(date_validate.getYear()-12);c<=(date_validate.getYear()-2);c++)
			{
				temp_code+="<option value=\""+c+"\">"+c+"</option>";
			}
			temp_code+="</select></td></tr></table>";
			pasanger_code=pasanger_code+temp_code;
		}
	}
	else if(child_no>0 && adult_no<=0)
	{
		pasanger_code=pasanger_code+"<table width=\"100%\" align=\"center\" border=\"0\"><tr><td align=\"center\" colspan=\"2\">Please call <b>0208 099 8067</b> for Child Details Inquiry</td></tr></table>";

	}
	if(infant_no>0 && adult_no>=infant_no && adult_no>0)
	{
		for(i=0;i<infant_no;i++)
		{
			pasanger_code=pasanger_code+"<table width=\"100%\" align=\"left\" border=\"0\"><tr><td align=\"right\">Infant Name (as Passport) *: </td><td align=\"left\"><input type=\"text\" id=\"ffi_surnamei"+i+selected_in+"\" name=\"ffi_surnamei"+i+selected_in+"\" value=\"Surname\" size=\"20\" style=\"font-size:10px;color:#CCC;\"	onkeyup=\"document.getElementById('ffi_surnamei"+i+selected_in+"').style.color ='#000000';\" onfocus=\"document.getElementById('ffi_surnamei"+i+selected_in+"').style.color ='#000000';if(document.getElementById('ffi_surnamei"+i+selected_in+"').value=='Surname'){document.getElementById('ffi_surnamei"+i+selected_in+"').value ='';}\" onblur=\"if(document.getElementById('ffi_surnamei"+i+selected_in+"').value==''){document.getElementById('ffi_surnamei"+i+selected_in+"').value ='Surname'; document.getElementById('ffi_surnamei"+i+selected_in+"').style.color ='#CCC';}\"/>&nbsp;<input type=\"text\" id=\"ffi_firsti"+i+selected_in+"\" name=\"ffi_firsti"+i+selected_in+"\" value=\"First Name\" size=\"20\" style=\"font-size:10px;color:#CCC;\"	onkeyup=\"document.getElementById('ffi_firsti"+i+selected_in+"').style.color ='#000000';\" onfocus=\"document.getElementById('ffi_firsti"+i+selected_in+"').style.color ='#000000';if(document.getElementById('ffi_firsti"+i+selected_in+"').value=='First Name'){document.getElementById('ffi_firsti"+i+selected_in+"').value ='';}\" onblur=\"if(document.getElementById('ffi_firsti"+i+selected_in+"').value==''){document.getElementById('ffi_firsti"+i+selected_in+"').value ='First Name'; document.getElementById('ffi_firsti"+i+selected_in+"').style.color ='#CCC';}\"/></td></tr>";
			temp_code="";
			temp_code="<tr><td align=\"right\">Infant DOB *: </td><td align=\"left\"><select name=\"ffi_infant_dob_d"+i+"\" id=\"ffi_infant_dob_d"+i+"\" style=\"font-size:10px;\"><option value=\"-1\" selected=\"selected\">Day</option>";
			for(a=1;a<32;a++)
			{
				temp_code+="<option value=\""+a+"\">"+a+"</option>";
			}
			temp_code+="</select>&nbsp;";
			temp_code+="<select name=\"ffi_infant_dob_m"+i+"\" id=\"ffi_infant_dob_m"+i+"\" style=\"font-size:10px;\"><option value=\"-1\" selected=\"selected\">Month</option>";
			for(b=1;b<13;b++)
			{
				
				temp_code+="<option value=\""+b+"\">"+b+"</option>";
			}
			temp_code+="</select>&nbsp;";
			temp_code+="<select name=\"ffi_infant_dob_y"+i+"\" id=\"ffi_infant_dob_y"+i+"\" style=\"font-size:10px;\"><option value=\"-1\" selected=\"selected\">Year</option>";
			for(c=(date_validate.getYear()-2);c<=date_validate.getYear();c++)
			{
				temp_code+="<option value=\""+c+"\">"+c+"</option>";
			}
			temp_code+="</select></td></tr></table>";
			pasanger_code=pasanger_code+temp_code;
		}
	}
	else if(infant_no!=0 && adult_no<infant_no)
	{
		pasanger_code=pasanger_code+"<table width=\"100%\" align=\"center\" border=\"0\"><tr><td align=\"center\" colspan=\"2\">Please call <b>0208 099 8067</b> for Infant Details Inqury</td></tr></table>";

	}
	document.getElementById("tsl_flights_pasanger_info_get"+selected_in).innerHTML=pasanger_code;
}
function get_hotel_pasanger_info()
{
	var pasanger_code=" ";
	var temp_code=" ";
	var date_validate=new Date();
	//var pasanger_code_existing=document.getElementById("tsl_flights_pasanger_info_get");
	var adult_no=document.getElementById("tsl_hb_adult_no").options[document.getElementById("tsl_hb_adult_no").selectedIndex].value;
	var child_no=document.getElementById("tsl_hb_child_no").options[document.getElementById("tsl_hb_child_no").selectedIndex].value;
	var infant_no=document.getElementById("tsl_hb_infant_no").options[document.getElementById("tsl_hb_infant_no").selectedIndex].value;
	if(document.getElementById("tsl_hb_flights").options[document.getElementById("tsl_hb_flights").selectedIndex].value=="1")
	{
	if(adult_no>1)
	{
		for(i=1;i<adult_no;i++)
		{
			if(i==1)
			{
			pasanger_code=pasanger_code+"<table width=\"100%\" align=\"left\" border=\"0\"><tr><td align=\"left\" width=\"28%\">Addtional Passenger Name (as Passport) : </td><td align=\"left\" width=\"72%\"><select name=\"tsl_hb_name_title"+i+"\" id=\"tsl_hb_name_title"+i+"\" style=\"font-size:10px;\"><option value=\"Mr.\" selected=\"selected\">Mr.</option><option value=\"Mrs.\">Mrs.</option><option value=\"Ms.\">Ms.</option><option value=\"Miss.\">Miss.</option><option value=\"Mstr.\">Mstr.</option><option value=\"Dr.\">Dr.</option><option value=\"Rev.\">Rev.</option><option value=\"Prof.\">Prof.</option><option value=\"Sir.\">Sir.</option><option value=\"Lady.\">Lady.</option></select>&nbsp;<input type=\"text\" id=\"tsl_hb_first"+i+"\" name=\"tsl_hb_first"+i+"\" value=\"First Name\" size=\"20\" style=\"font-size:10px;color:#CCC;\"	onkeyup=\"document.getElementById('tsl_hb_first"+i+"').style.color ='#000000';\" onfocus=\"document.getElementById('tsl_hb_first"+i+"').style.color ='#000000';if(document.getElementById('tsl_hb_first"+i+"').value=='First Name'){document.getElementById('tsl_hb_first"+i+"').value ='';}\" onblur=\"if(document.getElementById('tsl_hb_first"+i+"').value==''){document.getElementById('tsl_hb_first"+i+"').value ='First Name'; document.getElementById('tsl_hb_first"+i+"').style.color ='#CCC';}\"/>&nbsp;<input type=\"text\" id=\"tsl_hb_surname"+i+"\" name=\"tsl_hb_surname"+i+"\" value=\"Surname\" size=\"20\" style=\"font-size:10px;color:#CCC;\"	onkeyup=\"document.getElementById('tsl_hb_surname"+i+"').style.color ='#000000';\" onfocus=\"document.getElementById('tsl_hb_surname"+i+"').style.color ='#000000';if(document.getElementById('tsl_hb_surname"+i+"').value=='Surname'){document.getElementById('tsl_hb_surname"+i+"').value ='';}\" onblur=\"if(document.getElementById('tsl_hb_surname"+i+"').value==''){document.getElementById('tsl_hb_surname"+i+"').value ='Surname'; document.getElementById('tsl_hb_surname"+i+"').style.color ='#CCC';}\"/></td></tr></table>";
			}
			else
			{
			pasanger_code=pasanger_code+"<table width=\"100%\" align=\"left\" border=\"0\"><tr><td align=\"left\" width=\"28%\"></td><td align=\"left\" width=\"72%\"><select name=\"tsl_hb_name_title"+i+"\" id=\"tsl_hb_name_title"+i+"\" style=\"font-size:10px;\"><option value=\"Mr.\" selected=\"selected\">Mr.</option><option value=\"Mrs.\">Mrs.</option><option value=\"Ms.\">Ms.</option><option value=\"Miss.\">Miss.</option><option value=\"Mstr.\">Mstr.</option><option value=\"Dr.\">Dr.</option><option value=\"Rev.\">Rev.</option><option value=\"Prof.\">Prof.</option><option value=\"Sir.\">Sir.</option><option value=\"Lady.\">Lady.</option></select>&nbsp;<input type=\"text\" id=\"tsl_hb_first"+i+"\" name=\"tsl_hb_first"+i+"\" value=\"First Name\" size=\"20\" style=\"font-size:10px;color:#CCC;\"	onkeyup=\"document.getElementById('tsl_hb_first"+i+"').style.color ='#000000';\" onfocus=\"document.getElementById('tsl_hb_first"+i+"').style.color ='#000000';if(document.getElementById('tsl_hb_first"+i+"').value=='First Name'){document.getElementById('tsl_hb_first"+i+"').value ='';}\" onblur=\"if(document.getElementById('tsl_hb_first"+i+"').value==''){document.getElementById('tsl_hb_first"+i+"').value ='First Name'; document.getElementById('tsl_hb_first"+i+"').style.color ='#CCC';}\"/>&nbsp;<input type=\"text\" id=\"tsl_hb_surname"+i+"\" name=\"tsl_hb_surname"+i+"\" value=\"Surname\" size=\"20\" style=\"font-size:10px;color:#CCC;\"	onkeyup=\"document.getElementById('tsl_hb_surname"+i+"').style.color ='#000000';\" onfocus=\"document.getElementById('tsl_hb_surname"+i+"').style.color ='#000000';if(document.getElementById('tsl_hb_surname"+i+"').value=='Surname'){document.getElementById('tsl_hb_surname"+i+"').value ='';}\" onblur=\"if(document.getElementById('tsl_hb_surname"+i+"').value==''){document.getElementById('tsl_hb_surname"+i+"').value ='Surname'; document.getElementById('tsl_hb_surname"+i+"').style.color ='#CCC';}\"/></td></tr></table>";
			}
		}
	}
	}
	else
	{
		document.getElementById("tsl_hotels_pasanger_info_get").innerHTML="";
	}
	if(child_no>0 && adult_no>0)
	{
		for(i=0;i<child_no;i++)
		{
			if(i==0)
			{
			pasanger_code=pasanger_code+"<table width=\"100%\" align=\"left\" border=\"0\"><tr><td align=\"left\" width=\"28%\">Child Name (as Passport) : </td><td align=\"left\"><input type=\"text\" id=\"tsl_hb_firstc"+i+"\" name=\"tsl_hb_firstc"+i+"\" value=\"First Name\" size=\"20\" style=\"font-size:10px;color:#CCC;\"	onkeyup=\"document.getElementById('tsl_hb_firstc"+i+"').style.color ='#000000';\" onfocus=\"document.getElementById('tsl_hb_firstc"+i+"').style.color ='#000000';if(document.getElementById('tsl_hb_firstc"+i+"').value=='First Name'){document.getElementById('tsl_hb_firstc"+i+"').value ='';}\" onblur=\"if(document.getElementById('tsl_hb_firstc"+i+"').value==''){document.getElementById('tsl_hb_firstc"+i+"').value ='First Name'; document.getElementById('tsl_hb_firstc"+i+"').style.color ='#CCC';}\"/>&nbsp;<input type=\"text\" id=\"tsl_hb_surnamec"+i+"\" name=\"tsl_hb_surnamec"+i+"\" value=\"Surname\" size=\"20\" style=\"font-size:10px;color:#CCC;\"	onkeyup=\"document.getElementById('tsl_hb_surnamec"+i+"').style.color ='#000000';\" onfocus=\"document.getElementById('tsl_hb_surnamec"+i+"').style.color ='#000000';if(document.getElementById('tsl_hb_surnamec"+i+"').value=='Surname'){document.getElementById('tsl_hb_surnamec"+i+"').value ='';}\" onblur=\"if(document.getElementById('tsl_hb_surnamec"+i+"').value==''){document.getElementById('tsl_hb_surnamec"+i+"').value ='Surname'; document.getElementById('tsl_hb_surnamec"+i+"').style.color ='#CCC';}\"/></td></tr>";
			}
			else
			{
			pasanger_code=pasanger_code+"<table width=\"100%\" align=\"left\" border=\"0\"><tr><td align=\"left\" width=\"28%\"></td><td align=\"left\"><input type=\"text\" id=\"tsl_hb_firstc"+i+"\" name=\"tsl_hb_firstc"+i+"\" value=\"First Name\" size=\"20\" style=\"font-size:10px;color:#CCC;\"	onkeyup=\"document.getElementById('tsl_hb_firstc"+i+"').style.color ='#000000';\" onfocus=\"document.getElementById('tsl_hb_firstc"+i+"').style.color ='#000000';if(document.getElementById('tsl_hb_firstc"+i+"').value=='First Name'){document.getElementById('tsl_hb_firstc"+i+"').value ='';}\" onblur=\"if(document.getElementById('tsl_hb_firstc"+i+"').value==''){document.getElementById('tsl_hb_firstc"+i+"').value ='First Name'; document.getElementById('tsl_hb_firstc"+i+"').style.color ='#CCC';}\"/>&nbsp;<input type=\"text\" id=\"tsl_hb_surnamec"+i+"\" name=\"tsl_hb_surnamec"+i+"\" value=\"Surname\" size=\"20\" style=\"font-size:10px;color:#CCC;\"	onkeyup=\"document.getElementById('tsl_hb_surnamec"+i+"').style.color ='#000000';\" onfocus=\"document.getElementById('tsl_hb_surnamec"+i+"').style.color ='#000000';if(document.getElementById('tsl_hb_surnamec"+i+"').value=='Surname'){document.getElementById('tsl_hb_surnamec"+i+"').value ='';}\" onblur=\"if(document.getElementById('tsl_hb_surnamec"+i+"').value==''){document.getElementById('tsl_hb_surnamec"+i+"').value ='Surname'; document.getElementById('tsl_hb_surnamec"+i+"').style.color ='#CCC';}\"/></td></tr>";
			}
			temp_code="";
			temp_code="<tr><td align=\"right\">DOB : </td><td align=\"left\"><select name=\"tsl_hb_child_dob_d"+i+"\" id=\"tsl_hb_child_dob_d"+i+"\" style=\"font-size:10px;\"><option value=\"-1\" selected=\"selected\">Day</option>";
			for(a=1;a<32;a++)
			{
				temp_code+="<option value=\""+a+"\">"+a+"</option>";
			}
			temp_code+="</select>&nbsp;";
			temp_code+="<select name=\"tsl_hb_child_dob_m"+i+"\" id=\"tsl_hb_child_dob_m"+i+"\" style=\"font-size:10px;\"><option value=\"-1\" selected=\"selected\">Month</option>";
			for(b=1;b<13;b++)
			{
				
				temp_code+="<option value=\""+b+"\">"+b+"</option>";
			}
			temp_code+="</select>&nbsp;";
			temp_code+="<select name=\"tsl_hb_child_dob_y"+i+"\" id=\"tsl_hb_child_dob_y"+i+"\" style=\"font-size:10px;\"><option value=\"-1\" selected=\"selected\">Year</option>";
			for(c=(date_validate.getYear()-12);c<=(date_validate.getYear()-2);c++)
			{
				temp_code+="<option value=\""+c+"\">"+c+"</option>";
			}
			temp_code+="</select></td></tr></table>";
			pasanger_code=pasanger_code+temp_code;
		}
	}
	else if(child_no>0 && adult_no<=0)
	{
		pasanger_code=pasanger_code+"<table width=\"100%\" align=\"center\" border=\"0\"><tr><td align=\"center\" colspan=\"2\">Please call <b>0208 099 8067</b> for Child Details Inquiry</td></tr></table>";

	}
	if(infant_no>0 && adult_no>=infant_no && adult_no>0)
	{
		for(i=0;i<infant_no;i++)
		{
			if(i==0)
			{
			pasanger_code=pasanger_code+"<table width=\"100%\" align=\"left\" border=\"0\"><tr><td align=\"left\" width=\"28%\">Infant Name (as Passport) : </td><td align=\"left\"><input type=\"text\" id=\"tsl_hb_firsti"+i+"\" name=\"tsl_hb_firsti"+i+"\" value=\"First Name\" size=\"20\" style=\"font-size:10px;color:#CCC;\"	onkeyup=\"document.getElementById('tsl_hb_firsti"+i+"').style.color ='#000000';\" onfocus=\"document.getElementById('tsl_hb_firsti"+i+"').style.color ='#000000';if(document.getElementById('tsl_hb_firsti"+i+"').value=='First Name'){document.getElementById('tsl_hb_firsti"+i+"').value ='';}\" onblur=\"if(document.getElementById('tsl_hb_firsti"+i+"').value==''){document.getElementById('tsl_hb_firsti"+i+"').value ='First Name'; document.getElementById('tsl_hb_firsti"+i+"').style.color ='#CCC';}\"/>&nbsp;<input type=\"text\" id=\"tsl_hb_surnamei"+i+"\" name=\"tsl_hb_surnamei"+i+"\" value=\"Surname\" size=\"20\" style=\"font-size:10px;color:#CCC;\"	onkeyup=\"document.getElementById('tsl_hb_surnamei"+i+"').style.color ='#000000';\" onfocus=\"document.getElementById('tsl_hb_surnamei"+i+"').style.color ='#000000';if(document.getElementById('tsl_hb_surnamei"+i+"').value=='Surname'){document.getElementById('tsl_hb_surnamei"+i+"').value ='';}\" onblur=\"if(document.getElementById('tsl_hb_surnamei"+i+"').value==''){document.getElementById('tsl_hb_surnamei"+i+"').value ='Surname'; document.getElementById('tsl_hb_surnamei"+i+"').style.color ='#CCC';}\"/></td></tr>";
			}
			else
			{
			pasanger_code=pasanger_code+"<table width=\"100%\" align=\"left\" border=\"0\"><tr><td align=\"left\" width=\"28%\"></td><td align=\"left\"><input type=\"text\" id=\"tsl_hb_firsti"+i+"\" name=\"tsl_hb_firsti"+i+"\" value=\"First Name\" size=\"20\" style=\"font-size:10px;color:#CCC;\"	onkeyup=\"document.getElementById('tsl_hb_firsti"+i+"').style.color ='#000000';\" onfocus=\"document.getElementById('tsl_hb_firsti"+i+"').style.color ='#000000';if(document.getElementById('tsl_hb_firsti"+i+"').value=='First Name'){document.getElementById('tsl_hb_firsti"+i+"').value ='';}\" onblur=\"if(document.getElementById('tsl_hb_firsti"+i+"').value==''){document.getElementById('tsl_hb_firsti"+i+"').value ='First Name'; document.getElementById('tsl_hb_firsti"+i+"').style.color ='#CCC';}\"/>&nbsp;<input type=\"text\" id=\"tsl_hb_surnamei"+i+"\" name=\"tsl_hb_surnamei"+i+"\" value=\"Surname\" size=\"20\" style=\"font-size:10px;color:#CCC;\"	onkeyup=\"document.getElementById('tsl_hb_surnamei"+i+"').style.color ='#000000';\" onfocus=\"document.getElementById('tsl_hb_surnamei"+i+"').style.color ='#000000';if(document.getElementById('tsl_hb_surnamei"+i+"').value=='Surname'){document.getElementById('tsl_hb_surnamei"+i+"').value ='';}\" onblur=\"if(document.getElementById('tsl_hb_surnamei"+i+"').value==''){document.getElementById('tsl_hb_surnamei"+i+"').value ='Surname'; document.getElementById('tsl_hb_surnamei"+i+"').style.color ='#CCC';}\"/></td></tr>";
			}
			temp_code="";
			temp_code="<tr><td align=\"right\">DOB : </td><td align=\"left\"><select name=\"tsl_hb_infant_dob_d"+i+"\" id=\"tsl_hb_infant_dob_d"+i+"\" style=\"font-size:10px;\"><option value=\"-1\" selected=\"selected\">Day</option>";
			for(a=1;a<32;a++)
			{
				temp_code+="<option value=\""+a+"\">"+a+"</option>";
			}
			temp_code+="</select>&nbsp;";
			temp_code+="<select name=\"tsl_hb_infant_dob_m"+i+"\" id=\"tsl_hb_infant_dob_m"+i+"\" style=\"font-size:10px;\"><option value=\"-1\" selected=\"selected\">Month</option>";
			for(b=1;b<13;b++)
			{
				
				temp_code+="<option value=\""+b+"\">"+b+"</option>";
			}
			temp_code+="</select>&nbsp;";
			temp_code+="<select name=\"tsl_hb_infant_dob_y"+i+"\" id=\"tsl_hb_infant_dob_y"+i+"\" style=\"font-size:10px;\"><option value=\"-1\" selected=\"selected\">Year</option>";
			for(c=(date_validate.getYear()-2);c<=date_validate.getYear();c++)
			{
				temp_code+="<option value=\""+c+"\">"+c+"</option>";
			}
			temp_code+="</select></td></tr></table>";
			pasanger_code=pasanger_code+temp_code;
		}
	}
	else if(infant_no!=0 && adult_no<infant_no)
	{
		pasanger_code=pasanger_code+"<table width=\"100%\" align=\"center\" border=\"0\"><tr><td align=\"center\" colspan=\"2\">Please call <b>0208 099 8067</b> for Infant Details Inqury</td></tr></table>";

	}
		document.getElementById("tsl_hotels_pasanger_info_get").innerHTML=pasanger_code;
	
}
function select_hotel_room_info(loop_id)
{
	var selected_loop_id=document.getElementById("tsl_hotel_sel_room_type").options[document.getElementById("tsl_hotel_sel_room_type").selectedIndex].value;
	for(i=0;i<loop_id;i++)
	{
		if(selected_loop_id==i)
		{
			document.getElementById("tsl_hotel_sel_room_type_display"+i).style.visibility="visible";
			document.getElementById("tsl_hotel_sel_room_type_display"+i).style.height="100%";
		}
		else
		{
			document.getElementById("tsl_hotel_sel_room_type_display"+i).style.visibility="hidden";
			document.getElementById("tsl_hotel_sel_room_type_display"+i).style.height="0px";
		}
	}
}
function tsl_hb_group_dis()
{
		if(document.getElementById("tsl_hb_group").checked==false)
		{
			//document.getElementById("tsl_hb_passengers_group_title").style.visibility="hidden";
			//document.getElementById("tsl_hb_passengers_group_title").style.height="0px";
			document.getElementById("tsl_hb_passengers_group").style.visibility="hidden";
			document.getElementById("tsl_hb_passengers_group").style.height="0px";
			document.getElementById("tsl_hb_adult_no").disabled=false;
			document.getElementById("tsl_hb_child_no").disabled=false;
			document.getElementById("tsl_hb_infant_no").disabled=false;
		}
		else
		{
			//document.getElementById("tsl_hb_passengers_group_title").style.visibility="visible";
			//document.getElementById("tsl_hb_passengers_group_title").style.height="100%";
			document.getElementById("tsl_hb_passengers_group").style.visibility="visible";
			document.getElementById("tsl_hb_passengers_group").style.height="100%";
			document.getElementById("tsl_hb_adult_no").disabled="disabled";
			document.getElementById("tsl_hb_child_no").disabled="disabled";
			document.getElementById("tsl_hb_infant_no").disabled="disabled";
		}
}
function tsl_hb_holiday_package_selection()
{
	var selected_package=document.getElementById("tsl_hb_package_duration").options[document.getElementById("tsl_hb_package_duration").selectedIndex].value;
	if(selected_package=="1")
	{	
		document.getElementById("tsl_hb_package_duration_text").style.visibility="visible";
		document.getElementById("tsl_hb_package_duration_text").style.height="100%";	
		//document.getElementById("tsl_hb_leaving_date").style.visibility="visible";
		//document.getElementById("tsl_hb_leaving_date").style.height="100%";	
		//document.getElementById("tsl_hb_leaving_date_title").style.visibility="visible";
		//document.getElementById("tsl_hb_leaving_date_title").style.height="100%";			
	}
	else
	{	
		document.getElementById("tsl_hb_package_duration_text").style.visibility="hidden";
		document.getElementById("tsl_hb_package_duration_text").style.height="1px";	
		//document.getElementById("tsl_hb_leaving_date").style.visibility="hidden";
		//document.getElementById("tsl_hb_leaving_date").style.height="1px";		
		//document.getElementById("tsl_hb_leaving_date_title").style.visibility="hidden";
		//document.getElementById("tsl_hb_leaving_date_title").style.height="1px";			
	}
}
function tsl_hb_transport_request()
{
	var selected_package=document.getElementById("tsl_hb_flights").options[document.getElementById("tsl_hb_flights").selectedIndex].value;
	if(selected_package=="0")
	{	
		document.getElementById("tsl_hb_transport_request_title").style.visibility="visible";
		document.getElementById("tsl_hb_transport_request_title").style.height="100%";	
		document.getElementById("tsl_hb_transport_request").style.visibility="visible";
		document.getElementById("tsl_hb_transport_request").style.height="100%";		
		document.getElementById("tsl_hb_pref_flight_information_title").style.visibility="hidden";
		document.getElementById("tsl_hb_pref_flight_information_title").style.height="1px";	
		document.getElementById("tsl_hb_pref_flight_information").style.visibility="hidden";
		document.getElementById("tsl_hb_pref_flight_information").style.height="1px";		
	}
	else
	{	
		document.getElementById("tsl_hb_pref_flight_information_title").style.visibility="visible";
		document.getElementById("tsl_hb_pref_flight_information_title").style.height="100%";	
		document.getElementById("tsl_hb_pref_flight_information").style.visibility="visible";
		document.getElementById("tsl_hb_pref_flight_information").style.height="100%";	
		document.getElementById("tsl_hb_transport_request_title").style.visibility="hidden";
		document.getElementById("tsl_hb_transport_request_title").style.height="1px";		
		document.getElementById("tsl_hb_transport_request").style.visibility="hidden";
		document.getElementById("tsl_hb_transport_request").style.height="1px";	
		document.getElementById("tsl_hb_arrival_flight_information_title").style.visibility="hidden";
		document.getElementById("tsl_hb_arrival_flight_information_title").style.height="1px";		
		document.getElementById("tsl_hb_arrival_flight_information").style.visibility="hidden";
		document.getElementById("tsl_hb_arrival_flight_information").style.height="1";		
	}
}
function arrival_flight_information_title()
{
	var selected_package=document.getElementById("tsl_hb_airport_transport").options[document.getElementById("tsl_hb_airport_transport").selectedIndex].value;
	if(selected_package=="1")
	{	
		document.getElementById("tsl_hb_arrival_flight_information_title").style.visibility="visible";
		document.getElementById("tsl_hb_arrival_flight_information_title").style.height="100%";	
		document.getElementById("tsl_hb_arrival_flight_information").style.visibility="visible";
		document.getElementById("tsl_hb_arrival_flight_information").style.height="100%";			
	}
	else
	{	
		document.getElementById("tsl_hb_arrival_flight_information_title").style.visibility="hidden";
		document.getElementById("tsl_hb_arrival_flight_information_title").style.height="1px";		
		document.getElementById("tsl_hb_arrival_flight_information").style.visibility="hidden";
		document.getElementById("tsl_hb_arrival_flight_information").style.height="1px";			
	}
}
function tsl_hb_pack_duration_cal()
{
	var dep_day=document.getElementById("tsl_hb_dd_day").options[document.getElementById("tsl_hb_dd_day").selectedIndex].value;
	var dep_month=document.getElementById("tsl_hb_dd_month").options[document.getElementById("tsl_hb_dd_month").selectedIndex].value;
	var dep_year=document.getElementById("tsl_hb_dd_year").options[document.getElementById("tsl_hb_dd_year").selectedIndex].value;
	var des_day=document.getElementById("tsl_hb_ad_day").options[document.getElementById("tsl_hb_ad_day").selectedIndex].value;
	var des_month=document.getElementById("tsl_hb_ad_month").options[document.getElementById("tsl_hb_ad_month").selectedIndex].value;
	var des_year=document.getElementById("tsl_hb_ad_year").options[document.getElementById("tsl_hb_ad_year").selectedIndex].value;
	var date1=new Date(des_month+'/'+des_day+'/'+des_year);
	var date2=new Date(dep_month+'/'+dep_day+'/'+dep_year);
    // The number of milliseconds in one day
    var ONE_DAY = 1000 * 60 * 60 * 24

    // Convert both dates to milliseconds
    var date1_ms = date1.getTime()
    var date2_ms = date2.getTime()

    // Calculate the difference in milliseconds
    var difference_ms = Math.abs(date1_ms - date2_ms)
    
    // Convert back to days and assign
	document.getElementById("tsl_hb_package_duration_text").value= Math.round(difference_ms/ONE_DAY);
	alert("date1:"+date1);
	alert("date2:"+date1);
	alert("date1_ms:"+date1);
	alert("date2_ms:"+date1);
	alert("difference_ms:"+difference_ms);
	alert("ONE_DAY:"+ONE_DAY);
}
function tsl_hb_child_room_seperation()
{
	var child_no=document.getElementById("tsl_hb_child_no").options[document.getElementById("tsl_hb_child_no").selectedIndex].value;
	if(child_no>0 || document.getElementById("tsl_hb_child_no_in").value!="")
	{
		document.getElementById("tsl_hb_child_seperation").disabled=false;
	}
	else
	{
		document.getElementById("tsl_hb_child_seperation").disabled="disabled";
	}
}
function tsl_hb_add_function(assign_id,assign_val,add_on_id)
{
	if(document.getElementById(add_on_id).checked==true)
	{
		for(i=0; i < document.getElementById(assign_id).options.length; i++)
		{
			if(document.getElementById(assign_id).options[i].value==assign_val)
			{
				document.getElementById(assign_id).selectedIndex=i;
			}
		}
	}
	else
	{
		document.getElementById(assign_id).selectedIndex=0;
	}
}
function tsl_hotel_inq_show(loop_id)
{
	//document.getElementById("tsl_hotel_ibooking_"+loop_id).style.visibility="visible";
	//document.getElementById("tsl_hotel_ibooking_"+loop_id).style.height="100%";		
	//document.getElementById("tsl_hotel_inq_button").style.visibility="hidden";
	//document.getElementById("tsl_hotel_ibooking_"+loop_id).focus();
	document.getElementById("tsl_hotel_ibooking").submit();
	
}
function tsl_hotel_inq_show_rates(loop_id,select_Board,sel_day,sel_month,sel_year)
{
	var selectedindex_;
	var Val_Count;
	var tempINT;
	if(select_Board!=null)
	{
		document.getElementById("tsl_hb_board_basis")
		Val_Count=document.getElementById("tsl_hb_board_basis").length;
		for(t=0;t<Val_Count;t++)
		{
			if(document.getElementById("tsl_hb_board_basis").options[t].value==select_Board)
			{
				selectedindex_=t;
			}
		}
		document.getElementById("tsl_hb_board_basis").selectedIndex=selectedindex_;
	}
	Val_Count=0;
	selectedindex_=0;
	if(sel_day!=null)
	{
		sel_day=parseFloat(sel_day);
		document.getElementById("tsl_hb_dd_day")
		Val_Count=document.getElementById("tsl_hb_dd_day").length;
		for(t=0;t<Val_Count;t++)
		{
			if(document.getElementById("tsl_hb_dd_day").options[t].value==sel_day)
			{
				selectedindex_=t;
			}
		}
		document.getElementById("tsl_hb_dd_day").selectedIndex=selectedindex_;
	}
	Val_Count=0;
	selectedindex_=0;
	if(sel_month!=null)
	{
		sel_month=parseFloat(sel_month);
		document.getElementById("tsl_hb_dd_month")
		Val_Count=document.getElementById("tsl_hb_dd_month").length;
		for(t=0;t<Val_Count;t++)
		{
			if(document.getElementById("tsl_hb_dd_month").options[t].value==sel_month)
			{
				selectedindex_=t;
			}
		}
		document.getElementById("tsl_hb_dd_month").selectedIndex=selectedindex_;
	}
	Val_Count=0;
	selectedindex_=0;
	if(sel_year!=null)
	{
		document.getElementById("tsl_hb_dd_year")
		Val_Count=document.getElementById("tsl_hb_dd_year").length;
		for(t=0;t<Val_Count;t++)
		{
			if(document.getElementById("tsl_hb_dd_year").options[t].value==sel_year)
			{
				selectedindex_=t;
			}
		}
		document.getElementById("tsl_hb_dd_year").selectedIndex=selectedindex_;
	}
	//document.getElementById("tsl_hotel_ibooking_"+loop_id).style.visibility="visible";
	//document.getElementById("tsl_hotel_ibooking_"+loop_id).style.height="100%";		
	//document.getElementById("tsl_hotel_ibooking_"+loop_id).focus();
	document.getElementById("tsl_hotel_ibooking").submit();
}
function tsl_hotel_inq_close(loop_id)
{
	document.getElementById("tsl_hotel_ibooking_"+loop_id).style.visibility="hidden";
	document.getElementById("tsl_hotel_ibooking_"+loop_id).style.height="1px";	
	document.getElementById("tsl_hotel_inq_button").style.visibility="visible";	
}
function tsl_hb_mail_quatation()
{
	document.getElementById("tsl_hb_mail_confirm").value="N";
	return true;
}
function tsl_hb_mail_confirm_fun()
{
	document.getElementById("tsl_hb_mail_confirm").value="Y";
	return true;
}
function validate_tsl_hotel_search(search_cri_one,search_cri_two)
{
	var return_val;
	if(document.getElementById(search_cri_one).value=="-1")
	{
		if(search_cri_one=="hotel_name")
		{
			if(document.getElementById(search_cri_two).value!="")
			{
				var str=document.getElementById(search_cri_two).value;
				document.getElementById("tslhotel_search"+search_cri_one).action="/sri-lanka-hotels/"+str.replace(/ /gi, "-")+".aspx";
				return_val = true;
			}
			else
			{
				document.getElementById("hotel_home_name_manual").style.visibility="hidden";
				document.getElementById("hotel_home_name_manual").style.height="1px";
				document.getElementById("hotel_home_name_auto").style.visibility="visible";
				document.getElementById("hotel_home_name_auto").style.height="100%";
				document.getElementById("hotelsearcherror").innerHTML="Please Select Criteria";
				document.getElementById(search_cri_one).value=-1;
				document.getElementById(search_cri_one).focus();
				return_val =  false;
			}
		}
		else
		{
			document.getElementById("hotel_home_name_manual").style.visibility="hidden";
			document.getElementById("hotel_home_name_manual").style.height="1px";
			document.getElementById("hotel_home_name_auto").style.visibility="visible";
			document.getElementById("hotel_home_name_auto").style.height="100%";
				document.getElementById("hotelsearcherror").innerHTML="Please Select Criteria";
			document.getElementById(search_cri_one).value=-1;
			document.getElementById(search_cri_one).focus();
			return_val =  false;
		}
	}
	else
	{
		document.getElementById("tslhotel_search"+search_cri_one).action="/sri-lanka-hotels/"+document.getElementById(search_cri_one).value+".aspx";
		return_val =  true;
	}
	return return_val;
}
function tsl_holiday_search(region_id,holiday_type_id,lifestyle_id,error_id,form_search_id)
{
	var return_val=false;
	var error_msg_display="";
	if(document.getElementById(region_id).value=="-1" && document.getElementById(holiday_type_id).value=="-1" && document.getElementById(lifestyle_id).value=="-1")
	{
		error_msg_display ="Please select Criteria!";
	}
	else
	{
		if(document.getElementById(region_id).value!="-1" && document.getElementById(holiday_type_id).value!="-1" && document.getElementById(lifestyle_id).value!="-1")
		{
			document.getElementById(form_search_id).action="/sri-lanka-holidays/Search.aspx";
			return_val=true;
		}
		else
		{
			if(document.getElementById(region_id).value!="-1")
			{
				document.getElementById(form_search_id).action="/sri-lanka-holidays/Regional.aspx";
				return_val=true;
			}
			if(document.getElementById(holiday_type_id).value!="-1")
			{
				document.getElementById(form_search_id).action="/sri-lanka-holidays/"+document.getElementById(holiday_type_id).value+".aspx";
				return_val=true;
			}
			if(document.getElementById(lifestyle_id).value!="-1")
			{
				document.getElementById(form_search_id).action="/sri-lanka-holidays/"+document.getElementById(lifestyle_id).value+".aspx";
				return_val=true;
			}
		}
	}
	if(return_val==false)
	{
		document.getElementById(error_id).innerHTML=error_msg_display;
	}
	return return_val;
}
function tsl_search_hotel_name_auto()
{
	document.getElementById("hotel_home_name_auto").style.visibility="visible";
	document.getElementById("hotel_home_name_auto").style.height="100%";
	document.getElementById("hotel_home_name_manual").style.visibility="hidden";
	document.getElementById("hotel_home_name_manual").style.height="1px";
}
function tsl_search_hotel_name_enter()
{
	document.getElementById("hotel_home_name_manual").style.visibility="visible";
	document.getElementById("hotel_home_name_manual").style.height="100%";
	document.getElementById("hotel_home_name_auto").style.visibility="hidden";
	document.getElementById("hotel_home_name_auto").style.height="1px";
}
function ffib_validate()
{
}
function ffis_flight_val()
{
	var temp=document.getElementById("ffis_dd_month").value;
	temp=parseInt(temp)+2;
	if(temp==11)
	{
		temp=1;
	}
	if(temp==12)
	{
		temp=2;
	}
	document.getElementById("ffis_ad_day").value=document.getElementById("ffis_dd_day").value;
	document.getElementById("ffis_ad_month").value=temp;
	document.getElementById("ffis_ad_year").value=document.getElementById("ffis_dd_year").value;
}
function ffib_close(sent_id)
{
	var open_div=document.getElementById("flights_fares_ibooking_"+sent_id);
	var r_fare=document.getElementById("ffib_fare_r_"+sent_id);
	var o_fare=document.getElementById("ffib_fare_o_"+sent_id);
	var arr_date=document.getElementById("ffib_arrival_date_"+sent_id);
	var dd_j_type_date=document.getElementById("ffi_dd_j_type_"+sent_id);
	open_div.style.visibility="hidden";
	r_fare.style.visibility="hidden";
	o_fare.style.visibility="hidden";
	arr_date.style.visibility="hidden";
	open_div.style.height="1px";
	r_fare.style.height="1px";
	o_fare.style.height="1px";
	arr_date.style.height="1px";
	dd_j_type_date.value="2";
	
}
var i=1;
function expand_divs(div_id)
{
	var div_section=document.getElementById(div_id);
		div_section.style.height=i+"%";
		//div_section.style.length=i+"%";
		if(i==100)
		{
			clearTimeout (div_timer);
		}
	i++;
	
	div_timer=setTimeout("expand_divs('"+div_id+"')",500);
}
function ibooking_load(load_id,no_ofloops)
{
	for(i=0;i<no_ofloops;i++)
	{
		if(!(i==load_id))
		{
			var open_div=document.getElementById("flights_fares_ibooking_"+i);
			var r_fare=document.getElementById("ffib_fare_r_"+i);
			var o_fare=document.getElementById("ffib_fare_o_"+i);
			var arr_date=document.getElementById("ffib_arrival_date_"+i);
			var dd_j_type_date=document.getElementById("ffi_dd_j_type_"+i);
			open_div.style.visibility="hidden";
			r_fare.style.visibility="hidden";
			o_fare.style.visibility="hidden";
			arr_date.style.visibility="hidden";
			open_div.style.height="1px";
			r_fare.style.height="1px";
			o_fare.style.height="1px";
			arr_date.style.height="1px";
			dd_j_type_date.value="2";
		}
	}
	get_flights_pasanger_info(load_id);
	var open_div=document.getElementById("flights_fares_ibooking_"+load_id);
	open_div.style.visibility="visible";
	open_div.style.height="100%";
	//var div_id_expand="flights_fares_ibooking_"+load_id;
	//expand_divs(div_id_expand);
	var r_div=document.getElementById("ffib_fare_r_"+load_id);
	r_div.style.visibility="visible";
	r_div.style.height="100%";
	var arr_div=document.getElementById("ffib_arrival_date_"+load_id);
	arr_div.style.visibility="visible";
	arr_div.style.height="100%";
	
}
function ffib_return(arr_date,fare_o,fare_r,sel_j_type)
{
	var return_div = document.getElementById(sel_j_type);
	if(return_div.value=="1")
	{
		document.getElementById(arr_date).style.visibility="hidden";
		document.getElementById(fare_o).style.visibility="visible";
		document.getElementById(fare_o).style.height="100%";
		document.getElementById(fare_r).style.visibility="hidden";
		document.getElementById(fare_r).style.height="1px";
	}
	if(return_div.value=="2")
	{
		document.getElementById(arr_date).style.visibility="visible";
		document.getElementById(fare_o).style.visibility="hidden";
		document.getElementById(fare_o).style.height="1px";
		document.getElementById(fare_r).style.visibility="visible";
		document.getElementById(fare_r).style.height="100%";
	}	
}
function get_TAILOR_pasanger_info()
{
	var pasanger_code=" ";
	var temp_code=" ";
	var date_validate=new Date();
	//var pasanger_code_existing=document.getElementById("tsl_flights_pasanger_info_get");
	var adult_no=document.getElementById("tslTailor_Adults").options[document.getElementById("tslTailor_Adults").selectedIndex].value;
	var child_no=document.getElementById("tslTailor_Child").options[document.getElementById("tslTailor_Child").selectedIndex].value;
	var infant_no=document.getElementById("tslTailor_Infants").options[document.getElementById("tslTailor_Infants").selectedIndex].value;
	if(adult_no>1)
	{
		for(i=1;i<adult_no;i++)
		{
			if(i==1)
			{
			pasanger_code=pasanger_code+"<table width=\"100%\" align=\"left\" border=\"0\"><tr><td align=\"left\" width=\"27%\">Addtional Passenger Name (as Passport) : </td><td align=\"left\"><select name=\"tsl_hb_name_title"+i+"\" id=\"tsl_hb_name_title"+i+"\" style=\"font-size:10px;\"><option value=\"Mr.\" selected=\"selected\">Mr.</option><option value=\"Mrs.\">Mrs.</option><option value=\"Ms.\">Ms.</option><option value=\"Miss.\">Miss.</option><option value=\"Mstr.\">Mstr.</option><option value=\"Dr.\">Dr.</option><option value=\"Rev.\">Rev.</option><option value=\"Prof.\">Prof.</option><option value=\"Sir.\">Sir.</option><option value=\"Lady.\">Lady.</option></select>&nbsp;<input type=\"text\" id=\"tsl_hb_surname"+i+"\" name=\"tsl_hb_surname"+i+"\" value=\"Surname\" size=\"20\" style=\"font-size:10px;color:#CCC;\"	onkeyup=\"document.getElementById('tsl_hb_surname"+i+"').style.color ='#000000';\" onfocus=\"document.getElementById('tsl_hb_surname"+i+"').style.color ='#000000';if(document.getElementById('tsl_hb_surname"+i+"').value=='Surname'){document.getElementById('tsl_hb_surname"+i+"').value ='';}\" onblur=\"if(document.getElementById('tsl_hb_surname"+i+"').value==''){document.getElementById('tsl_hb_surname"+i+"').value ='Surname'; document.getElementById('tsl_hb_surname"+i+"').style.color ='#CCC';}\"/>&nbsp;<input type=\"text\" id=\"tsl_hb_first"+i+"\" name=\"tsl_hb_first"+i+"\" value=\"First Name\" size=\"20\" style=\"font-size:10px;color:#CCC;\"	onkeyup=\"document.getElementById('tsl_hb_first"+i+"').style.color ='#000000';\" onfocus=\"document.getElementById('tsl_hb_first"+i+"').style.color ='#000000';if(document.getElementById('tsl_hb_first"+i+"').value=='First Name'){document.getElementById('tsl_hb_first"+i+"').value ='';}\" onblur=\"if(document.getElementById('tsl_hb_first"+i+"').value==''){document.getElementById('tsl_hb_first"+i+"').value ='First Name'; document.getElementById('tsl_hb_first"+i+"').style.color ='#CCC';}\"/></td></tr></table>";
			}
			else
			{
			pasanger_code=pasanger_code+"<table width=\"100%\" align=\"left\" border=\"0\"><tr><td align=\"left\" width=\"27%\"></td><td align=\"left\"><select name=\"tsl_hb_name_title"+i+"\" id=\"tsl_hb_name_title"+i+"\" style=\"font-size:10px;\"><option value=\"Mr.\" selected=\"selected\">Mr.</option><option value=\"Mrs.\">Mrs.</option><option value=\"Ms.\">Ms.</option><option value=\"Miss.\">Miss.</option><option value=\"Mstr.\">Mstr.</option><option value=\"Dr.\">Dr.</option><option value=\"Rev.\">Rev.</option><option value=\"Prof.\">Prof.</option><option value=\"Sir.\">Sir.</option><option value=\"Lady.\">Lady.</option></select>&nbsp;<input type=\"text\" id=\"tsl_hb_surname"+i+"\" name=\"tsl_hb_surname"+i+"\" value=\"Surname\" size=\"20\" style=\"font-size:10px;color:#CCC;\"	onkeyup=\"document.getElementById('tsl_hb_surname"+i+"').style.color ='#000000';\" onfocus=\"document.getElementById('tsl_hb_surname"+i+"').style.color ='#000000';if(document.getElementById('tsl_hb_surname"+i+"').value=='Surname'){document.getElementById('tsl_hb_surname"+i+"').value ='';}\" onblur=\"if(document.getElementById('tsl_hb_surname"+i+"').value==''){document.getElementById('tsl_hb_surname"+i+"').value ='Surname'; document.getElementById('tsl_hb_surname"+i+"').style.color ='#CCC';}\"/>&nbsp;<input type=\"text\" id=\"tsl_hb_first"+i+"\" name=\"tsl_hb_first"+i+"\" value=\"First Name\" size=\"20\" style=\"font-size:10px;color:#CCC;\"	onkeyup=\"document.getElementById('tsl_hb_first"+i+"').style.color ='#000000';\" onfocus=\"document.getElementById('tsl_hb_first"+i+"').style.color ='#000000';if(document.getElementById('tsl_hb_first"+i+"').value=='First Name'){document.getElementById('tsl_hb_first"+i+"').value ='';}\" onblur=\"if(document.getElementById('tsl_hb_first"+i+"').value==''){document.getElementById('tsl_hb_first"+i+"').value ='First Name'; document.getElementById('tsl_hb_first"+i+"').style.color ='#CCC';}\"/></td></tr></table>";
			}
		}
	}
	if(child_no>0 && adult_no>0)
	{
		for(i=0;i<child_no;i++)
		{
			if(i==0)
			{
				pasanger_code=pasanger_code+"<table width=\"100%\" align=\"left\" border=\"0\"><tr><td align=\"left\" width=\"27%\">Child Name (as Passport) : </td><td align=\"left\"><input type=\"text\" id=\"tsl_hb_surnamec"+i+"\" name=\"tsl_hb_surnamec"+i+"\" value=\"Surname\" size=\"20\" style=\"font-size:10px;color:#CCC;\"	onkeyup=\"document.getElementById('tsl_hb_surnamec"+i+"').style.color ='#000000';\" onfocus=\"document.getElementById('tsl_hb_surnamec"+i+"').style.color ='#000000';if(document.getElementById('tsl_hb_surnamec"+i+"').value=='Surname'){document.getElementById('tsl_hb_surnamec"+i+"').value ='';}\" onblur=\"if(document.getElementById('tsl_hb_surnamec"+i+"').value==''){document.getElementById('tsl_hb_surnamec"+i+"').value ='Surname'; document.getElementById('tsl_hb_surnamec"+i+"').style.color ='#CCC';}\"/>&nbsp;<input type=\"text\" id=\"tsl_hb_firstc"+i+"\" name=\"tsl_hb_firstc"+i+"\" value=\"First Name\" size=\"20\" style=\"font-size:10px;color:#CCC;\"	onkeyup=\"document.getElementById('tsl_hb_firstc"+i+"').style.color ='#000000';\" onfocus=\"document.getElementById('tsl_hb_firstc"+i+"').style.color ='#000000';if(document.getElementById('tsl_hb_firstc"+i+"').value=='First Name'){document.getElementById('tsl_hb_firstc"+i+"').value ='';}\" onblur=\"if(document.getElementById('tsl_hb_firstc"+i+"').value==''){document.getElementById('tsl_hb_firstc"+i+"').value ='First Name'; document.getElementById('tsl_hb_firstc"+i+"').style.color ='#CCC';}\"/></td></tr>";
				temp_code="";
				temp_code="<tr><td align=\"right\">Child DOB : </td><td align=\"left\"><select name=\"tsl_hb_child_dob_d"+i+"\" id=\"tsl_hb_child_dob_d"+i+"\" style=\"font-size:10px;\"><option value=\"-1\" selected=\"selected\">Day</option>";
				for(a=1;a<32;a++)
				{
					temp_code+="<option value=\""+a+"\">"+a+"</option>";
				}
				temp_code+="</select>&nbsp;";
				temp_code+="<select name=\"tsl_hb_child_dob_m"+i+"\" id=\"tsl_hb_child_dob_m"+i+"\" style=\"font-size:10px;\"><option value=\"-1\" selected=\"selected\">Month</option>";
				for(b=1;b<13;b++)
				{
					
					temp_code+="<option value=\""+b+"\">"+b+"</option>";
				}
				temp_code+="</select>&nbsp;";
				temp_code+="<select name=\"tsl_hb_child_dob_y"+i+"\" id=\"tsl_hb_child_dob_y"+i+"\" style=\"font-size:10px;\"><option value=\"-1\" selected=\"selected\">Year</option>";
				for(c=(date_validate.getYear()-11);c<=(date_validate.getYear()-2);c++)
				{
					temp_code+="<option value=\""+c+"\">"+c+"</option>";
				}
				temp_code+="</select></td></tr></table>";
				pasanger_code=pasanger_code+temp_code;
			}
			else
			{
				pasanger_code=pasanger_code+"<table width=\"100%\" align=\"left\" border=\"0\"><tr><td align=\"right\" width=\"27%\"></td><td align=\"left\"><input type=\"text\" id=\"tsl_hb_surnamec"+i+"\" name=\"tsl_hb_surnamec"+i+"\" value=\"Surname\" size=\"20\" style=\"font-size:10px;color:#CCC;\"	onkeyup=\"document.getElementById('tsl_hb_surnamec"+i+"').style.color ='#000000';\" onfocus=\"document.getElementById('tsl_hb_surnamec"+i+"').style.color ='#000000';if(document.getElementById('tsl_hb_surnamec"+i+"').value=='Surname'){document.getElementById('tsl_hb_surnamec"+i+"').value ='';}\" onblur=\"if(document.getElementById('tsl_hb_surnamec"+i+"').value==''){document.getElementById('tsl_hb_surnamec"+i+"').value ='Surname'; document.getElementById('tsl_hb_surnamec"+i+"').style.color ='#CCC';}\"/>&nbsp;<input type=\"text\" id=\"tsl_hb_firstc"+i+"\" name=\"tsl_hb_firstc"+i+"\" value=\"First Name\" size=\"20\" style=\"font-size:10px;color:#CCC;\"	onkeyup=\"document.getElementById('tsl_hb_firstc"+i+"').style.color ='#000000';\" onfocus=\"document.getElementById('tsl_hb_firstc"+i+"').style.color ='#000000';if(document.getElementById('tsl_hb_firstc"+i+"').value=='First Name'){document.getElementById('tsl_hb_firstc"+i+"').value ='';}\" onblur=\"if(document.getElementById('tsl_hb_firstc"+i+"').value==''){document.getElementById('tsl_hb_firstc"+i+"').value ='First Name'; document.getElementById('tsl_hb_firstc"+i+"').style.color ='#CCC';}\"/></td></tr>";
				temp_code="";
				temp_code="<tr><td align=\"right\">DOB : </td><td align=\"left\"><select name=\"tsl_hb_child_dob_d"+i+"\" id=\"tsl_hb_child_dob_d"+i+"\" style=\"font-size:10px;\"><option value=\"-1\" selected=\"selected\">Day</option>";
				for(a=1;a<32;a++)
				{
					temp_code+="<option value=\""+a+"\">"+a+"</option>";
				}
				temp_code+="</select>&nbsp;";
				temp_code+="<select name=\"tsl_hb_child_dob_m"+i+"\" id=\"tsl_hb_child_dob_m"+i+"\" style=\"font-size:10px;\"><option value=\"-1\" selected=\"selected\">Month</option>";
				for(b=1;b<13;b++)
				{
					
					temp_code+="<option value=\""+b+"\">"+b+"</option>";
				}
				temp_code+="</select>&nbsp;";
				temp_code+="<select name=\"tsl_hb_child_dob_y"+i+"\" id=\"tsl_hb_child_dob_y"+i+"\" style=\"font-size:10px;\"><option value=\"-1\" selected=\"selected\">Year</option>";
				for(c=(date_validate.getYear()-11);c<=(date_validate.getYear()-2);c++)
				{
					temp_code+="<option value=\""+c+"\">"+c+"</option>";
				}
				temp_code+="</select></td></tr></table>";
				pasanger_code=pasanger_code+temp_code;
			}
		}
	}
	else if(child_no>0 && adult_no<=0)
	{
		pasanger_code=pasanger_code+"<table width=\"100%\" align=\"center\" border=\"0\"><tr><td align=\"center\" colspan=\"2\">Please call <b>0208 099 8067</b> for Child Details Inquiry</td></tr></table>";

	}
	if(infant_no>0 && adult_no>=infant_no && adult_no>0)
	{
		for(i=0;i<infant_no;i++)
		{
			if(i==0)
			{
				pasanger_code=pasanger_code+"<table width=\"100%\" align=\"left\" border=\"0\"><tr><td align=\"left\" width=\"27%\">Infant Name (as Passport) : </td><td align=\"left\"><input type=\"text\" id=\"tsl_hb_surnamei"+i+"\" name=\"tsl_hb_surnamei"+i+"\" value=\"Surname\" size=\"20\" style=\"font-size:10px;color:#CCC;\"	onkeyup=\"document.getElementById('tsl_hb_surnamei"+i+"').style.color ='#000000';\" onfocus=\"document.getElementById('tsl_hb_surnamei"+i+"').style.color ='#000000';if(document.getElementById('tsl_hb_surnamei"+i+"').value=='Surname'){document.getElementById('tsl_hb_surnamei"+i+"').value ='';}\" onblur=\"if(document.getElementById('tsl_hb_surnamei"+i+"').value==''){document.getElementById('tsl_hb_surnamei"+i+"').value ='Surname'; document.getElementById('tsl_hb_surnamei"+i+"').style.color ='#CCC';}\"/>&nbsp;<input type=\"text\" id=\"tsl_hb_firsti"+i+"\" name=\"tsl_hb_firsti"+i+"\" value=\"First Name\" size=\"20\" style=\"font-size:10px;color:#CCC;\"	onkeyup=\"document.getElementById('tsl_hb_firsti"+i+"').style.color ='#000000';\" onfocus=\"document.getElementById('tsl_hb_firsti"+i+"').style.color ='#000000';if(document.getElementById('tsl_hb_firsti"+i+"').value=='First Name'){document.getElementById('tsl_hb_firsti"+i+"').value ='';}\" onblur=\"if(document.getElementById('tsl_hb_firsti"+i+"').value==''){document.getElementById('tsl_hb_firsti"+i+"').value ='First Name'; document.getElementById('tsl_hb_firsti"+i+"').style.color ='#CCC';}\"/></td></tr>";
				temp_code="";
				temp_code="<tr><td align=\"right\">Infant DOB : </td><td align=\"left\"><select name=\"tsl_hb_infant_dob_d"+i+"\" id=\"tsl_hb_infant_dob_d"+i+"\" style=\"font-size:10px;\"><option value=\"-1\" selected=\"selected\">Day</option>";
				for(a=1;a<32;a++)
				{
					temp_code+="<option value=\""+a+"\">"+a+"</option>";
				}
				temp_code+="</select>&nbsp;";
				temp_code+="<select name=\"tsl_hb_infant_dob_m"+i+"\" id=\"tsl_hb_infant_dob_m"+i+"\" style=\"font-size:10px;\"><option value=\"-1\" selected=\"selected\">Month</option>";
				for(b=1;b<13;b++)
				{
					
					temp_code+="<option value=\""+b+"\">"+b+"</option>";
				}
				temp_code+="</select>&nbsp;";
				temp_code+="<select name=\"tsl_hb_infant_dob_y"+i+"\" id=\"tsl_hb_infant_dob_y"+i+"\" style=\"font-size:10px;\"><option value=\"-1\" selected=\"selected\">Year</option>";
				for(c=(date_validate.getYear()-1);c<=date_validate.getYear();c++)
				{
					temp_code+="<option value=\""+c+"\">"+c+"</option>";
				}
				temp_code+="</select></td></tr></table>";
				pasanger_code=pasanger_code+temp_code;
			}
			else
			{
				pasanger_code=pasanger_code+"<table width=\"100%\" align=\"left\" border=\"0\"><tr><td align=\"right\" width=\"27%\"></td><td align=\"left\"><input type=\"text\" id=\"tsl_hb_surnamei"+i+"\" name=\"tsl_hb_surnamei"+i+"\" value=\"Surname\" size=\"20\" style=\"font-size:10px;color:#CCC;\"	onkeyup=\"document.getElementById('tsl_hb_surnamei"+i+"').style.color ='#000000';\" onfocus=\"document.getElementById('tsl_hb_surnamei"+i+"').style.color ='#000000';if(document.getElementById('tsl_hb_surnamei"+i+"').value=='Surname'){document.getElementById('tsl_hb_surnamei"+i+"').value ='';}\" onblur=\"if(document.getElementById('tsl_hb_surnamei"+i+"').value==''){document.getElementById('tsl_hb_surnamei"+i+"').value ='Surname'; document.getElementById('tsl_hb_surnamei"+i+"').style.color ='#CCC';}\"/>&nbsp;<input type=\"text\" id=\"tsl_hb_firsti"+i+"\" name=\"tsl_hb_firsti"+i+"\" value=\"First Name\" size=\"20\" style=\"font-size:10px;color:#CCC;\"	onkeyup=\"document.getElementById('tsl_hb_firsti"+i+"').style.color ='#000000';\" onfocus=\"document.getElementById('tsl_hb_firsti"+i+"').style.color ='#000000';if(document.getElementById('tsl_hb_firsti"+i+"').value=='First Name'){document.getElementById('tsl_hb_firsti"+i+"').value ='';}\" onblur=\"if(document.getElementById('tsl_hb_firsti"+i+"').value==''){document.getElementById('tsl_hb_firsti"+i+"').value ='First Name'; document.getElementById('tsl_hb_firsti"+i+"').style.color ='#CCC';}\"/></td></tr>";
				temp_code="";
				temp_code="<tr><td align=\"right\">DOB : </td><td align=\"left\"><select name=\"tsl_hb_infant_dob_d"+i+"\" id=\"tsl_hb_infant_dob_d"+i+"\" style=\"font-size:10px;\"><option value=\"-1\" selected=\"selected\">Day</option>";
				for(a=1;a<32;a++)
				{
					temp_code+="<option value=\""+a+"\">"+a+"</option>";
				}
				temp_code+="</select>&nbsp;";
				temp_code+="<select name=\"tsl_hb_infant_dob_m"+i+"\" id=\"tsl_hb_infant_dob_m"+i+"\" style=\"font-size:10px;\"><option value=\"-1\" selected=\"selected\">Month</option>";
				for(b=1;b<13;b++)
				{
					
					temp_code+="<option value=\""+b+"\">"+b+"</option>";
				}
				temp_code+="</select>&nbsp;";
				temp_code+="<select name=\"tsl_hb_infant_dob_y"+i+"\" id=\"tsl_hb_infant_dob_y"+i+"\" style=\"font-size:10px;\"><option value=\"-1\" selected=\"selected\">Year</option>";
				for(c=(date_validate.getYear()-1);c<=date_validate.getYear();c++)
				{
					temp_code+="<option value=\""+c+"\">"+c+"</option>";
				}
				temp_code+="</select></td></tr></table>";
				pasanger_code=pasanger_code+temp_code;
			}
		}
	}
	else if(infant_no!=0 && adult_no<infant_no)
	{
		pasanger_code=pasanger_code+"<table width=\"100%\" align=\"center\" border=\"0\"><tr><td align=\"center\" colspan=\"2\">Please call <b>0208 099 8067</b> for Infant Details Inqury</td></tr></table>";

	}
		document.getElementById("tslTAILORpassenger").innerHTML=pasanger_code;
	
}
function tsl_TAILOR_child_room_seperation()
{
	var child_no=document.getElementById("tslTailor_Child").options[document.getElementById("tslTailor_Child").selectedIndex].value;
	if(child_no>0)
	{
		document.getElementById("tslTailor_childSeperation").disabled=false;
	}
	else
	{
		document.getElementById("tslTailor_childSeperation").disabled="disabled";
	}
}
function tsl_TAILOR_ADD_DEL_Excursion(Excrusion_ID,Excrusion_Check_ID,divDisplay)
{
	var RequestULR="/sri-lanka-holidays/getExcursionADD_DEL_details.aspx?";
	if(document.getElementById(Excrusion_Check_ID).checked==true)
	{
	    RequestULR+="ExcursionID="+Excrusion_ID;
	}
	else
	{
	    RequestULR+="Excursion_RemoveID="+Excrusion_ID;
	}
	var randomnumber = Math.floor(Math.random()*1000001);
	RequestULR+="&DummyMath="+randomnumber;
	document.getElementById(divDisplay).innerHTML="Loding...";
	show_page(RequestULR,divDisplay);
}
function tsl_resort_confirm_change()
{
	document.getElementById("tsl_resort_enqsub").style.visibility="hidden";
	document.getElementById("tsl_resort_enqsub").style.height="0px";
	document.getElementById("tsl_resort_enqcon").style.visibility="visible";
	document.getElementById("tsl_resort_enqcon").style.height="100%";
}
function tsl_holiday_confirm_en()
{
	document.getElementById("tsl_tour_ibooking").submit();
}
function tsl_resort_confirm_en()
{
	document.getElementById("tsl_hotel_ibooking").submit();
}
-->
