<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCLHhCca9KsloU7q42sKKRyjo9Dg3dShIU&sensor=true"></script>
<script src="lib/jquery-1.8.2.min.js"></script>

<!DOCTYPE html>
<html>
  <head>
    <style>
		/* Flexible iFrame */
 
.wml-wrapper {
	overflow: hidden;
	font: 11px/13px Arial, sans-serif;
	color: black;
}
.wml-container {
	overflow: hidden;
	background: #dddddd;
	position: relative;
}

.wml-map-layer {
	position: absolute;
	z-index: 2;
}

.wml-tile {
	position: absolute;
	-moz-user-select: none;
}

.wml-container a {
	color: #0078A8;
}

.wml-shift-drag-box {
	position: absolute;
	border: 2px solid red;
	background: white;
	width: 0;
	height: 0;
	opacity: 0.4;
	z-index: 3;
}
.wml-ie .wml-shift-drag-box {
	filter: alpha(opacity=40);
} 

.wml-loading-indicator {
	position: absolute;
	top: 50%;
	left: 50%;
	margin: -16px 0 0 -16px;
	width: 32px;
	height: 32px;
	background: url(images/loading.gif) no-repeat;
	z-index: 1;
}

.wml-marker-print {
	display: none;
}
.wml-marker {
	display: block;
}

.wml-marker,
.wml-labeled-marker, 
.wml-sponsored-marker,
.wml-marker-shadow,
.wml-marker-print {
	position: absolute;
}

.wml-labeled-marker {
	padding-bottom: 6px;
}

.wml-labeled-marker-tip {
	position: absolute;
	bottom: 0;
	left: 0;
}

.wml-labeled-marker-content {
	white-space: nowrap;
	background: white;
	padding: 2px 5px;
	font-weight: bold;
	font-size: 12px;
}

.wml-info-window {
	position: absolute;
}
.wml-info-window .wml-info-window-content {
	background: white;
	border: 1px solid #666666;
	padding: 10px;
}
.wml-info-window .wml-info-window-bottom {
}
.wml-info-window .wml-info-window-tip {
	margin: -1px auto 0;
	height: 10px;
	width: 19px;
	display: block;
	overflow: hidden;
}

.wml-datacard {
	padding-bottom: 6px;
}

.wml-datacard .wml-info-window-tip {
	margin: 0;
	width: 7px;
	height: 10px;
	left: 0;
	bottom: 0;
	position: absolute;
}
.wml-info-window .wml-info-window-close {
	float: right;
	display: inline;
	margin: 6px;
	background: url(images/info-close.png);
	width: 15px;
	height: 15px;
}
.wml-ie .wml-sponsored-card .wml-info-window-close {
	margin-top: 0;
	position: relative;
	top: 6px;
	}

.wml-labeled-marker-content, .wml-datacard .wml-info-window-content {
	border-top: 1px solid #aaa;
	border-left: 1px solid #aaa;
	border-right: 2px solid #999;
	border-bottom: 2px solid #777;
	-moz-border-radius: 3px;
	-webkit-border-radius: 3px;
	border-radius: 3px;
}


.wml-cluster-marker-content {
	position: absolute;
	text-align: center;
	font-weight: bold;
	cursor: pointer;
}


.wml-info-window .wml-info-window-heading {
	margin-bottom: 0.5em;
	line-height: 18px;
	font-weight: bold;
	font-size: 16px;
}

.wml-info-window .wml-info-window-desc, .wml-info-window .wml-info-window-desc p {
	height: 1%;
}

.wml-info-window .wml-info-window-desc:after, .wml-info-window .wml-info-window-desc p:after {
    content: ".";
    display: block;
    height: 0;
    clear: both;
    visibility: hidden;
}

/* controls */

.wml-control {
	position: absolute;
	z-index: 3;
}

