// load the parent frame if needed

if(parent==self){
targetfile=this.location.href;
top.location.replace('../index_sm.html?'+targetfile);
} 