The problem is, something to do with global conflicts the global object has a property called name and is somehow conflicting with your code.
rename it http://jsfiddle.net/j667q/3/
you could do var name = ...split...
if you don't want to rename it
Yeah, also note, you should ALWAYS declare variables with var
there is no reason not to, if you want a global property do window.someName = something;