﻿var ToolTipCompanyTriggers = 'Triggers are actions that will occur at a predefined time in relation to a<br/>' + 
                             'trip or trip leg.<br/>' +
                             '<br/>' + 
                             'Company triggers are triggers that are configured at the company level.<br/>' + 
                             'All trips and trip legs belonging to a company are affected by its<br/>' +
                             'triggers. Triggers that are configured at the resource,trip or trip leg level<br/>' + 
                             ' will override the company\'s triggers.<br/>';
                             
var ToolTipItemTriggers =    'Triggers are actions that will occur at a predefined time in relation to a<br/>' + 
                             'trip or trip leg.<br/>' +
                             '<br/>' + 
                             'Resource triggers are triggers that are configured at the resource level.<br/>' + 
                             'All trips and trip legs belonging to a resource are affected by its<br/>' +
                             'triggers. All resource triggers override their matching company triggers.<br/>' +
                             'In the same way, triggers that are configured at the trip or trip leg level<br/>' + 
                             ' will override the resource\'s triggers.<br/>';
                             
var ToolTipTripTriggers =    'Triggers are actions that will occur at a predefined time in relation to a<br/>' + 
                             'trip or trip leg.<br/>' +
                             '<br/>' + 
                             'Trip triggers are triggers that are configured at the trip level.<br/>' + 
                             'A trip and its trip legs belonging are affected by the trip\'s<br/>' +
                             'triggers. All trip triggers override their matching company and resource triggers.<br/>' +
                             'In the same way, triggers that are configured at the trip leg level<br/>' + 
                             'will override the trip\'s triggers.<br/>';
                             
var ToolTipTripLegTriggers = 'Trip Leg triggers are triggers that are set up at the trip leg level.<br/>' + 
                             'The current trip leg is affected by these triggers. Trip leg triggers<br/>' + 
                             'override company and resource and trip triggers.<br/>' + 
                             '<br/>' + 
                             'Triggers are actions that will occur at a predefined time in relation to a<br/>' + 
                             'trip or trip leg.';
                             
var ToolTipCompanyNotifications = 'Notifications are messages that are sent by Voyage Manager to the contacts<br/>' + 
                                  'that have been set up for that notification type. Notification types include<br/>' +
                                  'trip leg start, trip leg arrival, presumed missing, SOS and more.<br/>' + 
                                  '<br/>' + 
                                  'Notifications can be configured at a company, resource, trip or trip leg level.<br/>' +
                                  'Company notifications are inherited by all resources, trips and trip legs and<br/>' +
                                  'can only be configured by an administrator';

var ToolTipResourceNotifications = 'Notifications are messages that are sent by Voyage Manager to the contacts<br/>' + 
                               'that have been set up for that notification type. Notification types include<br/>' +
                               'trip leg start, trip leg arrival, presumed missing, SOS and more.<br/>' + 
                               '<br/>' + 
                               'Notifications can be configured at a company, resource, trip or trip leg level.<br/>' +
                               'Resource notification can be configured for each resouce and they are inherited by all<br/> ' + 
                               'trips and trip legs belonging to the resource.';

var ToolTipTripNotifications = 'Notifications are messages that are sent by Voyage Manager to the contacts<br/>' + 
                               'that have been set up for that notification type. Notification types include<br/>' +
                               'trip leg start, trip leg arrival, presumed missing, SOS and more.<br/>' + 
                               '<br/>' + 
                               'Notifications can be configured at a company, resource, trip or trip leg level.<br/>' +
                               'Trip notifications can configured for each trip, and the are inherited by all<br/> ' + 
                               'trip legs belonging to the trip.';

var ToolTipTripLegNotifications = 'Notifications are messages that are sent by Voyage Manager to the contacts<br/>' + 
                               'that have been set up for that notification type. Notification types include<br/>' +
                               'trip leg start, trip leg arrival, presumed missing, SOS and more.<br/>' + 
                               '<br/>' + 
                               'Notifications can be configured at a company, resource, trip or trip leg level.<br/>' +
                               'Trip leg notification can be configured for each individual trip leg. They will only</br> ' + 
                               'affect the trip leg they were configured for.';


var ToolTipEventItem = 'Events are actions performed on Voyage Manager. Events include things like<br/>' +
                       'arriving or cancelling of trips or trip legs. Some events are generated automatically<br/>' +
                       'by Voyage Manager whilst others are generated by users<br/>' +
                       '<br/>' +
                       'Resource Events are actions are performed on resources. The events currently supported are:<br/>' + 
                       '<br/>' + 
                       '<div class=\'list\'><ul><li class=\'list\'>SOS</li><li class=\'list\'>Checkin</li>' + 
                       '<li class=\'list\'>Reset</li></ul><br /><b>SOS</b> sets the current status of the resource ' + 
                       ' to SOS, and puts the current and <br />future trips on hold.<br /><br />' + 
                       '<b>Reset</b> sets the resource\'s status to OK and and changes all on hold trips to <br />' + 
                       'Not Started or In Progress.<br />' + 
                       '<br />' + 
                       '<b>Checkin</b> does the same as Reset, but also sets the last checkin date for the <br /> ' + 
                       ' trip / trip leg to the current date.</div>';

