");$("#dlepopup").dialog({autoOpen:!0,width:500,resizable:!1,dialogClass:"modalfixed dle-popup-sendmessage",buttons:b});$(".modalfixed.ui-dialog").css({position:"fixed"});$("#dlepopup").dialog("option","position",{my:"center",at:"center",of:window})}
function AddComplaint(a,b){var c={},d="";c[dle_act_lang[3]]=function(){$(this).dialog("close")};c[dle_p_send]=function(){if(1>$("#dle-promt-text").val().length)$("#dle-promt-text").addClass("ui-state-error");else{var e=$("#dle-promt-text").val(),f="";$("#dle-promt-mail").val()&&(f=$("#dle-promt-mail").val());$(this).dialog("close");$("#dlepopup").remove();$.post(dle_root+"engine/ajax/controller.php?mod=complaint",{id:a,text:e,action:b,mail:f,user_hash:dle_login_hash},function(g){"ok"==g?DLEalert(dle_p_send_ok,dle_info):DLEalert(g,dle_info)})}};$("#dlepopup").remove();5==dle_group&&(d=dle_mail+' ');$("body").append("
"+dle_complaint+" "+d+"
");$("#dlepopup").dialog({autoOpen:!0,width:600,resizable:!1,dialogClass:"modalfixed dle-popup-complaint",buttons:c});$(".modalfixed.ui-dialog").css({position:"fixed"});$("#dlepopup").dialog("option","position",{my:"center",at:"center",of:window})}
function DLEalert(a,b){$("#dlepopup").remove();$("body").append("
"+a+"
");$("#dlepopup").dialog({autoOpen:!0,width:470,resizable:!1,dialogClass:"modalfixed dle-popup-alert",buttons:{Ok:function(){$(this).dialog("close");$("#dlepopup").remove()}}});$(".modalfixed.ui-dialog").css({position:"fixed"});$("#dlepopup").dialog("option","position",{my:"center",at:"center",of:window})}
function DLEconfirm(a,b,c){var d={};d[dle_act_lang[1]]=function(){$(this).dialog("close");$("#dlepopup").remove()};d[dle_act_lang[0]]=function(){$(this).dialog("close");$("#dlepopup").remove();c&&c()};$("#dlepopup").remove();$("body").append("
"+a+"
");$("#dlepopup").dialog({autoOpen:!0,width:500,resizable:!1,dialogClass:"modalfixed dle-popup-confirm",buttons:d});$(".modalfixed.ui-dialog").css({position:"fixed"});$("#dlepopup").dialog("option","position",{my:"center",at:"center",of:window})}
function DLEprompt(a,b,c,d,e){var f={};f[dle_act_lang[3]]=function(){$(this).dialog("close")};f[dle_act_lang[2]]=function(){if(!e&&1>$("#dle-promt-text").val().length)$("#dle-promt-text").addClass("ui-state-error");else{var g=$("#dle-promt-text").val();$(this).dialog("close");$("#dlepopup").remove();d&&d(g)}};$("#dlepopup").remove();$("body").append("
"+a+"
");$("#dlepopup").dialog({autoOpen:!0,width:500,resizable:!1,dialogClass:"modalfixed dle-popup-promt",buttons:f});$(".modalfixed.ui-dialog").css({position:"fixed"});$("#dlepopup").dialog("option","position",{my:"center",at:"center",of:window});0');$("#modal-overlay").css({filter:"alpha(opacity=40)"}).fadeIn("slow");$("#dleuserpopup").remove();$("body").append("");d[dle_act_lang[3]]=function(){$(this).dialog("close");$("#dleuserpopup").remove()};d[dle_act_lang[5]]=function(){window.frames.edituserframe.confirmDelete(dle_login_hash)};d[dle_act_lang[4]]=function(){document.getElementById("edituserframe").contentWindow.document.getElementById("saveuserform").submit()};$("#dleuserpopup").dialog({autoOpen:!0,width:700,resizable:!1,dialogClass:"modalfixed dle-popup-userprofileadmin",buttons:d,open:function(e,f){$("#dleuserpopup").html("")},beforeClose:function(e,f){$("#dleuserpopup").html("")},close:function(e,f){$("#modal-overlay").fadeOut("slow",function(){$("#modal-overlay").remove()})}});830<$(window).width()&&530<$(window).height()&&($(".modalfixed.ui-dialog").css({position:"fixed"}),$("#dleuserpopup").dialog("option","position",{my:"center",at:"center",of:window}));return!1});$("#dleprofilepopup").remove();$("body").append(a);$("#dleprofilepopup").dialog({autoOpen:!0,resizable:!1,dialogClass:"dle-popup-userprofile",buttons:c,width:550});return!1}
function ShowProfile(a,b,c){if(dle_user_profile==a&&document.getElementById("dleprofilepopup"))return $("#dleprofilepopup").dialog("open"),!1;dle_user_profile=a;dle_user_profile_link=b;ShowLoading("");$.get(dle_root+"engine/ajax/controller.php?mod=profile",{name:a,skin:dle_skin,user_hash:dle_login_hash},function(d){HideLoading("");ShowPopupProfile(d,c)});return!1}
function FastSearch(){$("#story").attr("autocomplete","off");$("#story").blur(function(){$("#searchsuggestions").fadeOut()});$("#story").keyup(function(){var a=$(this).val();0==a.length?$("#searchsuggestions").fadeOut():dle_search_value!=a&&a.length>=dle_min_search&&(clearInterval(dle_search_delay),dle_search_delay=setInterval(function(){dle_do_search(a)},600))})}
function dle_do_search(a){clearInterval(dle_search_delay);$("#searchsuggestions").remove();$("body").append("");$.post(dle_root+"engine/ajax/controller.php?mod=search",{query:""+a,user_hash:dle_login_hash},function(b){$("#searchsuggestions").html(b).fadeIn().css({position:"absolute",top:0,left:0}).position({my:"left top",at:"left bottom",of:"#story",collision:"fit flip"})});dle_search_value=a}
function ShowLoading(a){$("#loading-layer").remove();$("body").append("");a?$("#loading-layer").html(a):$("#loading-layer").html(dle_act_lang[6]);a=($(window).width()-$("#loading-layer").width())/2;var b=($(window).height()-$("#loading-layer").height())/2;$("#loading-layer").css({left:a+"px",top:b+"px",position:"fixed",zIndex:"99"});$("#loading-layer").fadeTo("slow",.6)}
function HideLoading(a){$("#loading-layer").fadeOut("slow",function(){$("#loading-layer").remove()})}
function ShowAllVotes(){if(document.getElementById("dlevotespopup"))return $("#dlevotespopup").dialog("open"),!1;$.ajaxSetup({cache:!1});ShowLoading("");$.get(dle_root+"engine/ajax/controller.php?mod=allvotes&dle_skin="+dle_skin,function(a){HideLoading("");$("#dlevotespopup").remove();$("body").append(a);$(".dlevotebutton").button();$("#dlevotespopup").dialog({autoOpen:!0,resizable:!1,dialogClass:"dle-popup-allvotes",width:600});400<$("#dlevotespopupcontent").height()&&$("#dlevotespopupcontent").height(400);$("#dlevotespopup").dialog("option","height",$("#dlevotespopupcontent").height()+60);$("#dlevotespopup").dialog("option","position","center")});return!1}
function fast_vote(a){var b=$("#vote_"+a+" input:radio[name=vote_check]:checked").val();if("undefined"==typeof b)return!1;ShowLoading("");$.get(dle_root+"engine/ajax/controller.php?mod=vote",{vote_id:a,vote_action:"vote",vote_mode:"fast_vote",vote_check:b,dle_skin:dle_skin,user_hash:dle_login_hash},function(c){HideLoading("");$("#dle-vote_list-"+a).fadeOut(500,function(){$(this).html(c);$(this).fadeIn(500)})});return!1}
function AddIgnorePM(a,b){DLEconfirm(b,dle_confirm,function(){ShowLoading("");$.get(dle_root+"engine/ajax/controller.php?mod=pm",{id:a,action:"add_ignore",skin:dle_skin,user_hash:dle_login_hash},function(c){HideLoading("");DLEalert(c,dle_info);return!1})})}
function DelIgnorePM(a,b){DLEconfirm(b,dle_confirm,function(){ShowLoading("");$.get(dle_root+"engine/ajax/controller.php?mod=pm",{id:a,action:"del_ignore",skin:dle_skin,user_hash:dle_login_hash},function(c){HideLoading("");$("#dle-ignore-list-"+a).html("");DLEalert(c,dle_info);return!1})});return!1}
function DelSocial(a,b){DLEconfirm(b,dle_confirm,function(){ShowLoading("");$.get(dle_root+"engine/ajax/controller.php?mod=adminfunction",{id:a,action:"del_social",user_hash:dle_login_hash},function(c){HideLoading("");$("#dle-social-list-"+a).html("");DLEalert(c,dle_info);return!1})});return!1}
function subscribe(a){DLEconfirm(dle_sub_agree,dle_confirm,function(){ShowLoading("");$.get(dle_root+"engine/ajax/controller.php?mod=commentssubscribe",{news_id:a,skin:dle_skin,user_hash:dle_login_hash},function(b){HideLoading("");b.success?DLEalert(b.info,dle_info):b.error&&DLEalert(b.errorinfo,dle_info)},"json")});return!1}
function media_upload(a,b,c,d){var e=(new Date).getTime(),f="none";$("#mediaupload").remove();$("body").append("");$("#mediaupload").dialog({autoOpen:!0,width:710,resizable:!1,dialogClass:"modalfixed dle-popup-upload",open:function(g,h){$("#mediaupload").html("");$(".ui-dialog").draggable("option","containment","")},dragStart:function(g,h){f=$(".modalfixed").css("box-shadow");$(".modalfixed").fadeTo(0,.6).css("box-shadow","none");$("#mediaupload").css("visibility","hidden")},dragStop:function(g,h){$(".modalfixed").fadeTo(0,1).css("box-shadow",f);$("#mediaupload").css("visibility","visible")},beforeClose:function(g,h){$("#mediaupload").html("")}});830<$(window).width()&&530<$(window).height()&&($(".modalfixed.ui-dialog").css({position:"fixed"}),$("#mediaupload").dialog("option","position",{my:"center",at:"center",of:window}));return!1}
function dropdownmenu(a,b,c,d){window.event?event.cancelBubble=!0:b.stopPropagation&&b.stopPropagation();b=$("#dropmenudiv");if(b.is(":visible"))return clearhidemenu(),b.fadeOut("fast"),!1;b.remove();$("body").append('');b=$("#dropmenudiv");b.html(c.join(""));d&&b.width(d);c=$(document).width()-30;d=$(a).offset();c-d.lefta("#dle-promt-text").val().length)a("#dle-promt-text").addClass("ui-state-error");else{var g=a("#dle-promt-text").val(),h=a("#orfom").text(),k="";a("#dle-promt-mail").val()&&(k=a("#dle-promt-mail").val());a(this).dialog("close");a("#dlepopup").remove();a.post(dle_root+"engine/ajax/controller.php?mod=complaint",{seltext:h,text:g,mail:k,user_hash:dle_login_hash,action:"orfo",url:window.location.href},function(l){"ok"==l?DLEalert(dle_p_send_ok,dle_info):DLEalert(l,dle_info)})}};a("#dlepopup").remove();5==dle_group&&(d=dle_mail+' ');a("body").append("