Can't get motor timings to work.

I am not used to programming, and need a bit of help with this.
The problem i got is that i want "motor1" to run for 1 second and when it has run for one second it turns off, and then "motor2" runs for 1 second. But what happends right now is that "motor1" will run for 2 seconds and when it has run for 1 second "motor2" starts and runs for 1 second.
It is a bit hard to explain, but i hope you understand what i am asking for. Is there some type of command i can put between the loops to make the first engine stop or something like that?

void motor1loop()                          
{
digitalWrite(motor1fwd, HIGH);
digitalWrite(motor1rev, LOW);
delay(1000);
}       

   void motor2loop()                        
{
int lightLevel3 = analogRead(fotodiod3);      
int lightLevel4 = analogRead(fotodiod4);
lightLevel3 = map(lightLevel3, 0, 1023, 0, 255);   
lightLevel4 = map(lightLevel4, 0, 1023, 0, 255);
int y = lightLevel3 - lightLevel4; 
{
if  (y < -25)                         
{
   digitalWrite(motor2fwd, HIGH);
digitalWrite(motor2rev, LOW);
delay(1000);
}  
else if (y > 25)
{
    digitalWrite (motor2fwd, LOW);
digitalWrite(motor2rev, HIGH);
delay(1000);
}  
else  
{
    analogWrite (motor2fwd, LOW);
analogWrite(motor2rev, LOW);
delay(1000);
}

Did you include all your code?
I do not see any setup or loop functions.
I do not know what all your variables are initialized to.

Is there some type of command i can put between the loops to make the first engine stop or something like that?

Of course. The command to turn the motor on is digitalWrite(motor1fwd, HIGH);. The command to turn it off is digitalWrite(motor1fwd, LOW);. Put this at the end of motor1loop(), and the motor will stop.