function set_route_result(result) { var html = result; var js = result; var token =''; var lat =''; var lon =''; var instruction = ''; var txt = ''; var zindex=''; var sfLocations = result; html = html.substring(0,html.lastIndexOf('JAVASCRIPT')); js = js.substring(js.lastIndexOf('JAVASCRIPT')+10,js.lastIndexOf('LOCATIONS')); sfLocations = sfLocations.substring(sfLocations.lastIndexOf('LOCATIONS')+9,sfLocations.length); var sfALocations = sfLocations.split(','); callRoute(sfALocations[0]+','+sfALocations[1]+','+sfALocations[2]+','+sfALocations[3]); document.getElementById('itemList').innerHTML = html; while(js.length>1) { token = js.substring(js.indexOf('[')+1,js.indexOf(']')); js = js.substring(js.indexOf(']')+1, js.length); lat = token.substring(0,token.indexOf(',')); token = token.substring(token.indexOf(',')+1, token.length); lon = token.substring(0,token.indexOf(',')); token = token.substring(token.indexOf(',')+1, token.length); instruction = token.substring(0,token.indexOf(',')); token = token.substring(token.indexOf(',')+1, token.length); txt = token.substring(0,token.indexOf(',')); zindex = token.substring(token.indexOf(',')+1, token.length); createStepMarker(new MMLatLon(lat,lon),instruction,txt,zindex); } //alert("Zaraz ResultsLoaded"); resultsLoaded(); //alert("Loading zaraz ma sie wylaczyc"); loadingStatus( false ); } function showRoute(pc1, pc2) { loadingStatus( true ); x_showRoute(pc1, pc2, set_route_result); } function showhide(id){ if (document.getElementById){ obj = document.getElementById(id); if (obj.style.display == "none"){ obj.style.display = "block"; } else { obj.style.display = "none"; } } }