var urlz = document.location; cat71 = "http://localhost/catalog/71/", if(urlz.href.indexOf(cat71) != -1)