.wml-text-background {
	position: absolute;
	width: 100%;
	height: 100%;
	left: 0;
	top: 0;
	background: white;
	opacity: 0.7;
}
.wml-ie .wml-text-background {
	filter: alpha(opacity=70);
}
.wml-ie6 .wml-text-background { /* ie6 ugly hack :( */
	height: expression(this.parentNode.offsetHeight + 'px');
	width: expression(this.parentNode.offsetWidth + 'px');
}

.wml-copyright {
	position: absolute;
	bottom: 0px;
	right: 0px;
}
.wml-copyright-text {
	position: relative;
	padding: 1px 5px 2px;
	text-align: right;
}
.wml-copyright-text, .wml-scale-control {
	-moz-box-shadow: 0 0 7px #ccc;
}

.wml-small-map-control, .wml-large-map-control {
	width: 38px;
	height: 108px;
}

.wml-map-control {
	height: 45px;
	width: 27px;
	background: url(images/zoom-bg.png) no-repeat;
}

.wml-map-control-bottom {
	position: absolute;
	bottom: -5px;
	width: 27px;
	height: 5px;
	background: url(images/zoom-bottom.png) no-repeat;
}

.wml-button-zoom-in, .wml-button-zoom-out {
	display: block;
	width: 17px;
	height: 17px;
	position: absolute;
}

/*.wml-small-map-control a, .wml-large-map-control a {
	display: block;
	width: 18px;
	height: 18px;
	position: absolute;
}*/
.wml-button-north {
	background: url(images/go-north.png);
	top: 0;
	left: 10px;
}
.wml-button-west {
	background: url(images/go-west.png);
	top: 20px;
	left: 0;
}
.wml-button-east {
	background: url(images/go-east.png);
	top: 20px;
	left: 20px;
}
.wml-button-south {
	background: url(images/go-south.png);
	top: 40px;
	left: 10px;
}
.wml-button-zoom-in {
	background: url(images/zoom-in.png);
	top: 5px;
	left: 5px;
}
.wml-button-zoom-out {
	background: url(images/zoom-out.png);
	bottom: 0px;
	left: 5px;
}
.wml-large-map-control .wml-button-zoom-out {
	top: auto;
	bottom: 0px;
}
.wml-zoom-slider {
	position: absolute;
	width: 27px;
	background: url(images/zoom-point.png);
	left: 0px;
	top: 25px;
}
.wml-zoom-handle {
	position: absolute;
	left: 0px;
	width: 27px;
	overflow: hidden;
	height: 9px;
	cursor: n-resize;
	background: url(images/zoom-handle.png) no-repeat;
}

a.wml-zoom-label {
	position: absolute;
	left: 28px;
	height: 16px;
	font: 11px/14px Arial;
	color: white;
	text-decoration: none;
	display: block;
	background: url(images/zoom-label.png) no-repeat;
	padding: 0 5px 0 10px;
	outline: 0;
}                          
a.wml-zoom-label-selected {
	background: url(images/zoom-label-sel.png) no-repeat;
	color: black;
}

.wml-tile-layer-control {
	position: absolute;
	background: white;
	border-left: 1px solid #ccc;
	border-bottom: 1px solid #ccc;
}
.wml-tile-layer-control a.wml-tile-layer-control-link {
	display: block;
	position: relative;
	text-decoration: none;
	padding: 2px 5px;
}
.wml-tile-layer-control a.wml-tile-layer-control-link-active {
	color: white;
	background: #0066CB;
}

.wml-permalink {
	position: absolute;
	padding: 2px 5px;
}
.wml-permalink a {
	position: relative;
}

.wml-scale-control {
}

.wml-scale-control .wml-scale-control-m,
.wml-scale-control .wml-scale-control-f {
	padding-left: 5px;
	position: relative;
	border: 2px solid black;
}
.wml-scale-control .wml-scale-control-m {
	border-top: none;
}
.wml-scale-control .wml-scale-control-f {
	border-bottom: none;
	margin-top: -2px;
}

.wml-overview-map-control {
	border: 2px solid #666;
	border-radius: 4px;
	-webkit-border-radius: 4px;
	-moz-border-radius: 4px;
}
.wml-overview-map-rect {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	border: 1px solid #666;
	border-radius: 3px;
	-webkit-border-radius: 3px;
	-moz-border-radius: 3px;
	background: url(images/minimap-bg.png);
}


