var o;var l;var m;var ai="cur1";var af="forum_posts";var ag="new_posts";function loadXMLDoc3(a){DisplayResult1("Тече актуализация...",ag);m=false;if(window.XMLHttpRequest&&!(window.ActiveXObject)){try{m=new XMLHttpRequest()}catch(b){m=false}}else{if(window.ActiveXObject){try{m=new ActiveXObject("Msxml2.XMLHTTP")}catch(b){try{m=new ActiveXObject("Microsoft.XMLHTTP")}catch(b){m=false}}}}if(m){m.onreadystatechange=processReqChange3;m.open("GET",a,true);m.send("")}}function loadXMLDoc2(a){DisplayResult1("Тече актуализация...",af);l=false;if(window.XMLHttpRequest&&!(window.ActiveXObject)){try{l=new XMLHttpRequest()}catch(b){l=false}}else{if(window.ActiveXObject){try{l=new ActiveXObject("Msxml2.XMLHTTP")}catch(b){try{l=new ActiveXObject("Microsoft.XMLHTTP")}catch(b){l=false}}}}if(l){l.onreadystatechange=processReqChange2;l.open("GET",a,true);l.send("")}}function loadXMLDoc(a){DisplayResult1("Тече актуализация...",ai);o=false;if(window.XMLHttpRequest&&!(window.ActiveXObject)){try{o=new XMLHttpRequest()}catch(b){o=false}}else{if(window.ActiveXObject){try{o=new ActiveXObject("Msxml2.XMLHTTP")}catch(b){try{o=new ActiveXObject("Microsoft.XMLHTTP")}catch(b){o=false}}}}if(o){o.onreadystatechange=processReqChange;o.open("GET",a,true);o.send("")}}function processReqChange(){if(o.readyState==4){if(o.status==200){DisplayResult1(o.responseText,ai)}else{alert("There was a problem retrieving the XML data:\n"+o.statusText)}}}function processReqChange2(){if(l.readyState==4){if(l.status==200){DisplayResult1(l.responseText,af)}else{alert("There was a problem retrieving the XML data:\n"+l.statusText)}}}function processReqChange3(){if(m.readyState==4){if(m.status==200){DisplayResult1(m.responseText,ag)}else{alert("There was a problem retrieving the XML data:\n"+m.statusText)}}}function DisplayResult1(b,a){var c;if(document.all){c=document.all[a]}else{c=document.getElementById(a)}if(c){c.innerHTML=b}}function OpenPopupPageFav(c,a,b,d){ao=window.open(c+"?itemID="+a+"&modeID="+b+"&watch="+d,"fav_window","width=250,height=300,left=200,top=250")}function SearchControl(b,a){this.M=b;this.G=a;this.as()}SearchControl.prototype.H=function(a){if(a.keyCode==13||a.which==13){a.cancel=true;a.returnValue=false;a.cancelBubble=true;if(a.stopPropagation){a.stopPropagation();a.preventDefault()}this.StartSearch()}};SearchControl.prototype.as=function(){var a=this;this.M.onkeydown=function(b){if(!b){b=window.event}a.H(b)}};SearchControl.prototype.StartSearch=function(){var a=this.M.value;if(a!=""){window.location.href=this.G+a}else{window.location.href=this.G}};function fpNewInformation(c,d){var a=new XHConn();DisplayResult1("Тече актуализация ...",d);if(!a){alert("XMLHTTP not available. Try a newer/better browser.")}var b=function(e){DisplayResult1(e.responseText,d)};a.connect(c,"GET","",b)}function fpSwitchNewMode1(){document.getElementById("new_bydate").className="current";document.getElementById("new_bydv").className="";fpNewInformation("ajax/ajax_new.aspx","new_posts")}function fpSwitchNewMode2(){document.getElementById("new_bydate").className="";document.getElementById("new_bydv").className="current";fpNewInformation("ajax/ajax_newlastdv.aspx","new_posts")}function fpSwitchPopular(){fpNewInformation("ajax/ajax_popular.aspx","new_posts")}function fpSwitchNewBlanks(){fpNewInformation("ajax/ajax_newblanks.aspx","new_posts")}function getCategories(){fpNewInformation("ajax/ajax_categories.aspx","categories")}function deleteParagraph(a){if(confirm("Наистина ли желаете да изтриете параграфа?")){window.location.href="admin/articleadd.aspx?aid="+a+"&mode=delete"}}function lpShowChanagesLast7Days(f,e){var c="ajax/ajax_moded7days.aspx";var d="cat="+f;var a=new XHConn();DisplayResult1("Тече актуализация ...",e);if(!a){alert("XMLHTTP not available. Try a newer/better browser.")}var b=function(g){DisplayResult1(g.responseText,e)};a.connect(c,"GET",d,b)}function XHConn(){var d,b=false;try{d=new ActiveXObject("Msxml2.XMLHTTP")}catch(a){try{d=new ActiveXObject("Microsoft.XMLHTTP")}catch(a){try{d=new XMLHttpRequest()}catch(a){d=false}}}if(!d){return null}this.connect=function(g,f,e,c){if(!d){return false}b=false;f=f.toUpperCase();try{if(f=="GET"){d.open(f,g+"?"+e,true);e=""}else{d.open(f,g,true);d.setRequestHeader("Method","POST "+g+" HTTP/1.1");d.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}d.onreadystatechange=function(){if(d.readyState==4&&!b){b=true;c(d)}};d.send(e)}catch(h){return false}return true};return this}function GoSiteFP(){var b=new XHConn();DisplayResult1("Тече актуализация ...","cur1");if(!b){alert("XMLHTTP not available. Try a newer/better browser.")}var d=function(g){DisplayResult1(g.responseText,"cur1")};b.connect("ajax/ajax_currencies.aspx","GET","",d);var c=new XHConn();DisplayResult1("Тече актуализация ...","db_last_changes");if(!c){alert("XMLHTTP not available. Try a newer/better browser.")}var e=function(g){DisplayResult1(g.responseText,"db_last_changes")};c.connect("ajax/ajax_lastdv.aspx","GET","",e);fpNewInformation("ajax/ajax_new.aspx","new_posts");var f=new XHConn();DisplayResult1("Тече актуализация ...","forum_posts");if(!f){alert("XMLHTTP not available. Try a newer/better browser.")}var a=function(g){DisplayResult1(g.responseText,"forum_posts")};f.connect("ajax/ajax_forumposts.aspx","GET","",a)}function HideWindow(){var a=document.getElementById("links_div");a.style.display="none"}function CallArhive(a){document.getElementById("panel").innerHTML="";document.getElementById("panel").style.display="block";fpNewInformation("ajax/ajax_oldrevisions.aspx?id="+a,"panel")}function CallLinks(a,b){document.getElementById("panel").innerHTML="";document.getElementById("panel").style.display="block";fpNewInformation("ajax/ajax_itemlinks.aspx?ba="+a+"&bp="+b,"panel")}function SetWindowMaximizedState(){top.window.moveTo(0,0);if(document.all){top.window.resizeTo(screen.availWidth,screen.availHeight)}else{if(document.layers||document.getElementById){if(top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){top.window.outerHeight=screen.availHeight;top.window.outerWidth=screen.availWidth}}}}function GoView(){SetWindowMaximizedState();var c=(navigator.appName.indexOf("Netscape")!=-1);var b=document;function a(i,g,h){var d=b.getElementById?b.getElementById(i):b.all?b.all[i]:b.layers[i];var f=document.layers?"":"px";window[i+"_obj"]=d;if(b.layers){d.style=d}d.ar=d.al=g;d.aq=d.ak=h;d.au=function(j,k){this.style.left=j+f;this.style.top=k+f};d.P=function(){var j,k;j=(this.al>=0)?0:c?innerWidth:document.documentElement&&document.documentElement.clientWidth?document.documentElement.clientWidth:document.body.clientWidth;k=c?pageYOffset:document.documentElement&&document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop;if(this.ak<0){k+=c?innerHeight:document.documentElement&&document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight}this.ar+=(j+this.al-this.ar)/8;this.aq+=(k+this.ak-this.aq)/8;this.au(this.ar,this.aq);setTimeout(this.id+"_obj.P()",40)};return d}var e;e=c?pageYOffset:document.documentElement&&document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop;e+=c?innerHeight:document.documentElement&&document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight;a("divTopLeft",20,e-15).P()};
