Split URl Functions:

I have long urls that i want to display on a table on multiple lines (don't ask me why, it just has to be done like that i have no say on that one lol), i would to write a javascript function that insert spaces into that url so when displaying a very long one, it could be broken between 2 or more lines...

Original url: "http://www.website.com/dir1/dir2/dir4/thefile.html"
My final string should be: "http://"http://www.website.com /dir1 /dir2 /dir4 /thefile.html

i was thinking of using the split method to do this, but i am not sure it can be done that way...

Anyone with hint?