FileDialogOptions.prototype.toString = function() { return "FileDialogOptions" }
function FileDialogOptions() {
	this.Inherits(Collection);
	this.DefaultCollectionObject = CTWebParameter;
	
	var oPath = this.Add();
	oPath.Name = "Path";
	oPath.Value = "";	
	
	var oListType = this.Add();
	oListType.Name = "ListType";
	oListType.Value = "";
	
	var oReturn = this.Add();
	oReturn.Name = "Return";
	oReturn.Value = "";
	
	this.Path	= function(Val) {
		if (Val == undefined) {
			// Get Value
			return this.Find("Name", "Path", true).Value;
		} else {
			// Set Value
			this.Find("Name", "Path", true).Value = Val;
			return true;
		}
	}
	
	this.ListType	= function(Val) {
		if (Val == undefined) {
			// Get Value
			return this.Find("Name", "ListType", true).Value;
		} else {
			// Set Value
			this.Find("Name", "ListType", true).Value = Val;
			return true;
		}
	}
	
	this.Return = function(Val) { 
		if (Val == undefined) {
			// Get Value
			return this.Find("Name", "Return", true).Value;
		} else {
			// Set Value
			this.Find("Name", "Return", true).Value = Val;
			return true;
		}

	}
}


GroupInformationDialogOptions.prototype.toString =  function() { return "GroupInformationDialogOptions" }
function GroupInformationDialogOptions() {
	this.Inherits(Collection);
	this.DefaultCollectionObject = CTWebParameter;
	
	var oGroupID = this.Add();
	oGroupID.Name = "ID";
	oGroupID.Value = "";
	
	this.GroupID = function(Val) { 
		if (Val == undefined) {
			// Get Value
			return this.Find("Name", "ID", true).Value;
		} else {
			// Set Value
			this.Find("Name", "ID", true).Value = Val;
			return true;
		}
	}
}



GroupMembershipDialogOptions.prototype.toString =  function() { return "GroupMembershipDialogOptions" }
function GroupMembershipDialogOptions() {
	this.Inherits(Collection);
	this.DefaultCollectionObject = CTWebParameter;
	
	var oParentID = this.Add();
	oParentID.Name = "ParentID";
	oParentID.Value = "";
	
	var oChildID = this.Add();
	oChildID.Name = "ChildID";
	oParentID.Value = "";
	
	this.ParentID = function(Val) { 
		if (Val == undefined) {
			// Get Value
			return this.Find("Name", "ParentID", true).Value;
		} else {
			// Set Value
			this.Find("Name", "ParentID", true).Value = Val;
			return true;
		}
	}
	
	
	this.ChildID = function(Val) { 
		if (Val == undefined) {
			// Get Value
			return this.Find("Name", "ChildID", true).Value;
		} else {
			// Set Value
			this.Find("Name", "ChildID", true).Value = Val;
			return true;
		}
	}
}



MailMergeFilterDialogOptions.prototype.toString =  function() { return "MailMergeFilterDialogOptions" }
function MailMergeFilterDialogOptions() {
	this.Inherits(Collection);
	this.DefaultCollectionObject = CTWebParameter;

	var oFilters = this.Add();
	oFilters.Name = "Filters";
	
	this.Filters = function(Val) {
		if (Val == undefined) {
			// Get Value
			return this.Find("Name", "Filters", true).Value;
		} else {
			// Set Value
			this.Find("Name", "Filters", true).Value = Val;
			return true;
		}
	}
}



UserPermissionCacheDialogOptions.prototype.toString =  function() { return "UserPermissionCacheDialogOptions" }
function UserPermissionCacheDialogOptions() {
	this.Inherits(Collection);
	this.DefaultCollectionObject = CTWebParameter;

	var oUserID = this.Add();
	oUserID.Name = "UserID";
	oUserID.Value = "";
	
	this.UserID = function(Val) {
		if (Val == undefined) {
			// Get Value
			return this.Find("Name", "UserID", true).Value;
		} else {
			// Set Value
			this.Find("Name", "UserID", true).Value = Val;
			return true;
		}
	}
}



UserInformationDialogOptions.prototype.toString =  function() { return "UserInformationDialogOptions" }
function UserInformationDialogOptions() {
	this.Inherits(ApplicationDialog);

    this.DialogHeight   = "550";
    this.DialogWidth    = "650";
    this.DialogURL      = "/UserInformation.asp";
    this.DialogModal    = true;

    this.ShowDetails        = true;
    this.ShowInformation    = true;
    this.ShowSettings       = true;
    this.ShowPrivate        = true;
    this.ShowDefaultGroup   = true;
	
	this.ShowID             = true;
	
	this.UserID = null;	
}



DatabaseInformationDialogOptions.prototype.toString =  function() { return "DatabaseInformationDialogOptions" }
function DatabaseInformationDialogOptions() {
	this.Inherits(Collection);
	this.DefaultCollectionObject = CTWebParameter;

	var oDatabaseID = this.Add();
	oDatabaseID.Name = "DatabaseID";
	oDatabaseID.Value = "";
	
	this.DatabaseID = function(Val) {
		if (Val == undefined) {
			// Get Value
			return this.Find("Name", "DatabaseID", true).Value;
		} else {
			// Set Value
			this.Find("Name", "DatabaseID", true).Value = Val;
			return true;
		}
	}	
}


AddinInformationDialogOptions.prototype.toString =  function() { return "AddinInformationDialogOptions" }
function AddinInformationDialogOptions() {
	this.Inherits(Collection);
	this.DefaultCollectionObject = CTWebParameter;

	var oAddinID = this.Add();
	oAddinID.Name = "AddinID";
	oAddinID.Value = "";
	
	this.AddinID = function(Val) {
		if (Val == undefined) {
			// Get Value
			return this.Find("Name", "AddinID", true).Value;
		} else {
			// Set Value
			this.Find("Name", "AddinID", true).Value = Val;
			return true;
		}
	}	
}


