need help as iam newbee this programe is hanging on the middlle some times runs

Sounds like you want to use the Blink without delay method here, get rid of all the delays, make the program more responsive to button pushes.

unsinged long button1starttime;
void setup(){
// pinmodes, all that stuff
}
void loop(){
if ( (digital Read (button1) == 1) & (output1state == LOW) ) 
{  // if button is pressed, and LED1 is not currently on:
 button1starttime = millis(); // capture the time
output1state = HIGH;  // set a flag showing the new state
digitalWrite (output1pin, output1state); // change the state of the out pin
}
if ( (output1state == HIGH) & ( millis() >= (button1starttime + 1000) ) )  
{ // if the output is HIGH, and enough time has passed:
output1state = LOW; // set the flag showing the new state
digitalWrite (output1pin, output1state);  // change the state of the out pin
}
// repeat for the other buttons/inputs
}