// JavaScript Document
<!--
//To get the page name
<!--
//var fileName = location.pathname.substring(location.pathname.lastIndexOf('/')+1)
var fileName = location.href;
chk_Q = fileName.indexOf("?");

/*This code is to detect '?' sign in URL - starts here*/
if(chk_Q == -1){
fileName = location.href;
}else{
fileName = fileName.substring(0,chk_Q);
}

/*This code is to detect '?' sign in URL - ends here*/

sperator = '/'
var fileNameArray = fileName.split(sperator);
filenameVar = fileNameArray[fileNameArray.length-1].split('.');
foldernameVar = fileNameArray[fileNameArray.length-2];

foldernameVarNew = foldernameVar.replace(/%20/g," ");