var Expenews = {
    Config: {
        Url:{
            base: "/",
            accounts: "/service/accounts",
            accountUpdate: function(accountId){return "/service/accounts/"+accountId;},
            accountImage: function(accountId){return "/service/accounts/"+accountId+"/image";},
            accountGetPublicData: function(email){return "/service/accounts/publicdata?email="+email;},
            accountSocial: function(accountId,linktype){return "/service/accounts/"+accountId+"/social?type="+linktype;},
            expeditionsCreate: "/service/expeditions",
            expeditionsUpdate: function(expeditionId){return "/service/expeditions/"+expeditionId;},
	    expeditionGet: function(expeditionId){return "/service/expeditions/"+expeditionId;},
            expeditionsMessages: function(expeditionId){return "/service/expeditions/"+expeditionId+"/messages";},
            expeditionSuscribers: function(expeditionId){return "/service/expeditions/"+expeditionId+"/suscribers";},
            expeditionAddSuscribers: function(expeditionId){return "/service/expeditions/"+expeditionId+"/suscribe";},
            expeditionRemoveSuscribers: function(expeditionId){return "/service/expeditions/"+expeditionId+"/unsuscribe";},
            expeditionsSponsors: function(expeditionId){return "/service/expeditions/"+expeditionId+"/sponsors";},
            expeditionsRemoveSponsor: function(expeditionId, accountId){return "/service/expeditions/"+expeditionId+"/sponsors/"+accountId;},
            expeditionsMembers: function(expeditionId){return "/service/expeditions/"+expeditionId+"/members";},
            expeditionsMember: function(expeditionId, accountId){return "/service/expeditions/"+expeditionId+"/members/"+accountId;},
            expeditionsDeleteMember: function(expeditionId, accountId){return "/service/expeditions/"+expeditionId+"/members/"+accountId;},
            expeditionsMemberAddImage: function(expeditionId, accountId){return "/service/expeditions/"+expeditionId+"/members/"+accountId+"/addimage";},
            expeditionsPages: function(expeditionId){return "/service/expeditions/"+expeditionId+"/pages";},
            expeditionsPageTypes: function(expeditionId,lang){return "/service/expeditions/"+expeditionId+"/pages/"+lang+"/pagetypes";},
            expeditionsRemovePage: function(expeditionId, pageType, pageLang){return "/service/expeditions/"+expeditionId+"/pages?type="+pageType+"&lang="+pageLang;},
            expeditionsEditPage: function(expeditionId, pageId){return "/service/expeditions/"+expeditionId+"/pages/"+pageId;},
            expeditionsGetValidEmail: function(expeditionId){return "/service/expeditions/"+expeditionId+"/validemails";},
            expeditionsAddValidEmail: function(expeditionId){return "/service/expeditions/"+expeditionId+"/validemails";},
            expeditionsRemoveValidEmail: function(expeditionId, email){return "/service/expeditions/"+expeditionId+"/validemails?email="+email;},
            expeditionsEditors: function(expeditionId){return "/service/expeditions/"+expeditionId+"/editors";},
            expeditionsRemoveEditor: function(expeditionId, accountId){return "/service/expeditions/"+expeditionId+"/editors/"+accountId;},
            expeditionsConnectMembers: function(expeditionId){return "/service/expeditions/"+expeditionId+"/connect_members";},
            expeditionsConnectEditors: function(expeditionId){return "/service/expeditions/"+expeditionId+"/editors";},
            expeditionsLogoUrl: function(expeditionId, logoId){return "/service/expeditions/"+expeditionId+"/logos/"+logoId;},
            expeditionImage: function(expeditionId){return "/service/expeditions/"+expeditionId+"/image";},
            expeditionsAddLogo: function(expeditionId){return "/service/expeditions/"+expeditionId+"/logo";},
            expeditionLogo: function(expeditionId){return "/service/expeditions/"+expeditionId+"/logo";},
            expeditionsAddMembers: function(expeditionId){return "/service/expeditions/"+expeditionId+"/membersadmin";},
            expeditionsGetEmailGateways: function(expeditionId, sender){return "/service/expeditions/"+expeditionId+"/emailgateways?sender="+sender;},
            expeditionsAddEmailGateway: function(expeditionId){return "/service/expeditions/"+expeditionId+"/emailgateways";},
            expeditionsRemoveEmailGateway: function(expeditionId, key){return "/service/expeditions/"+expeditionId+"/emailgateways?key="+key;},
            createDispatch: function(expeditionId){return "/service/expeditions/"+expeditionId+"/dispatches";},
            commitDispatch: function(expeditionId,dispatchId){return "/service/expeditions/"+expeditionId+"/dispatches/"+dispatchId+"/commit";},
	    commitNotifyDispatch: function(expeditionId,dispatchId, notify){return "/service/expeditions/"+expeditionId+"/dispatches/"+dispatchId+"/commit?notify="+notify;},
            getDispatch: function(expeditionId,dispatchId){return "/service/expeditions/"+expeditionId+"/dispatches/"+dispatchId;},
            dispatchImages: function(expeditionId, dispatchId){return "/service/expeditions/"+expeditionId+"/dispatches/"+dispatchId+"/images";},
            updateDispatch: function(expeditionId, dispatchId){return "/service/expeditions/"+expeditionId+"/dispatches/"+dispatchId;},
            deleteDispatch: function(expeditionId, dispatchId){return "/service/expeditions/"+expeditionId+"/dispatches/"+dispatchId;},
            undeleteDispatch: function(expeditionId, dispatchId){return "/service/expeditions/"+expeditionId+"/dispatches/"+dispatchId+"/undelete";},
            dispatchImages: function(expeditionId, dispatchId){return "/service/expeditions/"+expeditionId+"/dispatches/"+dispatchId+"/images";},
            dispatchImage: function(expeditionId, dispatchId, imageId){return "/service/expeditions/"+expeditionId+"/dispatches/"+dispatchId+"/images/"+imageId;},
            dispatchChangeAuthor: function(expeditionId, dispatchId, audioId, authorId){return "/service/expeditions/"+expeditionId+"/dispatches/"+dispatchId+"/audios/"+audioId+"/author?id="+authorId;},
            dispatchSetView: function(expeditionId, dispatchId){return "/service/expeditions/"+expeditionId+"/dispatches/"+dispatchId+"/setview";},
            htmlDispatchesPage: function(language, expeditionId){return "/"+language+"/expeditions/"+expeditionId+"/dispatches";},
            latestDispatch: function(expeditionId){return "/service/expeditions/"+expeditionId+"/latest_dispatch";},
			getUsers: function(searchString){return "/service/admin/users/"+searchString;},
			getLast100Users: function(searchString){return "/service/admin/users/"+searchString+"?last=100";},
            getExpeditions: function(searchString){return "/service/admin/expeditions/"+searchString;},
	    getLast100Expeditions: function(searchString){return "/service/admin/expeditions/"+searchString+"?last=100";},
            delUser: function(userId){ return "/service/admin/delete_user/"+userId;},
            delExpedition: function(expeditionId){ return "/service/admin/delete_expedition/"+expeditionId;},
            confirmDeleteUser: function(userId){ return "/service/admin/confirm_delete_user/"+userId;},
            confirmDeleteExpedition: function(expeditionId){return "/service/admin/confirm_delete_expedition/"+expeditionId;},
            login: "/service/accounts/login",
            logout: "/service/accounts/logout",
            resetPassword: "/service/accounts/resetpassword",
            unsuscribe: function(expeditionId, unsuscribeCode){	return '/service/expeditions/'+expeditionId+'/unsuscribe/'+unsuscribeCode;},
	    getAccountId: function(email){return "/service/accounts/byemail?email="+email;},
	    ckeckCode: function(code){return "/service/discountcode/"+code},
	    applyCode: function(code,service,expeditionId){return "/service/applycode/"+code+"?service="+service+"&expedition_id="+expeditionId},
	    getCSV: function(file,cols){
					if(cols==""){
						return "/service/read-csv?file="+file;
					}else{
						return "/service/read-csv?file="+file+"&namecols="+cols;
					}},
	    addGroup: function(){return "/service/manager/groups/add";},
	    getGroup: function(groupId){return "/service/manager/groups/"+groupId;},
	    deleteGroup: function(groupId){return "/service/manager/delete_group/"+groupId;},
	    getExpeditionsFromGroup: function(groupId){return "/service/manager/get_expeditions_from_group/"+groupId;},
	    addExpeditionToGroup: function(groupId, expeditionId){return "/service/manager/add_expedition_to_group/"+groupId+"/"+expeditionId;},
	    deleteExpeditionFromGroup: function(groupId, expeditionId){return "/service/manager/delete_expedition_from_group/"+groupId+"/"+expeditionId;},
	    addImageHeader: function(groupId){return "/service/manager/add_image_header_group/"+groupId;},
	    deleteImgFromGroup: function(groupId){return "/service/manager/delete_image_header/"+groupId;},
	    dispatchImagesMass: function(expeditionId, dispatchId, nameImage, contentType){return "/service/expeditions/"+expeditionId+"/dispatches/"+dispatchId+"/images/image_uploaded";},
		emptyTestMail: function(email){return "/service/test_email/empty/"+email;},
		testEmailMessages:function(email){return "/service/test_email/getmessages/"+email;},
		sendDispatch: "/service/test_email/senddispatch",
		notifyError: "/service/tests/notifyerror",
	    
	    addAdvertiser: function(id){return "/service/manager/ads/add_advertiser"},
	    getAdvertisers: function(){return "/service/manager/ads/get_ads";},
  	    removeAdvertiser: function(adId){return "/service/manager/ads/"+adId+"/delete_ad";},
	    getNotifications: function(){return "/service/manager/notifier/get_notifications";},
	    getRecipients: function(notification_id){return "/service/manager/notifier/"+notification_id+"/get_recipients";},
	    send_notification_errors: function(notification_id, all) {return "/service/manager/notifier/"+notification_id+"/send_notification_errors?all="+all;},
	    send_notification_to_recipient: function(notification_id, recipient_id) {return "/service/manager/notifier/"+notification_id+"/recipients/"+recipient_id+"/send_to_recipient";},
		
	    getContacts: function(idAccount){return "/service/expeditions/accounts/"+idAccount+"/get_contacts";},
	    deleteContacts: function(idAccount, code){return "/service/expeditions/accounts/"+idAccount+"/del_contact/"+code;},
	    getExpeditionsFromPhoneNumber: function(idExpedition, phoneNumber){return "/service/expeditions/"+expeditionId+"/phone_number/"+phoneNumber;},
	    notifyNewEditor: function(lang, expedition_id){return "/service/expeditions/"+expedition_id+"/editors/notify";},
	    notifyNewMember: function(lang, expedition_id){return "/service/expeditions/"+expedition_id+"/members/notify";},
	    deleteAudioDispatch: function(audioId,expeditionId,dispatchId){return "/service/expeditions/"+expeditionId+"/dispatches/"+dispatchId+"/audios?audioId="+audioId;},
	    notifyNewAccount: function(lang){return "/service/"+lang+"/accounts/new_account/notify";},
	    changeOwner: function(expeditionId,idOldOwner, idNewOwner){return "/service/expeditions/"+expeditionId+"/owners/"+idOldOwner+"/new_owner/"+idNewOwner;},
	    ExpeditionsfromVoicemailCode:function(voicemailCode, email){return "/service/accounts/verify_code/"+voicemailCode+"/mail?mail="+email;},
	    importCoordinates:function(expeditionId, id_dispatch_src, id_dispatch_dst){return "/service/expeditions/"+expeditionId+"/dispatches/"+id_dispatch_dst+"/import_coordinates?src="+id_dispatch_src;},
	    addImageToBest: function(expedition_id, image_id, image_path){return "/service/manager/expeditions/"+expedition_id+"/images/"+image_id+"/best/add?image_path="+image_path;},
	    addComment: function(expedition_id,dispatch_id, text_comment){return "/service/expeditions/"+expedition_id+"/dispatch/"+dispatch_id+"/add_comment";},
	    getComments: function(expedition_id,dispatch_id){return "/service/expeditions/"+expedition_id+"/dispatch/"+dispatch_id+"/get_comments";},
	    getAllComments: function(expedition_id){return "/service/expeditions/"+expedition_id+"/get_comments";},
	    deleteComment: function(expedition_id,dispatch_id, id_comment){return "/service/expeditions/"+expedition_id+"/dispatch/"+dispatch_id+"/delete_comment/"+id_comment;},
	    undeleteComment: function(expedition_id,dispatch_id, id_comment){return "/service/expeditions/"+expedition_id+"/dispatch/"+dispatch_id+"/undelete_comment/"+id_comment;},
	    commitComment: function(expedition_id,dispatch_id, id_comment){return "/service/expeditions/"+expedition_id+"/dispatch/"+dispatch_id+"/commit_comment/"+id_comment;},
	    reportComment: function(expedition_id,dispatch_id, id_comment){return "/service/expeditions/"+expedition_id+"/dispatch/"+dispatch_id+"/report_comment/"+id_comment;},

 	    addToken: function(account_id){return "/service/accounts/"+account_id+"/authorizations/facebook/add";},
	    delToken: function(account_id){return "/service/accounts/"+account_id+"/authorizations/facebook/del";}
	

        },
        Satellital:{
            iridium: {
                max: 154,
                invalidCharacters: "[^0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz@$ !\"#'\n()*,+./:;<=>?\\-]"
            },
            "inmarsat-isat": {
                max: 154,
                invalidCharacters: "[^0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz@$ !\"#'\n()*,+./:;<=>?\\-|_%&^{}\\[\\]\\\\]"
            }
        }
    },
    Variables: {
        expeditionId: -1
    }
    
};
