if (typeof(PlaceWidget) == "undefined") var PlaceWidget = {};
PlaceWidget['672885'] = {
    uid: '672885',
    content: "<br />\n<style type=\"text/css\">\nbody {\n    padding:0;\n    margin:0;\n    color:#5A5858;\n    font-family:Helvetica,Verdana,Arial,sans-serif;\n    font-size:12px;\n    background:#fff;\n}\n\na {\n    color:#fff;\n}\n\nbr {\n    display:none;\n}\n\n.clear {\n    clear:both;\n}\n\np {\n    margin:0;\n    padding:0;\n}\n\n#container {\n    width:200px;\n    border:1px solid #006ab6;\n    background:url(http://www.placewidget.com/static/images/widget_header_block.png) repeat-x;\n}\n\n#content {\n    padding:5px;\n}\n\n#footer {\n    height:25px;\n    background:url(http://www.placewidget.com/static/images/widget_footer.png) no-repeat center bottom #3369b2;\n}\n\n#credits {\n    text-align:center;\n    padding:5px 0 0;\n    background:#3369b2;\n}\n\nh1 {\n    text-indent:-9999px;\n    margin:0;\n    padding:0;\n    height:74px;\n    background:url(http://www.placewidget.com/static/images/widget_fsq_logo.png) no-repeat;\n}\n\nh2 {\n    margin:8px 0 4px;\n    padding:0;\n}\n\nh3 {\n    margin:8px 0 4px;\n    text-transform:uppercase;\n}\n\n.info {\n    \n}\n\n.divider {\n    height:10px;\n    margin-bottom:10px;\n    border-bottom:1px solid #888888;\n}\n\np.checkins {\n    margin-top:4px;\n}\n\n.mayor img {\n    float:left;\n    margin-bottom:10px;\n}\n\n.mayor .mayor-name {\n    float:left;\n    width:140px;\n    margin-left:5px;\n}\n\n.herenow a img {\n    border:none;\n}\n\n.tips p, .offers p {\n    margin-bottom:4px;\n}\n</style><div id=\"container\">\n    <h1>PlaceWidget</h1>\n    \n    <div id=\"content\">\n        <div class=\"info\">\n            <h2>The Temperamentals</h2>\n            <p class=\"address\">New World Stages, 340 West 50th Street</p>\n            <p class=\"address\">New York, NY 10019</p>\n            <p class=\"phone\">6468711730</p>\n            <p class=\"checkins\">16 checkins</p>\n        </div>\n        \n        \n        \n        \n        \n        \n        \n        \n        <div class=\"divider\"></div>\n        <div class=\"info tips\">\n            <h3>Tips</h3>\n            \n                <p><strong>Carl D.:</strong> A groundbreaking new play about the pre-Stonewall LGBT rights movement.</p>\n            \n        </div>\n        \n    </div>\n    \n    <div id=\"credits\"><a href=\"http://www.placewidget.com\" target=\"_blank\">Get your own widget!</a></div>\n    <div id=\"footer\"></div>\n</div>\n",
    width: 200,
    handle: undefined,
    is_ie: /MSIE/i.test(navigator.userAgent),
    
    getHandle: function(wrapper) {
        iframe = document.createElement('iframe');
        iframe.id = "placewidget_iframe_" + this.uid;
        iframe.scrolling = "no";
        iframe.style.width = this.width + "px";
        iframe.frameBorder = "no";
        wrapper.appendChild(iframe);
        
        iframe.doc = null;
        if(iframe.contentDocument)
            // Firefox, Opera
            iframe.doc = iframe.contentDocument;
        else if(iframe.contentWindow)
            // Internet Explorer
            iframe.doc = iframe.contentWindow.document;
        else if(iframe.document)
            // Others?
            iframe.doc = iframe.document;
        
        if(iframe.doc == null)
            return false;
        
        iframe.doc.open();
        iframe.doc.close();
        
        return iframe;
    },
    
    addContent: function(iframe) {
        div = iframe.doc.createElement('div');
        div.innerHTML = this.content;
        iframe.doc.body.appendChild(div);
    },
    
    resizeFrame: function() {
        if (!this.is_ie)
            this.handle.doc.getElementById('container').style.width = this.width - 2 + "px"
        this.handle.style.height = this.handle.doc.getElementById('container').offsetHeight + "px";
    },
    
    createWrapper: function() {
        document.write('<div id="placewidget_'+this.uid+'"></div>');
    },
    
    init: function() {
        this.createWrapper();
        wrapper = document.getElementById('placewidget_'+this.uid);
        this.handle = this.getHandle(wrapper);
        this.addContent(this.handle);
        setTimeout("PlaceWidget['672885'].resizeFrame()", 500);
    }
}

PlaceWidget['672885'].init();
