First of all I would like to make a note that you have posted this in the wrong forum and I have moved it to the correct forum.

Now about your query the redirect that you are doing is a JavaScript errors and it has its advantages and disadvantages. The disadvantages are the search engine bots dont read the javascript and so they will not be redirected to the destination page and they will be getting page as blank and so may consider your site as not a site of good content. So its always good to show the same thing to the user as well as to the SE bots. NBow if there is any specific requirements like detect the user country and redirecting him then thats fine Script.

Also if you are looking for a redirect then I would suggest go for permanent redirect as that helps in gaining Page Rank as well as backlinks to a page.