/* printing */

@media print {
	.wml-small-map-control, 
	.wml-permalink, 
	.wml-tile-layer-control,
	.wml-info-window {
		display: none;
	}
	
	.wml-ie6 .wml-marker, 
	.wml-ie6 .wml-marker-shadow {
		display: none;
	}
	.wml-ie6 .wml-marker-print {
		display: block;
	}
}


/* directions */

.wml-routes-output .wml-total-length span {
	font-weight:bold !important;
}
.wml-routes-output dl {
	padding: 0; 
	margin: 0;
}
.wml-routes-output dt {
	font-size: 16px; 
	padding: 5px 0; 
	font-weight: bold; 
	vertical-align: middle;
}
.wml-routes-output dt img {
	margin-right: 10px; 
	vertical-align: middle;
}
.wml-routes-output dd {
	margin-left: 0; 
	float:left;
	width:100%;
}
.wml-routes-output dd a {
	padding: 3px 0; 
	display: block; 
	text-decoration: none; 
	border-top: 1px solid #E5E5E5; 
	color: #000 !important;
}
.wml-routes-output dd .selected {
	color: #000 !important; 
	background-color: #EEE;
}
.wml-error-message {
	color: #900; 
	font-weight: bold;
}
.wml-route-length {
	margin-top: 5px; 
	color: #999;
}
.wml-route-length span {
	font-weight: bold; 
	color: #000;
}
/*
.wml-datacard .wml-info-window-heading {
	white-space: nowrap;
}
*/

.wml-datacard .wml-copyright, .wml-sponsored-card .wml-copyright {
	display: none;
}
.wml-datacard .wml-datacard-tags th, .wml-sponsored-card .wml-datacard-tags th {
	padding-right: 10px;
	font-weight: normal;
	text-align: right;
	color: #999;
	vertical-align: top;
}
.wml-sponsored-card .wml-datacard-tags th {
	font-weight: bold;
	color: #555;
}
.wml-datacard .wml-extended-datacard-heading {
	background: #ddd;
	padding: 5px 10px;
	font-size: 12px;
	margin-left: -10px;
	margin-top: -10px;
	margin-right: -10px;
}
.wml-datacard .wml-extended-datacard-table {
	margin-bottom: 12px;
	margin-right: -8px;
	margin-top: -4px;
}


.wml-sponsored-card .wml-sponsored-card-content {
	border: none;
	padding: 15px;
	background: url(images/spoi/small-top.png) no-repeat;
	width: 151px;
}
.wml-sponsored-card .wml-sponsored-card-bottom {
	background: url(images/spoi/small-bottom.png) no-repeat;
	width: 181px;
	height: 18px;
}
.wml-sponsored-card .wml-sponsored-card-heading {
	margin-bottom: 0.5em;
	line-height: 14px;
	font-weight: bold;
	font-size: 14px;
}
.wml-sponsored-card .wml-sponsored-card-content-ext {
	border: none;
	padding: 15px 15px 5px;
	background: url(images/spoi/ext-top.png) 2px 0 no-repeat;
	width: 369px;
}
.wml-sponsored-card .wml-sponsored-card-bottom-ext {
	background: url(images/spoi/ext-bottom.png) no-repeat;
	width: 397px;
	height: 22px;
}
.wml-sponsored-card .wml-info-window-close {
	position: relative;
	margin-right: 9px;
	z-index: 5;
}

.wml-sponsored-marker-tip {
	margin: -5px auto 0;
	height: 13px;
	width: 24px;
	display: block;
	overflow: hidden;
}
.wml-sponsored-marker {
}
.wml-sponsored-marker-right {
	position: absolute;
	right: 0;
	top: 0;
	width: 10px;
	height: 32px;
	background: url(images/spoi/pin-right.png) no-repeat;
}