FormInformationDialogOptions.prototype.toString =  function() { return "FormInformationDialogOptions" }
function FormInformationDialogOptions() {
	this.Inherits(Collection);
	this.DefaultCollectionObject = CTWebParameter;

	var oFormID = this.Add();
	oFormID.Name = "FormID";
	oFormID.Value = "";
	
	this.FormID = function(Val) {
		if (Val == undefined) {
			// Get Value
			return this.Find("Name", "FormID", true).Value;
		} else {
			// Set Value
			this.Find("Name", "FormID", true).Value = Val;
			return true;
		}
	}	
}





ReportInformationDialogOptions.prototype.toString =  function() { return "ReportInformationDialogOptions" }
function ReportInformationDialogOptions() {
	this.Inherits(Collection);
	this.DefaultCollectionObject = CTWebParameter;

	var oReportID = this.Add();
	oReportID.Name = "ReportID";
	oReportID.Value = "";
	
	this.ReportID = function(Val) {
		if (Val == undefined) {
			// Get Value
			return this.Find("Name", "ReportID", true).Value;
		} else {
			// Set Value
			this.Find("Name", "ReportID", true).Value = Val;
			return true;
		}
	}	
}

ActivityAttendeesDialogOptions.prototype.toString =  function() { return "ActivityAttendeesDialogOptions" }
function ActivityAttendeesDialogOptions() {
	this.Inherits(Collection);
	this.DefaultCollectionObject = CTWebParameter;

	var oID = this.Add();
	oID.Name = "ID";
	oID.Value = "";
	
	var oContactsName = this.Add();
	oContactsName.Name = "ContactsName";
	oContactsName.Value = new Array(0);
	
	var oContactsEmail = this.Add();
	oContactsEmail.Name = "ContactsEmail";
	oContactsEmail.Value = new Array(0);
	
	var oUsersName = this.Add();
	oUsersName.Name = "UsersName";
	oUsersName.Value = new Array(0);
	
	var oUsersEmail = this.Add();
	oUsersEmail.Name = "UsersEmail";
	oUsersEmail.Value = new Array(0);
	
	this.ID = oID.Value;
	this.ContactsName = oContactsName.Value;
	this.ContactsEmail = oContactsName.Value;
	this.UsersName = oUsersName.Value;
	this.UsersEmail = oUsersEmail.Value;
	
	
}



UserFileBrowserDialogOptions.prototype.toString =  function() { return "UserFileBrowserDialogOptions" }
function UserFileBrowserDialogOptions() {
	this.Inherits(Collection);
	this.DefaultCollectionObject = CTWebParameter;
	
	var oPath = this.Add();
	oPath.Name = "Path";
	oPath.Value = "";
	
	var oListType = this.Add();
	oListType.Name = "ListType";
	oListType.Value = "";
	
	var oReturn = this.Add();
	oReturn.Name = "Return";
	oReturn.Value = "";
	
	this.Path	= function(Val) {
		if (Val == undefined) {
			// Get Value
			return this.Find("Name", "Path", true).Value;
		} else {
			// Set Value
			this.Find("Name", "Path", true).Value = Val;
			return true;
		}
	}
	
	this.ListType	= function(Val) {
		if (Val == undefined) {
			// Get Value
			return this.Find("Name", "ListType", true).Value;
		} else {
			// Set Value
			this.Find("Name", "ListType", true).Value = Val;
			return true;
		}
	}
	
	this.Return = function(Val) { 
		if (Val == undefined) {
			// Get Value
			return this.Find("Name", "Return", true).Value;
		} else {
			// Set Value
			this.Find("Name", "Return", true).Value = Val;
			return true;
		}

	}
}


ServicesWizardDialogOptions.prototype.toString =  function() { return "ServicesWizardDialogOptions" }
function ServicesWizardDialogOptions() {
	this.Inherits(ApplicationDialog);

    this.DialogHeight   = "700";
    this.DialogWidth    = "900";
    this.DialogURL      = "/CTWebServices/ServicesWizard/WebServiceWizard_Frameset.html";
    this.DialogModal    = true;

    this.Service            = null;         // Job Specified
    this.ServiceRequestID   = null;         // For resuming previous jobs
    this.DataSource         = null;         // Starting Data Source
}

StandardSingleColumnChartDialogOptions.prototype.toString = function() { return "StandardSingleColumnChartDialogOptions"}
function StandardSingleColumnChartDialogOptions() {
    this.Inherits(ApplicationDialog);
                
    this.DialogHeight   = "600";
    this.DialogWidth    = "800";
    this.DialogURL      = "/CTWebReports/dialog_StandardSingleColumnChart.asp";
    this.DialogModal    = true;

    this.Logo           = null;
    this.Caption        = null;
    this.SubCaption     = null;
    this.YMax           = null;
    this.Suffix         = null;
    
    this.ColumnNames    = new Array(0);            // eg Jan, Feb, March    
    this.Values         = new Array(0);             // 1, 2, 3
}

UserfieldDefinitionValuesOptions.prototype.toString = function() { return "UserfieldDefinitionValuesOptions"; }
function UserfieldDefinitionValuesOptions()
{
    this.Inherits(ApplicationDialog);
    this.DialogHeight   = "150";
    this.DialogWidth    = "300";
    this.DialogURL      = "/UserFieldUI_AddValue.asp";
    this.DialogModel    = true;
}

