<!--
function play_file(filename){
if(filename){
var win = window.open("../uploader/player/index.php?mp3_file=" + filename, "player", "location=0,toolbar=0,status=0,menubar=0,resizable=0,scrollbars=0,height=290,width=300,top="+parseInt(screen.height/2 - 230)+",left="+parseInt(screen.width/2 - 150));
}
else{
var win = window.open("../uploader/player/", "player", "location=0,toolbar=0,statusbar=0,menubar=0,resizable=0,scrollbars=0,height=290,width=300,top="+parseInt(screen.height/2 - 230)+",left="+parseInt(screen.width/2 - 150));
}
win.focus();
}

var servey_names = new Array("Ëà Ïåðëà","Ãîëüôà","Òðàêòàðèñòêà","Ìóðîìåö","La_Perla","TpAkToPucTkA");

function xui_vam_a_ne_apross(){
var inp = document.getElementsByTagName("INPUT");
for(var i = 0; i < inp.length; i++){
//if(inp[i].name == "voteID" && inp[i].value != "1"){inp[i].onclick = function(){this.value = "1";}}
if(inp[i].name == "voteID" && inp[i].value == "2"){
inp[i].onclick = function(){
this.checked = false;
try{
this.parentNode.nextSibling.innerHTML = '<span class="content">'+servey_names[Math.round(Math.random()*5)]+'<\/span>';
}
catch(e){}
}
}
else{continue;}
}
}
// ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ÁËß ÐÆÓÍÈÌÀÃÓ!!!
//======ÃËÎÁÀËÜÍÛÅ ÏÅÐÅÌÅÍÍÛÅ - íà÷àëî
var genHeight = 0;
var quote_pattern = /(<|[)*(>])*(<|[)*(>])/ig;
var pattern = /[à-ÿÀ-ß]{30,}/ig;
var pattern_to_wrap = /[^ ]{50,}/ig;
var fealko_pattern = /ÔÅÀËÊÎ ÒÓÏÎ ÑÐ¨Ò Â ÃÀÐØÎÃ/;
var shitpix = new Array("xxuuii.jpg");
var goodpix = new Array("http://i.io.com.ua/img_aa/large/0329/40/03294067.jpg");
var fuckinPix = new Array(
{ID:"eraSignature",maxH:"140",maxW:"136",picDisplay:"block",picBorder:"2px dashed #000",picTitle:"Êàøàððà áëÿòü!",picCursor:"",picFunction:""},
{ID:"muramecAvatar",maxH:"",maxW:"",picDisplay:"",picBorder:"",picTitle:"Íàòóðàë è íèèáåò!",picCursor:"pointer",picFunction:"window.alert(\"Ìóðàìèö - íàòóðàë!\")"}
);
//--- ìàññèâ íèêîâ è îïðåäåëåííûõ ïàðàìåòðîâ ñîîáùåíèé ýòèõ íèêîâ
//--- äëÿ ôóíêöèè setMessagefieldsProps()
var chosen_nicks = new Array(
{nik:"El_Paskudo", bgpicH:"150", bgpicW:"", mouse_over:"this.style.background = 'url(padonak_pix/paskudo_bg.gif) center right no-repeat'", mouse_out:"this.style.backgroundImage = 'none'", clk:"", txt_replace:"", styleBg:"", style_color:""},
//{nik:"Pushechka", bgpicH:"", bgpicW:"", mouse_over:"", mouse_out:"", clk:"", txt_replace:"", styleBg:"url(padonak_pix/pusha_bg.jpg) left top no-repeat", style_color:"#fff"},
{nik:"Pushechka", bgpicH:"", bgpicW:"", mouse_over:"", mouse_out:"", clk:"", txt_replace:"", styleBg:"", style_color:""}
);
//--- ìàññèâ êóäà çàíîñÿòñÿ SRC èëè ÷àñòü SRC êàðòèíîê êîòîðûå íóæíî íàñèëüíî çàìåíèòü/öåíçóðèðîâàòü
//--- è SRC êàðòèíêè-çàìåíèòåëÿ. åñëè âòîðîé ïàðàìåòð îñòàâèòü ïóñòûì òî àâòîìàòè÷åñêè çàìåíÿåò íà 
//--- padonak_pix/censored_(big/medium).gif â çàâèñèìîñòè îò ðàçìåðà îðèãèíàëà
var censoredImg = new Array(
{original:"http://nenavist.com/", repl:"", ttl:"Ïðàïàãàíäà ãîìîçîîôèëèè íà ðèñóðñå", except:"http://nenavist.com/images/comment/image/35493.gif"},
{original:"http://i044.radikal.ru/0805/7a/db53054fd6e5.jpg", repl:"", ttl:"Àôòàð êîïðîôèë è âàçìîæíà êîïðîôàã", except:""},
{original:"http://i045.radikal.ru/0805/71/56f64a41c6b2.jpg", repl:"", ttl:"Àôòàð êîïðîôèë è âàçìîæíà êîïðîôàã", except:""},
{original:"http://clan2007.ucoz.ru/_ph/1/1/789843066.jpg", repl:"", ttl:"Àôòàð êîïðîãàììàñåã", except:""},
{original:"http://keep4u.ru/imgs/b/2009/05/26/54/543b6792327fff53635860f7aecf851d.jpg", repl:"", ttl:"", except:""},
{original:"http://thekonst.net/data/pictures/218/027.800.jpg", repl:"", ttl:"Àôòàð êîïðîãàììàñåã", except:""},
{original:"http://izvrashenec.ru/", repl:"", ttl:"Àôòàð êîïðîãàììàñåã", except:""}
//http://thekonst.net/data/pictures/218/027.800.jpg
);
//======ÃËÎÁÀËÜÍÛÅ ÏÅÐÅÌÅÍÍÛÅ - êîíåö

