this_url = location.href;
if ( this_url.indexOf( "WebSite" ) != -1 ) {
  rootpath = this_url.replace( /WebSite.*/, "WebSite" );
  actualpath = this_url.substr(0, this_url.lastIndexOf("/")+1);
} else {
  //rootpath = "http://" + window.location.hostname;
  rootpath = "";
  actualpath = "";
}

