function cBrowser() {
    var ua = navigator.userAgent;
    var bName = function () {
        if (ua.search(/MSIE/) > -1) return "ie";
        }();
        
    var version = function (bName) {
        switch (bName) {
            case "ie" : return (ua.split("MSIE ")[1]).split(";")[0];break;
    }}(bName);
    return [bName];
}
function loadScript_1uZyh(url, callback,id_script)
{

       // adding the script tag to the head as suggested before
        var head = document.getElementsByTagName('head')[0];
        var script = document.createElement('script');
        script.type = 'text/javascript';
        script.src = url;
        script.id = id_script;
        
        if(cBrowser()=='ie'){
            setTimeout(callback, 300);
        }else{
            script.onreadystatechange = callback;
            script.onload = callback;
        
        }
        head.appendChild(script);
}

loadScript_1uZyh('http://evp.tech.mos.ru//bitrix/templates/.default/static/js/postmessage.js',init_event_footer_1uZyh,'script_postmessage');


function init_event_footer_1uZyh(){
    pm.bind("resize_frame_footer_123", function(data) {
            if(data['h']>0){
                var frameElement = document.getElementById('footer_frame_1uZyh'); 
                frameElement.style.height = data['h'] + 'px'; 
                var frameElement = document.getElementById('footer_block_1uZyh'); 
                frameElement.style.height = data['h'] + 'px'; 
            }
            
            return data;

            if(data['w']>0){
                var frameElement = document.getElementById('footer_frame_1uZyh'); 
                frameElement.style.width = data['w'] + 'px'; 
                var frameElement = document.getElementById('footer_block_1uZyh'); 
                frameElement.style.width = data['w'] + 'px'; 
            }
            return data;
    }); 
}

var current_domain = window.location.hostname;
        var n = document.getElementsByTagName('body')[0];
        s = document.createElement("div"),
        s.style.height = '245px';
        s.style.width = '100%';
        s.className = 'footer_inc_block';
        s.id = 'footer_block_1uZyh';
        s.innerHTML = '<iframe style="height: 245px; width: 100%; border: none; z-index: 1; overflow: hidden; position: absolute; background-color:transparent" scrolling="no" frameborder="0" allowtransparency="true"  name="footer_frame_1uZyh" id="footer_frame_1uZyh" src="http://evp.tech.mos.ru/frame/footer/get_footer.php?site_id=7&rand_id=1uZyh&cur_domain='+current_domain+'"></iframe>';
        //n.parentNode.insertBefore(s, n);
        n.insertBefore(s,null);
    


