/** global */
var rtn4p_item          = 17148;
var rtn4p_show_src      = 0;
var rtn4p_show_desc     = 0;
var rtn4p_show_photo    = 1;
var rtn4p_show_align    = 'center';

var rtn4p_class_title   = 'rtmoda';
var rtn4p_class_src     = '';
var rtn4p_class_desc    = 'rtdesc';
var rtn4p_class_photo   = 'rtphoto';

/** styles */
var rtn4p_style_photo   = 'margin:0px 5px 2px 0px; width:140px; height:140px; ';
/** header/footer */
var rtn4p_header        = '<table width="100%" cellspacing="5" cellpadding="5" border="0" bgcolor="" style=""><tr>';
var rtn4p_footer        = '</tr></table>';
/** news line */
var rtn4p_line_before   = '<td valign="top" width="33%" align="center" style="border:1px dotted #000000;">';
var rtn4p_line_after    = '</td>';

var rtn4p_title_before  = '<div style="">';
var rtn4p_title_after   = '</div>';

var rtn4p_desc_before   = '<div style="padding: 0px 0px 0px 0px;;">';
var rtn4p_desc_after    = '</div>';

var rtn4p_photo_before    = '';
var rtn4p_photo_after     = '';

var rtn4p_src_before    = '';
var rtn4p_src_after     = '';


var rtn4p_domain        = 'http://ru.redtram.com/';
var rtn4p_host          = 'http://n4p.ru.redtram.com/';
var rtn4p_photo         = 'http://img2150.ru.redtram.com/news/';
var rtn4p_page          = 1;

var rtn4p_data          = '';
var rtn4p_css_styles    = 'A.rtphoto IMG{border:1px solid #cccccc;}A.rtphoto:hover IMG{border:1px solid #cccccc;}a.rtmoda:link{font-size:11px; font-weight:normal; font-family:tahoma; color:#000; text-decoration:none;}a.rtmoda:hover{color:#000; text-decoration:underline;}a.rtmoda:active{color:#000; text-decoration:underline;}a.rtmoda:visited{font-size:11px; font-weight:normal; font-family:tahoma; color:#000; text-decoration:none;}';

var rtn4p_initid        = 'rtn4p_len_jdty';

var ak = Array();	
var count_ak = 0;	
	
/** do not edit */
function getCookie(name){var dc=document.cookie;var prefix=name+"=";var begin=dc.indexOf("; "+prefix);if(begin==-1){begin=dc.indexOf(prefix);if(begin!=0){return null;}}else{begin += 2;}var end=dc.indexOf(";", begin);if (end==-1){end=dc.length;}return unescape(dc.substring(begin+prefix.length,end));}
function setCookie(name,value,expires,path,domain,secure){document.cookie=name+"="+escape(value)+((expires)?"; expires="+expires.toGMTString():"")+((path)?"; path="+path:"")+((domain)?";domain="+domain:"")+((secure)?"; secure":"");}
function RedTramCookies(value){var cn="rtn4p";if(value){rtn4p_page=value;}else{var c=getCookie(cn);if(c!=null&&parseInt(c)<=10&&(parseInt(c)+1)<=10){rtn4p_page=parseInt(c)+1;}setCookie(cn,rtn4p_page,"","/");}}RedTramCookies();

var rtn4p_init          = document.getElementById(rtn4p_initid);

function RedTramI(){if(rtn4p_init){rtn4p_init.innerHTML = rtn4p_data;}}
function RedTramH(){rtn4p_data+=rtn4p_header;}
function RedTramF(){rtn4p_data+=rtn4p_footer;RedTramI();}
function toword(str,bookva){ if (str.length<=bookva) 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>bookva) return ret+'';else ret+=word[i] + ' ';} return str; }
function RedTramAdd(title,url,src,desc,photo,special){
    str=rtn4p_line_before;
	if(rtn4p_show_src){str+=rtn4p_src_before+'<a target="_blank" href="'+rtn4p_domain+'sources/'+src+'/"'+(rtn4p_class_src?' class="'+rtn4p_class_src+'"':'')+'>'+src+'<'+'/a>'+rtn4p_src_after;}
    if(rtn4p_show_photo&&photo!=''){str+=rtn4p_photo_before+'<a target="_blank" href="'+rtn4p_domain+'go/'+url+'/n4p/'+rtn4p_item+'?q='+ak[count_ak]+'" class="'+rtn4p_class_photo+'"><img'+(rtn4p_class_photo?' class="'+rtn4p_class_photo+'"':'')+' src="'+rtn4p_photo+''+photo+'" border=0 align="'+rtn4p_show_align+'"'+(rtn4p_style_photo?' style="'+rtn4p_style_photo+'"':'')+' /><'+'/a>'+rtn4p_photo_after;}
    str+=rtn4p_title_before+'<a target="_blank" href="'+rtn4p_domain+'go/'+url+'/n4p/'+rtn4p_item+'?q='+ak[count_ak]+'"'+(rtn4p_class_title?' class="'+rtn4p_class_title+'"':'')+'>'+title+'<'+'/a>'+rtn4p_title_after;
	if(rtn4p_show_desc&&desc!=''){str+=rtn4p_desc_before+'<a target="_blank" href="'+rtn4p_domain+'go/'+url+'/n4p/'+rtn4p_item+'?q='+ak[count_ak]+'"'+(rtn4p_class_desc?' class="'+rtn4p_class_desc+'"':'')+'>'+desc+'<'+'/a>'+rtn4p_desc_after;}
    rtn4p_data+=str+rtn4p_line_after;

    count_ak = count_ak + 1;
}

if (rtn4p_init) {
    document.write('<style type="text/css">'+rtn4p_css_styles+'<'+'/style>');    
document.write('<scr'+'ipt language="javascript" charset="UTF-8" type="text/javascript" src="'+rtn4p_host+'?i='+rtn4p_item+'&p='+rtn4p_page+'"><'+'/scr'+'ipt>');
}  
 
