10
var url = "www.webiste.com/Services/allservices.html"
url = url.split("/");
alert(url[1]);
In the above example split the string url when find / (separator) and save it in an array. Then using the proper index, you can use the substring you wish (in the above example will alert Services).
Demo: http://jsfiddle.net/jcNSs/
More info for split() : https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/split