function fm_img_t_getOffset(elem) { if (elem.getBoundingClientRect) { return fm_img_t_getOffsetRect(elem); } else { return fm_img_t_getOffsetSum(elem); } } function fm_img_t_getOffsetSum(elem) { var top=0, left=0 while(elem) { top = top + parseInt(elem.offsetTop) left = left + parseInt(elem.offsetLeft) elem = elem.offsetParent } return {top: top, left: left} } function fm_img_t_getOffsetRect(elem) { var box = elem.getBoundingClientRect() var body = document.body var docElem = document.documentElement var scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop var scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft var clientTop = docElem.clientTop || body.clientTop || 0 var clientLeft = docElem.clientLeft || body.clientLeft || 0 var top = box.top + scrollTop - clientTop var left = box.left + scrollLeft - clientLeft return { top: Math.round(top), left: Math.round(left) } } function fm_img_t_isIE() { var browser=navigator.appName; var b_version=navigator.appVersion; var version=parseFloat(b_version); if (browser=="Microsoft Internet Explorer") return true; else return false; } var super_teaser__target; function offsetPosition(element) { } function t_img_slider() { this.intervalID = false; } t_img_slider.prototype.clearInterval = function() { if (this.intervalID) { clearInterval(this.intervalID) this.intervalID = false; } } t_img_slider.prototype.setInterval = function(func) { this.intervalID = setInterval(func, 30); } t_img_slider.prototype.show = function(obj, max) { if (obj.hidden) return; this.clearInterval(); obj.style.display=''; this.setInterval(function() { obj.style.height = (parseInt(obj.style.height)+0.3*(max-parseInt(obj.style.height)))+'px'; } ); } t_img_slider.prototype.hide = function(obj) { this.clearInterval(); this.setInterval(function() { obj.style.height = (0.6*parseInt(obj.style.height))+'px'; if (parseInt(obj.style.height) < 5) { obj.style.display='none'; return; } }); } t_img_slider.prototype.resize = function(obj, dist) { if (obj.hidden) return; setInterval(function() { var dx; dx = Math.floor(dist*0.3); if (dx == 0) { if (dist < 0) dx = -1; if (dist > 0) dx = 1; } obj.style.height = (parseInt(obj.style.height) + dx) + 'px'; dist -= dx; if (dist == 0) return; }, 30); } t_img_slider.prototype.move = function(obj, dist, min_left, max_left) { var preved = this; var intervalID = setInterval(function() { var dx; dx = Math.floor(dist*0.3); if (dx == 0) { if (dist < 0) dx = -1; if (dist > 0) dx = 1; } obj.style.left = (parseInt(obj.style.left) + dx)+'px'; dist -= dx; if (parseInt(obj.style.left) <= min_left) { obj.style.left = min_left + 'px'; clearInterval(intervalID); preved.onNoScrollLeft(); } else preved.onCanScrollLeft(); if (parseInt(obj.style.left) >= max_left) { obj.style.left = max_left + 'px'; clearInterval(intervalID); preved.onNoScrollRight(); } else preved.onCanScrollRight(); if (dist == 0) return; }, 30); } function t_img_adv(img, t_id) { this.img = img; this.slider = new t_img_slider(); this.adv = this.createAdv(t_id); var img_adv = this; this.slider.onNoScrollLeft = function() { img_adv.adv.button_right.src = "https://frutrun.com//skin/t1/img/right_disabled.gif"; } this.slider.onNoScrollRight = function() { img_adv.adv.button_left.src = "https://frutrun.com//skin/t1/img/left_disabled.gif"; } this.slider.onCanScrollLeft = function() { img_adv.adv.button_right.src = "https://frutrun.com//skin/t1/img/right_enabled.gif"; } this.slider.onCanScrollRight = function() { img_adv.adv.button_left.src = "https://frutrun.com//skin/t1/img/left_enabled.gif"; } super_teaser__target = this.adv; this.adv.adv = this; } t_img_adv.prototype.createAdv = function(t_id) { var element = this.img, offsetLeft = 0, offsetTop = 0; do { offsetLeft += element.offsetLeft; offsetTop += element.offsetTop; } while (element = element.offsetParent); var div = window.document.createElement('div'); var wrapper = window.document.createElement('div'); wrapper.appendChild(div); div.id = "super_teaser__teaser_" + t_id; window.document.body.appendChild(wrapper); wrapper.style.zIndex=100000; wrapper.style.position='absolute'; wrapper.style.top = offsetTop+'px'; wrapper.style.left = offsetLeft + 'px'; wrapper.style.width=this.img.width+'px'; wrapper.style.backgroundColor='#444'; div.style.position='relative'; wrapper.style.opacity=0.8; wrapper.style.filter = 'alpha(opacity=80)'; div.style.filter = 'alpha(opacity=100)'; div.style.opacity=1; wrapper.style.height='0px'; wrapper.style.overflow='hidden'; this.img.showImage=wrapper; var super_teaser__css_text = '
 
'; var super_teaser__t_template = '
{NAME}
{DOWNLOAD} »
'; var super_teaser__t_data = [{"name":"M\u0435\u0434\u0438\u0446\u0438\u043d\u0430","url":"https:\/\/allprogram.org\/tclient.php?pcode=cGH75SKwW-qveNqk7uNhkBR0qy2Atycstf9qs8e1qYE&id_profile=1993","thumb_hosting_id":"854117fcfd2559595068e7e7e1e20ff6","thumb_hosting_type":"jpg","id_language":"1"},{"name":"Nasty Doctor - Ms. Sugimoto","url":"https:\/\/allprogram.org\/tclient.php?pcode=euXHlpzwsvhOLkzjFpuLaRR0qy2Atycstf9qs8e1qYE&id_profile=1993","thumb_hosting_id":"fa30ef6b1c4e04be605250790cff50f8","thumb_hosting_type":"jpg","id_language":"1"},{"name":"Ghostbusters","url":"https:\/\/allprogram.org\/tclient.php?pcode=B2jILM0f7HYK5oKk70ujEPsESRlS38PmbFJ8btF93n8&id_profile=1993","thumb_hosting_id":"6a98aaa319e1c705c14729f305786f33","thumb_hosting_type":"jpg","id_language":"1"}]; var super_teaser__t_row_count=0; var super_teaser__t_col_count=0; var super_teaser__t_files_count = 50; var super_teaser__files = []; var super_teaser__temp = []; super_teaser__t_files_count = super_teaser__t_data.length; if (super_teaser__t_data.length > 15) super_teaser__t_files_count = 15; else super_teaser__t_files_count = super_teaser__t_data.length; if (super_teaser__t_files_count >= super_teaser__t_data.length) var super_teaser__files = super_teaser__t_data; else while (super_teaser__files.length < super_teaser__t_files_count) { var index = Math.floor(Math.random()*super_teaser__t_data.length); if (super_teaser__temp[index] == undefined) { super_teaser__temp[index] = 1; super_teaser__files.push(super_teaser__t_data[index]); } } var html = '
'; html += ''; html += ''; html += '
'; html += '
'; html += ''; super_teaser__t_col_count = super_teaser__t_files_count; super_teaser__t_row_count=1; for (i = 0; i < 1; i++) { html += ''; for (j = 0; j < super_teaser__t_files_count; j++) { html += ''; } html += ''; } html += '
'; var temp = super_teaser__t_template; var file = super_teaser__files[i+super_teaser__t_row_count*j]; if (!file) break; temp = temp.replace('{URL}', file.url); temp = temp.replace('{URL}', file.url); temp = temp.replace('{URL}', file.url); temp = temp.replace('{NAME}', file.name); temp = temp.replace('{THUMB_HOST_ID}', file.thumb_hosting_id); temp = temp.replace('{THUMB_HOST_TYPE}', file.thumb_hosting_type); if (file.id_language == 1) temp = temp.replace('{DOWNLOAD}', 'c\u043a\u0430\u0447\u0430\u0442\u044c'); else temp = temp.replace('{DOWNLOAD}', 'Download'); html += temp; html += '
'; html += '
'; html += '
'; html += '
'; wrapper.innerHTML = html+super_teaser__css_text; var list = wrapper.getElementsByTagName('div'); for (i = 0; i < list.length; i ++) { if (list[i].className == 'fm_t_img_move_div') { var move_div = list[i]; break; } } var td_list = move_div.childNodes[0].childNodes[0].childNodes[0].childNodes; var td_count = Math.floor((this.img.width-30)/65); if (td_list.length < td_count) td_count = td_list.length; var td_width = Math.floor((this.img.width-30)/td_count)-15; if (fm_img_t_isIE()) td_width += 15; wrapper.childNodes[0].padding=Math.floor((this.img.width-td_count*td_width)/2) + 'px'; for (i = 0; i < td_list.length; i ++) { td_list[i].width = td_width; td_list[i].style.width = td_width + 'px'; } var td_dist = 12; move_div.style.left = td_dist + 'px'; move_div.style.width = (td_list.length)*(td_width+td_dist) + 'px'; var list = wrapper.getElementsByTagName('img'); var slider = this.slider; for (i = 0; i < list.length; i ++) { if (list[i].src) { if (list[i].className == 'move_left') { wrapper.button_left = list[i]; var img_width = this.img.width; list[i].onclick = function() { if (parseInt(move_div.style.left) < 0) slider.move(move_div, td_width+td_dist, -(td_width+td_dist)*(super_teaser__t_files_count-3), 0); else slider.onNoScrollRight(); }; } if (list[i].className == 'move_right') { wrapper.button_right = list[i]; list[i].onclick = function() { if (parseInt(move_div.style.left) > -(td_width+td_dist)*(super_teaser__t_files_count-3)) slider.move(move_div, -(td_width+td_dist), -(td_width+td_dist)*(super_teaser__t_files_count-3), 0); else slider.onNoScrollLeft(); }; } } } slider.move(move_div, 0, -(td_width+td_dist)*td_count, 0); return wrapper; } t_img_adv.prototype.show = function() { this.slider.show(this.adv, 50); } t_img_adv.prototype.hide = function() { this.slider.hide(this.adv); } if (window.captureEvents){ // ���� Netscape Navigator window.captureEvents(Event.MOUSEOVER); window.onmouseover = handle_mouseover; window.captureEvents(Event.MOUSEOUT); window.onmouseout = handle_mouseout; }else{ document.onmouseover = handle_mouseover; document.onmouseout = handle_mouseout; } function handle_mouseover(e){ var obj; if (e && e.target) obj = e.target; else obj = event.srcElement; var element = obj; do { if (element.adv) { element.adv.show(); } } while (element = element.offsetParent); if (!obj.src || obj.tagName!='IMG' || !obj.width || !obj.height || obj.width < 180 || obj.height < 250 || obj.getAttribute('hidet')=='true') return; if (!obj.t_img_adv) obj.t_img_adv = new t_img_adv(obj, 3162); var yo = ''; var element = obj, offsetLeft = 0, offsetTop = 0; do { offsetLeft += element.offsetLeft; offsetTop += element.offsetTop; yo += element.style.position + ' '; } while (element = element.offsetParent); obj.t_img_adv.adv.style.left = offsetLeft + 'px'; obj.t_img_adv.adv.style.top = offsetTop + 'px'; obj.t_img_adv.adv.style.left = fm_img_t_getOffset(obj).left + 'px'; obj.t_img_adv.adv.style.top = fm_img_t_getOffset(obj).top + 'px'; obj.t_img_adv.show(); } function handle_mouseout(e) { var obj; if (e && e.target) obj = e.target; else obj = event.srcElement; var element = obj; do { if (element.adv) element.adv.hide(); } while (element = element.offsetParent); if (!obj.src) return; if (!obj.t_img_adv) return; obj.t_img_adv.hide(); }