I have tried to add the javascript links in the way it says in many
tutorials like:
<?php
echo ($javascript->link('prototype'));
echo ($javascript->link('scriptaculous'));
?>

But everytime it throws up an error?

Notice: Undefined variable: javascript in E:\xampp\htdocs\portfolio\app
\views\layouts\default.thtml on line 10

Fatal error: Call to a member function link() on a non-object in E:
\xampp\htdocs\portfolio\app\views\layouts\default.thtml on line 10

Edit.........

Nevermind found it you need to create app_controller.php in the app directory and then

<?php
class AppController extends Controller {
var $helpers = array('Html', 'Javascript');
}
?>