EulaDialogOptions.prototype.toString =  function() { return "EulaDialogOptions" }
function EulaDialogOptions() {
    this.Inherits(ApplicationDialog);
    
    this.DialogHeight   = "590";
    this.DialogWidth    = "560";
    this.DialogURL      = "/login_eula.asp";
    this.DialogModal    = true;
}

EmailSyncDialogOptions.prototype.toString =  function() { return "EmailSyncDialogOptions" }
function EmailSyncDialogOptions() {
    this.Inherits(ApplicationDialog);
    
    this.CurrentCompanyID = "";
    this.CurrentContactID = "";
    this.DialogHeight     = "460";
    this.DialogWidth      = "750";
    this.DialogURL        = "/Interfaces/Shared/Dialogs/EmailUploadDialog.asp";
    this.DialogModal      = true;
}

MergeCodeValueDialogOptions.prototype.toString =  function() { return "MergeCodeValueDialogOptions" }
function MergeCodeValueDialogOptions() {
    this.Inherits(ApplicationDialog);
    
    this.DialogHeight   = "160";
    this.DialogWidth    = "280";
    this.DialogURL      = "/MergeCodeValueInterface.asp";
    this.DialogModal    = true;
    
    this.Value          = null;
    this.ValueType      = 'Static';        // Static or Variable     
}


MailMergeTemplateManagementDialogOptions.prototype.toString =  function() { return "MailMergeTemplateManagementDialogOptions" }
function MailMergeTemplateManagementDialogOptions() {
    this.Inherits(ApplicationDialog);
    
    this.DialogHeight   = "550";
    this.DialogWidth    = "800";
    this.DialogURL      = "/MailMergeTemplateManagementInterface.asp";
    this.DialogModal    = true;
}



MailMergeTemplateDialogOptions.prototype.toString =  function() { return "MailMergeTemplateDialogOptions" }
function MailMergeTemplateDialogOptions() {
    this.Inherits(ApplicationDialog);
    
    this.DialogHeight   = "280";
    this.DialogWidth    = "380";
    this.DialogURL      = "/MailMergeTemplateInterface.asp";
    this.DialogModal    = true;
    
    this.TemplateID     = null; 
}

ProspectListCustomDateRange.prototype.toString =  function() { return "ProspectListCustomDateRange" }
function ProspectListCustomDateRange() {
    this.Inherits(ApplicationDialog);
    
    this.DialogHeight   = "200";
    this.DialogWidth    = "300";
    this.DialogURL      = "/CTWebAddins/addin_ProspectFormDateWindow.asp";
    this.DialogModal    = true;
    
    this.StartDate      = "";
    this.EndDate        = "";
    this.Cancelled      = false;
}


SMSTemplateManagementDialogOptions.prototype.toString =  function() { return "SMSTemplateManagementDialogOptions" }
function SMSTemplateManagementDialogOptions() {
    this.Inherits(ApplicationDialog);
    
    this.DialogHeight   = "550";
    this.DialogWidth    = "800";
    this.DialogURL      = "/SMSTemplateManagementInterface.asp";
    this.DialogModal    = true;
    this.BelongsTo      = null;
    this.FieldID        = null;
}


EmailTemplateManagementDialogOptions.prototype.toString =  function() { return "EmailTemplateManagementDialogOptions" }
function EmailTemplateManagementDialogOptions() {
    this.Inherits(ApplicationDialog);
    
    this.DialogHeight   = "550";
    this.DialogWidth    = "800";
    this.DialogURL      = "/EmailTemplateManagementInterface.asp";
    this.DialogModal    = true;
}


EmailTemplateDialogOptions.prototype.toString =  function() { return "EmailTemplateDialogOptions" }
function EmailTemplateDialogOptions() {
    this.Inherits(ApplicationDialog);
    
    this.DialogHeight   = "280";
    this.DialogWidth    = "380";
    this.DialogURL      = "/EmailTemplateInterface.asp";
    this.DialogModal    = true;
    
    this.TemplateID     = null; 
}


FieldOptionsDialogOptions.prototype.toString =  function() { return "FieldOptionsDialogOptions" }
function FieldOptionsDialogOptions() {
	this.Inherits(ApplicationDialog);

    this.DialogHeight   = "180";
    this.DialogWidth    = "320";
    this.DialogURL      = "/FieldOptionsInterface.asp";
    this.DialogModal    = true;

    this.BelongsTo      = '';
    this.FieldID        = ''; 
}


FieldListOptionsDialogOptions.prototype.toString =  function() { return "FieldListOptionsDialogOptions" }
function FieldListOptionsDialogOptions() {
	this.Inherits(ApplicationDialog);

    this.DialogHeight   = "330";
    this.DialogWidth    = "320";
    this.DialogURL      = "/FieldListInterface.asp";
    this.DialogModal    = true;

    this.BelongsTo      = '';
    this.FieldID        = ''; 
}


AddressSearchDialogOptions.prototype.toString =  function() { return "AddressSearchDialogOptions" }
AddressSearchDialogOptions.Modes = {
                                        Simple : 'SIMPLE',
                                        Extended : 'EXTENDED'
                                    }