if(document.getElementById("logo")){
document.getElementById("logo").onclick = function(){window.alert("Äà áëÿòü òèáå æå óæå ñêîçàëëå: ÈÄÈ ÍÀÕÓÉ!");}
}

function blurLinks(){
for(var i = 0; i < document.links.length; i++){
// íà÷àëî öèêëà
document.links[i].onfocus = function(){this.blur();}
if(document.links[i].innerHTML == "Äîïîëíèòåëüíûå ñìàéëèêè"){document.links[i].innerHTML = " Ï è ÷ à ò è ";addNewSmilesLink(document.links[i]);}
}

if(document.forms["post"]){
var gearbox = document.forms["post"].elements["post"].parentNode;
var gearboxtemp = gearbox.innerHTML;
var res = document.createElement("input");
res.setAttribute("id","resetbutton");
res.type = "button";
res.className ="mainoption";
res.value = "Î÷èñòèòü";
res.style.marginRight = 50 + "px";
res.style.cursor = "pointer";
res.title = "À÷èñòèòü íàõóé";
gearbox.innerHTML = "";
gearbox.appendChild(res);
gearbox.innerHTML += gearboxtemp;
document.getElementById("resetbutton").onclick = function(){
if(document.forms["post"].elements["message"]){
document.forms["post"].elements["message"].value = "";
document.forms["post"].elements["message"].focus();
}
}
}
trimShit();
reduceAvatars();
if(document.getElementById("resetbutton")){
var tarea = document.forms["post"].elements["message"];
document.getElementById("resetbutton").onmouseover = function(){
this.style.color = "#fff";
this.style.backgroundColor = "#000";
this.style.border = "1px solid #fff";
if(tarea.value.length >= 1){
tarea.style.backgroundColor = "Pink";
}
}
document.getElementById("resetbutton").onmouseout = function(){
this.style.color = "#000";
this.style.backgroundColor = "#fff";
this.style.border = "1px solid #000";
tarea.style.backgroundColor = "#fff";
}
}
for(var c = 0; c < document.getElementsByTagName("B").length; c++){
if(document.getElementsByTagName("B")[c].innerHTML.match(fealko_pattern)){
var temp_fealko = document.getElementsByTagName("B")[c].innerHTML;
document.getElementsByTagName("B")[c].innerHTML = temp_fealko.replace(fealko_pattern, "<a href=\"#null\" style=\"text-decoration:none;color:#7e4ebe;background-color:transparent;\" onfocus=\"this.blur()\" onclick=\"showPic('padonak_pix/fealko_sret.gif')\" title=\" ñìàòðåòü ïðàöåñ \">$&</a>");
}
else{continue;}
}
setMessagefieldsProps();
//xui_vam_a_ne_apross();
//pidor_animate();
}

//--------------------
var pedoraz = ['hrupkij', 'igumen', 'Pamzha'];

function pidor_animate(){
var bs = document.getElementsByTagName("B");
for(var i = 0; i < bs.length; i++){
var b = bs[i];
for(var k = 0; k < pedoraz.length; k++){
if(b.innerHTML === pedoraz[k]){b.innerHTML = pedoraz[Math.round(Math.random()*(pedoraz.length-1))];}
else{continue;}
}
}
try{setTimeout("pidor_animate()",2000);}catch(e){}
}
//--------------------

