if(top.frames.length == 0){
location.href="index.php?pg=" + location.pathname.substring(1,location.pathname.length);
};