url-file-name
var splitAt=location.href.lastIndexOf('\\\\') > location.href.lastIndexOf('/') ? location.href.lastIndexOf('\\\\') : location.href.lastIndexOf('/'); var filename= location.href.substr(splitAt+1,location.href.length);