Its called parameter. You do not have to declare it in your program. You just use it inside your function. When you call the function, you insert what is called an argument instead of the parameter. Now the function replaces the parameter inside itself with the argument. Here is a short example to make it easier to understand:
testFunction("Message"); // alerts "Message"
testFunction("Another Message"); //alerts "Another message"
var myString = "The third message";
testFunction(myString); //alerts "The third message";
function testFunction(myValue){
alert(myValue);
}
It does not matter if you put the functions at the start or at the end of the program, they still load at the start. I suggest to put them at the end, and with suggestive names, so when you later read your code, you can see at a glance what it does.
Andrei
My Envato portfolio.