"undefined"==typeof window.PC_Domain&&(window.PC_Domain="n.pay-click.ru");window.PC_SubId="undefined"==typeof window.PC_SubId?"":"&sub_id="+escape(window.PC_SubId);"undefined"==typeof window.PC_AdParams&&(window.PC_AdParams="");"undefined"==typeof window.PC_WType&&(window.PC_WType=1);
"undefined"==typeof window.AW_TBlock&&(window.AW_TBlockObject=function(){},window.AW_TBlockObject.prototype={C:"PC_TBlock",q:function(){var a=[],b=null,b=void 0==document.getElementsByClassName?document.getElementsByTagName("div"):document.getElementsByClassName(this.C);for(i=0;i<b.length;i++)RegRes=b[i].id.match(/PC_Teaser_Block_(\d+)/i),null!==RegRes&&a.push(RegRes[1]);return a},A:function(){var a=[],b=[];a.RNum=Math.floor(1E4*Math.random());a.hours=(new Date).getHours();a.BlockIds=escape(this.q().join(","));
a.Referer=escape(document.referrer.substring(0,1E3));for(var c in a)a.hasOwnProperty(c)&&b.push(c+"="+a[c]);return b.join("&")},H:function(a){var b="http://"+window.PC_Domain+"/adv_out.php?Id="+window.PC_CId+window.PC_SubId+window.PC_AdParams+"&from_static=1&"+window.AW_TBlock.A();2==a?(a=document.createElement("script"),a.src=b,document.body.appendChild(a)):document.write('<script language="javascript" type="text/javascript" src="'+b+'"><\/script>')}},window.AW_TBlock=new window.AW_TBlockObject);
window.AW_TBlock.H(window.PC_WType);"undefined"==typeof window.SC_TBlock&&(window.SC_InfinitIterator=function(a){this.n=a;this.e=0;this.m=a.length},window.SC_InfinitIterator.prototype={next:function(){var a=this.n[this.e];this.e++;this.e==this.m&&(this.e=0);return a}},"undefined"==typeof window.SC_UserAgent&&(window.SC_UserAgent=function(){},window.SC_UserAgent.prototype={f:function(){return navigator.userAgent.toLowerCase()},i:function(){return-1!=this.f().indexOf("chrome")},u:function(){return-1!=this.f().indexOf("msie")&&!this.v()},
v:function(){return-1!=this.f().indexOf("opera")},B:function(){return!this.i()&&!this.u()}}),window.SC_TBlockObj=function(){this.D=new window.SC_UserAgent},window.SC_TBlockObj.prototype={domain:"http://domain.com",i:function(){return this.f().indexOf("chrome")!=-1},w:function(){var a=this.b.params;if(a){var b=0,c="",d;for(d in a){var e=d,j=a[d];b++;c=b==1?c+("?"+e+"="+j):c+("&"+e+"="+j)}}return c},link:function(a,b,c,d){return this.domain+"/click/"+b+"/"+c+"/"+d+"/"+this.w()},j:function(a){var b=
[],a=a||"";b.push("font-family:"+this.b.code["code_"+a+"font_family"]);b.push("font-size:"+this.b.code["code_"+a+"font_size"]+"px");b.push("color:#"+this.b.code["code_"+a+"font_color"]);b.push(this.fontWeight(this.b.code["code_"+a+"font_bold"]));b.push(this.l(this.b.code["code_"+a+"font_underline"]));return b.join("; ")},fontWeight:function(a){var b="font-weight:normal";a==1&&(b="font-weight:bold");return b},l:function(a){var b="text-decoration:none";a==1&&(b="text-decoration:underline");return b},
textAlign:function(){var a="text-align:none";switch(this.b.code.code_text_h_align){case 1:a="text-align:left";break;case 2:a="text-align:center";break;case 3:a="text-align:right"}return a},g:function(){var a="vertical-align:none";switch(this.b.code.code_text_v_align){case 1:a="vertical-align:top";break;case 2:a="vertical-align:middle";break;case 3:a="vertical-align:bottom"}return a},r:function(){var a=this.b.code.code_image_border_size,b=this.b.code.code_image_border_color,c=this.b.code.code_image_margin,
d=this.b.code.code_image_size,e=[];a!==0?e.push("border:"+a+"px solid #"+b):e.push("border:none");c!==0&&e.push("margin:"+c+"px");if(d){e.push("width:"+d+"px");e.push("height:"+d+"px")}return e.join("; ")},z:function(){var a=[],b="",c=this.b.code.code_border_size;c!==0?this.b.code.code_border_color&&(b="border:"+c+"px solid #"+this.b.code.code_border_color):b="border: none";a.push(b);this.b.code.code_background_color&&a.push("background-color:#"+this.b.code.code_background_color);return a.join("; ")},
k:function(){var a=this.b.code.code_background_color_hover,b=[];b.push("color:#"+this.b.code.code_font_color_hover);b.push(this.fontWeight(this.b.code.code_font_bold_hover));b.push(this.l(this.b.code.code_font_underline_hover));b.push("font-family:"+this.b.code.code_font_family_hover);b.push("font-size:"+this.b.code.code_font_size_hover+"px");var c="";a&&(c=c+("#"+this.d+"_Table:hover {background: #"+a+" !important}"));c=c+("a."+this.d+"_title:link {"+this.j()+"}");c=c+("a."+this.d+"_title:hover {"+
b.join("; ")+"}");return c=c+("a."+this.d+"_title-hover {"+b.join("; ")+"}")},h:function(a,b){var c="";return c=b==1?this.d+"_"+a+"_link":this.d+"_"+a},c:function(a,b,c){a=document.createElement(a);if(b)for(var d in b)d=="style"?a.style.cssText=b[d]:a.setAttribute(d,b[d]);if(c)a.innerHTML=c;return a},t:function(a,b){document.getElementById(a+"_link").setAttribute("class",b+"_title-hover")},s:function(a,b){var c=document.getElementById(a+"_link");if(c){c.removeAttribute("class");c.setAttribute("class",
b+"_title")}},F:function(a){return!a.match(/:\/\//)?"http://"+a:a},o:function(a,b,c,d){var c=this.c("a",{href:b.lb_click_url,title:b.lb_title,"class":this.d+"_title",className:this.d+"_title",id:this.h(d,1),target:"_blank",rel:"nofollow"},b.lb_title),e=this.c("a",{href:b.lb_click_url,target:"_blank",title:b.lb_title,rel:"nofollow"}),d=this.c("img",{src:this.F(b.lb_img_url),alt:b.lb_title,style:this.r(),id:this.h(d),onmouseover:"window.SC_TBlock.imgMouseOver(this.id, '"+this.d+"')",onmouseout:"window.SC_TBlock.imgMouseOut(this.id, '"+
this.d+"')"}),j=this.c("tbody"),l=this.c("table",{cellspacing:0,cellpadding:0,border:0,width:"auto"}),f=this.c("tr"),g=this.c("tr"),h=this.c("td",{style:this.textAlign()+"; "+this.g()}),k=this.c("td",{style:this.textAlign()+"; "+this.g()});switch(a){case 1:this.a(h,c);this.a(f,h);this.a(j,f);this.a(e,d);this.a(k,e);this.a(g,k);this.a(j,g);break;case 2:if(typeof this.b.code.code_more_font_family==="string"){a=this.c("tr");g=this.c("td",{style:"text-align:right; vertical-align:bottom"});b=this.c("a",
{href:b.lb_click_url,target:"_blank",title:"\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435",style:this.j("more_")+"; margin:10px"},"\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435 &raquo;");k.setAttribute("rowspan",2);k.setAttribute("width",this.b.code.code_image_size);l.setAttribute("width","100%");this.a(g,b);this.a(a,g);this.a(e,d);this.a(k,e);this.a(f,k);this.a(h,c);this.a(f,h);this.a(j,f);this.a(j,a)}else{this.a(e,d);this.a(k,e);this.a(f,k);this.a(h,c);
this.a(f,h);this.a(j,f)}break;case 3:this.a(e,d);this.a(k,e);this.a(g,k);this.a(j,g);this.a(h,c);this.a(f,h);this.a(j,f);break;case 4:this.a(h,c);this.a(f,h);this.a(e,d);this.a(k,e);this.a(f,k);this.a(j,f)}this.a(l,j);return l},a:function(a,b){a.appendChild(b)},p:function(){var a=this.c("div",{style:"display:none; position:absolute;"}),b="",c=this.b.code_id,d=this.b.code.code_v_count,e=this.b.code.code_h_count,j=this.b.code.code_text_layout,l=0,f=document.getElementById(this.d);if(f===null)throw"block container '"+
this.d+"' not found";f.innerHTML="";var g=this.c("style",{type:"text/css"});if(g.styleSheet)g.styleSheet.cssText=this.k();else{var h=document.createTextNode(this.k());this.a(g,h)}this.a(document.getElementsByTagName("head")[0],g);for(var g=this.c("tbody"),h=this.c("table",{cellspacing:0,cellpadding:0,border:0,width:"auto",style:this.z(),id:this.d+"_Table"}),k=new window.SC_InfinitIterator(this.b.teasers),m=null,q=Math.round(100/e),o=0;o<d;o++){var n=this.c("tr");this.a(g,n);for(var p=0;p<e;p++){td=
this.c("td",{style:this.textAlign()+"; "+this.g()+"; padding:5px; width:"+q+"%","class":this.d+"_td"});m=k.next();this.D.B()&&m.lb_click_url2&&function(a){td.onmouseup=function(){window.open(a)}}(m.lb_click_url2);this.a(n,td);var r=this.o(j,m,c,l);this.a(td,r);m.ad_html&&(b=b+m.ad_html);l++}}this.b.ad_html&&(b=b+this.b.ad_html);this.a(g,n);this.a(h,g);this.a(f,h);if(b!==""){a.innerHTML=b;this.a(f,a)}},G:function(a,b){this.d=a;this.b=b;this.p()}},window.SC_TBlock=new window.SC_TBlockObj,window.SC_TBlock.writeBlock=
window.SC_TBlock.G,window.SC_TBlock.imgMouseOver=window.SC_TBlock.t,window.SC_TBlock.imgMouseOut=window.SC_TBlock.s);
