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_we5Kd(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_we5Kd('http://evp.tech.mos.ru//bitrix/templates/.default/static/js/postmessage.js',init_event_footer_we5Kd,'script_postmessage');


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

            if(data['w']>0){
                var frameElement = document.getElementById('footer_frame_we5Kd'); 
                frameElement.style.width = data['w'] + 'px'; 
                var frameElement = document.getElementById('footer_block_we5Kd'); 
                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_we5Kd';
        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_we5Kd" id="footer_frame_we5Kd" src="http://evp.tech.mos.ru/frame/footer/get_footer.php?site_id=82&rand_id=we5Kd&cur_domain='+current_domain+'"></iframe>';
        //n.parentNode.insertBefore(s, n);
        n.insertBefore(s,null);
    


