
if(!jQuery){var jQuery=false;}
(function(){broco={};if("undefined"==broco.libLoading){broco.libLoading=false;}
broco_<?=$this->informerName;?>={};var doc=window["document"]||null;var scriptId='<?= $this->informerName; ?>',scriptPath='<?= $this->informerPath; ?>',charset='<?= $this->charset; ?>',fullUrl='<?= $this->fullUrl; ?>',_interval=false,_libIsLoad=false,_startTimer=null,_updateTimer=null;var id='informer_'+scriptId;ins=function(){t='<h1>04.02.2012. Время новостей по Москве(MSK)</h1><ul><li ><b>01:55</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>01:53</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>01:50</b>&#187;<a href="<?= $this->fullUrl; ?>#dj<?= $item->getId(); ?>" class="zoom">Межбанковские валютные курсы на 01:50 по Гринвичу</a><? else : ?>Межбанковские валютные курсы на 01:50 по Гринвичу<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>01:27</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>01:25</b>&#187;<a href="<?= $this->fullUrl; ?>#dj<?= $item->getId(); ?>" class="zoom">Фондовые индексы мира на 01:25 по Гринвичу</a><? else : ?>Фондовые индексы мира на 01:25 по Гринвичу<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>01:20</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>01:10</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>01:10</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>01:10</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>01:10</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>00:58</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>00:58</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>00:58</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>00:58</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>00:57</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>00:57</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>00:57</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>00:50</b>&#187;<a href="<?= $this->fullUrl; ?>#dj<?= $item->getId(); ?>" class="zoom">Межбанковские валютные курсы на 00:50 по Гринвичу</a><? else : ?>Межбанковские валютные курсы на 00:50 по Гринвичу<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>00:45</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>00:44</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>00:43</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>00:43</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>00:38</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>00:37</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>00:35</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>00:34</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>00:34</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>00:30</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>00:30</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>00:26</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>00:25</b>&#187;<a href="<?= $this->fullUrl; ?>#dj<?= $item->getId(); ?>" class="zoom">Фондовые индексы мира на 00:25 по Гринвичу</a><? else : ?>Фондовые индексы мира на 00:25 по Гринвичу<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>00:17</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>00:16</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>00:10</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>00:10</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>00:10</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>00:10</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>00:06</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li ><b>00:05</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li class="i"><b>00:01</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li><li class="i"><b>00:01</b>&#187;<div id="dj<?= $item->getId(); ?>" class="hide"><?= $item->getHtmlText(); ?></div></li></ul>';doc.getElementById(id).innerHTML=normilizeHtml(t);loadLib();};function sendRequest(){var script=doc.createElement('script');script.setAttribute('type','text/javascript');script.setAttribute('src','<?= $this->httpBase; ?>/informers/'+scriptPath+'/'+charset+'.json');doc.getElementsByTagName('head')[0].appendChild(script);}
function normilizeHtml(t){while(t.indexOf('%n')>=0)t=t.replace('%n',"\n");while(t.indexOf('%t')>=0)t=t.replace('%t',"\t");while(t.indexOf('&amp;#')>=0)t=t.replace('&amp;#',"&#");return t}
function loadLib(){if((typeof jQuery=="undefined"||!jQuery)&&!broco.libLoading){broco.libLoading=true;var script=doc.createElement('script');script.setAttribute('type','text/javascript');script.setAttribute('src','http://files.brocompany.com/js/jquery/jquery-1.3.2.min.js');<??>doc.getElementsByTagName('head')[0].appendChild(script);}
_startTimer=setInterval(init,1000);}
if(window.addEventListener){window.addEventListener("load",ins,false);}else{window.attachEvent("onload",ins);}
function init(){if(jQuery){clearInterval(_startTimer);_updateTimer=setInterval(sendRequest,_interval||30000);}}
function template(o){str='<li'+(o.important?' class="i"':'')+'>';str+='<b>'+o.date+'</b>';str+=' ';if(o.htmlText){str+='<a href="'+fullUrl+'#dj'+o.id+'" class="zoom">';str+=o.title+'</a>';str+='<div id="dj'+o.id+'" style="display: none">';str+=normilizeHtml(o.htmlText)+'</div>'}else{str+=o.title;str+='<div id="dj'+o.id+'" style="display: none"></div>'}
str+='</li>';return str;}<?=$this->informerName?>.update=function(r){if(jQuery){var prepended=false
jQuery.each(r.items.reverse(),function(i,item){if(!jQuery('#dj'+item.id).length){jQuery('#'+id+' > ul').prepend(template(item))
prepended=true;}})
if(prepended){jQuery('.zoom').fancyZoom();}};}
function init(){if(jQuery){clearInterval(_startTimer);_uploadTimer=setInterval(sendRequest,15000);jQuery.fn.fancyZoom=fancyZoom;jQuery('.zoom').fancyZoom();}}
function fancyZoom(o){var zooming=false,o=o||{};o.width=600;o.height=400;o.closeOnClick=true;if(jQuery('#zoom').length==0){var html='<div id="zoom"> \
                                <a href="#" id="zoom_close"> \
                                    Close \
                                </a> \
                                <div id="zoom_content"> \
                                </div> \
                        </div>';jQuery('body').append(html);jQuery('html').click(function(e){if(jQuery(e.target).parents('#zoom:visible').length==0)hide();});jQuery(document).keyup(function(event){if(event.keyCode==27&&jQuery('#zoom:visible').length>0)hide();});jQuery('#zoom_close').click(hide);}
var zoom=jQuery('#zoom');var zoom_close=jQuery('#zoom_close');var zoom_content=jQuery('#zoom_content');this.each(function(i){jQuery(this).click(show);});return this;function show(e){if(zooming)return false;zooming=true;itemId=jQuery(this).attr('href').split('#');var content_div=jQuery('#'+itemId[1]),zoom_width=o.width>content_div.width()?content_div.width():o.width,zoom_height=o.height>content_div.height()?content_div.height():o.height;var width=window.innerWidth||(window.document.documentElement.clientWidth||window.document.body.clientWidth),height=window.innerHeight||(window.document.documentElement.clientHeight||window.document.body.clientHeight),x=window.pageXOffset||(window.document.documentElement.scrollLeft||window.document.body.scrollLeft),y=window.pageYOffset||(window.document.documentElement.scrollTop||window.document.body.scrollTop);var window_size={'width':width,'height':height,'x':x,'y':y}
var width=zoom_width+20,height=zoom_height+20,d=window_size;zoom_content.css({height:height})
var newTop=Math.max((d.height/2)-(height/2)+y,0),newLeft=(d.width/2)-(width/2),curTop=e.pageY,curLeft=e.pageX;zoom_close.attr('curTop',curTop).attr('curLeft',curLeft);jQuery('#zoom').hide().css({position:'absolute',top:curTop+'px',left:curLeft+'px',width:'1px',height:'1px'});zoom_close.hide();if(o.closeOnClick){jQuery('#zoom').click(hide);}
zoom_content.html('');jQuery('#zoom').animate({top:newTop+'px',left:newLeft+'px',opacity:"show",width:width,height:height},500,null,function(){jQuery
zoom_content.html(content_div.html());zoom_close.show();zooming=false;})
return false;}
function hide(){if(zooming)return false;zooming=true;jQuery('#zoom').unbind('click');zoom_content.html('');zoom_close.hide();jQuery('#zoom').animate({top:zoom_close.attr('curTop')+'px',left:zoom_close.attr('curLeft')+'px',opacity:"hide",width:'1px',height:'1px'},500,null,function(){zooming=false;});return false;}}})();
