Servo and photoresistor

Hey Fellas =)

For a school project i wanna control a Servo with a photoresistor. My problem is that i want the servo be at the one or the other end depending on the photoresistor. it's kinda like if and else.
That's the scheme i got in mind: Photoresistor blocked -> servo is at one ende; photoresistor not blocked -> servo is at the other end.

hope you guys can help me with this pretty easy thing... im not into coding that much, i like to build things not program them =)

greetings SheeP

You possibly could use something like below, placing the photo resistor between the button pin and ground.

//zoomkat servo button test 7-30-2011

#include <Servo.h>
int button1 = 4; //button pin, connect to ground to move servo
int press1 = 0;
Servo servo1;

void setup()
{
  pinMode(button1, INPUT);
  servo1.attach(7);
  digitalWrite(4, HIGH); //enable pullups to make pin high
}

void loop()
{
  press1 = digitalRead(button1);
  if (press1 == LOW)
  {
    servo1.write(160);
  }
  else {
    servo1.write(20);
  }
}

You possibly could use something like below

Except that a photoresistor is an analog device. Replace digitalRead with analogRead, after connecting the photoresistor to an analog pin, and the "== LOW" with ">= threshold". Define threshold however you wish to make the servo move at the appropriate light level.