function AddressSearchDialogOptions(Mode) 
{
	this.Inherits(ApplicationDialog);

    this.DialogHeight   = "390";
    this.DialogWidth    = "440";
    this.DialogURL      = "/AddressSearchInterface.asp";
    this.DialogModal    = true;

    this.Mode           = (Mode != undefined && Mode == AddressSearchDialogOptions.Modes.Extended) ? AddressSearchDialogOptions.Modes.Extended : AddressSearchDialogOptions.Modes.Simple;

    // Simple Mode <Input / Output>        
    this.City           = '';
    this.State          = '';
    this.Postcode       = '';
    this.Country        = '';  
    
    // Extended Mode <Input>
    this.Postcode       = null;
    
    // Extended Mode <Output>
    this.BuildingName           = '';
    this.SubBuildingName        = '';
    this.Organisation           = '';
    this.OrganisationDepartment = '';  
    this.POBox                  = '';
    this.Postcode               = '';
    this.SortCode               = '';
    this.Country                = '';
    this.State                  = '';
    this.County                 = '';
    this.Town                   = '';
    this.Street                 = '';
    this.Number                 = '';
    this.DeliveryPoints         = '';
    this.NoOfDeliveryPoints     = '';
    this.Category               = '';
}



StateAddressDialogOptions.prototype.toString =  function() { return "StateAddressDialogOptions" }
function StateAddressDialogOptions() {
	this.Inherits(ApplicationDialog);

    this.DialogHeight   = "330";
    this.DialogWidth    = "260";
    this.DialogURL      = "/StateAddressesInterface.asp";
    this.DialogModal    = true;

    this.State          = '';
    this.Country        = ''; 
}


IncludeOverdueRecordsChoiceDialogOptions.prototype.toString =  function() { return "IncludeOverdueRecordsChoiceDialogOptions" }
function IncludeOverdueRecordsChoiceDialogOptions() 
{
	this.Inherits(ApplicationDialog);

    this.DialogHeight   = "100";
    this.DialogWidth    = "250";
    this.DialogURL      = "/Interfaces/Shared/Dialogs/IncludeOverdueRecordsChoiceDialog.asp";
    this.DialogModal    = true;

    this.IncludeOverdue = true;
    this.IncludePresentAndFuture = true;
}


EditValueDialogOptions.prototype.toString =  function() { return "EditValueDialogOptions" }
function EditValueDialogOptions() {
	this.Inherits(ApplicationDialog);

    this.DialogHeight   = "70";
    this.DialogWidth    = "320";
    this.DialogURL      = "/EditValueDialog.asp";
    this.DialogModal    = true;

	this.Value = null;
	this.DataType = 'string';    
}

function ContactGroupManagementDialogOptions() {
    this.Inherits(ApplicationDialog);
    
    this.DialogHeight   = "340";
    this.DialogWidth    = "330";
    this.DialogURL      = "/GroupDefinitionsManagementInterface.asp";
    this.DialogModal    = true;
}


function EditContactGroupDialogOptions() {
    this.Inherits(ApplicationDialog);
    
    this.DialogHeight   = "170";
    this.DialogWidth    = "280";
    this.DialogURL      = "/GroupDefinitionInterface.asp";
    this.DialogModal    = true;
 
    this.GroupID        = null;
}

SMSTieredConfigDialogOptions.prototype.toString =  function() { return "SMSTieredConfigDialogOptions" }
function SMSTieredConfigDialogOptions() {
    this.Inherits(ApplicationDialog);
    
    this.DialogHeight   = "150";
    this.DialogWidth    = "300";
    this.DialogURL      = "/Interfaces/WebPortal/SMS/SMSConfigurationPopup.asp";
    this.DialogModal    = true;

    this.MinValue       = 0;
    this.MaxValue       = 0;
    this.UserName       = "";
    this.UserID         = "";
    
    this.ButtonCaption  = "Add";    
}


ProspectListViewSettingsDialogOptions.prototype.toString =  function() { return "ProspectListViewSettingsDialogOptions" }
function ProspectListViewSettingsDialogOptions() {
    this.Inherits(ApplicationDialog);
    
    this.DialogHeight   = "200";
    this.DialogWidth    = "400";
    this.DialogURL      = "/Interfaces/Shared/Management Dialogs/ProspectListViews_SettingsDialog.asp";
    this.DialogModal    = true;
}


ServicesSettingsDialogOptions.prototype.toString =  function() { return "ServicesSettingsDialogOptions" }
function ServicesSettingsDialogOptions() {
    this.Inherits(ApplicationDialog);
    
    this.DialogHeight   = "250";
    this.DialogWidth    = "350";
    this.DialogURL      = "/Interfaces/Shared/Management Dialogs/Services_SettingsDialog.asp";
    this.DialogModal    = true;
}

CurrentSelectionOrCurrentContactDialogOptions.prototype.toString =  function() { return "CurrentSelectionOrCurrentContactDialog" }
function CurrentSelectionOrCurrentContactDialogOptions() {
    this.Inherits(ApplicationDialog);
    
    this.DialogHeight   = "150";
    this.DialogWidth    = "300";
    this.DialogURL      = "/CurrentSelectionOrCurrentContactDialog.asp";
    this.DialogModal    = true;

    this.SelectionOrCurrentRecordOnly = false;

    this.CurrentSelection   = true;
    this.AllContacts        = true;
}


AddContactsToGroupDialogOptions.prototype.toString =  function() { return "AddContactsToGroupDialogOptions" }
function AddContactsToGroupDialogOptions() {
    this.Inherits(ApplicationDialog);
    
    this.DialogHeight   = "150";
    this.DialogWidth    = "300";
    this.DialogURL      = "/AddContactsToGroupDialog.asp";
    this.DialogModal    = true;
    
    this.SelectionType  = null;
    this.SelectionID    = null;
    this.SelectionDescription = null;
    
    this.CompanyID      = null;
    this.ContactID      = null;    
}


