Array.prototype.push=function(){for(var a=0;a<arguments.length;a++){this[this.length]=arguments[a]}};Array.prototype.isSet=function(a){for(var b=0;b<this.length;b++){if(this[b]!=a){continue}else{return true}}return false};var PSIsChanging=false;var PSInfoBlock=null;var PSmSecondsLeft=0;var Observable=function(){this.observers={}};Observable.prototype.attachObserver=function(b,a){if(!(a instanceof Object)){return}if(!this.observers[b]){this.observers[b]=[]}a.attacher=this;this.observers[b].push(a)};Observable.prototype.detachObserver=function(b,a){if(this.observers[b]&&this.observers[b].indexOf(a)>-1){this.observers[b]=this.observers[b].without(a)}};Observable.prototype.detachObservers=function(){$H(this.observers).each((function(a){a.value.each((function(b,c){if(b.attacher==this){this.observers[a.key]=this.observers[a.key].without(b)}}).bind(this))}).bind(this))};Observable.prototype.notify=function(e,a){if(!this.observers[e]){return}for(var c=0,d=this.observers[e],b=d.length;c<b;c++){if(d[c] instanceof Function){d[c](e,this,a)}else{if(d[c].update instanceof Function){d[c].update(e,this,a)}}}};FCKeditorObservable=new Observable();FCKeditorObservable.attachOnLoad=function(a){this.attachObserver("FCKeditor_OnComplete",a)};FCKeditorObservable.notifyOnLoad=function(a){this.notify("FCKeditor_OnComplete",a)};function FCKeditor_OnComplete(a){FCKeditorObservable.notifyOnLoad(a)}function SyncFckInstances(){if(typeof(FCKeditorAPI)!="object"||typeof(FCKeditorAPI.__Instances)!="object"){return}for(var a in FCKeditorAPI.__Instances){var b=FCKeditorAPI.__Instances[a];if(b){b.UpdateLinkedField()}}}function ParseXmlString(d){if(typeof DOMParser!="undefined"){return(new DOMParser()).parseFromString(d,"application/xml")}else{if(typeof ActiveXObject!="undefined"){var c=new ActiveXObject("MSXML2.DOMDocument");c.loadXML(d);return c}else{var a="data:text/xml;charset=utf-8,"+encodeURIComponent(d);var b=new XMLHttpRequest();b.open("GET",a,false);b.send(null);return b.responseXML}}}function ParseAjaxResponse(b){if(b){var d=b.documentElement.getElementsByTagName("content")[0];var a=b.documentElement.getElementsByTagName("json")[0];d=d.firstChild.nodeValue;a=a.firstChild.nodeValue;Prototype.LoadScripts(d.extractSrcScripts());if(a!=null&&a!=""){try{a=a.evalJSON()}catch(c){alert(c)}}return{html:d,json:a}}else{return{html:null,json:null}}}var FCKCover=function(c,a){this._editorName=c;this._layer=new Element("div").addClassName("fck_cover").hide().update(a||"Loading…");try{document.body.insert({top:this._layer})}catch(b){}};FCKCover.prototype._position=function(a){if(!this._layer){return}var a=$(a);a.makePositioned();this._layer.clonePosition(a);a.undoPositioned()};FCKCover.prototype.Show=function(){var d=$(this._editorName+"___Frame");var a=$(this._editorName);if(d){var b=d;var c=null;if(b){c=(function(){this._position(d)}).bind(this);Event.observe(b,"resize",c)}Event.observe(d,"load",(function(){this._position(d)}).bind(this));this._position(d);this._layer.show()}else{if(a){}}};FCKCover.prototype.Destroy=function(){if(this._layer){this._layer.hide()}delete this._layer};FCKCover.prototype.Hide=function(){if(this._layer){this._layer.hide()}};function GetElementPosition(a){a=$(a);var b=Element.getDimensions(a);var c=Element.cumulativeOffset(a);return[c.left,c.top,b.width,b.height]}Prototype.LoadSingleScript=function(url){if(!Object.isString(url)||url.length==0){return}var flag=false;var ifr=$("dynamic_holder");ifr.onerror=(function(){flag=true}).bind(this);ifr.onload=(function(){flag=true}).bind(this);ifr.src=url;while(!flag){}eval(ifr.innerHTML)};Prototype.LoadScripts=function(b,a){if(b==null){return}if(b.length==null){b=[b]}b.each(function(c){new Ajax.Request(c,{method:"get",asynchronous:false,onSuccess:(function(d){execJavaScript(d.responseText)})})})};function execJavaScript(script){if(typeof(script)!=="string"){return}script=script.replace(/(<!--)|((\/\/)?-->)/g,"");if(script.length==0){return}if(window.execScript){window.execScript(script)}else{eval.call(window,script)}}function CreateService(){return new XmlHttpCommunicatorDef("/specs/service.php")}function CreateAdminService(){return new XmlHttpCommunicatorDef("/specs/admin.php")}function CreateCommandService(){return new XmlHttpCommunicatorDef("/specs/command.php")}CreateFeederService=function(){return new XmlHttpCommunicatorDef("/specs/feeder.php")};function AppendOnLoadEvent(a){if(typeof a!="function"){a=new Function(a)}document.observe("dom:loaded",a)}if(window.attachEvent){window.attachEvent("onbeforeunload",(function(){var a=window.__flash__removeCallback;window.__flash__removeCallback=function(c,d){try{a(c,d)}catch(b){}}}))}function CollapseExpand(a,b){var d=$(b);var c=$(a);if(c.style.display=="none"){c.style.display="";d.src="/res/grpopen.gif"}else{c.style.display="none";d.src="/res/grpclsd.gif"}}function BlockActionEffect(g){if(typeof(g)=="string"){var g=Try.these(function(){return $$(g)[0]})}else{g=$(g)}if(!g){return}var f=g.cumulativeOffset();var c=g.getDimensions();var e=document.viewport.getScrollOffsets();var a=document.viewport.getDimensions();var b={x:null,y:null};if(e.top>f.top){b.y=f.top}else{if((e.top+a.height)<(f.top+c.height)){b.y=e.top+Math.min(f.top+c.height-e.top-a.height,f.top-e.top)}}if(e.left>f.left){b.x=f.left}else{if(e.left+a.width<f.left+c.width){b.x=e.top+Math.min(f.left+c.width-e.left-a.width,f.left-e.left)}}if(b.y==null){return false}var d=new fx.ViewPortScrollVertical({duration:400});d.toggle(b.y)}function CloseMessageBox(b){var a=$(b);if(a==null){return}a.style.display="none";document.body.removeChild(a)}var _messageWindowsArray=[];function ShowMessageBox(b,h,e,k){var i=h.Caption;var j=h.Message;var f=e==null?200:e.Y;var c=e==null?document.body.offsetWidth/2-150:e.X;var a=(k==null?300:k.Width)+"px";var g=(k==null?150:k.Height)+"px";var d='<div id="popupSrc" class="avatarEditPopup" style="width:'+a+";height:"+g+';position:relative;"><table width="100%" class="main"><tr><td class="headLine">'+i+'</td><td class="headLine" align="right"><img src="/res/close.gif" onclick="_messageWindowsArray['+b+'].hide();" style="cursor: pointer"></td></tr><tr><td colspan="2">'+j+'</td></tr><tr><td colspan="2"><input type="button" class="padded_button" id="msg_box_ok_'+b+'" value="OK" onclick="_messageWindowsArray['+b+'].hide();"/></td></tr></table></div>';if(_messageWindowsArray[b]){_messageWindowsArray[b].initElement(d)}else{_messageWindowsArray[b]=WindowManager.BaseWindow({modal:true,center:true,elSrc:d,bgClickClose:1})}_messageWindowsArray[b].show();$("msg_box_ok_"+b).focus()}function RunClose(){if(PSmSecondsLeft<=0){PSHideInfo()}else{var a="PSmSecondsLeft -= 100; RunClose();";window.setTimeout(a,100)}}function AddSeconds(){PSmSecondsLeft=8000}function PSShowInfo(k,f){PSHideInfo();var g,e;var a=350,l=100;doc=window.document;if(PSInfoBlock==null){PSInfoBlock=doc.createElement("DIV");PSInfoBlock.style.display="none";PSInfoBlock.style.background="#E0E0E0";PSInfoBlock.style.overflow="hidden";PSInfoBlock.style.border="solid black 1px";doc.body.appendChild(PSInfoBlock)}else{while(PSInfoBlock.hasChildNodes()){PSInfoBlock.removeChild(PSInfoBlock.lastChild)}}var m=doc.createElement("TABLE");m.cellSpacing="0";m.cellPadding="0";m.style.fontSize="12px";m.style.width="100%";AddSeconds();PSInfoBlock.onmousein=AddSeconds;PSInfoBlock.onmousemove=AddSeconds;PSInfoBlock.onmousewheel=AddSeconds;PSInfoBlock.onscroll=AddSeconds;PSInfoBlock.appendChild(m);var d,n;if((f==null)||(f.length==null)||(f.length==0)){return}else{a=350;var c=0;l=(f.length)*19;for(g=0;g<f.length;g++){var b=f[g];d=m.insertRow(c++);if(g&1){d.style.background="#FFFFFF"}for(e=0;e<b.length;e++){n=d.insertCell(e);if(e==0){n.style.width="100%"}n.style.padding="2px";n.appendChild(doc.createTextNode(b[e]));n.noWrap=true;if((e+1)<b.length){n.className="right_dashed"}}}}PSInfoBlock.style.width=a+"px";PSInfoBlock.style.height=l+"px";PSInfoBlock.style.position="absolute";var h=GetElementPosition((k.target!=null)?k.target:k.srcElement);PSInfoBlock.style.left=(h[0]+30)+"px";PSInfoBlock.style.top=(h[1]+30)+"px";PSInfoBlock.style.display=""}function PSHideInfo(){if(PSInfoBlock!=null){PSInfoBlock.style.display="none"}}function Trim(a){if(typeof a!="undefined"){return a.toString().replace(/^\s+|\s+$/g,"")}}function SetFckOnBlur(e,f){var d=$(e+"___Frame");var b=$(e);if(d){var a=FCKeditorAPI.GetInstance(e);if(a==null){return}if(a.EditMode){var c=a.EditingArea.Textarea;c.onblur=f}else{a.Events.AttachEvent("OnBlur",typeof(f)!="function"?new Function(f):f);a.Events.AttachEvent("OnAfterSetHTML",typeof(f)!="function"?new Function(f):f)}}else{if(b){b.onblur=f}}}function GetFckHtml(f){var e=$(f+"___Frame");var b=$(f);var d="";if(e){var a=FCKeditorAPI.GetInstance(f);if(a==null){return""}if(a.EditMode){var c=a.EditingArea.Textarea;d=c.value}else{a.UpdateLinkedField();d=a.GetData()}}else{if(b){d=b.value}}if(d=="<br>"){d=""}return d}function SetFckHtml(f,c){var e=$(f+"___Frame");var b=$(f);if(e){var a=FCKeditorAPI.GetInstance(f);if(a==null){return}if(a.EditMode){var d=a.EditingArea.Textarea;d.value=c}else{a.SetData(c,true)}}else{if(b){b.value=c}}}function SetCookie(b,c,a){var d=new Date();d.setDate(d.getDate()+a);document.cookie=b+"="+escape(c)+((a==null)?"":";expires = "+d.toGMTString())}function GetCookie(a){if(document.cookie.length>0){c_start=document.cookie.indexOf(a+"=");if(c_start!=-1){c_start=c_start+a.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1){c_end=document.cookie.length}return unescape(document.cookie.substring(c_start,c_end))}}return""}function EraseCookie(a){SetCookie(a,"",-1)}function PingUser(){try{var b=new XmlHttpCommunicatorDef("/specs/ping.php?r="+Math.random());b.Get()}catch(a){}}var ImageNavigation={go:function(c,a,d){if(Object.isElement(c)&&a){c.setAttribute("action",a);c.setAttribute("method","post");var b=document.createElement("input");b.setAttribute("type","hidden");b.setAttribute("name","set");b.value=encodeURIComponent(d);c.appendChild(b);c.submit()}}};function getPageSize(){var c,a;if(window.innerHeight&&window.scrollMaxY){c=document.body.scrollWidth;a=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){c=document.body.scrollWidth;a=document.body.scrollHeight}else{if(document.documentElement&&document.documentElement.scrollHeight>document.documentElement.offsetHeight){c=document.documentElement.scrollWidth;a=document.documentElement.scrollHeight}else{c=document.body.offsetWidth;a=document.body.offsetHeight}}}var b,d;if(self.innerHeight){b=self.innerWidth;d=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){b=document.documentElement.clientWidth;d=document.documentElement.clientHeight}else{if(document.body){b=document.body.clientWidth;d=document.body.clientHeight}}}if(a<d){pageHeight=d}else{pageHeight=a}if(c<b){pageWidth=b}else{pageWidth=c}return[pageWidth,pageHeight,b,d]}function getPageHeight(){return(getPageSize())[1]}var ErrorNotificator={window:null,cmm:null,fckId:"text_cmpl",emptyTextNotif:"input text!",errorType:8,itemId:0,itemType:0,popupCaption:"",onComplete:null,showReady:function(){this.window.show();SetFckHtml(this.fckId,"");return this},show:function(){if(this.window!=null){return this.showReady()}if(this.cmm==null){this.cmm=new CreateService()}if(this.cmm.IsProcessing()){return this}this.cmm.OnComplete=(function(a){this.window=WindowManager.BaseWindow({modal:true,center:true,noScrollTop:true,elSrc:a.Text});this.showReady()}).bind(this);this.cmm.CallSimpleMethod2("RenderNotificationWindow",{EditorId:this.fckId,Caption:this.popupCaption});return this},hide:function(){this.window.hide()},context:function(a){this.itemType=parseInt(a.itemType)||this.itemType;this.itemId=parseInt(a.itemId)||this.itemId;this.fckId=parseInt(a.fckId)||this.fckId;this.emptyTextNotif=a.emptyTextNotif||this.emptyTextNotif;this.errorType=parseInt(a.errorType)||this.errorType;this.popupCaption=a.popupCaption||this.popupCaption;this.onComplete=a.onComplete||this.onComplete;return this},send:function(d,c){var b=Trim(GetFckHtml(this.fckId));if(b.blank()){alert(this.emptyTextNotif);return}if(this.cmm.IsProcessing()){return}var a={ItemId:this.itemId,ItemType:this.itemType,CmplType:this.errorType,Content:b};this.cmm.OnComplete=(function(e){var f=e.Text.evalJSON();alert(f.Msg);if(typeof this.onComplete=="function"){this.onComplete.bind(this)(f)}}).bind(this);this.cmm.CallSimpleMethod2("ErrorNotify",a);this.window.hide();return this}};window.setInterval(PingUser,120000);