function preventMultiFrames(){
// prevent pages from being within iframes

var thisF= this.window
var allF = parent.top.frames;
for(var i=0;i<allF.length;i++) {
  if(allF[i]==thisF){
    var frameName=allF[i].name; // this is the variable you are looking for
    if (frameName == "ss_frame") {
      top.location.href = document.location.href ;
    }
  }
}
}

function loadPageInFrame( address ) {
  targetPage = document.getElementById("ss_frame");
  targetPage.src = address;
}

