parametric func() selection in tag depending on argument parameter in html

I have an index.html running a menu

<a href='./satellites.html'> 
<a href='./simulation.html'>

The two files (satellites.html and simulation.html) are almost the same with the only difference in the function that is called when loaded

<!-- in the satellites.html-->
<body onload='init()'>            
...

and 
<!-- in the simulation.html-->
<body onload='initSimulation()'>  
...

Otherwise, the two HTML programs are identical.

Everything works fine but I want to avoid repeating the same code. How can the server control which function the client will call (using URL parameters probably)? I searched but it seems that the header is not available neither in HTML or in javascript.