// SECURITY ISSUE FIX // CG 19/08/10 // CG MOD 21/09/10 // Prevents clickjacking by not allowing the site to be part of a frame // Exception added for ko-admin // Suppresses javascript error: line 17 - cannot assign to a function result function silentErrorHandler() {return true;} window.onerror=silentErrorHandler; var strsiteroot = 'http://www.witch-wood.co.uk/'; var baseurl = getBaseURL(); // Check that the site root contains the baseurl var result = strsiteroot.indexOf(baseurl); if(parseInt(result)=-1);{ // it doesn’t if (top!=self) top.location.href=self.location.href; } function getBaseURL() { var url = location.href; // entire url including querystring - also: window.location.href; var baseURL = url.substring(0, url.indexOf('/', 14)); return baseURL + "/"; }