Thx and sry MrGuest and VeT.

I have edited my post just now.

The function menu_detail is put into the option panel.
Var detail you will see here:switch(detail)
so i think, it s right.
(I have had copy the Syntax example of (switch/ case)
function by the Rudy Game)

I have cleared all code what i don t need to show you.
Here is my code with the Main function:

Code:
var game_started = 0; // will be set to 1 when the game is started
var detail;

#define DETAIL_LOW 		0
#define DETAIL_MEDIUM 	        1
#define DETAIL_HIGH		2


//SStrings
STRING* UT_wmb = "unreal_Aussenlvl1.WMB";

//Function
function mouse_over();

//Main
function main()
{
	fps_max = 60;
	video_mode = 8; 				
	video_depth = 32; 
	video_screen = 1; 
        mouse_spot.x = 1; 
	mouse_spot.y = 1; 

        detail = DETAIL_HIGH; //set to high mode at the beginning
        set (main_pan, VISIBLE);

        vec_set (camera.x, nullvector); // move the camera to the origin
	while (game_started == 0) // this loop runs until the player presses the "New game" button
	{
		camera.pan += 0.1 * time_step; // rotate the camera gently
		camera.tilt += 0.02 * time_step; // on all the axis
		camera.roll += 0.05 * time_step;
		wait (1);
	}
	
}

//function start if pressed the start button on main pan
function start_game() 
{ 

	fps_max = 100;
	reset (main_pan, VISIBLE); 
	
	game_started = 1;
	mouse_mode = 0; 

		wait (1);
	}
	 
	preload_mode = 2;
	
	level_load (UT_wmb); // now load the real level
	wait (3);

	camera.z = 250; // set the camera up high
	camera.tilt = -90; // and then make it look down
}

function mouse_over() // this function runs when we move the mouse over one of the buttons on the panel
{
	snd_play (mouseover_wav, sound_vol, 0);
}	

function mouse_startup() // displays the mouse pointer
{
	mouse_mode = 2;
	mouse_map = cursor_tga;
	while (game_started == 0) // this loop runs until the game is started
	{
		vec_set(mouse_pos, mouse_cursor);
		wait (1); 		      
	}   
}



//the menue codes

PANEL* main_pan = 
{
	bmap = main_tga;
	layer = 20;
	pos_x = 0; 
	pos_y = 0; 
	//button = 52, 28, load1_pcx, load1_pcx, load2_pcx, NULL, NULL, mouse_over;
	//button = 45, 87, save1_pcx, save1_pcx, save2_pcx, NULL, NULL, mouse_over;
	button = 250, 350, new1_pcx, new1_pcx, new2_pcx, start_game, NULL, mouse_over;
	button = 350, 450, options1_pcx, options1_pcx, options2_pcx, set_options, NULL, mouse_over;		
	button = 390, 640, quit1_pcx, quit1_pcx, quit2_pcx, quit_game, NULL, mouse_over;
	button = 380, 550, Help1_tga, Help1_tga, Help2_tga, NULL, NULL, mouse_over;

	flags = OVERLAY;		
}

PANEL* options_pan = 
{
	bmap = options_tga;
	layer = 30; 
	pos_x = 0;
	pos_y = 0;
	
	button_radio = 550, 400, low1_tga, low1_tga, low2_tga,menu_detail, NULL, NULL;
	button_radio = 610, 400, med1_tga, med1_tga, med2_tga,menu_detail, NULL, NULL;
	button_radio = 670, 403, high1_tga, high1_tga, high2_tga,menu_detail, NULL, NULL;
	
	flags = OVERLAY;
}


// var detail for menue_detail, set in PANEL* options_pan
void menu_detail(var buttonNr)
{
	detail = buttonNr -1;
}

void detail_einstellungen()
{
	switch(detail)
	{
		case DETAIL_LOW:			button_state(options_pan, 1,1);break;
		case DETAIL_MEDIUM:		button_state(options_pan, 2,1);break;
		case DETAIL_HIGH:			button_state(options_pan, 3,1);break;
	}
}


//set Material 
//Detailmapping
//ENABLE_RENDER flag for switch material 

MATERIAL* detail_test1 =
{
	effect = "detail_x.fx";
	event = detail_event;
	flags = ENABLE_RENDER;
}
MATERIAL* detail_test2 =
{
	effect = "empty_technique.fx";
	event = detail_event;
	flags = ENABLE_RENDER;
}


action detail_event()
{
	if(detail == DETAIL_HIGH)
	{
		wait(1);
		my.material = detail_test1;
		my.ambient = 90;
		return; 			
	}
	/*
	else
		if(detail == DETAIL_MEDIUM)
		{
			wait(1);
			detail_test2 = mtl_create();
			return;
			 
		}else 
			if(detail == DETAIL_LOW)
			{
				wait(1);
				detail_test2 = mtl_create();
				return;
				
			}	
			*/
			
	reset(my, DYNAMIC);
	//my.ambient = 90;
}