GroupAndUserListDialogOptions.prototype.toString =  function() { return "GroupAndUserListDialogOptions" }
function GroupAndUserListDialogOptions() {
    this.Inherits(ApplicationDialog);
    
    this.DialogHeight   = "470";
    this.DialogWidth    = "420";
    this.DialogURL      = "/GroupAndUserListDialog.asp";
    this.DialogModal    = true;
    
    this.ShowGroups     = true;
    this.ShowUsers      = true;
    
    this.GroupFields    = 'GroupName, FullName';
    this.UserFields     = 'Username, FullName';
    
    this.GroupRestrictions = null;
    this.UserRestrictions  = null;
    
    this.GroupPermissions    = new __GroupPermissionsRestriction();                   
    this.UserPermissions     = new __UserPermissionsRestriction();
    
    this.GroupOrderBy      = 'GroupName';
    this.UserOrderBy       = 'Username';
    
    this.EntityType     = null;
    this.EntityID       = null;         
    this.Values         = new Array(0);   
}


SettingsCopyDialogOptions.prototype.toString =  function() { return "SettingsCopyDialogOptions" }
function SettingsCopyDialogOptions() {
    this.Inherits(ApplicationDialog);
    
    this.DialogHeight   = "170";
    this.DialogWidth    = "420";
    this.DialogURL      = "/SettingsCopyDialog.asp";
    this.DialogModal    = true;

    this.Key1           = null;
    this.Key2           = null;
    this.Key3           = null;
    this.Key4           = null;
    this.Key5           = null;        
}

SMSEditTemplateDialogOptions.prototype.toString = function() { return "SMSEditTemplateDialogOptions"; }
function SMSEditTemplateDialogOptions() {
    this.Inherits(ApplicationDialog);

    this.DialogWidth    = "700";
    this.DialogHeight   = "520";    
    this.DialogURL      = "/SMSEditTemplateDialog.asp";
    this.DialogModal    = true;
    
    this.TemplateID     = "";
    this.TemplateText   = "";
    this.EntityID       = "";
    this.EntityType     = "";
    this.HasChanged     = false;
}

DriverIDScanSaveContactDialogOptions.prototype.toString = function() { return "DriverIDScanSaveContactDialogOptions"; }
function DriverIDScanSaveContactDialogOptions() {
    this.Inherits(ApplicationDialog);

    this.DialogWidth    = "750";
    this.DialogHeight   = "450";    
    this.DialogURL      = "/CTWebAddins/DriverIDScan/DriverIDScanSaveContact.asp";
    this.DialogModal    = true;
    
    this.FirstName      = "";
    this.MiddleName     = "";
    this.LastName       = "";
    this.LicenceNumber  = "";
    this.Address1       = "";
    this.Address2       = "";
    this.City           = "";
    this.State          = "";
    this.Postcode       = "";
    this.Country        = "";
    this.LicenceType    = "";
    this.Birthdate      = "";
    
    this.LicenceImagePath     = "";
    this.LicenceFaceImagePath = "";
    
    this.UploadImageCallback = null;
}



AutomotiveQuickPickInterfaceDialogOptions.prototype.toString = function() { return "AutomotiveQuickPickInterfaceDialogOptions"; }
function AutomotiveQuickPickInterfaceDialogOptions() {
    /// <field name="ID" type="String">ID of the quick pick (if it is saved), specifying an id will load the quick pick</field>
    /// <field name="Tables" type="Object" />
    /// <field name="Restrictions" type="Object" />
    /// <field name="Fields" type="Object" />
    /// <field name="Ordering" type="Object" />
    
    this.Inherits(ApplicationDialog);

    this.DialogWidth      = "920";
    this.DialogHeight     = "768";
    
    this.DialogURL        = "/Interfaces/Portal/QuickPick/QuickPick_Automotive.asp";
    this.DialogModal      = true;

    // Input
    this.ID = null;    
    
    // Output
    this.Tables           = null;
    this.Restrictions     = null;
    this.Fields           = null;
    this.Ordering         = null;
}


QuickPickOptionsDialogOptions.prototype.toString = function() { return "QuickPickOptionsDialogOptions"; }
function QuickPickOptionsDialogOptions() {
    /// <field name="Description" type="String">Name for the quick pick</field>
    /// <field name="Name" type="String">Description for the quick pick</field>
    /// <field name="ID" type="String">ID of the Quick Pick to save to (leave null to create a new one)</field>
    
    this.Inherits(ApplicationDialog);

    this.DialogHeight = "125";
    this.DialogWidth = "320";
    this.DialogURL = "/Interfaces/Portal/QuickPick/QuickPickOptionsDialog.asp";
    this.DialogModal = true;

    this.ID = null;     

    this.Name = null;   
    this.Description = null;    
}


QuickPickManagerDialogOptions.prototype.toString = function() { return "QuickPickManagerDialogOptions"; }
function QuickPickManagerDialogOptions() {
    /// <field name="Action" type="String">Action selected by the dialog (such as 'EDIT')</field>
    /// <field name="ID" type="String">ID of the selected quick pick to perform an action on</field>
    
    this.Inherits(ApplicationDialog);

    this.DialogHeight = "250";
    this.DialogWidth = "320";
    this.DialogURL = "/Interfaces/Portal/QuickPick/QuickPickManagerDialog.asp";
    this.DialogModal = true;

    this.Action = null;
    this.ID = null;
}


BulkOperationDialogOptions.prototype.toString = function() { return "BulkOperationDialogOptions"; }
function BulkOperationDialogOptions()
{
    this.Inherits(ApplicationDialog);

    this.DialogWidth      = "300";
    this.DialogHeight     = "150";
    
    this.DialogURL        = "/Interfaces/Shared/Dialogs/BulkOperationDialog.asp";
    this.DialogModal      = true;
    
    this.DataSource       = new CTWebParameter("DataSourceRequest");
    
    this.Operations       = new CTWebParameter("Operations");           
    
    this.Async            = true;
    this.ContinueOnError  = true;
    
    this.Completed        = 0;
    this.Failed           = 0;
    
    this.ReturnXML        = null;
}