.wml-sponsored-marker-content {
	white-space: nowrap;
	margin-right: 10px;
	height: 32px; 
	line-height: 28px;
	background: url(images/spoi/pin-left.png) no-repeat;
	padding-left: 10px;
	font-weight: bold;
	font-size: 12px;
}
.wml-sponsored-marker-icon {
	margin-right: 7px;
	position: relative;
	top: 3px;
}

.wml-sidebar {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
}

.wml-sidebar-container {
	font-size: 12px;
	font-family: Arial, sans-serif;
}
.wml-wrapper .wml-sidebar-container {
	background: #CACACA;
	position: absolute;
	height: 100%;
	width: 100%;
}
.wml-wrapper .wml-sidebar-content {
	background: white;
	position: absolute;
	top: 25px;
	bottom: 34px;
	left: 5px;
	right: 5px;
	overflow: auto;
	overflow-x: hidden;
	padding-bottom: 15px;
}
.wml-sidebar-heading {
	font-size: 12px;
	line-height: 22px;
	font-family: Tahoma, sans-serif;
	font-weight: bold;
	padding-left: 5px;
}
.wml-sidebar-input {
	float: left;
	width: 144px;
	height: 22px;
	border: 1px solid #979797;
	margin: 5px;
}
.wml-sidebar-go {
	margin-top: 6px;
}
.wml-sidebar-input-form {
	overflow: hidden;
}
.wml-search-panel-item {
	display: block;
	color: #6F6F6F;
	padding: 5px;
	text-decoration: none;
	border-bottom: 1px solid #C0C9D0;
}
.wml-search-panel-item b {
	font-weight: bold;
	color: black;
}
.wml-search-panel-item-num {
	background: #F6001D;
	color: white;
	padding: 0 4px;
	font-size: 10px;
	line-height: 12px;
	font-family: Tahoma, sans-serif;
	margin-right: 5px; 
	float: left;
	display: inline;
	clear: left;
}
.wml-search-panel-item-text {
	display: block;
	margin-left: 25px;
}
.wml-search-panel-item-num, .wml-search-panel-page-num, .wml-search-panel-page-num-selected {
	border-radius: 3px;
	-moz-border-radius: 3px;
	-webkit-border-radius: 3px; 
}
.wml-search-panel-pager {
	margin: 15px 5px 0;
}
.wml-search-panel-page-num, .wml-search-panel-page-num-selected {
	text-decoration: none;
	font-size: 10px;
	color: white;
	background: #C0C9D0;
	padding: 1px 4px;
	margin-right: 2px;
}
.wml-search-panel-page-num-selected {
	background: #5F5F5F;
}
.wml-sidebar-close {
	width: 50px;
	height: 24px;
	display: block;
	position: absolute;
	bottom: 5px;
	right: 5px;
	background: url(images/search/close.png) no-repeat;
}
/* TODO fix for IE!!! */

.wml-style-sidebar-heading {
	padding: 0 5px;
	margin-top: 10px;
	margin-bottom: 5px;
	font-weight: bold;
}
.wml-style-sidebar-item, .wml-style-sidebar-item-selected {
	border-bottom: 0;
}
.wml-style-sidebar-item-selected {
	background: #C0CBD2;
}
.wml-style-sidebar-more {
	color: #0078A8;
	text-decoration: underline;
}

.wml-button-group {
	padding: 8px 0 9px 0px;
}
.wml-button-group .wml-text-background {
	background: #000;
	opacity: 0.2;
}
.wml-ie .wml-text-background {
	filter: alpha(opacity=20);
}
.wml-button-group:hover .wml-text-background {
	opacity: 0.4;
}
.wml-ie .wml-button-group:hover .wml-text-background {
	filter: alpha(opacity=40);
} 


.wml-button-group a {
	background: #f0f0f0;
	position: relative;
	padding: 4px 8px;
	border: 1px solid #ccc;
	border-bottom: 1px solid #777;
	margin: 0 3px;
	text-decoration: none;
	color: black;
	-moz-border-radius: 5px;
}
.wml-button-group a:hover {
	border: 1px solid black;
	background: #f5f5f5;
}