var ToolTipEventTrip = 'Events are actions performed on Voyage Manager. Events include things like<br/>' +
                       'arriving or cancelling of trips or trip legs. Some events are generated automatically<br/>' +
                       'by Voyage Manager whilst others are generated by users<br/>' +
                       '<br/>' +
                       'Trip Events are actions that can be performed on a trip. Trip events usually affect<br/>' +
                       'the trip legs belonging to the trip. The events currently supported are:<br/>' + 
                       '<br/>' + 
                       '<div class=\'list\'><ul><li class=\'list\'>Cancel</li></ul></div>' + 
                       '<br />' + 
                       '<b>Cancel</b> sets the current trip to cancelled and sets all the trip legs <br/>' + 
                       'belonging to the trip to cancelled';

var ToolTipEventTripLeg = 'Events are actions performed on Voyage Manager. Events include things like<br/>' +
                          'arriving or cancelling of trips or trip legs. Some events are generated automatically<br/>' +
                          'by Voyage Manager whilst others are generated by users<br/>' +
                          '<br/>' +
                          'Trip Leg Events are actions that can be performed on trip legs. Trip leg events<br/>' +
                          'can affect the trips to which they belong. The trip leg events available for a trip<br/>' +
                          'leg depend on the current status of the trip leg. The events currently supported are:<br/>' + 
                          '<br/>' + 
                          '<div class=\'list\'><ul>' + 
                          '<li class=\'list\'>Arrive</li>' +
                          '<li class=\'list\'>Cancel</li>' +
                          '<li class=\'list\'>Missing</li>' +
                          '</ul></div>' + 
                          '<br />' + 
                          '<b>Arrive</b> sets the current trip leg to arrived and if all the trip <br/>' +
                          'legs for the tripare set to arrived the trip is also set to arrived<br/>' + 
                          '<br/>' + 
                          '<b>Cancel</b> sets the current trip leg to cancelled<br/>' + 
                          '<br/>' + 
                          '<b>Missing</b> sets the current trip leg to missing and puts the current and future and<br/>' + 
                          'on hold';

var ToolTipCreateResource = 'Create resource allows you to create a new resource and associate the resource<br/>' +
                       'with the new user. A resource is what Voyage Manager manages, whereas a user<br/>' + 
                       'is someone who uses Voyage Manager. A user is not required to have an associated resource.<br/>';

var ToolTipReference = 'A reference is a unique identity that each resource must have. It can for example be an<br/>' + 
                       'employee id number, national insurance number or social security number. The reference may be<br/>' +
                       'used to identify the resource when messages are sent to Voyage Manager by SMS<br/>' + 
                       '<br/>' + 
                       'A reference may <b>NOT</b> contain spaces.';

var ToolTipPhoneNumber = 'Phone numbers are used by Voyage Manager to:<br/><div class=\'list\'><ul><li class=\'list\'>Identify SMS messages sent by the user</li><li class=\'list\'>Send SMS messages to users</li></ul></div>';

var ToolTipPhoneNumberFormat = 'Phone numbers must be of the format +[COUNTRYCODE] [PHONE NUMBER]';

var ToolTipNotifyAll = 'Send a message to all resources within the company.</div>';

var ToolTipNotifyGroupTrip = 'Send a message to all resources in the trip leg.</div>';

var ToolTipNotifyResource = 'Send a message to the specified resource.</div>';

var ToolTipGroupStatus = 'If a trip is completed, cancelled or not started the status of the trip will be displayed. <br/>' +
                         'For any trip that is in progress the status of the latest trip leg is displayed.';

var ToolTipConfirmation = 'Confirmation indicates if the item has confirmed that it is travelling on the trip leg. The<br/>' + 
                          'possible values are: ' + 
                          '<br/>' + 
                          '<div class=\'list\'><ul>' + 
                          '<li class=\'list\'>Unconfirmed</li>' +
                          '<li class=\'list\'>Confirmed</li>' +
                          '<li class=\'list\'>Deviation</li>' +
                          '</ul></div>' + 
                          '<br />' + 
                          '<b>Unconfirmed</b> means the item has not indicated whether or not it is <br/>' +
                          'on the trip leg.<br/>' + 
                          '<br/>' + 
                          '<b>Confirmed</b> means the item is on the trip leg an will arrive according to<br/>' + 
                          'the itinerary<br/>' + 
                          '<br/>' + 
                          '<b>Deviation</b> means that something has occured and the item will not be<br/>' +
                          'doing the trip leg as specified.';

function GetToolTipText(toolTip)
{
    var resourceType = document.getElementById("ctl00_ContentPlaceHolder1_HiddenItemName");
    if(resourceType != null)
    {
        return toolTip.toString().replace("[RESOURCE]", resourceType.value);
    }
}


// Triggers are automatic events that occur at a specific time before or after a trip event occurs.
// For example if you have a presumed missing trigger configured with a delay of 2 hours then a presumed missing event 
//will be run on the resource 2 hours after the resource has become pending arrival.
//Voyage Manager currently only supports presumed missing triggers, but other triggers will be added in the future. 
                             
