var helper = { array_search: function(search, arr) { var retval = -1; for (var i = 0; i < arr.length; i++) if (arr[i] == search) { retval = i; break; } return retval; }, get_element: function(element) { return (element && element.length && element.split) ? document.getElementById(element) : (element ? element : false); }, expand_box: function(link, target, text1, text2) { if (text1 == null) text1 = "▼ Покажи всички"; if (text2 == null) text2 = "▲ По-малко"; link = this.get_element(link); target = this.get_element(target); if (!link || !target) return; if (target.style.display == "none") { target.style.display = "block"; link.innerHTML = text2; } else { target.style.display = "none"; link.innerHTML = text1; } }, tip: function(element, type, content) { element.onmouseout = UnTip; if (type == "content") Tip(content, PADDING, 1, BORDERWIDTH, 0, BGCOLOR, 'transparent'); else if (type == "vip") Tip(content, PADDING, 1, BORDERWIDTH, 0, BGCOLOR, 'transparent', ABOVE, true, OFFSETY, -1, OFFSETX, 18); else Tip(content); }, submit_sms_form: function(field) { field = this.get_element(field); if (!/^\d{5}$/.test(field.value)) { alert('Невалиден SMS код!'); field.focus(); return false; } field.form.submit(); return true; }, get_scroll_top: function() { return document.body.scrollTop ? document.body.scrollTop : (window.pageYOffset ? window.pageYOffset : (document.body.parentElement ? document.body.parentElement.scrollTop : 0)); }, get_element_position: function(obj) { obj = helper.get_element(obj); var curleft = 0; var curtop = 0; if (obj.offsetParent) do { curleft += obj.offsetLeft; curtop += obj.offsetTop; } while (obj = obj.offsetParent); return [curleft, curtop]; }, nopx: function(px) { return parseInt((px.substr(px.length - 2, 2) == "px") ? px.substr(0, px.length - 2) : px); } };var kuki = { set: function(name, value, days) { if (days) { var date = new Date(); date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); var expires = "; expires=" + date.toGMTString(); } else var expires = ""; document.cookie = name + "=" + value + expires + "; domain=.kucheta.bg; path=/"; }, get: function(name) { var nameEQ = name + "="; var kukis = document.cookie.split(';'); var kuki; for (var i = 0; i < kukis.length; i++) { kuki = kukis[i]; while (kuki.charAt(0) == ' ') kuki = kuki.substring(1, kuki.length); if (kuki.indexOf(nameEQ) == 0) return kuki.substring(nameEQ.length, kuki.length); } return null; }, del: function(name) { kuki.set(name, "", -1); } };var bg_rotator = { change_background: function(dir) { var i = helper.array_search(this.current, this.backgrounds); if (!dir || (dir == "next")) { if (++i > this.backgrounds.length - 1) i = 0; } else { if (--i < 0) i = this.backgrounds.length - 1; } this.current = this.backgrounds[i]; document.body.style.backgroundImage = "url(/img/backgrounds/" + this.current +")"; kuki.set("background_image", this.current, 365); }, change_fixed: function() { var fixed = kuki.get('background_attachment'); var btn = document.getElementById('btn_fixed'); if (!fixed) fixed = "scroll"; fixed = (fixed == "scroll") ? "fixed" : "scroll"; kuki.set('background_attachment', fixed, 365); document.body.style.backgroundAttachment = fixed; btn.src = "/img/icons/control_" + ((fixed == "scroll") ? "stop" : "pause") + "_blue.png"; btn.title = btn.alt = (fixed == "scroll") ? "Плаващ" : "Фиксиран"; } };var blinker = { elems: [], interval: 500, thread: false, visible: true, add: function(elem) { elem = helper.get_element(elem); if (elem == false) return false; this.elems[this.elems.length] = elem; }, blink: function() { for (var i = 0; i < blinker.elems.length; i++) { elem = blinker.elems[i]; elem.style.opacity = blinker.visible ? "0" : ""; elem.style.filter = blinker.visible ? "alpha(opacity:0)" : ""; } blinker.visible = !blinker.visible; }, stop: function(elem) { if (elem == null) { for (var i = 0; i < blinker.elems.length; i++) { elem = blinker.elems[i]; elem.style.opacity = elem.style.filter = ""; } blinker.elems = []; clearInterval(blinker.thread); } else { elem = helper.get_element(elem); var key = helper.array_search(elem, blinker.elems); if (key == -1) return false; elem.style.opacity = elem.style.filter = ""; var arr = []; for (var i = 0; i < blinker.elems.length; i++) if (i != key) arr[arr.length] = blinker.elems[i]; blinker.elems = arr; if (!arr.length) clearInterval(blinker.thread); } return true; } }; page_init.add_function(function() { if (blinker.elems.length) blinker.thread = setInterval("blinker.blink()", blinker.interval); });var colorize = { css2change: [ [ 'a', 'color', 0, 60, 50 ], [ '.nl_icon_links a:hover', 'border-color', 0, 60, 50 ], [ '.nl_icon_links a:hover', 'background-color', 0, 15, 100 ], [ 'div.friends_box div.online:hover', 'border-color', 0, 60, 50 ], [ 'div.friends_box div.online:hover', 'background-color', 0, 15, 100 ], [ 'div#dropmenu div.move:hover', 'border-color', 0, 60, 50 ], [ 'div#dropmenu div.move:hover', 'background-color', 0, 15, 100 ], [ '.pager a', 'color', 0, 60, 50 ], [ 'table.list tr.mouseover', 'background-color', 0, 15, 100 ], [ 'input[type="text"]:focus', 'border-color', 0, 40, 70 ], [ 'input[type="password"]:focus', 'border-color', 0, 40, 70 ], [ 'form.login input[type="text"]:focus', 'border-color', 0, 40, 70 ], [ 'form.login input[type="password"]:focus', 'border-color', 0, 40, 70 ], [ 'textarea:focus', 'border-color', 0, 40, 70 ], [ 'select:focus', 'border-color', 0, 40, 70 ] ], change_colors: function(color) { color = this.hsl2rgb(this.rgb2hsl(color)); if (color != false) { kuki.set("background_color", color.substr(1, 6), 365); if (document.body) document.body.style.backgroundColor = color; else document.write('<style type="text/css">body{background-color:' + color + '}</style>'); var css = this.css2change; for (var i = 0; i < css.length; i++) if ((css[i][2] == null) || ((css[i][3] == null) && !css[i][2])) this.change_css(css[i][0], css[i][1], color); else if (css[i][3] == null) this.change_css(css[i][0], css[i][1], this.change_tone(color, css[i][2])); else if (css[i][4] == null) this.change_css(css[i][0], css[i][1], this.change_tone(color, css[i][2], css[i][3])); else this.change_css(css[i][0], css[i][1], this.change_tone(color, css[i][2], css[i][3], css[i][4])); } }, change_tone: function(color, hue_offset, saturation, lightness) { var hsl = this.rgb2hsl(color); hsl[0] += hue_offset; if (hsl[0] >= 360) hsl[0] -= 360; if (hsl[0] < 0) hsl[0] += 360; if (saturation != null) hsl[1] = saturation; if (lightness != null) hsl[2] = lightness; return this.hsl2rgb(hsl); }, rgb2hsl: function() { var argv = this.rgb2hsl.arguments; var r, g, b, tmp; var expr_rgb = /^rgb\((\d{1,3})\,\s*(\d{1,3})\,\s*(\d{1,3})\)$/i; var expr_hex1 = /^\#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i; var expr_hex2 = /^\#?([0-9a-f])([0-9a-f])([0-9a-f])$/i; var expr_byte = /^([01]?\d?\d|2[0-4]\d|25[0-5])$/; if (argv[0].hasOwnProperty('pop')) { r = argv[0][0]; g = argv[0][1]; b = argv[0][2]; } else if (expr_rgb.test(argv[0])) { tmp = argv[0].replace(expr_rgb, "$1 $2 $3"); tmp = tmp.split(" "); r = tmp[0]; g = tmp[1]; b = tmp[2]; } else if (expr_hex1.test(argv[0])) { tmp = argv[0].replace(expr_hex1, "$1 $2 $3"); tmp = tmp.split(" "); r = parseInt(tmp[0], 16); g = parseInt(tmp[1], 16); b = parseInt(tmp[2], 16); } else if (expr_hex2.test(argv[0]) && (argv[1] == null)) { tmp = argv[0].replace(expr_hex2, "$1$1 $2$2 $3$3"); tmp = tmp.split(" "); r = parseInt(tmp[0], 16); g = parseInt(tmp[1], 16); b = parseInt(tmp[2], 16); } else if ( expr_byte.test(argv[0]) && expr_byte.test(argv[1]) && expr_byte.test(argv[2]) ) { r = parseInt(argv[0]); g = parseInt(argv[1]); b = parseInt(argv[2]); } else return false; r = (r / 255); g = (g / 255); b = (b / 255); var min = Math.min(Math.min(r, g), b), max = Math.max(Math.max(r, g), b), delta = max - min; var lightness = max, saturation, hue; if (max == min) hue = 0; else if (max == r) hue = (60 * ((g - b) / (max - min))) % 360; else if (max == g) hue = 60 * ((b - r) / (max - min)) + 120; else if (max == b) hue = 60 * ((r - g) / (max - min)) + 240; if (hue < 0) hue += 360; saturation = (max == 0) ? 0 : (1 - (min/max)); return [Math.round(hue), Math.round(saturation * 100), Math.round(lightness * 100)]; }, hsl2rgb: function() { var argv = this.hsl2rgb.arguments; var return_type = "hex"; var type, h, s, l; var expr_h = /^([0-2]?\d?\d|3[0-5]\d|360)$/; var expr_sl = /^([01]?\d?\d|100)$/; if (expr_h.test(argv[0]) && expr_sl.test(argv[1]) && expr_sl.test(argv[2]) ) { h = argv[0]; s = argv[1]; l = argv[2]; type = argv[3] ? argv[3] : return_type; } else if ((argv[2] == null) && expr_h.test(argv[0][0]) && expr_sl.test(argv[0][1]) && expr_sl.test(argv[0][2]) ) { h = argv[0][0]; s = argv[0][1]; l = argv[0][2]; type = argv[1] ? argv[1] : return_type; } else return false; s = s / 100; l = l / 100; var hi = Math.floor((h / 60) % 6); var f = (h / 60) - hi; var p = l * (1 - s); var q = l * (1 - f * s); var t = l * (1 - (1 - f) * s); var rgb = []; switch (hi) { case 0: rgb = [l, t, p]; break; case 1: rgb = [q, l, p]; break; case 2: rgb = [p, l, t]; break; case 3: rgb = [p, q, l]; break; case 4: rgb = [t, p, l]; break; case 5: rgb = [l, p, q]; break; } var r = Math.min(255, Math.round(rgb[0] * 256)), g = Math.min(255, Math.round(rgb[1] * 256)), b = Math.min(255, Math.round(rgb[2] * 256)); if (type == "array") return [r, g, b]; else if (type == "rgb") return "rgb(" + r + ", " + g + ", " + b + ")"; else if (type == "arrayhex") { r = r.toString(16); g = g.toString(16); b = b.toString(16); if (r.length == 1) r = "0" + r; if (g.length == 1) g = "0" + g; if (b.length == 1) b = "0" + b; return [r, g, b]; } else { r = r.toString(16); g = g.toString(16); b = b.toString(16); if (r.length == 1) r = "0" + r; if (g.length == 1) g = "0" + g; if (b.length == 1) b = "0" + b; return "#" + r + g + b; } }, change_css: function(selector, property, value) { var rules = document.all ? 'rules' : 'cssRules'; var added = false; var l; for (var sheet = 0; sheet < document.styleSheets.length; sheet++) { if (document.styleSheets[sheet][rules] != null) for (var rule = 0; rule < document.styleSheets[sheet][rules].length; rule++) if ((document.styleSheets[sheet][rules][rule].selectorText == selector) && (document.styleSheets[sheet][rules][rule].style[property]) ) { document.styleSheets[sheet][rules][rule].style[property] = value; added = true; break; } if (!added) { if (document.styleSheets[sheet].insertRule) { l = (document.styleSheets[sheet][rules] != null) ? document.styleSheets[sheet][rules].length : 0; document.styleSheets[sheet].insertRule(selector + '{' + property + ':' + value + ';}', l); } else if (document.styleSheets[sheet].addRule) document.styleSheets[sheet].addRule(selector, property + ':' + value + ';'); } added = false; } } };var dropmenu = { opened: false, box_width_add: 6, container: "dropmenu", button: false, content: "", width: 0, block_hide: false, block_open: false, click: function(button, content, width) { var container = helper.get_element(this.container); button = helper.get_element(button); if (this.button && (button != this.button)) { this.opened = false; this.button.style.color = this.button.style.borderColor = this.button.style.backgroundImage = ""; } this.button = button; this.content = content; this.width = width; if (!this.opened) { setTimeout('dropmenu.open()', 100); return true; } else { this.hide(); return false; } }, open: function() { if (!dropmenu.block_open) { dropmenu.opened = true; var width = dropmenu.width; var button = dropmenu.button; var container = helper.get_element(dropmenu.container); button.style.color = button.style.borderColor = "#000"; button.style.backgroundImage = "url(/img/bg_btn2.png)"; var coord = helper.get_element_position(button); container.style.width = width + "px"; container.style.left = (coord[0] + button.offsetWidth - width - dropmenu.box_width_add - (Prototype.Browser.IE7 ? 1 : 0)) + "px"; container.style.top = (coord[1] + button.offsetHeight + 2) + "px"; container.innerHTML = dropmenu.content; container.style.display = "inline"; container.style.visibility = "visible"; } else dropmenu.block_open = false; }, hide: function() { if (!dropmenu.block_hide) { dropmenu.opened = false; var container = helper.get_element(dropmenu.container); container.innerHTML = ""; container.style.visibility = "hidden"; container.style.display = "none"; dropmenu.opened = false; if (dropmenu.button) dropmenu.button.style.color = dropmenu.button.style.borderColor = dropmenu.button.style.backgroundImage = ""; } else dropmenu.block_hide = false; } }; page_init.add_function(function() { document.getElementById('outer').onclick = dropmenu.hide; });var mydogs = { per_page: 13, dogs: [], click: function(button, width) { button = helper.get_element(button); html = this.get_html(1); dropmenu.click(button, html, width); }, get_html: function(page) { var i, dog, horny_icon; var html = '<div class="friends_box" style="padding:2px 0 2px 1px">'; var offset = (page - 1) * this.per_page; if (offset >= this.dogs.length) offset = 0; if (offset) html += '<div class="move" onclick="mydogs.change_page(' + (page - 1) + ')"><a><img src="/img/icons/resultset_up.png" alt="" width="16" height="16"></a></div>'; for (i = offset; ((i < this.dogs.length) && (i < (offset + this.per_page))); i++) { dog = this.dogs[i]; html += '<div class="online"'; if (i == (this.dogs.length - 1)) html += ' style="margin-bottom:0"'; horny_icon = dog['horny'] ? "/img/icons/heart_beat.gif" : "/img/icons/heart.png"; html += '> <div class="left" style="width:175px"><a class="icon" style="background-image:url(/img/icons/dog.png)" href="http:\/\/' + dog['nick'] + '.kucheta.bg">' + dog['name'] + '</a></div> <div class="right"> <a><img onclick="mydogs.change_horny(' + dog['id'] + ', this)" src="' + horny_icon + '" alt="" width="16" height="16" title="Разгонено?" /></a> <a href="/moite_kucheta/redakcia/' + dog['nick'] + '" title="Редактирай"><img src="/img/icons/pencil.png" alt="" width="16" height="16" onclick="window.location.href=\'/moite_kucheta/redakcia/' + dog['nick'] + '\'" /></a> </div> </div>'; } if ((offset + this.per_page) < this.dogs.length) html += '<div class="move" onclick="mydogs.change_page(' + (page + 1) + ')"><a><img src="/img/icons/resultset_down.png" alt="" width="16" height="16"></a></div>'; html += "</div>"; return html; }, change_page: function(page) { dropmenu.block_hide = true; document.getElementById('dropmenu').innerHTML = this.get_html(page); }, change_horny: function(id, image) { dropmenu.block_hide = true; ajax_vars.dog = id; ajax_vars.image = image; ajax.action(js_init.base_href_subdomain + '/ajax/change_horny/' + id, null, mydogs.ajax_horny); }, ajax_horny: function() { if (ajax_vars.request.readyState == 4) { if (ajax_vars.request.status == 200) { var icon = (ajax_vars.request.responseText == "1") ? "/img/icons/heart_beat.gif" : "/img/icons/heart.png"; ajax_vars.image.src = icon; for (i = 0; i < mydogs.dogs.length; i++) if (mydogs.dogs[i]['id'] == ajax_vars.dog) mydogs.dogs[i]['horny'] = (ajax_vars.request.responseText == "1") ? true : false; } else alert("AJAX error!"); } } };var myfriends = { per_page: 13, friends: [], new_msg: false, content: "", lighteness: 0, step: 10, interval: false, click: function(button, width) { button = helper.get_element(button); html = this.get_html(1); dropmenu.click(button, html, width); }, get_html: function(page) { var i, friend, image, image2, url; var html = '<div class="friends_box" style="padding:2px 0 2px 1px">'; var offset = (page - 1) * this.per_page; if (offset >= this.friends.length) offset = 0; if (offset) html += '<div class="move" onclick="myfriends.change_page(' + (page - 1) + ')"><a><img src="/img/icons/resultset_up.png" alt="" width="16" height="16"></a></div>'; for (i = offset; ((i < this.friends.length) && (i < (offset + this.per_page))); i++) { friend = this.friends[i]; image2 = "img/icons/user"; image2 += (friend['gender'] == "m") ? "" : "_female"; image2 += friend['online'] ? "" : "_offline"; image2 += ".png"; image = "img/icons/comment_" + (friend['last_message_id'] ? 'new.gif" title="Виж и отговори' : 'edit.png" title="Напиши съобщение'); url = friend['last_message_id'] ? "lichni_syobshtenia/inbox/re/" + friend['last_message_id'] : "lichni_syobshtenia/novo/?to=" + friend['login']; html += "<div class=\"" + (friend['online'] ? "online" : "offline ") + "\"" + ((i == (this.friends.length - 1)) ? ' style="margin-bottom:0"' : "") + "><div class=\"left\"><a class=\"icon\" style=\"background-image:url(/" + image2 + ")\" href=\"/stopanin/" + friend['login'] + "\">" + friend['name'] + "</a></div><div class=\"right\"><a href=\"/" + url + "\"><img src=\"/" + image + "\" alt=\"\" width=\"16\" height=\"16\"/></a></div></div>"; } if ((offset + this.per_page) < this.friends.length) html += '<div class="move" onclick="myfriends.change_page(' + (page + 1) + ')"><a><img src="/img/icons/resultset_down.png" alt="" width="16" height="16"></a></div>'; html += "</div>"; return html; }, change_page: function(page) { dropmenu.block_hide = true; document.getElementById('dropmenu').innerHTML = this.get_html(page); } }; page_init.add_function(function() { if (document.getElementById('btn_friends') && (document.getElementById('btn_friends').style.display == "inline") ) setInterval(" myfriends.lighteness += myfriends.step; if (myfriends.lighteness < 0) { myfriends.step = -myfriends.step; myfriends.lighteness = 0; } if (myfriends.lighteness > 50) { myfriends.step = -myfriends.step; myfriends.lighteness = 50; } document.getElementById('btn_friends').style.color = colorize.change_tone('#000', 0, 0, myfriends.lighteness); ", 50); });var mynotifications = { messages: [], first_run: true, lighteness: 0, step: 10, interval: false, click: function(button, unread, width) { button = helper.get_element(button); var html = ""; var css_class; for (var i = 0; i < this.messages.length; i++) { css_class = (this.first_run && !this.messages[i].read) ? "item unread" : "item"; html += "<div class=\"" + css_class + "\"><ul><li><b>" + this.messages[i].time + " <span>&raquo;</span></b> " + this.messages[i].message + "</li></ul></div>"; } html += '<div class="bottom" style=""><b>&raquo;</b> <a href="/izvestia">Всички известия</a> <b>&laquo;</b></div>'; if (dropmenu.click(button, html, width)) { if (this.interval) clearInterval(this.interval); if (this.first_run && unread) ajax.action(js_init.base_href_subdomain + "/ajax/read_notifications", button); } this.first_run = false; } }; page_init.add_function(function() { if (document.getElementById('btn_notifications') && (document.getElementById('btn_notifications').innerHTML.substr( document.getElementById('btn_notifications').innerHTML.length - 1, 1 ) == ")") ) mynotifications.interval = setInterval(" mynotifications.lighteness += mynotifications.step; if (mynotifications.lighteness < 0) { mynotifications.step = -mynotifications.step; mynotifications.lighteness = 0; } if (mynotifications.lighteness > 50) { mynotifications.step = -mynotifications.step; mynotifications.lighteness = 50; } document.getElementById('btn_notifications').style.color = colorize.change_tone('#000', 0, 0, mynotifications.lighteness); ", 50); });var rating = { vote: function(type, id, direction, target) { if (target == null) target = "rate"; var url = js_init.base_href_subdomain + "/ajax/rate/" + type + "/" + id + "/" + direction; this.target = ajax.get_element(target); ajax.action(url, null, this.response); }, response: function() { if (ajax_vars.request.readyState == 4) { if (ajax_vars.request.status == 200) { var response = ajax_vars.request.responseText; if (!response.length) alert("Грешка! Опитайте пак или се свържете с разработчика!"); else if (response != "rated!") rating.target.innerHTML = response; } else alert("AJAX error!"); } } };var topbox = { images: [], open_dog_pic: function(user, dog_nick, dog_name, i, count) { if (!count) return; if (!this.images[dog_nick]) { var time = new Date().getTime(); this.dog_nick = dog_nick; this.images[dog_nick] = []; this.images[dog_nick][i] = new Image(); var ii = (i < 10) ? "0" + i : i; this.images[dog_nick][i].src = '/files/users/' + user + '/dogs/' + dog_nick + '/' + ii + '_big.jpg?' + time; for (j = 0; j < count; j++) if (j != i) { var jj = (j < 10) ? "0" + j : j; this.images[dog_nick][j] = new Image(); this.images[dog_nick][j].src = '/files/users/' + user + '/dogs/' + dog_nick + '/' + jj + '_big.jpg?' + time; } } var index = (i < 10) ? "0" + i : i; var container = document.getElementById('ajax_message'); ajax.doshadow(); var top = helper.get_scroll_top() + 10; var next = (i < (count - 1)) ? i + 1 : 0; var prev = i ? i - 1 : count - 1; var nav = (count == 1) ? "" : '<table style="width:100%"><tr><td><input type="button" value="&laquo; Предишна" onclick="topbox.open_dog_pic(\'' + user + '\', \'' + dog_nick + '\', \'' + dog_name + '\', ' + prev + ', ' + count + ')" /> <input type="button" value="Седваща &raquo;" onclick="topbox.open_dog_pic(\'' + user + '\', \'' + dog_nick + '\', \'' + dog_name + '\', ' + next + ', ' + count + ')" /></td> <td>Снимка ' + (i + 1) + ' от ' + count + '</td> <td style="text-align:right"><input type="button" value="Затвори" onclick="topbox.close()" /></td></tr></table>'; var html = '<div class="box_headed_solid" style="width:647px; margin: ' + top + 'px auto 0 auto"> <div class="content"> <div class="top"></div> <div class="topic">Снимките на ' + dog_name + '</div> ' + nav + ' <center><img src="' + this.images[dog_nick][i].src + '" style="cursor:pointer;border:1px solid #000;margin:5px 0 3px 0" onclick="topbox.open_dog_pic(\'' + user + '\', \'' + dog_nick + '\', \'' + dog_name + '\', ' + next + ', ' + count + ')" /></center> ' + nav + ((count == 1) ? '<div style="text-align:right"><input type="button" value="Затвори" onclick="topbox.close()" /></div>' : "") + ' </div> <div class="bottom"><div></div></div> </div>'; this.html = html; this.container = container; this.show_pic(dog_nick, i); }, show_pic: function(dog_nick, i) { if (!this.images[dog_nick][i].complete) setTimeout("topbox.show_pic('" + dog_nick + "', " + i + ")", 50); else this.container.innerHTML = this.html; }, close: function() { var container = document.getElementById('ajax_message'); container.innerHTML = ''; ajax.unshadow(); } };var clips = { sites: [], open_box: function(type, key, title, nick, name) { var html = '<div class="box_headed_solid" style="width:412px; margin:' + (helper.get_scroll_top() + 50) + 'px auto 0 auto"><div class="content"><div class="top"></div> <div class="topic">' + title + '</div>'; html += this.get_embed(type, key); html += '<table style="margin-top:5px; width:100%"><tr><td><a href="http:\/\/' + nick + '.kucheta.bg/video" class="icon" style="background-image:url(/img/icons/dog.png)" onclick="clips.close_box()">Още клипове на ' + name + '</a></td><td align="right"><input type="button" value="Затвори" onclick="clips.close_box()" /></td></tr></table></div><div class="bottom"><div></div></div></div>'; document.getElementById("ajax_message").innerHTML = html; ajax.doshadow(); }, close_box: function() { document.getElementById("ajax_message").innerHTML = ""; ajax.unshadow(); }, get_embed: function(type, key) { return this.sites[type]['embed'].replace(/\{key\}/g, key); } }; clips.sites['YouTube'] = []; clips.sites['YouTube']['embed'] = '<object width="400" height="327"><param name="movie" value="http:\/\/www.youtube.com/v/{key}&hl=bg_BG&autoplay=1&fs=1&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http:\/\/www.youtube.com/v/{key}&hl=bg_BG&autoplay=1&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="400" height="327"></embed></object>'; clips.sites['VBOX7'] = []; clips.sites['VBOX7']['embed'] = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http:\/\/download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="400" height="327"><param name="movie" value="http:\/\/i48.vbox7.com/player/ext.swf?vid={key}&autoplay=1"><param name="quality" value="high"><param name="allowFullScreen" value="true"></param><embed src="http:\/\/i48.vbox7.com/player/ext.swf?vid={key}&autoplay=1" quality="high" allowfullscreen="true" pluginspage="http:\/\/www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="400" height="327"></embed></object>';