/*marketgid.comV7.3*/function MGD1(MGD2){ if (!document.cookie){ var MGDA=new Date(); return (MGDA.getSeconds()%20+1); } var prefix=MGD2+"="; var begin=document.cookie.indexOf("; "+prefix); if(begin==-1){ begin=document.cookie.indexOf(prefix); if(begin!=0){ return null; } }else{ begin += 2; } var end=document.cookie.indexOf(";", begin); if (end==-1){ end=document.cookie.length; }return unescape(document.cookie.substring(begin+prefix.length,end)); } function MGD3(str,MGD3){ var word=new Array(); var i; var ret=''; word=str.split(" "); for (i=0;i<word.length;i++){ if (word[i].length>MGD3 && word[i].search(/&\w+;/)<0) ret+=word[i].substr(0,MGD3) + ' ' + word[i].substr(MGD3) + ' '; else ret+=word[i] + ' '; } return ret; } function MGD4(str,MGD3){ if (str.length<=MGD3) return str; var word=new Array(); word=str.split(" "); var ret=word[0] + ' '; var test; for (i=1;i<word.length;i++){ test=ret+word[i]; if (test.length>MGD3) return ret+'...'; else ret+=word[i] + ' '; } return str; } function MGD6(title){ title=MGD3(title,15); title=MGD4(title,50); return title; } function MGD7(desc){ return desc; } function MGD8(str,id,f_src,desc,title,ext,lang){ global:langs; var mylang=langs[lang]?langs[lang]:'www.'; str=str.replace('{$lang}',mylang); str=str.replace('{$lang}',mylang); str=str.replace('{$lang}',mylang); str=str.replace('{$lang}',mylang); str=str.replace('{$news_id}',id); str=str.replace('{$news_id}',id); str=str.replace('{$news_id}',id); str=str.replace('{$news_id}',id); str=str.replace('{$ext}',ext); str=str.replace('{$ext}',ext); str=str.replace('{$source}',Math.floor(id/1000)); str=str.replace('{$source}',Math.floor(id/1000)); str=str.replace('{$source}',Math.floor(id/1000)); str=str.replace('{$source}',Math.floor(id/1000)); str=str.replace('{$desc}',desc); str=str.replace('{$desc}',desc); str=str.replace('{$desc}',desc); str=str.replace('{$desc}',desc); str=str.replace('{$desc}',desc); str=str.replace('{$title}',title); str=str.replace('{$title}',title); str=str.replace('{$title}',title); str=str.replace('{$title}',title); str=str.replace('{$title}',title); return str; } function MGD9(title,id,f_src,desc,ext,lang){ MGDA+=MGD8(' <tr> <td valign="top" align="left"> <a target="_blank" href="http://{$lang}marketgid.com/pnews/{$news_id}/i/3716/" ><img width="80" height="53" src="http://imgn.dt00.net/{$source}/{$news_id}_t{$ext}" align="left" /></a> <div style="padding-top:4px;"> <a target="_blank" class="mctitle" href="http://{$lang}marketgid.com/pnews/{$news_id}/i/3716/">{$title}</a> </div> </td> </tr> ',id,f_src,desc,title,ext,lang); MGD0++; } function MarketGidLoad(str){ var news=str.split('&#2;'); var i,n; for (i=0;i<news.length;i++){ n=news[i].split('&#1;'); MGD9(MGD6(n[3]),n[1],n[0],MGD7(n[4]),(n[2]==2)?'.gif':'.jpg',n[5]); } MGDA='<table width="240" cellpadding="0" cellspacing="5" border="0" class="mctable" > '+MGDA+' </table> '; if (MGDQ) MGDQ.innerHTML = MGDA; } var langs=new Array(); langs[1]='ru.'; var MGDZ = 1; var MGDA=''; var MGDQ = document.getElementById('MarketGid3716'); var MG_c=MGD1("MG_3716"); var MGD0=1; if(MG_c!=null&&parseInt(MG_c)<20) MGDZ=parseInt(MG_c)+1; document.cookie="MG_3716="+MGDZ+";path=/"; if (MGDQ) { document.write('<style type="text/css"> a.mctitle:link,a.mctitle:active,a.mctitle:visited{ font-size: 12px; font-weight:normal; font-family :tahoma; color:#353535; text-decoration:none; }a.mctitle:hover{} a.mcdesc:link,a.mcdesc:active,a.mcdesc:hover,a.mcdesc:visited{ font-size:11px; font-weight: normal; color:#000; text-decoration: none; font-family:tahoma; } .mctable td{ padding:0px; } .mctable img{ border: 1px solid #cccccc; margin: 5px 5px 2px 0px; } <'+'/style>'); document.write('<scr'+'ipt language="javascript" type="text/javascript" src="http://newsblock.dt00.net/j/3716/'+MGDZ+'"><'+'/scr'+'ipt>'); }
