<Script language="JavaScript"> function my_function(){ alert("Hi"); } </Script>
Here I created a function called my_function which will display "Hi" when used. The parenthesis next the name of the function are used to send any information the function might need, since this one doesn't need any extra information, I didn't write anything between them. Lets see an example that uses the parenthesis:
<Script language="JavaScript"> function my_function(text){ alert(text); } </Script>
Now to use this function, you must send it some information, whatever you send it will be displayed.