function trimShit(){
var tds = document.getElementsByTagName("SPAN");
for(var n = 0; n < tds.length; n++){
//if(tds[n].className = "postbody"){
var temp = tds[n].innerHTML;
if(temp.match(pattern)){
tds[n].innerHTML = temp.replace(pattern, " <span style=\"font-weight:bold;background-color:transparent;color:#990000;cursor:pointer\" title=\" ïîëüçîâàòåëü íàìåðåííî ñðàë òðóäíî÷åòàåìûìå ñëîâàìå \">éà åñòü åáàíóòûé ñïàìèðñêåé ôëóäûð<\/span> ");
}
/*else if(temp.match(pattern_to_wrap)){
var wrap_symbols = /[^a-zA-Z à-ÿÀ-ß\d]/ig;
tds[n].innerHTML = temp.replace(wrap_symbols, "<br>$&<br>");
}*/
//}
else{continue;}
}
for(var i = 0; i < shitpix.length; i++){
for(var k = 0; k < document.images.length; k++){
if(document.images[k].src.indexOf("http://i023.radikal.ru/0803/f7/944e00948dc0.jpg") != -1){
document.images[k].setAttribute("id", "eraSignature_" + k);
}
if(document.images[k].src.indexOf("http://www.padonak.lv/modules/Forums/images/avatars/182172691947a794976f3b9.jpg") != -1){
document.images[k].setAttribute("id", "eraAvatar_" + k);
}
if(document.images[k].src.indexOf("http://www.padonak.lv/modules/Forums/images/avatars/1106318535478694b297251.jpg") != -1){
document.images[k].setAttribute("id", "muramecAvatar_" + k);
}
if(document.images[k].src.indexOf(shitpix[i]) != -1){
document.images[k].src = goodpix[i];
}
else{continue;}
}
}
}

function reduceAvatars(){
for(var i = 0; i < fuckinPix.length; i++){
for(var k = 0; k < document.images.length; k++){
if(document.images[k].id && document.images[k].id.indexOf(fuckinPix[i]["ID"]) != -1){
if(fuckinPix[i]["maxH"].length > 1){
document.images[k].height = fuckinPix[i]["maxH"];
}
if(fuckinPix[i]["maxW"].length > 1){
document.images[k].width = fuckinPix[i]["maxW"];
}
if(fuckinPix[i]["picDisplay"].length > 1){
document.images[k].style.display = fuckinPix[i]["picDisplay"];
}
if(fuckinPix[i]["picBorder"].length > 1){
document.images[k].style.border = fuckinPix[i]["picBorder"];
}
if(fuckinPix[i]["picTitle"].length > 1){
document.images[k].title = fuckinPix[i]["picTitle"];
}
if(fuckinPix[i]["picCursor"].length > 1){
document.images[k].style.cursor = fuckinPix[i]["picCursor"];
}
if(fuckinPix[i]["picFunction"].length > 1){
eval("document.images[k].onclick = function(){" + fuckinPix[i]["picFunction"] + "}");
}
}
else{continue;}
}
}
}

function showPic(pic){
// ïðîâåðÿåì íå ïîêàçûâàåòñÿ ëè â äàííûé ìîìåíò
// êàêàÿ-íèáóäü áîëüøàÿ êîðòèíêî è åñëè äà - óíè÷òîæàåì åå
if(document.getElementById("picture")){document.body.removeChild(document.getElementById("picture"));}
// ñîçäàåì äèâ è âñòàâëÿåì â íåãî íàøó êîðòèíêî
var ppic = document.createElement("div");
ppic.setAttribute("id","picture");
ppic.style.position = "absolute";
ppic.style.zIndex = "2";
ppic.style.top = 0 + "px";
ppic.style.left = 0 + "px";
ppic.style.color = "#000";
ppic.style.backgroundColor = "#fff";
ppic.style.border = "2px solid #000";
ppic.style.padding = "10px 10px 10px 10px";
ppic.innerHTML = "<img src='" + pic + "' title=' çîêðûòü ôïåñäó ' alt='' style='cursor:pointer' onload='setTimeout(\"findCenter()\",50)'>";
top.document.body.appendChild(ppic);
if(ppic.offsetWidth > parseInt(document.body.clientWidth*0.9)){ppic.style.width = parseInt(document.body.clientWidth*0.9) + "px";}
if(ppic.offsetWidth > parseInt(document.body.clientHeight*0.9)){ppic.style.height = parseInt(document.body.clientHeight*0.9) + "px";}
ppic.style.overflow = "auto";
//ppic.style.position = "fixed";
ppic.onclick = function(){document.body.removeChild(this)};
}