.wml-container a img {
	border: none;
}
.wml-banner-link-ext {
	position: absolute;
}

/* panes */

.wml-tile-pane, .wml-overlay-pane, .wml-marker-shadow-pane, .wml-marker-pane, .wml-info-window-pane {
	position: relative;
}

.wml-tile-pane { z-index: 1; }
.wml-overlay-pane { z-index: 2; }
.wml-marker-shadow-pane { z-index: 3; }
.wml-marker-pane { z-index: 4; }
.wml-info-window-pane { z-index: 5; }
		
		.Flexible-container {
		    position: relative;
		    padding-bottom: 56.25%;
		    padding-top: 30px;
		    height: 0;
		    overflow: hidden;
		}
		
		.Flexible-container iframe,   
		.Flexible-container object,  
		.Flexible-container embed {
		    position: absolute;
		    top: 0;
		    left: 0;
		    width: 100%;
		    height: 100%;
		}
    </style>
	
  </head>
  <body>

<div class="brand" id="id1"> </div><br>
<a id= "PassProfile" class="btn btn-danger btn" "btn btn-default" "span2" href="#passengerprofile/<%= departureTaxiPlatformFsCode %>/<%= arrivalTaxiPlatformFsCode %>/<%= departureTime %>/<%= arrivalTime %>/<%= arrivalTerminal %>/<%= carrierFsCode %>/<%= flightNumber %>/<%= passengerId %>/<%= currentDate %>/<%= lat %>/<%= long %>">CANCEL FARE</a>
	<!-- Responsive iFrame -->
	<div class="Flexible-container">
	    <iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=<%= lat %>,<%= long %>&amp;aq=&amp;sll=<%= lat %>,<%= long %>&amp;sspn=0.02453,0.084543&amp;ie=UTF8&amp;hq=&amp;hnear=<%= lat %>,<%= long %>&amp;t=m&amp;z=10&amp;iwloc=A&amp;output=embed"></iframe>
	</div
	
	</br>
	
	
  </body>
