first you make a function which loads your level:

function open_level()
{
level_load("yourlevel.wmb");
}

and in the panel code you create the button, and assign the open_level function to it:

button(x, y, bmapOn, bmapOff, bmapOver, open_level, functionOff, functionOver);


Check out the throwing game here: The throwing game