teste js se eu estiver no iframe

function inIframe () {
    try {
        return window.self !== window.top;
    } catch (e) {
        return true;
    }
}
Abs Zarzis