</html>
<script>
/*
 function notify () {
 var self = this, args = Array.prototype.slice.call(arguments);
 if (window.webkitNotifications) {
 return window.webkitNotifications.createNotification.apply(window.webkitNotifications, args);//(arguments[0], arguments[1], arguments[2]);
 }
 else {
 //TODO do an html notification here
 return { show: function() {
 alert.apply(self, args.reverse());
 } };
 }
 }
 
 if (window.webkitNotifications) {
 console.log('Notifications are supported!');
 if (window.webkitNotifications.checkPermission() != 0) window.webkitNotifications.requestPermission();
 } else {
 console.log('Notifications are not supported!');
 }
 
 var createPassCancelNotificationInstance = function (options) {
 return notify(
 '/img/logo.png',
 'PASSENGER CANCELLED',
 'The passenger cancelled the fare and we are taking you back to the queue...'
 );
 };
 
 var createDriverCancelNotificationInstance = function (options) {
 return notify(
 '/img/logo.png',
 'DRIVER CANCELLED',
 'The driver cancelled and your fare is back in the queue...'
 );
 };

 var createDriverAcceptanceNotificationInstance = function (options) {
 return notify(
 '/img/logo.png',
 'DRIVER ACCEPTANCE',
 'A driver Named ' + '<%= departureTaxiPlatformFsCode %>'+ ' just accepted your fare... His phone number is :' + 
 '<%= arrivalTaxiPlatformFsCode %>'
 )
 };
*/
  $(function () {
  var lat = 0;
  var long = 0;

  console.log("UserLocation I am here");
  		$('#action-logout').show();
	
	function getLocation(location){
		console.log("I know where you are", location.coords.latitude, location.coords.longitude);
 
 		lat = location.coords.latitude;
 		long = location.coords.longitude;
 		
//		var passengerPoint = new google.maps.LatLng(location.coords.latitude, location.coords.longitude);
/*		var passenger = new google.maps.Marker({
				position: passengerPoint,
				title: 'passenger',
				icon: {
	        url: "http://www.youthnetworks.eu/App_Themes/YouthNetworksTheme/images/GoogleIcons/person_level1-icon.png",
					size: new google.maps.Size(48,48),
					origin: new google.maps.Point(0,0),
					anchor: new google.maps.Point(0,0)
				},
				zIndex: 3
		});
		passenger.setMap(Flexible-container);*/
			
		}

	navigator.geolocation.getCurrentPosition(getLocation); 

	var flag = 0;
	//var aborted = 0;
	(function getFare() {
		setTimeout(function () {
		 	
			console.log("fare status ", '<%= carrierFsCode %>');	
			if('<%= carrierFsCode %>' == 'created')
			{
			  $("#id1").html("Your request is in WAITING STATUS to be accepted");
		 		console.log("fare is in created status ");	
				//$('#PassProfile').show();
				//$('#Picked').hide();
			}
			else if('<%= carrierFsCode %>' == 'accepted')
			{
			  $("#id1").html("Your request has been ACCEPTED");
		 		console.log("fare is in accepted status ");	
				//$('#PassProfile').show();
				//$('#Picked').show();

			}
			else if('<%= carrierFsCode %>' == 'cancelled')
			{
			  $("#id1").html("The driver has CANCELLED your fare, your fare is back to Fare Queue in WAITING STATUS");
		 		console.log("fare is in accepted status ");	
				//$('#PassProfile').show();
				//$('#Picked').hide();
			}
		 	console.log("looping I am here: ", flag, lat , long);
		
		if(flag === 1)
		{
			var req = $.ajax({
				type:'POST',
				url: 'http://thetaxiapp.herokuapp.com/ajaxcall',
				data: { /*'departureTaxiPlatformFsCode': '<%= departureTaxiPlatformFsCode %>', 
				'arrivalTaxiPlatformFsCode': '<%= arrivalTaxiPlatformFsCode %>',
				'departureTime':  '<%= departureTime %>',
				'arrivalTime':  '<%= arrivalTime %>',
				'arrivalTerminal': '<%= arrivalTerminal %>',
				'carrierFsCode':  '<%= carrierFsCode %>',
				'flightNumber': <%= flightNumber %>,*/
				'currentDate':  '<%= currentDate %>',
				//'lat':location.coords.latitude, 'long': location.coords.longitude, 
				'lat':lat, 'long': long,
				'passengerId': '<%= passengerId %>' },
				success: function (data) 
				{
					console.log('success');
					if(flag === 0)
					{
						flag = 1;
						 if('<%= carrierFsCode %>' == 'passengercancelled') //|| aborted == 1 )
						 {
								console.log('UserLocationView calling abort #newuserlocation');
								window.location.href="#passengerprofile/" + '<%= departureTaxiPlatformFsCode %>' + '/' + 
								'<%= arrivalTaxiPlatformFsCode %>' + '/' + '<%= departureTime %>' + '/' + '<%= arrivalTime %>' + 
								'/' + '<%= arrivalTerminal %>' + '/' + '<%= carrierFsCode %>' + '/' + '<%= flightNumber %>' + '/' + 
								'<%= passengerId %>' + '/' + '<%= currentDate %>' + '/' + '<%= lat %>' + '/' + '<%= long %>';
						 }
						console.log('first if UserLocationView #newuseragainlocation');
							window.location.href="#newuseragainlocation/" + '<%= departureTaxiPlatformFsCode %>' + '/' + '<%= arrivalTaxiPlatformFsCode %>' + '/<%= departureTime %>' + '/' + '<%= arrivalTime %>' + '/' + '<%= arrivalTerminal %>' + '/' + '<%= carrierFsCode %>' + '/' + '<%= flightNumber %>' + '/' + '<%= passengerId %>' + '/' + '<%= currentDate %>' + '/' + '<%= lat %>' + '/' + '<%= long %>'
					}
					else
					{
						flag = 0;
						 if('<%= carrierFsCode %>' == 'passengercancelled')// || aborted == 1)
						 {
								console.log('UserLocationView calling abort #newuserlocation');
								window.location.href="#passengerprofile/" + '<%= departureTaxiPlatformFsCode %>' + '/' + 
								'<%= arrivalTaxiPlatformFsCode %>' + '/' + '<%= departureTime %>' + '/' + '<%= arrivalTime %>' + 
								'/' + '<%= arrivalTerminal %>' + '/' + '<%= carrierFsCode %>' + '/' + '<%= flightNumber %>' + '/' + 
								'<%= passengerId %>' + '/' + '<%= currentDate %>' + '/' + '<%= lat %>' + '/' + '<%= long %>';
						 }
						console.log('first else UserLocationView #newuserlocation');
							window.location.href="#newuserlocation/" + '<%= departureTaxiPlatformFsCode %>' + '/' + '<%= arrivalTaxiPlatformFsCode %>' +
							'/<%= departureTime %>' + '/' + '<%= arrivalTime %>' + '/' + '<%= arrivalTerminal %>' + '/' + '<%= carrierFsCode %>' + '/' +
							'<%= flightNumber %>' + '/' + '<%= passengerId %>' + '/' + '<%= currentDate %>' + '/' + '<%= lat %>' + '/' + '<%= long %>'
					}	
	            	//return;
	            
	        	},
				complete: function () {
					//location.href="#newuserlocation/" + '<%= passengerId %>';
					getFare();
				},         
	     		error: function(xhr, textStatus, errorThrown) { 
	           // alert('Error!  Status = ' + xhr.status); 
	         	} 
			});

			 if('<%= carrierFsCode %>' == 'passengercancelled')
			 {
			 		aborted = 1;
					//createPassCancelNotificationInstance({notificationType:'simple'}).show();
					console.log('UserLocationView1 calling abort #newuserlocation');
				 req.abort();
					window.location.href="#passengerprofile/" + '<%= departureTaxiPlatformFsCode %>' + '/' + '<%= arrivalTaxiPlatformFsCode %>' + 
					'/' + '<%= departureTime %>' + '/' + '<%= arrivalTime %>' + '/' + '<%= arrivalTerminal %>' + '/' + '<%= carrierFsCode %>' + 
					'/' + '<%= flightNumber %>' + '/' + '<%= passengerId %>' + '/' + '<%= currentDate %>' + '/' + '<%= lat %>' + '/' + '<%= long %>';
			 }
		}
		else
		{
			flag = 0;
			 if('<%= carrierFsCode %>' == 'passengercancelled')// || aborted == 1)
			 {
					console.log('UserLocationView2 calling abort #newuserlocation');
					window.location.href="#passengerprofile/" + '<%= departureTaxiPlatformFsCode %>' + '/' + '<%= arrivalTaxiPlatformFsCode %>' + 
					'/' + '<%= departureTime %>' + '/' + '<%= arrivalTime %>' + '/' + '<%= arrivalTerminal %>' + '/' + '<%= carrierFsCode %>' + 
					'/' + '<%= flightNumber %>' + '/' + '<%= passengerId %>' + '/' + '<%= currentDate %>' + '/' + '<%= lat %>' + '/' + '<%= long %>';
			 }
			console.log('else UserLocationView #newuserlocation');
							window.location.href="#newuseragainlocation/" + '<%= departureTaxiPlatformFsCode %>' + '/' + '<%= arrivalTaxiPlatformFsCode %>' + '/<%= departureTime %>' + '/' + '<%= arrivalTime %>' + '/' + '<%= arrivalTerminal %>' + '/' + '<%= carrierFsCode %>' + '/' + '<%= flightNumber %>' + '/' + '<%= passengerId %>' + '/' + '<%= currentDate %>' + '/' + '<%= lat %>' + '/' + '<%= long %>'
		}						
		//	getFare();


			
					
		},3500
	})();

		
	//getFare();

  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
	  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
		  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
			  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

				  ga('create', 'UA-48099344-1', 'airlinestracker.com');
					  ga('send', 'pageview');

  })
						</script>

