// (C) 2010 CodeGen International

var suggestedRoute=0;var suggestedRouteMarkers=[];var showPathAttrWithSugstddRoutes=false;var startAndEndMarkersHidden=[];var cityIdsOfClickedCities=[];var isSuggesedRoute=false;var cityIdsReceived;var cityNamesReceived;var cityTidsReceived;var startPoint;var endPoint;var tmp_cityIdList;var tmp_cityNamesList;var tmp_showPathAttr;var tmp_cityTidList;var isCruiseRoute=false;var cruiseTid;function showHideRouteList(themeId){if(document.getElementById(themeId)){var theme_tr_obj=document.getElementById(themeId);var themeNumber=themeId.split("-");var themeImgName="theme_img-"+themeNumber[1];var routeId="route_id-"+themeNumber[1];if(document.getElementById(routeId)){var route_tr_obj=document.getElementById(routeId);var theme_img_td_obj=document.getElementById(themeImgName);if(route_tr_obj.style.display=='none'){route_tr_obj.style.display='table-row';if(theme_img_td_obj){document.getElementById(themeImgName).innerHTML="<img src='"+cg_pathfinder_path+"/images/minus.png' width='10px' height='10px' />";}}else{route_tr_obj.style.display='none';if(theme_img_td_obj){document.getElementById(themeImgName).innerHTML="<img src='"+cg_pathfinder_path+"/images/plus.png' width='10px' height='10px' />";}}}}}
function generateSuggestedRouteMarkers(cityId,cityName,cityTid){var name=cityName;var dwnld_url=base_path+"get_city_geocode/"+cityId;GDownloadUrl(dwnld_url,function(data){if(!empty(data)){xml_doc=GXml.parse(data);var city_info_node=xml_doc.documentElement.getElementsByTagName("city_info");if(!empty(city_info_node)){var point=new GLatLng(parseFloat(city_info_node[0].getAttribute("city_pt_lat")),parseFloat(city_info_node[0].getAttribute("city_pt_lon")));var ico=viacityicon;ico.infoWindowAnchor=new GPoint(5,2);var marker;if(cityTid!="NULL"&&(document.getElementById(cityTid))){marker=new GMarker(point,{icon:ico,title:name});map.addOverlay(marker);GEvent.addListener(marker,'click',function(){if(document.getElementById(cityTid)){document.getElementById(cityTid).checked=true;var tidInt=parseInt(cityTid,10);var cityIdInt=parseInt(cityId,10);getCity(tidInt,false);var cityElemArr=cityMarkerList[tidInt];if(!empty(cityElemArr)){marker.hide();}}});var label=null;GEvent.addListener(marker,"mouseover",function(){label=new ELabel(new GLatLng(parseFloat(city_info_node[0].getAttribute("city_pt_lat")),parseFloat(city_info_node[0].getAttribute("city_pt_lon"))),cityName+": Click to see attractions","elableStyle");label.pixelOffset=new GSize(5,5);map.addOverlay(label);});GEvent.addListener(marker,"mouseout",function(){if(label!==null){map.removeOverlay(label);label=null;}});}else{marker=new GMarker(point,{icon:ico,title:cityName});map.addOverlay(marker);}
suggestedRouteMarkers[cityId]=marker;cityIdsOfClickedCities[cityId]=cityTid;}else{alert('Location data currently unavailable.');}}else{alert('Could not identify city location. Please select a different city!');}});}
function drawSuggestedDirections(down_url){directionLoggerId=-1;show_hide_path_load_img(true);GDownloadUrl(down_url,function(data){if(!empty(data)){var xml_doc=GXml.parse(data);show_directions(xml_doc);show_hide_path_load_img(false);}else{alert('Could not identify direction between two destinations. Please try again!');show_hide_path_load_img(false);}});}
function drawSuggestedAttractions(down_url){attrLoggerId=-1;remove_attractions();show_hide_path_load_img(true);GDownloadUrl(down_url,function(data){if(!empty(data)){var xml_doc=GXml.parse(data);drawAttractionContent(xml_doc);show_hide_path_load_img(false);}else{alert('Could not identify attraction between two destinations. Please try again!');show_hide_path_load_img(false);}});}
function clearSuggestedRouteMarkers(){for(var x=0;x<suggestedRouteMarkers.length;x++){if(!empty(suggestedRouteMarkers[x])){suggestedRouteMarkers[x].hide();}}
suggestedRouteMarkers=null;suggestedRouteMarkers=[];startAndEndMarkersHidden=null;startAndEndMarkersHidden=[];cityIdsOfClickedCities=null;cityIdsOfClickedCities=[];}
function showSuggestedRouteOnMap_Zoom(cityIdList,cityNamesList,showPathAttr,cityTidList,isAfterGoogle){var dwnld_ur;if(isAfterGoogle){var cityIdsReceived=cityIdList.split(",");var cityNamesReceived=cityNamesList.split(",");var cityTidsReceived=cityTidList.split(",");var viaCityList="";showPathAttrWithSugstddRoutes=false;var zoom_level=map.getZoom();remove_path();remove_attractions();for(var i=1;i<cityIdsReceived.length-1;i++){viaCityList=viaCityList+","+cityIdsReceived[i];}
viaCityList=viaCityList.substring(1);if(empty(viaCityList)){viaCityList=0;}
var showAttractions=0;if(showPathAttr=='t'){showAttractions=1;showPathAttrWithSugstddRoutes=true;suggestedRouteAttrSet=true;}
dwnld_url=base_path+"show_suggested_route/"+cityIdsReceived[0]+"/"+cityIdsReceived[cityIdsReceived.length-1]+"/"+zoom_level+"/"+showAttractions+"/"+viaCityList;viaCityRequestNotArrived=true;timerObj=window.setTimeout('checkViaCityTimeTaken()',minimumPathTimeout);hideViaCitiesMarkers();}
show_hide_path_load_img(true);GDownloadUrl(dwnld_url+showPathOnly,function(data){if(viaCityRequestNotArrived){if(!empty(data)){viaCityRequestNotArrived=false;var JSONObj=JSON.decode(data);if(!empty(JSONObj)){var location_main=JSONObj.shortest_path.location;for(var i=1;i<cityIdsReceived.length-1;i++){generateSuggestedRouteMarkers(cityIdsReceived[i],cityNamesReceived[i],cityTidsReceived[i]);}
if(!empty(location_main)){path_start_point=new GLatLng(parseFloat(location_main.start_pt.lat),parseFloat(location_main.start_pt.lon));if(!empty(path_start_marker)){map.removeOverlay(path_start_marker);}
if(document.getElementById(cityTidsReceived[0])){var startName=cityNamesReceived[0]+": Click to see attractions";path_start_marker=new GMarker(path_start_point,{icon:start_marker_ico,title:startName});}else{path_start_marker=new GMarker(path_start_point,{icon:start_marker_ico,title:cityNamesReceived[0]});}
GEvent.addListener(path_start_marker,'click',function(){if(document.getElementById(cityTidsReceived[0])){if(!(document.getElementById(cityTidsReceived[0]).checked)){document.getElementById(cityTidsReceived[0]).checked=true;startAndEndMarkersHidden[0]=(cityTidsReceived[0]);getCity(cityTidsReceived[0],true);var cityElementArr=cityMarkerList[cityTidsReceived[0]];if(!empty(cityElementArr)){for(var elem in cityElementArr){if(cityElementArr[elem]){if(empty(cityElementArr[elem].centerMarker)){break;}
cityElementArr[elem].centerMarker.hide();}}}}}});map.addOverlay(path_start_marker);start_pt_zoom=map.getZoom();}
if(!empty(location_main)){path_end_point=new GLatLng(parseFloat(location_main.end_pt.lat),parseFloat(location_main.end_pt.lon));if(!empty(path_end_marker)){map.removeOverlay(path_end_marker);}
if(document.getElementById(cityTidsReceived[cityTidsReceived.length-1])){var endName=cityNamesReceived[cityNamesReceived.length-1]+": Click to see attractions";path_end_marker=new GMarker(path_end_point,{icon:end_marker_ico,title:endName});}else{path_end_marker=new GMarker(path_end_point,{icon:end_marker_ico,title:cityNamesReceived[cityNamesReceived.length-1]});}
GEvent.addListener(path_end_marker,'click',function(){if(document.getElementById(cityTidsReceived[cityTidsReceived.length-1])){if(!(document.getElementById(cityTidsReceived[cityTidsReceived.length-1]).checked)){document.getElementById(cityTidsReceived[cityTidsReceived.length-1]).checked=true;startAndEndMarkersHidden[1]=cityTidsReceived[cityTidsReceived.length-1];getCity(cityTidsReceived[cityTidsReceived.length-1],true);var cityElementArr=cityMarkerList[cityTidsReceived[cityTidsReceived.length-1]];if(!empty(cityElementArr)){for(var elem in cityElementArr){if(cityElementArr[elem]){if(empty(cityElementArr[elem].centerMarker)){break;}
cityElementArr[elem].centerMarker.hide();}}}}}});map.addOverlay(path_end_marker);end_pt_zoom=map.getZoom();}}
show_path_JSON(data,isAfterGoogle);clearViaCityTimer();show_hide_path_load_img(false);viaCityRequestNotArrived=true;tmp_cityIdList='';tmp_cityNamesList='';tmp_showPathAttr='';tmp_cityTidList='';googlePath=true;}else{alert('Could not identify a path between two destinations. Please try again!');show_hide_path_load_img(false);}}
clearViaCityTimer();viaCityRequestNotArrived=true;});drawSuggestedDirections(dwnld_url+showDirectionOnly);if(showPathAttrWithSugstddRoutes){drawSuggestedAttractions(dwnld_url+showAttractionOnly);}}
function showSuggestedRouteOnMap(cityIdList,cityNamesList,showPathAttr,cityTidList){cityIdsReceived=cityIdList.split(",");cityNamesReceived=cityNamesList.split(",");cityTidsReceived=cityTidList.split(",");tmp_cityIdList=cityIdList;tmp_cityNamesList=cityNamesList;tmp_showPathAttr=showPathAttr;tmp_cityTidList=cityTidList;var viaCityList="";showPathAttrWithSugstddRoutes=false;var zoom_level=map.getZoom();remove_path();remove_attractions();for(var i=1;i<cityIdsReceived.length-1;i++){viaCityList=viaCityList+","+cityIdsReceived[i];}
viaCityList=viaCityList.substring(1);if(empty(viaCityList)){viaCityList=0;}
var showAttractions=0;if(showPathAttr=='t'){showAttractions=1;showPathAttrWithSugstddRoutes=true;suggestedRouteAttrSet=true;}
viaCityRequestNotArrived=true;timerObj=window.setTimeout('checkViaCityTimeTaken()',minimumPathTimeout);hideViaCitiesMarkers();show_hide_path_load_img(true);isPathDrawn=false;if(googlePath){dwnld_url=base_path+"get_city_geocode/"+cityIdList;GDownloadUrl(dwnld_url,function(data){if(!empty(data)){xml_doc=GXml.parse(data);var city_id_node=xml_doc.documentElement.getElementsByTagName("ID"+cityIdsReceived[0]);startPoint=city_id_node;endPoint=xml_doc.documentElement.getElementsByTagName("ID"+cityIdsReceived[cityIdsReceived.length-1]);var strDirections;if(!empty(city_id_node))
{strDirections="from: "+new GLatLng(parseFloat(city_id_node[0].getAttribute("city_pt_lat")),parseFloat(city_id_node[0].getAttribute("city_pt_lon")));}else{alert('Location data currently unavailable.');}
strDirectionHeader="Directions From "+cityNamesReceived[0];strTmpDirectionHeader='';for(var i=1;i<cityIdsReceived.length;i++)
{city_id_node=xml_doc.documentElement.getElementsByTagName("ID"+cityIdsReceived[i]);if(!empty(city_id_node))
{strDirections+=" to: "+new GLatLng(parseFloat(city_id_node[0].getAttribute("city_pt_lat")),parseFloat(city_id_node[0].getAttribute("city_pt_lon")));if(i==1){if(cityIdsReceived.length!=2){strTmpDirectionHeader+=' Via '+cityNamesReceived[i];}else{strTmpDirectionHeader+=' to '+cityNamesReceived[i];}}else
if(i==cityIdsReceived.length-1){strDirectionHeader+=" to "+cityNamesReceived[i];}else{strTmpDirectionHeader+=" - "+cityNamesReceived[i];}}
else
{alert('Location data currently unavailable.');}}
strDirectionHeader+=strTmpDirectionHeader;isDirectionHeaderComplete=true;if(!empty(strDirections))
{set_loading_text(TYPEGOOGLE);create_google_directions_object();isSuggesedRoute=true;googleDirections.load(strDirections,{getPolyline:true,preserveViewport:true,getSteps:true});}else{alert('Could not generate the path.');}}else{alert('Could not retrieve intermediate city list.');}});}
else{set_loading_text(TYPEONLYGOOGLE);showSuggestedRouteOnMap_Zoom(cityIdList,cityNamesList,showPathAttr,cityTidList,false);}}
function setSuggestedRoutsInput(){if(document.getElementById('sug_routes_select')){var suggestedRouteObj=document.getElementById('sug_routes_select');var selectedRouteValue=suggestedRouteObj[suggestedRouteObj.selectedIndex].value;if(selectedRouteValue!=-1){suggestedRoute=selectedRouteValue;var subValues=selectedRouteValue.split(",");var zoom_level=map.getZoom();var city_ids_received=new Array(2);city_ids_received[0]=1957;city_ids_received[1]=1366;var cityNamesReceived=new Array(2);cityNamesReceived[0]="Gampaha";cityNamesReceived[1]="Kegalla";for(var i=0;i<city_ids_received.length;i++){generateSuggestedRouteMarkers(city_ids_received[i],cityNamesReceived[i]);}
var dwnld_url=base_path+"get_directions/"+subValues[1]+"/"+subValues[2]+"/"+zoom_level+"/"+1+"/"+1+","+1957+","+1366+"/"+0;viaCityRequestNotArrived=true;timerObj=window.setTimeout('checkViaCityTimeTaken()',minimumPathTimeout);GDownloadUrl(dwnld_url,function(data){if(viaCityRequestNotArrived){if(!empty(data)){viaCityRequestNotArrived=false;xml_doc=GXml.parse(data);var loct_node=xml_doc.documentElement.getElementsByTagName("locations");if(!empty(loct_node)){var start_pt_node=loct_node[0].getElementsByTagName("start_point");if(!empty(start_pt_node)){path_start_point=new GLatLng(parseFloat(start_pt_node[0].getAttribute("lat")),parseFloat(start_pt_node[0].getAttribute("lon")));if(!empty(path_start_marker)){map.removeOverlay(path_start_marker);}
path_start_marker=new GMarker(path_start_point,{icon:start_marker_ico,title:"Colombo"});map.addOverlay(path_start_marker);start_pt_zoom=map.getZoom();}
var end_pt_node=loct_node[0].getElementsByTagName("end_point");if(!empty(end_pt_node)){path_end_point=new GLatLng(parseFloat(end_pt_node[0].getAttribute("lat")),parseFloat(end_pt_node[0].getAttribute("lon")));if(!empty(path_end_marker)){map.removeOverlay(path_end_marker);}
path_end_marker=new GMarker(path_end_point,{icon:end_marker_ico,title:"Kandy"});map.addOverlay(path_end_marker);end_pt_zoom=map.getZoom();}}
show_path(xml_doc);clearViaCityTimer();show_hide_path_load_img(false);viaCityRequestNotArrived=true;}else{alert('Could not identify a path between two destinations. Please try again!');show_hide_path_load_img(false);}}
clearViaCityTimer();viaCityRequestNotArrived=true;});}}}
function showSuggestedCruiseRouteOnMap(routeId,routeTidNidList){var routeNidList;if(!empty(routeTidNidList)){routeTidNidList=routeTidNidList.split("-");cruiseTid=routeTidNidList[0];routeNidList=routeTidNidList[1];}
remove_path();remove_attractions();if(!empty(path_start_marker)){map.removeOverlay(path_start_marker);path_start_marker=null;path_start_point=null;}
if(!empty(path_end_marker)){map.removeOverlay(path_end_marker);path_end_marker=null;path_end_point=null;}
show_hide_path_load_img(true);if(empty(routeNidList)){routeNidList='null';}
var dwnld_url=base_path+"show_suggested_cruise_route/"+routeId+"/"+routeNidList+"/things_to_do";GDownloadUrl
(dwnld_url,function(data){if(!empty(data)){var JSONObj=JSON.decode(data);if(!empty(JSONObj)){isCruiseRoute=true;show_path_JSON(data,false);show_hide_path_load_img(false);}
else{alert('Could not generate the cruise path. Please try again!');show_hide_path_load_img(false);}}
else{alert('Could not generate the cruise path. Please try again!');show_hide_path_load_img(false);}});}
function showSuggestedRouteMarkers(route_line){viaCityRequestNotArrived=false;if(!empty(cityIdsReceived)&&!empty(cityNamesReceived)&&!empty(cityTidsReceived))
{for(var i=1;i<cityIdsReceived.length-1;i++){generateSuggestedRouteMarkers(cityIdsReceived[i],cityNamesReceived[i],cityTidsReceived[i]);}
if(!empty(startPoint))
{path_start_point=new GLatLng(parseFloat(startPoint[0].getAttribute("city_pt_lat")),parseFloat(startPoint[0].getAttribute("city_pt_lon")));if(!empty(path_start_marker)){map.removeOverlay(path_start_marker);}
if(document.getElementById(cityTidsReceived[0])){var startName=cityNamesReceived[0]+": Click to see attractions";path_start_marker=new GMarker(path_start_point,{icon:start_marker_ico,title:startName});}else{path_start_marker=new GMarker(path_start_point,{icon:start_marker_ico,title:cityNamesReceived[0]});}
GEvent.addListener(path_start_marker,'click',function(){if(document.getElementById(cityTidsReceived[0])){if(!(document.getElementById(cityTidsReceived[0]).checked)){document.getElementById(cityTidsReceived[0]).checked=true;startAndEndMarkersHidden[0]=(cityTidsReceived[0]);getCity(cityTidsReceived[0],true);var cityElementArr=cityMarkerList[cityTidsReceived[0]];if(!empty(cityElementArr)){for(var elem in cityElementArr){if(cityElementArr[elem]){if(empty(cityElementArr[elem].centerMarker)){break;}
cityElementArr[elem].centerMarker.hide();}}}}}});map.addOverlay(path_start_marker);start_pt_zoom=map.getZoom();}
if(!empty(endPoint)){path_end_point=new GLatLng(parseFloat(endPoint[0].getAttribute("city_pt_lat")),parseFloat(endPoint[0].getAttribute("city_pt_lon")));if(!empty(path_end_marker)){map.removeOverlay(path_end_marker);}
if(document.getElementById(cityTidsReceived[cityTidsReceived.length-1])){var endName=cityNamesReceived[cityNamesReceived.length-1]+": Click to see attractions";path_end_marker=new GMarker(path_end_point,{icon:end_marker_ico,title:endName});}else{path_end_marker=new GMarker(path_end_point,{icon:end_marker_ico,title:cityNamesReceived[cityNamesReceived.length-1]});}
GEvent.addListener(path_end_marker,'click',function(){if(document.getElementById(cityTidsReceived[cityTidsReceived.length-1])){if(!(document.getElementById(cityTidsReceived[cityTidsReceived.length-1]).checked)){document.getElementById(cityTidsReceived[cityTidsReceived.length-1]).checked=true;startAndEndMarkersHidden[1]=cityTidsReceived[cityTidsReceived.length-1];getCity(cityTidsReceived[cityTidsReceived.length-1],true);var cityElementArr=cityMarkerList[cityTidsReceived[cityTidsReceived.length-1]];if(!empty(cityElementArr)){for(var elem in cityElementArr){if(cityElementArr[elem]){if(empty(cityElementArr[elem].centerMarker)){break;}
cityElementArr[elem].centerMarker.hide();}}}}}});map.addOverlay(path_end_marker);end_pt_zoom=map.getZoom();}
clearViaCityTimer();viaCityRequestNotArrived=true;}
if(!document.getElementById('chk_dir_path_attr').checked){get_attractions_google(route_line);}}
function show_cruise_content(attr_list){isCruiseRoute=false;main_list="<table class='tableDashboard'>";tts_list="<table class='corner_round'>";ttd_list="<table class='corner_round'>";wts_list="<table class='corner_round'>";wts_count=1;tts_count=1;ttd_count=1;if(!empty(attr_list)){try{var tid=cruiseTid;var node_nid;var node_tid=tid;var node_name;var node_image;var node_type;var htl_url;var htl_str_rate;var htl_frm_price;var htl_facilities;var distance_colombo;var body_images;var phone;var email;var prod_sys_code;var prod_city_code;var nearest_city;var nearest_city_link;var star_content;var star_content2;var attr_type_main;var attr_type_arr;var attr_type;var filter_node;for(var i=0;i<attr_list.length;i++){node_nid="";node_tid=0;node_name="";node_image="";node_type="";htl_url="";htl_str_rate="";htl_frm_price="";htl_facilities="";distance_colombo="";body_images="";phone="";email="";prod_sys_code="";prod_city_code="";nearest_city="";nearest_city_link="";star_content="";star_content2="";attr_type="";filter_node="";node_nid=attr_list[i].nid;node_name=attr_list[i].name;node_image=attr_list[i].image;node_type=attr_list[i].type;node_content=attr_list[i].tcontent;nearest_city_tid=attr_list[i].nearest_city;node_pt_lat=parseFloat(attr_list[i].lat);node_pt_lon=parseFloat(attr_list[i].lng);filter_node=attr_list[i].filter_node;if(!empty(filter_node)&&filter_node=="yes"){continue;}
if(!empty(node_name)){if(check_path_attr_exists(node_nid)){continue;}
if(nearest_city_tid!==0&&!empty(nearest_city_tid)){nearest_city_link="<a href='javascript:drawAttractions("+nearest_city_tid+")' >Show the nearest city</a>";nearest_city="<tr>"+"<td align='right' valign='top' class='details'></td>"+"<td valign='top'><div align='right' style='padding-bottom:10px; padding-right:5px;font-weight:bold;'>"+
nearest_city_link+"</div></td>"+"</tr>";}
attr_type_main=attr_list[i].attr_terms;if(!empty(attr_type_main)){for(var a=0;a<attr_type_main.length;a++){attr_type_arr=attr_type_main[a].getElementsByTagName("term");}
if(!empty(attr_type_arr)){for(var l=0;l<attr_type_arr.length;l++){if(attr_type.length>0){attr_type+=' ,';attr_type+=attr_type_arr[l].getAttribute("term_name");}else{attr_type=attr_type_arr[l].getAttribute("term_name");}}}}
body_images=attr_list[i].body_images;var body_images_div="";if(!empty(body_images)){var body_imagesArr=body_images.split(",");for(var j=0;j<body_imagesArr.length;j++){if(j<4){if(!empty(body_imagesArr[j])){var item_str="[";for(var k=0;k<body_imagesArr.length;k++){var image_info_arr=body_imagesArr[k].split("|");if(k<4){if(k>0){item_str+=",";}
item_str+="[\""+image_info_arr[0]+"\",\""+image_info_arr[1]+" "+"\",\"350 350\"]";}}
item_str+="],"+j;var final_image_info=body_imagesArr[j].split("|");body_images_div+="<div class='galThumb' align='center' ><a href='javascript:;' onclick='Mediabox.open("+item_str+")' ><img src='"+final_image_info[0]+"' width='100' height='59' title='"+final_image_info[1]+"'/></a></div>";}}
else{break;}}}
else{body_images_div="No Images available...";}
switch(node_type){case"things_to_do":node_tid=3;row_id='pthattr_ttd_'+ttd_count;marker_icon=do_icon;marker_icon.infoWindowAnchor=new GPoint(9,1);marker=create_path_attr_mkr(node_type,node_tid,node_name,node_image,node_content,node_nid,marker_icon,node_pt_lat,node_pt_lon,htl_facilities,htl_frm_price,distance_colombo,star_content,nearest_city,row_id,body_images_div,"","","","");ttd_list+='<tr id="'+row_id+'" title="'+attr_type+'" class="trblock"  onMouseOver="path_attr_list['+node_nid+'].setImage(\''+markerHighlightIconArray[node_tid]+'\');this.className=\'trhighlight\';" '+'onMouseOut="path_attr_list['+node_nid+'].setImage(\''+markerIconArray[node_tid]+'\');if(this.className != \'trblockhide\' ){ this.className = \'trblock\';}"'+'onClick="javascript:GEvent.trigger(path_attr_list['+node_nid+'], \'click\')" ><td>'+
ttd_count+'.&nbsp;</td><td class="tdDashboard">'+node_name+'</td></tr>';ttd_count++;break;case"default":break;}
path_attr_list[node_nid]=marker;minimapMarkerAdding(marker);itineraryMarkerUpdate(node_nid,0,marker);map.addOverlay(marker);}}
var city_list_main=xml_doc.documentElement.getElementsByTagName("city_contents");if(!empty(city_list_main)){for(var h=0;h<city_list_main.length;h++){var city_content_main=city_list_main[h].getElementsByTagName("city_content");city_content_view(city_content_main);}}}
catch(e)
{}}
wts_list+="</table>";tts_list+="</table>";ttd_list+="</table>";main_list+='<tr onClick="javascript:toggle_path_attr_logger_header(\'wts\')"  ><td class="tdPathAttrWTSHeading" width="200px">Places To Stay</td></tr>';main_list+='<tr id="ptattr_wts_lst" style="display:none;"><td>'+wts_list+'</td></tr>';main_list+='<tr onClick="javascript:toggle_path_attr_logger_header(\'tts\')"  ><td class="tdPathAttrTTSHeading" width="200px">Things To See</td></tr>';main_list+='<tr id="ptattr_tts_lst" style="display:none;"><td>'+tts_list+'</td></tr>';main_list+='<tr onClick="javascript:toggle_path_attr_logger_header(\'ttd\')"  ><td class="tdPathAttrTTDHeading" width="200px">Things To Do</td></tr>';main_list+='<tr id="ptattr_ttd_lst" style="display:none;"><td>'+ttd_list+'</td></tr>';main_list+="</table>";var div_content="<div class='coner_round'>"+main_list+"</div>";removeLogger(-2);var logger_obj=new logger(div_content,-2);if(directionLoggerId==-1){attrLoggerId=logger_array.length;logger_array[attrLoggerId]=logger_obj;logger_pathattr_id=attrLoggerId;title_logger[attrLoggerId]="Path Attractions";}
else{logger_array.splice((directionLoggerId+1),0,logger_obj);title_logger.splice((directionLoggerId+1),0,"Path Attractions");attrLoggerId=directionLoggerId+1;logger_pathattr_id=attrLoggerId;}
current_index=attrLoggerId;title_index=attrLoggerId;document.getElementById('mainTabContainer').innerHTML=logger_array[attrLoggerId].content;document.getElementById('dash_title').innerHTML=title_logger[attrLoggerId];}
