For example instead 'func_header_location("cart.php?mode=checkout");' in your code:
Code:
$cart['checkout_step']=4;
func_header_location("cart.php?mode=checkout&paymentid=4");
Note: You should to know paymentid of the selected payment method (if you have more than one payment method).
But this is another question...