var hide_evp_poll_on_main;console.log('Site not exist. Id = 7');
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 ieLoadBugFix(scriptElement, callback){
		if (scriptElement.readyState=='loaded' || scriptElement.readyState=='completed') {
			 callback();
		 }else {
			 setTimeout(function() {ieLoadBugFix(scriptElement, callback); }, 100);
		 }


}

function loadScript_WZ0MV(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'){
			ieLoadBugFix(script, callback);
		}else{
			script.onreadystatechange = callback;
			script.onload = callback;
		
		}

		head.insertBefore(script, head.firstChild);
}

function init_event_vote_WZ0MV(){
/*
if (!this.executed) { // выполнится только один раз
	this.executed = true;
}
*/

	pm.bind("resaiz_frame_vote_WZ0MV", function(data) {
			if(data['param_h']>0){
				var frameElement = document.getElementById('vote_frame_WZ0MV'); 
				frameElement.style.height = data['param_h'] + 'px'; 
				var frameElement = document.getElementById('vote_block_WZ0MV'); 
				frameElement.style.height = data['param_h'] + 'px'; 
			}
			if(data['param_w']>0){
				var frameElement = document.getElementById('vote_frame_WZ0MV'); 
				frameElement.style.width = data['param_w'] + 'px'; 
				var frameElement = document.getElementById('vote_block_WZ0MV'); 
				frameElement.style.width = data['param_w'] + 'px'; 
			}
			return data;
	}); 
}


loadScript_WZ0MV('//poll.mos.ru//bitrix/templates/.default/static/js/postmessage.js',init_event_vote_WZ0MV,'script_postmessage_vote');

