Combining sketchs for IRremote and Joystick servo control

I was wondering how i could combine two sketches so that i can control 2 servos using a joystick and two more servos using a remote. I have a sketch for each of them but I do not know how to put the sketches together so that they work

Joystick Sketch

#include <Servo.h>
Servo tilt, pan;
int joyX = A0;
int joyY = A1;
int x, y;

void setup() {
tilt.attach(9);
pan.attach(10);
}

void loop() {
x = joyX;
y = joyY;
x = map(analogRead(joyX), 0, 1023, 900, 2100);

y = map(analogRead(joyY), 0, 1023, 900, 2100);
tilt.write(x);
pan.write(y);
delay(15);
}

IRremote sketch

#include <boarddefs.h>
#include <IRremote.h>
#include <IRremoteInt.h>
#include <ir_Lego_PF_BitStreamEncoder.h>

#include <Servo.h>
#include <IRremote.h>

unsigned long Value1 = 0xFF18E7;
unsigned long Value2 = 0xFF4AB5;
unsigned long Value3 = 0xFF5AA5 ;
unsigned long Value4 = 0xFF10EF;

int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;

Servo servo1;
Servo servo2;

void setup() {
Serial.begin(9600);
irrecv.enableIRIn();
servo1.attach(8);
servo2.attach(7);
}

void loop() {

joystick.ino (436 Bytes)

Hi,

HERE are some suggestions: