
var domain = 'tv.cmlt.tv';

i_show_channel = false;
i_show_channel3 = false;

if (typeof i_num3 == 'undefined') {
i_num3 = "";
}

document.write('<div class="i_mheader' + i_num3 + '">');
document.write('<div class = "i_header' + i_num3 + '">Телепрограмма</div>');
document.write('<select class="i_select' + i_num3 + '" width=110 OnChange="i_show_tv3(value, \'windows-1251\');">');
for (i = 0; i < i_id.length; i++) {
document.write('<option value="' + i_id[i] + '">' + getChannel(i_id[i]) + '</option>');
}
document.write('</select></div>');
document.write('<div class="i_div' + i_num3 + '" id="i_div' + i_num3 + '">&lrm;</div>');

String.prototype.strip = function(exp) {
return this.replace(exp ? exp : /\s/g, "");
};

function i_show_tv3(value, encoding) {
if(typeof(encoding) == 'undefined' || encoding == null) { encoding = 'windows-1251'; }
if (typeof value == 'undefined') value = i_id[0];
link_cmlt = '<a href="http://' + domain + '/">Полная программа передач</a>';
link_cmlt_blank =  '<a href="http://' + domain + '/" target=_blank>Полная программа передач</a>';
footer_inner = document.getElementById("i_footer" + i_num3).innerHTML.toLowerCase().strip().replace('target="_blank"','target=_blank');
if (footer_inner == link_cmlt.toLowerCase().strip() || footer_inner == link_cmlt_blank.toLowerCase().strip()) {
document.getElementById('i_div' + i_num3).innerHTML = "<div style='color:#9E9E9E;'>&nbspзагрузка..</div>";

var e = document.createElement("script");
e.charset = encoding;
e.src = 'http://' + domain + '/informer-get-tv.js?town=' + i_townId + '&time=3&channel=' + value + '&userTime=' + new Date().getTime() + '&timeZoneOffset=' + new Date().getTimezoneOffset();

if (i_num3 != "") {
e.src += "&number=" + i_num3;
}
e.src += '&encoding=' + encoding;
e.type = "text/javascript";
document.getElementsByTagName("head")[0].appendChild(e);
} else {
document.getElementById('i_div' + i_num3).innerHTML = "<div style='color:#9E9E9E;'>&nbspПожалуйста, не изменяйте ссылку сайта.</div>";
}
}