DataSecurityDialogOptions.prototype.toString = function() { return "DataSecurityDialogOptions"; }
function DataSecurityDialogOptions()
{
    this.Inherits(ApplicationDialog);

    this.DialogWidth      = "300";
    this.DialogHeight     = "200";
    
    this.DialogURL        = "/Interfaces/Shared/Dialogs/DataSecurityDialog.asp";
    this.DialogModal      = true;
    
    this.SetPrivate       = null;
    this.SetOwner         = null;
    this.SetGroup         = null;
    
    this.ContinueOnError  = true;
    
    this.ReturnXML        = null;
}


MailMergeTemplateSelectionDialogOptions.prototype.toString = function() { return "MailMergeTemplateSelectionDialogOptions"; }
function MailMergeTemplateSelectionDialogOptions() {
    this.Inherits(ApplicationDialog);

    this.DialogWidth      = "300";
    this.DialogHeight     = "350";
    
    this.DialogURL        = "/MailMergeTemplateSelectionDialog.asp";
    this.DialogModal      = true;
    
    this.TemplateName     = "";
    this.TemplateCategory = "";
    this.TemplateID       = "";
}

MailJobStatusMonitorOptions.prototype.toString = function() { return "MailJobStatusMonitorOptions"; }
function MailJobStatusMonitorOptions() {
    this.Inherits(ApplicationDialog);
    
    this.DialogWidth    = "330";
    this.DialogHeight   = "330";
    
    this.DialogURL      = "/MailJobStatusMonitorOptions.asp";
    this.DialogModal    = true;
    
    this.MailMergeJobID = "";
    this.ProcessID      = "";

    this.Cancelled      = false;
}

ProspectListLeadSourceDialogOptions.prototype.toString = function() { return "ProspectListLeadSourceDialogOptions"; }
function ProspectListLeadSourceDialogOptions() {
    this.Inherits(ApplicationDialog);
    
    this.DialogWidth  = "300";
    this.DialogHeight = "105";
    
    this.DialogURL    = "/ProspectListLeadSourceDialogOptions.asp";
    this.DialogModal  = true;
        
    this.LeadSource   = "";
}

OpportunityMilestoneEditorDialogOptions.prototype.toString = function() { return ""; }
function OpportunityMilestoneEditorDialogOptions() {
    this.Inherits(ApplicationDialog);
    
    this.DialogWidth   = "640";
    this.DialogHeight  = "430";
    
    this.DialogURL     = "/OpportunityMilestoneEditorDialog.htm";
    this.DialogModal   = true;
    
    this.OpportunityID = "";
}

SingleSMSDialogOptions.prototype.toString = function() { return "SingleSMSDialogOptions"; }
function SingleSMSDialogOptions() {
    this.Inherits(ApplicationDialog);
    this.Destination    = "";
    this.DialogWidth    = "450";
    this.DialogHeight   = "250";
    
    this.DialogURL      = "/SimpleSMSDialog.asp";
    this.DialogModal    = true;
}


ICEUserMappingDialogOptions.prototype.toString = function() { return "ICEUserMappingDialogOptions"; }
function ICEUserMappingDialogOptions() {
    this.Inherits(ApplicationDialog);

    this.DialogWidth    = "330";
    this.DialogHeight   = "400";
    
    this.DialogURL      = "/Interfaces/Shared/Dialogs/ICEUserMappingDialog.asp";
    this.DialogModal    = true;
}


DataSetViewerDialogOptions.prototype.toString = function() { return "DataSetViewerDialogOptions"; }
function DataSetViewerDialogOptions(dlDataSet) {
    this.Inherits(ApplicationDialog);
    
    // Inputs
    this.DataList       = dlDataSet != undefined ? dlDataSet : null;        
        
    this.DataSource     = null;
    this.RequestAction  = null;
    this.RequestHandler = null;
    this.Library        = null;
    this.Fields         = null;
    this.Restrictions   = null;
    this.GroupBy        = null;
    this.OrderBy        = null;
    this.AutoValidate   = null;
    this.Paged          = false;
    
    this.ReturnSelectedRow = true;
    
    // Not Implemented
    this.AllowSearch    = false;
    this.SearchFields   = null;         // Specify comma delimited list or array of strings
    this.SearchType     = DataSetViewerDialogOptions.SearchTypes.Jump;
    // Not Implemented
    
    this.DialogHeight   = "500";
    this.DialogWidth    = "500";
    
    // Output
    this.SelectedRow    = null;
    
    this.DialogURL      = "/Interfaces/Shared/Dialogs/DataSetViewerDialog.asp";
    this.DialogModal    = true;
}
DataSetViewerDialogOptions.SearchTypes =  { 
                                            Jump : 'JUMP',          // Jumps to the first matching record
                                            Restrict : 'RESTRICT'   // Restricts the data set 
                                            }


// ****************************************************************************************
// ** HQS Dialogs
// ****************************************************************************************

AccessoryTypeDialogOptions.prototype.toString = function() { return "AccessoryTypeDialogOptions"; }
function AccessoryTypeDialogOptions() {

    this.Inherits(ApplicationDialog);
    
    this.AccessoryType = "";
    this.URL           = "";

    this.DialogHeight = "230";
    this.DialogWidth  = "410";
    this.DialogURL    = "/HQS/Dialogs/AccessoryType.asp";
}

