Well if you are new in drupal I will explain it to you step by step:
first create a file in 'sites/all/themes/yourtheme/js/' called auto_redirection.js and inside of it paste the code above. (if you do not have the js folder just create one!)
create a file in 'sites/all/themes/yourtheme/templates' called webform-confirmation-'form id'.tpl.php without the quotes, optional you can just let it webform-confirmation.tpl.php and it will be applied to all the webforms confirmations.
go to 'sites/all/modules/webform/templates/webform-confirmation.tpl.php' and copy the content of that file and paste it into your own webform-confirmation-'form id'.tpl.php you already created.
3.Inside the file webform-confirmation-'form id'.tpl.php just add this at the end
drupal_add_js(drupal_get_path('theme', 'yourtheme') . '/js/auto_redirection.js');
do not forget to replace 'yourtheme' for the name of your theme or subtheme... and put the php tags for the above code, for some reason I cannot write the php tags here jeje.
Thats all you need hope it helps someone