// JavaScript Document

var link = redirect(false);
//location.replace(link);
window.location = link;

function redirect(hash) {
	
		var protocol = location.protocol + "//",
		    host = location.host + "",
		    path = location.href.split(host)[1];
		
			//alert("host - " + host);
		

		if (hash) {
			path = path.replace(/#\/?/g, "");
		} else if (!(/\//.test(path.charAt(0)))) {
			path = "/" + path;
		}
		
		if (location.href.lastIndexOf('CMS') !=-1){
		//	alert("CMS");
			return location.href;
		
		}
		
		
		return (protocol + host + (hash ? "" : "/#") + path);

}