function findCenter(){
var ppic = document.getElementById("picture");
ppic.style.left = parseInt(document.body.clientWidth/2 - ppic.offsetWidth*0.5)+ "px";
ppic.style.top = parseInt(document.body.clientHeight/2 - ppic.offsetHeight*0.5) + document.body.scrollTop + "px";
}

function setMessagefieldsProps(){
var dv = document.getElementsByTagName("DIV");
//âíåøíèé öèêë - íà÷àëî
for(var y = 0; y < dv.length; y++){
if(!dv[y].className || dv[y].className != "hidden_username"){continue;}
else{
//âíóòðåííèé öèêë - íà÷àëî
var messageCell = dv[y].parentNode;
for(var z = 0; z < chosen_nicks.length; z++){
if(dv[y].innerHTML != chosen_nicks[z]["nik"]){continue;}
else{
if(chosen_nicks[z]["bgpicH"].length > 1){
messageCell.style.height = eval(chosen_nicks[z]["bgpicH"] + " + 20 + 'px'");
}
if(chosen_nicks[z]["mouse_over"].length > 1){
eval("messageCell.onmouseover = function(){" + chosen_nicks[z]["mouse_over"] + "}");
}
if(chosen_nicks[z]["mouse_out"].length > 1){
eval("messageCell.onmouseout = function(){" + chosen_nicks[z]["mouse_out"] + "}");
}
if(chosen_nicks[z]["txt_replace"].length > 1){
messageCell.innerHTML = chosen_nicks[z]["txt_replace"];
}
if(chosen_nicks[z]["styleBg"].length > 1){
messageCell.style.background = chosen_nicks[z]["styleBg"];
}
if(chosen_nicks[z]["style_color"].length > 1){
messageCell.style.color = chosen_nicks[z]["style_color"];
}
}
}
//âíóòðåííèé öèêë - êîíåö
}
//âíåøíèé öèêë - êîíåö
}
imgCensor();
genHeight = shit.offsetHeight;
setTimeout("reduceHeight();setImgOpac()",100);
}

function imgCensor(){
var pix = document.images;
for(var x = 0; x < pix.length; x++){

for(var z = 0; z < censoredImg.length; z++){
if(censoredImg[z]["except"].length > 1 && pix[x].src == censoredImg[z]["except"]){continue;}
else if(pix[x].src.indexOf(censoredImg[z]["original"]) != -1){
if(censoredImg[z]["repl"].length > 0){pix[x].src = censoredImg[z]["repl"];}
else{
if((pix[x].width > 300) || (pix[x].height > 300)){pix[x].src = "padonak_pix/censored_big.gif";}
if((pix[x].width <= 100) || (pix[x].height <= 300)){pix[x].src = "padonak_pix/censored_small.gif";}
else{pix[x].src = "padonak_pix/censored_medium.gif";}
}
if(censoredImg[z]["ttl"].length > 0){
pix[x].title = " ïðè÷èíà ";
pix[x].style.cursor = "pointer";
pix[x].onclick = eval("function(){window.alert('" + censoredImg[z]["ttl"] + "');}");
}
}
else{continue;}
}
picResizer(pix[x], parseInt(document.body.clientWidth*0.65), parseInt(document.body.clientHeight*0.8));
}
}

function picResizer(obj, w, h){
var W = obj.width;
var H = obj.height;
var ratio = w/h;
if((W < w) && (H < h)){return;}
else{
var pic_ratio = W/H;
if(ratio < pic_ratio){h = w/pic_ratio;}
else{w = h*pic_ratio;}
obj.width = parseInt(w);
obj.height = parseInt(h);
var sPn = obj.parentNode;
var tD = sPn.parentNode;
var realSize_show = document.createElement("a");
realSize_show.setAttribute("href", "#null");
realSize_show.innerHTML = "<img src=\"padonak_pix/zoom_in.gif\" alt=\"\" hspace=\"10\" style=\"border:none\"> Óìåíüøåíî. Ïðîñìîòðåòü îðèãèíàë";
realSize_show.style.fontSize = 10 + "px";
realSize_show.style.textDecoration = "none";
realSize_show.style.fontWeight = "bold";
realSize_show.style.display = "block";
realSize_show.style.marginTop = 15 + "px";
realSize_show.style.marginBottom = 10 + "px";
realSize_show.onclick = function(){showPic(obj.src);}
realSize_show.onfocus = function(){this.blur();}
var ch_length = sPn.childNodes.length;
if(obj === sPn.childNodes[ch_length - 1]){sPn.appendChild(realSize_show);}
else{
if(obj.nextSibling){sPn.insertBefore(realSize_show, obj.nextSibling);}
}
}
}

//-->
