/*
 * Script by http://forucoz.com/
 *       and http://javascript.ucoz.net/
 *
 * By Bogggdan
 *
 */

function OpenOptTheme () {new _uWnd('optTheme', '????? ??????????', 198, 180, {align: 'left', autosize: true, fadespeed: 510, fadeclosespeed: 250, icon: IconWnd("no")}, '<br><input type="button" value="??????? ????" onclick="OptTheme(1)"> <input type="button" value="? ???????" onclick="OptTheme(2)">');}; function FidTid () {return location.href.split('/')[4].split('-')[0]+'-'+location.href.split('/')[4].split('-')[1];}; function IconWnd (s) {return 'http://javascript.ucoz.net/i/1/'+s+'.png';}; function OptTheme (a) { if ( a == 1 ) {_uWnd.reload('optTheme','<br><center>????????? ????...</center>'); _uWnd.setTitle('optTheme','????????? ????'); $.get('/forum/' + FidTid() + '-0-22-1', function(){_uWnd.reload('optTheme','<br><center>???? ???????</center>'); _uWnd.setTitle('optTheme','???? ???????'); setTimeout(function(){ _uWnd.close("optTheme"); } , 1200);});}; if ( a == 2 ) {_uWnd.close("optTheme"); new _uWnd('moveTheme', '? ???????', 280, 280, {align: 'left', autosize: true, fadespeed: 500, fadeclosespeed: 250, icon: IconWnd("move"), oncontent:function(){$("#reasonMoveThm").focus()}}, '<fieldset><legend>??????? ??????????? ???? ? ???????</legend><textarea rows="3" style="width:100%" id="reasonMoveThm"></textarea></fieldset><center><input type="button" value="??????????? ? ???????" id="clickMoveThm" onclick="moveTheme()"></center>'); }}; function moveTheme () {$("#clickMoveThm").attr({value: "?????????...", disabled: 1 }); $("#reasonMoveThm").attr("disabled", 1); var thisForum = $(".forumNamesBar .forumBar:eq(2)").html(); var thisFhref = $(".forumNamesBar .forumBar:eq(2)").attr("href"); var a = $("#reasonMoveThm").val() ? $("#reasonMoveThm").val() : "??????? ?? ???????"; var m = "?????? ???? ???? ?????????? ?? ??????? [url=" + thisFhref + "]" + thisForum + "[/url].\n??????? ???????????: " + a + "\n\n??????????: [url=" + _home_link + "index/8-" + _user_id + "]" + _username + "[/url]."; $.post("/forum/", {p: 0, a: 7, jkd428: 1, jkd498: 1, message: m, ahtml: 0, frmt: 1, smiles_on: 1, signature_on: 1, subscribe: 0, fid: location.href.split('/')[4].split('-')[0], tid: location.href.split('/')[4].split('-')[1], ssid: $("input[name='ssid']").val()}, function () {$.get("/forum/" + FidTid() + "-0-20-1", function (e) {$.post("/forum/", {name: $('input[name="name"]', $('cmd[p="content"]', e).text()).val(), description: $('input[name="description"]', $('cmd[p="content"]', e).text()).val(), nfid: _nfid, a: 20, fid: location.href.split('/')[4].split('-')[0], tt: 1, t: 1, tid: location.href.split('/')[4].split('-')[1]}, function(){ setTimeout(function(){ _uWnd.close("moveTheme"); } , 1200);_uWnd.reload('moveTheme','<br><center>???? ??????????</center>').checksize(); _uWnd.setTitle('moveTheme','???? ??????????'); });});});}

$(document).ready(function(){
$("select[name='modopt']").before("<input type='button' value='???????/? ???????' onclick='OpenOptTheme()'> ");
});