DatabaseProductDialogOptions.prototype.toString = function() { return "DatabaseProductDialogOptions"; }
function DatabaseProductDialogOptions() {

    this.Inherits(ApplicationDialog);
    
    this.AccessoryType = "";
    this.URL           = "";

    this.DialogWidth  = "800";
    this.DialogHeight = "630";    
    this.DialogURL    = "/HQS/Dialogs/DatabaseProduct.asp";
}

FreeFormProductDialogOptions.prototype.toString = function() { return "FreeFormProductDialogOptions"; }
function FreeFormProductDialogOptions() {

    this.Inherits(ApplicationDialog);
    
    this.AccessoryType = "";
    this.URL           = "";

    this.DialogWidth  = "750";
    this.DialogHeight = "330";    
    this.DialogURL    = "/HQS/Dialogs/FreeFormProduct.asp";
}

ColourPackageDialogOptions.prototype.toString = function() { return "ColourPackageDialogOptions"; }
function ColourPackageDialogOptions() {

    this.Inherits(ApplicationDialog);

    this.AccessoryType = "";
    this.URL = "";

    this.DialogWidth = "600";
    this.DialogHeight = "400";
    this.DialogURL = "/HQS/Dialogs/ColourPackageDialog.asp";
}

// ****************************************************************************************

NoteDialogOptions.prototype.toString = function() { return "NoteDialogOptions"; }
function NoteDialogOptions() 
{
    this.Inherits(ApplicationDialog);
    
    this.DialogHeight   = "530";
    this.DialogWidth    = "540";
    this.DialogURL      = "/NoteInterface.asp";
    this.DialogModal    = true;    
    
    this.ID             = null; // Specify the id of a note to open
    
    this.EntityTypes    = new Array();  // Specify the available entitytypes a user can choose for a new note
        this.EntityTypes.Add = function(EntityType, EntityID) { this[this.length] = { EntityType : EntityType, EntityID : EntityID} }
}


NotesListDialogOptions.prototype.toString = function() { return "NotesListDialogOptions"; }
function NotesListDialogOptions() 
{
    this.Inherits(ApplicationDialog);
    
    this.DialogHeight   = "300";
    this.DialogWidth    = "650";
    this.DialogURL      = "/Interfaces/Shared/Dialogs/NotesListDialog.asp";
    this.DialogModal    = true;    
    
    this.DisplayFields  = "Subject, Text";
}


OpportunityListDialogOptions.prototype.toString = function() { return "OpportunityListDialogOptions"; }
function OpportunityListDialogOptions() 
{
    this.Inherits(ApplicationDialog);
    
    this.DialogHeight   = "320";
    this.DialogWidth    = "615";
    this.DialogURL      = "/Interfaces/Shared/Dialogs/OpportunityListDialog.asp";
    this.DialogModal    = true;
        
    // Input
    this.Caption        = '';    
    this.CompanyID      = null;
        
    // Output
    this.OpportunityID      = null;
    this.OpportunityEntryID = null;
}



RelationshipDialogOptions.prototype.toString = function() { return "RelationshipDialogOptions"; }
function RelationshipDialogOptions() 
{
    this.Inherits(ApplicationDialog);
    
    this.DialogHeight   = "100";
    this.DialogWidth    = "260";
    this.DialogURL      = "/Interfaces/Shared/Dialogs/RelationshipDialog.asp";
    this.DialogModal    = true;
        
    // Input
    this.RelationshipDefinitionID = null;
    this.RelationshipType=null;
        
    // Output
    this.RelationshipDefinitionID = null;
    this.RelationshipType=null;
    this.Description    = null;
    this.Parent         = null;
}


RelationshipManagerDialogOptions.prototype.toString = function() { return "RelationshipManagerDialogOptions"; }
function RelationshipManagerDialogOptions() 
{
    this.Inherits(ApplicationDialog);
    
    this.DialogHeight   = "300";
    this.DialogWidth    = "600";
    this.DialogURL      = "/Interfaces/Shared/Dialogs/RelationshipManagerDialog.asp";
    this.DialogModal    = true;
        
    // Input
    this.EntityID       = null;
        
    // Output
    this.ChangesMade    = false;
}

// Honda leads report -- Prospect drill down
HondaMilestoneRatioProspectDrillDownOptions.prototype.toString = function() { return "HondaMilestoneRatioProspectDrillDownOptions"; }
function HondaMilestoneRatioProspectDrillDownOptions(franchiseId, franchiseName) {

	if (franchiseId == "" || franchiseId == undefined)    throw new Error("The franchiseId supplied is invalid");
	if (franchiseName == "" || franchiseName == undefined)    throw new Error("The franchiseName supplied is invalid");

	this.Inherits(ApplicationDialog);
	
    this.FranchiseId   = franchiseId;
	this.FranchiseName = franchiseName;
    this.DialogHeight  = "530";
    this.DialogWidth   = "800";
    this.DialogURL     = "/CTWebReports/HondaAggregate/MilestoneRatio/ShowProspects.htm";
    this.DialogModal   = true;
}

ExcelExtractDialogOptions.prototype.toString = function() { return "ExcelExtractDialogOptions"; }
function ExcelExtractDialogOptions(strJobID) {
    
    if (strJobID == "" || strJobID == undefined)    throw new Error("The JobID supplied is invalid");
    
    this.Inherits(ApplicationDialog);
    this.JobID        = strJobID;
    this.DialogHeight = "330";
    this.DialogWidth  = "320";
    this.DialogURL    = "/Interfaces/Shared/Dialogs/ExcelExtractDialog.asp";
    this.DialogModal  = true;
    
    this.Cancelled   = false;    
}

