SW.tools.AtlasAds = {
    outputIframe: function (iframeParams) {
        var iFrame = document.createElement("iframe");
        var dateIdentifier = new Date();
        var frameIdName = iframeParams.frameIdName || "atlasAdframe_"+(dateIdentifier.getHours()
            +""+dateIdentifier.getMinutes()
            +""+dateIdentifier.getSeconds());
        iFrame.setAttribute("name",frameIdName);
        iFrame.setAttribute("id",frameIdName);
        iFrame.frameBorder = "0";
        iFrame.style.border = "none";
        iFrame.scrolling = "no";
        iFrame.marginHeight = "0";
        iFrame.marginWidth = "0";
        iFrame.topMargin = "0"; 
        iFrame.leftMargin = "0";
        iFrame.bottomMargin = "0";
        if(iframeParams.allowTransparency) {
            iFrame.allowTransparency = iframeParams.allowTransparency;
            iFrame.setAttribute("allowtransparency",iframeParams.allowTransparency);
        }
        if(iframeParams.height) {
            iFrame.height = iframeParams.height;
        }
        if(iframeParams.width) {
            iFrame.width = iframeParams.width;
        }

        iFrame.src  = iframeParams.urlPrefix
                        + "://view.atdmt.com/SWI/iview/"
                        + iframeParams.decodedTagId
                        + "/direct/01?click=";

        if(iframeParams.containerElement) {
            iframeParams.containerElement.appendChild(iFrame);
            /* the following code will be needed for IE loading issues, if no containerElement is supplied, add code where needed */
            if (window.frames[iFrame.name]) {
              window.frames[iFrame.name].location = iframeParams.urlPrefix
                                                    + "://view.atdmt.com/SWI/iview/"
                                                    + iframeParams.decodedTagId
                                                    + "/direct/01?click=";
            }
        }

        return iFrame;
    }
}