DebugDialogOptions.prototype.toString = function() { return "DebugDialogOptions"; }
function DebugDialogOptions(arrDebugMessages) {
    this.Inherits(ApplicationDialog);
    
    this.DialogWidth    = "800";
    this.DialogHeight   = "600";
    
    this.DialogURL      = "/Interfaces/Debug/DebugMessagesDialog.html";
    this.DialogModal    = true;
    
    this.DebugMessages  = new Array(0);
    if (arrDebugMessages != undefined)
    {
        switch (typeof(arrDebugMessages))
        {
            case "object":
                if (arrDebugMessages.ConstructorName() == "Array") this.DebugMessages = arrDebugMessages;
                break;
            case "string":
                this.DebugMessages[0] = arrDebugMessages;
                break;
        }
    }


    this.Cancelled      = false;
    
    this.Show           = DebugDialogOptions_Show;
}
function DebugDialogOptions_Show()
{
    if (ApplicationObjects != null && ApplicationObjects.Interfaces.Debug != undefined && ApplicationObjects.Interfaces.Debug.SuppressMessages == true) return;
    if (this.DebugMessages.length == 0) return;
    
    this.Show =  ApplicationDialog_Show;
    this.Show();
    this.Show =  DebugDialogOptions_Show;
}


function ApplicationDialog(URL, iWidth, iHeight, iLeft, iTop, bCenter, bModal) {
    this.DialogURL    = (URL) ? URL: '';
    this.DialogWidth  = (iWidth != undefined && iWidth.toString().IsNumeric()) ? iWidth.toString().ToInt() : 100;
    this.DialogHeight = (iHeight != undefined && iHeight.toString().IsNumeric()) ? iHeight.toString().ToInt() : 100;
    this.DialogCenter = (bCenter != undefined && bCenter.toString().IsBool()) ? bCenter.toString().ToBool() : true;
    this.DialogModal  = (bModal != undefined && bModal.toString().IsBool()) ? bModal.toString().ToBool() : true;
    this.DialogLeft   = (iLeft != undefined && iLeft.toString().IsNumeric()) ? iLeft.toString().ToInt() : 100;
    this.DialogTop    = (iHeight != undefined && iTop.toString().IsNumeric()) ? iTop.toString().ToInt() : 100;

    this.Cancelled    = true;    
    
    this.Opener       = new Object();
        this.Opener.ApplicationObjects   = window.ApplicationObjects;
        this.Opener.ApplicationEvents    = window.ApplicationEvents;
        this.Opener.ApplicationFunctions = window.ApplicationFunctions;
            
}
ApplicationDialog.prototype.Show        = ApplicationDialog_Show;
ApplicationDialog.prototype.toString    = ApplicationDialog_toString;

function ApplicationDialog_toString() {
    return '[Application Dialog]';
}

function ApplicationDialog_Show() {
    // Determine IE Browser Version
    var sBrowser = window.navigator.userAgent;
    var sValid = "MSIE [0-9]\\.[0-9][;]";
    var objRegEx = new RegExp(sValid);         
    var theMatch = sBrowser.match(objRegEx);
    var IEVersion = 7;
    
    if (theMatch != null)
    {
        try
        {
            theMatch = theMatch.toString();
            theMatch = theMatch.replace("MSIE ", "")  ;
            theMatch = theMatch.replace(";", "");
            theMatch = theMatch.substr(0, theMatch.indexOf("."));
        
            IEVersion = theMatch.ToInt();
        }
        catch (ex)
        {
            // Do nothing
        }
    }
    
    
    
    if (this.DialogModal == true) 
    {
        var iHeight  = this.DialogHeight;
        var iWidth   = this.DialogWidth;
    
        if (IEVersion == 6) 
        {
            iHeight += 50;
        }
                
        window.showModalDialog(this.DialogURL, this, "dialogHeight: " + iHeight + "px; dialogWidth: " + iWidth + "px;");
    } else {
        var iTop = (this.Top != undefined && !isNaN(this.Top)) ? this.Top : 0;
        var iTop = (this.Top != undefined && !isNaN(this.Top)) ? this.Top : 0;
        
        // Get screen width / height
	    scrW = screen.availwidth; 
	    scrH = screen.availheight;

        var yPos = 0;
        var xPos = 0;
    	
	    if (this.Center == true) {
	        // Find the difference between the screen width/height and the
	        // page that we're opening
	        wDif = scrW - pWidth;
	        hDif = scrH - pHeight;
    	
	        //  Determine the center position for the window
	        xPos = wDif / 2;
	        yPos = hDif / 2;
	    } else {
	        // do nothing
	    }
    	
    	
    	
        attribs = 'width=' + this.DialogWidth + ', height=' + this.DialogHeight + ', top=' + yPos + ', screenY=' + yPos + ', left=' + xPos + ', screenX=' + xPos + ', resizable=yes, scrollbars=yes, directories=no, status=yes, menubar=no, copyhistory=no'

        var wndNewWindow = window.open(this.DialogURL,'',attribs);
	    
        wndNewWindow.ApplicationObjects     = window.ApplicationObjects;
        wndNewWindow.ApplicationEvents      = window.ApplicationEvents;
        wndNewWindow.ApplicationFunctions   = window.ApplicationFunctions;	    	    	    
	}
}


function MelwaysAddressSearchDialogOptions(Mode) {
    this.Inherits(ApplicationDialog);

    this.DialogHeight = "390";
    this.DialogWidth = "490";
    this.DialogURL = "/MelwaysAddressSearchInterface.asp";
    this.DialogModal = true;

    // Simple Mode <Input / Output>        
    this.City = '';
    this.State = '';
    this.Postcode = '';
    this.Street = '';
    this.PageNumber = '';
    this.PagePosition = '';
}