var Prototype={Version:"1.6.0",Browser:{IE:!(!window.attachEvent||window.opera),Opera:!!window.opera,WebKit:navigator.userAgent.indexOf("AppleWebKit/")>-1,Gecko:navigator.userAgent.indexOf("Gecko")>-1&&navigator.userAgent.indexOf("KHTML")==-1,MobileSafari:!!navigator.userAgent.match(/Apple.*Mobile.*Safari/)},BrowserFeatures:{XPath:!!document.evaluate,ElementExtensions:!!window.HTMLElement,SpecificElementExtensions:document.createElement("div").__proto__&&document.createElement("div").__proto__!==
document.createElement("form").__proto__},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari)Prototype.BrowserFeatures.SpecificElementExtensions=!1;if(Prototype.Browser.WebKit)Prototype.BrowserFeatures.XPath=!1;
var Class={create:function(){function a(){this.initialize.apply(this,arguments)}var b=null,c=$A(arguments);Object.isFunction(c[0])&&(b=c.shift());Object.extend(a,Class.Methods);a.superclass=b;a.subclasses=[];if(b){var d=function(){};d.prototype=b.prototype;a.prototype=new d;b.subclasses.push(a)}for(b=0;b<c.length;b++)a.addMethods(c[b]);if(!a.prototype.initialize)a.prototype.initialize=Prototype.emptyFunction;return a.prototype.constructor=a},Methods:{addMethods:function(a){var b=this.superclass&&
this.superclass.prototype,c=Object.keys(a);Object.keys({toString:!0}).length||c.push("toString","valueOf");for(var d=0,e=c.length;d<e;d++){var f=c[d],g=a[f];if(b&&Object.isFunction(g)&&g.argumentNames().first()=="$super")var h=g,g=Object.extend(function(a){return function(){return b[a].apply(this,arguments)}}(f).wrap(h),{valueOf:function(){return h},toString:function(){return h.toString()}});this.prototype[f]=g}return this}}},Abstract={};Object.extend=function(a,b){for(var c in b)a[c]=b[c];return a};
Object.extend(Object,{inspect:function(a){try{return a===void 0?"undefined":a===null?"null":a.inspect?a.inspect():a.toString()}catch(b){if(b instanceof RangeError)return"...";throw b;}},toJSON:function(a){switch(typeof a){case "undefined":case "function":case "unknown":return;case "boolean":return a.toString()}if(a===null)return"null";if(a.toJSON)return a.toJSON();if(!Object.isElement(a)){var b=[],c;for(c in a){var d=Object.toJSON(a[c]);d!==void 0&&b.push(c.toJSON()+": "+d)}return"{"+b.join(", ")+
"}"}},toQueryString:function(a){return $H(a).toQueryString()},toHTML:function(a){return a&&a.toHTML?a.toHTML():String.interpret(a)},keys:function(a){var b=[],c;for(c in a)b.push(c);return b},values:function(a){var b=[],c;for(c in a)b.push(a[c]);return b},clone:function(a){return Object.extend({},a)},isElement:function(a){return a&&a.nodeType==1},isArray:function(a){return a&&a.constructor===Array},isHash:function(a){return a instanceof Hash},isFunction:function(a){return typeof a=="function"},isString:function(a){return typeof a==
"string"},isNumber:function(a){return typeof a=="number"},isUndefined:function(a){return typeof a=="undefined"}});
Object.extend(Function.prototype,{argumentNames:function(){var a=this.toString().match(/^[\s\(]*function[^(]*\((.*?)\)/)[1].split(",").invoke("strip");return a.length==1&&!a[0]?[]:a},bind:function(){if(arguments.length<2&&arguments[0]===void 0)return this;var a=this,b=$A(arguments),c=b.shift();return function(){return a.apply(c,b.concat($A(arguments)))}},bindAsEventListener:function(){var a=this,b=$A(arguments),c=b.shift();return function(d){return a.apply(c,[d||window.event].concat(b))}},curry:function(){if(!arguments.length)return this;
var a=this,b=$A(arguments);return function(){return a.apply(this,b.concat($A(arguments)))}},interpret:function(a){return a==null?"":String(a)},delay:function(){var a=this,b=$A(arguments),c=b.shift()*1E3;return window.setTimeout(function(){return a.apply(a,b)},c)},wrap:function(a){var b=this;return function(){return a.apply(this,[b.bind(this)].concat($A(arguments)))}},methodize:function(){if(this._methodized)return this._methodized;var a=this;return this._methodized=function(){return a.apply(null,
[this].concat($A(arguments)))}}});Function.prototype.defer=Function.prototype.delay.curry(0.01);Date.prototype.toJSON=function(){return'"'+this.getUTCFullYear()+"-"+(this.getUTCMonth()+1).toPaddedString(2)+"-"+this.getUTCDate().toPaddedString(2)+"T"+this.getUTCHours().toPaddedString(2)+":"+this.getUTCMinutes().toPaddedString(2)+":"+this.getUTCSeconds().toPaddedString(2)+'Z"'};var Try={these:function(){for(var a,b=0,c=arguments.length;b<c;b++){var d=arguments[b];try{a=d();break}catch(e){}}return a}};
RegExp.prototype.match=RegExp.prototype.test;RegExp.escape=function(a){return String(a).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")};
var PeriodicalExecuter=Class.create({initialize:function(a,b){this.callback=a;this.frequency=b;this.currentlyExecuting=!1;this.registerCallback()},registerCallback:function(){this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1E3)},execute:function(){this.callback(this)},stop:function(){if(this.timer)clearInterval(this.timer),this.timer=null},onTimerEvent:function(){if(!this.currentlyExecuting)try{this.currentlyExecuting=!0,this.execute()}finally{this.currentlyExecuting=!1}}});
Object.extend(String,{interpret:function(a){return a==null?"":String(a)},specialChar:{"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r","\\":"\\\\"}});
Object.extend(String.prototype,{gsub:function(a,b){for(var c="",d=this,e,b=arguments.callee.prepareReplacement(b);d.length>0;)(e=d.match(a))?(c+=d.slice(0,e.index),c+=String.interpret(b(e)),d=d.slice(e.index+e[0].length)):(c+=d,d="");return c},sub:function(a,b,c){b=this.gsub.prepareReplacement(b);c=c===void 0?1:c;return this.gsub(a,function(a){return--c<0?a[0]:b(a)})},scan:function(a,b){this.gsub(a,b);return String(this)},truncate:function(a,b){a=a||30;b=b===void 0?"...":b;return this.length>a?this.slice(0,
a-b.length)+b:String(this)},strip:function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,"")},stripScripts:function(){return this.replace(RegExp(Prototype.ScriptFragment,"img"),"")},extractScripts:function(){var a=RegExp(Prototype.ScriptFragment,"im");return(this.match(RegExp(Prototype.ScriptFragment,"img"))||[]).map(function(b){return(b.match(a)||["",""])[1]})},evalScripts:function(){return this.extractScripts().map(function(a){return eval(a)})},
escapeHTML:function(){var a=arguments.callee;a.text.data=this;return a.div.innerHTML},unescapeHTML:function(){var a=new Element("div");a.innerHTML=this.stripTags();return a.childNodes[0]?a.childNodes.length>1?$A(a.childNodes).inject("",function(a,c){return a+c.nodeValue}):a.childNodes[0].nodeValue:""},toQueryParams:function(a){var b=this.strip().match(/([^?#]*)(#.*)?$/);return!b?{}:b[1].split(a||"&").inject({},function(a,b){if((b=b.split("="))[0]){var e=decodeURIComponent(b.shift()),f=b.length>1?
b.join("="):b[0];f!=void 0&&(f=decodeURIComponent(f));e in a?(Object.isArray(a[e])||(a[e]=[a[e]]),a[e].push(f)):a[e]=f}return a})},toArray:function(){return this.split("")},succ:function(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1)},times:function(a){return a<1?"":Array(a+1).join(this)},camelize:function(){var a=this.split("-"),b=a.length;if(b==1)return a[0];for(var c=this.charAt(0)=="-"?a[0].charAt(0).toUpperCase()+a[0].substring(1):a[0],d=1;d<b;d++)c+=
a[d].charAt(0).toUpperCase()+a[d].substring(1);return c},capitalize:function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()},underscore:function(){return this.gsub(/::/,"/").gsub(/([A-Z]+)([A-Z][a-z])/,"#{1}_#{2}").gsub(/([a-z\d])([A-Z])/,"#{1}_#{2}").gsub(/-/,"_").toLowerCase()},dasherize:function(){return this.gsub(/_/,"-")},inspect:function(a){var b=this.gsub(/[\x00-\x1f\\]/,function(a){var b=String.specialChar[a[0]];return b?b:"\\u00"+a[0].charCodeAt().toPaddedString(2,
16)});return a?'"'+b.replace(/"/g,'\\"')+'"':"'"+b.replace(/'/g,"\\'")+"'"},toJSON:function(){return this.inspect(!0)},unfilterJSON:function(a){return this.sub(a||Prototype.JSONFilter,"#{1}")},isJSON:function(){return/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/.test(this.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,""))},evalJSON:function(a){var b=this.unfilterJSON();try{if(!a||b.isJSON())return eval("("+b+")")}catch(c){}throw new SyntaxError("Badly formed JSON string: "+this.inspect());},include:function(a){return this.indexOf(a)>
-1},startsWith:function(a){return this.indexOf(a)===0},endsWith:function(a){var b=this.length-a.length;return b>=0&&this.lastIndexOf(a)===b},empty:function(){return this==""},blank:function(){return/^\s*$/.test(this)},interpolate:function(a,b){return(new Template(this,b)).evaluate(a)}});
(Prototype.Browser.WebKit||Prototype.Browser.IE)&&Object.extend(String.prototype,{escapeHTML:function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},unescapeHTML:function(){return this.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">")}});String.prototype.gsub.prepareReplacement=function(a){if(Object.isFunction(a))return a;var b=new Template(a);return function(a){return b.evaluate(a)}};String.prototype.parseQuery=String.prototype.toQueryParams;
Object.extend(String.prototype.escapeHTML,{div:document.createElement("div"),text:document.createTextNode("")});with(String.prototype.escapeHTML)div.appendChild(text);
var Template=Class.create({initialize:function(a,b){this.template=a.toString();this.pattern=b||Template.Pattern},evaluate:function(a){Object.isFunction(a.toTemplateReplacements)&&(a=a.toTemplateReplacements());return this.template.gsub(this.pattern,function(b){if(a==null)return"";var c=b[1]||"";if(c=="\\")return b[2];var d=a,e=b[3],f=/^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/,b=f.exec(e);if(b==null)return c;for(;b!=null;){var g=b[1].startsWith("[")?b[2].gsub("\\\\]","]"):b[1],d=d[g];if(null==d||""==
b[3])break;e=e.substring("["==b[3]?b[1].length:b[0].length);b=f.exec(e)}return c+String.interpret(d)}.bind(this))}});Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;
var $break={},Enumerable={each:function(a,b){var c=0,a=a.bind(b);try{this._each(function(b){a(b,c++)})}catch(d){if(d!=$break)throw d;}return this},eachSlice:function(a,b,c){for(var b=b?b.bind(c):Prototype.K,d=-a,e=[],f=this.toArray();(d+=a)<f.length;)e.push(f.slice(d,d+a));return e.collect(b,c)},all:function(a,b){var a=a?a.bind(b):Prototype.K,c=!0;this.each(function(b,e){c=c&&!!a(b,e);if(!c)throw $break;});return c},any:function(a,b){var a=a?a.bind(b):Prototype.K,c=!1;this.each(function(b,e){if(c=
!!a(b,e))throw $break;});return c},collect:function(a,b){var a=a?a.bind(b):Prototype.K,c=[];this.each(function(b,e){c.push(a(b,e))});return c},detect:function(a,b){var a=a.bind(b),c;this.each(function(b,e){if(a(b,e))throw c=b,$break;});return c},findAll:function(a,b){var a=a.bind(b),c=[];this.each(function(b,e){a(b,e)&&c.push(b)});return c},grep:function(a,b,c){var b=b?b.bind(c):Prototype.K,d=[];Object.isString(a)&&(a=RegExp(a));this.each(function(c,f){a.match(c)&&d.push(b(c,f))});return d},include:function(a){if(Object.isFunction(this.indexOf)&&
this.indexOf(a)!=-1)return!0;var b=!1;this.each(function(c){if(c==a)throw b=!0,$break;});return b},inGroupsOf:function(a,b){b=b===void 0?null:b;return this.eachSlice(a,function(c){for(;c.length<a;)c.push(b);return c})},inject:function(a,b,c){b=b.bind(c);this.each(function(c,e){a=b(a,c,e)});return a},invoke:function(a){var b=$A(arguments).slice(1);return this.map(function(c){return c[a].apply(c,b)})},max:function(a,b){var a=a?a.bind(b):Prototype.K,c;this.each(function(b,e){b=a(b,e);if(c==void 0||b>=
c)c=b});return c},min:function(a,b){var a=a?a.bind(b):Prototype.K,c;this.each(function(b,e){b=a(b,e);if(c==void 0||b<c)c=b});return c},partition:function(a,b){var a=a?a.bind(b):Prototype.K,c=[],d=[];this.each(function(b,f){(a(b,f)?c:d).push(b)});return[c,d]},pluck:function(a){var b=[];this.each(function(c){b.push(c[a])});return b},reject:function(a,b){var a=a.bind(b),c=[];this.each(function(b,e){a(b,e)||c.push(b)});return c},sortBy:function(a,b){a=a.bind(b);return this.map(function(b,d){return{value:b,
criteria:a(b,d)}}).sort(function(a,b){var e=a.criteria,f=b.criteria;return e<f?-1:e>f?1:0}).pluck("value")},toArray:function(){return this.map()},zip:function(){var a=Prototype.K,b=$A(arguments);Object.isFunction(b.last())&&(a=b.pop());var c=[this].concat(b).map($A);return this.map(function(b,e){return a(c.pluck(e))})},size:function(){return this.toArray().length},inspect:function(){return"#<Enumerable:"+this.toArray().inspect()+">"}};
Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,filter:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray,every:Enumerable.all,some:Enumerable.any});function $A(a){if(!a)return[];if(a.toArray)return a.toArray();for(var b=a.length,c=Array(b);b--;)c[b]=a[b];return c}
Prototype.Browser.WebKit&&($A=function(a){if(!a)return[];if(!(Object.isFunction(a)&&a=="[object NodeList]")&&a.toArray)return a.toArray();for(var b=a.length,c=Array(b);b--;)c[b]=a[b];return c});Array.from=$A;Object.extend(Array.prototype,Enumerable);if(!Array.prototype._reverse)Array.prototype._reverse=Array.prototype.reverse;
Object.extend(Array.prototype,{_each:function(a){for(var b=0,c=this.length;b<c;b++)a(this[b])},clear:function(){this.length=0;return this},first:function(){return this[0]},last:function(){return this[this.length-1]},compact:function(){return this.select(function(a){return a!=null})},flatten:function(){return this.inject([],function(a,b){return a.concat(Object.isArray(b)?b.flatten():[b])})},without:function(){var a=$A(arguments);return this.select(function(b){return!a.include(b)})},reverse:function(a){return(a!==
!1?this:this.toArray())._reverse()},reduce:function(){return this.length>1?this:this[0]},uniq:function(a){return this.inject([],function(b,c,d){(0==d||(a?b.last()!=c:!b.include(c)))&&b.push(c);return b})},intersect:function(a){return this.uniq().findAll(function(b){return a.detect(function(a){return b===a})})},clone:function(){return[].concat(this)},size:function(){return this.length},inspect:function(){return"["+this.map(Object.inspect).join(", ")+"]"},remove:function(a){a=this.indexOf(a);a>=0&&
this.splice(a,1);return this},toJSON:function(){var a=[];this.each(function(b){b=Object.toJSON(b);b!==void 0&&a.push(b)});return"["+a.join(", ")+"]"}});if(Object.isFunction(Array.prototype.forEach))Array.prototype._each=Array.prototype.forEach;if(!Array.prototype.indexOf)Array.prototype.indexOf=function(a,b){b||(b=0);var c=this.length;for(b<0&&(b=c+b);b<c;b++)if(this[b]===a)return b;return-1};
if(!Array.prototype.lastIndexOf)Array.prototype.lastIndexOf=function(a,b){var b=isNaN(b)?this.length:(b<0?this.length+b:b)+1,c=this.slice(0,b).reverse().indexOf(a);return c<0?c:b-c-1};Array.prototype.toArray=Array.prototype.clone;function $w(a){return!Object.isString(a)?[]:(a=a.strip())?a.split(/\s+/):[]}
if(Prototype.Browser.Opera)Array.prototype.concat=function(){for(var a=[],b=0,c=this.length;b<c;b++)a.push(this[b]);b=0;for(c=arguments.length;b<c;b++)if(Object.isArray(arguments[b]))for(var d=0,e=arguments[b].length;d<e;d++)a.push(arguments[b][d]);else a.push(arguments[b]);return a};
Object.extend(Number.prototype,{toColorPart:function(){return this.toPaddedString(2,16)},succ:function(){return this+1},times:function(a){$R(0,this,!0).each(a);return this},toPaddedString:function(a,b){var c=this.toString(b||10);return"0".times(a-c.length)+c},toJSON:function(){return isFinite(this)?this.toString():"null"}});$w("abs round ceil floor").each(function(a){Number.prototype[a]=Math[a].methodize()});function $H(a){return new Hash(a)}
var Hash=Class.create(Enumerable,function(){function a(a,c){return Object.isUndefined(c)?a:a+"="+encodeURIComponent(String.interpret(c))}return{initialize:function(a){this._object=Object.isHash(a)?a.toObject():Object.clone(a)},_each:function(){var a=0,c=function(a){this.key=a};c.prototype.key="foo";for(var d in new c("bar"))a++;return a>1}()?function(a){var c=[],d;for(d in this._object){var e=this._object[d];if(!c.include(d)){c.push(d);var f=[d,e];f.key=d;f.value=e;a(f)}}}:function(a){for(var c in this._object){var d=
this._object[c],e=[c,d];e.key=c;e.value=d;a(e)}},set:function(a,c){return this._object[a]=c},get:function(a){return this._object[a]},unset:function(a){var c=this._object[a];delete this._object[a];return c},toObject:function(){return Object.clone(this._object)},keys:function(){return this.pluck("key")},values:function(){return this.pluck("value")},index:function(a){var c=this.detect(function(c){return c.value===a});return c&&c.key},merge:function(a){return this.clone().update(a)},update:function(a){return(new Hash(a)).inject(this,
function(a,b){a.set(b.key,b.value);return a})},toQueryString:function(){return this.map(function(b){var c=encodeURIComponent(b.key);return(b=b.value)&&typeof b=="object"&&Object.isArray(b)?b.map(a.curry(c)).join("&"):a(c,b)}).join("&")},inspect:function(){return"#<Hash:{"+this.map(function(a){return a.map(Object.inspect).join(": ")}).join(", ")+"}>"},toJSON:function(){return Object.toJSON(this.toObject())},clone:function(){return new Hash(this)}}}());Hash.prototype.toTemplateReplacements=Hash.prototype.toObject;
Hash.from=$H;
var ObjectRange=Class.create(Enumerable,{initialize:function(a,b,c){this.start=a;this.end=b;this.exclusive=c},_each:function(a){for(var b=this.start;this.include(b);)a(b),b=b.succ()},include:function(a){return a<this.start?!1:this.exclusive?a<this.end:a<=this.end}}),$R=function(a,b,c){return new ObjectRange(a,b,c)},Ajax={getTransport:function(){return Try.these(function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")})||!1},
activeRequestCount:0,Responders:{responders:[],_each:function(a){this.responders._each(a)},register:function(a){this.include(a)||this.responders.push(a)},unregister:function(a){this.responders=this.responders.without(a)},dispatch:function(a,b,c,d){this.each(function(e){if(Object.isFunction(e[a]))try{e[a].apply(e,[b,c,d])}catch(f){}})}}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});
Ajax.Base=Class.create({initialize:function(a){this.options={method:"post",asynchronous:!0,contentType:"application/x-www-form-urlencoded",encoding:"UTF-8",parameters:"",evalJSON:!0,evalJS:!0};Object.extend(this.options,a||{});this.options.method=this.options.method.toLowerCase();if(Object.isString(this.options.parameters))this.options.parameters=this.options.parameters.toQueryParams()}});
Ajax.Request=Class.create(Ajax.Base,{_complete:!1,initialize:function($super,b,c){$super(c);this.transport=Ajax.getTransport();this.request(b)},request:function(a){this.url=a;this.method=this.options.method;a=Object.clone(this.options.parameters);if(!["get","post"].include(this.method))a._method=this.method,this.method="post";this.parameters=a;if(a=Object.toQueryString(a))this.method=="get"?this.url+=(this.url.include("?")?"&":"?")+a:/Konqueror|Safari|KHTML/.test(navigator.userAgent)&&(a+="&_=");
try{var b=new Ajax.Response(this);if(this.options.onCreate)this.options.onCreate(b);Ajax.Responders.dispatch("onCreate",this,b);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);this.options.asynchronous&&this.respondToReadyState.bind(this).defer(1);this.transport.onreadystatechange=this.onStateChange.bind(this);this.setRequestHeaders();this.body=this.method=="post"?this.options.postBody||a:null;this.transport.send(this.body);if(!this.options.asynchronous&&this.transport.overrideMimeType)this.onStateChange()}catch(c){this.dispatchException(c)}},
onStateChange:function(){var a=this.transport.readyState;a>1&&!(a==4&&this._complete)&&this.respondToReadyState(this.transport.readyState)},setRequestHeaders:function(){var a={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,Accept:"text/javascript, text/html, application/xml, text/xml, */*"};if(this.method=="post"&&(a["Content-type"]=this.options.contentType+(this.options.encoding?"; charset="+this.options.encoding:""),this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||
[0,2005])[1]<2005))a.Connection="close";if(typeof this.options.requestHeaders=="object"){var b=this.options.requestHeaders;if(Object.isFunction(b.push))for(var c=0,d=b.length;c<d;c+=2)a[b[c]]=b[c+1];else $H(b).each(function(b){a[b.key]=b.value})}for(var e in a)this.transport.setRequestHeader(e,a[e])},success:function(){var a=this.getStatus();return!a||a>=200&&a<300},getStatus:function(){try{return this.transport.status||0}catch(a){return 0}},respondToReadyState:function(a){var a=Ajax.Request.Events[a],
b=new Ajax.Response(this);if(a=="Complete"){try{this._complete=!0,(this.options["on"+b.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(b,b.headerJSON)}catch(c){this.dispatchException(c)}var d=b.getHeader("Content-type");(this.options.evalJS=="force"||this.options.evalJS&&d&&d.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i))&&this.evalResponse()}try{(this.options["on"+a]||Prototype.emptyFunction)(b,b.headerJSON),Ajax.Responders.dispatch("on"+
a,this,b,b.headerJSON)}catch(e){this.dispatchException(e)}if(a=="Complete")this.transport.onreadystatechange=Prototype.emptyFunction},getHeader:function(a){try{return this.transport.getResponseHeader(a)}catch(b){return null}},evalResponse:function(){try{return eval((this.transport.responseText||"").unfilterJSON())}catch(a){this.dispatchException(a)}},dispatchException:function(a){(this.options.onException||Prototype.emptyFunction)(this,a);Ajax.Responders.dispatch("onException",this,a)}});
Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];
Ajax.Response=Class.create({initialize:function(a){this.request=a;var a=this.transport=a.transport,b=this.readyState=a.readyState;if(b>2&&!Prototype.Browser.IE||b==4)this.status=this.getStatus(),this.statusText=this.getStatusText(),this.responseText=String.interpret(a.responseText),this.headerJSON=this._getHeaderJSON();if(b==4)a=a.responseXML,this.responseXML=a===void 0?null:a,this.responseJSON=this._getResponseJSON()},status:0,statusText:"",getStatus:Ajax.Request.prototype.getStatus,getStatusText:function(){try{return this.transport.statusText||
""}catch(a){return""}},getHeader:Ajax.Request.prototype.getHeader,getAllHeaders:function(){try{return this.getAllResponseHeaders()}catch(a){return null}},getResponseHeader:function(a){return this.transport.getResponseHeader(a)},getAllResponseHeaders:function(){return this.transport.getAllResponseHeaders()},_getHeaderJSON:function(){var a=this.getHeader("X-JSON");if(!a)return null;a=decodeURIComponent(escape(a));try{return a.evalJSON(this.request.options.sanitizeJSON)}catch(b){this.request.dispatchException(b)}},
_getResponseJSON:function(){var a=this.request.options;if(!a.evalJSON||a.evalJSON!="force"&&!(this.getHeader("Content-type")||"").include("application/json"))return null;try{return this.transport.responseText.evalJSON(a.sanitizeJSON)}catch(b){this.request.dispatchException(b)}}});
Ajax.Updater=Class.create(Ajax.Request,{initialize:function($super,b,c,d){this.container={success:b.success||b,failure:b.failure||(b.success?null:b)};var d=d||{},e=d.onComplete;d.onComplete=function(b,c){this.updateContent(b.responseText);Object.isFunction(e)&&e(b,c)}.bind(this);$super(c,d)},updateContent:function(a){var b=this.container[this.success()?"success":"failure"],c=this.options;c.evalScripts||(a=a.stripScripts());if(b=$(b))if(c.insertion)if(Object.isString(c.insertion)){var d={};d[c.insertion]=
a;b.insert(d)}else c.insertion(b,a);else b.update(a);this.success()&&this.onComplete&&this.onComplete.bind(this).defer()}});
Ajax.PeriodicalUpdater=Class.create(Ajax.Base,{initialize:function($super,b,c,d){$super(d);this.onComplete=this.options.onComplete;this.frequency=this.options.frequency||2;this.decay=this.options.decay||1;this.updater={};this.container=b;this.url=c;this.start()},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent()},stop:function(){this.updater.options.onComplete=void 0;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments)},
updateComplete:function(a){if(this.options.decay)this.decay=a.responseText==this.lastText?this.decay*this.options.decay:1,this.lastText=a.responseText;this.timer=this.onTimerEvent.bind(this).delay(this.decay*this.frequency)},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options)}});
function $(a){if(arguments.length>1){for(var b=0,c=[],d=arguments.length;b<d;b++)c.push($(arguments[b]));return c}Object.isString(a)&&(a=document.getElementById(a));return Element.extend(a)}if(Prototype.BrowserFeatures.XPath)document._getElementsByXPath=function(a,b){for(var c=[],d=document.evaluate(a,$(b)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null),e=0,f=d.snapshotLength;e<f;e++)c.push(Element.extend(d.snapshotItem(e)));return c};if(!window.Node)var Node={};
Node.ELEMENT_NODE||Object.extend(Node,{ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12});
(function(){var a=this.Element;this.Element=function(a,c){var c=c||{},a=a.toLowerCase(),d=Element.cache;if(Prototype.Browser.IE&&c.name)return a="<"+a+' name="'+c.name+'">',delete c.name,Element.writeAttribute(document.createElement(a),c);d[a]||(d[a]=Element.extend(document.createElement(a)));return Element.writeAttribute(d[a].cloneNode(!1),c)};Object.extend(this.Element,a||{})}).call(window);Element.cache={};
Element.Methods={visible:function(a){return $(a).style.display!="none"},toggle:function(a){a=$(a);Element[Element.visible(a)?"hide":"show"](a);return a},hide:function(a){$(a).style.display="none";return a},show:function(a){$(a).style.display="";return a},remove:function(a){a=$(a);a.parentNode.removeChild(a);return a},update:function(a,b){a=$(a);b&&b.toElement&&(b=b.toElement());if(Object.isElement(b))return a.update().insert(b);b=Object.toHTML(b);a.innerHTML=b.stripScripts();b.evalScripts.bind(b).defer();
return a},replace:function(a,b){a=$(a);if(b&&b.toElement)b=b.toElement();else if(!Object.isElement(b)){var b=Object.toHTML(b),c=a.ownerDocument.createRange();c.selectNode(a);b.evalScripts.bind(b).defer();b=c.createContextualFragment(b.stripScripts())}a.parentNode.replaceChild(b,a);return a},insert:function(a,b){a=$(a);if(Object.isString(b)||Object.isNumber(b)||Object.isElement(b)||b&&(b.toElement||b.toHTML))b={bottom:b};var c,d,e;for(position in b)c=b[position],position=position.toLowerCase(),d=Element._insertionTranslations[position],
c&&c.toElement&&(c=c.toElement()),Object.isElement(c)?d.insert(a,c):(c=Object.toHTML(c),e=a.ownerDocument.createRange(),d.initializeRange(a,e),d.insert(a,e.createContextualFragment(c.stripScripts())),c.evalScripts.bind(c).defer());return a},wrap:function(a,b,c){a=$(a);Object.isElement(b)?$(b).writeAttribute(c||{}):b=Object.isString(b)?new Element(b,c):new Element("div",b);a.parentNode&&a.parentNode.replaceChild(b,a);b.appendChild(a);return b},inspect:function(a){var a=$(a),b="<"+a.tagName.toLowerCase();
$H({id:"id",className:"class"}).each(function(c){var d=c.first(),c=c.last();(d=(a[d]||"").toString())&&(b+=" "+c+"="+d.inspect(!0))});return b+">"},recursivelyCollect:function(a,b){for(var a=$(a),c=[];a=a[b];)a.nodeType==1&&c.push(Element.extend(a));return c},ancestors:function(a){return $(a).recursivelyCollect("parentNode")},descendants:function(a){return $A($(a).getElementsByTagName("*")).each(Element.extend)},firstDescendant:function(a){for(a=$(a).firstChild;a&&a.nodeType!=1;)a=a.nextSibling;return $(a)},
immediateDescendants:function(a){if(!(a=$(a).firstChild))return[];for(;a&&a.nodeType!=1;)a=a.nextSibling;return a?[a].concat($(a).nextSiblings()):[]},previousSiblings:function(a){return $(a).recursivelyCollect("previousSibling")},nextSiblings:function(a){return $(a).recursivelyCollect("nextSibling")},siblings:function(a){a=$(a);return a.previousSiblings().reverse().concat(a.nextSiblings())},match:function(a,b){Object.isString(b)&&(b=new Selector(b));return b.match($(a))},up:function(a,b,c){a=$(a);
if(arguments.length==1)return $(a.parentNode);var d=a.ancestors();return b?Selector.findElement(d,b,c):d[c||0]},down:function(a,b,c){a=$(a);if(arguments.length==1)return a.firstDescendant();var d=a.descendants();return b?Selector.findElement(d,b,c):d[c||0]},previous:function(a,b,c){a=$(a);if(arguments.length==1)return $(Selector.handlers.previousElementSibling(a));var d=a.previousSiblings();return b?Selector.findElement(d,b,c):d[c||0]},next:function(a,b,c){a=$(a);if(arguments.length==1)return $(Selector.handlers.nextElementSibling(a));
var d=a.nextSiblings();return b?Selector.findElement(d,b,c):d[c||0]},select:function(){var a=$A(arguments),b=$(a.shift());return Selector.findChildElements(b,a)},adjacent:function(){var a=$A(arguments),b=$(a.shift());return Selector.findChildElements(b.parentNode,a).without(b)},identify:function(a){var a=$(a),b=a.readAttribute("id"),c=arguments.callee;if(b)return b;do b="anonymous_element_"+c.counter++;while($(b));a.writeAttribute("id",b);return b},readAttribute:function(a,b){a=$(a);if(Prototype.Browser.IE){var c=
Element._attributeTranslations.read;if(c.values[b])return c.values[b](a,b);c.names[b]&&(b=c.names[b]);if(b.include(":"))return!a.attributes||!a.attributes[b]?null:a.attributes[b].value}return a.getAttribute(b)},writeAttribute:function(a,b,c){var a=$(a),d={},e=Element._attributeTranslations.write;typeof b=="object"?d=b:d[b]=c===void 0?!0:c;for(var f in d)b=e.names[f]||f,c=d[f],e.values[f]&&(b=e.values[f](a,c)),c===!1||c===null?a.removeAttribute(b):c===!0?a.setAttribute(b,b):a.setAttribute(b,c);return a},
getHeight:function(a){return $(a).getDimensions().height},getWidth:function(a){return $(a).getDimensions().width},classNames:function(a){return new Element.ClassNames(a)},hasClassName:function(a,b){if(a=$(a)){var c=a.className;return c.length>0&&(c==b||RegExp("(^|\\s)"+b+"(\\s|$)").test(c))}},addClassName:function(a,b){if(a=$(a))return a.hasClassName(b)||(a.className+=(a.className?" ":"")+b),a},removeClassName:function(a,b){if(a=$(a))return a.className=a.className.replace(RegExp("(^|\\s+)"+b+"(\\s+|$)"),
" ").strip(),a},toggleClassName:function(a,b){return!(a=$(a))?void 0:a[a.hasClassName(b)?"removeClassName":"addClassName"](b)},cleanWhitespace:function(a){for(var a=$(a),b=a.firstChild;b;){var c=b.nextSibling;b.nodeType==3&&!/\S/.test(b.nodeValue)&&a.removeChild(b);b=c}return a},empty:function(a){return $(a).innerHTML.blank()},descendantOf:function(a,b){a=$(a);b=$(b);if(a.compareDocumentPosition)return(a.compareDocumentPosition(b)&8)===8;if(a.sourceIndex&&!Prototype.Browser.Opera){var c=a.sourceIndex,
d=b.sourceIndex,e=b.nextSibling;if(!e){do b=b.parentNode;while(!(e=b.nextSibling)&&b.parentNode)}if(e)return c>d&&c<e.sourceIndex}for(;a=a.parentNode;)if(a==b)return!0;return!1},scrollTo:function(a){var a=$(a),b=a.cumulativeOffset();window.scrollTo(b[0],b[1]);return a},getStyle:function(a,b){var a=$(a),b=b=="float"?"cssFloat":b.camelize(),c=a.style[b];c||(c=(c=document.defaultView.getComputedStyle(a,null))?c[b]:null);return b=="opacity"?c?parseFloat(c):1:c=="auto"?null:c},getOpacity:function(a){return $(a).getStyle("opacity")},
setStyle:function(a,b){var a=$(a),c=a.style;if(Object.isString(b))return a.style.cssText+=";"+b,b.include("opacity")?a.setOpacity(b.match(/opacity:\s*(\d?\.?\d*)/)[1]):a;for(var d in b)d=="opacity"?a.setOpacity(b[d]):c[d=="float"||d=="cssFloat"?c.styleFloat===void 0?"cssFloat":"styleFloat":d]=b[d];return a},setOpacity:function(a,b){a=$(a);a.style.opacity=b==1||b===""?"":b<1.0E-5?0:b;return a},getDimensions:function(a){var a=$(a),b=$(a).getStyle("display");if(b!="none"&&b!=null)return{width:a.offsetWidth,
height:a.offsetHeight};var b=a.style,c=b.visibility,d=b.position,e=b.display;b.visibility="hidden";b.position="absolute";b.display="block";var f=a.clientWidth,a=a.clientHeight;b.display=e;b.position=d;b.visibility=c;return{width:f,height:a}},makePositioned:function(a){var a=$(a),b=Element.getStyle(a,"position");if(b=="static"||!b)if(a._madePositioned=!0,a.style.position="relative",window.opera)a.style.top=0,a.style.left=0;return a},undoPositioned:function(a){a=$(a);if(a._madePositioned)a._madePositioned=
void 0,a.style.position=a.style.top=a.style.left=a.style.bottom=a.style.right="";return a},makeClipping:function(a){a=$(a);if(a._overflow)return a;a._overflow=Element.getStyle(a,"overflow")||"auto";if(a._overflow!=="hidden")a.style.overflow="hidden";return a},undoClipping:function(a){a=$(a);if(!a._overflow)return a;a.style.overflow=a._overflow=="auto"?"":a._overflow;a._overflow=null;return a},cumulativeOffset:function(a){var b=0,c=0;do b+=a.offsetTop||0,c+=a.offsetLeft||0,a=a.offsetParent;while(a);
return Element._returnOffset(c,b)},positionedOffset:function(a){var b=0,c=0;do if(b+=a.offsetTop||0,c+=a.offsetLeft||0,a=a.offsetParent){if(a.tagName=="BODY")break;var d=Element.getStyle(a,"position");if(d=="relative"||d=="absolute")break}while(a);return Element._returnOffset(c,b)},absolutize:function(a){a=$(a);if(a.getStyle("position")!="absolute"){var b=a.positionedOffset(),c=b[1],b=b[0],d=a.clientWidth,e=a.clientHeight;a._originalLeft=b-parseFloat(a.style.left||0);a._originalTop=c-parseFloat(a.style.top||
0);a._originalWidth=a.style.width;a._originalHeight=a.style.height;a.style.position="absolute";a.style.top=c+"px";a.style.left=b+"px";a.style.width=d+"px";a.style.height=e+"px";return a}},relativize:function(a){a=$(a);if(a.getStyle("position")!="relative"){a.style.position="relative";var b=parseFloat(a.style.top||0)-(a._originalTop||0),c=parseFloat(a.style.left||0)-(a._originalLeft||0);a.style.top=b+"px";a.style.left=c+"px";a.style.height=a._originalHeight;a.style.width=a._originalWidth;return a}},
cumulativeScrollOffset:function(a){var b=0,c=0;do b+=a.scrollTop||0,c+=a.scrollLeft||0,a=a.parentNode;while(a);return Element._returnOffset(c,b)},getOffsetParent:function(a){if(a.offsetParent)return $(a.offsetParent);if(a==document.body)return $(a);for(;(a=a.parentNode)&&a!=document.body;)if(Element.getStyle(a,"position")!="static")return $(a);return $(document.body)},viewportOffset:function(a){var b=0,c=0,d=a;do if(b+=d.offsetTop||0,c+=d.offsetLeft||0,d.offsetParent==document.body&&Element.getStyle(d,
"position")=="absolute")break;while(d=d.offsetParent);d=a;do if(!Prototype.Browser.Opera||d.tagName=="BODY")b-=d.scrollTop||0,c-=d.scrollLeft||0;while(d=d.parentNode);return Element._returnOffset(c,b)},clonePosition:function(a,b,c){var c=Object.extend({setLeft:!0,setTop:!0,setWidth:!0,setHeight:!0,offsetTop:0,offsetLeft:0},c||{}),b=$(b),d=b.viewportOffset(),a=$(a),e=[0,0],f=null;Element.getStyle(a,"position")=="absolute"&&(f=a.getOffsetParent(),e=f.viewportOffset());f==document.body&&(e[0]-=document.body.offsetLeft,
e[1]-=document.body.offsetTop);if(c.setLeft)a.style.left=d[0]-e[0]+c.offsetLeft+"px";if(c.setTop)a.style.top=d[1]-e[1]+c.offsetTop+"px";if(c.setWidth)a.style.width=b.offsetWidth+"px";if(c.setHeight)a.style.height=b.offsetHeight+"px";return a}};Element.Methods.identify.counter=1;Object.extend(Element.Methods,{getElementsBySelector:Element.Methods.select,childElements:Element.Methods.immediateDescendants});Element._attributeTranslations={write:{names:{className:"class",htmlFor:"for"},values:{}}};
if(!document.createRange||Prototype.Browser.Opera)Element.Methods.insert=function(a,b){a=$(a);if(Object.isString(b)||Object.isNumber(b)||Object.isElement(b)||b&&(b.toElement||b.toHTML))b={bottom:b};var c=Element._insertionTranslations,d,e,f,g;for(e in b)d=b[e],e=e.toLowerCase(),f=c[e],d&&d.toElement&&(d=d.toElement()),Object.isElement(d)?f.insert(a,d):(d=Object.toHTML(d),g=(e=="before"||e=="after"?a.parentNode:a).tagName.toUpperCase(),c.tags[g]?(g=Element._getContentFromAnonymousElement(g,d.stripScripts()),
(e=="top"||e=="after")&&g.reverse(),g.each(f.insert.curry(a))):a.insertAdjacentHTML(f.adjacency,d.stripScripts()),d.evalScripts.bind(d).defer());return a};
if(Prototype.Browser.Opera)Element.Methods._getStyle=Element.Methods.getStyle,Element.Methods.getStyle=function(a,b){switch(b){case "left":case "top":case "right":case "bottom":if(Element._getStyle(a,"position")=="static")return null;default:return Element._getStyle(a,b)}},Element.Methods._readAttribute=Element.Methods.readAttribute,Element.Methods.readAttribute=function(a,b){return b=="title"?a.title:Element._readAttribute(a,b)};else if(Prototype.Browser.IE)$w("positionedOffset getOffsetParent viewportOffset").each(function(a){Element.Methods[a]=
Element.Methods[a].wrap(function(a,c){var c=$(c),d=c.getStyle("position");if(d!="static")return a(c);c.setStyle({position:"relative"});var e=a(c);c.setStyle({position:d});return e})}),Element.Methods.getStyle=function(a,b){var a=$(a),b=b=="float"||b=="cssFloat"?"styleFloat":b.camelize(),c=a.style[b];!c&&a.currentStyle&&(c=a.currentStyle[b]);return b=="opacity"?(c=(a.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/))&&c[1]?parseFloat(c[1])/100:1:c=="auto"?(b=="width"||b=="height")&&a.getStyle("display")!=
"none"?a["offset"+b.capitalize()]+"px":null:c},Element.Methods.setOpacity=function(a,b){var a=$(a),c=a.currentStyle;if(c&&!c.hasLayout||!c&&a.style.zoom=="normal")a.style.zoom=1;var c=a.getStyle("filter"),d=a.style;if(b==1||b==="")return(c=c.replace(/alpha\([^\)]*\)/gi,""))?d.filter=c:d.removeAttribute("filter"),a;else b<1.0E-5&&(b=0);d.filter=c.replace(/alpha\([^\)]*\)/gi,"")+"alpha(opacity="+b*100+")";return a},Element._attributeTranslations={read:{names:{"class":"className","for":"htmlFor"},values:{_getAttr:function(a,
b){return a.getAttribute(b,2)},_getAttrNode:function(a,b){var c=a.getAttributeNode(b);return c?c.value:""},_getEv:function(a,b){return(b=a.getAttribute(b))?b.toString().slice(23,-2):null},_flag:function(a,b){return $(a).hasAttribute(b)?b:null},style:function(a){return a.style.cssText.toLowerCase()},title:function(a){return a.title}}}},Element._attributeTranslations.write={names:Object.clone(Element._attributeTranslations.read.names),values:{checked:function(a,b){a.checked=!!b},style:function(a,b){a.style.cssText=
b?b:""}}},Element._attributeTranslations.has={},$w("colSpan rowSpan vAlign dateTime accessKey tabIndex encType maxLength readOnly longDesc").each(function(a){Element._attributeTranslations.write.names[a.toLowerCase()]=a;Element._attributeTranslations.has[a.toLowerCase()]=a}),function(a){Object.extend(a,{href:a._getAttr,src:a._getAttr,type:a._getAttr,action:a._getAttrNode,disabled:a._flag,checked:a._flag,readonly:a._flag,multiple:a._flag,onload:a._getEv,onunload:a._getEv,onclick:a._getEv,ondblclick:a._getEv,
onmousedown:a._getEv,onmouseup:a._getEv,onmouseover:a._getEv,onmousemove:a._getEv,onmouseout:a._getEv,onfocus:a._getEv,onblur:a._getEv,onkeypress:a._getEv,onkeydown:a._getEv,onkeyup:a._getEv,onsubmit:a._getEv,onreset:a._getEv,onselect:a._getEv,onchange:a._getEv})}(Element._attributeTranslations.read.values);else if(Prototype.Browser.Gecko&&/rv:1\.8\.0/.test(navigator.userAgent))Element.Methods.setOpacity=function(a,b){a=$(a);a.style.opacity=b==1?0.999999:b===""?"":b<1.0E-5?0:b;return a};else if(Prototype.Browser.WebKit)Element.Methods.setOpacity=
function(a,b){a=$(a);a.style.opacity=b==1||b===""?"":b<1.0E-5?0:b;if(b==1)if(a.tagName=="IMG"&&a.width)a.width++,a.width--;else try{var c=document.createTextNode(" ");a.appendChild(c);a.removeChild(c)}catch(d){}return a},Element.Methods.cumulativeOffset=function(a){var b=0,c=0;do{b+=a.offsetTop||0;c+=a.offsetLeft||0;if(a.offsetParent==document.body&&Element.getStyle(a,"position")=="absolute")break;a=a.offsetParent}while(a);return Element._returnOffset(c,b)};
if(Prototype.Browser.IE||Prototype.Browser.Opera)Element.Methods.update=function(a,b){a=$(a);b&&b.toElement&&(b=b.toElement());if(Object.isElement(b))return a.update().insert(b);var b=Object.toHTML(b),c=a.tagName.toUpperCase();c in Element._insertionTranslations.tags?($A(a.childNodes).each(function(b){a.removeChild(b)}),Element._getContentFromAnonymousElement(c,b.stripScripts()).each(function(b){a.appendChild(b)})):a.innerHTML=b.stripScripts();b.evalScripts.bind(b).defer();return a};
if(document.createElement("div").outerHTML)Element.Methods.replace=function(a,b){a=$(a);b&&b.toElement&&(b=b.toElement());if(Object.isElement(b))return a.parentNode.replaceChild(b,a),a;var b=Object.toHTML(b),c=a.parentNode,d=c.tagName.toUpperCase();if(Element._insertionTranslations.tags[d]){var e=a.next(),d=Element._getContentFromAnonymousElement(d,b.stripScripts());c.removeChild(a);e?d.each(function(a){c.insertBefore(a,e)}):d.each(function(a){c.appendChild(a)})}else a.outerHTML=b.stripScripts();
b.evalScripts.bind(b).defer();return a};Element._returnOffset=function(a,b){var c=[a,b];c.left=a;c.top=b;return c};Element._getContentFromAnonymousElement=function(a,b){var c=new Element("div"),d=Element._insertionTranslations.tags[a];c.innerHTML=d[0]+b+d[1];d[2].times(function(){c=c.firstChild});return $A(c.childNodes)};
Element._insertionTranslations={before:{adjacency:"beforeBegin",insert:function(a,b){a.parentNode.insertBefore(b,a)},initializeRange:function(a,b){b.setStartBefore(a)}},top:{adjacency:"afterBegin",insert:function(a,b){a.insertBefore(b,a.firstChild)},initializeRange:function(a,b){b.selectNodeContents(a);b.collapse(!0)}},bottom:{adjacency:"beforeEnd",insert:function(a,b){a.appendChild(b)}},after:{adjacency:"afterEnd",insert:function(a,b){a.parentNode.insertBefore(b,a.nextSibling)},initializeRange:function(a,
b){b.setStartAfter(a)}},tags:{TABLE:["<table>","</table>",1],TBODY:["<table><tbody>","</tbody></table>",2],TR:["<table><tbody><tr>","</tr></tbody></table>",3],TD:["<table><tbody><tr><td>","</td></tr></tbody></table>",4],SELECT:["<select>","</select>",1]}};(function(){this.bottom.initializeRange=this.top.initializeRange;Object.extend(this.tags,{THEAD:this.tags.TBODY,TFOOT:this.tags.TBODY,TH:this.tags.TD})}).call(Element._insertionTranslations);
Element.Methods.Simulated={hasAttribute:function(a,b){var b=Element._attributeTranslations.has[b]||b,c=$(a).getAttributeNode(b);return c&&c.specified}};Element.Methods.ByTag={};Object.extend(Element,Element.Methods);if(!Prototype.BrowserFeatures.ElementExtensions&&document.createElement("div").__proto__)window.HTMLElement={},window.HTMLElement.prototype=document.createElement("div").__proto__,Prototype.BrowserFeatures.ElementExtensions=!0;
Element.extend=function(){if(Prototype.BrowserFeatures.SpecificElementExtensions)return Prototype.K;var a={},b=Element.Methods.ByTag,c=Object.extend(function(c){if(!c||c._extendedByPrototype||c.nodeType!=1||c==window)return c;var e=Object.clone(a),f=c.tagName,g;b[f]&&Object.extend(e,b[f]);for(g in e)f=e[g],Object.isFunction(f)&&!(g in c)&&(c[g]=f.methodize());c._extendedByPrototype=Prototype.emptyFunction;return c},{refresh:function(){Prototype.BrowserFeatures.ElementExtensions||(Object.extend(a,
Element.Methods),Object.extend(a,Element.Methods.Simulated))}});c.refresh();return c}();Element.hasAttribute=function(a,b){return a.hasAttribute?a.hasAttribute(b):Element.Methods.Simulated.hasAttribute(a,b)};
Element.addMethods=function(a){function b(b){b=b.toUpperCase();Element.Methods.ByTag[b]||(Element.Methods.ByTag[b]={});Object.extend(Element.Methods.ByTag[b],a)}function c(a,b,c){var c=c||!1,d;for(d in a){var e=a[d];if(Object.isFunction(e)&&(!c||!(d in b)))b[d]=e.methodize()}}function d(a){var b,c={OPTGROUP:"OptGroup",TEXTAREA:"TextArea",P:"Paragraph",FIELDSET:"FieldSet",UL:"UList",OL:"OList",DL:"DList",DIR:"Directory",H1:"Heading",H2:"Heading",H3:"Heading",H4:"Heading",H5:"Heading",H6:"Heading",
Q:"Quote",INS:"Mod",DEL:"Mod",A:"Anchor",IMG:"Image",CAPTION:"TableCaption",COL:"TableCol",COLGROUP:"TableCol",THEAD:"TableSection",TFOOT:"TableSection",TBODY:"TableSection",TR:"TableRow",TH:"TableCell",TD:"TableCell",FRAMESET:"FrameSet",IFRAME:"IFrame"};c[a]&&(b="HTML"+c[a]+"Element");if(window[b])return window[b];b="HTML"+a+"Element";if(window[b])return window[b];b="HTML"+a.capitalize()+"Element";if(window[b])return window[b];window[b]={};window[b].prototype=document.createElement(a).__proto__;
return window[b]}var e=Prototype.BrowserFeatures,f=Element.Methods.ByTag;a||(Object.extend(Form,Form.Methods),Object.extend(Form.Element,Form.Element.Methods),Object.extend(Element.Methods.ByTag,{FORM:Object.clone(Form.Methods),INPUT:Object.clone(Form.Element.Methods),SELECT:Object.clone(Form.Element.Methods),TEXTAREA:Object.clone(Form.Element.Methods)}));if(arguments.length==2)var g=a,a=arguments[1];g?Object.isArray(g)?g.each(b):b(g):Object.extend(Element.Methods,a||{});e.ElementExtensions&&(c(Element.Methods,
HTMLElement.prototype),c(Element.Methods.Simulated,HTMLElement.prototype,!0));if(e.SpecificElementExtensions)for(var h in Element.Methods.ByTag)e=d(h),Object.isUndefined(e)||c(f[h],e.prototype);Object.extend(Element,Element.Methods);delete Element.ByTag;Element.extend.refresh&&Element.extend.refresh();Element.cache={}};
document.viewport={getDimensions:function(){var a={};$w("width height").each(function(b){var c=b.capitalize();a[b]=self["inner"+c]||document.documentElement["client"+c]||document.body["client"+c]});return a},getWidth:function(){return this.getDimensions().width},getHeight:function(){return this.getDimensions().height},getScrollOffsets:function(){return Element._returnOffset(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,window.pageYOffset||document.documentElement.scrollTop||
document.body.scrollTop)}};
var Selector=Class.create({initialize:function(a){this.expression=a.strip();this.compileMatcher()},compileMatcher:function(){if(Prototype.BrowserFeatures.XPath&&!/(\[[\w-]*?:|:checked)/.test(this.expression))return this.compileXPathMatcher();var a=this.expression,b=Selector.patterns,c=Selector.criteria,d,e;if(Selector._cache[a])this.matcher=Selector._cache[a];else{for(this.matcher=["this.matcher = function(root) {","var r = root, h = Selector.handlers, c = false, n;"];a&&d!=a&&/\S/.test(a);){d=a;
for(var f in b)if(e=b[f],e=a.match(e)){this.matcher.push(Object.isFunction(c[f])?c[f](e):(new Template(c[f])).evaluate(e));a=a.replace(e[0],"");break}}this.matcher.push("return h.unique(n);\n}");eval(this.matcher.join("\n"));Selector._cache[this.expression]=this.matcher}},compileXPathMatcher:function(){var a=this.expression,b=Selector.patterns,c=Selector.xpath,d,e;if(Selector._cache[a])this.xpath=Selector._cache[a];else{for(this.matcher=[".//*"];a&&d!=a&&/\S/.test(a);){d=a;for(var f in b)if(e=a.match(b[f])){this.matcher.push(Object.isFunction(c[f])?
c[f](e):(new Template(c[f])).evaluate(e));a=a.replace(e[0],"");break}}this.xpath=this.matcher.join("");Selector._cache[this.expression]=this.xpath}},findElements:function(a){a=a||document;return this.xpath?document._getElementsByXPath(this.xpath,a):this.matcher(a)},match:function(a){this.tokens=[];for(var b=this.expression,c=Selector.patterns,d=Selector.assertions,e,f;b&&e!==b&&/\S/.test(b);){e=b;for(var g in c)if(f=c[g],f=b.match(f))if(d[g])this.tokens.push([g,Object.clone(f)]),b=b.replace(f[0],
"");else return this.findElements(document).include(a)}b=!0;for(g=0;d=this.tokens[g];g++)if(c=d[0],d=d[1],!Selector.assertions[c](a,d)){b=!1;break}return b},toString:function(){return this.expression},inspect:function(){return"#<Selector:"+this.expression.inspect()+">"}});
Object.extend(Selector,{_cache:{},xpath:{descendant:"//*",child:"/*",adjacent:"/following-sibling::*[1]",laterSibling:"/following-sibling::*",tagName:function(a){return a[1]=="*"?"":"[local-name()='"+a[1].toLowerCase()+"' or local-name()='"+a[1].toUpperCase()+"']"},className:"[contains(concat(' ', @class, ' '), ' #{1} ')]",id:"[@id='#{1}']",attrPresence:"[@#{1}]",attr:function(a){a[3]=a[5]||a[6];return(new Template(Selector.xpath.operators[a[2]])).evaluate(a)},pseudo:function(a){var b=Selector.xpath.pseudos[a[1]];
return!b?"":Object.isFunction(b)?b(a):(new Template(Selector.xpath.pseudos[a[1]])).evaluate(a)},operators:{"=":"[@#{1}='#{3}']","!=":"[@#{1}!='#{3}']","^=":"[starts-with(@#{1}, '#{3}')]","$=":"[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']","*=":"[contains(@#{1}, '#{3}')]","~=":"[contains(concat(' ', @#{1}, ' '), ' #{3} ')]","|=":"[contains(concat('-', @#{1}, '-'), '-#{3}-')]"},pseudos:{"first-child":"[not(preceding-sibling::*)]","last-child":"[not(following-sibling::*)]",
"only-child":"[not(preceding-sibling::* or following-sibling::*)]",empty:"[count(*) = 0 and (count(text()) = 0 or translate(text(), ' \t\r\n', '') = '')]",checked:"[@checked]",disabled:"[@disabled]",enabled:"[not(@disabled)]",not:function(a){for(var b=a[6],c=Selector.patterns,d=Selector.xpath,e,f,g=[];b&&e!=b&&/\S/.test(b);){e=b;for(var h in c)if(a=b.match(c[h])){f=Object.isFunction(d[h])?d[h](a):(new Template(d[h])).evaluate(a);g.push("("+f.substring(1,f.length-1)+")");b=b.replace(a[0],"");break}}return"[not("+
g.join(" and ")+")]"},"nth-child":function(a){return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ",a)},"nth-last-child":function(a){return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ",a)},"nth-of-type":function(a){return Selector.xpath.pseudos.nth("position() ",a)},"nth-last-of-type":function(a){return Selector.xpath.pseudos.nth("(last() + 1 - position()) ",a)},"first-of-type":function(a){a[6]="1";return Selector.xpath.pseudos["nth-of-type"](a)},"last-of-type":function(a){a[6]=
"1";return Selector.xpath.pseudos["nth-last-of-type"](a)},"only-of-type":function(a){var b=Selector.xpath.pseudos;return b["first-of-type"](a)+b["last-of-type"](a)},nth:function(a,b){var c,d=b[6];d=="even"&&(d="2n+0");d=="odd"&&(d="2n+1");if(c=d.match(/^(\d+)$/))return"["+a+"= "+c[1]+"]";if(c=d.match(/^(-?\d*)?n(([+-])(\d+))?/))return c[1]=="-"&&(c[1]=-1),d=c[1]?Number(c[1]):1,c=c[2]?Number(c[2]):0,(new Template("[((#{fragment} - #{b}) mod #{a} = 0) and ((#{fragment} - #{b}) div #{a} >= 0)]")).evaluate({fragment:a,
a:d,b:c})}}},criteria:{tagName:'n = h.tagName(n, r, "#{1}", c);   c = false;',className:'n = h.className(n, r, "#{1}", c); c = false;',id:'n = h.id(n, r, "#{1}", c);        c = false;',attrPresence:'n = h.attrPresence(n, r, "#{1}"); c = false;',attr:function(a){a[3]=a[5]||a[6];return(new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}"); c = false;')).evaluate(a)},pseudo:function(a){a[6]&&(a[6]=a[6].replace(/"/g,'\\"'));return(new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;')).evaluate(a)},
descendant:'c = "descendant";',child:'c = "child";',adjacent:'c = "adjacent";',laterSibling:'c = "laterSibling";'},patterns:{laterSibling:/^\s*~\s*/,child:/^\s*>\s*/,adjacent:/^\s*\+\s*/,descendant:/^\s/,tagName:/^\s*(\*|[\w\-]+)(\b|$)?/,id:/^#([\w\-\*]+)(\b|$)/,className:/^\.([\w\-\*]+)(\b|$)/,pseudo:/^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s)|(?=:))/,attrPresence:/^\[([\w]+)\]/,attr:/\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/},
assertions:{tagName:function(a,b){return b[1].toUpperCase()==a.tagName.toUpperCase()},className:function(a,b){return Element.hasClassName(a,b[1])},id:function(a,b){return a.id===b[1]},attrPresence:function(a,b){return Element.hasAttribute(a,b[1])},attr:function(a,b){var c=Element.readAttribute(a,b[1]);return Selector.operators[b[2]](c,b[3])}},handlers:{concat:function(a,b){for(var c=0,d;d=b[c];c++)a.push(d);return a},mark:function(a){for(var b=0,c;c=a[b];b++)c._counted=!0;return a},unmark:function(a){for(var b=
0,c;c=a[b];b++)c._counted=void 0;return a},index:function(a,b,c){a._counted=!0;if(b)for(var a=a.childNodes,b=a.length-1,d=1;b>=0;b--){var e=a[b];if(e.nodeType==1&&(!c||e._counted))e.nodeIndex=d++}else{b=0;d=1;for(a=a.childNodes;e=a[b];b++)if(e.nodeType==1&&(!c||e._counted))e.nodeIndex=d++}},unique:function(a){if(a.length==0)return a;for(var b=[],c,d=0,e=a.length;d<e;d++)if(!(c=a[d])._counted)c._counted=!0,b.push(Element.extend(c));return Selector.handlers.unmark(b)},descendant:function(a){for(var b=
Selector.handlers,c=0,d=[],e;e=a[c];c++)b.concat(d,e.getElementsByTagName("*"));return d},child:function(a){for(var b=0,c=[],d;d=a[b];b++)for(var e=0,f;f=d.childNodes[e];e++)f.nodeType==1&&f.tagName!="!"&&c.push(f);return c},adjacent:function(a){for(var b=0,c=[],d;d=a[b];b++)(d=this.nextElementSibling(d))&&c.push(d);return c},laterSibling:function(a){for(var b=Selector.handlers,c=0,d=[],e;e=a[c];c++)b.concat(d,Element.nextSiblings(e));return d},nextElementSibling:function(a){for(;a=a.nextSibling;)if(a.nodeType==
1)return a;return null},previousElementSibling:function(a){for(;a=a.previousSibling;)if(a.nodeType==1)return a;return null},tagName:function(a,b,c,d){var c=c.toUpperCase(),e=[],f=Selector.handlers;if(a){if(d){if(d=="descendant"){for(b=0;d=a[b];b++)f.concat(e,d.getElementsByTagName(c));return e}else a=this[d](a);if(c=="*")return a}for(b=0;d=a[b];b++)d.tagName.toUpperCase()==c&&e.push(d);return e}else return b.getElementsByTagName(c)},id:function(a,b,c,d){var c=$(c),e=Selector.handlers;if(!c)return[];
if(!a&&b==document)return[c];if(a){if(d)if(d=="child")for(b=0;d=a[b];b++){if(c.parentNode==d)return[c]}else if(d=="descendant")for(b=0;d=a[b];b++){if(Element.descendantOf(c,d))return[c]}else if(d=="adjacent")for(b=0;d=a[b];b++){if(Selector.handlers.previousElementSibling(c)==d)return[c]}else a=e[d](a);for(b=0;d=a[b];b++)if(d==c)return[c];return[]}return c&&Element.descendantOf(c,b)?[c]:[]},className:function(a,b,c,d){a&&d&&(a=this[d](a));return Selector.handlers.byClassName(a,b,c)},byClassName:function(a,
b,c){a||(a=Selector.handlers.descendant([b]));for(var b=" "+c+" ",d=0,e=[],f,g;f=a[d];d++)g=f.className,g.length!=0&&(g==c||(" "+g+" ").include(b))&&e.push(f);return e},attrPresence:function(a,b,c){a||(a=b.getElementsByTagName("*"));for(var b=[],d=0,e;e=a[d];d++)Element.hasAttribute(e,c)&&b.push(e);return b},attr:function(a,b,c,d,e){a||(a=b.getElementsByTagName("*"));for(var b=Selector.operators[e],e=[],f=0,g;g=a[f];f++){var h=Element.readAttribute(g,c);h!==null&&b(h,d)&&e.push(g)}return e},pseudo:function(a,
b,c,d,e){a&&e&&(a=this[e](a));a||(a=d.getElementsByTagName("*"));return Selector.pseudos[b](a,c,d)}},pseudos:{"first-child":function(a){for(var b=0,c=[],d;d=a[b];b++)Selector.handlers.previousElementSibling(d)||c.push(d);return c},"last-child":function(a){for(var b=0,c=[],d;d=a[b];b++)Selector.handlers.nextElementSibling(d)||c.push(d);return c},"only-child":function(a){for(var b=Selector.handlers,c=0,d=[],e;e=a[c];c++)!b.previousElementSibling(e)&&!b.nextElementSibling(e)&&d.push(e);return d},"nth-child":function(a,
b,c){return Selector.pseudos.nth(a,b,c)},"nth-last-child":function(a,b,c){return Selector.pseudos.nth(a,b,c,!0)},"nth-of-type":function(a,b,c){return Selector.pseudos.nth(a,b,c,!1,!0)},"nth-last-of-type":function(a,b,c){return Selector.pseudos.nth(a,b,c,!0,!0)},"first-of-type":function(a,b,c){return Selector.pseudos.nth(a,"1",c,!1,!0)},"last-of-type":function(a,b,c){return Selector.pseudos.nth(a,"1",c,!0,!0)},"only-of-type":function(a,b,c){var d=Selector.pseudos;return d["last-of-type"](d["first-of-type"](a,
b,c),b,c)},getIndices:function(a,b,c){return a==0?b>0?[b]:[]:$R(1,c).inject([],function(c,e){0==(e-b)%a&&(e-b)/a>=0&&c.push(e);return c})},nth:function(a,b,c,d,e){if(a.length==0)return[];b=="even"&&(b="2n+0");b=="odd"&&(b="2n+1");var c=Selector.handlers,f=[],g=[],h;c.mark(a);h=0;for(var l;l=a[h];h++)l.parentNode._counted||(c.index(l.parentNode,d,e),g.push(l.parentNode));if(b.match(/^\d+$/)){b=Number(b);for(h=0;l=a[h];h++)l.nodeIndex==b&&f.push(l)}else if(h=b.match(/^(-?\d*)?n(([+-])(\d+))?/)){h[1]==
"-"&&(h[1]=-1);b=Selector.pseudos.getIndices(h[1]?Number(h[1]):1,h[2]?Number(h[2]):0,a.length);h=0;for(d=b.length;l=a[h];h++)for(e=0;e<d;e++)l.nodeIndex==b[e]&&f.push(l)}c.unmark(a);c.unmark(g);return f},empty:function(a){for(var b=0,c=[],d;d=a[b];b++)d.tagName=="!"||d.firstChild&&!d.innerHTML.match(/^\s*$/)||c.push(d);return c},not:function(a,b,c){var d=Selector.handlers,b=(new Selector(b)).findElements(c);d.mark(b);for(var c=0,e=[],f;f=a[c];c++)f._counted||e.push(f);d.unmark(b);return e},enabled:function(a){for(var b=
0,c=[],d;d=a[b];b++)d.disabled||c.push(d);return c},disabled:function(a){for(var b=0,c=[],d;d=a[b];b++)d.disabled&&c.push(d);return c},checked:function(a){for(var b=0,c=[],d;d=a[b];b++)d.checked&&c.push(d);return c}},operators:{"=":function(a,b){return a==b},"!=":function(a,b){return a!=b},"^=":function(a,b){return a.startsWith(b)},"$=":function(a,b){return a.endsWith(b)},"*=":function(a,b){return a.include(b)},"~=":function(a,b){return(" "+a+" ").include(" "+b+" ")},"|=":function(a,b){return("-"+
a.toUpperCase()+"-").include("-"+b.toUpperCase()+"-")}},matchElements:function(a,b){var c=(new Selector(b)).findElements(),d=Selector.handlers;d.mark(c);for(var e=0,f=[],g;g=a[e];e++)g._counted&&f.push(g);d.unmark(c);return f},findElement:function(a,b,c){Object.isNumber(b)&&(c=b,b=!1);return Selector.matchElements(a,b||"*")[c||0]},findChildElements:function(a,b){var c=b.join(","),b=[];c.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/,function(a){b.push(a[1].strip())});for(var c=[],d=Selector.handlers,
e=0,f=b.length,g;e<f;e++)g=new Selector(b[e].strip()),d.concat(c,g.findElements(a));return f>1?d.unique(c):c}});function $$(){return Selector.findChildElements(document,$A(arguments))}
var Form={reset:function(a){$(a).reset();return a},serializeElements:function(a,b){if(typeof b!="object")b={hash:!!b};else if(b.hash===void 0)b.hash=!0;var c,d,e=!1,f=b.submit,g=a.inject({},function(a,b){if(!b.disabled&&b.name&&(c=b.name,d=$(b).getValue(),d!=null&&(b.type!="submit"||!e&&f!==!1&&(!f||c==f)&&(e=!0))))c in a?(Object.isArray(a[c])||(a[c]=[a[c]]),a[c].push(d)):a[c]=d;return a});return b.hash?g:Object.toQueryString(g)}};
Form.Methods={serialize:function(a,b){return Form.serializeElements(Form.getElements(a),b)},getElements:function(a){return $A($(a).getElementsByTagName("*")).inject([],function(a,c){Form.Element.Serializers[c.tagName.toLowerCase()]&&a.push(Element.extend(c));return a})},getInputs:function(a,b,c){a=$(a);a=a.getElementsByTagName("input");if(!b&&!c)return $A(a).map(Element.extend);for(var d=0,e=[],f=a.length;d<f;d++){var g=a[d];b&&g.type!=b||c&&g.name!=c||e.push(Element.extend(g))}return e},disable:function(a){a=
$(a);Form.getElements(a).invoke("disable");return a},enable:function(a){a=$(a);Form.getElements(a).invoke("enable");return a},findFirstElement:function(a){var a=$(a).getElements().findAll(function(a){return"hidden"!=a.type&&!a.disabled}),b=a.findAll(function(a){return a.hasAttribute("tabIndex")&&a.tabIndex>=0}).sortBy(function(a){return a.tabIndex}).first();return b?b:a.find(function(a){return["input","select","textarea"].include(a.tagName.toLowerCase())})},focusFirstElement:function(a){a=$(a);a.findFirstElement().activate();
return a},request:function(a,b){var a=$(a),b=Object.clone(b||{}),c=b.parameters,d=a.readAttribute("action")||"";if(d.blank())d=window.location.href;b.parameters=a.serialize(!0);c&&(Object.isString(c)&&(c=c.toQueryParams()),Object.extend(b.parameters,c));if(a.hasAttribute("method")&&!b.method)b.method=a.method;return new Ajax.Request(d,b)}};Form.Element={focus:function(a){$(a).focus();return a},select:function(a){$(a).select();return a}};
Form.Element.Methods={serialize:function(a){a=$(a);if(!a.disabled&&a.name){var b=a.getValue();if(b!=void 0){var c={};c[a.name]=b;return Object.toQueryString(c)}}return""},getValue:function(a){var a=$(a),b=a.tagName.toLowerCase();return Form.Element.Serializers[b](a)},setValue:function(a,b){var a=$(a),c=a.tagName.toLowerCase();Form.Element.Serializers[c](a,b);return a},clear:function(a){$(a).value="";return a},present:function(a){return $(a).value!=""},activate:function(a){a=$(a);try{a.focus(),a.select&&
(a.tagName.toLowerCase()!="input"||!["button","reset","submit"].include(a.type))&&a.select()}catch(b){}return a},disable:function(a){a=$(a);a.blur();a.disabled=!0;return a},enable:function(a){a=$(a);a.disabled=!1;return a}};var Field=Form.Element,$F=Form.Element.Methods.getValue;
Form.Element.Serializers={input:function(a,b){switch(a.type.toLowerCase()){case "checkbox":case "radio":return Form.Element.Serializers.inputSelector(a,b);default:return Form.Element.Serializers.textarea(a,b)}},inputSelector:function(a,b){if(b===void 0)return a.checked?a.value:null;else a.checked=!!b},textarea:function(a,b){if(b===void 0)return a.value;else a.value=b},select:function(a,b){if(b===void 0)return this[a.type=="select-one"?"selectOne":"selectMany"](a);else for(var c,d,e=!Object.isArray(b),
f=0,g=a.length;f<g;f++)if(c=a.options[f],d=this.optionValue(c),e){if(d==b){c.selected=!0;break}}else c.selected=b.include(d)},selectOne:function(a){var b=a.selectedIndex;return b>=0?this.optionValue(a.options[b]):null},selectMany:function(a){var b,c=a.length;if(!c)return null;var d=0;for(b=[];d<c;d++){var e=a.options[d];e.selected&&b.push(this.optionValue(e))}return b},optionValue:function(a){return Element.extend(a).hasAttribute("value")?a.value:a.text}};
Abstract.TimedObserver=Class.create(PeriodicalExecuter,{initialize:function($super,b,c,d){$super(d,c);this.element=$(b);this.lastValue=this.getValue()},execute:function(){var a=this.getValue();if(Object.isString(this.lastValue)&&Object.isString(a)?this.lastValue!=a:String(this.lastValue)!=String(a))this.callback(this.element,a),this.lastValue=a}});Form.Element.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.Element.getValue(this.element)}});
Form.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.serialize(this.element)}});
Abstract.EventObserver=Class.create({initialize:function(a,b){this.element=$(a);this.callback=b;this.lastValue=this.getValue();this.element.tagName.toLowerCase()=="form"?this.registerFormCallbacks():this.registerCallback(this.element)},onElementEvent:function(){var a=this.getValue();if(this.lastValue!=a)this.callback(this.element,a),this.lastValue=a},registerFormCallbacks:function(){Form.getElements(this.element).each(this.registerCallback,this)},registerCallback:function(a){if(a.type)switch(a.type.toLowerCase()){case "checkbox":case "radio":Event.observe(a,
"click",this.onElementEvent.bind(this));break;default:Event.observe(a,"change",this.onElementEvent.bind(this))}}});Form.Element.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.Element.getValue(this.element)}});Form.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.serialize(this.element)}});if(!window.Event)var Event={};
Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,KEY_INSERT:45,cache:{},relatedTarget:function(a){switch(a.type){case "mouseover":a=a.fromElement;break;case "mouseout":a=a.toElement;break;default:return null}return Element.extend(a)}});
Event.Methods=function(){var a;if(Prototype.Browser.IE){var b={0:1,1:4,2:2};a=function(a,d){return a.button==b[d]}}else a=Prototype.Browser.WebKit?function(a,b){switch(b){case 0:return a.which==1&&!a.metaKey;case 1:return a.which==1&&a.metaKey;default:return!1}}:function(a,b){return a.which?a.which===b+1:a.button===b};return{isLeftClick:function(b){return a(b,0)},isMiddleClick:function(b){return a(b,1)},isRightClick:function(b){return a(b,2)},element:function(a){a=Event.extend(a).target;return Element.extend(a.nodeType==
Node.TEXT_NODE?a.parentNode:a)},findElement:function(a,b){var e=Event.element(a);return e.match(b)?e:e.up(b)},pointer:function(a){return{x:a.pageX||a.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft),y:a.pageY||a.clientY+(document.documentElement.scrollTop||document.body.scrollTop)}},pointerX:function(a){return Event.pointer(a).x},pointerY:function(a){return Event.pointer(a).y},stop:function(a){Event.extend(a);a.preventDefault();a.stopPropagation();a.stopped=!0}}}();
Event.extend=function(){var a=Object.keys(Event.Methods).inject({},function(a,c){a[c]=Event.Methods[c].methodize();return a});return Prototype.Browser.IE?(Object.extend(a,{stopPropagation:function(){this.cancelBubble=!0},preventDefault:function(){this.returnValue=!1},inspect:function(){return"[object Event]"}}),function(b){if(!b)return!1;if(b._extendedByPrototype)return b;b._extendedByPrototype=Prototype.emptyFunction;var c=Event.pointer(b);Object.extend(b,{target:b.srcElement,relatedTarget:Event.relatedTarget(b),
pageX:c.x,pageY:c.y});return Object.extend(b,a)}):(Event.prototype=Event.prototype||document.createEvent("HTMLEvents").__proto__,Object.extend(Event.prototype,a),Prototype.K)}();
Object.extend(Event,function(){function a(a){if(a._eventID)return a._eventID;arguments.callee.id=arguments.callee.id||1;return a._eventID=++arguments.callee.id}function b(a,b){var c=g[a]=g[a]||{};return c[b]=c[b]||[]}function c(c,d,e){var f=a(c),f=b(f,d);if(f.pluck("handler").include(e))return!1;var g=function(a){if(!Event||!Event.extend||a.eventName&&a.eventName!=d)return!1;Event.extend(a);e.call(c,a)};g.handler=e;f.push(g);return g}function d(a,c,d){return b(a,c).find(function(a){return a.handler==
d})}function e(a,b,c){var e=g[a]=g[a]||{};if(!e[b])return!1;e[b]=e[b].without(d(a,b,c))}function f(){for(var a in g)for(var b in g[a])g[a][b]=null}var g=Event.cache;window.attachEvent&&window.attachEvent("onunload",f);return{observe:function(a,b,d){var a=$(a),e=b&&b.include(":")?"dataavailable":b,b=c(a,b,d);if(!b)return a;a.addEventListener?a.addEventListener(e,b,!1):a.attachEvent("on"+e,b);return a},stopObserving:function(c,f,m){var c=$(c),n=a(c),r=f&&f.include(":")?"dataavailable":f;if(!m&&f)return b(n,
f).each(function(a){c.stopObserving(f,a.handler)}),c;else if(!f)return Object.keys(g[n]=g[n]||{}).each(function(a){c.stopObserving(a)}),c;var o=d(n,f,m);if(!o)return c;c.removeEventListener?c.removeEventListener(r,o,!1):c.detachEvent("on"+r,o);e(n,f,m);return c},fire:function(a,b,c){a=$(a);if(a==document&&document.createEvent&&!a.dispatchEvent)a=document.documentElement;if(document.createEvent){var d=document.createEvent("HTMLEvents");d.initEvent("dataavailable",!0,!0)}else d=document.createEventObject(),
d.eventType="ondataavailable";d.eventName=b;d.memo=c||{};document.createEvent?a.dispatchEvent(d):a.fireEvent(d.eventType,d);return d}}}());Object.extend(Event,Event.Methods);Element.addMethods({fire:Event.fire,observe:Event.observe,stopObserving:Event.stopObserving});Object.extend(document,{fire:Element.Methods.fire.methodize(),observe:Element.Methods.observe.methodize(),stopObserving:Element.Methods.stopObserving.methodize()});
(function(){function a(){c||(b&&window.clearInterval(b),document.fire("dom:loaded"),c=!0)}var b,c=!1;document.addEventListener?Prototype.Browser.WebKit?(b=window.setInterval(function(){/loaded|complete/.test(document.readyState)&&a()},0),Event.observe(window,"load",a)):document.addEventListener("DOMContentLoaded",a,!1):(document.write("<script id=__onDOMContentLoaded defer src=//:><\/script>"),$("__onDOMContentLoaded").onreadystatechange=function(){if(this.readyState=="complete")this.onreadystatechange=
null,a()})})();Hash.toQueryString=Object.toQueryString;var Toggle={display:Element.toggle};Element.Methods.childOf=Element.Methods.descendantOf;
var Insertion={Before:function(a,b){return Element.insert(a,{before:b})},Top:function(a,b){return Element.insert(a,{top:b})},Bottom:function(a,b){return Element.insert(a,{bottom:b})},After:function(a,b){return Element.insert(a,{after:b})}},$continue=Error('"throw $continue" is deprecated, use "return" instead'),Position={includeScrollOffsets:!1,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||document.documentElement.scrollTop||
document.body.scrollTop||0},within:function(a,b,c){if(this.includeScrollOffsets)return this.withinIncludingScrolloffsets(a,b,c);this.xcomp=b;this.ycomp=c;this.offset=Element.cumulativeOffset(a);return c>=this.offset[1]&&c<this.offset[1]+a.offsetHeight&&b>=this.offset[0]&&b<this.offset[0]+a.offsetWidth},withinIncludingScrolloffsets:function(a,b,c){var d=Element.cumulativeScrollOffset(a);this.xcomp=b+d[0]-this.deltaX;this.ycomp=c+d[1]-this.deltaY;this.offset=Element.cumulativeOffset(a);return this.ycomp>=
this.offset[1]&&this.ycomp<this.offset[1]+a.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+a.offsetWidth},overlap:function(a,b){if(!a)return 0;if(a=="vertical")return(this.offset[1]+b.offsetHeight-this.ycomp)/b.offsetHeight;if(a=="horizontal")return(this.offset[0]+b.offsetWidth-this.xcomp)/b.offsetWidth},cumulativeOffset:Element.Methods.cumulativeOffset,positionedOffset:Element.Methods.positionedOffset,absolutize:function(a){Position.prepare();return Element.absolutize(a)},relativize:function(a){Position.prepare();
return Element.relativize(a)},realOffset:Element.Methods.cumulativeScrollOffset,offsetParent:Element.Methods.getOffsetParent,page:Element.Methods.viewportOffset,clone:function(a,b,c){c=c||{};return Element.clonePosition(b,a,c)}};
if(!document.getElementsByClassName)document.getElementsByClassName=function(a){function b(a){return a.blank()?null:"[contains(concat(' ', @class, ' '), ' "+a+" ')]"}a.getElementsByClassName=Prototype.BrowserFeatures.XPath?function(a,d){var d=d.toString().strip(),e=/\s/.test(d)?$w(d).map(b).join(""):b(d);return e?document._getElementsByXPath(".//*"+e,a):[]}:function(a,b){var b=b.toString().strip(),e=[],f=/\s/.test(b)?$w(b):null;if(!f&&!b)return e;for(var g=$(a).getElementsByTagName("*"),b=" "+b+" ",
h=0,l,m;l=g[h];h++)l.className&&(m=" "+l.className+" ")&&(m.include(b)||f&&f.all(function(a){return!a.toString().blank()&&m.include(" "+a+" ")}))&&e.push(Element.extend(l));return e};return function(a,b){return $(b||document.body).getElementsByClassName(a)}}(Element.Methods);Element.ClassNames=Class.create();
Element.ClassNames.prototype={initialize:function(a){this.element=$(a)},_each:function(a){this.element.className.split(/\s+/).select(function(a){return a.length>0})._each(a)},set:function(a){this.element.className=a},add:function(a){this.include(a)||this.set($A(this).concat(a).join(" "))},remove:function(a){this.include(a)&&this.set($A(this).without(a).join(" "))},toString:function(){return $A(this).join(" ")}};Object.extend(Element.ClassNames.prototype,Enumerable);Element.addMethods();
Object.extend(Position,{clientWidth:function(){return this.filterResults(window.innerWidth?window.innerWidth:0,document.documentElement?document.documentElement.clientWidth:0,document.body?document.body.clientWidth:0)},clientHeight:function(){return this.filterResults(window.innerHeight?window.innerHeight:0,document.documentElement?document.documentElement.clientHeight:0,document.body?document.body.clientHeight:0)},scrollLeft:function(){return this.filterResults(window.pageXOffset?window.pageXOffset:
0,document.documentElement?document.documentElement.scrollLeft:0,document.body?document.body.scrollLeft:0)},scrollTop:function(){return this.filterResults(window.pageYOffset?window.pageYOffset:0,document.documentElement?document.documentElement.scrollTop:0,document.body?document.body.scrollTop:0)},filterResults:function(a,b,c){a=a?a:0;if(b&&(!a||a>b))a=b;return c&&(!a||a>c)?c:a},getDeltaX:function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},getDeltaY:function(){return window.pageYOffset||
document.documentElement.scrollTop||document.body.scrollTop||0},computeCenter:function(a){var a=$(a),b=this.clientHeight(),c=this.clientWidth(),d=a.getHeight(),a=a.getWidth(),e=this.getDeltaX(),f=this.getDeltaY(),b=b/2-d/2+f;return[parseInt(c/2-a/2+e),parseInt(b)]},center:function(a){var b=this.computeCenter(a);a.setStyle({left:b[0],top:b[1]})},getPreferredPosition:function(a,b){var a=$(a),c=this.computeCenter(a),c=Object.extend({x:c[0],y:c[1]},b||{}),d=this.clientWidth(),e=this.clientHeight(),f=
this.getDeltaX(),g=this.getDeltaY();c.x+f>d/2&&(c.x-=a.getWidth());c.y-g>e/2&&(c.y-=a.getHeight());return[c.x,c.y]}});
var Scriptaculous={Version:"1.8.0",require:function(a){document.write('<script type="text/javascript" src="'+a+'"><\/script>')},REQUIRED_PROTOTYPE:"1.6.0",load:function(){function a(a){a=a.split(".");return parseInt(a[0])*1E5+parseInt(a[1])*1E3+parseInt(a[2])}if(typeof Prototype=="undefined"||typeof Element=="undefined"||typeof Element.Methods=="undefined"||a(Prototype.Version)<a(Scriptaculous.REQUIRED_PROTOTYPE))throw"script.aculo.us requires the Prototype JavaScript framework >= "+Scriptaculous.REQUIRED_PROTOTYPE;
$A(document.getElementsByTagName("script")).findAll(function(a){return a.src&&a.src.match(/scriptaculous\.js(\?.*)?$/)}).each(function(a){var c=a.src.replace(/scriptaculous\.js(\?.*)?$/,""),a=a.src.match(/\?.*load=([a-z,]*)/);(a?a[1]:"builder,effects,dragdrop,slider").split(",").each(function(a){Scriptaculous.require(c+a+".js")})})}};Scriptaculous.load();if(!Control)var Control={};
Control.Slider=Class.create({initialize:function(a,b,c){var d=this;this.handles=Object.isArray(a)?a.collect(function(a){return $(a)}):[$(a)];this.track=$(b);this.options=c||{};this.axis=this.options.axis||"horizontal";this.increment=this.options.increment||1;this.step=parseInt(this.options.step||"1");this.range=this.options.range||$R(0,1);this.value=0;this.values=this.handles.map(function(){return 0});this.spans=this.options.spans?this.options.spans.map(function(a){return $(a)}):!1;this.options.startSpan=
$(this.options.startSpan||null);this.options.endSpan=$(this.options.endSpan||null);this.restricted=this.options.restricted||!1;this.maximum=this.options.maximum||this.range.end;this.minimum=this.options.minimum||this.range.start;this.alignX=parseInt(this.options.alignX||"0");this.alignY=parseInt(this.options.alignY||"0");this.trackLength=this.maximumOffset()-this.minimumOffset();this.handleLength=this.isVertical()?this.handles[0].offsetHeight!=0?this.handles[0].offsetHeight:this.handles[0].style.height.replace(/px$/,
""):this.handles[0].offsetWidth!=0?this.handles[0].offsetWidth:this.handles[0].style.width.replace(/px$/,"");this.disabled=this.dragging=this.active=!1;this.options.disabled&&this.setDisabled();if(this.allowedValues=this.options.values?this.options.values.sortBy(Prototype.K):!1)this.minimum=this.allowedValues.min(),this.maximum=this.allowedValues.max();this.eventMouseDown=this.startDrag.bindAsEventListener(this);this.eventMouseUp=this.endDrag.bindAsEventListener(this);this.eventMouseMove=this.update.bindAsEventListener(this);
this.handles.each(function(a,b){b=d.handles.length-1-b;d.setValue(parseFloat((Object.isArray(d.options.sliderValue)?d.options.sliderValue[b]:d.options.sliderValue)||d.range.start),b);a.makePositioned().observe("mousedown",d.eventMouseDown)});this.track.observe("mousedown",this.eventMouseDown);document.observe("mouseup",this.eventMouseUp);document.observe("mousemove",this.eventMouseMove);this.initialized=!0},dispose:function(){var a=this;Event.stopObserving(this.track,"mousedown",this.eventMouseDown);
Event.stopObserving(document,"mouseup",this.eventMouseUp);Event.stopObserving(document,"mousemove",this.eventMouseMove);this.handles.each(function(b){Event.stopObserving(b,"mousedown",a.eventMouseDown)})},setDisabled:function(){this.disabled=!0},setEnabled:function(){this.disabled=!1},getNearestValue:function(a){if(this.allowedValues){if(a>=this.allowedValues.max())return this.allowedValues.max();if(a<=this.allowedValues.min())return this.allowedValues.min();var b=Math.abs(this.allowedValues[0]-a),
c=this.allowedValues[0];this.allowedValues.each(function(d){var e=Math.abs(d-a);e<=b&&(c=d,b=e)});return c}return a>this.range.end?this.range.end:a<this.range.start?this.range.start:a},setValue:function(a,b){if(!this.active)this.activeHandleIdx=b||0,this.activeHandle=this.handles[this.activeHandleIdx],this.updateStyles();b=b||this.activeHandleIdx||0;this.initialized&&this.restricted&&(b>0&&a<this.values[b-1]&&(a=this.values[b-1]),b<this.handles.length-1&&a>this.values[b+1]&&(a=this.values[b+1]));
a=this.getNearestValue(a);this.values[b]=a;this.value=this.values[0];this.handles[b].style[this.isVertical()?"top":"left"]=this.translateToPx(a);this.drawSpans();(!this.dragging||!this.event)&&this.updateFinished()},setValueBy:function(a,b){this.setValue(this.values[b||this.activeHandleIdx||0]+a,b||this.activeHandleIdx||0)},translateToPx:function(a){return Math.round((this.trackLength-this.handleLength)/(this.range.end-this.range.start)*(a-this.range.start))+"px"},translateToValue:function(a){return a/
(this.trackLength-this.handleLength)*(this.range.end-this.range.start)+this.range.start},getRange:function(a){var b=this.values.sortBy(Prototype.K),a=a||0;return $R(b[a],b[a+1])},minimumOffset:function(){return this.isVertical()?this.alignY:this.alignX},maximumOffset:function(){return this.isVertical()?(this.track.offsetHeight!=0?this.track.offsetHeight:this.track.style.height.replace(/px$/,""))-this.alignY:(this.track.offsetWidth!=0?this.track.offsetWidth:this.track.style.width.replace(/px$/,""))-
this.alignX},isVertical:function(){return this.axis=="vertical"},drawSpans:function(){var a=this;this.spans&&$R(0,this.spans.length-1).each(function(b){a.setSpan(a.spans[b],a.getRange(b))});this.options.startSpan&&this.setSpan(this.options.startSpan,$R(0,this.values.length>1?this.getRange(0).min():this.value));this.options.endSpan&&this.setSpan(this.options.endSpan,$R(this.values.length>1?this.getRange(this.spans.length-1).max():this.value,this.maximum))},setSpan:function(a,b){this.isVertical()?(a.style.top=
this.translateToPx(b.start),a.style.height=this.translateToPx(b.end-b.start+this.range.start)):(a.style.left=this.translateToPx(b.start),a.style.width=this.translateToPx(b.end-b.start+this.range.start))},updateStyles:function(){this.handles.each(function(a){Element.removeClassName(a,"selected")});Element.addClassName(this.activeHandle,"selected")},startDrag:function(a){if(Event.isLeftClick(a)){if(!this.disabled){this.active=!0;var b=Event.element(a),c=[Event.pointerX(a),Event.pointerY(a)];if(b==this.track)b=
this.track.cumulativeOffset(),this.event=a,this.setValue(this.translateToValue((this.isVertical()?c[1]-b[1]:c[0]-b[0])-this.handleLength/2)),b=this.activeHandle.cumulativeOffset(),this.offsetX=c[0]-b[0],this.offsetY=c[1]-b[1];else{for(;this.handles.indexOf(b)==-1&&b.parentNode;)b=b.parentNode;if(this.handles.indexOf(b)!=-1)this.activeHandle=b,this.activeHandleIdx=this.handles.indexOf(this.activeHandle),this.updateStyles(),b=this.activeHandle.cumulativeOffset(),this.offsetX=c[0]-b[0],this.offsetY=
c[1]-b[1]}}Event.stop(a)}},update:function(a){if(this.active){if(!this.dragging)this.dragging=!0;this.draw(a);Prototype.Browser.WebKit&&window.scrollBy(0,0);Event.stop(a)}},draw:function(a){var b=[Event.pointerX(a),Event.pointerY(a)],c=this.track.cumulativeOffset();b[0]-=this.offsetX+c[0];b[1]-=this.offsetY+c[1];this.event=a;this.setValue(this.translateToValue(this.isVertical()?b[1]:b[0]));if(this.initialized&&this.options.onSlide)this.options.onSlide(this.values.length>1?this.values:this.value,this)},
endDrag:function(a){this.active&&this.dragging&&(this.finishDrag(a,!0),Event.stop(a));this.dragging=this.active=!1},finishDrag:function(){this.dragging=this.active=!1;this.updateFinished()},updateFinished:function(){if(this.initialized&&this.options.onChange)this.options.onChange(this.values.length>1?this.values:this.value,this);this.event=null}});
String.prototype.parseColor=function(a){var b="#";if(this.slice(0,4)=="rgb("){var c=this.slice(4,this.length-1).split(","),d=0;do b+=parseInt(c[d]).toColorPart();while(++d<3)}else if(this.slice(0,1)=="#"){if(this.length==4)for(d=1;d<4;d++)b+=(this.charAt(d)+this.charAt(d)).toLowerCase();this.length==7&&(b=this.toLowerCase())}return b.length==7?b:a||this};
Element.collectTextNodes=function(a){return $A($(a).childNodes).collect(function(a){return a.nodeType==3?a.nodeValue:a.hasChildNodes()?Element.collectTextNodes(a):""}).flatten().join("")};Element.collectTextNodesIgnoreClass=function(a,b){return $A($(a).childNodes).collect(function(a){return a.nodeType==3?a.nodeValue:a.hasChildNodes()&&!Element.hasClassName(a,b)?Element.collectTextNodesIgnoreClass(a,b):""}).flatten().join("")};
Element.setContentZoom=function(a,b){a=$(a);a.setStyle({fontSize:b/100+"em"});Prototype.Browser.WebKit&&window.scrollBy(0,0);return a};Element.getInlineOpacity=function(a){return $(a).style.opacity||""};Element.forceRerendering=function(a){try{var a=$(a),b=document.createTextNode(" ");a.appendChild(b);a.removeChild(b)}catch(c){}};
var Effect={_elementDoesNotExistError:{name:"ElementDoesNotExistError",message:"The specified DOM element does not exist, but is required for this effect to operate"},Transitions:{linear:Prototype.K,sinoidal:function(a){return-Math.cos(a*Math.PI)/2+0.5},reverse:function(a){return 1-a},flicker:function(a){a=-Math.cos(a*Math.PI)/4+0.75+Math.random()/4;return a>1?1:a},wobble:function(a){return-Math.cos(a*Math.PI*9*a)/2+0.5},pulse:function(a,b){b=b||5;return(a%(1/b)*b).round()==0?a*b*2-(a*b*2).floor():
1-(a*b*2-(a*b*2).floor())},spring:function(a){return 1-Math.cos(a*4.5*Math.PI)*Math.exp(-a*6)},none:function(){return 0},full:function(){return 1}},DefaultOptions:{duration:1,fps:100,sync:!1,from:0,to:1,delay:0,queue:"parallel"},tagifyText:function(a){var b="position:relative";Prototype.Browser.IE&&(b+=";zoom:1");a=$(a);$A(a.childNodes).each(function(c){c.nodeType==3&&(c.nodeValue.toArray().each(function(d){a.insertBefore((new Element("span",{style:b})).update(d==" "?String.fromCharCode(160):d),c)}),
Element.remove(c))})},multiple:function(a,b,c){var a=(typeof a=="object"||Object.isFunction(a))&&a.length?a:$(a).childNodes,d=Object.extend({speed:0.1,delay:0},c||{}),e=d.delay;$A(a).each(function(a,c){new b(a,Object.extend(d,{delay:c*d.speed+e}))})},PAIRS:{slide:["SlideDown","SlideUp"],blind:["BlindDown","BlindUp"],appear:["Appear","Fade"]},toggle:function(a,b,c){a=$(a);b=(b||"appear").toLowerCase();c=Object.extend({queue:{position:"end",scope:a.id||"global",limit:1}},c||{});Effect[a.visible()?Effect.PAIRS[b][1]:
Effect.PAIRS[b][0]](a,c)}};Effect.DefaultOptions.transition=Effect.Transitions.sinoidal;
Effect.ScopedQueue=Class.create(Enumerable,{initialize:function(){this.effects=[];this.interval=null},_each:function(a){this.effects._each(a)},add:function(a){var b=(new Date).getTime();switch(Object.isString(a.options.queue)?a.options.queue:a.options.queue.position){case "front":this.effects.findAll(function(a){return a.state=="idle"}).each(function(b){b.startOn+=a.finishOn;b.finishOn+=a.finishOn});break;case "with-last":b=this.effects.pluck("startOn").max()||b;break;case "end":b=this.effects.pluck("finishOn").max()||
b}a.startOn+=b;a.finishOn+=b;(!a.options.queue.limit||this.effects.length<a.options.queue.limit)&&this.effects.push(a);if(!this.interval)this.interval=setInterval(this.loop.bind(this),15)},remove:function(a){this.effects=this.effects.reject(function(b){return b==a});if(this.effects.length==0)clearInterval(this.interval),this.interval=null},loop:function(){for(var a=(new Date).getTime(),b=0,c=this.effects.length;b<c;b++)this.effects[b]&&this.effects[b].loop(a)}});
Effect.Queues={instances:$H(),get:function(a){return!Object.isString(a)?a:this.instances.get(a)||this.instances.set(a,new Effect.ScopedQueue)}};Effect.Queue=Effect.Queues.get("global");
Effect.Base=Class.create({position:null,start:function(a){function b(a,b){return(a[b+"Internal"]?"this.options."+b+"Internal(this);":"")+(a[b]?"this.options."+b+"(this);":"")}if(a&&a.transition===!1)a.transition=Effect.Transitions.linear;this.options=Object.extend(Object.extend({},Effect.DefaultOptions),a||{});this.currentFrame=0;this.state="idle";this.startOn=this.options.delay*1E3;this.finishOn=this.startOn+this.options.duration*1E3;this.fromToDelta=this.options.to-this.options.from;this.totalTime=
this.finishOn-this.startOn;this.totalFrames=this.options.fps*this.options.duration;eval('this.render = function(pos){ if (this.state=="idle"){this.state="running";'+b(this.options,"beforeSetup")+(this.setup?"this.setup();":"")+b(this.options,"afterSetup")+'};if (this.state=="running"){pos=this.options.transition(pos)*'+this.fromToDelta+"+"+this.options.from+";this.position=pos;"+b(this.options,"beforeUpdate")+(this.update?"this.update(pos);":"")+b(this.options,"afterUpdate")+"}}");this.event("beforeStart");
this.options.sync||Effect.Queues.get(Object.isString(this.options.queue)?"global":this.options.queue.scope).add(this)},loop:function(a){if(a>=this.startOn)if(a>=this.finishOn)this.render(1),this.cancel(),this.event("beforeFinish"),this.finish&&this.finish(),this.event("afterFinish");else{var a=(a-this.startOn)/this.totalTime,b=(a*this.totalFrames).round();if(b>this.currentFrame)this.render(a),this.currentFrame=b}},cancel:function(){this.options.sync||Effect.Queues.get(Object.isString(this.options.queue)?
"global":this.options.queue.scope).remove(this);this.state="finished"},event:function(a){if(this.options[a+"Internal"])this.options[a+"Internal"](this);if(this.options[a])this.options[a](this)},inspect:function(){var a=$H();for(property in this)Object.isFunction(this[property])||a.set(property,this[property]);return"#<Effect:"+a.inspect()+",options:"+$H(this.options).inspect()+">"}});
Effect.Parallel=Class.create(Effect.Base,{initialize:function(a,b){this.effects=a||[];this.start(b)},update:function(a){this.effects.invoke("render",a)},finish:function(a){this.effects.each(function(b){b.render(1);b.cancel();b.event("beforeFinish");b.finish&&b.finish(a);b.event("afterFinish")})}});
Effect.Tween=Class.create(Effect.Base,{initialize:function(a,b,c){var a=Object.isString(a)?$(a):a,d=$A(arguments),e=d.last(),d=d.length==5?d[3]:null;this.method=Object.isFunction(e)?e.bind(a):Object.isFunction(a[e])?a[e].bind(a):function(b){a[e]=b};this.start(Object.extend({from:b,to:c},d||{}))},update:function(a){this.method(a)}});Effect.Event=Class.create(Effect.Base,{initialize:function(a){this.start(Object.extend({duration:0},a||{}))},update:Prototype.emptyFunction});
Effect.Opacity=Class.create(Effect.Base,{initialize:function(a,b){this.element=$(a);if(!this.element)throw Effect._elementDoesNotExistError;Prototype.Browser.IE&&!this.element.currentStyle.hasLayout&&this.element.setStyle({zoom:1});this.start(Object.extend({from:this.element.getOpacity()||0,to:1},b||{}))},update:function(a){this.element.setOpacity(a)}});
Effect.Move=Class.create(Effect.Base,{initialize:function(a,b){this.element=$(a);if(!this.element)throw Effect._elementDoesNotExistError;this.start(Object.extend({x:0,y:0,mode:"relative"},b||{}))},setup:function(){this.element.makePositioned();this.originalLeft=parseFloat(this.element.getStyle("left")||"0");this.originalTop=parseFloat(this.element.getStyle("top")||"0");this.options.mode=="absolute"&&(this.options.x-=this.originalLeft,this.options.y-=this.originalTop)},update:function(a){this.element.setStyle({left:(this.options.x*
a+this.originalLeft).round()+"px",top:(this.options.y*a+this.originalTop).round()+"px"})}});Effect.MoveBy=function(a,b,c,d){return new Effect.Move(a,Object.extend({x:c,y:b},d||{}))};
Effect.Scale=Class.create(Effect.Base,{initialize:function(a,b,c){this.element=$(a);if(!this.element)throw Effect._elementDoesNotExistError;this.start(Object.extend({scaleX:!0,scaleY:!0,scaleContent:!0,scaleFromCenter:!1,scaleMode:"box",scaleFrom:100,scaleTo:b},c||{}))},setup:function(){this.restoreAfterFinish=this.options.restoreAfterFinish||!1;this.elementPositioning=this.element.getStyle("position");this.originalStyle={};["top","left","width","height","fontSize"].each(function(a){this.originalStyle[a]=
this.element.style[a]}.bind(this));this.originalTop=this.element.offsetTop;this.originalLeft=this.element.offsetLeft;var a=this.element.getStyle("font-size")||"100%";["em","px","%","pt"].each(function(b){if(a.indexOf(b)>0)this.fontSize=parseFloat(a),this.fontSizeType=b}.bind(this));this.factor=(this.options.scaleTo-this.options.scaleFrom)/100;this.dims=null;if(this.options.scaleMode=="box")this.dims=[this.element.offsetHeight,this.element.offsetWidth];if(/^content/.test(this.options.scaleMode))this.dims=
[this.element.scrollHeight,this.element.scrollWidth];if(!this.dims)this.dims=[this.options.scaleMode.originalHeight,this.options.scaleMode.originalWidth]},update:function(a){a=this.options.scaleFrom/100+this.factor*a;this.options.scaleContent&&this.fontSize&&this.element.setStyle({fontSize:this.fontSize*a+this.fontSizeType});this.setDimensions(this.dims[0]*a,this.dims[1]*a)},finish:function(){this.restoreAfterFinish&&this.element.setStyle(this.originalStyle)},setDimensions:function(a,b){var c={};
if(this.options.scaleX)c.width=b.round()+"px";if(this.options.scaleY)c.height=a.round()+"px";if(this.options.scaleFromCenter){var d=(a-this.dims[0])/2,e=(b-this.dims[1])/2;if(this.elementPositioning=="absolute"){if(this.options.scaleY)c.top=this.originalTop-d+"px";if(this.options.scaleX)c.left=this.originalLeft-e+"px"}else{if(this.options.scaleY)c.top=-d+"px";if(this.options.scaleX)c.left=-e+"px"}}this.element.setStyle(c)}});
Effect.Highlight=Class.create(Effect.Base,{initialize:function(a,b){this.element=$(a);if(!this.element)throw Effect._elementDoesNotExistError;this.start(Object.extend({startcolor:"#ffff99"},b||{}))},setup:function(){if(this.element.getStyle("display")=="none")this.cancel();else{this.oldStyle={};if(!this.options.keepBackgroundImage)this.oldStyle.backgroundImage=this.element.getStyle("background-image"),this.element.setStyle({backgroundImage:"none"});if(!this.options.endcolor)this.options.endcolor=
this.element.getStyle("background-color").parseColor("#ffffff");if(!this.options.restorecolor)this.options.restorecolor=this.element.getStyle("background-color");this._base=$R(0,2).map(function(a){return parseInt(this.options.startcolor.slice(a*2+1,a*2+3),16)}.bind(this));this._delta=$R(0,2).map(function(a){return parseInt(this.options.endcolor.slice(a*2+1,a*2+3),16)-this._base[a]}.bind(this))}},update:function(a){this.element.setStyle({backgroundColor:$R(0,2).inject("#",function(b,c,d){return b+
(this._base[d]+this._delta[d]*a).round().toColorPart()}.bind(this))})},finish:function(){this.element.setStyle(Object.extend(this.oldStyle,{backgroundColor:this.options.restorecolor}))}});Effect.ScrollTo=function(a,b){var c=b||{},d=document.viewport.getScrollOffsets(),e=$(a).cumulativeOffset(),f=(window.height||document.body.scrollHeight)-document.viewport.getHeight();c.offset&&(e[1]+=c.offset);return new Effect.Tween(null,d.top,e[1]>f?f:e[1],c,function(a){scrollTo(d.left,a.round())})};
Effect.Fade=function(a,b){var a=$(a),c=a.getInlineOpacity(),d=Object.extend({from:a.getOpacity()||1,to:0,afterFinishInternal:function(a){a.options.to==0&&a.element.hide().setStyle({opacity:c})}},b||{});return new Effect.Opacity(a,d)};
Effect.Appear=function(a,b){var a=$(a),c=Object.extend({from:a.getStyle("display")=="none"?0:a.getOpacity()||0,to:1,afterFinishInternal:function(a){a.element.forceRerendering()},beforeSetup:function(a){a.element.setOpacity(a.options.from).show()}},b||{});return new Effect.Opacity(a,c)};
Effect.Puff=function(a,b){var a=$(a),c={opacity:a.getInlineOpacity(),position:a.getStyle("position"),top:a.style.top,left:a.style.left,width:a.style.width,height:a.style.height};return new Effect.Parallel([new Effect.Scale(a,200,{sync:!0,scaleFromCenter:!0,scaleContent:!0,restoreAfterFinish:!0}),new Effect.Opacity(a,{sync:!0,to:0})],Object.extend({duration:1,beforeSetupInternal:function(a){Position.absolutize(a.effects[0].element)},afterFinishInternal:function(a){a.effects[0].element.hide().setStyle(c)}},
b||{}))};Effect.BlindUp=function(a,b){a=$(a);a.makeClipping();return new Effect.Scale(a,0,Object.extend({scaleContent:!1,scaleX:!1,restoreAfterFinish:!0,afterFinishInternal:function(a){a.element.hide().undoClipping()}},b||{}))};
Effect.BlindDown=function(a,b){var a=$(a),c=a.getDimensions();return new Effect.Scale(a,100,Object.extend({scaleContent:!1,scaleX:!1,scaleFrom:0,scaleMode:{originalHeight:c.height,originalWidth:c.width},restoreAfterFinish:!0,afterSetup:function(a){a.element.makeClipping().setStyle({height:"0px"}).show()},afterFinishInternal:function(a){a.element.undoClipping()}},b||{}))};
Effect.SwitchOff=function(a,b){var a=$(a),c=a.getInlineOpacity();return new Effect.Appear(a,Object.extend({duration:0.4,from:0,transition:Effect.Transitions.flicker,afterFinishInternal:function(a){new Effect.Scale(a.element,1,{duration:0.3,scaleFromCenter:!0,scaleX:!1,scaleContent:!1,restoreAfterFinish:!0,beforeSetup:function(a){a.element.makePositioned().makeClipping()},afterFinishInternal:function(a){a.element.hide().undoClipping().undoPositioned().setStyle({opacity:c})}})}},b||{}))};
Effect.DropOut=function(a,b){var a=$(a),c={top:a.getStyle("top"),left:a.getStyle("left"),opacity:a.getInlineOpacity()};return new Effect.Parallel([new Effect.Move(a,{x:0,y:100,sync:!0}),new Effect.Opacity(a,{sync:!0,to:0})],Object.extend({duration:0.5,beforeSetup:function(a){a.effects[0].element.makePositioned()},afterFinishInternal:function(a){a.effects[0].element.hide().undoPositioned().setStyle(c)}},b||{}))};
Effect.Shake=function(a,b){var a=$(a),c=Object.extend({distance:20,duration:0.5},b||{}),d=parseFloat(c.distance),e=parseFloat(c.duration)/10,f={top:a.getStyle("top"),left:a.getStyle("left")};return new Effect.Move(a,{x:d,y:0,duration:e,afterFinishInternal:function(a){new Effect.Move(a.element,{x:-d*2,y:0,duration:e*2,afterFinishInternal:function(a){new Effect.Move(a.element,{x:d*2,y:0,duration:e*2,afterFinishInternal:function(a){new Effect.Move(a.element,{x:-d*2,y:0,duration:e*2,afterFinishInternal:function(a){new Effect.Move(a.element,
{x:d*2,y:0,duration:e*2,afterFinishInternal:function(a){new Effect.Move(a.element,{x:-d,y:0,duration:e,afterFinishInternal:function(a){a.element.undoPositioned().setStyle(f)}})}})}})}})}})}})};
Effect.SlideDown=function(a,b){var a=$(a).cleanWhitespace(),c=a.down().getStyle("bottom"),d=a.getDimensions();return new Effect.Scale(a,100,Object.extend({scaleContent:!1,scaleX:!1,scaleFrom:window.opera?0:1,scaleMode:{originalHeight:d.height,originalWidth:d.width},restoreAfterFinish:!0,afterSetup:function(a){a.element.makePositioned();a.element.down().makePositioned();window.opera&&a.element.setStyle({top:""});a.element.makeClipping().setStyle({height:"0px"}).show()},afterUpdateInternal:function(a){a.element.down().setStyle({bottom:a.dims[0]-
a.element.clientHeight+"px"})},afterFinishInternal:function(a){a.element.undoClipping().undoPositioned();a.element.down().undoPositioned().setStyle({bottom:c})}},b||{}))};
Effect.SlideUp=function(a,b){var a=$(a).cleanWhitespace(),c=a.down().getStyle("bottom"),d=a.getDimensions();return new Effect.Scale(a,window.opera?0:1,Object.extend({scaleContent:!1,scaleX:!1,scaleMode:"box",scaleFrom:100,scaleMode:{originalHeight:d.height,originalWidth:d.width},restoreAfterFinish:!0,afterSetup:function(a){a.element.makePositioned();a.element.down().makePositioned();window.opera&&a.element.setStyle({top:""});a.element.makeClipping().show()},afterUpdateInternal:function(a){a.element.down().setStyle({bottom:a.dims[0]-
a.element.clientHeight+"px"})},afterFinishInternal:function(a){a.element.hide().undoClipping().undoPositioned();a.element.down().undoPositioned().setStyle({bottom:c})}},b||{}))};Effect.Squish=function(a){return new Effect.Scale(a,window.opera?1:0,{restoreAfterFinish:!0,beforeSetup:function(a){a.element.makeClipping()},afterFinishInternal:function(a){a.element.hide().undoClipping()}})};
Effect.Grow=function(a,b){var a=$(a),c=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.full},b||{}),d={top:a.style.top,left:a.style.left,height:a.style.height,width:a.style.width,opacity:a.getInlineOpacity()},e=a.getDimensions(),f,g,h,l;switch(c.direction){case "top-left":f=g=h=l=0;break;case "top-right":f=e.width;g=l=0;h=-e.width;break;case "bottom-left":f=h=0;g=e.height;l=-e.height;break;
case "bottom-right":f=e.width;g=e.height;h=-e.width;l=-e.height;break;case "center":f=e.width/2,g=e.height/2,h=-e.width/2,l=-e.height/2}return new Effect.Move(a,{x:f,y:g,duration:0.01,beforeSetup:function(a){a.element.hide().makeClipping().makePositioned()},afterFinishInternal:function(a){new Effect.Parallel([new Effect.Opacity(a.element,{sync:!0,to:1,from:0,transition:c.opacityTransition}),new Effect.Move(a.element,{x:h,y:l,sync:!0,transition:c.moveTransition}),new Effect.Scale(a.element,100,{scaleMode:{originalHeight:e.height,
originalWidth:e.width},sync:!0,scaleFrom:window.opera?1:0,transition:c.scaleTransition,restoreAfterFinish:!0})],Object.extend({beforeSetup:function(a){a.effects[0].element.setStyle({height:"0px"}).show()},afterFinishInternal:function(a){a.effects[0].element.undoClipping().undoPositioned().setStyle(d)}},c))}})};
Effect.Shrink=function(a,b){var a=$(a),c=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.none},b||{}),d={top:a.style.top,left:a.style.left,height:a.style.height,width:a.style.width,opacity:a.getInlineOpacity()},e=a.getDimensions(),f,g;switch(c.direction){case "top-left":f=g=0;break;case "top-right":f=e.width;g=0;break;case "bottom-left":f=0;g=e.height;break;case "bottom-right":f=e.width;g=
e.height;break;case "center":f=e.width/2,g=e.height/2}return new Effect.Parallel([new Effect.Opacity(a,{sync:!0,to:0,from:1,transition:c.opacityTransition}),new Effect.Scale(a,window.opera?1:0,{sync:!0,transition:c.scaleTransition,restoreAfterFinish:!0}),new Effect.Move(a,{x:f,y:g,sync:!0,transition:c.moveTransition})],Object.extend({beforeStartInternal:function(a){a.effects[0].element.makePositioned().makeClipping()},afterFinishInternal:function(a){a.effects[0].element.hide().undoClipping().undoPositioned().setStyle(d)}},
c))};Effect.Pulsate=function(a,b){var a=$(a),c=b||{},d=a.getInlineOpacity(),e=c.transition||Effect.Transitions.sinoidal,f=function(a){return e(1-Effect.Transitions.pulse(a,c.pulses))};f.bind(e);return new Effect.Opacity(a,Object.extend(Object.extend({duration:2,from:0,afterFinishInternal:function(a){a.element.setStyle({opacity:d})}},c),{transition:f}))};
Effect.Fold=function(a,b){var a=$(a),c={top:a.style.top,left:a.style.left,width:a.style.width,height:a.style.height};a.makeClipping();return new Effect.Scale(a,5,Object.extend({scaleContent:!1,scaleX:!1,afterFinishInternal:function(){new Effect.Scale(a,1,{scaleContent:!1,scaleY:!1,afterFinishInternal:function(a){a.element.hide().undoClipping().setStyle(c)}})}},b||{}))};
Effect.Morph=Class.create(Effect.Base,{initialize:function(a,b){this.element=$(a);if(!this.element)throw Effect._elementDoesNotExistError;var c=Object.extend({style:{}},b||{});if(Object.isString(c.style))if(c.style.include(":"))this.style=c.style.parseStyle();else{this.element.addClassName(c.style);this.style=$H(this.element.getStyles());this.element.removeClassName(c.style);var d=this.element.getStyles();this.style=this.style.reject(function(a){return a.value==d[a.key]});c.afterFinishInternal=function(a){a.element.addClassName(a.options.style);
a.transforms.each(function(b){a.element.style[b.style]=""})}}else this.style=$H(c.style);this.start(c)},setup:function(){function a(a){if(!a||["rgba(0, 0, 0, 0)","transparent"].include(a))a="#ffffff";a=a.parseColor();return $R(0,2).map(function(c){return parseInt(a.slice(c*2+1,c*2+3),16)})}this.transforms=this.style.map(function(b){var c=b[0],b=b[1],d=null;b.parseColor("#zzzzzz")!="#zzzzzz"?(b=b.parseColor(),d="color"):c=="opacity"?(b=parseFloat(b),Prototype.Browser.IE&&!this.element.currentStyle.hasLayout&&
this.element.setStyle({zoom:1})):Element.CSS_LENGTH.test(b)&&(d=b.match(/^([\+\-]?[0-9\.]+)(.*)$/),b=parseFloat(d[1]),d=d.length==3?d[2]:null);var e=this.element.getStyle(c);return{style:c.camelize(),originalValue:d=="color"?a(e):parseFloat(e||0),targetValue:d=="color"?a(b):b,unit:d}}.bind(this)).reject(function(a){return a.originalValue==a.targetValue||a.unit!="color"&&(isNaN(a.originalValue)||isNaN(a.targetValue))})},update:function(a){for(var b={},c,d=this.transforms.length;d--;)b[(c=this.transforms[d]).style]=
c.unit=="color"?"#"+Math.round(c.originalValue[0]+(c.targetValue[0]-c.originalValue[0])*a).toColorPart()+Math.round(c.originalValue[1]+(c.targetValue[1]-c.originalValue[1])*a).toColorPart()+Math.round(c.originalValue[2]+(c.targetValue[2]-c.originalValue[2])*a).toColorPart():(c.originalValue+(c.targetValue-c.originalValue)*a).toFixed(3)+(c.unit===null?"":c.unit);this.element.setStyle(b,!0)}});
Effect.Transform=Class.create({initialize:function(a,b){this.tracks=[];this.options=b||{};this.addTracks(a)},addTracks:function(a){a.each(function(a){var a=$H(a),c=a.values().first();this.tracks.push($H({ids:a.keys().first(),effect:Effect.Morph,options:{style:c}}))}.bind(this));return this},play:function(){return new Effect.Parallel(this.tracks.map(function(a){var b=a.get("ids"),c=a.get("effect"),d=a.get("options");return[$(b)||$$(b)].flatten().map(function(a){return new c(a,Object.extend({sync:!0},
d))})}).flatten(),this.options)}});Element.CSS_PROPERTIES=$w("backgroundColor backgroundPosition borderBottomColor borderBottomStyle borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderSpacing borderTopColor borderTopStyle borderTopWidth bottom clip color fontSize fontWeight height left letterSpacing lineHeight marginBottom marginLeft marginRight marginTop markerOffset maxHeight maxWidth minHeight minWidth opacity outlineColor outlineOffset outlineWidth paddingBottom paddingLeft paddingRight paddingTop right textIndent top width wordSpacing zIndex");
Element.CSS_LENGTH=/^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/;String.__parseStyleElement=document.createElement("div");
String.prototype.parseStyle=function(){var a,b=$H();Prototype.Browser.WebKit?a=(new Element("div",{style:this})).style:(String.__parseStyleElement.innerHTML='<div style="'+this+'"></div>',a=String.__parseStyleElement.childNodes[0].style);Element.CSS_PROPERTIES.each(function(c){a[c]&&b.set(c,a[c])});Prototype.Browser.IE&&this.include("opacity")&&b.set("opacity",this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1]);return b};
Element.getStyles=document.defaultView&&document.defaultView.getComputedStyle?function(a){var b=document.defaultView.getComputedStyle($(a),null);return Element.CSS_PROPERTIES.inject({},function(a,d){a[d]=b[d];return a})}:function(a){var a=$(a),b=a.currentStyle,c;c=Element.CSS_PROPERTIES.inject({},function(a,c){a.set(c,b[c]);return a});c.opacity||c.set("opacity",a.getOpacity());return c};
Effect.Methods={morph:function(a,b,c){a=$(a);new Effect.Morph(a,Object.extend({style:b},c||{}));return a},visualEffect:function(a,b,c){a=$(a);b=b.dasherize().camelize();b=b.charAt(0).toUpperCase()+b.substring(1);new Effect[b](a,c);return a},highlight:function(a,b){a=$(a);new Effect.Highlight(a,b);return a}};
$w("fade appear grow shrink fold blindUp blindDown slideUp slideDown pulsate shake puff squish switchOff dropOut").each(function(a){Effect.Methods[a]=function(b,c){b=$(b);Effect[a.charAt(0).toUpperCase()+a.substring(1)](b,c);return b}});$w("getInlineOpacity forceRerendering setContentZoom collectTextNodes collectTextNodesIgnoreClass getStyles").each(function(a){Effect.Methods[a]=Element[a]});Element.addMethods(Effect.Methods);
if(Object.isUndefined(Effect))throw"dragdrop.js requires including script.aculo.us' effects.js library";
var Droppables={drops:[],remove:function(a){this.drops=this.drops.reject(function(b){return b.element==$(a)})},add:function(a,b){var a=$(a),c=Object.extend({greedy:!0,hoverclass:null,tree:!1},b||{});if(c.containment){c._containers=[];var d=c.containment;Object.isArray(d)?d.each(function(a){c._containers.push($(a))}):c._containers.push($(d))}if(c.accept)c.accept=[c.accept].flatten();Element.makePositioned(a);c.element=a;this.drops.push(c)},findDeepestChild:function(a){deepest=a[0];for(i=1;i<a.length;++i)Element.isParent(a[i].element,
deepest.element)&&(deepest=a[i]);return deepest},isContained:function(a,b){var c;c=b.tree?a.treeNode:a.parentNode;return b._containers.detect(function(a){return c==a})},isAffected:function(a,b,c){return c.element!=b&&(!c._containers||this.isContained(b,c))&&(!c.accept||Element.classNames(b).detect(function(a){return c.accept.include(a)}))&&Position.within(c.element,a[0],a[1])},deactivate:function(a){a.hoverclass&&Element.removeClassName(a.element,a.hoverclass);this.last_active=null},activate:function(a){a.hoverclass&&
Element.addClassName(a.element,a.hoverclass);this.last_active=a},show:function(a,b){if(this.drops.length){var c,d=[];this.drops.each(function(c){Droppables.isAffected(a,b,c)&&d.push(c)});d.length>0&&(c=Droppables.findDeepestChild(d));this.last_active&&this.last_active!=c&&this.deactivate(this.last_active);if(c){Position.within(c.element,a[0],a[1]);if(c.onHover)c.onHover(b,c.element,Position.overlap(c.overlap,c.element));c!=this.last_active&&Droppables.activate(c)}}},fire:function(a,b){if(this.last_active&&
(Position.prepare(),this.isAffected([Event.pointerX(a),Event.pointerY(a)],b,this.last_active)&&this.last_active.onDrop))return this.last_active.onDrop(b,this.last_active.element,a),!0},reset:function(){this.last_active&&this.deactivate(this.last_active)}},Draggables={drags:[],observers:[],register:function(a){if(this.drags.length==0)this.eventMouseUp=this.endDrag.bindAsEventListener(this),this.eventMouseMove=this.updateDrag.bindAsEventListener(this),this.eventKeypress=this.keyPress.bindAsEventListener(this),
Event.observe(document,"mouseup",this.eventMouseUp),Event.observe(document,"mousemove",this.eventMouseMove),Event.observe(document,"keypress",this.eventKeypress);this.drags.push(a)},unregister:function(a){this.drags=this.drags.reject(function(b){return b==a});this.drags.length==0&&(Event.stopObserving(document,"mouseup",this.eventMouseUp),Event.stopObserving(document,"mousemove",this.eventMouseMove),Event.stopObserving(document,"keypress",this.eventKeypress))},activate:function(a){a.options.delay?
this._timeout=setTimeout(function(){Draggables._timeout=null;window.focus();Draggables.activeDraggable=a}.bind(this),a.options.delay):(window.focus(),this.activeDraggable=a)},deactivate:function(){this.activeDraggable=null},updateDrag:function(a){if(this.activeDraggable){var b=[Event.pointerX(a),Event.pointerY(a)];if(!(this._lastPointer&&this._lastPointer.inspect()==b.inspect()))this._lastPointer=b,this.activeDraggable.updateDrag(a,b)}},endDrag:function(a){if(this._timeout)clearTimeout(this._timeout),
this._timeout=null;if(this.activeDraggable)this._lastPointer=null,this.activeDraggable.endDrag(a),this.activeDraggable=null},keyPress:function(a){this.activeDraggable&&this.activeDraggable.keyPress(a)},addObserver:function(a){this.observers.push(a);this._cacheObserverCallbacks()},removeObserver:function(a){this.observers=this.observers.reject(function(b){return b.element==a});this._cacheObserverCallbacks()},notify:function(a,b,c){this[a+"Count"]>0&&this.observers.each(function(d){if(d[a])d[a](a,b,
c)});if(b.options[a])b.options[a](b,c)},_cacheObserverCallbacks:function(){["onStart","onEnd","onDrag"].each(function(a){Draggables[a+"Count"]=Draggables.observers.select(function(b){return b[a]}).length})}},Draggable=Class.create({initialize:function(a,b){var c={handle:!1,reverteffect:function(a,b,c){new Effect.Move(a,{x:-c,y:-b,duration:Math.sqrt(Math.abs(b^2)+Math.abs(c^2))*0.02,queue:{scope:"_draggable",position:"end"}})},endeffect:function(a){var b=Object.isNumber(a._opacity)?a._opacity:1;new Effect.Opacity(a,
{duration:0.2,from:0.7,to:b,queue:{scope:"_draggable",position:"end"},afterFinish:function(){Draggable._dragging[a]=!1}})},zindex:1E3,revert:!1,quiet:!1,scroll:!1,scrollSensitivity:20,scrollSpeed:15,snap:!1,delay:0};(!b||Object.isUndefined(b.endeffect))&&Object.extend(c,{starteffect:function(a){a._opacity=Element.getOpacity(a);Draggable._dragging[a]=!0;new Effect.Opacity(a,{duration:0.2,from:a._opacity,to:0.7})}});c=Object.extend(c,b||{});this.element=$(a);if(c.handle&&Object.isString(c.handle))this.handle=
this.element.down("."+c.handle,0);if(!this.handle)this.handle=$(c.handle);if(!this.handle)this.handle=this.element;if(c.scroll&&!c.scroll.scrollTo&&!c.scroll.outerHTML)c.scroll=$(c.scroll),this._isScrollChild=Element.childOf(this.element,c.scroll);Element.makePositioned(this.element);this.options=c;this.dragging=!1;this.eventMouseDown=this.initDrag.bindAsEventListener(this);Event.observe(this.handle,"mousedown",this.eventMouseDown);Draggables.register(this)},destroy:function(){Event.stopObserving(this.handle,
"mousedown",this.eventMouseDown);Draggables.unregister(this)},currentDelta:function(){return[parseInt(Element.getStyle(this.element,"left")||"0"),parseInt(Element.getStyle(this.element,"top")||"0")]},initDrag:function(a){if(Object.isUndefined(Draggable._dragging[this.element])||!Draggable._dragging[this.element])if(Event.isLeftClick(a)&&(!(tag_name=Event.element(a).tagName.toUpperCase())||!(tag_name=="INPUT"||tag_name=="SELECT"||tag_name=="OPTION"||tag_name=="BUTTON"||tag_name=="TEXTAREA"))){var b=
[Event.pointerX(a),Event.pointerY(a)],c=Position.cumulativeOffset(this.element);this.offset=[0,1].map(function(a){return b[a]-c[a]});Draggables.activate(this);Event.stop(a)}},startDrag:function(a){this.dragging=!0;if(!this.delta)this.delta=this.currentDelta();if(this.options.zindex)this.originalZ=parseInt(Element.getStyle(this.element,"z-index")||0),this.element.style.zIndex=this.options.zindex;if(this.options.ghosting)this._clone=this.element.cloneNode(!0),this.element._originallyAbsolute=this.element.getStyle("position")==
"absolute",this.element._originallyAbsolute||Position.absolutize(this.element),this.element.parentNode.insertBefore(this._clone,this.element);if(this.options.scroll)if(this.options.scroll==window){var b=this._getWindowScroll(this.options.scroll);this.originalScrollLeft=b.left;this.originalScrollTop=b.top}else this.originalScrollLeft=this.options.scroll.scrollLeft,this.originalScrollTop=this.options.scroll.scrollTop;Draggables.notify("onStart",this,a);this.options.starteffect&&this.options.starteffect(this.element)},
updateDrag:function(a,b){this.dragging||this.startDrag(a);this.options.quiet||(Position.prepare(),Droppables.show(b,this.element));Draggables.notify("onDrag",this,a);this.draw(b);this.options.change&&this.options.change(this);if(this.options.scroll){this.stopScrolling();var c;if(this.options.scroll==window)with(this._getWindowScroll(this.options.scroll))c=[left,top,left+width,top+height];else c=Position.page(this.options.scroll),c[0]+=this.options.scroll.scrollLeft+Position.deltaX,c[1]+=this.options.scroll.scrollTop+
Position.deltaY,c.push(c[0]+this.options.scroll.offsetWidth),c.push(c[1]+this.options.scroll.offsetHeight);var d=[0,0];b[0]<c[0]+this.options.scrollSensitivity&&(d[0]=b[0]-(c[0]+this.options.scrollSensitivity));b[1]<c[1]+this.options.scrollSensitivity&&(d[1]=b[1]-(c[1]+this.options.scrollSensitivity));b[0]>c[2]-this.options.scrollSensitivity&&(d[0]=b[0]-(c[2]-this.options.scrollSensitivity));b[1]>c[3]-this.options.scrollSensitivity&&(d[1]=b[1]-(c[3]-this.options.scrollSensitivity));this.startScrolling(d)}Prototype.Browser.WebKit&&
window.scrollBy(0,0);Event.stop(a)},finishDrag:function(a,b){this.dragging=!1;if(this.options.quiet){Position.prepare();var c=[Event.pointerX(a),Event.pointerY(a)];Droppables.show(c,this.element)}if(this.options.ghosting)this.element._originallyAbsolute||Position.relativize(this.element),delete this.element._originallyAbsolute,Element.remove(this._clone),this._clone=null;c=!1;b&&((c=Droppables.fire(a,this.element))||(c=!1));if(c&&this.options.onDropped)this.options.onDropped(this.element);Draggables.notify("onEnd",
this,a);var d=this.options.revert;d&&Object.isFunction(d)&&(d=d(this.element));var e=this.currentDelta();d&&this.options.reverteffect?(c==0||d!="failure")&&this.options.reverteffect(this.element,e[1]-this.delta[1],e[0]-this.delta[0]):this.delta=e;if(this.options.zindex)this.element.style.zIndex=this.originalZ;this.options.endeffect&&this.options.endeffect(this.element);Draggables.deactivate(this);Droppables.reset()},keyPress:function(a){a.keyCode==Event.KEY_ESC&&(this.finishDrag(a,!1),Event.stop(a))},
endDrag:function(a){this.dragging&&(this.stopScrolling(),this.finishDrag(a,!0),Event.stop(a))},draw:function(a){var b=Position.cumulativeOffset(this.element);if(this.options.ghosting){var c=Position.realOffset(this.element);b[0]+=c[0]-Position.deltaX;b[1]+=c[1]-Position.deltaY}c=this.currentDelta();b[0]-=c[0];b[1]-=c[1];this.options.scroll&&this.options.scroll!=window&&this._isScrollChild&&(b[0]-=this.options.scroll.scrollLeft-this.originalScrollLeft,b[1]-=this.options.scroll.scrollTop-this.originalScrollTop);
c=[0,1].map(function(c){return a[c]-b[c]-this.offset[c]}.bind(this));this.options.snap&&(c=Object.isFunction(this.options.snap)?this.options.snap(c[0],c[1],this):Object.isArray(this.options.snap)?c.map(function(a,b){return(a/this.options.snap[b]).round()*this.options.snap[b]}.bind(this)):c.map(function(a){return(a/this.options.snap).round()*this.options.snap}.bind(this)));var d=this.element.style;if(!this.options.constraint||this.options.constraint=="horizontal")d.left=c[0]+"px";if(!this.options.constraint||
this.options.constraint=="vertical")d.top=c[1]+"px";if(d.visibility=="hidden")d.visibility=""},stopScrolling:function(){if(this.scrollInterval)clearInterval(this.scrollInterval),this.scrollInterval=null,Draggables._lastScrollPointer=null},startScrolling:function(a){if(a[0]||a[1])this.scrollSpeed=[a[0]*this.options.scrollSpeed,a[1]*this.options.scrollSpeed],this.lastScrolled=new Date,this.scrollInterval=setInterval(this.scroll.bind(this),10)},scroll:function(){var a=new Date,b=a-this.lastScrolled;
this.lastScrolled=a;if(this.options.scroll==window)with(this._getWindowScroll(this.options.scroll)){if(this.scrollSpeed[0]||this.scrollSpeed[1])a=b/1E3,this.options.scroll.scrollTo(left+a*this.scrollSpeed[0],top+a*this.scrollSpeed[1])}else this.options.scroll.scrollLeft+=this.scrollSpeed[0]*b/1E3,this.options.scroll.scrollTop+=this.scrollSpeed[1]*b/1E3;Position.prepare();Droppables.show(Draggables._lastPointer,this.element);Draggables.notify("onDrag",this);if(this._isScrollChild)Draggables._lastScrollPointer=
Draggables._lastScrollPointer||$A(Draggables._lastPointer),Draggables._lastScrollPointer[0]+=this.scrollSpeed[0]*b/1E3,Draggables._lastScrollPointer[1]+=this.scrollSpeed[1]*b/1E3,Draggables._lastScrollPointer[0]<0&&(Draggables._lastScrollPointer[0]=0),Draggables._lastScrollPointer[1]<0&&(Draggables._lastScrollPointer[1]=0),this.draw(Draggables._lastScrollPointer);this.options.change&&this.options.change(this)},_getWindowScroll:function(a){var b,c,d;with(a.document){if(a.document.documentElement&&
documentElement.scrollTop)b=documentElement.scrollTop,c=documentElement.scrollLeft;else if(a.document.body)b=body.scrollTop,c=body.scrollLeft;a.innerWidth?(d=a.innerWidth,a=a.innerHeight):a.document.documentElement&&documentElement.clientWidth?(d=documentElement.clientWidth,a=documentElement.clientHeight):(d=body.offsetWidth,a=body.offsetHeight)}return{top:b,left:c,width:d,height:a}}});Draggable._dragging={};
var SortableObserver=Class.create({initialize:function(a,b){this.element=$(a);this.observer=b;this.lastValue=Sortable.serialize(this.element)},onStart:function(){this.lastValue=Sortable.serialize(this.element)},onEnd:function(){Sortable.unmark();this.lastValue!=Sortable.serialize(this.element)&&this.observer(this.element)}}),Sortable={SERIALIZE_RULE:/^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/,sortables:{},_findRootElement:function(a){for(;a.tagName.toUpperCase()!="BODY";){if(a.id&&Sortable.sortables[a.id])return a;
a=a.parentNode}},options:function(a){a=Sortable._findRootElement($(a));return!a?void 0:Sortable.sortables[a.id]},destroy:function(a){if(a=Sortable.options(a))Draggables.removeObserver(a.element),a.droppables.each(function(a){Droppables.remove(a)}),a.draggables.invoke("destroy"),delete Sortable.sortables[a.element.id]},create:function(a,b){var a=$(a),c=Object.extend({element:a,tag:"li",dropOnEmpty:!1,tree:!1,treeTag:"ul",overlap:"vertical",constraint:"vertical",containment:a,handle:!1,only:!1,delay:0,
hoverclass:null,ghosting:!1,quiet:!1,scroll:!1,scrollSensitivity:20,scrollSpeed:15,format:this.SERIALIZE_RULE,elements:!1,handles:!1,onChange:Prototype.emptyFunction,onUpdate:Prototype.emptyFunction},b||{});this.destroy(a);var d={revert:!0,quiet:c.quiet,scroll:c.scroll,scrollSpeed:c.scrollSpeed,scrollSensitivity:c.scrollSensitivity,delay:c.delay,ghosting:c.ghosting,constraint:c.constraint,handle:c.handle};if(c.starteffect)d.starteffect=c.starteffect;if(c.reverteffect)d.reverteffect=c.reverteffect;
else if(c.ghosting)d.reverteffect=function(a){a.style.top=0;a.style.left=0};if(c.endeffect)d.endeffect=c.endeffect;if(c.zindex)d.zindex=c.zindex;var e={overlap:c.overlap,containment:c.containment,tree:c.tree,hoverclass:c.hoverclass,onHover:Sortable.onHover},f={onHover:Sortable.onEmptyHover,overlap:c.overlap,containment:c.containment,hoverclass:c.hoverclass};Element.cleanWhitespace(a);c.draggables=[];c.droppables=[];if(c.dropOnEmpty||c.tree)Droppables.add(a,f),c.droppables.push(a);(c.elements||this.findElements(a,
c)||[]).each(function(b,f){var l=c.handles?$(c.handles[f]):c.handle?$(b).select("."+c.handle)[0]:b;c.draggables.push(new Draggable(b,Object.extend(d,{handle:l})));Droppables.add(b,e);if(c.tree)b.treeNode=a;c.droppables.push(b)});c.tree&&(Sortable.findTreeElements(a,c)||[]).each(function(b){Droppables.add(b,f);b.treeNode=a;c.droppables.push(b)});this.sortables[a.id]=c;Draggables.addObserver(new SortableObserver(a,c.onUpdate))},findElements:function(a,b){return Element.findChildren(a,b.only,b.tree?
!0:!1,b.tag)},findTreeElements:function(a,b){return Element.findChildren(a,b.only,b.tree?!0:!1,b.treeTag)},onHover:function(a,b,c){if(!Element.isParent(b,a)&&!(c>0.33&&c<0.66&&Sortable.options(b).tree))if(c>0.5){if(Sortable.mark(b,"before"),b.previousSibling!=a){c=a.parentNode;a.style.visibility="hidden";b.parentNode.insertBefore(a,b);if(b.parentNode!=c)Sortable.options(c).onChange(a);Sortable.options(b.parentNode).onChange(a)}}else{Sortable.mark(b,"after");var d=b.nextSibling||null;if(d!=a){c=a.parentNode;
a.style.visibility="hidden";b.parentNode.insertBefore(a,d);if(b.parentNode!=c)Sortable.options(c).onChange(a);Sortable.options(b.parentNode).onChange(a)}}},onEmptyHover:function(a,b,c){var d=a.parentNode,e=Sortable.options(b);if(!Element.isParent(b,a)){var f=Sortable.findElements(b,{tag:e.tag,only:e.only}),g=null;if(f)for(var h=Element.offsetSize(b,e.overlap)*(1-c),c=0;c<f.length;c+=1)if(h-Element.offsetSize(f[c],e.overlap)>=0)h-=Element.offsetSize(f[c],e.overlap);else{g=h-Element.offsetSize(f[c],
e.overlap)/2>=0?c+1<f.length?f[c+1]:null:f[c];break}b.insertBefore(a,g);Sortable.options(d).onChange(a);e.onChange(a)}},unmark:function(){Sortable._marker&&Sortable._marker.hide()},mark:function(a,b){var c=Sortable.options(a.parentNode);if(!c||c.ghosting){if(!Sortable._marker)Sortable._marker=($("dropmarker")||Element.extend(document.createElement("DIV"))).hide().addClassName("dropmarker").setStyle({position:"absolute"}),document.getElementsByTagName("body").item(0).appendChild(Sortable._marker);
var d=Position.cumulativeOffset(a);Sortable._marker.setStyle({left:d[0]+"px",top:d[1]+"px"});b=="after"&&(c.overlap=="horizontal"?Sortable._marker.setStyle({left:d[0]+a.clientWidth+"px"}):Sortable._marker.setStyle({top:d[1]+a.clientHeight+"px"}));Sortable._marker.show()}},_tree:function(a,b,c){for(var d=Sortable.findElements(a,b)||[],e=0;e<d.length;++e){var f=d[e].id.match(b.format);f&&(f={id:encodeURIComponent(f?f[1]:null),element:a,parent:c,children:[],position:c.children.length,container:$(d[e]).down(b.treeTag)},
f.container&&this._tree(f.container,b,f),c.children.push(f))}return c},tree:function(a,b){var a=$(a),c=this.options(a),c=Object.extend({tag:c.tag,treeTag:c.treeTag,only:c.only,name:a.id,format:c.format},b||{});return Sortable._tree(a,c,{id:null,parent:null,children:[],container:a,position:0})},_constructIndex:function(a){var b="";do a.id&&(b="["+a.position+"]"+b);while((a=a.parent)!=null);return b},sequence:function(a,b){var a=$(a),c=Object.extend(this.options(a),b||{});return $(this.findElements(a,
c)||[]).map(function(a){return a.id.match(c.format)?a.id.match(c.format)[1]:""})},setSequence:function(a,b,c){var a=$(a),d=Object.extend(this.options(a),c||{}),e={};this.findElements(a,d).each(function(a){a.id.match(d.format)&&(e[a.id.match(d.format)[1]]=[a,a.parentNode]);a.parentNode.removeChild(a)});b.each(function(a){var b=e[a];b&&(b[1].appendChild(b[0]),delete e[a])})},serialize:function(a,b){var a=$(a),c=Object.extend(Sortable.options(a),b||{}),d=encodeURIComponent(b&&b.name?b.name:a.id);return c.tree?
Sortable.tree(a,b).children.map(function(a){return[d+Sortable._constructIndex(a)+"[id]="+encodeURIComponent(a.id)].concat(a.children.map(arguments.callee))}).flatten().join("&"):Sortable.sequence(a,b).map(function(a){return d+"[]="+encodeURIComponent(a)}).join("&")}};Element.isParent=function(a,b){return!a.parentNode||a==b?!1:a.parentNode==b?!0:Element.isParent(a.parentNode,b)};
Element.findChildren=function(a,b,c,d){if(!a.hasChildNodes())return null;d=d.toUpperCase();b&&(b=[b].flatten());var e=[];$A(a.childNodes).each(function(a){a.tagName&&a.tagName.toUpperCase()==d&&(!b||Element.classNames(a).detect(function(a){return b.include(a)}))&&e.push(a);c&&(a=Element.findChildren(a,b,c,d))&&e.push(a)});return e.length>0?e.flatten():[]};Element.offsetSize=function(a,b){return a["offset"+(b=="vertical"||b=="height"?"Height":"Width")]};
var Builder={NODEMAP:{AREA:"map",CAPTION:"table",COL:"table",COLGROUP:"table",LEGEND:"fieldset",OPTGROUP:"select",OPTION:"select",PARAM:"object",TBODY:"table",TD:"table",TFOOT:"table",TH:"table",THEAD:"table",TR:"table"},node:function(a,b,c){var a=a.toUpperCase(),d=document.createElement(this.NODEMAP[a]||"div");try{d.innerHTML="<"+a+"></"+a+">"}catch(e){}var f=d.firstChild||null;f&&f.tagName.toUpperCase()!=a&&(f=f.getElementsByTagName(a)[0]);f||(f=document.createElement(a));if(f){if(b)if(this._isStringOrNumber(b)||
b instanceof Array||b.tagName)this._children(f,b);else{var g=this._attributes(b);if(g.length){try{d.innerHTML="<"+a+" "+g+"></"+a+">"}catch(h){}f=d.firstChild||null;if(!f)for(attr in f=document.createElement(a),b)f[attr=="class"?"className":attr]=b[attr];f.tagName.toUpperCase()!=a&&(f=d.getElementsByTagName(a)[0])}}c&&this._children(f,c);return f}},_text:function(a){return document.createTextNode(a)},ATTR_MAP:{className:"class",htmlFor:"for"},_attributes:function(a){var b=[];for(attribute in a)b.push((attribute in
this.ATTR_MAP?this.ATTR_MAP[attribute]:attribute)+'="'+a[attribute].toString().escapeHTML().gsub(/"/,"&quot;")+'"');return b.join(" ")},_children:function(a,b){b.tagName?a.appendChild(b):typeof b=="object"?b.flatten().each(function(b){typeof b=="object"?a.appendChild(b):Builder._isStringOrNumber(b)&&a.appendChild(Builder._text(b))}):Builder._isStringOrNumber(b)&&a.appendChild(Builder._text(b))},_isStringOrNumber:function(a){return typeof a=="string"||typeof a=="number"},build:function(a){var b=this.node("div");
$(b).update(a.strip());return b.down()},dump:function(a){typeof a!="object"&&typeof a!="function"&&(a=window);"A ABBR ACRONYM ADDRESS APPLET AREA B BASE BASEFONT BDO BIG BLOCKQUOTE BODY BR BUTTON CAPTION CENTER CITE CODE COL COLGROUP DD DEL DFN DIR DIV DL DT EM FIELDSET FONT FORM FRAME FRAMESET H1 H2 H3 H4 H5 H6 HEAD HR HTML I IFRAME IMG INPUT INS ISINDEX KBD LABEL LEGEND LI LINK MAP MENU META NOFRAMES NOSCRIPT OBJECT OL OPTGROUP OPTION P PARAM PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG STYLE SUB SUP TABLE TBODY TD TEXTAREA TFOOT TH THEAD TITLE TR TT U UL VAR".split(/\s+/).each(function(b){a[b]=
function(){return Builder.node.apply(Builder,[b].concat($A(arguments)))}})}},FCKeditor=function(a,b,c,d,e){this.InstanceName=a;this.Width=b||"100%";this.Height=c||"200";this.ToolbarSet=d||"Default";this.Value=e||"";this.BasePath=FCKeditor.BasePath;this.DisplayErrors=this.CheckBrowser=!0;this.Config={};this.OnError=null};FCKeditor.BasePath="/fckeditor/";FCKeditor.MinHeight=200;FCKeditor.MinWidth=750;FCKeditor.prototype.Version="2.6.5";FCKeditor.prototype.VersionBuild="23959";
FCKeditor.prototype.Create=function(){document.write(this.CreateHtml())};
FCKeditor.prototype.CreateHtml=function(){if(!this.InstanceName||this.InstanceName.length==0)return this._ThrowError(701,"You must specify an instance name."),"";var a="";if(!this.CheckBrowser||this._IsCompatibleBrowser())a+='<input type="hidden" id="'+this.InstanceName+'" name="'+this.InstanceName+'" value="'+this._HTMLEncode(this.Value)+'" style="display:none" />',a+=this._GetConfigHtml(),a+=this._GetIFrameHtml();else{var b=this.Width.toString().indexOf("%")>0?this.Width:this.Width+"px",c=this.Height.toString().indexOf("%")>
0?this.Height:this.Height+"px";a+='<textarea name="'+this.InstanceName+'" rows="4" cols="40" style="width:'+b+";height:"+c;this.TabIndex&&(a+='" tabindex="'+this.TabIndex);a+='">'+this._HTMLEncode(this.Value)+"</textarea>"}return a};
FCKeditor.prototype.ReplaceTextarea=function(){if(!document.getElementById(this.InstanceName+"___Frame")&&(!this.CheckBrowser||this._IsCompatibleBrowser())){for(var a=document.getElementById(this.InstanceName),b=document.getElementsByName(this.InstanceName),c=0;a||c==0;){if(a&&a.tagName.toLowerCase()=="textarea")break;a=b[c++]}if(a){a.style.display="none";if(a.tabIndex)this.TabIndex=a.tabIndex;this._InsertHtmlBefore(this._GetConfigHtml(),a);this._InsertHtmlBefore(this._GetIFrameHtml(),a)}else alert('Error: The TEXTAREA with id or name set to "'+
this.InstanceName+'" was not found')}};FCKeditor.prototype._InsertHtmlBefore=function(a,b){if(b.insertAdjacentHTML)b.insertAdjacentHTML("beforeBegin",a);else{var c=document.createRange();c.setStartBefore(b);c=c.createContextualFragment(a);b.parentNode.insertBefore(c,b)}};
FCKeditor.prototype._GetConfigHtml=function(){var a="",b;for(b in this.Config)a.length>0&&(a+="&amp;"),a+=encodeURIComponent(b)+"="+encodeURIComponent(this.Config[b]);return'<input type="hidden" id="'+this.InstanceName+'___Config" value="'+a+'" style="display:none" />'};
FCKeditor.prototype._GetIFrameHtml=function(){var a="fckeditor.html";try{/fcksource=true/i.test(window.top.location.search)&&(a="fckeditor.original.html")}catch(b){}a=this.BasePath+"editor/"+a+"?InstanceName="+encodeURIComponent(this.InstanceName);this.ToolbarSet&&(a+="&amp;Toolbar="+this.ToolbarSet);this.UserRole&&(a+="&amp;UserRole="+this.UserRole);a='<iframe id="'+this.InstanceName+'___Frame" src="'+a+'" width="'+this.Width+'" height="'+this.Height;this.TabIndex&&(a+='" tabindex="'+this.TabIndex);
a+='" frameborder="0" scrolling="no"></iframe>';return a};FCKeditor.prototype._IsCompatibleBrowser=function(){return FCKeditor_IsCompatibleBrowser()};FCKeditor.prototype._ThrowError=function(a,b){this.ErrorNumber=a;this.ErrorDescription=b;this.DisplayErrors&&(document.write('<div style="COLOR: #ff0000">'),document.write("[ FCKeditor Error "+this.ErrorNumber+": "+this.ErrorDescription+" ]"),document.write("</div>"));typeof this.OnError=="function"&&this.OnError(this,a,b)};
FCKeditor.prototype._HTMLEncode=function(a){typeof a!="string"&&(a=a.toString());return a=a.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")};
(function(){var a=function(a){var c=new FCKeditor(a.name);c.Width=Math.max(a.offsetWidth,FCKeditor.MinWidth);c.Height=Math.max(a.offsetHeight,FCKeditor.MinHeight);return c};FCKeditor.ReplaceAllTextareas=function(){for(var b=document.getElementsByTagName("textarea"),c=0;c<b.length;c++){var d=null,e=b[c],f=e.name;if(f&&f.length!=0){if(typeof arguments[0]=="string"){if(!RegExp("(?:^| )"+arguments[0]+"(?:$| )").test(e.className))continue}else if(typeof arguments[0]=="function"&&(d=a(e),arguments[0](e,
d)===!1))continue;d||(d=a(e));d.ReplaceTextarea()}}}})();function FCKeditor_IsCompatibleBrowser(){var a=navigator.userAgent.toLowerCase();return navigator.product=="Gecko"&&navigator.productSub>=20030210&&!(typeof opera=="object"&&opera.postError)?!0:window.opera&&window.opera.version&&parseFloat(window.opera.version())>=9.5?!0:a.indexOf(" adobeair/")!=-1?a.match(/ adobeair\/(\d+)/)[1]>=1:a.indexOf(" applewebkit/")!=-1?a.match(/ applewebkit\/(\d+)/)[1]>=522:!1}
String.prototype.trim=function(){return this.replace(/^\s+|\s+$/,"")};Array.prototype.contain=function(a){if(a==void 0)return!1;for(var b=0;b<this.length;b++)if(this[b]==a)return!0;return!1};Number.prototype.toAmount=function(){var a=this.toString().split("."),b=a[1];if(b)if(b.length>2)b=b.substr(0,2);else{if(b.length<2)for(;b.length<2;)b+="0"}else b="00";return a[0]+","+b};
var mySelectMethods={addOption:function(a,b,c,d){var a=$(a),e=document.createElement("option");e.appendChild(document.createTextNode(b));e.setAttribute("value",c);if(d)e.selected=!0;a.appendChild(e);return a}};Element.addMethods("select",mySelectMethods);
var BC={CreateEditor:function(a,b,c){var d=new FCKeditor("text",null,"600");d.BasePath="/fnew/js/editor/";d.ToolbarSet=a;d.UserRole=b;d.Value=c;d.Create()},OnloadFuncs:[],Onload:function(){for(i=0;i<BC.OnloadFuncs.length;i++)eval(BC.OnloadFuncs[i])},Var:{ArticlePage:!1,ToolPage:!1,UserPage:!1,TopicLink:!1,BackUrl:!1,Captcha:!1,BlogList:!1,CaptchaRand:!1},ExecuteFuncs:[],Execute:function(a){try{BC.ExecuteFuncs[a]||(BC.ExecuteFuncs[a]=0),BC.ExecuteFuncs[a]++,eval(a)}catch(b){BC.ExecuteFuncs[a]<30&&
setTimeout(a,100)}},Hash:{Last:"#",Functions:[],Check:function(){var a=window.location.hash;a==""&&(a="#");if(a!=BC.Hash.Last)for(var b=0;b<BC.Hash.Functions.length;b++)try{eval(BC.Hash.Functions[b])}catch(c){}BC.Hash.Last=a;setTimeout("BC.Hash.Check()",250)}}};BC.Hash.Check();
BC.Lang={Common:{TextDays0:"",TextDays1:"\u0434\u0435\u043d\u044c",TextDays2:"\u0434\u043d\u0435\u0439",TextDays3:"\u0434\u043d\u044f",flash:"Flash Player \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0445\u043e\u0442\u0438\u0442\u0435 \u043b\u0438 \u0432\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0435\u0433\u043e?",CurrencyTxt:{usd:{before:"$",after:""},eur:{before:"",after:"&euro;"},uah:{before:"",after:"&nbsp;\u0433\u0440\u043d"},rub:{before:"",
after:"&nbsp;\u0440\u0443\u0431"}}},Tpl:{header:'<div class="window window-#WTYPE#" id="Window#WKEY#" style="display: none; #WWIDTH#"><div class="top"><div class="inner"><div class="clt"></div><div class="crt"></div><div class="inner2"><div class="bt"></div><div class="content"><p id="WindowTitle#WKEY#">                #WTITLE#</p></div></div></div></div><div class="center"><div class="inner"><div class="bl"></div><div class="br"></div><div class="inner2"> <div class="content">',footer:'</div></div></div></div><div class="bottom"><div class="inner"><div class="clb"></div><div class="crb"></div><div  class="inner2"><div class="content"><img src="#STATIC_HOST_NEW#/i/z.gif" width="10px" height="31px" alt=""/></div><div class="bb"></div></div></div></div></div>'},
Tpl_titles:{ServerLock:"\u0421\u0435\u0440\u0432\u0435\u0440 \u0437\u0430\u043a\u0440\u044b\u0442",DeclineNonCashPay:"\u041e\u0442\u0437\u044b\u0432 \u0437\u0430\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f",Auth:"\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f",Register:"\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f",Forgot:"\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u043e\u043b\u044f",UserPersonal:"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u044f",
UserSecurity:"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u0430",UserStatus:"\u0421\u0442\u0430\u0442\u0443\u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f",UserBlog:"\u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f",UserRole:"\u0420\u043e\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f",
UserAvatar:"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0430\u0432\u0430\u0442\u0430\u0440\u044b",AddToBalanceWebmoney:"\u041f\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0430",PayForAccount:"\u0420\u0435\u043a\u0432\u0435\u0437\u0438\u0442\u044b \u0434\u043b\u044f \u043e\u043f\u043b\u0430\u0442\u044b",UserContextAdvPageListAdd:"\u0421\u043f\u0438\u0441\u043e\u043a \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0449\u0438\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435",
AuctionGet:"\u0412\u0437\u044f\u0442\u044c \u0442\u0435\u043c\u0443 \u0432 \u0430\u0443\u043a\u0446\u0438\u043e\u043d\u0435",AuctionRefuse:"\u041e\u0442\u043a\u0430\u0437 \u043e\u0442 \u0442\u0435\u043c\u044b",AuctionReturn:"\u0412\u043e\u0437\u0432\u0440\u0430\u0442 \u0442\u0435\u043c\u044b",Feedback:"\u041e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u0432\u044f\u0437\u044c",DelFile:"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0444\u0430\u0439\u043b",TopicPreview:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0441\u0442\u0430\u0442\u044c\u0438",
TopicAttach:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0441\u0442\u0430\u0442\u044c\u0438",CommentAttach:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0432\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f",TopicStatus:"",UserAward:"\u041f\u0440\u0435\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0430",
TopicHistory:"\u0418\u0441\u0442\u043e\u0440\u0438\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f",TopicTitle:"\u041d\u043e\u0432\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441",QuestionTimePay:"\u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u0430 \u0412\u043e\u043f\u0440\u043e\u0441-\u041e\u0442\u0432\u0435\u0442",QuestionTimePaySimple:"\u041f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u043d\u0430 \u0440\u0430\u0437\u0434\u0435\u043b \u0412\u043e\u043f\u0440\u043e\u0441-\u041e\u0442\u0432\u0435\u0442",
QuestionTimePayHelp:"\u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u0430 \u0412\u043e\u043f\u0440\u043e\u0441-\u041e\u0442\u0432\u0435\u0442",Blog:"\u0411\u043b\u043e\u0433",BlogBoss:"\u0411\u043b\u043e\u0433",BlogStatus:"\u0411\u043b\u043e\u0433",ContextStatus:"",Titles:"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430",PromoCompany:"\u0420\u0435\u043a\u043b\u0430\u043c\u043d\u0430\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f",
ChangeCadvPrise:"\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0446\u0435\u043d\u044b",AddNonCashPay:"\u041f\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0430",DonateWebmoney:"\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u0447\u0435\u0440\u0435\u0437 WebMoney",DonateLiqpay:"\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u0447\u0435\u0440\u0435\u0437 Liqpay",DonateMoneybookers:"\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u0447\u0435\u0440\u0435\u0437 moneybookers",
DonateRobokassa:"\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u0447\u0435\u0440\u0435\u0437 Robokassa",CityModer:"\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0433\u043e\u0440\u043e\u0434\u043e\u0432",FullImage:"\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f",ImageGallery:"\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439",
Termin:"\u0422\u0435\u0440\u043c\u0438\u043d",HelpAddIe:"\u041f\u043e\u043c\u043e\u0449\u044c",Message:"\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e!",Error:"\u041e\u0448\u0438\u0431\u043a\u0430",Search:"\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a",PaymentHistory:"\u0418\u0441\u0442\u043e\u0440\u0438\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0435\u0439",NoFlash:"Flash Player",QuestionTime:"\u0414\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442 \u043b\u0438\u043c\u0438\u0442 \u043d\u0435 \u043e\u0442\u0432\u0435\u0447\u0435\u043d\u043d\u044b\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432",
QuestionPay:"\u0421\u043f\u043e\u0441\u043e\u0431\u044b \u043e\u043f\u043b\u0430\u0442\u044b",DonateFeedback:"\u0421\u043e\u043e\u0431\u0449\u0438\u0442\u0435 \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043f\u0440\u0438\u0447\u0438\u043d\u0443 \u043e\u0442\u043a\u0430\u0437\u0430",YaSearch:"\u041f\u043e\u0438\u0441\u043a"},Blog:{StatusWinTitle_activate:"\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0430",
StatusWinText_activate:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0440\u0430\u0437\u0434\u0435\u043b &laquo;#SECTION_TITLE#&raquo;?",StatusWinTitle_deactivate:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0430",StatusWinText_deactivate:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0440\u0430\u0437\u0434\u0435\u043b &laquo;#SECTION_TITLE#&raquo;?",
StatusWinTitle_lock:"\u0411\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u0430",StatusWinText_lock:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u0434\u0435\u043b &laquo;#SECTION_TITLE#&raquo;?",StatusWinTitle_unlock:"\u0420\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u0430",
StatusWinText_unlock:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u0434\u0435\u043b &laquo;#SECTION_TITLE#&raquo;?",BossWinCaptionDefault_login:"\u043b\u043e\u0433\u0438\u043d",BossWinTitleModer:"\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u0430",
BossWinTitleSpec:"\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u0430",FormWinCaptionDefault_name:"\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435",FormWinCaptionDefault_address:"\u0430\u0434\u0440\u0435\u0441",FormWinCaptionDefault_tags:"\u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0442\u0435\u043c\u044b",FormWinCaptionDefault_description:"\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435",
FormWinTitleAdd:"\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0430",FormWinTitleEdit:"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0430"},Topic:{ContextADvAdd_Error:'\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e <span class="link" onclick="BC.Window.Display(\'Auth\')">\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f</span> \u0438\u043b\u0438 <span class="link" onclick="BC.User.UserRegisterForm(); ">\u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f</span> \u0432&nbsp;\u0441\u0438\u0441\u0442\u0435\u043c\u0435',
ContextComAdd_Error:'\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e <span class="link" onclick="BC.Window.Display(\'Auth\');">\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f</span> \u0438\u043b\u0438 <span class="link" onclick="BC.User.UserRegisterForm(); ">\u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f</span> \u0432&nbsp;\u0441\u0438\u0441\u0442\u0435\u043c\u0435',
ContextQuestAdd_Error:'\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e <span class="link" onclick="BC.Window.Display(\'Auth\');">\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f</span> \u0438\u043b\u0438 <span class="link" onclick="BC.User.UserRegisterForm(); ">\u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f</span> \u0432&nbsp;\u0441\u0438\u0441\u0442\u0435\u043c\u0435',
ContextContinue_Error:'\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e <span class="link" onclick="BC.Window.Display(\'Auth\');">\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f</span> \u0438\u043b\u0438 <span class="link" onclick="BC.User.UserRegisterForm(); ">\u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f</span> \u0432&nbsp;\u0441\u0438\u0441\u0442\u0435\u043c\u0435',
StatusWinTitle_activate_Topic:"\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438",StatusWinText_activate_Topic:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e &laquo;#TOPIC_TITLE#&raquo;?",StatusWinTitle_deactivate_Topic:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438",
StatusWinText_deactivate_Topic:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e &laquo;#TOPIC_TITLE#&raquo;?",StatusWinTitle_destroy_Topic:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438",StatusWinText_destroy_Topic:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e &laquo;#TOPIC_TITLE#&raquo;?",
StatusWinTitle_lock_Topic:"\u0411\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u0441\u0442\u0430\u0442\u044c\u0438",StatusWinText_lock_Topic:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e &laquo;#TOPIC_TITLE#&raquo;?",StatusWinTitle_unlock_Topic:"\u0420\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u0441\u0442\u0430\u0442\u044c\u0438",
StatusWinText_unlock_Topic:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e &laquo;#TOPIC_TITLE#&raquo;?",StatusWinTitle_noapprove_Topic:"\u0412\u043e\u0437\u0432\u0440\u0430\u0442 \u043d\u0430 \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u044e",StatusWinText_noapprove_Topic:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e &laquo;#TOPIC_TITLE#&raquo; \u043d\u0430 \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u044e?",
StatusWinTitle_approve_Topic:"\u0423\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438",StatusWinText_approve_Topic:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e &laquo;#TOPIC_TITLE#&raquo;?",StatusWinTitle_activate_News:"\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0441\u0442\u0438",
StatusWinText_activate_News:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u043e\u0441\u0442\u044c &laquo;#TOPIC_TITLE#&raquo;?",StatusWinTitle_deactivate_News:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0441\u0442\u0438",StatusWinText_deactivate_News:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043d\u043e\u0432\u043e\u0441\u0442\u044c &laquo;#TOPIC_TITLE#&raquo;?",
StatusWinTitle_destroy_News:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0441\u0442\u0438",StatusWinText_destroy_News:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0438\u0442\u044c \u043d\u043e\u0432\u043e\u0441\u0442\u044c &laquo;#TOPIC_TITLE#&raquo;?",StatusWinTitle_lock_News:"\u0411\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u043d\u043e\u0432\u043e\u0441\u0442\u0438",
StatusWinText_lock_News:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u043e\u0441\u0442\u044c &laquo;#TOPIC_TITLE#&raquo;?",StatusWinTitle_unlock_News:"\u0420\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u043d\u043e\u0432\u043e\u0441\u0442\u0438",StatusWinText_unlock_News:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u043e\u0441\u0442\u044c &laquo;#TOPIC_TITLE#&raquo;?",
StatusWinTitle_noapprove_News:"\u0412\u043e\u0437\u0432\u0440\u0430\u0442 \u043d\u0430 \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u044e",StatusWinText_noapprove_News:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043d\u043e\u0432\u043e\u0441\u0442\u044c &laquo;#TOPIC_TITLE#&raquo; \u043d\u0430 \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u044e?",StatusWinTitle_approve_News:"\u0423\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0441\u0442\u0438",
StatusWinText_approve_News:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c \u043d\u043e\u0432\u043e\u0441\u0442\u044c &laquo;#TOPIC_TITLE#&raquo;?",StatusWinTitle_activate_Question:"\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u0430",StatusWinText_activate_Question:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441 &laquo;#TOPIC_TITLE#&raquo;?",
StatusWinTitle_deactivate_Question:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u0430",StatusWinText_deactivate_Question:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441 &laquo;#TOPIC_TITLE#&raquo;?",StatusWinTitle_destroy_Question:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u0430",
StatusWinText_destroy_Question:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0438\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441 &laquo;#TOPIC_TITLE#&raquo;?",StatusWinTitle_lock_Question:"\u0411\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u0430",StatusWinText_lock_Question:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441 &laquo;#TOPIC_TITLE#&raquo;?",
StatusWinTitle_unlock_Question:"\u0420\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u0430",StatusWinText_unlock_Question:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441 &laquo;#TOPIC_TITLE#&raquo;?",StatusWinTitle_noapprove_Question:"\u0412\u043e\u0437\u0432\u0440\u0430\u0442 \u043d\u0430 \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u044e",
StatusWinText_noapprove_Question:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441 &laquo;#TOPIC_TITLE#&raquo; \u043d\u0430 \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u044e?",StatusWinTitle_approve_Question:"\u0423\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u0430",StatusWinText_approve_Question:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441 &laquo;#TOPIC_TITLE#&raquo;?",
PreviewWinCaptionDefault_newfile:"\u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435",AttachWinCaptionDefault_userfile:"\u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043b",SendFriendWinCaptionDefault_email:"e-mail \u0434\u0440\u0443\u0433\u0430",RevisionNotSelect:"\u0412\u0435\u0440\u0441\u0438\u044f \u0434\u043b\u044f \u043e\u0442\u043a\u0430\u0442\u0430 \u043d\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u0430",
StatusWinText_answered_Question:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u043c\u0435\u0442\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043a\u0430\u043a \u043e\u0442\u0432\u0435\u0447\u0435\u043d\u043d\u044b\u0439?",StatusWinTitle_answered_Question:"\u0421\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0447\u0435\u043d\u043d\u044b\u043c",StatusWinText_Unanswered_Question:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u043c\u0435\u0442\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043a\u0430\u043a \u043d\u0435\u043e\u0442\u0432\u0435\u0447\u0435\u043d\u043d\u044b\u0439?",
StatusWinTitle_Unanswered_Question:"\u0421\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u043e\u0442\u0432\u0435\u0447\u0435\u043d\u043d\u044b\u043c",StatusWinText_Changed_Answer:"\u0421\u0442\u0430\u0442\u0443\u0441 \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d",QuestionPays:{period_1:"\u0437\u0430 1 \u0434\u0435\u043d\u044c",period_2:"\u0437\u0430 7 \u0434\u043d\u0435\u0439",period_3:"\u0437\u0430 1 \u043c\u0435\u0441\u044f\u0446",period_4:"\u0437\u0430 3 \u043c\u0435\u0441\u044f\u0446\u0430"}},
Tools:{StatusWinTitle_activate_Term:"\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u0430",StatusWinText_activate_Term:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0442\u0435\u0440\u043c\u0438\u043d &laquo;#TOOLS_TITLE#&raquo;?",StatusWinTitle_deactivate_Term:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u0430",
StatusWinText_deactivate_Term:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0442\u0435\u0440\u043c\u0438\u043d &laquo;#TOOLS_TITLE#&raquo;?",StatusWinTitle_lock_Term:"\u0411\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u0442\u0435\u0440\u043c\u0438\u043d\u0430",StatusWinText_lock_Term:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u0440\u043c\u0438\u043d &laquo;#TOOLS_TITLE#&raquo;?",
StatusWinTitle_unlock_Term:"\u0420\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u0442\u0435\u0440\u043c\u0438\u043d\u0430",StatusWinText_unlock_Term:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u0440\u043c\u0438\u043d &laquo;#TOOLS_TITLE#&raquo;?",StatusWinTitle_lock_Soft:"\u0411\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b",
StatusWinText_lock_Soft:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 &laquo;#TOOLS_TITLE#&raquo;?",StatusWinTitle_unlock_Soft:"\u0420\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b",StatusWinText_unlock_Soft:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 &laquo;#TOOLS_TITLE#&raquo;?",
StatusWinTitle_lock_Books:"\u0411\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u043a\u043d\u0438\u0433\u0438",StatusWinText_lock_Books:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043d\u0438\u0433\u0443 &laquo;#TOOLS_TITLE#&raquo;?",StatusWinTitle_unlock_Books:"\u0420\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u043a\u043d\u0438\u0433\u0438",
StatusWinText_unlock_Books:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043d\u0438\u0433\u0443 &laquo;#TOOLS_TITLE#&raquo;?",StatusWinTitle_lock_Docs:"\u0411\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430",StatusWinText_lock_Docs:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 &laquo;#TOOLS_TITLE#&raquo;?",
StatusWinTitle_unlock_Docs:"\u0420\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430",StatusWinText_unlock_Docs:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 &laquo;#TOOLS_TITLE#&raquo;?"},Comment:{ButtonTitleAdd:"\u041d\u0430\u043f\u0438\u0441\u0430\u0442\u044c",
ButtonTitleEdit:"\u041e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c",ErrorTextNotLoaded:"\u0414\u043e\u0436\u0434\u0438\u0442\u0435\u0441\u044c \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438",StatusWinTitle_activate:"\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f",StatusWinText_activate:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439?",
StatusWinTitle_deactivate:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f",StatusWinText_deactivate:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439?",StatusWinTitle_destroy:"\u0423\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f",
StatusWinText_destroy:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0438\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439?",CommentStatusWinCaptionDefault_reason:"\u043f\u0440\u0438\u0447\u0438\u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f",CommentStatusWinValueDefault_reason:"\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043d\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c \u0441\u0430\u0439\u0442\u0430",
TopicTitleWinCaptionDefault_title:"\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",ConfirmTitleQuestionCut:"\u041f\u0435\u0440\u0435\u043d\u043e\u0441 \u0432\u043e\u043f\u0440\u043e\u0441\u0430",ConfirmTextQuestionCut:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u044b\u0440\u0435\u0437\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441 &laquo;#TOPIC_TITLE#&raquo; \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043a \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u0443?",
ConfirmTitleCommentCut:"\u041f\u0435\u0440\u0435\u043d\u043e\u0441 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f",ConfirmTextCommentCut:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0438\u0442 \u044d\u0442\u043e\u0442 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u0438 \u0432\u0441\u0435 \u043e\u0442\u0432\u0435\u0442\u044b \u043a \u043d\u0435\u043c\u0443 \u0432 \u0434\u0440\u0443\u0433\u043e\u0435 \u043c\u0435\u0441\u0442\u043e?",
ConfirmTitleContentPaste:"\u0412\u0441\u0442\u0430\u0432\u043a\u0430 \u0438\u0437 \u0431\u0443\u0444\u0435\u0440\u0430",ConfirmTextContentPaste:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u0438\u0437 \u0431\u0443\u0444\u0435\u0440\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0441\u044e\u0434\u0430?",ConfirmTitleDonateOn:"\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u043f\u043e\u0436\u0435\u0440\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0439",
ConfirmTextDonateOn:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044c\u043d\u043e \u043e\u0442\u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0438\u0442\u044c \u0437\u0430 \u044d\u0442\u043e\u0442 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439?",
ConfirmTitleDonateOff:"\u0414\u0435\u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u043f\u043e\u0436\u0435\u0440\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0439",ConfirmTextDonateOff:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044c\u043d\u043e \u043e\u0442\u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0438\u0442\u044c \u0437\u0430 \u044d\u0442\u043e\u0442 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439?"},
Auction:{StatusWinTitle_activate:"\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0430\u0443\u043a\u0446\u0438\u043e\u043d\u0430",StatusWinText_activate:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0430\u0443\u043a\u0446\u0438\u043e\u043d &laquo;#AUCTION_TITLE#&raquo;?",StatusWinTitle_deactivate:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0430\u0443\u043a\u0446\u0438\u043e\u043d\u0430",
StatusWinText_deactivate:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0430\u0443\u043a\u0446\u0438\u043e\u043d &laquo;#AUCTION_TITLE#&raquo;?",StatusWinTitle_lock:"\u0411\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u0430\u0443\u043a\u0446\u0438\u043e\u043d\u0430",StatusWinText_lock:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u0443\u043a\u0446\u0438\u043e\u043d &laquo;#AUCTION_TITLE#&raquo;?",
StatusWinTitle_unlock:"\u0420\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u0430\u0443\u043a\u0446\u0438\u043e\u043d\u0430",StatusWinText_unlock:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u0443\u043a\u0446\u0438\u043e\u043d &laquo;#AUCTION_TITLE#&raquo;?",StatusWinTitle_reset:"\u0421\u0431\u0440\u043e\u0441 \u0441\u0443\u043c\u043c\u044b",
StatusWinText_reset:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0441\u0443\u043c\u043c\u0443 \u0430\u0443\u043a\u0446\u0438\u043e\u043d\u0430 &laquo;#AUCTION_TITLE#&raquo;?",StatusWinTitle_return:"\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u044b \u0432 \u0430\u0443\u043a\u0446\u0438\u043e\u043d",StatusWinText_return:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0442\u0435\u043c\u0443 &laquo;#AUCTION_TITLE#&raquo; \u0432 \u0430\u0443\u043a\u0446\u0438\u043e\u043d?",
RefuseWinCaptionDefault_reason:"\u043f\u0440\u0438\u0447\u0438\u043d\u0430 \u043e\u0442\u043a\u0430\u0437\u0430",RefuseWinValueDefault_reason:"\u0428\u0435\u0444! \u0412\u0441\u0435 \u043f\u0440\u043e\u043f\u0430\u043b\u043e! \u0413\u0438\u043f\u0441 \u0441\u043d\u0438\u043c\u0430\u044e\u0442, \u043a\u043b\u0438\u0435\u043d\u0442 \u0443\u0435\u0437\u0436\u0430\u0435\u0442!"},User:{AvatarLoadResult_Ok:"\u041f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b",
ChekLogin_Ok:"\u0434\u0430\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e",StatusWinTitle_activate:"\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f",StatusWinText_activate:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f &laquo;#LOGIN#&raquo;?",
StatusWinTitle_deactivate:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f",StatusWinText_deactivate:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f &laquo;#LOGIN#&raquo;?",StatusWinTitle_lock:"\u0411\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f",
StatusWinText_lock:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f &laquo;#LOGIN#&raquo;?",StatusWinTitle_unlock:"\u0420\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f",
StatusWinText_unlock:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f &laquo;#LOGIN#&raquo;?",StatusWinTitle_auctionlock:"\u0411\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u0430\u0443\u043a\u0446\u0438\u043e\u043d\u0435",
StatusWinText_auctionlock:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f &laquo;#LOGIN#&raquo; \u043d\u0430 \u0430\u0443\u043a\u0446\u0438\u043e\u043d\u0435?",StatusWinTitle_auctionunlock:"\u0420\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u0430\u0443\u043a\u0446\u0438\u043e\u043d\u0435",
StatusWinText_auctionunlock:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f &laquo;#LOGIN#&raquo; \u043d\u0430 \u0430\u0443\u043a\u0446\u0438\u043e\u043d\u0435?",StatisticDateError:"\u041d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u043d \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a \u043c\u0435\u0436\u0434\u0443 \u0434\u0430\u0442\u0430\u043c\u0438!",
BlogWinTitleModer:"\u041c\u043e\u0434\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0440\u0430\u0437\u0434\u0435\u043b\u044b",BlogWinTitleSpec:"\u0421\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0430\u0445",ProfileWinCaptionDefault_mail:"e-mail",ProfileWinCaptionDefault_realname:"\u0438\u043c\u044f",ProfileWinCaptionDefault_city:"\u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435",ProfileWinCaptionDefault_site:"\u0441\u0430\u0439\u0442",
ProfileWinCaptionDefault_icq:"icq",ProfileWinCaptionDefault_livejournal:"\u0430\u0434\u0440\u0435\u0441 \u0431\u043b\u043e\u0433\u0430",ProfileWinCaptionDefault_skype:"skype",ProfileWinCaptionDefault_passold:"\u0441\u0442\u0430\u0440\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c",ProfileWinCaptionDefault_passnew:"\u043d\u043e\u0432\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c",ContextAdvAddToBalanceDefault_title:"\u0421\u0443\u043c\u043c\u0430, $",ContextAdvAddToBalanceError_title:"\u0421\u0443\u043c\u043c\u0430 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u0430",
ContextAdvAddForm_help:"\u041f\u043e\u043c\u043e\u0449\u044c",ContextAdvAddForm_help_add:'\u042d\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u044b\u0445 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0439 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u044d\u0442\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0435\u0441\u0442\u044c \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 <a href="http://www.builderclub.com/reklama/" target=\'_blank\' title=\'\u0420\u0435\u043a\u043b\u0430\u043c\u0430 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435\'>\u0420\u0435\u043a\u043b\u0430\u043c\u0430 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435</a>.<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432 \u0432\u0438\u0434\u0435\u043e \u043c\u0430\u043d\u0443\u0430\u043b\u0435 \u043d\u0438\u0436\u0435:</p><p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/8eNm1UPOefg?fs=1&amp;hl=ru_RU"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/8eNm1UPOefg?fs=1&amp;hl=ru_RU" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></p>',
ContextAdvAddForm_help_waitmoder:"\u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u043c, \u0435\u0433\u043e \u043f\u043e\u043a\u0430\u0437 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u0438",
ContextAdvAddForm_help_pay:"\u041f\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u0447\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u044b Webmoney (WMZ, WMU, WMR, WME), \u043a\u0430\u0440\u0442 Visa/MasterCard (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0435\u0440\u0432\u0438\u0441 <a href=\"https://www.liqpay.com/\" target='_blank' title='liqpay.com' rel='nofollow'>liqpay.com</a>, \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u0438 \u0412\u0430\u0448\u0430 \u043a\u0430\u0440\u0442\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043e\u0442\u043a\u0440\u044b\u0442\u0430 \u0434\u043b\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0435\u0439 \u0432 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442). \u0423\u0441\u043b\u043e\u0432\u043d\u043e\u0439 \u0435\u0434\u0438\u043d\u0438\u0446\u0435\u0439 \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0414\u043e\u043b\u043b\u0430\u0440 \u0421\u0428\u0410, \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u0430\u043b\u044e\u0442\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043f\u043e \u043a\u0443\u0440\u0441\u0443 \u041d\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0411\u0430\u043d\u043a\u0430 \u0423\u043a\u0440\u0430\u0438\u043d\u044b. \u041e\u0431\u0440\u0430\u0449\u0430\u0435\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043f\u0440\u0438 \u043e\u043f\u043b\u0430\u0442\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Webmoney \u0438 \u043a\u0430\u0440\u0442 Visa/MasterCard \u043f\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0441\u0447\u0435\u0442\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e. \u042e\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043b\u0438\u0446\u0430\u043c \u0434\u043b\u044f \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e <a href=\"\" onclick=\"BC.Messages.feedbackSubjectRequest('dogovor'); return false;\" >\u0441\u0432\u044f\u0437\u0430\u0442\u044c\u0441\u044f</a>  \u0441 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0435\u0439 \u0434\u043b\u044f \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0433\u043e\u0432\u043e\u0440\u0430.",
ContextAdvAddForm_help_title:"\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439, \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043e\u0442\u0440\u0430\u0436\u0430\u044e\u0449\u0438\u0439 \u0441\u0443\u0442\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u043b\u0435\u0433\u043a\u043e \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e\u0449\u0438\u0439\u0441\u044f \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a. \u041d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0432\u0441\u0435 \u043f\u0440\u043e\u043f\u0438\u0441\u043d\u044b\u0435 \u0431\u0443\u043a\u0432\u044b, \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0438\u043b\u0438 \u0438\u0437\u043b\u0438\u0448\u043d\u0438\u0435 \u0432\u043e\u0441\u043a\u043b\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u043a\u0438, \u043e\u0431\u044c\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430\u043c\u0438 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0435\u0439.",
ContextAdvAddForm_help_text:"\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u043e\u043b\u0435 \u043e\u043f\u0438\u0448\u0438\u0442\u0435 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0412\u0430\u0448 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u0438\u043b\u0438 \u0443\u0441\u043b\u0443\u0433\u0443. \u041f\u043e\u0434\u0447\u0435\u0440\u043a\u043d\u0438\u0442\u0435 \u0432\u0441\u0435 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0412\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u0438\u043b\u0438 \u0443\u0441\u043b\u0443\u0433\u0438, \u0435\u0433\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043f\u0440\u0438\u0437\u044b\u0432 \u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a\u0438\u0435 \u0441\u043b\u043e\u0432\u0430 \u043a\u0430\u043a \u00ab\u0437\u0430\u043a\u0430\u0436\u0438\u0442\u0435\u00bb, \u00ab\u043a\u0443\u043f\u0438\u0442\u0435\u00bb \u0438\u043b\u0438 \u00ab\u0443\u0437\u043d\u0430\u0439\u0442\u0435\u00bb, \u00ab\u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435\u00bb. \u041d\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0439\u0442\u0435 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0442\u0435\u043a\u0441\u0442\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f, \u0442\u0430\u043a\u0438\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0435\u0439.",
ContextAdvAddForm_help_link:"\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043f\u0430\u0434\u0430\u0442\u044c, \u043a\u043b\u0438\u043a\u0430\u044f \u043d\u0430 \u0412\u0430\u0448\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435. \u041b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e, \u0435\u0441\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0432 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0438 URL-\u0430\u0434\u0440\u0435\u0441 \u0432\u0435\u0434\u0435\u0442 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u0433\u0434\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0443\u0437\u043d\u0430\u044e\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u043b\u043e \u0438\u0445 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0432 \u0412\u0430\u0448\u0435\u043c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0438.",
ContextAdvAddForm_help_city:"\u0412 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0412\u044b \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043d\u044b \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e \u0412\u0430\u0448\u0435\u043c\u0443 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0433\u043e\u0440\u043e\u0434\u0430, \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0433\u043e\u0440\u043e\u0434\u0430. \u0413\u043e\u0440\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d \u0432 \u0442\u0435\u043a\u0441\u0442\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f, \u0447\u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u043b\u0435\u0447\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0433\u043e\u0440\u043e\u0434\u0430. \u0415\u0441\u043b\u0438 \u0412\u0430\u0448\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043e \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0442\u043e \u043e\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u044d\u0442\u043e \u043f\u043e\u043b\u0435 \u043f\u0443\u0441\u0442\u044b\u043c.",
ContextAdvAddForm_help_country:"\u041c\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0430 \u0432\u044b\u0431\u043e\u0440 \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0442\u0430\u0440\u0433\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f. \u0415\u0441\u043b\u0438 \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0412\u0430\u0448\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0438\u0437 \u0423\u043a\u0440\u0430\u0438\u043d\u044b, \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u00ab\u0423\u043a\u0440\u0430\u0438\u043d\u0430\u00bb. \u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0412\u0430\u0448\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0438\u0437 \u0420\u043e\u0441\u0441\u0438\u0438, \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u00ab\u0420\u043e\u0441\u0441\u0438\u044f\u00bb. \u0415\u0441\u043b\u0438 \u0412\u044b \u043d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u043a\u0430\u0437 \u0412\u0430\u0448\u0435\u0433\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u043e\u0439, \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u00ab\u0412\u0435\u0437\u0434\u0435\u00bb. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0412\u0430\u0448\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0443\u0432\u0438\u0434\u044f\u0442 \u0432\u0441\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043f\u043e\u0441\u0435\u0442\u0438\u0432\u0448\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435.",
ContextAdvAddForm_help_daily_budjet:"\u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u043b\u0435 \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0441\u0443\u043c\u043c\u0443 \u0432 \u0434\u043e\u043b\u043b\u0430\u0440\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0412\u044b \u0433\u043e\u0442\u043e\u0432\u044b \u0442\u0440\u0430\u0442\u0438\u0442\u044c \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u0434\u0435\u043d\u044c. \u041f\u043e\u0441\u043b\u0435 \u0438\u0441\u0447\u0435\u0440\u043f\u0430\u043d\u0438\u044f \u0434\u043d\u0435\u0432\u043d\u043e\u0433\u043e \u0431\u044e\u0434\u0436\u0435\u0442\u0430 \u043f\u043e\u043a\u0430\u0437 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0434\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0434\u043d\u044f.",
ContextAdvAddForm_help_selectedArticles:"\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u00ab\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c/\u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c\u00bb  \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u043f\u043e\u0440\u0442\u0430\u043b\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435. \u0421\u0442\u0430\u0440\u0430\u0439\u0442\u0435\u0441\u044c \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u0442\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u0412\u0430\u0448\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u043e\u0440\u0442\u0430\u043b\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0438 \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0443. \u042d\u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u043b\u0435\u0447\u044c \u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u0435\u043b\u0435\u0439.",
ContextAdvAddFormDefault_title:"\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f",ContextAdvAddFormDefault_text:"\u0442\u0435\u043a\u0441\u0442 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f",ContextAdvAddFormDefault_link:"\u0430\u0434\u0440\u0435\u0441 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u0435\u0434\u0435\u0442 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435",
ContextAdvAddFormDefault_city:"\u0433\u043e\u0440\u043e\u0434",ContextAdvAddFormDefault_daily_budjet:"\u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0431\u044e\u0434\u0436\u0435\u0442, $",ContextAdvAddFormDefault_selectedArticles:"\u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0449\u0438\u0445 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435",ContextAdvChangeStatus_Title:"\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u0430",
ContextAdvModer_Title:"\u041c\u043e\u0434\u0435\u0440\u0430\u0446\u0438\u044f \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f",ContextAdvDel_Title:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u044c\u044f\u0432\u043b\u0435\u043d\u0438\u044f",ContextAdvAdminStop_Title:"\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043e\u0431\u044c\u044f\u0432\u043b\u0435\u043d\u0438\u044f",ContextAdvChangeStatus_Text:"\u0412\u044b \u0434\u0435\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u043e\u0431\u044c\u044f\u0432\u043b\u0435\u043d\u0438\u044f ",
ContextAdvModer_Text:"\u0412\u044b \u0434\u0435\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0434\u043e\u0431\u0440\u0438\u0442\u044c \u043e\u0431\u044c\u044f\u0432\u043b\u0435\u043d\u0438\u044f &laquo;#TITLE#&raquo;",ContextAdvAdminStop_Text:"\u0412\u044b \u0434\u0435\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u043e\u043a\u0430\u0437 \u043e\u0431\u044c\u044f\u0432\u043b\u0435\u043d\u0438\u044f &laquo;#TITLE#&raquo;",
ContextAdvStart_Text:"\u0412\u044b \u0434\u0435\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043e\u0431\u044c\u044f\u0432\u043b\u0435\u043d\u0438\u0435 &laquo;#TITLE#&raquo;",ContextAdvStop_Text:"\u0412\u044b \u0434\u0435\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043e\u0431\u044c\u044f\u0432\u043b\u0435\u043d\u0438\u0435 &laquo;#TITLE#&raquo;",
ContextAdvDel_Text:"\u0412\u044b \u0434\u0435\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043e\u0431\u044c\u044f\u0432\u043b\u0435\u043d\u0438\u0435 &laquo;#TITLE#&raquo;",ChangeAdvPrise_Text:"\u0414\u043b\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b &laquo;#TITLE#&raquo; \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0446\u0435\u043d\u0430 \u043a\u043b\u0438\u043a\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 $#PRISE#",
ModerCityConfirm:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c &laquo;#OLD#&raquo; \u043d\u0430 &laquo;#NEW#&raquo; ",StatusWinCaption_days:"\u0434\u043d\u0435\u0439",ContextAdvEditWin_title:"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f",ContextAdvAddWin_title:"\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f",
ErrorTextNotLoaded:"\u0414\u043e\u0436\u0434\u0438\u0442\u0435\u0441\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b",ErrorOnChangeContextStatus:"\u0427\u0442\u043e \u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0434\u043e \u043f\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u0447\u0435\u0442!",AddnonCashCaptionDefault_login:"\u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f",
AddnonCashCaptionDefault_amount:"\u0441\u0443\u043c\u043c\u0430 $",ChangeCityCaptionDefault_city_id:"\u0441\u043f\u0438\u0441\u043e\u043a \u0433\u043e\u0440\u043e\u0434\u043e\u0432",ChangeCityCaptionDefault_new_city:"\u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430",AwardWinCaptionDefault_amount:"\u0441\u0443\u043c\u043c\u0430",AwardWinCaptionDefault_comment:"\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439",AwardWinTitleAward:"\u041f\u0440\u0435\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f",
AwardWinTitlePenalty:"\u041e\u0448\u0442\u0440\u0430\u0444\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f",AwardWinTitleWithdraw:"\u0412\u044b\u0432\u043e\u0434 \u0441\u0440\u0435\u0434\u0441\u0442\u0432",AwardWinTextPenalty:"\u0428\u0442\u0440\u0430\u0444 - \u043f\u0435\u0440\u0432\u044b\u0439 \u0448\u0430\u0433 \u043a \u0431\u0430\u043d\u0443...",AwardWinTextWithdraw:"\u0421\u043d\u044f\u0442\u0438\u0435 \u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432",
UserAuthCaptionDefault_login:"\u043b\u043e\u0433\u0438\u043d",UserAuthCaptionDefault_password:"\u043f\u0430\u0440\u043e\u043b\u044c",UserAuthCaptionDefault_remember:"\u0437\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043c\u0435\u043d\u044f",UserRegCaptionDefault_login:"\u043b\u043e\u0433\u0438\u043d",UserRegCaptionDefault_mail:"e-mail",UserRegCaptionDefault_password:"\u043f\u0430\u0440\u043e\u043b\u044c",UserRegCaptionDefault_captcha:"\u0430\u043d\u0442\u0438\u0431\u043e\u0442 \u043a\u043e\u0434",
ConfirmTitleDeclineAward:"\u041e\u0442\u0437\u044b\u0432 \u043f\u0440\u0435\u043c\u0438\u0438",ConfirmTextDeclineAward:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u0431\u0440\u0430\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u0435\u043c\u0438\u044e \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f?",ConfirmTitleApproveWithdraw:"\u0412\u044b\u0432\u043e\u0434 \u0441\u0440\u0435\u0434\u0441\u0442\u0432",
ConfirmTextApproveWithdraw:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0432\u044b\u0432\u043e\u0434 \u0441\u0440\u0435\u0434\u0441\u0442\u0432?",ConfirmTitleCancelWithdraw:"\u0412\u044b\u0432\u043e\u0434 \u0441\u0440\u0435\u0434\u0441\u0442\u0432",ConfirmTextCancelWithdraw:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0442\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u044b\u0432\u043e\u0434 \u0441\u0440\u0435\u0434\u0441\u0442\u0432?",
TransactionStatus_approved:"\u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0430",TransactionStatus_canceled:"\u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0430",TransactionStatus_declined:"\u043e\u0442\u043e\u0437\u0432\u0430\u043d\u0430",TransactionStatus_withdraw:"\u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435",TransactionStatus_penalty:"\u0448\u0442\u0440\u0430\u0444"},Messages:{TextLeft:"\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c",TextLeft2:"\u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c",
TextLeftOver:"\u0414\u043b\u0438\u043d\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0432\u044b\u0448\u0435\u043d\u0430 \u043d\u0430",TextLeftOver2:"\u0434\u043b\u0438\u043d\u0430 \u043f\u0440\u0435\u0432\u044b\u0448\u0435\u043d\u0430 \u043d\u0430",TextSymbol0:"",TextSymbol1:"\u0441\u0438\u043c\u0432\u043e\u043b",TextSymbol2:"\u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432",TextSymbol3:"\u0441\u0438\u043c\u0432\u043e\u043b\u0430",ErrorTextNoSelectedMessages:"\u041d\u0438 \u043e\u0434\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043d\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e",
ConfirmTitleDeleteMessage:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f",ConfirmTextDeleteMessage:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0435\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435?",ConfirmTextDeleteSelectedMessage:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0435\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435?",
ConfirmTitleDeleteMessages:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439",ConfirmTextDeleteSelectedMessages:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0435\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f?",ConfirmTitleMarkAsReadMessage:"\u041f\u043e\u043c\u0435\u0442\u043a\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u043d\u044b\u043c",
ConfirmTextMarkAsReadMessage:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0435\u0442\u0435 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043a\u0430\u043a \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u043d\u043e\u0435?",ConfirmTitleMarkAsReadMessages:"\u041f\u043e\u043c\u0435\u0442\u043a\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u043d\u044b\u043c\u0438",
FeedbackCaption_id_subject:"\u0442\u0435\u043c\u0430",FeedbackCaption_email:"\u0432\u0430\u0448 e-mail",FeedbackCaption_messaje:"\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435"},SiteNews:{StatusWinTitle_lock:"\u0411\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u043d\u043e\u0432\u043e\u0441\u0442\u0438 \u0441\u0430\u0439\u0442\u0430",StatusWinText_lock:'\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u043e\u0441\u0442\u044c "#NEWS_TITLE#"?',
StatusWinTitle_unlock:"\u0420\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u043d\u043e\u0432\u043e\u0441\u0442\u0438 \u0441\u0430\u0439\u0442\u0430",StatusWinText_unlock:'\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u043e\u0441\u0442\u044c "#NEWS_TITLE#"?',StatusWinTitle_deactivate:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0441\u0442\u0438 \u0441\u0430\u0439\u0442\u0430",
StatusWinText_deactivate:'\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043d\u043e\u0432\u043e\u0441\u0442\u044c "#NEWS_TITLE#"?',StatusWinTitle_activate:"\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0441\u0442\u0438 \u0441\u0430\u0439\u0442\u0430",StatusWinText_activate:'\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u043e\u0441\u0442\u044c "#NEWS_TITLE#"?'},
Estimate:{CaptionDefault_square:"\u041e\u0431\u0449\u0430\u044f \u043f\u043b\u043e\u0449\u0430\u0434\u044c \u0434\u043e\u043c\u0430",CaptionError_square:"\u041e\u0431\u0449\u0430\u044f \u043f\u043b\u043e\u0449\u0430\u0434\u044c \u0434\u043e\u043c\u0430 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u0430",CaptionDefault_name:"\u0438\u043c\u044f",CaptionError_name:"\u0438\u043c\u044f \u0432\u0432\u0435\u0434\u0435\u043d\u043e \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e",CaptionDefault_country:"\u0441\u0442\u0440\u0430\u043d\u0430",
CaptionError_country:"\u0441\u0442\u0440\u0430\u043d\u0430 \u043d\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u0430",CaptionDefault_region:"\u0440\u0435\u0433\u0438\u043e\u043d",CaptionError_region:"\u0440\u0435\u0433\u0438\u043e\u043d \u043d\u0435 \u0432\u044b\u0431\u0440\u0430\u043d",CaptionDefault_pay_type:"\u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u043f\u043b\u0430\u0442\u044b",CaptionError_pay_type:"\u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u043f\u043b\u0430\u0442\u044b \u043d\u0435 \u0432\u044b\u0431\u0440\u0430\u043d",
CaptionDefault_wmid:"WMID",CaptionError_wmid:"WMID \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439",CaptionDefault_userfile:"\u0444\u0430\u0439\u043b \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c",CaptionError_userfile:"\u0444\u0430\u0439\u043b \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u043d\u0435 \u0432\u044b\u0431\u0440\u0430\u043d",CaptionDefault_status:"\u0441\u0442\u0430\u0442\u0443\u0441",CaptionError_status:"\u0441\u0442\u0430\u0442\u0443\u0441 \u043d\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439",
CaptionLiqpayError_status:"\u043f\u0440\u0438 \u043e\u043f\u043b\u0430\u0442\u0435 \u0447\u0435\u0440\u0435\u0437 liqpay \u043d\u0430\u0434\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c e-mail \u0438 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440",CaptionNoneLiqpayError_status:"(\u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u043d\u043e \u043f\u043e\u043b\u0435)"},Promo:{StatusWinTitle_activate:"\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438",
StatusWinText_activate:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0440\u0435\u043a\u043b\u0430\u043c\u043d\u0443\u044e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044e &laquo;#PROMO_TITLE#&raquo;?",StatusWinTitle_deactivate:"\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438",StatusWinText_deactivate:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0440\u0435\u043a\u043b\u0430\u043c\u043d\u0443\u044e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044e &laquo;#PROMO_TITLE#&raquo;?",
StatusWinTitle_lock:"\u0411\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438",StatusWinText_lock:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u043a\u043b\u0430\u043c\u043d\u0443\u044e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044e &laquo;#PROMO_TITLE#&raquo;?",StatusWinTitle_unlock:"\u0420\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438",
StatusWinText_unlock:"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u043a\u043b\u0430\u043c\u043d\u0443\u044e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044e &laquo;#PROMO_TITLE#&raquo;?",CaptionDefault_title:"\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435",CaptionDefault_keyname:"\u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e",
CaptionError_title:"\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043d\u0435 \u0432\u0432\u0435\u0434\u0435\u043d\u043e",CaptionError_keyname:"\u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e \u043d\u0435 \u0432\u0432\u0435\u0434\u0435\u043d\u043e",WinTitleAdd:"\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438",WinTitleEdit:"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438"},
Error:{ErrorRegistrationLoginAlreadyRegistered:"\u0432\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u043c\u0438 \u043b\u043e\u0433\u0438\u043d \u0443\u0436\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d",NoticeCharLogin_login:"\u043b\u043e\u0433\u0438\u043d \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u0430\u0442\u0438\u043d\u0441\u043a\u0438\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b, \u0446\u0438\u0444\u0440\u044b, \u0430 \u0442\u0430\u043a \u0436\u0435 \u0442\u0438\u0440\u0435 \u0438 \u0442\u043e\u0447\u043a\u0443",
NoticeStringMin_login:"\u043b\u043e\u0433\u0438\u043d \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439",AmountIsIncirect:"\u0441\u0443\u043c\u043c\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u0430 \u043d\u0435\u043a\u043e\u0440\u0435\u043a\u0442\u043d\u043e \u0438\u043b\u0438 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u0430",ErrorMainIncorrectData:"\u0412\u0432\u0435\u0434\u0435\u043d\u044b \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u0418\u0441\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u043f\u043e\u043f\u044b\u0442\u043a\u0443",
DonateFeedbackNowAnswer:"\u041d\u0438 \u043e\u0434\u0438\u043d \u043f\u0443\u043d\u043a\u0442 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d",ErrorMainUserNotFound:"\u0412\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d. \u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u0432\u043e\u0434\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u043f\u043e\u043f\u044b\u0442\u043a\u0443",
ErrorMainNewsNotFound:"\u0421\u0442\u0430\u0442\u044c\u044f \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430. \u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u0432\u043e\u0434\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u043f\u043e\u043f\u044b\u0442\u043a\u0443",QuestonSubTypeIsIncirect:'\u041d\u0435 \u0432\u044b\u0431\u0440\u0430\u043d \u0441\u0440\u043e\u043a \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044e "\u0437\u0430\u0434\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441"',
QuestonPayTypeIsIncirect:"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u043f\u043b\u0430\u0442\u044b \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430",QuestonRulesNotConfirmed:"\u041d\u0443\u0436\u043d\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u0430"},p:"<p></p>",Static:{DonateFeedbackSuccess:"\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u0430\u0448\u0435 \u043c\u043d\u0435\u043d\u0438\u0435",
SendDonateLetterNotifyMessage:"\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0441\u043b\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0443 \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u043f\u0438\u0441\u044c\u043c\u043e \u0441 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441?",
BlockDonateLetterNotifyMessage:"\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0440\u0430\u0432\u043a\u0443 \u043f\u0438\u0441\u044c\u043c\u0430 \u0441 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u0430?",
AllowDonateLetterNotifyMessage:"\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u043e\u043f\u0440\u0430\u0432\u043a\u0443 \u043f\u0438\u0441\u044c\u043c\u0430 \u0441 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u0430?",
SendDonateLetterNotifyTitle:"\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u0438\u0441\u044c\u043c\u043e \u0430\u0432\u0442\u043e\u0440\u0443?",SendDonateLetterSuccess:"\u041f\u0438\u0441\u044c\u043c\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u043e \u0430\u0432\u0442\u043e\u0440\u0443",BlockDonateLetterNotifyTitle:"\u0417\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u043f\u0438\u0441\u044c\u043c\u0430 \u0430\u0432\u0442\u043e\u0440\u0443?",
AllowDonateLetterNotifyTitle:"\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u043f\u0438\u0441\u044c\u043c\u0430 \u0430\u0432\u0442\u043e\u0440\u0443?",BlockDonateLetterSuccess:"\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043f\u0438\u0441\u044c\u043c\u0430 \u0441 \u0434\u043e\u043d\u044d\u0439\u0442\u043e\u043c \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430",AllowDonateLetterSuccess:"\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043f\u0438\u0441\u044c\u043c\u0430 \u0441 \u0434\u043e\u043d\u044d\u0439\u0442\u043e\u043c \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430"}};
BC.Browser={CH:navigator.userAgent.indexOf("Chrome")!=-1,SF:navigator.userAgent.indexOf("Safari")!=-1&&navigator.userAgent.indexOf("Chrome")==-1,OP:navigator.userAgent.indexOf("Opera")!=-1,IE:navigator.userAgent.indexOf("MSIE")!=-1&&navigator.userAgent.indexOf("Opera")==-1,IE6:navigator.userAgent.indexOf("MSIE 6")!=-1&&navigator.userAgent.indexOf("Opera")==-1,IE7:navigator.userAgent.indexOf("MSIE 7")!=-1&&navigator.userAgent.indexOf("Opera")==-1,IE8:navigator.userAgent.indexOf("MSIE 8")!=-1&&navigator.userAgent.indexOf("Opera")==
-1,IE9:navigator.userAgent.indexOf("MSIE 9")!=-1&&navigator.userAgent.indexOf("Opera")==-1,FF:navigator.userAgent.indexOf("Firefox")!=-1,MZ:navigator.userAgent.indexOf("Gecko")!=-1&&navigator.userAgent.indexOf("Safari")==-1&&navigator.userAgent.indexOf("Chrome")==-1,MinMax:{Elements:[],AddElement:function(a){if(BC.Browser.IE&&a&&!BC.Browser.MinMax.Elements.contain(a))BC.Browser.MinMax.Elements.push(a),a=$(a),a.style.minmaxHeight=a.currentStyle.height,a.style.minmaxWidth=a.currentStyle.width},Fix:function(){for(var a=
0;a<BC.Browser.MinMax.Elements.length;a++){var b=$(BC.Browser.MinMax.Elements[a]);if(b){var c=b.style,d=b.currentStyle;b.style.width=c.minmaxWidth;var e=b.offsetWidth,f=!0;if(f&&d.minWidth&&d.minWidth!="0"&&d.minWidth!="auto"&&d.minWidth!="")b.style.width=d.minWidth,f=b.offsetWidth<e;if(f&&d.maxWidth&&d.maxWidth!="none"&&d.maxWidth!="auto"&&d.maxWidth!="")b.style.width=d.maxWidth,f=b.offsetWidth>e;if(f)b.style.width=c.minmaxWidth;b.style.height=c.minmaxHeight;e=b.offsetHeight;if((f=!0)&&d.minHeight&&
d.minHeight!="0"&&d.minHeight!="auto"&&d.minHeight!="")b.style.height=d.minHeight,f=b.offsetHeight<e;if(f&&d.maxHeight&&d.maxHeight!="none"&&d.maxHeight!="auto"&&d.maxHeight!="")b.style.height=d.maxHeight,f=b.offsetHeight>e;if(f)b.style.height=c.minmaxHeight}}document.body.style.visibility=""}}};BC.Browser.IE==!0&&(window.attachEvent("onload",BC.Browser.MinMax.Fix),window.attachEvent("onresize",BC.Browser.MinMax.Fix));Math.roundTo=function(a,b){var c=Math.pow(10,b);return Math.round(a*c)/c};
Math.roundWithZero=function(a,b){a=Math.roundTo(a,b);a+="";var c=[],d=a.split(".");c[0]=d[0];d[1]==void 0?c[1]="00":(d[1].length==1&&(c[1]=d[1]+"0"),d[1].length==2&&(c[1]=d[1]));return c[0]+"."+c[1]};
BC.Common={Escape:function(a){return encodeURI(a).replace(/\+/g,"%2B").replace(/\&/g,"%26")},TextAfterNum:function(a,b){var c=a%10,d=a%100;b+=d>=10&&d<=14?2:c==1?1:c>=2&&c<=4?3:2;eval("var TextPart="+b);return a+" "+TextPart},SetCookie:function(a,b,c,d,e,f){document.cookie=a+"="+escape(b)+(c?"; expires="+c:"")+(d?"; path="+d:"")+(e?"; domain="+e:"")+(f?"; secure":"")},GetCookie:function(a){var b=document.cookie,a=b.search(RegExp("(^| )"+a+"=","")),c;return a!=-1?(c=b.indexOf(";",a),(c==-1?b.substr(a).split("="):
b.substr(a,c-a).split("="))[1]):null},WindowW:function(){var a=document.compatMode=="CSS1Compat"?document.documentElement:document.body;return BC.Browser.IE?a.clientWidth:window.innerWidth},WindowH:function(){var a=document.compatMode=="CSS1Compat"?document.documentElement:document.body;return BC.Browser.IE?a.clientHeight:window.innerHeight},_ScrollBody:function(){return BC.Browser.CH||BC.Browser.SF||BC.Browser.IE?document.body:document.documentElement},ScrollW:function(){return BC.Common._ScrollBody().scrollWidth},
ScrollH:function(){return BC.Common._ScrollBody().scrollHeight},ScrollX:function(){return BC.Common._ScrollBody().scrollLeft},ScrollY:function(){return BC.Common._ScrollBody().scrollTop},DocumentW:function(){return document.body.offsetWidth},DocumentH:function(){return document.body.offsetHeight},TmpScrollTop:0,PasswordTypeSet:function(a){$(a+"Show").checked?$(a).type="text":$(a).type="password"},StringContainWord:function(a,b){if(b.length==0)return!0;for(var c=0,d=0,e=!1;!e&&(c=a.indexOf(b,d))!=
-1;)e=c==0&&(a.length==b.length||a[b.length]==" ")||c>0&&a[c-1]==" "&&(a[c+b.length]==" "||a.length==c+b.length)?!0:!1,d=c+1;return e},StringAppendWord:function(a,b){BC.Common.StringContainWord(a,b)||(a+=(a.length>0?" ":"")+b);return a},StringRemoveWord:function(a,b){if(b.length==0||a.length==0)return a;for(var c=0,d=0,e=0,f=!1;!f&&(c=a.indexOf(b,e))!=-1;)f=c==0&&(a.length==b.length||a[b.length]==" ")||c>0&&a[c-1]==" "&&(a[c+b.length]==" "||a.length==c+b.length)?!0:!1,e=c+1,d=c;c=d+b.length;e="";
return e=d==0?c<a.length?a.substring(c+1,a.length):a.substring(c,a.length):c==a.length?a.substring(0,d-1):a.substring(0,d-1)+a.substring(c,a.length)},Base64:{_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a){for(var b="",c,d,e,f,g,h,l=0,a=BC.Common.Base64._utf8_encode(a);l<a.length;)c=a.charCodeAt(l++),d=a.charCodeAt(l++),e=a.charCodeAt(l++),f=c>>2,c=(c&3)<<4|d>>4,g=(d&15)<<2|e>>6,h=e&63,isNaN(d)?g=h=64:isNaN(e)&&(h=64),b=b+BC.Common.Base64._keyStr.charAt(f)+
BC.Common.Base64._keyStr.charAt(c)+BC.Common.Base64._keyStr.charAt(g)+BC.Common.Base64._keyStr.charAt(h);return b},decode:function(a){alert("sadasda");for(var b="",c,d,e,f,g,h=0,a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");h<a.length;)c=BC.Common.Base64._keyStr.indexOf(a.charAt(h++)),d=BC.Common.Base64._keyStr.indexOf(a.charAt(h++)),f=BC.Common.Base64._keyStr.indexOf(a.charAt(h++)),g=BC.Common.Base64._keyStr.indexOf(a.charAt(h++)),c=c<<2|d>>4,d=(d&15)<<4|f>>2,e=(f&3)<<6|g,b+=String.fromCharCode(c),f!=64&&
(b+=String.fromCharCode(d)),g!=64&&(b+=String.fromCharCode(e));return b=BC.Common.Base64._utf8_decode(b)},_utf8_encode:function(a){for(var a=a.replace(/\r\n/g,"\n"),b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);d<128?b+=String.fromCharCode(d):(d>127&&d<2048?b+=String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){for(var b="",c=0,d=c1=c2=0;c<a.length;)d=a.charCodeAt(c),d<128?(b+=String.fromCharCode(d),
c++):d>191&&d<224?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b}},FlashEnable:!1,DetectFlash:function(){function a(a){a=a.match(/[\d]+/g);a.length=3;return a.join(".")}var b=!1;if(navigator.plugins&&navigator.plugins.length){var c=navigator.plugins["Shockwave Flash"];c&&(b=!0,c.description&&a(c.description));navigator.plugins["Shockwave Flash 2.0"]&&(b=!0)}else navigator.mimeTypes&&
navigator.mimeTypes.length?(b=(c=navigator.mimeTypes["application/x-shockwave-flash"])&&c.enabledPlugin)&&a(c.enabledPlugin.description):b=!1;try{var d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"),b=!0;a(d.GetVariable("$version"))}catch(e){try{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"),b=!0}catch(f){try{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),b=!0,a(d.GetVariable("$version"))}catch(g){}}}b?BC.Common.setCookie("has_flash","1",365):BC.Window.Display("NoFlash")},setCookie:function(a,
b,c){var d=new Date;d.setDate(d.getDate()+c);document.cookie=a+"="+escape(b)+(c==null?"":";expires="+d.toUTCString())},getCookie:function(a){if(document.cookie.length>0&&(c_start=document.cookie.indexOf(a+"="),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""},OS:function(){this.Mac=this.Win=this.Linux=!1;this.os_name=navigator.platform;if(this.os_name.indexOf("Lin")!=
-1)this.Linux=!0;else if(this.os_name.indexOf("Win")!=-1)this.Win=!0;else if(this.os_name.indexOf("Mac")!=-1)this.Mac=!0},ComboBox:{nTop:0,nLeft:0,setComboBox:function(a){$$("select.comboBox").each(function(b){positions=Element.positionedOffset(b);BC.Common.ComboBox.nTop=positions[1];BC.Common.ComboBox.nLeft=positions[0];if(a==!0)BC.Common.ComboBox.initTextField(b);else if(b=$("txt"+b.name.replace("select_","")),b!=void 0&&(Prototype.Browser.IE||Prototype.Browser.Opera))b.style.top=BC.Common.ComboBox.nTop+
1+"px",b.style.left="1px"})},initTextField:function(a){var b=a.offsetWidth,c=new BC.Common.OS,d=document.createElement("input");d.id="txt"+a.name;d.name=a.name;a.name="select_"+a.name;d.className="comboText";d.value="";var e;if(Prototype.Browser.WebKit)e=18,d.addClassName("webkit_comboText"),d.style.top=BC.Common.ComboBox.nTop+"px",d.style.left=BC.Common.ComboBox.nLeft+"px";else if(Prototype.Browser.Opera){e=27;d.addClassName("opera_comboText");if(c.Win)e=20,d.style.border="none",d.style.height="17px";
if(c.Mac)e=25,d.style.height="10px"}else if(Prototype.Browser.IE)e=20,d.className+=" IE_comboText",d.style.top=BC.Common.ComboBox.nTop+1+"px";else{e=27;d.style.top=BC.Common.ComboBox.nTop+"px";d.style.left=BC.Common.ComboBox.nLeft+"px";if(c.Win)d.style.border="none",d.style.height="15px",d.style.top=BC.Common.ComboBox.nTop+1+"px",d.style.left=BC.Common.ComboBox.nLeft+1+"px";if(c.Mac)e=19,d.style.border="none",d.style.height="14px",d.style.top=BC.Common.ComboBox.nTop+1+"px",d.style.left=BC.Common.ComboBox.nLeft+
1+"px"}if(b>e)d.style.width=b-e+"px";a.parentNode.appendChild(d);var f=a.onchange;d.onkeyup=f;a.onchange=function(){var a=$("txt"+this.name.replace("select_",""));a.value=this.options[this.selectedIndex].value;typeof f==="function"&&f();a.focus()};a.onfocus=function(){$("txt"+this.name.replace("select_","")).style.color="#333"};d.onfocus=function(){this.style.color="#333"}}}};
BC.Blog={Add:function(){BC.Window.Create("Blog");$("BlogWinInput_name").value="";$("BlogWinInput_description").value="";$("WindowTitleBlog").innerHTML=BC.Lang.Blog.FormWinTitleAdd;$("BlogWin").action="/section/add/";BC.Blog._Form()},Edit:function(a){BC.Window.Create("Blog");$("BlogWinInput_name").value=$("BlogName_"+a).innerHTML;$("BlogWinInput_tags").value=$("BlogTags_"+a).innerHTML;$("BlogWinInput_description").value=$("BlogDescription_"+a).innerHTML;$("WindowTitleBlog").innerHTML=BC.Lang.Blog.FormWinTitleEdit;
$("BlogWin").action="/section/"+a+"/edit/";BC.Blog._Form(a)},_Form:function(){$("BlogWinCaption_name").innerHTML=BC.Lang.Blog.FormWinCaptionDefault_name;$("BlogWinCaption_name").className="caption like-window-caption";$("BlogWinCaption_tags").innerHTML=BC.Lang.Blog.FormWinCaptionDefault_tags;$("BlogWinCaption_tags").className="caption like-window-caption";$("BlogWinCaption_description").innerHTML=BC.Lang.Blog.FormWinCaptionDefault_description;$("BlogWinCaption_description").className="caption like-window-caption";
BC.Window.Open("Blog")},Save:function(a){var b="name="+BC.Common.Escape(a.name.value)+"&tags="+BC.Common.Escape(a.tags.value)+"&description="+BC.Common.Escape(a.description.value)+"&formName="+BC.Common.Escape(a.formName.value)+"&ajax=ajax";new Ajax.Request(a.action,{method:"post",postBody:b,onSuccess:BC.Blog.SaveResult});BC.Window.Open("Processing");BC.Window.Close("Blog")},SaveResult:function(a){var a=a.responseText,a=a.split("|"),b=a[1];if(a[0]=="ok"){if(BC.Window.SetOk(a[2]),b){var c=a[3];$("BlogName_"+
b).innerHTML=$("BlogWinInput_name").value;$("BlogDescription_"+b).innerHTML=$("BlogWinInput_description").value;$("BlogTags_"+b).innerHTML=$("BlogWinInput_tags").value;$("Tags_s"+b).innerHTML=a[4];if($("MenuSection_"+b))$("MenuSection_"+b).innerHTML=$("BlogWinInput_name").value;if(b!=c){$("BlogActionLock_"+b)&&($("BlogActionLock_"+b).setAttribute("onclick","BC.Blog.Lock('"+c+"');"),$("BlogActionUnlock_"+b).setAttribute("onclick","BC.Blog.Unlock('"+c+"');"));$("BlogActionDeactivate_"+b)&&($("BlogActionDeactivate_"+
b).setAttribute("onclick","BC.Blog.Deactivate('"+c+"');"),$("BlogActionActivate_"+b).setAttribute("onclick","BC.Blog.Activate('"+c+"');"));$("BlogActionEdit_"+b).setAttribute("onclick","BC.Blog.Edit('"+c+"');");$("BlogActionAddModer_"+b).setAttribute("onclick","BC.Blog.AddModer('"+c+"');");$("BlogActionAddSpec_"+b).setAttribute("onclick","BC.Blog.AddSpec('"+c+"');");$("BlogName_"+b).href="/statyi/"+c+"/";$("BlogBlock_"+b).id="BlogBlock_"+c;$("BlogName_"+b).id="BlogName_"+c;$("BlogDescription_"+b).id=
"BlogDescription_"+c;$("BlogTags_"+b).id="BlogTags_"+c;$("Tags_s"+b).id="Tags_s"+c;$("BlogAdminTitle_"+b).id="BlogAdminTitle_"+c;$("BlogAdminList_"+b).id="BlogAdminList_"+c;$("BlogSpecTitle_"+b).id="BlogSpecTitle_"+c;$("BlogSpecList_"+b).id="BlogSpecList_"+c;if($("BlogActionLock_"+b))$("BlogActionLock_"+b).id="BlogActionLock_"+c,$("BlogActionUnlock_"+b).id="BlogActionUnlock_"+c;if($("BlogActionDeactivate_"+b))$("BlogActionDeactivate_"+b).id="BlogActionDeactivate_"+c,$("BlogActionActivate_"+b).id=
"BlogActionActivate_"+c;$("BlogActionEdit_"+b).id="BlogActionEdit_"+c;$("BlogActionAddModer_"+b).id="BlogActionAddModer_"+c;$("BlogActionAddSpec_"+b).id="BlogActionAddSpec_"+c;if($("MenuSection_"+b))$("MenuSection_"+b).href="/statyi/"+c+"/",$("MenuSection_"+b).id="MenuSection_"+c}}}else{BC.Window.SetError(a[2],"Blog");for(b=3;b<a.length;b++){var c=a[b].split("*x*"),d=$("BlogWinCaption_"+c[0]);if(d)c[2]?(d.innerHTML=c[2],d.className="caption like-window-caption error"):(eval("var varCaption=BC.Lang.Blog.FormWinCaptionDefault_"+
c[0]),d.innerHTML=varCaption,d.className="caption like-window-caption")}}BC.Window.Close("Processing")},AddModer:function(a){BC.Window.Create("BlogBoss");$("WindowTitleBlogBoss").innerHTML=BC.Lang.Blog.BossWinTitleModer;$("BlogBossWin").action="/section/"+a+"/addmoder/";BC.Blog._BossAdd(a)},AddSpec:function(a){BC.Window.Create("BlogBoss");$("WindowTitleBlogBoss").innerHTML=BC.Lang.Blog.BossWinTitleSpec;$("BlogBossWin").action="/section/"+a+"/addspec/";BC.Blog._BossAdd(a)},_BossAdd:function(){$("BlogBossWinCaption_login").innerHTML=
BC.Lang.Blog.BossWinCaptionDefault_login;$("BlogBossWinCaption_login").className="caption like-window-caption";$("BlogBossWinInput_login").value="";BC.Window.Open("BlogBoss")},BossSave:function(a){var b="login="+BC.Common.Escape(a.login.value)+"&formName="+BC.Common.Escape(a.formName.value)+"&ajax=ajax";new Ajax.Request(a.action,{method:"post",postBody:b,onSuccess:BC.Blog.BossSaveResult});BC.Window.Open("Processing");BC.Window.Close("BlogBoss")},BossSaveResult:function(a){var a=a.responseText,a=a.split("|"),
b=a[1];if(a[0]=="ok"){BC.Window.SetOk(a[2]);var c=$("Blog"+a[3]+"Title_"+b).style.display=$("Blog"+a[3]+"List_"+b).style.display="";switch(a[3]){case "Spec":c="spec";break;case "Admin":c="admin"}$("Blog"+a[3]+"List_"+b).childNodes.length>0&&($("Blog"+a[3]+"List_"+b).innerHTML+=", ");$("Blog"+a[3]+"List_"+b).innerHTML+='<a href="/user/'+a[4]+'/" class="'+c+'">'+a[4]+"</a>"}else{BC.Window.SetError(a[2],"BlogBoss");for(b=3;b<a.length;b++){var c=a[b].split("*x*"),d=$("BlogBossWinCaption_"+c[0]);if(d)c[2]?
(d.innerHTML=c[2],d.className="caption like-window-caption error"):(eval("var varCaption=BC.Lang.Blog.BossWinCaptionDefault_"+c[0]+";"),d.innerHTML=varCaption,d.className="caption like-window-caption")}}BC.Window.Close("Processing")},Lock:function(a){BC.Blog._Status(a,"lock")},Unlock:function(a){BC.Blog._Status(a,"unlock")},Deactivate:function(a){BC.Blog._Status(a,"deactivate")},Activate:function(a){BC.Blog._Status(a,"activate")},_Status:function(a,b){BC.Window.Create("BlogStatus");eval("var varTitle=BC.Lang.Blog.StatusWinTitle_"+
b+";var varText=BC.Lang.Blog.StatusWinText_"+b+";");$("WindowTitleBlogStatus").innerHTML=varTitle;$("BlogStatusText").innerHTML=varText.replace(/#SECTION_TITLE#/,$("BlogName_"+a).innerHTML);$("BlogStatusWin").action="/section/"+a+"/"+b+"/";BC.Window.Open("BlogStatus")},StatusSave:function(a){var b="formName="+BC.Common.Escape(a.formName.value)+"&ajax=ajax";new Ajax.Request(a.action,{method:"post",postBody:b,onSuccess:BC.Blog.StatusSaveResult});BC.Window.Open("Processing");BC.Window.Close("BlogStatus")},
StatusSaveResult:function(a){var a=a.responseText,a=a.split("|"),b=a[1];if(a[0]=="ok")switch(BC.Window.SetOk(a[2]),a[3]){case "unlocked":$("BlogBlock_"+b).className=BC.Common.StringRemoveWord($("BlogBlock_"+b).className,"article-locked");$("BlogActionLock_"+b).style.display="";$("BlogActionUnlock_"+b).style.display="none";break;case "locked":$("BlogBlock_"+b).className=BC.Common.StringAppendWord($("BlogBlock_"+b).className,"article-locked");$("BlogActionLock_"+b).style.display="none";$("BlogActionUnlock_"+
b).style.display="";break;case "deactivated":a=$("BlogBlock_"+b),a.parentNode.removeChild(a)}else BC.Window.SetError(a[2],"BlogStatus");BC.Window.Close("Processing")},nl:""};
BC.Topic={CurentTopic:0,ArticlePage:!1,IsArticlePage:function(){BC.Topic.ArticlePage=!0},SameTopicHeight:function(){var a=$("SameBlock");if(a){$("c")&&$("c");var b=a.parentNode.parentNode.offsetHeight,c=$("SameArticles"),d=$("SameQuestions");if(c&&b>0&&c.offsetHeight>b)try{for(;c.offsetHeight>b;)c.removeChild(c.lastChild)}catch(e){}if(d&&b>0&&d.offsetHeight>b)try{for(;d.offsetHeight>b;)d.removeChild(d.lastChild)}catch(f){}if(c.innerHTML&&d.innerHTML)d.style.display="none";a.style.height="";a.style.overflow=
"";a.parentNode.style.visibility=""}},Preview:{WinId:null,Open:function(){BC.Topic.Preview.WinId=window.open("/preview/","preview")},Set:function(){var a=$("TopicForm").TopicTitle.value,b=FCKeditorAPI.__Instances.text.GetData(),c=$("TopicForm").preview.value,d=$("TopicForm").TopicId;new Ajax.Request("/article/preview/",{method:"post",postBody:"ajax=ajax"+(d?"&id="+d.value:"")+"&text="+BC.Common.Escape(b)+"&title="+BC.Common.Escape(a)+"&preview="+BC.Common.Escape(c),onSuccess:function(a){BC.Topic.Preview.WinId.document.getElementById("container").innerHTML=
a.responseText}})}},Submit:function(a){if(BC.Browser.IE)a.text.value=FCKeditorAPI.__Instances.text.GetData()},PreviewLoad:function(a){$("TopicPreviewWin")==void 0&&BC.Window.Create("TopicPreview");$("TopicPreviewWinCaption_newfile").innerHTML=BC.Lang.Topic.PreviewWinCaptionDefault_newfile;$("TopicPreviewWinCaption_newfile").className="caption like-window-caption";a||BC.Window.Open("TopicPreview")},PreviewSet:function(a,b,c){a?(a=$("TopicPreviewWinInput_newfile").value,a=a.split("\\").pop(),$("TopicPreviewFileOriginal").value=
a,$("TopicPreviewOriginalName").innerHTML='<a href="'+BC.Var.StaticHost+b+'" target="_blank">'+a+"</a>",$("TopicPreviewOriginalName").style.display="",$("TopicPreviewLoadLink").innerHTML="\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435",BC.Window.Close("TopicPreview"),$("TopicPreviewFile").value=b,$("TopicPreviewWin").reset()):($("TopicPreviewFile").value=b,$("TopicPreviewWinCaption_newfile").innerHTML=
c,$("TopicPreviewWinCaption_newfile").className="caption like-window-caption error")},AttachLoad:function(a){$("TopicAttachWin")==void 0&&BC.Window.Create("TopicAttach");$("TopicAttachWinCaption_userfile").innerHTML=BC.Lang.Topic.AttachWinCaptionDefault_userfile;$("TopicAttachWinCaption_userfile").className="caption like-window-caption";a||BC.Window.Open("TopicAttach")},AttachSet:function(a,b,c,d){a?(a=$("TopicAttachWinInput_userfile").value,a=a.split("\\"),a instanceof Array&&(a.reverse(),a=a[0]),
d=document.createElement("p"),d.className="caption",d.id="TopicAttachRow_"+b,d.innerHTML='<a href="'+c+'" target="_blank">'+a+'</a>&nbsp;&nbsp; <span class="pv_link" onclick="BC.Topic.AttachDelete('+b+');">\u0443\u0434\u0430\u043b\u0438\u0442\u044c</span>',$("TopicForm").insertBefore(d,$("TopicAttach")),c=document.createElement("input"),c.type="hidden",c.value=1,c.id="TopicAttach_"+b,c.name="attach_"+b,$("TopicForm").appendChild(c),BC.Window.Close("TopicAttach"),$("TopicAttachWin").reset()):($("TopicAttachWinCaption_userfile").innerHTML=
d,$("TopicAttachWinCaption_userfile").className="caption like-window-caption error")},AttachDelete:function(a){var b=$("TopicAttach_"+a);b&&b.parentNode.removeChild(b);(a=$("TopicAttachRow_"+a))&&a.parentNode.removeChild(a)},AnnotationShow:function(a){$("ArticleAnnotation_"+a).style.display="";$("ArticleAnnotationShow_"+a).style.display="none";$("ArticleAnnotationHide_"+a).style.display="";if($("ArticleAddInfo_"+a))$("ArticleAddInfo_"+a).style.display="";if($("ArticleAuthorTime_"+a))$("ArticleAuthorTime_"+
a).style.display=""},AnnotationHide:function(a){$("ArticleAnnotation_"+a).style.display="none";$("ArticleAnnotationHide_"+a).style.display="none";$("ArticleAnnotationShow_"+a).style.display="";if($("ArticleAddInfo_"+a))$("ArticleAddInfo_"+a).style.display="none";if($("ArticleAuthorTime_"+a))$("ArticleAuthorTime_"+a).style.display="none"},SameTopicShow:function(a){switch(a){case "Articles":$("SameQuestionsLink").className="";$("SameArticlesLink").className="active";$("SameQuestions").style.display=
"none";$("SameArticles").style.display="";break;case "Questions":$("SameArticlesLink").className="",$("SameQuestionsLink").className="active",$("SameArticles").style.display="none",$("SameQuestions").style.display=""}},TagsShowAll:function(a){$("Tags_"+a).className="tags tags-all"},TagsShowShort:function(a){$("Tags_"+a).className="tags tags-short"},Tags:{WordStart:0,SelectedId:0,MaxCount:10,MyList:[],ScrollTop:0,DropListKey:"DTagsEx",FindFieldKey:"FindField",Find:function(a){var b=$(BC.Topic.Tags.DropListKey),
c=$(BC.Topic.Tags.FindFieldKey);if(!a)a=window.event;a=a.keyCode;if(a==23||a==27||a==37||a==38||a==39||a==40&&b.style.display!="none")return!1;if(BC.Browser.IE){a=c.createTextRange();selection=a.duplicate();var a=document.selection.createRange(),d=document.body.createTextRange();d.moveToElementText(c);var e;for(e=0;d.compareEndPoints("StartToStart",a)<0;e++)d.moveStart("character",1);a=e}else a=c.selectionStart;c=c.value;e=d=0;BC.Topic.Tags.WordStart=0;for(var f=!0;f&&c.indexOf(",",e)!=-1;)e=c.indexOf(",",
e)+1,e<=a?(d++,BC.Topic.Tags.WordStart=e):f=!1;c=c.split(",")[d].replace(/^\s+/,"").replace(/\s+$/,"");BC.Topic.Tags.MyList=[];for(i=0;i<allTags.length;i++)allTags[i].indexOf(c)==0&&c.length!=0&&BC.Topic.Tags.MyList.push(allTags[i]);BC.Topic.Tags.SelectedId=0;if(BC.Topic.Tags.MyList.length>0){innerH="";for(i=0;i<BC.Topic.Tags.MyList.length;i++)innerH+='<div id="tg_'+(i+1)+'" onmouseover="this.className=\'sel\'" onmouseout="this.className=\'\'" onclick="BC.Topic.Tags.Insert('+(i+1)+')">'+BC.Topic.Tags.MyList[i]+
"</div>";b.innerHTML=innerH;b.style.visibility="hidden";b.style.display="";c=b.firstChild.offsetHeight;BC.Topic.Tags.MyList.length>BC.Topic.Tags.MaxCount?(b.className="tags_ex scroll",b.style.height=c*BC.Topic.Tags.MaxCount+"px"):(b.className="tags_ex",b.style.height="");b.style.visibility=""}else b.innerHTML="",b.style.display="none";return!0},TestEvent:function(a,b){var c=$(BC.Topic.Tags.DropListKey);$(BC.Topic.Tags.FindFieldKey);if(!a)a=window.event;var d;switch(a.keyCode){case 27:return c.style.display=
"none",!1;case 37:return c.style.display="none",!0;case 39:return c.style.display="none",!0;case 38:if(BC.Topic.Tags.SelectedId>0){d=c.getElementsByTagName("div");var e=d[0].offsetHeight;d[BC.Topic.Tags.SelectedId-1].className="";BC.Topic.Tags.SelectedId--;if(BC.Topic.Tags.SelectedId>0)d[BC.Topic.Tags.SelectedId-1].className="sel";if(BC.Topic.Tags.SelectedId<=BC.Topic.Tags.ScrollTop)BC.Topic.Tags.ScrollTop--,c.scrollTop=e*BC.Topic.Tags.ScrollTop}return!1;case 40:if(BC.Topic.Tags.SelectedId<BC.Topic.Tags.MyList.length){d=
c.getElementsByTagName("div");e=d[0].offsetHeight;if(BC.Topic.Tags.SelectedId>0)d[BC.Topic.Tags.SelectedId-1].className="";BC.Topic.Tags.SelectedId++;d[BC.Topic.Tags.SelectedId-1].className="sel";if(BC.Topic.Tags.SelectedId>BC.Topic.Tags.MaxCount+BC.Topic.Tags.ScrollTop)BC.Topic.Tags.ScrollTop++,c.scrollTop=e*BC.Topic.Tags.ScrollTop}return!1;case 13:return BC.Topic.Tags.SelectedId>0?b&&b=="term"?(real_id=$("tg_id_"+BC.Topic.Tags.SelectedId).innerHTML,ShowTerm(BC.Topic.Tags.SelectedId,real_id)):BC.Topic.Tags.Insert(BC.Topic.Tags.SelectedId):
b&&b=="term"&&insert_all_found_terms(),!1}},Insert:function(a){var b=$(BC.Topic.Tags.DropListKey),c=$(BC.Topic.Tags.FindFieldKey),a=$("tg_"+a).innerHTML,d=c.value,e=d.indexOf(",",BC.Topic.Tags.WordStart),f=d.substr(0,BC.Topic.Tags.WordStart);f+=(f?" ":"")+a+", ";e!=-1&&(f+=d.substr(e));c.value=f;b.style.display="none"}},Vote:function(a,b){var c="/article/"+a+"/";if(b>0)c+="plus/";else if(b<0)c+="minus/";else return;new Ajax.Request(c,{method:"post",postBody:"ajax=ajax",onSuccess:BC.Topic.VoteResult});
BC.Window.Open("Processing")},VoteResult:function(a){var a=a.responseText,a=a.split("|"),b=a[1];if(a[0]=="ok")switch(BC.Window.SetOk(a[2]),$("TopicRateTextRate_"+b).innerHTML=$("TopicRate_"+b).innerHTML=a[3],$("TopicRateTextRate_"+b).className=$("TopicRate_"+b).className=a[3]>=0?"green":"red",$("TopicRateTextVotes_"+b).innerHTML=a[5],$("TopicRateTextViews_"+b).innerHTML=a[6],a[4]){case "plus":$("TopicRatePlus_"+b).firstChild.setAttribute("onclick","");$("TopicRatePlus_"+b).firstChild.className="";
a=$("TopicRateMinus_"+b);a.parentNode.removeChild(a);break;case "minus":$("TopicRateMinus_"+b).firstChild.setAttribute("onclick",""),$("TopicRateMinus_"+b).firstChild.className="",a=$("TopicRatePlus_"+b),a.parentNode.removeChild(a)}else BC.Window.SetError(a[2]);BC.Window.Close("Processing")},Lock:function(a,b){BC.Topic._Status(a,b,"lock")},Unlock:function(a,b){BC.Topic._Status(a,b,"unlock")},Deactivate:function(a,b){BC.Topic._Status(a,b,"deactivate")},Destroy:function(a,b){BC.Topic._Status(a,b,"destroy")},
Activate:function(a,b){BC.Topic._Status(a,b,"activate")},Noapprove:function(a,b){BC.Topic._Status(a,b,"noapprove")},Approve:function(a,b){BC.Topic._Status(a,b,"approve")},_Status:function(a,b,c){BC.Window.Create("TopicStatus");eval("var varTitle=BC.Lang.Topic.StatusWinTitle_"+c+"_"+b+";var varText=BC.Lang.Topic.StatusWinText_"+c+"_"+b+";");$("WindowTitleTopicStatus").innerHTML=varTitle;$("TopicStatusText").innerHTML=varText.replace(/#TOPIC_TITLE#/,$("TopicTitle_"+a).innerHTML);$("TopicStatusWin").action=
"/article/"+a+"/"+c+"/";BC.Window.Open("TopicStatus")},StatusSave:function(a){var b="formName="+BC.Common.Escape(a.formName.value)+"&ajax=ajax";new Ajax.Request(a.action,{method:"post",postBody:b,onSuccess:BC.Topic.StatusSaveResult});BC.Window.Open("Processing");BC.Window.Close("TopicStatus")},StatusSaveResult:function(a){var a=a.responseText,a=a.split("|"),b=a[1];if(a[0]=="ok")switch(BC.Window.SetOk(a[2]),a[3]){case "unlocked":$("TopicBlock_"+b).className=BC.Common.StringRemoveWord($("TopicBlock_"+
b).className,"article-locked");$("TopicActionLock_"+b).style.display="";$("TopicActionUnlock_"+b).style.display="none";break;case "locked":$("TopicBlock_"+b).className=BC.Common.StringAppendWord($("TopicBlock_"+b).className,"article-locked");$("TopicActionLock_"+b).style.display="none";$("TopicActionUnlock_"+b).style.display="";break;case "deactivated":if(BC.Var.ArticlePage){if($("TopicActionActivate_"+b).style.display="",$("TopicActionAward_"+b).style.display=$("TopicActionDeactivate_"+b).style.display=
$("TopicActionLock_"+b).style.display=$("TopicActionUnlock_"+b).style.display=$("TopicActionNoapprove_"+b).style.display="none",$("TopicActionEdit_"+b))$("TopicActionEdit_"+b).style.display="none"}else a=$("TopicBlock_"+b),a.parentNode.removeChild(a);break;case "activated":if(BC.Var.ArticlePage){if($("TopicActionUnlock_"+b).style.display=$("TopicActionActivate_"+b).style.display="none",$("TopicActionAward_"+b).style.display=$("TopicActionDeactivate_"+b).style.display=$("TopicActionLock_"+b).style.display=
"",$("TopicActionNoapprove_"+b).style.display="",$("TopicActionEdit_"+b))$("TopicActionEdit_"+b).style.display=""}else a=$("TopicBlock_"+b),a.parentNode.removeChild(a);break;case "noapproved":if(!BC.Var.ArticlePage)$("TopicActionNoapprove_"+b).style.display="none",a=$("TopicBlock_"+b),a.parentNode.removeChild(a);break;case "approved":if(!BC.Var.ArticlePage)$("TopicActionNoapprove_"+b).style.display="none",a=$("TopicBlock_"+b),a.parentNode.removeChild(a);break;case "destroed":BC.Var.ArticlePage?$("WindowMessageBtnClose").setAttribute("onclick",
"window.location='/'"):(a=$("TopicBlock_"+b),a.parentNode.removeChild(a))}else BC.Window.SetError(a[2],"TopicStatus");BC.Window.Close("Processing")},History:function(a){BC.Window.Create("TopicHistory");new Ajax.Request("/article/"+a+"/history/",{method:"post",postBody:"ajax=ajax",onSuccess:BC.Topic.HistoryShow});$("HistoryListError").style.display="none";$("TopicHistoryGoBtn").style.display="none";BC.Window.Open("Processing")},HistoryShow:function(a){var a=a.responseText,a=a.split("|"),b=a[1];if(a[0]==
"ok"){if(a[3]=="1")$("TopicHistoryGoBtn").style.display="";$("HistoryList").innerHTML=a[4];$("TopicHistoryWin").topic_id.value=b;BC.Window.Open("TopicHistory")}else BC.Window.SetError(a[2]);BC.Window.Close("Processing")},HistoryRevert:function(a){var b=a.history_version,c=0,d=null;if(Number(b.length)){for(;b[c]&&!b[c].checked;)c++;d=b[c]}else d=b;d?($("HistoryListError").style.display="none",b=d.value,a=a.topic_id.value,BC.Window.Open("Processing"),BC.Window.Close("TopicHistory"),window.location=
"/article/"+a+"/revision/"+b+"/"):($("HistoryListError").innerHTML=BC.Lang.Topic.RevisionNotSelect,$("HistoryListError").style.display="")},nl:"",title:"",showAuthorField:function(){var a=$("another_author"),b=BC.Var.CurrentCommentId?$("form"+BC.Var.CurrentCommentId):!1;a.checked==!0?(new Effect.BlindDown("author_block"),b&&(a=b.offsetHeight+68,new Effect.Morph("form"+BC.Var.CurrentCommentId,{style:"height:"+a+"px"}))):(new Effect.BlindUp("author_block"),b&&(a=b.offsetHeight-68,new Effect.Morph("form"+
BC.Var.CurrentCommentId,{style:"height:"+a+"px"})))},Gallery:{image_object:{},Display:function(a,b){var c=BC.Topic.Gallery.WinResize(a.height,a.width);BC.Window.Display("ImageGallery",{imageSrc:a.src,imgWidth:c.imageWidth,imgHeight:c.imageHeight,imageObject:BC.Topic.Gallery.image_object,key:b.key,wwidth:c.WinWidth},'<span onclick="BC.Topic.Gallery.NavigatePrev();" >&larr;</span> \u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 <span onclick="BC.Topic.Gallery.NavigateNext();" >&rarr;</span>');
Event.observe(document,"keyup",function(a){switch(a.keyCode){case 37:BC.Topic.Gallery.NavigatePrev();break;case 39:BC.Topic.Gallery.NavigateNext()}})},Open:function(a,b,c){BC.Var.GalleryTempObject=c;BC.Topic.Gallery.image_object=c;BC.Topic.Gallery.GetImageSize(a,BC.Topic.Gallery.Display,{key:b})},GetImageSize:function(a,b,c){var d=new Image;d.onload=function(){b(this,c)};d.src=a},WinResize:function(a,b){var c,d,e,f;d=b<a?580/a:870/b;d<1?(c=Math.round(a*d),d=Math.round(b*d),e=d+79,f=c+236):(e=b+79,
f=a+236,d=b,c=a);e<500&&(e=500);return{imageHeight:c,imageWidth:d,WinHeight:f,WinWidth:e}},_changeImage:function(a){var b=a.height,c=a.width,d=$("WindowImageGallery"),e=BC.Topic.Gallery.WinResize(b,c),b=d.getWidth()-79,c=d.getHeight()-236,f=$("FullImage").getHeight()/100,f=Math.round(e.imageHeight/f);$("FullImage").innerHTML='<div id="temp_div" style="width:'+b+"px; height:"+c+'px "><img src="/fnew/i/process_small.gif"></div>';new Effect.Scale($("temp_div"),f,{scaleX:!1,scaleFromCenter:!0,scaleContent:!1,
duration:0.5});f=d.getWidth()/100;f=Math.round(e.WinWidth/f);new Effect.Scale(d,f,{scaleY:!1,scaleFromCenter:!0,scaleContent:!1,queue:"end",duration:0.5,afterFinish:function(){$("FullImage").innerHTML='<span> <img src="'+a.src+'" width="'+e.imageWidth+'px" height="'+e.imageHeight+'px"></span>'}})},ChangeImage:function(a,b){if(a.className=="selected_image")return!1;$$("span.l_image img").invoke("removeClassName","selected_image");a.className="selected_image";BC.Topic.Gallery.GetImageSize(b,BC.Topic.Gallery._changeImage,
{})},NavigateNext:function(){BC.Topic.Gallery._Navigate("next")},NavigatePrev:function(){BC.Topic.Gallery._Navigate("prev")},_Navigate:function(a){var b=$$("span.l_image img"),c,d;b.each(function(e,f){if(e.hasClassName("selected_image")){if(a=="next"){temp=f+1;var g=temp>b.length-1?0:temp}else temp=f-1,g=temp<0?b.length-1:temp;c=b[g];d=BC.Topic.Gallery.image_object[c.name]}});BC.Topic.Gallery.ChangeImage(c,d.src)}},AttachBlockToogle:function(a){a=$("attach_block_"+a);a.style.display=="none"?a.show():
a.hide()},TagleContentList:function(a){var b=$("content-list");b.style.display!="none"?(a.innerHTML="(\u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c)",b.hide(),a=new Date,a=new Date(a.getFullYear()+1,a.getMonth(),a.getDate()),BC.Common.SetCookie("BCHideContent",1,a,"/")):(a.innerHTML="(\u0441\u043a\u0440\u044b\u0442\u044c)",b.show(),a=new Date,a=new Date(a.getFullYear()-1,a.getMonth(),a.getDate()),BC.Common.SetCookie("BCHideContent",0,a,"/"))},object_offset:0,object2_offset:0,menu_slide_flag:!1,
no_scroll_process:!1,getScrollTop:function(){return Prototype.Browser.WebKit||Prototype.Browser.IE?document.body.scrollTop:document.getElementsByTagName("html")[0].scrollTop},myScroll:function(){if(!BC.Topic.no_scroll_process){var a=BC.Topic.getScrollTop(),b=$("sub-menu"),c=$("same-topic");if(!BC.Topic.object_offset)BC.Topic.object_offset=b.cumulativeOffset();if(!BC.Topic.object2_offset)BC.Topic.object2_offset=c.cumulativeOffset(),BC.Topic.object2_top=c.offsetTop;a=a>BC.Topic.object_offset[1]?!0:
!1;if(!BC.Topic.menu_slide_flag&&a){b.removeClassName("absolute");b.addClassName("fixed");c.addClassName("fixed-it");if(!BC.Browser.IE)$("same-inner").style.top=BC.Topic.object2_offset[1]-BC.Topic.object_offset[1]+5+"px";BC.Topic.menu_slide_flag=!0;$("to_top").addClassName("link");Event.observe("to_top","click",BC.Topic.goToTop)}else if(BC.Topic.menu_slide_flag&&!a){b.removeClassName("fixed");c.removeClassName("fixed-it");if(!BC.Browser.IE)c.style.top="auto";b.addClassName("absolute");BC.Topic.menu_slide_flag=
!1;$("to_top").removeClassName("link");Event.stopObserving("to_top","click")}}},SetFuncs:function(){Event.observe(window,"scroll",BC.Topic.myScroll);BC.Topic.SetAnchoredLinkOnClick();BC.Topic.SetClassToTextAnchor();if(location.hash!=""){var a=location.hash.slice(1);BC.Topic.goToObj(a)}},SetClassToTextAnchor:function(){$$(".text a:not([href])").each(function(a){a.addClassName("anchor")})},SetAnchoredLinkOnClick:function(){var a=$$('a[href*="'+window.location.pathname+'#"]'),b=$$("a[href^=#]"),a=a.concat(b);
a.each(function(a){var b=a.href.split("#")[1];a.onclick=function(){return BC.Topic.goToObj(b)}})},goToTop:function(){BC.Browser.IE7?(BC.Topic.no_scroll_process=!0,$("sub-menu").removeClassName("fixed"),BC.Topic.menu_slide_flag=!1,$("to_top").removeClassName("link"),Event.stopObserving("to_top","click"),window.scrollTo(0,0),BC.Topic.no_scroll_process=!1):Effect.ScrollTo("header-col",{duration:"0.5"})},goToObj:function(a){a=($(a)==void 0?document.getElementsByName(a):$(a)).cumulativeOffset();window.scroll(0,
a.top-44);return!1},switchQuestionConfig:function(a){a={ajax:"ajax",isallowasking:a};BC.Window.Open("Processing");new Ajax.Request("/switchquestionconfig/",{method:"post",parameters:a,onSuccess:BC.Topic.switchQuestionConfigReplay})},switchQuestionConfigReplay:function(a){BC.Window.Close("Processing");a=a.responseText.evalJSON(!0);a.result=="ok"?(BC.Window.SetOk("\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e"),window.location=window.location):BC.Window.SetError(a.error)},newQuestion:function(){BC.Var.NewQuestionRequest=
!0;if(BC.Common.GetCookie("BC_QuestionPays")&&BC.Var.User.role=="guest")BC.Window.SetError(BC.Lang.Topic.ContextQuestAdd_Error);else{var a={ajax:"ajax",url:window.location+""};BC.Window.Open("Processing");new Ajax.Request("/testquestions/",{method:"post",parameters:a,onSuccess:BC.Topic.newQuestionResult})}},newQuestionResult:function(a){a=a.responseText.evalJSON(!0);a.result=="ok"?window.location="/vopros-otvet/new/":a.error?(eval("var varText=BC.Lang.Error."+a.error),BC.Window.SetError(varText)):
parseInt(BC.Var.User.question_time)?BC.Topic.QuestionTimePaySimple(a.currency,a.amounts):BC.Topic.QuestionTimePay(a.currency,a.amounts);BC.Window.Close("Processing")},timeInterval:null,MakeAnsweredNotify:function(a){BC.Window.SetNotify(BC.Lang.Topic.StatusWinText_answered_Question,BC.Lang.Topic.StatusWinTitle_answered_Question,"BC.Topic.MakeAnswered('"+a+"','false')")},MakeUnansweredNotify:function(a){BC.Window.SetNotify(BC.Lang.Topic.StatusWinText_Unanswered_Question,BC.Lang.Topic.StatusWinTitle_Unanswered_Question,
"BC.Topic.MakeAnswered('"+a+"','true')")},MakeAnswered:function(a,b){BC.Window.Close("Notify");BC.Window.Open("Processing");new Ajax.Request("/makeanswered/",{method:"post",parameters:{ajax:"ajax",question_id:a,need_answer:b},onSuccess:BC.Topic.MakeAnsweredReply})},MakeAnsweredReply:function(a){a=a.responseText;a=a.split("|");a[0]=="ok"?(BC.Window.SetOk(BC.Lang.Topic.StatusWinText_Changed_Answer),window.location=window.location):BC.Window.SetError(a[2]);BC.Window.Close("Processing")},QuestionPayWindow:function(){BC.Window.Display("QuestionPay",
"\u041e\u043f\u043b\u0430\u0442\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u0430")},QuestionPayLiqpayForm:function(){BC.Window.Create("QuestionPayLiqpay",null,"Liqpay");$("liqpay_topay").innerHTML=BC.Var.question_cost+" USD";BC.Topic.QuestionLiqpayGetXml(BC.Var.question_cost);BC.Window.Open("QuestionPayLiqpay")},QuestionLiqpayGetXml:function(a){var b=$("QuestionLiqpay_Currency").value;BC.User.xmlForLiqPay("\u041e\u043f\u043b\u0430\u0442\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 www.builderclub.com",
BC.User.Info,"question",a,b)},QuestionLiqpayChangeCurrency:function(){var a=$("QuestionLiqpay_Currency").value,a=BC.Var.Exchange["usd_"+(a=="RUR"?"RUB":a).toLowerCase()],a=Math.roundTo(BC.Var.question_cost*a,2);$("liqpay_topay").innerHTML=a+" "+$("QuestionLiqpay_Currency").value;BC.Topic.QuestionLiqpayGetXml(a)},QuestionPayWebmoneyForm:function(){BC.Window.Display("QuestionPayWebmoney",{purses:BC.Var.Purses,desc:BC.Var.Desc,Donate_x_WMID:BC.Var.Donate_x_WMID,amount:BC.Var.question_cost,user_id:BC.Var.User.id},
"WebMoney")},QuestionPayWMChangeCurrency:function(){switch($("DonateWebmoney_Currency").value.charAt(0)){case "U":var a=BC.Var.Exchange.usd_uah,b="WMU";break;case "Z":a=BC.Var.Exchange.usd_usd;b="WMZ";break;case "E":a=BC.Var.Exchange.usd_eur;b="WME";break;case "R":a=BC.Var.Exchange.usd_rub,b="WMR"}a=Math.roundTo(BC.Var.question_cost*a,2);$("QuestionPay_Amount").value=a;$("webmoney_topay").innerHTML=a+" "+b},smsBillQuestionPopupOpen:function(){window.open("/smsbillquestion/","smsdonate_popup","height=420,left="+
(screen.width-530>>1)+",resizable=yes,scrollbars=yes,top="+(screen.height-420>>1)+",width=530")},QuestionSmsAnswer:function(){window.opener.location="/vopros-otvet/new/";window.close()},QuestionTimePaySimple:function(a,b){BC.Var.QuestionPayForm="QuestionTimePaySimple";!a||!b?(a=BC.Var.UserPayParams.currency,b=BC.Var.UserPayParams.amounts):BC.Var.UserPayParams={currency:a,amounts:b};var c={user_id:BC.Var.User.id,username:BC.Var.User.login,currency:a,amounts:b,wwidth:450};if(BC.Var.QpParamsOpen){c.auto_submit=
!0;if(BC.Var.QpParamsOpen.sub_type)c.sub_type=BC.Var.QpParamsOpen.sub_type;if(BC.Var.QpParamsOpen.pay_type)c.pay_type=BC.Var.QpParamsOpen.pay_type;if(BC.Var.QpParamsOpen.confirmed)c.confirmed=1;setTimeout("BC.Topic.QuestionTimePayAutoSubmit()",100)}BC.Window.Display("QuestionTimePaySimple",c)},QuestionTimePay:function(a,b){BC.Var.QuestionPayForm="QuestionTimePay";!a||!b?(a=BC.Var.UserPayParams.currency,b=BC.Var.UserPayParams.amounts):BC.Var.UserPayParams={currency:a,amounts:b};var c={purses:BC.Var.Purses,
desc:BC.Var.Desc,Donate_x_WMID:BC.Var.Donate_x_WMID,amount:BC.Var.question_cost,user_id:BC.Var.User.id,username:BC.Var.User.login,currency:a,amounts:b,wwidth:760};BC.Window.Close("QuestionTimePaySimple");if(BC.Var.QpParamsOpen){c.auto_submit=!0;if(BC.Var.QpParamsOpen.sub_type)c.sub_type=BC.Var.QpParamsOpen.sub_type;if(BC.Var.QpParamsOpen.pay_type)c.pay_type=BC.Var.QpParamsOpen.pay_type;if(BC.Var.QpParamsOpen.confirmed)c.confirmed=1;setTimeout("BC.Topic.QuestionTimePayAutoSubmit()",100)}BC.Window.Display("QuestionTimePay",
c)},QuestionTimePayAutoSubmit:function(){var a=$(BC.Var.QuestionPayForm);a?BC.Donate.BeforeQuestionPay(a):setTimeout("BC.Topic.QuestionTimePayAutoSubmit()",100)},OpenYaSearch:function(){BC.Window.Close("QuestionTimePay");$("yandexform0").getElementsByTagName("form")[0].text.focus()}};
BC.Window={OpenedList:[],OpenedCount:0,Position:0,Display:function(a,b,c,d){if(BC.Var.ServerLock&&(a=="Auth"||a=="Register"||a=="Forgot"))a="ServerLock";BC.Window.Create(a,b,c,d);BC.Window.Open(a)},Create:function(a,b,c,d){var e=!d?"normal":d,f=BC.Var.StaticHostNew,d=BC.Lang.Tpl.header,g=BC.Lang.Tpl.footer,h=$("Window"+a);h&&h.remove();c||(c=BC.Lang.Tpl_titles[a]);h={browser:Prototype.Browser,backurl:BC.Var.BackUrl,staticHostNew:f,staticHost:BC.Var.StaticHost,mainHost:BC.Var.Host,u_params:!b?void 0:
b};b=b&&b.wwidth?"width: "+b.wwidth+"px;":"";d=d.replace(/#WTYPE#/,e).replace(/#WKEY#/g,a).replace(/#WTITLE#/,c);d=d.replace(/#WWIDTH#/,b);g=g.replace(/#STATIC_HOST_NEW#/,f);a="/fnew/js/templates/"+a+".ejs";EJS.config({cache:!1});a=(new EJS({url:a})).render(h);d=d+a+g;$("main").insert({top:d})},Open:function(a){var b=$("Window"+a);if(b){b.style.visibility="";b.style.zIndex=11E3+BC.Window.Position++;if(b.style.display!="")b.style.display="",BC.Window.OpenedCount++,BC.Window.OpenedList[a]="opened";
BC.Window.SetCenter(a)}$("WindowBg").style.display="block"},Close:function(a){var b=$("Window"+a);if(b&&(b.style.visibility="",b.style.display==""))b.style.display="none",BC.Window.OpenedCount--,BC.Window.OpenedList[a]=null;if(BC.Window.OpenedCount<=0)$("WindowBg").style.display="none"},Hide:function(a){if(a=$("Window"+a))a.style.visibility="hidden"},Unhide:function(a){if(a=$("Window"+a))a.style.visibility=""},OpenImage:function(a,b,c,d){if(!b||!c)return!0;BC.Window.Create("FullImage");var e=$("WindowFullImageImg"),
f=parseInt(b);e.setAttribute("src",a);e.setAttribute("width",b);e.setAttribute("height",c);f=f<300?300:f;$("WindowFullImage").style.width=f+78+"px";a="";if(d.lastChild.tagName=="SPAN"&&d.lastChild.className=="it")a=d.lastChild.innerHTML;$("WindowFullImageCaption").innerHTML=a;$("WindowFullImageCaption").style.display=a=="="?"none":"";BC.Window.Open("FullImage")},SubmitConfirm:function(){var a=$("WindowConfirmBtnGo").getAttribute("onclick");eval(a)},CheckPosition:function(){if(BC.Window.OpenedCount>
0&&BC.Common.TmpScrollTop!=BC.Common.ScrollY())for(var a in BC.Window.OpenedList)BC.Window.OpenedList[a]==="opened"&&BC.Window.SetCenter(a);BC.Common.TmpScrollTop=BC.Common.ScrollY();setTimeout("BC.Window.CheckPosition()",20)},SetCenter:function(a){if((a=$("Window"+a))&&a.style.display==""){var b=BC.Common.WindowW(),c=BC.Common.WindowH(),d=BC.Common.ScrollY(),e=BC.Common.TmpScrollTop<d,b=(b-a.offsetWidth)/2;b<0&&(b=0);a.style.left=b+"px";var f=(c-a.offsetHeight)/2,b=!0;if(f>=0){var g=d+f;g<0&&(g=
0)}else{var h=a.offsetTop,f=h-d,h=d+c-(h+a.offsetHeight);e?h<=0&&f<=0?b=!1:g=h<=0&&f>0?d:d+c-a.offsetHeight:h<=0&&f<=0?b=!1:g=f<=0&&h>0?d+c-a.offsetHeight:d}if(b)a.style.top=g+"px"}},SetOk:function(a){BC.Window.Create("Message",!1,!1,"ok");$("WindowMessageText").innerHTML=a;BC.Window.Open("Message")},SetError:function(a,b){BC.Window.Create("Error",!1,!1,"error");$("WindowErrorText").innerHTML=a;b?(BC.Browser.IE?$("WindowErrorBtnGo").onclick=function(){BC.Window.Close("Error");BC.Window.Open(b)}:$("WindowErrorBtnGo").setAttribute("onclick",
"BC.Window.Close('Error');BC.Window.Open('"+b+"');"),$("WindowErrorBtnGo").style.display=$("WindowErrorBtnCancel").style.display="",$("WindowErrorBtnClose").style.display="none"):($("WindowErrorBtnGo").style.display=$("WindowErrorBtnCancel").style.display="none",$("WindowErrorBtnClose").style.display="");BC.Window.Open("Error")},SetNotify:function(a,b,c,d){BC.Window.Display("Notify",{text:a,onOkey:c==void 0?"":c,onCancel:d==void 0?"":d},b)},SetErrorWithJSBtn:function(a,b){BC.Window.Create("Error",
!1,!1,"error");$("WindowErrorText").innerHTML=a;b?($("WindowErrorBtnGo").setAttribute("onclick","BC.Window.Close('Error');"+b),$("WindowErrorBtnGo").style.display=$("WindowErrorBtnCancel").style.display="",$("WindowErrorBtnClose").style.display="none"):($("WindowErrorBtnGo").style.display=$("WindowErrorBtnCancel").style.display="none",$("WindowErrorBtnClose").style.display="");BC.Window.Open("Error")},GetActiveWindowArray:function(){for(var a=$$("div.window"),b=[],c=0;c<=a.length-1;c++)if(a[c].id!=
"WindowConfirm"&&a[c].id!="WindowProcessing"){var d=a[c].id,d=d.replace("Window","");b.push(d)}return b}};BC.Admin={};function adminPanelOver(a){if($("AdminPanel_"+a).style.display=="none")$("AdminPanelBox_"+a).className="adminpanel adminpanel-hover"}function adminPanelOut(a){if($("AdminPanel_"+a).style.display=="none")$("AdminPanelBox_"+a).className="adminpanel"}function adminPanelSet(a){$("AdminPanel_"+a)&&($("AdminPanel_"+a).style.display==""?adminPanelClose(a):adminPanelOpen(a))}
function adminPanelOpen(a){$("AdminPanel_"+a).style.display=""}function adminPanelClose(a){$("AdminPanel_"+a).style.display="none"}
BC.Tools={ToolPage:!1,IsToolPage:function(){BC.Tools.ToolPage=!0},Lock:function(a,b){BC.Tools._Status(a,b,"lock")},Unlock:function(a,b){BC.Tools._Status(a,b,"unlock")},Deactivate:function(a,b){BC.Tools._Status(a,b,"deactivate")},Activate:function(a,b){BC.Tools._Status(a,b,"activate")},_Status:function(a,b,c){BC.Window.Create("ToolsStatus",!1,"");eval("var varTitle=BC.Lang.Tools.StatusWinTitle_"+c+"_"+b+";var varText=BC.Lang.Tools.StatusWinText_"+c+"_"+b+";");$("WindowTitleToolsStatus").innerHTML=
varTitle;$("ToolsStatusText").innerHTML=varText.replace(/#TOOLS_TITLE#/,$(b+"Title_"+a).innerHTML);$("ToolsStatusWin").action="/tools/"+b.toLowerCase()+"/"+a+"/"+c+"/";BC.Window.Open("ToolsStatus")},StatusSave:function(a){var b="formName="+BC.Common.Escape(a.formName.value)+"&ajax=ajax";new Ajax.Request(a.action,{method:"post",postBody:b,onSuccess:BC.Tools.StatusSaveResult});BC.Window.Open("Processing");BC.Window.Close("ToolsStatus")},StatusSaveResult:function(a){var a=a.responseText,a=a.split("|"),
b=a[1],c=a[2];if(a[0]=="ok")switch(BC.Window.SetOk(a[3]),a[4]){case "unlocked":$(c+"Block_"+b).className=BC.Common.StringRemoveWord($(c+"Block_"+b).className,"article-locked");$(c+"ActionLock_"+b).style.display="";$(c+"ActionUnlock_"+b).style.display="none";break;case "locked":$(c+"Block_"+b).className=BC.Common.StringAppendWord($(c+"Block_"+b).className,"article-locked");$(c+"ActionLock_"+b).style.display="none";$(c+"ActionUnlock_"+b).style.display="";break;case "deactivated":BC.Var.ToolPage||(a=
$(c+"Block_"+b),a.parentNode.removeChild(a));break;case "activated":BC.Var.ToolPage||(a=$(c+"Block_"+b),a.parentNode.removeChild(a))}else BC.Window.SetError(a[3],"ToolsStatus");BC.Window.Close("Processing")},TermDescription:function(a){new Ajax.Request("/tools/term/"+a+"/",{method:"post",postBody:"ajax=ajax",onSuccess:BC.Tools.TermDescriptionSet});BC.Window.Open("Processing")},TermDescriptionSet:function(a){var b=a.responseText,b=b.split("|");b[0]=="ok"?(BC.Window.Create("Termin"),a=b[2],b=b[3],$("WindowTitleTermin").innerHTML=
a,$("WindowTerminText").innerHTML=b,BC.Window.Open("Termin")):BC.Window.SetError(b[2]);BC.Window.Close("Processing")}};
BC.Comment={CurrentReplyId:!1,CurrentEditId:!1,TopicLink:!1,SetTopicKey:function(a){BC.Comment.TopicLink=a},CreateForm:function(a){a=a==void 0?"":a;$("CommentAttaches").innerHTML="";BC.Editor.Destroy("comment_editor");BC.Editor.CreateCommentEditor("comment_editor",a)},Write_err:function(a,b,c,d,e){BC.Var.TmpCommentData=null;if(!(BC.Comment.CurrentReplyId===a&&a!==!1))if(BC.Var.TopicLink===!1)BC.Window.SetError(BC.Lang.Comment.ErrorTextNotLoaded);else{BC.Var.CurrentCommentId=a;typeof c!="undefined"&&
(e?(c="<blockquote>"+("<div>"+d+" <span>\u043d\u0430\u043f\u0438\u0441\u0430\u043b</span>:</div>")+c,c+="</blockquote><p>&nbsp;&nbsp;&nbsp;&nbsp;</p>"):c="");BC.Comment.CreateForm(c);$("CommentAttaches").innerHTML=b;b=$("CommentFormBox");b.style.display="";a!==!1?(b.style.position="absolute",b.style.visibility="hidden",$("form"+a).style.height="620px"):(b.style.position="",b.style.top="",b.style.zIndex="");if(BC.Comment.CurrentEditId!==!1&&$("form"+BC.Comment.CurrentEditId))$("form"+BC.Comment.CurrentEditId).style.height=
"";if(BC.Comment.CurrentReplyId!==!1){if($("CommentReplyLink_"+BC.Comment.CurrentReplyId))$("CommentReplyLink_"+BC.Comment.CurrentReplyId).style.visibility="";if($("form"+BC.Comment.CurrentReplyId))$("form"+BC.Comment.CurrentReplyId).style.height=""}if($("CommentReplyLink_"+a))$("CommentReplyLink_"+a).style.visibility="hidden";a!==!1?(b.style.top=$("form"+a).offsetTop+"px",b.style.zIndex="",b.style.visibility="",$("CommentFormFirst").style.display=""):$("CommentFormFirst").style.display="none";$("CommentTitleEdit").style.display=
"none";$("CommentTitleAdd").style.display="";$("CommentForm").action=BC.Var.TopicLink+"addcomment/";$("CommentForm").go.value=BC.Lang.Comment.ButtonTitleAdd;$("CommentForm").id_comment.value=a!==!1?a:"";window.location.hash="#reply"+(a!==!1?a:"");BC.Comment.CurrentReplyId=a;BC.Comment.CurrentEditId=!1;$("CommentFormBtnCancel").style.display=""}},Write_with_quote:function(a,b){if(BC.Var.QuestionScenario){if(BC.Common.GetCookie("BC_QuestionPays")&&BC.Var.User.role=="guest")return BC.Window.SetError(BC.Lang.Topic.ContextComAdd_Error),
!1;var c=$("CommentText_"+a).innerHTML.replace("\n",""),c=c.replace(/<blockquote>|<\/blockquote>/g,""),c=c.replace(/<div>/g,"<p>").replace(/<\/div>/g,"</p>");BC.Var.TmpCommentData={commentId:a,commentText:c,author:b,reply:!0};c={ajax:"ajax",comment_id:a?a:0,topic_id:BC.Var.TopicId};BC.Window.Open("Processing");new Ajax.Request("/testquestions/",{method:"post",parameters:c,onSuccess:BC.Comment.testWriteResult})}else{if(BC.Var.User.role=="guest")return BC.Window.SetError(BC.Lang.Topic.ContextComAdd_Error),
!1;c=$("CommentText_"+a).innerHTML.replace("\n","");c=c.replace(/<blockquote>|<\/blockquote>/g,"");c=c.replace(/<div>/g,"<p>").replace(/<\/div>/g,"</p>");$("CommentCaptionError").innerHTML="";BC.Comment.Write_err(a,"",c,b,!0)}},Write:function(a){if(BC.Var.QuestionScenario){if(BC.Common.GetCookie("BC_QuestionPays")&&BC.Var.User.role=="guest")return BC.Window.SetError(BC.Lang.Topic.ContextComAdd_Error),!1;BC.Var.TmpCommentData={commentId:a};a={ajax:"ajax",url:window.location+"",comment_id:a?a:0,topic_id:BC.Var.TopicId};
BC.Window.Open("Processing");new Ajax.Request("/testquestions/",{method:"post",parameters:a,onSuccess:BC.Comment.testWriteResult})}else{if(BC.Var.User.role=="guest")return BC.Window.SetError(BC.Lang.Topic.ContextComAdd_Error),!1;$("CommentCaptionError").innerHTML="";BC.Comment.Write_err(a,"","")}},testWriteResult:function(a){a=a.responseText.evalJSON(!0);a.result=="ok"?($("CommentCaptionError").innerHTML="",BC.Var.TmpCommentData.reply?BC.Comment.Write_err(BC.Var.TmpCommentData.commentId,"",BC.Var.TmpCommentData.commentText,
BC.Var.TmpCommentData.author,!0):BC.Comment.Write_err(BC.Var.TmpCommentData.commentId,"","")):a.error?(eval("var varText=BC.Lang.Error."+a.error),BC.Window.SetError(varText)):parseInt(BC.Var.User.question_time)?BC.Topic.QuestionTimePaySimple(a.currency,a.amounts):BC.Topic.QuestionTimePay(a.currency,a.amounts);BC.Window.Close("Processing")},Edit_err:function(a,b,c){if(BC.Comment.CurrentEditId!==a){BC.Var.CurrentCommentId=a;BC.Var.CurCommentId=a;BC.Comment.CreateForm(typeof c!="undefined"?c:"");$("CommentAttaches").innerHTML=
b;b=$("CommentFormBox");b.style.display="";b.style.position="absolute";b.style.visibility="hidden";c=b.offsetHeight+60;$("form"+a).style.height=c+"px";if(BC.Comment.CurrentReplyId!==!1){if($("CommentReplyLink_"+BC.Comment.CurrentReplyId))$("CommentReplyLink_"+BC.Comment.CurrentReplyId).style.visibility="";if($("form"+BC.Comment.CurrentReplyId))$("form"+BC.Comment.CurrentReplyId).style.height=""}if(BC.Comment.CurrentEditId!==!1&&$("form"+BC.Comment.CurrentEditId))$("form"+BC.Comment.CurrentEditId).style.height=
"";b.style.top=$("form"+a).offsetTop+"px";b.style.zIndex="";b.style.visibility="";if($("CommentTitleAdd"))$("CommentTitleAdd").style.display="none",$("CommentTitleEdit").style.display="";$("CommentForm").action="/comment/"+a+"/edit/";$("CommentForm").go.value=BC.Lang.Comment.ButtonTitleEdit;$("CommentForm").id_comment.value=a!==!1?a:"";typeof FCKeditorAPI!="undefined"&&FCKeditorAPI.__Instances.comment.SetData($("CommentForm").comment.value,!0);if($("CommentFormFirst"))window.location.hash="#reply"+
a;BC.Comment.CurrentEditId=a;BC.Comment.CurrentReplyId=!1;$("CommentFormBtnCancel").style.display=""}},Edit:function(a){$("CommentCaptionError").innerHTML="";var b=$("CommentAttaches_"+a).innerHTML;BC.Comment.Edit_err(a,b,$("CommentText_"+a).innerHTML)},Cancel:function(){var a=$("CommentFormBox");$("CommentCaptionError").innerHTML="";a.style.position="";a.style.top="";a.style.zIndex="";a.style.display="none";if($("CommentReplyLink_"+BC.Comment.CurrentReplyId))$("CommentReplyLink_"+BC.Comment.CurrentReplyId).style.visibility=
"";if($("form"+BC.Comment.CurrentReplyId))$("form"+BC.Comment.CurrentReplyId).style.height="";if($("form"+BC.Comment.CurrentEditId))$("form"+BC.Comment.CurrentEditId).style.height="";BC.Comment.CurrentEditId&&$("CommentEdit_"+BC.Comment.CurrentEditId)&&BC.Comment.SetReadyStatus(BC.Comment.CurrentEditId);BC.Comment.CurrentReplyId=!1;BC.Comment.CurrentEditId=!1;if($("CommentTitleAdd"))$("CommentTitleEdit").style.display="none",$("CommentTitleAdd").style.display="";$("CommentForm").action=BC.Var.TopicLink+
"addcomment/";$("CommentForm").go.value=BC.Lang.Comment.ButtonTitleAdd;$("CommentForm").id_comment.value="";$("CommentForm").comment.value="<p></p>";$("MainInnerBlock").style.height="100%";typeof FCKeditorAPI!="undefined"&&FCKeditorAPI.__Instances.comment.SetData("<p></p>",!0);if($("CommentFormFirst"))$("CommentFormFirst").style.display="",window.location.hash="#reply"},Submit:function(a){if(BC.Browser.IE)a.comment.value=FCKeditorAPI.__Instances.comment.GetData();a.comment_attaches.value=$("CommentAttaches").innerHTML},
Deactivate:function(a){BC.Window.Create("CommentStatus",!1,"");$("CommentStatusWinCaption_reason").style.display=$("CommentStatusWinField_reason").style.display="";$("CommentStatusWinInput_reason").value=BC.Lang.Comment.CommentStatusWinValueDefault_reason;$("CommentStatusWinCaption_reason").innerHTML=BC.Lang.Comment.CommentStatusWinCaptionDefault_reason;BC.Comment._Status(a,"deactivate")},Activate:function(a){BC.Window.Create("CommentStatus",!1,"");$("CommentStatusWinCaption_reason").style.display=
$("CommentStatusWinField_reason").style.display="none";$("CommentStatusWinInput_reason").value="";BC.Comment._Status(a,"activate")},Destroy:function(a){BC.Window.Create("CommentStatus",!1,"");$("CommentStatusWinCaption_reason").style.display=$("CommentStatusWinField_reason").style.display="none";$("CommentStatusWinInput_reason").value="";BC.Comment._Status(a,"destroy")},_Status:function(a,b){eval("var varTitle=BC.Lang.Comment.StatusWinTitle_"+b+";var varText=BC.Lang.Comment.StatusWinText_"+b+";");
$("WindowTitleCommentStatus").innerHTML=varTitle;$("CommentStatusText").innerHTML=varText;$("CommentStatusWin").action="/comment/"+a+"/"+b+"/";BC.Window.Open("CommentStatus")},StatusSave:function(a){var b="formName="+BC.Common.Escape(a.formName.value)+"&reason="+BC.Common.Escape(a.reason.value)+"&ajax=ajax";new Ajax.Request(a.action,{method:"post",postBody:b,onSuccess:BC.Comment.StatusSaveResult});BC.Window.Open("Processing");BC.Window.Close("CommentStatus")},StatusSaveResult:function(a){var a=a.responseText,
a=a.split("|"),b=a[1];if(a[0]=="ok")switch(BC.Window.SetOk(a[2]),BC.Window.Close("Processing"),a[3]){case "deactivated":$("c"+b).className=BC.Common.StringAppendWord($("c"+b).className,"comment-deleted");$("CommentActionActivate_"+b).style.display="";$("CommentActionDeactivate_"+b).style.display="none";$("CommentReason_"+b).innerHTML=$("CommentStatusWinInput_reason").value;$("CommentReason_"+b).style.display="";break;case "activated":$("c"+b).className=BC.Common.StringRemoveWord($("c"+b).className,
"comment-deleted");$("CommentActionActivate_"+b).style.display="none";$("CommentActionDeactivate_"+b).style.display="";$("CommentReason_"+b).innerHTML="";$("CommentReason_"+b).style.display="none";break;case "destroed":a[4].split(",").each(function(a){$("c"+a).hide()})}else{BC.Window.SetError(a[2],"CommentStatus");for(b=3;b<a.length;b++){var c=a[b].split("*x*"),d=$("CommentStatusWinCaption_"+c[0]);if(d)c[2]?(d.innerHTML=c[2],d.className="caption like-window-caption error"):(eval("var varCaption=BC.Lang.Comment.CommentStatusWinCaptionDefault_"+
c[0]+";"),d.innerHTML=varCaption,d.className="caption like-window-caption")}}},Vote:function(a){new Ajax.Request("/comment/"+a+"/plus/",{method:"post",postBody:"ajax=ajax",onSuccess:BC.Comment.VoteResult});BC.Window.Open("Processing")},VoteResult:function(a){var a=a.responseText,a=a.split("|"),b=a[1];a[0]=="ok"?(BC.Window.SetOk(a[2]),$("CommentVote_"+b).style.display="none",$("CommentVote_"+b).setAttribute("onclick",""),$("CommentRating_"+b).innerHTML=a[3]):BC.Window.SetError(a[2]);BC.Window.Close("Processing")},
EditTimer:function(a){var b=parseInt($("TimerSeconds_"+a).innerHTML);if(b==1)$("CommentEdit_"+a).innerHTML="",$("CommentEdit_"+a).hide();else{$("CommentEdit_"+a).show();b--;var c;c=b<30?b<=10?" ("+b+")":" (\u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043c\u0435\u043d\u044c\u0448\u0435 30 \u0441\u0435\u043a.)":" (\u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043c\u0435\u043d\u044c\u0448\u0435 \u043c\u0438\u043d\u0443\u0442\u044b)";$("TimerSeconds_"+a).innerHTML=b;$("Timer_"+a).innerHTML=
c;setTimeout("BC.Comment.EditTimer("+a+")",1E3)}},SetEditStatus:function(a){$("TimerSeconds_"+a).innerHTML="1";new Ajax.Request("/comment/"+a+"/seteditstatus/",{method:"post",parameters:{ajax:"ajax"},onSuccess:BC.Comment.SetEditStatusResult})},SetEditStatusResult:function(a){a=a.responseJSON;a.result=="Error"&&alert(a.error)},SetReadyStatus:function(a){new Ajax.Request("/comment/"+a+"/setreadystatus/",{method:"post",postBody:"ajax=ajax",onSuccess:BC.Comment.SetReadyStatusResult})},SetReadyStatusResult:function(a){var b=
a.responseText,b=b.split("|"),a=b[1];if(b[0]=="ok"){if(b=parseInt(b[3]),b>0)$("CommentEdit_"+a).innerHTML='<span id="TimerSeconds_'+a+'" style="display:none">'+b+'</span><a onclick="BC.Comment.SetEditStatus('+a+"); BC.Comment.Edit("+a+'); return false">\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c</a> <span id="Timer_'+a+'"></span>',BC.Comment.EditTimer(a)}else BC.Window.SetError(b[2],"CommentStatus")},ToQuestion:function(a,b){BC.Window.Create("TopicTitle",{TopicInfo_id:BC.Var.TopicInfo_id});
var c=$("TopicTitleWin");if(b!=void 0)c.blog_id.value=b;c.comment_id.value=a;c.title.value="";$("TopicTitleWinCaption_title").innerHTML=BC.Lang.Comment.TopicTitleWinCaptionDefault_title;BC.Window.Open("TopicTitle")},ToQuestionProcess:function(a){var b="ajax=ajax&title="+BC.Common.Escape(a.title.value)+"&blog_id="+BC.Common.Escape(a.blog_id.value);new Ajax.Request("/comment/"+BC.Common.Escape(a.comment_id.value)+"/to-question/",{method:"post",postBody:b,onSuccess:BC.Comment.ToQuestionResult});BC.Window.Open("Processing");
BC.Window.Close("TopicTitle")},ToQuestionResult:function(a){a=a.responseText.split("|");if(a[0]=="ok")BC.Window.SetOk(a[2]),$("WindowMessageBtnClose").setAttribute("onclick","window.location='"+a[3]+"'");else{BC.Window.SetError(a[2],"TopicTitle");for(var b=3;b<a.length;b++){var c=a[b].split("*x*"),d=$("TopicTitleWinCaption_"+c[0]);if(d)c[2]?(d.innerHTML=c[2],d.className="caption like-window-caption error"):(eval("var varCaption=BC.Lang.Comment.TopicTitleWinCaptionDefault_"+c[0]),d.innerHTML=varCaption,
d.className="caption like-window-caption")}}BC.Window.Close("Processing")},ContentCut:function(a,b){var c="BC.Comment.ContentCutProcess("+a+",'"+b+"');",d="",e="";switch(b){case "Question":d=BC.Lang.Comment.ConfirmTitleQuestionCut;e=BC.Lang.Comment.ConfirmTextQuestionCut.replace(/#TOPIC_TITLE#/,$("TopicTitle_"+a).innerHTML);break;case "Comment":d=BC.Lang.Comment.ConfirmTitleCommentCut,e=BC.Lang.Comment.ConfirmTextCommentCut}$("WindowTitleConfirm").innerHTML=d;$("WindowConfirmText").innerHTML=e;$("WindowConfirmBtnGo").setAttribute("onclick",
c);BC.Window.Open("Confirm")},ContentCutProcess:function(a,b){var c="";switch(b){case "Question":c="/article/"+a+"/to-clipboard/";break;case "Comment":c="/comment/"+a+"/to-clipboard/"}new Ajax.Request(c,{method:"post",postBody:"ajax=ajax",onSuccess:BC.Comment.ContentCutResult});BC.Window.Open("Processing");BC.Window.Close("Confirm")},ContentCutResult:function(a){a=a.responseText.split("|");if(a[0]=="ok"){BC.Window.SetOk(a[3]);var b="";switch(a[2]){case "Comment":b=BC.Var.ArticlePage?BC.Var.TopicLink+
"#c"+a[1]:$("CommentReplyLink_"+a[1]).getElementsByTagName("a").item(0).href;break;case "Question":b=BC.Var.ArticlePage?BC.Var.TopicLink:$("TopicTitle_"+a[1]).href}if(!$("ClipboardLink"))$("Clipboard").innerHTML='<a href="{$ClipLink}" id="ClipboardLink"><img src="'+BC.Var.StaticHostNew+'/i/clipboard.gif" width="16px" height="10px" alt=""/></a>';$("ClipboardLink").href=b;$("ClipboardLink").style.visibility="";if(a[2]=="Comment"&&BC.Var.ArticlePage){for(var b=$("c").getElementsByTagName("span"),c=0;c<
b.length;c++)if(b[c].id.indexOf("CommentActionPaste_")!=-1){var d=b[c].id.replace(/[^0-9]/g,"");b[c].style.display=d==a[1]?"none":""}b=$("CommentTitle").getElementsByTagName("span");if(b[1].id.indexOf("TopicActionPaste_")!=-1)b[1].style.display=""}}else BC.Window.SetError(a[3]);BC.Window.Close("Processing")},ContentPaste:function(a,b){var c="";switch(b){case "Comment":c="/comment/"+a+"/from-clipboard/2/";break;case "Question":c="/article/"+a+"/from-clipboard/"}$("WindowTitleConfirm").innerHTML=BC.Lang.Comment.ConfirmTitleContentPaste;
$("WindowConfirmText").innerHTML=BC.Lang.Comment.ConfirmTextContentPaste;$("WindowConfirmBtnGo").setAttribute("onclick","BC.Comment.ContentPasteProcess('"+c+"')");BC.Window.Open("Confirm")},ContentPasteProcess:function(a){BC.Window.Open("Processing");BC.Window.Close("Confirm");window.location=a},Confirm:function(a,b){var c="",d="",e="";switch(b){case "DonateOn":c=BC.Lang.Comment.ConfirmTitleDonateOn;d=BC.Lang.Comment.ConfirmTextDonateOn;e="BC.Comment.DonateOn("+a+");";break;case "DonateOff":c=BC.Lang.Comment.ConfirmTitleDonateOff,
d=BC.Lang.Comment.ConfirmTextDonateOff,e="BC.Comment.DonateOff("+a+");"}$("WindowTitleConfirm").innerHTML=c;$("WindowConfirmText").innerHTML=d;$("WindowConfirmBtnGo").setAttribute("onclick",e);BC.Window.Open("Confirm")},DonateOn:function(a){BC.Comment.Donate("/comment/"+a+"/showdonate/")},DonateOff:function(a){BC.Comment.Donate("/comment/"+a+"/hidedonate/")},Donate:function(a){new Ajax.Request(a,{method:"post",postBody:"ajax=ajax",onSuccess:BC.Comment.DonateResult});BC.Window.Open("Processing");BC.Window.Close("Confirm")},
DonateResult:function(a){var a=a.responseText,a=a.split("|"),b=a[1];if(a[0]=="ok")switch(BC.Window.SetOk(a[2]),a[3]){case "donate-on":$("donate_"+b)&&($("donate_"+b).show(),$("donate_indent_"+b).hide());$("CommentActionDonateOn_"+b).style.display="none";$("CommentActionDonateOff_"+b).style.display="";break;case "donate-off":$("donate_"+b)&&($("donate_"+b).hide(),$("donate_indent_"+b).show()),$("CommentActionDonateOn_"+b).style.display="",$("CommentActionDonateOff_"+b).style.display="none"}else BC.Window.SetError(a[2]);
BC.Window.Close("Processing")},AttachLoad:function(a){$("CommentAttachWin")==void 0&&BC.Window.Create("CommentAttach");$("CommentAttachWinCaption_userfile").innerHTML=BC.Lang.Topic.AttachWinCaptionDefault_userfile;$("CommentAttachWinCaption_userfile").className="caption like-window-caption";a||BC.Window.Open("CommentAttach")},AttachSet:function(a,b,c,d){a?(a=$("CommentAttachWinInput_userfile").value,a=a.split("\\"),a instanceof Array&&(a.reverse(),a=a[0]),d=document.createElement("p"),d.className=
"caption",d.id="CommentAttachRow_"+b,d.innerHTML='<a href="'+c+'" target="_blank">'+a+'</a>&nbsp;&nbsp; <span class="pv_link" onclick="BC.Comment.AttachDelete('+b+');">\u0443\u0434\u0430\u043b\u0438\u0442\u044c</span>',$("CommentAttaches").appendChild(d),c=$("MainInnerBlock").offsetHeight,c+=15,$("MainInnerBlock").style.height=c+"px",c="form"+window.location.hash.replace("#reply",""),a=$(c).offsetHeight,a+=15,$(c).style.height=a+"px",c=document.createElement("input"),c.type="hidden",c.value=1,c.id=
"CommentAttach_"+b,c.name="attach_"+b,$("CommentAttaches").appendChild(c),BC.Window.Close("CommentAttach"),$("CommentAttachWin").reset()):($("CommentAttachWinCaption_userfile").innerHTML=d,$("CommentAttachWinCaption_userfile").className="caption like-window-caption eror")},AttachDelete:function(a){var b=$("CommentFormBox").select("#CommentAttach_"+a)[0];b&&b.parentNode.removeChild(b);if(a=$("CommentFormBox").select("#CommentAttachRow_"+a)[0])a.parentNode.removeChild(a),$("form"+BC.Var.CurCommentId).style.height=
$("CommentFormBox").offsetHeight+60+"px"}};function clipboardToQuest(a){document.location.href="/article/"+BC.Common.Escape(a)+"/clipboard-to-quest/"}function clipboardToCommentUp(a){document.location.href="/comment/"+BC.Common.Escape(a)+"/clipboard-to-comment/1/"}function clipboardToCommentDown(a){document.location.href="/comment/"+BC.Common.Escape(a)+"/clipboard-to-comment/0/"}function clipboardToCommentPar(a){document.location.href="/comment/"+BC.Common.Escape(a)+"/clipboard-to-comment/2/"}
BC.Auction={Take:function(a){BC.Window.Create("AuctionGet");$("AuctionGetTheme").innerHTML=$("AuctionTitle_"+a).innerHTML;$("AuctionGetPrice").innerHTML=$("AuctionRealPrice_"+a).innerHTML;var b=new Date,b=new Date(b.getFullYear(),b.getMonth(),b.getDate()+20);$("AuctionGetDate").innerHTML=b.getDate()+"."+b.getMonth()+"."+b.getFullYear();$("AuctionGetWin").action="/auction/"+a+"/take/";BC.Window.Open("AuctionGet")},TakeProcess:function(a){window.location=a.action;BC.Window.Open("Processing");BC.Window.Close("AuctionGet")},
Write:function(a,b){var c="";switch(b){case "write":c="/auction/"+a+"/newtopic/";break;case "edit":c="/auction/"+a+"/viewtopic/"}if(c)window.location=c},Refuse:function(a){BC.Window.Create("AuctionRefuse");$("AuctionRefuseWinCaption_reason").innerHTML=BC.Lang.Auction.RefuseWinCaptionDefault_reason;$("AuctionRefuseWinCaption_reason").className="caption like-window-caption";$("AuctionRefuseWin").action="/auction/"+a+"/throwtopic/";$("AuctionRefuseWin").reason.value=BC.Lang.Auction.RefuseWinValueDefault_reason;
BC.Window.Open("AuctionRefuse")},Return:function(a){BC.Window.Create("AuctionReturn");$("AuctionReturnWin").action="/auction/"+a+"/returntopic/";BC.Window.Open("AuctionReturn")},RefuseReturnProcess:function(a){var b=a.action,c="ajax=ajax&formName="+BC.Common.Escape(a.formName.value);a.reason&&(c+="&reason="+BC.Common.Escape(a.reason.value));new Ajax.Request(b,{method:"post",postBody:c,onSuccess:BC.Auction.RefuseReturnResult});BC.Window.Open("Processing");BC.Window.Close(a.formName.value)},RefuseReturnResult:function(a){var a=
a.responseText,a=a.split("|"),b=a[1];if(a[0]=="ok")BC.Window.SetOk(a[2]),b&&(a=$("AuctionBlock_"+b),a.parentNode.removeChild(a)),BC.Window.Close("AuctionRefuse");else{BC.Window.SetError(a[2],a[3]);for(b=4;b<a.length;b++){var c=a[b].split("*x*"),d=$("AuctionRefuseWinCaption_"+c[0]);if(d)c[2]?(d.innerHTML=c[2],d.className="caption like-window-caption error"):(eval("var varCaption=BC.Lang.Auction.RefuseWinCaptionDefault_"+c[0]),d.innerHTML=varCaption,d.className="caption like-window-caption")}}BC.Window.Close("Processing")},
Confirm:function(a,b){var c="",d="",e="";switch(b){case "Lock":c=BC.Lang.Auction.StatusWinTitle_lock;d=BC.Lang.Auction.StatusWinText_lock;e="BC.Auction.LockProcess();";break;case "Unlock":c=BC.Lang.Auction.StatusWinTitle_unlock;d=BC.Lang.Auction.StatusWinText_unlock;e="BC.Auction.UnlockProcess();";break;case "Deactivate":c=BC.Lang.Auction.StatusWinTitle_deactivate;d=BC.Lang.Auction.StatusWinText_deactivate;e="BC.Auction.DeactivateProcess();";break;case "Activate":c=BC.Lang.Auction.StatusWinTitle_activate;
d=BC.Lang.Auction.StatusWinText_activate;e="BC.Auction.ActivateProcess();";break;case "ResetAmount":c=BC.Lang.Auction.StatusWinTitle_reset;d=BC.Lang.Auction.StatusWinText_reset;e="BC.Auction.ResetAmountProcess();";break;case "Return":c=BC.Lang.Auction.StatusWinTitle_return;d=BC.Lang.Auction.StatusWinText_return;e="BC.Auction.ReturnProcess();";break;default:return}$("WindowTitleConfirm").innerHTML=c;$("WindowConfirmText").innerHTML=d.replace(/#AUCTION_TITLE#/i,$("AuctionTitle_"+a).innerHTML);$("WindowConfirmBtnGo").setAttribute("onclick",
e);BC.Auction.TmpAuctionId=a;BC.Window.Open("Confirm")},LockProcess:function(){BC.Auction.StatusSave("/auction/"+BC.Auction.TmpAuctionId+"/lock/")},UnlockProcess:function(){BC.Auction.StatusSave("/auction/"+BC.Auction.TmpAuctionId+"/unlock/")},DeactivateProcess:function(){BC.Auction.StatusSave("/auction/"+BC.Auction.TmpAuctionId+"/deactivate/")},ActivateProcess:function(){BC.Auction.StatusSave("/auction/"+BC.Auction.TmpAuctionId+"/activate/")},ResetAmountProcess:function(){BC.Auction.StatusSave("/auction/"+
BC.Auction.TmpAuctionId+"/resetamount/")},ReturnProcess:function(){BC.Auction.StatusSave("/auction/"+BC.Auction.TmpAuctionId+"/returntopic/")},StatusSave:function(a){new Ajax.Request(a,{method:"post",postBody:"ajax=ajax",onSuccess:BC.Auction.StatusSaveResult});BC.Window.Open("Processing");BC.Window.Close("Confirm")},StatusSaveResult:function(a){var a=a.responseText,a=a.split("|"),b=a[1];if(a[0]=="ok")switch(BC.Window.SetOk(a[2]),a[3]){case "locked":$("AuctionBlock_"+b).className=BC.Common.StringAppendWord($("AuctionBlock_"+
b).className,"article-locked");$("AuctionActionLock_"+b).style.display="none";$("AuctionActionUnlock_"+b).style.display="";break;case "unlocked":$("AuctionBlock_"+b).className=BC.Common.StringRemoveWord($("AuctionBlock_"+b).className,"article-locked");$("AuctionActionLock_"+b).style.display="";$("AuctionActionUnlock_"+b).style.display="none";break;case "deactivated":a=$("AuctionBlock_"+b);a.parentNode.removeChild(a);break;case "activated":a=$("AuctionBlock_"+b);a.parentNode.removeChild(a);break;case "resetamount":$("AuctionRealPrice_"+
b).innerHTML="$"+$("AuctionStartPrice_"+b).innerHTML;$("AuctionActionResetAmount_"+b).style.display="none";break;case "returned":a=$("AuctionBlock_"+b),a.parentNode.removeChild(a)}else BC.Window.SetError(a[2]);BC.Window.Close("Processing");BC.Auction.TmpAuctionId=!1}};
function auction_take_theme(a){document.forms.AuctionGetTheme.action="/auction/"+a+"/take/";$("atheme_title").innerHTML=$("auction_title_"+a).innerHTML;$("atheme_date").innerHTML=$("date_finish_"+a).innerHTML;$("atheme_price").innerHTML=$("auction_real_price_"+a).innerHTML;windowOpen("AuctionGetTheme")}
BC.User={index:0,TmpBlogsList:[],UserPage:!1,contextAdvPageIndex:[],IsUserPage:function(){BC.User.UserPage=!0},Info:{},SetInfo:function(a,b,c,d,e,f,g,h,l,m,n,r,o){BC.User.Info={id:a,login:b,role:c,realname:d.replace(/\&quot;/g,'"'),city:e.replace(/\&quot;/g,'"'),mail:f,site:g,icq:h,livejournal:l,skype:m,daysban:n,merchant_id:r,myprofile:o}},City:{MyCity:[],MaxCount:10,SelectedId:0,ScrollTop:0,WordStart:0,Found:function(a,b){var c=$("citylist_"+b),d=$("UserContextAdv"+b+"WinInput_city");if(!a)a=window.event;
var e=a.keyCode;if(e==23||e==13||e==27||e==37||e==38||e==39||e==40&&c.style.display!="none")return!1;if(BC.Browser.IE){e=d.createTextRange();selection=e.duplicate();var e=document.selection.createRange(),f=document.body.createTextRange();f.moveToElementText(d);var g;for(g=0;f.compareEndPoints("StartToStart",e)<0;g++)f.moveStart("character",1)}d=d.value;d=d.substr(0,1).toUpperCase()+d.substr(1);BC.User.City.MyCity=[];for(i=0;i<allCity.length;i++)allCity[i].indexOf(d)==0&&d.length!=0&&BC.User.City.MyCity.push(allCity[i]);
if(BC.User.City.MyCity.length>0){innerH="";for(i=0;i<BC.User.City.MyCity.length;i++)innerH+='<div id="tg_'+(i+1)+'" onmouseover="this.className=\'sel\'" onmouseout="this.className=\'\'" onclick="BC.User.City.Insert('+(i+1)+",'"+b+"'); return false;\">"+BC.User.City.MyCity[i]+"</div>";c.innerHTML=innerH;c.style.visibility="hidden";c.style.display="";d=c.firstChild.offsetHeight;BC.User.City.MyCity.length>BC.User.City.MaxCount?(c.className="tags_ex scroll",c.style.height=d*BC.User.City.MaxCount+"px"):
(c.className="tags_ex",c.style.height="");c.style.visibility=""}else c.innerHTML="",c.style.display="none";return!0},TestEvent:function(a,b,c){var d=$("citylist_"+b);$("UserContextAdv"+b+"WinInput_city");if(!a)a=window.event;switch(a.keyCode){case 27:return d.style.display="none",!1;case 37:return d.style.display="none",!0;case 39:return d.style.display="none",!0;case 38:if(BC.User.City.SelectedId>0){a=d.getElementsByTagName("div");b=a[0].offsetHeight;a[BC.User.City.SelectedId-1].className="";BC.User.City.SelectedId--;
if(BC.User.City.SelectedId>0)a[BC.User.City.SelectedId-1].className="sel";if(BC.User.City.SelectedId<=BC.User.City.ScrollTop)BC.User.City.ScrollTop--,d.scrollTop=b*BC.User.City.ScrollTop}return!1;case 40:if(BC.User.City.SelectedId<BC.User.City.MyCity.length){a=d.getElementsByTagName("div");b=a[0].offsetHeight;if(BC.User.City.SelectedId>0)a[BC.User.City.SelectedId-1].className="";BC.User.City.SelectedId++;a[BC.User.City.SelectedId-1].className="sel";if(BC.User.City.SelectedId>BC.User.City.MaxCount+
BC.User.City.ScrollTop)BC.User.City.ScrollTop++,d.scrollTop=b*BC.User.City.ScrollTop}return!1;case 13:if(BC.User.City.SelectedId>0)c&&c=="term"?(real_id=$("tg_id_"+BC.User.City.SelectedId).innerHTML,ShowTerm(BC.User.City.SelectedId,real_id)):BC.User.City.Insert(BC.User.City.SelectedId,b);d.style.display="none";BC.User.City.SelectedId=0;return!1}},Insert:function(a,b){var c=$("citylist_"+b),d=$("UserContextAdv"+b+"WinInput_city"),e=$("tg_"+a).innerHTML,f=d.value,g=f.indexOf(",",BC.User.City.WordStart),
h=f.substr(0,BC.User.City.WordStart);h+=(h?" ":"")+e;g!=-1&&(h+=f.substr(g));d.value=h;BC.User.City.SelectedId=0;c.style.display="none"}},PersonalEdit:function(){BC.User.Info.id?(BC.Window.Create("UserPersonal"),$("UserProfileWinCaption_mail").innerHTML=BC.Lang.User.ProfileWinCaptionDefault_mail,$("UserProfileWinCaption_mail").className="caption like-window-caption",$("UserPersonalWinInput_mail").value=BC.User.Info.mail,$("UserProfileWinCaption_realname").innerHTML=BC.Lang.User.ProfileWinCaptionDefault_realname,
$("UserProfileWinCaption_realname").className="caption like-window-caption",$("UserPersonalWinInput_realname").value=BC.User.Info.realname,$("UserProfileWinCaption_city").innerHTML=BC.Lang.User.ProfileWinCaptionDefault_city,$("UserProfileWinCaption_city").className="caption like-window-caption",$("UserPersonalWinInput_city").value=BC.User.Info.city,$("UserProfileWinCaption_site").innerHTML=BC.Lang.User.ProfileWinCaptionDefault_site,$("UserProfileWinCaption_site").className="caption like-window-caption",
$("UserPersonalWinInput_site").value=BC.User.Info.site,$("UserProfileWinCaption_icq").innerHTML=BC.Lang.User.ProfileWinCaptionDefault_icq,$("UserProfileWinCaption_icq").className="caption like-window-caption",$("UserPersonalWinInput_icq").value=BC.User.Info.icq,$("UserProfileWinCaption_livejournal").innerHTML=BC.Lang.User.ProfileWinCaptionDefault_livejournal,$("UserProfileWinCaption_livejournal").className="caption like-window-caption",$("UserPersonalWinInput_livejournal").value=BC.User.Info.livejournal,
$("UserProfileWinCaption_skype").innerHTML=BC.Lang.User.ProfileWinCaptionDefault_skype,$("UserProfileWinCaption_skype").className="caption like-window-caption",$("UserPersonalWinInput_skype").value=BC.User.Info.skype,BC.Window.Open("UserPersonal")):BC.Window.SetError(BC.Lang.User.ErrorTextNotLoaded)},ContextAdvOpenForm:function(a,b,c){var d={allCountry:BC.Var.allCountry,wwidth:800};BC.Window.Create("UserContextAdvPageListAdd",{blogs:BC.Var.allTopics,wwidth:900});BC.Window.Create("UserContextAdvAdd",
d,"title");BC.Promo.AddItem(21,"blogs");BC.Promo.Disabler(21,"blogs");BC.Promo.CheckButtons(21,"blogs","del");BC.Promo.CheckButtons(21,"blogs","add");var e=[];e.push("title","text","link","city","daily_budjet","CountrySelect");for(d=0;d<=e.length-1;d++){var f=$("UserContextAdvAddWinInput_"+e[d]);switch(e[d]){case "link":f.value="http://";break;case "CountrySelect":f.options[0].selected=!0;break;default:f.value=""}}$("UserContextAdvAddWinCaption_title").innerHTML=BC.Lang.User.ContextAdvAddFormDefault_title;
$("UserContextAdvAddWinCaption_title").className="caption like-window-caption";$("UserContextAdvAddWinCaption_text").innerHTML=BC.Lang.User.ContextAdvAddFormDefault_text;$("UserContextAdvAddWinCaption_text").className="caption like-window-caption";$("UserContextAdvAddWinCaption_link").innerHTML=BC.Lang.User.ContextAdvAddFormDefault_link;$("UserContextAdvAddWinCaption_link").className="caption like-window-caption";$("UserContextAdvAddWinCaption_city").innerHTML=BC.Lang.User.ContextAdvAddFormDefault_city;
$("UserContextAdvAddWinCaption_city").className="caption like-window-caption";$("UserContextAdvAddWinCaption_daily_budjet").innerHTML=BC.Lang.User.ContextAdvAddFormDefault_daily_budjet;$("UserContextAdvAddWinCaption_daily_budjet").className="caption like-window-caption";$("UserContextAdvAddWinCaption_selectedArticles").innerHTML=BC.Lang.User.ContextAdvAddFormDefault_selectedArticles;$("UserContextAdvAddWinCaption_selectedArticles").className="caption like-window-caption";for(j=0;j<=$("promo21_blogs_addarea").length-
1;j++)$("promo21_blogs_addarea").options[j].disabled=!1;$("promo21_blogs_delarea").length=0;if(a!=void 0&&b!=void 0){$("promo21_blogs_delarea").options[0]=new Option(b,a);b=$("promo21_blogs_addarea");for(d=0;d<=b.length-1;d++)if(b.options[d].value==a)b.options[d].disabled=!0}c!=void 0?($("UserContextAdvEditWinCaption_advert_id").value=c,$("WindowTitleUserContextAdvAdd").innerHTML=BC.Lang.User.ContextAdvEditWin_title,$("submit_btn").setAttribute("onclick",""),$("submit_btn").onclick=function(){BC.User.ContextAdvEdit()},
new Ajax.Request("/user/"+BC.User.Info.login+"/addtodelarea/",{method:"post",postBody:"ajax=ajax&advert_id="+c,onSuccess:BC.User.DelareaSave}),BC.Window.Open("Processing")):($("WindowTitleUserContextAdvAdd").innerHTML=BC.Lang.User.ContextAdvAddWin_title,BC.Window.Open("UserContextAdvAdd"))},DelareaSave:function(a){var b=a.responseText,a=$("UserContextAdvAddWinInput_CountrySelect"),b=b.split("~"),c=b[0].split("|");for(i=0;i<=c.length-1;i++)if(input=c[i].split("*"),input[0]=="id_country")for(j=0;j<=
a.length-1;j++){if(a.options[j].value==input[1])a.options[j].selected=!0}else $("UserContextAdvAddWinInput_"+input[0]).value=input[1];a=$("promo21_blogs_delarea");b=b[1].split("|");for(i=0;i<=b.length-2;i++)c=b[i].split("*"),a.options[i]=new Option(c[1],c[0]);for(i=0;i<=a.length-1;i++){b=a.options[i].value;for(j=0;j<=$("promo21_blogs_addarea").length-1;j++)if($("promo21_blogs_addarea").options[j].value==b)$("promo21_blogs_addarea").options[j].disabled=!0}BC.Context.SymbolCount("UserContextAdvAddWinInput_title",
"Add_title");BC.Context.SymbolCount("UserContextAdvAddWinInput_text","Add_text");BC.Window.Open("UserContextAdvAdd");BC.Window.Close("Processing")},ContextAdvEdit:function(a){a==void 0&&(a=$("UserContextAdvAddWin"));for(var b="/user/"+BC.User.Info.login+"/editcontext/",c=[],d=0,d=0;d<=$("promo21_blogs_delarea").length-1;d++)c[d]=$("promo21_blogs_delarea").options[d].value;if(a.link.value=="http://")a.link.value="";a="ajax=ajax&title="+BC.Common.Escape(a.title.value)+"&text="+BC.Common.Escape(a.text.value)+
"&link="+BC.Common.Escape(a.link.value)+"&city="+BC.Common.Escape(a.city.value)+"&country_id="+BC.Common.Escape(a.country_id.value)+"&daily_budjet="+BC.Common.Escape(a.daily_budjet.value)+"&advert_id="+BC.Common.Escape(a.advert_id.value)+"&selectedArticles="+c;new Ajax.Request(b,{method:"post",postBody:a,onSuccess:BC.User.ContextEditSave});BC.Window.Open("Processing");BC.Window.Close("UserContextAdvEdit")},ContextDeleteAdv:function(a,b){BC.Window.Create("ContextStatus");var c=BC.Lang.User.ContextAdvDel_Text,
c=c.replace(/#TITLE#/,b),d=BC.Lang.User.ContextAdvDel_Title;$("WindowTitleContextStatus").innerHTML=d;$("ContextStatusText").innerHTML=c;$("ContextAdvStatusWin_adv_id").value=a;$("ContextAdvStatusWin_status").value="del";BC.Window.Open("ContextStatus")},ContextChangeWindow:function(a,b,c,d){BC.Window.Create("ContextStatus");if(d){var d=BC.Lang.User.ContextAdvChangeStatus_Title,e=c!=0?BC.Lang.User.ContextAdvStart_Text:BC.Lang.User.ContextAdvStop_Text,e=e.replace(/#TITLE#/,b);$("WindowTitleContextStatus").innerHTML=
d;$("ContextStatusText").innerHTML=e;$("ContextAdvStatusWin_adv_id").value=a;$("ContextAdvStatusWin_status").value=c;BC.Window.Open("ContextStatus")}else BC.Window.SetError(BC.Lang.User.ErrorOnChangeContextStatus)},ContextChangeStatus:function(a){var b="/user/"+BC.User.Info.login+"/changestatus/",a="ajax=ajax&adv_id="+BC.Common.Escape(a.adv_id.value)+"&status="+BC.Common.Escape(a.status.value);new Ajax.Request(b,{method:"post",postBody:a,onSuccess:BC.User.ContextStatusSave});BC.Window.Open("Processing");
BC.Window.Close("ContextStatus")},ContextStatusSave:function(a){BC.Window.Close("Processing");result=a.responseText;result=result.split("|");if(result[0]=="ok")switch(a=[],a.push($("adv-data-"+result[1])),a.push($("adv_where_"+result[1])),a.push($("adv-stat-"+result[1])),result[3]){case "0":for(i=0;i<=a.length-1;i++){var b=a[i].className,b=b.split(" ");a[i].className=b[0]}$("icon_stop_"+result[1]).style.display="none";$("icon_start_"+result[1]).style.display="block";break;case "1":for(i=0;i<=a.length-
1;i++)b=a[i].className,b+=" trans",a[i].className=b;$("icon_start_"+result[1]).style.display="none";$("icon_stop_"+result[1]).style.display="block";break;case "2":window.location=window.location;break;case "3":$("icon_stop_"+result[1]).hide(),$("icon_waitmoder_"+result[1]).show(),BC.Window.SetOk(BC.Lang.User.ContextAdvAddForm_help_waitmoder)}else BC.Window.SetError(result[2])},ContextAdvAdd:function(a){for(var b=[],c=0,c=0;c<=$("promo21_blogs_delarea").length-1;c++)b[c]=$("promo21_blogs_delarea").options[c].value;
c="/user/"+BC.User.Info.login+"/addcontext/";a="ajax=ajax&title="+BC.Common.Escape(a.title.value)+"&text="+BC.Common.Escape(a.text.value)+"&link="+BC.Common.Escape(a.link.value)+"&country_id="+BC.Common.Escape(a.country_id.value)+"&city="+BC.Common.Escape(a.city.value)+"&daily_budjet="+BC.Common.Escape(a.daily_budjet.value)+"&selectedArticles="+b;new Ajax.Request(c,{method:"post",postBody:a,onSuccess:BC.User.ContextSave});BC.Window.Open("Processing");BC.Window.Close("UserContextAdvAdd")},PaymentHistoryList:function(a){switch(a){case "show":$$("tr.display_none").invoke("removeClassName",
"display_none").invoke("toggleClassName","display_history");$("history_show").removeClassName("payment_history_show").addClassName("display_none");$("history_hide").removeClassName("display_none").addClassName("payment_history_show");break;case "hide":$$("tr.display_history").invoke("removeClassName","display_history").invoke("toggleClassName","display_none"),$("history_hide").removeClassName("payment_history_show").addClassName("display_none"),$("history_show").removeClassName("display_none").addClassName("payment_history_show")}},
ContextArticlesList:function(a,b){switch(b){case "show":$("adv-where-"+a).className=$("adv_stat_"+a).className="full";break;case "hide":$("adv-where-"+a).className=$("adv_stat_"+a).className="short"}},PersonalSave:function(a){var b="/user/"+BC.User.Info.login+"/edit/",a="ajax=ajax&formName="+BC.Common.Escape(a.formName.value)+"&mail="+BC.Common.Escape(a.mail.value)+"&realname="+BC.Common.Escape(a.realname.value)+"&city="+BC.Common.Escape(a.city.value)+"&site="+BC.Common.Escape(a.site.value)+"&icq="+
BC.Common.Escape(a.icq.value)+"&livejournal="+BC.Common.Escape(a.livejournal.value)+"&skype="+BC.Common.Escape(a.skype.value);new Ajax.Request(b,{method:"post",postBody:a,onSuccess:BC.User.PersonalSecuritySaveResult});BC.Window.Open("Processing");BC.Window.Close("UserPersonal")},SecurityEdit:function(){BC.User.Info.id?(BC.Window.Create("UserSecurity"),$("UserProfileWinCaption_passold").innerHTML=BC.Lang.User.ProfileWinCaptionDefault_passold,$("UserProfileWinCaption_passold").className="caption like-window-caption",
$("UserSecurityWinInput_passold").value="",$("UserProfileWinCaption_passnew").innerHTML=BC.Lang.User.ProfileWinCaptionDefault_passnew,$("UserProfileWinCaption_passnew").className="caption like-window-caption",$("UserSecurityWinInput_passnew").value="",BC.Window.Open("UserSecurity")):BC.Window.SetError(BC.Lang.User.ErrorTextNotLoaded)},getStatisticOnKlick:function(a,b){new Ajax.Request("/statistic/",{method:"post",postBody:"ajax=ajax&cadv_id="+a+"&news_id="+b,onSuccess:BC.User.ContextAdvBlockReload})},
SecuritySave:function(a){var b="/user/"+BC.User.Info.login+"/edit/",a="ajax=ajax&formName="+BC.Common.Escape(a.formName.value)+"&passold="+BC.Common.Escape(a.passold.value)+"&passnew="+BC.Common.Escape(a.passnew.value);new Ajax.Request(b,{method:"post",postBody:a,onSuccess:BC.User.PersonalSecuritySaveResult});BC.Window.Open("Processing");BC.Window.Close("UserSecurity")},moneyAmount:0,AddToBalanceOnChange:function(a){BC.User.moneyAmount=$("AddToBalanceWebmoney_amount").value;var b=$("AddToBalanceWebmoney_Method");
switch(b.options[b.selectedIndex].value){case "account":a.removeAttribute("action");a.setAttribute("onsubmit","");$("AddToBalance_submit").style.display=$("AddToBalanceWebmoney_VolumeCaption").style.display=$("AddToBalanceWebmoney_amount").parentNode.style.display="none";$("AddToBalanceAccountNotice").style.display="";break;case "liqpay":a.action="https://liqpay.com/?do=clickNbuy";a.setAttribute("onsubmit","");a.setAttribute("accept-charset","utf-8");$("AddToBalance_submit").style.display=$("AddToBalanceWebmoney_VolumeCaption").style.display=
$("AddToBalanceWebmoney_amount").parentNode.style.display="";$("AddToBalanceAccountNotice").style.display="none";break;default:a.action="https://merchant.webmoney.ru/lmi/payment.asp",a.setAttribute("onsubmit",""),$("liqpay").innerHTML="",$("AddToBalance_submit").style.display=$("AddToBalanceWebmoney_VolumeCaption").style.display=$("AddToBalanceWebmoney_amount").parentNode.style.display="",$("AddToBalanceAccountNotice").style.display="none"}BC.User.AddToBalanceAmount()},AddToBalanceAmount:function(){var a=
parseFloat($("AddToBalanceWebmoney_amount").value.replace(/,/,".")),b=$("AddToBalanceWebmoney_Method"),b=b.options[b.selectedIndex].value,c="";switch(b.charAt(0)){case "Z":c="usd";break;case "l":c="usd";break;case "R":c="rub";break;case "E":c="eur";break;default:c="uah"}if(!isNaN(a)&&b!="account"){var d=Number(Math.round(100*a*BC.Var.Exchange["usd_"+c])/100).toAmount();$("AddToBalanceWebmoney_Volume").value=d;b.charAt(0)=="l"&&BC.User.xmlForLiqPay("\u041f\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0430 www.builderclub.com, \n\u043b\u043e\u0433\u0438\u043d "+
BC.User.Info.login,BC.User.Info,"addToBalance",a,"USD");$("AddToBalance_topay").innerHTML=String(d).replace(/,/,".")+" "+c.toUpperCase();$("AddToBalance_topay").parentNode.style.display=""}else $("AddToBalanceWebmoney_Volume").value="",$("AddToBalance_topay").parentNode.style.display="none"},xmlForLiqPay:function(a,b,c,d,e){new Ajax.Request("/static/beforedonate/",{method:"post",parameters:{ajax:"ajax",donate_value:d,donate_type:"liqpay",description:a,currency:e,order:c},onSuccess:BC.User.xmlForLiqPayAnswer})},
xmlForLiqPayAnswer:function(a){a=a.responseJSON;console.log(a);if(a.success){var b=function(a,b){var e=document.createElement("input");e.setAttribute("type","hidden");e.setAttribute("value",b);e.setAttribute("name",a);$("liqpay").appendChild(e)};b("operation_xml",a.fields.operation_xml);b("signature",a.fields.signature)}},payForAcaunt:function(){BC.Window.Display("PayForAccount")},moveElementsToDel:function(a,b){for(i=$(a).length-1;i>=0;i--)if($(a).options[i].selected)selValue=$(a).options[i].value,
selText=$(a).options[i].text,BC.User.contextAdvPageIndex[BC.User.index]=i,BC.User.index++,$(a).options[i].disabled=!0,$(b).options.add(new Option(selText,selValue,!1,!1))},moveElementsToAdd:function(a,b){for(i=$(a).length-1;i>=0;i--)if($(a).options[i].selected)selValue=$(a).options[i].value,selText=$(a).options[i].text,$(a).remove(i),$(b).options[BC.User.contextAdvPageIndex[i]].disabled=!1},ContextAdvBlockReload:function(a){var a=a.responseText,b=BC.Context.numberOfSlide,c=BC.Context.curentSlide,
d=[];a?$("conteiner_for_contextads_block").innerHTML=a:$("conteiner_for_contextads_block").innerHTML="";for(i=0;i<=b-1;i++)$("adv-box-"+i)!=void 0&&d.push($("adv-box-"+i));BC.Context.numberOfSlide=b=d.length;if(c>=b)BC.Context.curentSlide=c=0;a="-"+c*170+"px";$("ads_slider").setStyle({left:""+a+""})},ContextEditSave:function(a){a=a.responseText;a=a.split("|");if(a[0]=="ok")BC.Window.SetOk(a[2]),window.location="/user/"+BC.User.Info.login+"/context/";else{BC.Window.SetError(a[2],a[3]);for(var b=4;b<
a.length;b++){var c=a[b].split("*x*"),d=$("UserContextAdvEditWinCaption_"+c[0]);if(d)c[2]?(d.innerHTML=c[2],d.className="caption like-window-caption error"):(eval("var varCaption=BC.Lang.User.ContextAdvAddFormDefault_"+c[0]),d.innerHTML=varCaption,d.className="caption like-window-caption")}}BC.Window.Close("Processing")},ContextSave:function(a){a=a.responseText;a=a.split("|");if(a[0]=="ok")BC.Window.SetOk(a[2]),window.location="/user/"+BC.User.Info.login+"/context/";else{BC.Window.SetError(a[2],a[3]);
for(var b=4;b<a.length;b++){var c=a[b].split("*x*"),d=$("UserContextAdvAddWinCaption_"+c[0]);if(d)c[2]?(d.innerHTML=c[2],d.className="caption like-window-caption error"):(eval("var varCaption=BC.Lang.User.ContextAdvAddFormDefault_"+c[0]),d.innerHTML=varCaption,d.className="caption like-window-caption")}}BC.Window.Close("Processing")},PersonalSecuritySaveResult:function(a){a=a.responseText;a=a.split("|");if(a[0]=="ok")switch(BC.Window.SetOk(a[2]),a[3]){case "UserPersonal":if(BC.User.Info.mail=$("UserPersonalWinInput_mail").value,
BC.User.Info.realname=$("UserPersonalWinInput_realname").value,BC.User.Info.city=$("UserPersonalWinInput_city").value,BC.User.Info.site=$("UserPersonalWinInput_site").value,BC.User.Info.icq=$("UserPersonalWinInput_icq").value,BC.User.Info.livejournal=$("UserPersonalWinInput_livejournal").value,BC.User.Info.skype=$("UserPersonalWinInput_skype").value,$("UserName").style.display=($("UserName").innerHTML=$("UserPersonalWinInput_realname").value)?"":"none",$("UserCity").style.display=($("UserCity").innerHTML=
$("UserPersonalWinInput_city").value)?"":"none",$("UserIcq").style.display=($("UserIcq").innerHTML=$("UserPersonalWinInput_icq").value)?"":"none",$("UserSite").parentNode.style.display=($("UserSite").innerHTML=$("UserPersonalWinInput_site").value)?"":"none",$("UserSite").href="http://"+$("UserSite").innerHTML,$("UserSkype").parentNode.style.display=($("UserSkype").innerHTML=$("UserPersonalWinInput_skype").value)?"":"none",$("UserSkype").href="skype:"+$("UserSkype").innerHTML+"?add",$("UserLJ").parentNode.style.display=
$("UserPersonalWinInput_livejournal").value?"":"none",$("UserLJ").innerHTML="livejournal.com/users/"+$("UserPersonalWinInput_livejournal").value,$("UserLJ").href="http://"+$("UserLJ").innerHTML,$("UserEmail").innerHTML=$("UserPersonalWinInput_mail").value,$("UserEmail").href)$("UserEmail").href="mailto:"+$("UserEmail").innerHTML}else{BC.Window.SetError(a[2],a[3]);for(var b=4;b<a.length;b++){var c=a[b].split("*x*"),d=$("UserProfileWinCaption_"+c[0]);if(d)c[2]?(d.innerHTML=c[2],d.className="caption like-window-caption error"):
(eval("var varCaption=BC.Lang.User.ProfileWinCaptionDefault_"+c[0]),d.innerHTML=varCaption,d.className="caption like-window-caption")}}BC.Window.Close("Processing")},Lock:function(a){BC.Window.Create("UserStatus");$("UserStatusWinCaption_days").style.display=$("UserStatusWinField_days").style.display="none";BC.User._Status(a,"lock")},Unlock:function(a){BC.Window.Create("UserStatus");$("UserStatusWinCaption_days").style.display=$("UserStatusWinField_days").style.display="none";BC.User._Status(a,"unlock")},
Deactivate:function(a){BC.Window.Create("UserStatus");$("UserStatusWinCaption_days").style.display=$("UserStatusWinField_days").style.display="none";BC.User._Status(a,"deactivate")},Activate:function(a){BC.Window.Create("UserStatus");$("UserStatusWinCaption_days").style.display=$("UserStatusWinField_days").style.display="none";BC.User._Status(a,"activate")},AuctionLock:function(a){BC.Window.Create("UserStatus");$("UserStatusWinCaption_days").style.display=$("UserStatusWinField_days").style.display=
"";$("UserStatusWinInput_days").value="";BC.User._Status(a,"auctionlock")},AuctionUnlock:function(a){BC.Window.Create("UserStatus");$("UserStatusWinCaption_days").style.display=$("UserStatusWinField_days").style.display="none";BC.User._Status(a,"auctionunlock")},_Status:function(a,b){eval("var varTitle=BC.Lang.User.StatusWinTitle_"+b+";var varText=BC.Lang.User.StatusWinText_"+b+";");$("WindowTitleUserStatus").innerHTML=varTitle;$("UserStatusText").innerHTML=varText.replace(/#LOGIN#/,a);$("UserStatusWin").action=
"/user/"+a+"/"+b+"/";BC.Window.Open("UserStatus")},StatusSave:function(a){var b="formName="+BC.Common.Escape(a.formName.value)+"&days="+BC.Common.Escape(a.days.value)+"&ajax=ajax";new Ajax.Request(a.action,{method:"post",postBody:b,onSuccess:BC.User.StatusSaveResult});BC.Window.Open("Processing");BC.Window.Close("UserStatus")},StatusSaveResult:function(a){var a=a.responseText,a=a.split("|"),b=a[1];if(a[0]=="ok")switch(BC.Window.SetOk(a[2]),a[3]){case "unlocked":$("UserActionLock_"+b).style.display=
"";$("UserActionUnlock_"+b).style.display="none";$("UserActionAuctionLock_"+b).style.display=BC.User.Info.daysban?"":"none";$("UserLogin").className="nick";break;case "locked":$("UserActionLock_"+b).style.display="none";$("UserActionUnlock_"+b).style.display="";$("UserActionAuctionLock_"+b).style.display="none";$("UserLogin").className="nick banned";break;case "deactivated":$("UserActionActivate_"+b).style.display="";$("UserActionDeactivate_"+b).style.display="none";$("UserActionLock_"+b).style.display=
"none";$("UserActionUnlock_"+b).style.display="none";$("UserActionAuctionLock_"+b).style.display="none";$("UserLogin").className="nick deleted";break;case "activated":$("UserActionActivate_"+b).style.display="none";$("UserActionDeactivate_"+b).style.display="";$("UserActionLock_"+b).style.display="";$("UserActionUnlock_"+b).style.display="none";$("UserActionAuctionLock_"+b).style.display=BC.User.Info.daysban?"":"none";$("UserLogin").className="nick";break;case "auctionlocked":$("UserActionAuctionLock_"+
b).style.display="none";BC.User.Info.daysban=$("UserStatusWinInput_days").value;$("AuctionBan").style.display="";$("AuctionBanDays").innerHTML=BC.Common.TextAfterNum(BC.User.Info.daysban,"BC.Lang.Common.TextDays");break;case "auctionunlocked":$("UserActionAuctionLock_"+b).style.display="",$("AuctionBan").style.display="none",BC.User.Info.daysban=0}else BC.Window.SetError(a[2],"UserStatus");BC.Window.Close("Processing")},BlogModer:function(a){BC.Window.Create("UserBlog",{BlogList:BC.Var.BlogList,Status:BC.Var.Status});
$("WindowTitleUserBlog").innerHTML=BC.Lang.User.BlogWinTitleModer;$("UserBlogWin").action="/section/"+a+"/setmoder/";BC.User.BlogBoss("Moder")},BlogSpec:function(a){BC.Window.Create("UserBlog",{BlogList:BC.Var.BlogList,Status:BC.Var.Status},BC.Lang.User.BlogWinTitleSpec);$("UserBlogWin").action="/section/"+a+"/setspec/";BC.User.BlogBoss("Spec")},BlogBoss:function(a){for(var a=$("Profile"+a+"List").childNodes,b=[],c=0;c<a.length;c++){var d=a[c].id.substr(a[c].id.indexOf("_")+1);b[d]=1}a=$("UserBlogWin").getElementsByTagName("label");
for(c=0;c<a.length;c++){var e=a[c].getAttribute("id").replace(/Title/g,""),d=e.substr(e.indexOf("_")+1);$(e).checked=b[d]==1}BC.Window.Open("UserBlog")},BlogBossSave:function(a){for(var b=a.action,c="ajax=ajax",a=a.getElementsByTagName("label"),d=0;d<a.length;d++){var e=a[d].getAttribute("id").replace(/Title/g,"");$(e).checked&&(e=e.substr(e.indexOf("_")+1),c+="&blog_"+e+"=1",BC.User.TmpBlogsList.push(e))}new Ajax.Request(b,{method:"post",postBody:c,onSuccess:BC.User.BlogBossSaveResult});BC.Window.Open("Processing");
BC.Window.Close("UserBlog")},BlogBossSaveResult:function(a){a=a.responseText;a=a.split("|");if(a[0]=="ok"){BC.Window.SetOk(a[2]);for(var a=a[3],b=$("Profile"+a+"List"),c="",d=0;d<BC.User.TmpBlogsList.length;d++){var e=BC.User.TmpBlogsList[d],f="",f=e=="novosti"||e=="vopros-otvet"?e:"statyi/"+e;c+='<li id="User'+a+"_"+e+'"><a href="/'+f+'/">'+$("BlogRowTitle_"+e).innerHTML+"</a></li>"}b.innerHTML=c;$("Profile"+a).style.display=c==""?"none":""}else BC.Window.SetError(a[2],"UserBlog");BC.Window.Close("Processing");
BC.User.TmpBlogsList=[]},AvatarChange:function(a){BC.Window.Create("UserAvatar");$("UserAvatarWin").action="/user/"+a+"/avatar/";BC.Window.Open("UserAvatar")},AvatarChangeSave:function(){BC.Window.Open("Processing");BC.Window.Close("UserAvatar")},AvatarChangeResult:function(a,b){if(a){BC.Window.SetOk(BC.Lang.User.AvatarLoadResult_Ok);var c=$("UserAvatar").src.replace(/\?*/g,"");$("UserAvatar").src=c+"?"+Math.random();$("UserAvatarWin").reset()}else BC.Window.SetError(b,"UserAvatar");BC.Window.Close("Processing")},
Role:function(a){BC.Window.Create("UserRole");$("UserRoleWin").action="/user/"+a+"/role/";$("UserRoleWin").role.value=BC.User.Info.role;BC.Window.Open("UserRole")},RoleSave:function(a){new Ajax.Request(a.action,{method:"post",postBody:"ajax=ajax&role="+a.role.value,onSuccess:BC.User.RoleSaveResult});BC.Window.Open("Processing");BC.Window.Close("UserRole")},RoleSaveResult:function(a){a=a.responseText;a=a.split("|");a[0]=="ok"?(BC.Window.SetOk(a[2]),BC.User.Info.role=$("UserRoleWin").role.value):BC.Window.SetError(a[2],
"UserRole");BC.Window.Close("Processing")},Award:function(a,b,c,d){BC.Window.Create("UserAward");var e=$("UserAwardWin");e.action="/user/"+a+"/award/";e.amount.value=d;e.comment.value=b;e.topic_id.value=c;$("WindowTitleUserAward").innerHTML=BC.Lang.User.AwardWinTitleAward;BC.User.Money()},Penalty:function(a){BC.Window.Create("UserAward");var b=$("UserAwardWin");b.action="/user/"+a+"/penalty/";b.amount.value=0;b.comment.value=BC.Lang.User.AwardWinTextPenalty;$("WindowTitleUserAward").innerHTML=BC.Lang.User.AwardWinTitlePenalty;
BC.User.Money()},Withdraw:function(a,b){BC.Window.Create("UserAward");var c=$("UserAwardWin");c.action="/user/"+a+"/withdraw/";c.amount.value=b;c.comment.value=BC.Lang.User.AwardWinTextWithdraw;$("WindowTitleUserAward").innerHTML=BC.Lang.User.AwardWinTitleWithdraw;BC.User.Money()},Money:function(){$("UserAwardWin")==void 0&&BC.Window.Create("UserAward");$("UserAwardWinCaption_amount").innerHTML=BC.Lang.User.AwardWinCaptionDefault_amount;$("UserAwardWinCaption_comment").innerHTML=BC.Lang.User.AwardWinCaptionDefault_comment;
$("UserAwardWinCaption_amount").className=$("UserAwardWinCaption_comment").className="caption like-window-caption";BC.Window.Open("UserAward")},MoneySave:function(a){var b="&amount="+BC.Common.Escape(a.amount.value)+"&comment="+BC.Common.Escape(a.comment.value)+"&topic_id="+BC.Common.Escape(a.topic_id.value)+"&formName="+BC.Common.Escape(a.formName.value)+"&ajax=ajax";new Ajax.Request(a.action,{method:"post",postBody:b,onSuccess:BC.User.MoneySaveResult});BC.Window.Open("Processing");BC.Window.Close("UserAward")},
MoneySaveResult:function(a){a=a.responseText;a=a.split("|");if(a[0]=="ok"){BC.Window.SetOk(a[2]);var b="",c="",d=0;switch(a[3]){case "penalty":c="money-line";b='<div class="action"><span id="TransactionStatus_'+a[1]+'" class="red">'+BC.Lang.User.TransactionStatus_penalty+'</span></div><div class="date">'+a[4]+'</div><div class="amount"><span id="TransactionAmount_'+a[1]+'" class="red">'+a[6]+'</span></div><div class="topic">'+a[5]+'<div class="fade"/></div><div class="clear"/>';d=-parseInt(a[6]);
break;case "withdraw":c="money-line payed",b='<div class="action"><span id="TransactionStatus_'+a[1]+'">'+BC.Lang.User.TransactionStatus_withdraw+'</span></div><div class="date">'+a[4]+'</div><div class="amount"><span id="TransactionAmount_'+a[1]+'">'+a[6]+'</span></div><div class="topic">'+a[5]+'<div class="fade"/></div><div class="clear"/>',d=-parseInt(a[6])}if(b!=""){var e=document.createElement("div");e.innerHTML=b;e.className=c;e.id="Transaction_"+a[1];a=parseInt($("AmountAvailable").firstChild.innerHTML)+
d;$("AmountAvailable").firstChild.innerHTML=a;$("AmountAvailable").firstChild.className=a>=0?"green":"red";a=$("AmountAction").getAttribute("onclick").replace(/\'\d+\'\)/g,"'"+a+"')");$("AmountAction").setAttribute("onclick",a);$("HistoryEmpty")?($("HistoryHeader").style.display="",$("HistoryList").insertBefore(e,$("HistoryEmpty")),$("HistoryList").removeChild($("HistoryEmpty"))):$("HistoryList").insertBefore(e,$("HistoryHeader").nextSibling)}}else{BC.Window.SetError(a[2],"UserAward");for(e=3;e<a.length;e++)if(b=
a[e].split("*x*"),c=$("UserAwardWinCaption_"+b[0]))b[2]?(c.innerHTML=b[2],c.className="caption like-window-caption error"):(eval("var varCaption=BC.Lang.User.AwardWinCaptionDefault_"+b[0]),c.innerHTML=varCaption,c.className="caption like-window-caption")}BC.Window.Close("Processing")},Decline:function(a){BC.User.TmpTransactionId=a;BC.User.ConfirmAction("Decline")},WithdrawApprove:function(a){BC.User.TmpTransactionId=a;BC.User.ConfirmAction("Approve")},WithdrawCancel:function(a){BC.User.TmpTransactionId=
a;BC.User.ConfirmAction("Cancel")},DeclineProcess:function(){BC.User.TransactionStatusProcess("/transaction/"+BC.User.TmpTransactionId+"/decline/")},WithdrawApproveProcess:function(){BC.User.TransactionStatusProcess("/transaction/"+BC.User.TmpTransactionId+"/approve/")},WithdrawCancelProcess:function(){BC.User.TransactionStatusProcess("/transaction/"+BC.User.TmpTransactionId+"/cancel/")},TransactionStatusProcess:function(a){new Ajax.Request(a,{method:"post",postBody:"ajax=ajax",onSuccess:BC.User.TransactionStatusProcessResult});
BC.Window.Open("Processing");BC.Window.Close("Confirm")},TransactionStatusProcessResult:function(a){var a=a.responseText,a=a.split("|"),b=a[1];if(a[0]=="ok"){BC.Window.SetOk(a[2]);var c=$("AdminPanelBox_t"+b);c&&c.parentNode.removeChild(c);eval("var varText=BC.Lang.User.TransactionStatus_"+a[3]);$("TransactionStatus_"+b).innerHTML=varText;if(a[3]=="canceled"||a[3]=="declined"){$("Transaction_"+b).className=BC.Common.StringAppendWord($("Transaction_"+b).className,"cancel");if(a[3]=="declined")$("TransactionAmount_"+
b).className="";a=parseInt(a[3]=="canceled"?a[6]:-a[6]);a=parseInt($("AmountAvailable").firstChild.innerHTML)+a;$("AmountAvailable").firstChild.innerHTML=a;$("AmountAvailable").firstChild.className=a>=0?"green":"red";a=$("AmountAction").getAttribute("onclick").replace(/\'\d+\'\)/g,"'"+a+"')");$("AmountAction").setAttribute("onclick",a)}}else BC.Window.SetError(a[2]);BC.User.TmpTransactionId=!1;BC.Window.Close("Processing")},ConfirmAction:function(a){var b="",c="",d="";switch(a){case "Decline":b=BC.Lang.User.ConfirmTitleDeclineAward;
c=BC.Lang.User.ConfirmTextDeclineAward;d="BC.User.DeclineProcess();";break;case "Approve":b=BC.Lang.User.ConfirmTitleApproveWithdraw;c=BC.Lang.User.ConfirmTextApproveWithdraw;d="BC.User.WithdrawApproveProcess();";break;case "Cancel":b=BC.Lang.User.ConfirmTitleCancelWithdraw;c=BC.Lang.User.ConfirmTextCancelWithdraw;d="BC.User.WithdrawCancelProcess();";break;default:return}$("WindowTitleConfirm").innerHTML=b;$("WindowConfirmText").innerHTML=c;$("WindowConfirmBtnGo").setAttribute("onclick",d);BC.Window.Open("Confirm")},
nl:"",Timer:0,CheckLoginTimerStart:function(a){clearTimeout(BC.Context.Timer);a.value!=""?BC.Context.Timer=setTimeout("BC.User.CheckLogin('"+a.value+"')",1500):(a=$("login_message_error")==void 0?$("login_message_caption"):$("login_message_error"),a.innerHTML="\u043b\u043e\u0433\u0438\u043d",a.className="caption like-window-caption")},CheckLogin:function(a){new Ajax.Request("/user/checklogin/",{method:"post",postBody:"&ajax=ajax&login="+a,onLoading:function(){$("loader_img").show()},onSuccess:BC.User.CheckLoginAnswer})},
CheckLoginAnswer:function(a){var a=a.responseText.evalJSON(!0),b;b=$("login_message_error")==void 0?$("login_message_caption"):$("login_message_error");a.res=="error"?(eval("var varText=BC.Lang.Error."+a.text),b.innerHTML=varText,b.className="caption like-window-caption error"):(b.innerHTML=BC.Lang.User.ChekLogin_Ok,b.className="caption like-window-caption green");$("loader_img").hide()},AuthRequest:function(a){new Ajax.Request("/user/login/",{method:"post",parameters:{login:a.login.value,password:unescape(a.password.value),
remember:a.remember.checked,ajax:"ajax"},onLoading:BC.Window.Open("Processing"),onSuccess:BC.User.AuthAnswer})},AuthAnswer:function(a){a=a.responseText;a=a.split("|");if(a[0]=="Ok")window.location.reload(!0);else if(a[0]=="Error"){for(var b=BC.Window.GetActiveWindowArray(),c=0;c<=b.length-1;c++)BC.Window.Close(b[c]);BC.Window.Close("Processing");BC.Window.Create(a[2]);BC.Window.SetError(a[1],a[2]);for(c=3;c<a.length;c++)if(b=a[c].split("*x*"),b[0]=="remember")$("AuthRemember").checked=!b[1]?!1:!0;
else{var d=$("UserAuthCaption_"+b[0]);$("UserAuthInput_"+b[0]).value=b[1];if(d)b[2]?(d.innerHTML=b[2],d.className="caption like-window-caption error"):(eval("var varCaption=BC.Lang.User.UserAuthCaptionDefault_"+b[0]),d.innerHTML=varCaption,d.className="caption like-window-caption")}}},UserRegisterForm:function(){BC.Window.Display("Register",{captcha:BC.Var.Captcha,captcha_rand:BC.Var.CaptchaRand})},RegisterRequest:function(a){new Ajax.Request("/user/add/",{method:"post",parameters:{login:a.login.value,
mail:a.mail.value,password:a.password.value,showpassword:a.showpassword.checked,captcha:a.captcha.value,ajax:"ajax"},onCreate:BC.Window.Close("Register"),onLoading:BC.Window.Open("Processing"),onSuccess:BC.User.RegisterAnswer})},RegisterAnswer:function(a){a=a.responseText;a=a.split("|");if(a[0]=="Ok")window.location=window.location;else if(a[0]=="Error"){BC.Window.Close("Processing");BC.Window.SetError(a[1],a[2]);for(var b=3;b<a.length;b++){var c=a[b].split("*x*"),d=$(c[0]+"_message_caption");if(d)c[0]==
"showpassword"?$("NewPassShow").checked=c[1]=="true"?!0:!1:c[2]?(d.innerHTML=c[2],d.className="caption like-window-caption error"):(eval("var varCaption=BC.Lang.User.UserRegCaptionDefault_"+c[0]),d.innerHTML=varCaption,d.className="caption like-window-caption")}}},ForgotRequest:function(a){new Ajax.Request("/user/forgot/",{method:"post",parameters:{mail:BC.Common.Escape(a.mail.value),ajax:"ajax"},onCreate:BC.Window.Close("Forgot"),onLoading:BC.Window.Open("Processing"),onSuccess:BC.User.ForgotAnswer})},
ForgotAnswer:function(a){a=a.responseText;a=a.split("|");if(a[0]=="Ok")BC.Window.SetOk(a[1]);else if(a[0]=="Error"){BC.Window.Close("Processing");BC.Window.SetError(a[1],!a[2]?!1:a[2]);for(var b=3;b<a.length;b++){var c=a[b].split("*x*"),d=$("ForgotCaption_"+c[0]);if(d&&c[2])d.innerHTML=c[2],d.className="caption like-window-caption error"}}},PaymentHistory:function(){BC.Window.Display("PaymentHistory",{history:BC.Var.history},"")}};
BC.Messages={MaxLength:0,SetMaxLength:function(a){BC.Messages.MaxLength=a},CountSymbols:function(){var a=$("MessageText").value.length;if(BC.Messages.MaxLength>0){a=BC.Messages.MaxLength-a;if(a>0)var b="";else var b="#FFAFAF",c=$("MessageText").value.substr(0,BC.Messages.MaxLength);$("MessageSymbolsLeft").innerHTML=BC.Lang.Messages.TextLeft+" "+BC.Common.TextAfterNum(a,"BC.Lang.Messages.TextSymbol");$("MessageText").style.backgroundColor=b;if(c)$("MessageText").value=c}},Reply:function(){},TmpMessList:[],
CheckSelection:function(){var a=$("MessagesList").getElementsByTagName("input");BC.Messages.TmpMessList=[];for(var b=0;b<a.length;b++)a[b].type=="checkbox"&&a[b].name.substr(0,2)=="m_"&&a[b].checked&&BC.Messages.TmpMessList.push(a[b].name.substr(2));return BC.Messages.TmpMessList.length==0?(BC.Window.SetError(BC.Lang.Messages.ErrorTextNoSelectedMessages),!1):!0},ConfirmAction:function(a){var b="",c="",d="";switch(a){case "Delete":b=BC.Lang.Messages.ConfirmTitleDeleteMessage;c=BC.Lang.Messages.ConfirmTextDeleteMessage;
d="window.location='/message/"+BC.Messages.TmpMessId+"/delete/'";BC.Messages.TmpMessId=0;break;case "DeleteSelected":BC.Messages.TmpMessList.length>1?(b=BC.Lang.Messages.ConfirmTitleDeleteMessages,c=BC.Lang.Messages.ConfirmTextDeleteSelectedMessages):(b=BC.Lang.Messages.ConfirmTitleDeleteMessage,c=BC.Lang.Messages.ConfirmTextDeleteSelectedMessage);d="BC.Messages.DeleteSelectedProcess();";break;case "MarkAsRead":BC.Messages.TmpMessList.length>1?(b=BC.Lang.Messages.ConfirmTitleMarkAsReadMessages,c=
BC.Lang.Messages.ConfirmTextMarkAsReadMessages):(b=BC.Lang.Messages.ConfirmTitleMarkAsReadMessage,c=BC.Lang.Messages.ConfirmTextMarkAsReadMessage);d="BC.Messages.MarkAsReadProcess();";break;default:return}$("WindowTitleConfirm").innerHTML=b;$("WindowConfirmText").innerHTML=c;$("WindowConfirmBtnGo").setAttribute("onclick",d);BC.Window.Open("Confirm")},TmpMessId:0,DeleteMess:function(a){BC.Messages.TmpMessId=a;BC.Messages.ConfirmAction("Delete")},DeleteSelected:function(){BC.Messages.CheckSelection()&&
BC.Messages.ConfirmAction("DeleteSelected")},DeleteSelectedProcess:function(){for(var a="ajax=ajax",b=0;b<BC.Messages.TmpMessList.length;b++)a+="&m_"+BC.Messages.TmpMessList[b]+"=1";new Ajax.Request("/message/delete/",{method:"post",postBody:a,onSuccess:BC.Messages.DeleteSelectedResult});BC.Window.Open("Processing");BC.Window.Close("Confirm")},DeleteSelectedResult:function(a){a=a.responseText;a=a.split("|");if(a[0]=="ok"){BC.Window.SetOk(a[2]);for(var a=$("MessagesList"),b=0;b<BC.Messages.TmpMessList.length;b++){var c=
$("MessageBlock_"+BC.Messages.TmpMessList[b]);c&&a.removeChild(c)}}else BC.Window.SetError(a[2]);BC.Window.Close("Processing");BC.Messages.TmpMessList=[]},MarkAsRead:function(){BC.Messages.CheckSelection()&&BC.Messages.ConfirmAction("MarkAsRead")},MarkAsReadProcess:function(){for(var a="ajax=ajax",b=0;b<BC.Messages.TmpMessList.length;b++)a+="&m_"+BC.Messages.TmpMessList[b]+"=1";new Ajax.Request("/message/markasread/",{method:"post",postBody:a,onSuccess:BC.Messages.MarkAsReadResult});BC.Window.Open("Processing");
BC.Window.Close("Confirm")},MarkAsReadResult:function(a){a=a.responseText;a=a.split("|");if(a[0]=="ok"){BC.Window.SetOk(a[2]);for(a=0;a<BC.Messages.TmpMessList.length;a++){var b=BC.Messages.TmpMessList[a],c=$("MessageBlock_"+b);if(c)c.className=BC.Common.StringRemoveWord(c.className,"unread"),$("m_"+b).checked=!1}}else BC.Window.SetError(a[2]);BC.Window.Close("Processing");BC.Messages.TmpMessList=[]},feedbackSendMailRequest:function(a){var b=a.captcha!=void 0?BC.Common.Escape(a.captcha.value):!1;
new Ajax.Request("/feedback/",{method:"post",parameters:{ajax:"ajax",email:BC.Common.Escape(a.email.value),message:a.message.value,id_subject:BC.Common.Escape(a.id_subject.value),captcha:b},onSuccess:BC.Messages.feedbackSendMailAnswer})},feedbackSendMailAnswer:function(a){a=a.responseText;a=a.split("|");if(a[0]=="ok")BC.Window.Close("Feedback"),BC.Window.SetOk(a[1]);else{BC.Window.Close("Feedback");BC.Window.SetErrorWithJSBtn(a[1],"BC.Messages.feedbackSubjectRequest();");for(var b=3;b<a.length;b++){var c=
a[b].split("*x*"),d=$("Feedback_caption_"+c[0]);if(d){if(c[0]=="id_subject")BC.Messages.feedbackSubject=c[1],BC.Messages.feedbackError=!0;c[2]?(d.innerHTML=c[2],d.className="caption like-window-caption error"):(eval("var varCaption=BC.Lang.Messages.FeedbackCaption_"+c[0]),d.innerHTML=varCaption,d.className="caption like-window-caption")}}}},feedbackSubjectRequest:function(a){var b={User:BC.Var.User,Auth:BC.Var.Auth,captcha:BC.Var.Captcha,rand:BC.Var.CaptchaRand,wwidth:Prototype.Browser.IE?"620":"600"};
$("WindowFeedback")||BC.Window.Create("Feedback",b);if(BC.Messages.feedbackError)BC.Messages.feedbackError=!1;else switch(a){case "all":BC.Messages.feedbackSubject=1;break;case "upgrade":BC.Messages.feedbackSubject=2;break;case "error":BC.Messages.feedbackSubject=3;break;case "context":BC.Messages.feedbackSubject=4;break;case "banner":BC.Messages.feedbackSubject=5;break;default:BC.Messages.feedbackSubject=!1}if(BC.Messages.feedbackFirst)new Ajax.Request("/feedback/getsubject",{method:"post",parameters:{ajax:"ajax"},
onSuccess:BC.Messages.feedbackSubjectAnswer,onLoading:BC.Window.Open("Processing")});else{a=$("subject_select");for(b=0;b<=a.options.length-1;b++)if(a.options[b].value==BC.Messages.feedbackSubject)a.options[b].selected=!0;BC.Window.Open("Feedback")}},feedbackSubject:"",feedbackError:!1,feedbackFirst:!0,feedbackSubjectAnswer:function(a){var a=a.responseText.evalJSON(!0),b=$("subject_select"),c=BC.Messages.feedbackSubject;if(b.options.length>1)b.options.length=1;for(p in a){var d=a[p];if(d.subject!=
void 0&&(b.options[b.options.length]=new Option(d.subject,d.id_subject),d.id_subject==c&&c!=!1))b.options[b.options.length-1].selected=!0}BC.Window.Close("Processing");BC.Window.Open("Feedback")},feedbacNotificationToogle:function(a){a.options[a.selectedIndex].value=="1"?$("feedback_window_notation").show():$("feedback_window_notation").hide()}};
BC.SiteNews={Close:function(a){$("NewsBanner_"+a).style.display="none";BC.Common.SetCookie("BC-news-banner",a,"Friday, 31-Dec-2020 23:59:59 GMT","/")},Confirm:function(a,b){var c="",d="",e="";switch(b){case "Lock":c=BC.Lang.SiteNews.StatusWinTitle_lock;d=BC.Lang.SiteNews.StatusWinText_lock;e="BC.SiteNews.LockProcess();";break;case "Unlock":c=BC.Lang.SiteNews.StatusWinTitle_unlock;d=BC.Lang.SiteNews.StatusWinText_unlock;e="BC.SiteNews.UnlockProcess();";break;case "Deactivate":c=BC.Lang.SiteNews.StatusWinTitle_deactivate;
d=BC.Lang.SiteNews.StatusWinText_deactivate;e="BC.SiteNews.DeactivateProcess();";break;case "Activate":c=BC.Lang.SiteNews.StatusWinTitle_activate;d=BC.Lang.SiteNews.StatusWinText_activate;e="BC.SiteNews.ActivateProcess();";break;default:return}$("WindowTitleConfirm").innerHTML=c;$("WindowConfirmText").innerHTML=d.replace(/#NEWS_TITLE#/i,$("SiteNewsTitle_"+a).innerHTML);$("WindowConfirmBtnGo").setAttribute("onclick",e);BC.SiteNews.TmpId=a;BC.Window.Open("Confirm")},LockProcess:function(){BC.SiteNews.StatusSave("/site_news/"+
BC.SiteNews.TmpId+"/lock/")},UnlockProcess:function(){BC.SiteNews.StatusSave("/site_news/"+BC.SiteNews.TmpId+"/unlock/")},DeactivateProcess:function(){BC.SiteNews.StatusSave("/site_news/"+BC.SiteNews.TmpId+"/deactivate/")},ActivateProcess:function(){BC.SiteNews.StatusSave("/site_news/"+BC.SiteNews.TmpId+"/activate/")},StatusSave:function(a){new Ajax.Request(a,{method:"post",postBody:"ajax=ajax",onSuccess:BC.SiteNews.StatusSaveResult});BC.Window.Open("Processing");BC.Window.Close("Confirm")},StatusSaveResult:function(a){var a=
a.responseText,a=a.split("|"),b=a[1];if(a[0]=="ok")switch(BC.Window.SetOk(a[2]),a[3]){case "locked":$("SiteNewsBlock_"+b).className=BC.Common.StringAppendWord($("SiteNewsBlock_"+b).className,"article-locked");$("SiteNewsActionLock_"+b).style.display="none";$("SiteNewsActionUnlock_"+b).style.display="";break;case "unlocked":$("SiteNewsBlock_"+b).className=BC.Common.StringRemoveWord($("SiteNewsBlock_"+b).className,"article-locked");$("SiteNewsActionLock_"+b).style.display="";$("SiteNewsActionUnlock_"+
b).style.display="none";break;case "deactivated":a=$("SiteNewsBlock_"+b);a.parentNode.removeChild(a);break;case "activated":a=$("SiteNewsBlock_"+b),a.parentNode.removeChild(a)}else BC.Window.SetError(a[2]);BC.Window.Close("Processing");BC.SiteNews.TmpId=!1}};
BC.Static={CountrySMS:"UA",oFCK:{},FCK_id:0,EditCreateFCK:function(a,b){BC.Static.FCK_id=b;new Ajax.Request("/static/createfckeditor/",{method:"post",parameters:{conf:a,id:b,ajax:"ajax"},onSuccess:BC.Static.CreateFCKRequest})},CreateFCKRequest:function(a){a=a.responseJSON;a.error==void 0&&(CKEDITOR.instances.static_text.setData(a.config.Text),BC.Static.EditOpenForm(BC.Static.FCK_id))},EditOpenForm:function(a){$("StaticEditText_"+a).style.display="none";$("StaticEditForm_"+a).style.display="";window.location.hash=
"StaticEditForm_"+a},EditCloseForm:function(a){$("StaticEditForm_"+a).style.display="none";$("StaticEditText_"+a).style.display="";window.location.hash="StaticEditText_"+a},AddToBalanceOpenForm:function(a){BC.Window.Create(a,{purses:BC.Var.Purses,desc:BC.Var.Desc,Donate_x_WMID:BC.Var.Donate_x_WMID,mode:BC.Var.WM_mode,user_id:BC.User.Info.id});$(a+"_VolumeCaption").innerHTML=BC.Lang.User.ContextAdvAddToBalanceDefault_title;$(a+"_VolumeCaption").className="caption like-window-caption";BC.Window.Open(a)},
BeforePay:function(a){if($(a+"_Volume").value=="")return $(a+"_VolumeCaption").innerHTML=BC.Lang.User.ContextAdvAddToBalanceError_title,$(a+"_VolumeCaption").className="caption like-window-caption error",!1;else{var b=$(a+"_Volume").value.split(",");$(a+"_Volume").value=b.join(".")}}};
BC.Search={Focus:function(){var a=$("SearchForm");a&&a.q.focus()},Start:function(a){a.action="/find/"+a.q.value+"/"},StartAdvanced:function(a){var b=a.type.value,c="";if($("SearchType_10").checked)c=a.blog.value;b=encodeURI(a.q.value+"*"+b+"*"+c);a.action="/advanced_search/"+b+"/"},Advanced:function(){if(BC.Var.SelectedTypes){var a=[],b;for(b in BC.Var.SelectedTypes)b!=void 0&&a.push(parseInt(BC.Var.SelectedTypes[b]))}var c=0;if(BC.Var.SelectedBlogs){var d=[];for(b in BC.Var.SelectedBlogs)b!=void 0&&
d.push(parseInt(BC.Var.SelectedBlogs[b]));b=d.sort(function(a,b){return a-b}).join("+");c=BC.Var.BlogList=="+"+b?1:0}BC.Window.Create("Search",{SearchBlogs:BC.Var.SearchBlogs,SearchTypes:BC.Var.SearchTypes,SelectedTypes:a,SelectedBlogs:d,TypeAll:BC.Var.TypeAll,BlogsAll:c});$("SearchFormFull").q.value=$("SearchForm").q.value;BC.Search.ToogleBlogsState($("SearchType_10").checked);BC.Window.Open("Search")},AddItems:function(a){var b=$("Search"+a+"sBlock").getElementsByTagName("input"),c=$("Search"+a+
"_all").checked;a=="Type"&&BC.Search.ToogleBlogsState(c);for(var d="",e=1;e<b.length;e++)b[e].checked=c,d+="+"+b[e].name.replace(/[^0-9]/g,"");$("Search"+a+"s").value=c?d:""},ToogleBlogsState:function(a){var b=$$("#SearchBlogsBlock input");a?(b.invoke("enable"),$("SearchBlogsBlock").removeClassName("search_form_blog_disable")):(b.invoke("disable"),$("SearchBlogsBlock").addClassName("search_form_blog_disable"))},AddItem:function(a,b){var c=$("Search"+b+"_"+a).checked,d=$("Search"+b+"s").value,e=RegExp("\\+"+
a+"(\\+|$)","g");if(c)d.search(e)==-1&&(d+="+"+a);else if(e=d.search(e),e!=-1)var f=e+("+"+a).length,d=d.substr(0,e)+d.substr(f);$("Search"+b+"s").value=d;d=$("Search"+b+"sBlock").getElementsByTagName("input");e=!0;for(f=1;f<d.length;f++)if(!d[f].checked){e=!1;break}d[0].checked=e;a==10&&b=="Type"&&BC.Search.ToogleBlogsState(c)}};
BC.Estimate={Factors:[],Squares:[],CheckOpen:function(){window.location.hash=="#zakaz"&&BC.Estimate.Open()},MakePrice:function(){var a=parseFloat($("EstSquare").value.replace(/,/,"."));if(a){for(var b=0,b=a<=150?BC.Estimate.Squares["1"]:a<=400?BC.Estimate.Squares["2"]:BC.Estimate.Squares["3"],c=$("EstFactors").getElementsByTagName("input"),d=[],e=0;e<c.length;e++)c[e].checked&&d.push(parseInt(c[e].id.replace(/Est_/,"")));var c=d=d.length?"+"+d.join("+"):"",f=0;for(e in BC.Estimate.Factors)if(typeof BC.Estimate.Factors[e]==
"number"){var g=e.replace(/\+/g,"\\+"),h=RegExp(g+"\\+",""),l=RegExp(g+"$","");d.search(RegExp(g+"(\\+|$)",""))!=-1&&(d=d.replace(h,"+").replace(l,""),f+=b*(BC.Estimate.Factors[e]-1))}$("EstCost").style.visibility="";$("EstBaseCost").style.visibility="";$("EstCostValue").innerHTML=Math.round(b+f);$("EstBaseCostValue").innerHTML=Math.round(b);$("EstimateForm").square.value=a;$("EstimateForm").factors.value=c}else $("EstBaseCost").style.visibility=$("EstCost").style.visibility="",$("EstBaseCostValue").innerHTML=
$("EstCostValue").innerHTML="0"},Open:function(){window.location.hash="#zakaz";BC.Window.Open("EstimateConf")},Cancel:function(){window.location.hash="#"},ConfigDone:function(){BC.Estimate.CheckStep(1)&&(BC.Window.Open("EstimateContacts"),BC.Window.Close("EstimateConf"))},CheckStep:function(a){var b=!1;switch(a){case 2:a=$("EstimateForm");a.name.value.trim()==""?($("EstCaption_name").innerHTML=BC.Lang.Estimate.CaptionError_name,$("EstCaption_name").className="caption error",b=!0):($("EstCaption_name").innerHTML=
BC.Lang.Estimate.CaptionDefault_name,$("EstCaption_name").className="caption");a.country.value.trim()==""?($("EstCaption_country").innerHTML=BC.Lang.Estimate.CaptionError_country,$("EstCaption_country").className="caption error",b=!0):($("EstCaption_country").innerHTML=BC.Lang.Estimate.CaptionDefault_country,$("EstCaption_country").className="caption");a.region.value.trim()==""?($("EstCaption_region").innerHTML=BC.Lang.Estimate.CaptionError_region,$("EstCaption_region").className="caption error",
b=!0):($("EstCaption_region").innerHTML=BC.Lang.Estimate.CaptionDefault_region,$("EstCaption_region").className="caption");if(a.pay_type.value.trim()=="")$("EstCaption_pay_type").innerHTML=BC.Lang.Estimate.CaptionError_pay_type,$("EstCaption_pay_type").className="caption error",$("EstCaption_wmid").innerHTML=BC.Lang.Estimate.CaptionDefault_wmid,$("EstCaption_wmid").className="caption",b=!0;else if($("EstCaption_pay_type").innerHTML=BC.Lang.Estimate.CaptionDefault_pay_type,$("EstCaption_pay_type").className=
"caption",a.pay_type.value==2&&a.wmid.value.trim().length<12)$("EstCaption_wmid").innerHTML=BC.Lang.Estimate.CaptionError_wmid,$("EstCaption_wmid").className="caption error";else if(a.pay_type.value==3){if($("EstCaption_contacts").innerHTML=" ("+BC.Lang.Estimate.CaptionLiqpayError_status+")",a.email.value.trim()==""||a.phone.value.trim()==""){$("EstCaption_contacts").innerHTML=" ("+BC.Lang.Estimate.CaptionLiqpayError_status+")";$("EstCaption_contacts").className="small error";var c=b=!0}}else $("EstCaption_wmid").innerHTML=
BC.Lang.Estimate.CaptionDefault_wmid,$("EstCaption_wmid").className="caption";a.userfile.value.trim()==""&&!$("EstFile")?($("EstCaption_userfile").innerHTML=BC.Lang.Estimate.CaptionError_userfile,$("EstCaption_userfile").className="caption error",b=!0):($("EstCaption_userfile").innerHTML=BC.Lang.Estimate.CaptionDefault_userfile,$("EstCaption_userfile").className="caption");if(a.email.value.trim()==""&&a.phone.value.trim()==""&&a.icq.value.trim()==""&&a.jabber.value.trim()==""&&a.skype.value.trim()==
"")$("EstCaption_contacts").className="small error",c?$("EstCaption_contacts").innerHTML=" ("+BC.Lang.Estimate.CaptionLiqpayError_status+")":$("EstCaption_contacts").innerHTML=BC.Lang.Estimate.CaptionNoneLiqpayError_status,b=!0;else if(!c)$("EstCaption_contacts").className="small",$("EstCaption_contacts").innerHTML=BC.Lang.Estimate.CaptionNoneLiqpayError_status;break;case 1:parseFloat($("EstSquare").value.replace(/,/,"."))?($("EstCaption_square").innerHTML=BC.Lang.Estimate.CaptionDefault_square,$("EstCaption_square").className=
""):($("EstCaption_square").innerHTML=BC.Lang.Estimate.CaptionError_square,$("EstCaption_square").className="error",b=!0)}return!b},Submit:function(){return!BC.Estimate.CheckStep(2)?!1:!0},Status:function(a){$("EstimateStatusWin").action="/smeta/"+a+"/status/";$("EstimateStatusWin").status.value=$("EstStatus_"+a).innerHTML;BC.Window.Open("EstimateStatus")},StatusSave:function(a){new Ajax.Request(a.action,{method:"post",postBody:"status="+a.status.value+"&ajax=ajax",onSuccess:BC.Estimate.StatusSaveResult});
BC.Window.Open("Processing");BC.Window.Close("EstimateStatus")},StatusSaveResult:function(a){var a=a.responseText,a=a.split("|"),b=a[1];if(a[0]=="ok")BC.Window.SetOk(a[2]),$("EstStatus_"+b).innerHTML=a[3],$("EstStatusText_"+b).innerHTML=a[4];else{BC.Window.SetError(a[2],"EstimateStatus");for(b=3;b<a.length;b++){var c=a[b].split("*x*"),d=$("EstCaption_"+c[0]);if(d)c[2]?(d.innerHTML=c[2],d.className="caption error"):(eval("var varCaption=BC.Lang.Estimate.CaptionDefault_"+c[0]),d.innerHTML=varCaption,
d.className="caption")}}BC.Window.Close("Processing")},PayCheck:function(){$("EstPay").value==3?$("EstCaption_contacts").innerHTML=" ("+BC.Lang.Estimate.CaptionLiqpayError_status+")":$("EstCaption_contacts").innerHTML=BC.Lang.Estimate.CaptionNoneLiqpayError_status;$("EstCaption_contacts").className="small";$("EstPayWM").style.display=$("EstPay").value==2?"":"none"}};BC.Estimate.Squares["1"]=500;BC.Estimate.Squares["2"]=700;BC.Estimate.Squares["3"]=950;BC.Estimate.Factors["+1+2"]=1.14;
BC.Estimate.Factors["+1"]=1.13;BC.Estimate.Factors["+2"]=1.13;BC.Estimate.Factors["+3+4+5"]=1.12;BC.Estimate.Factors["+3+4"]=1.12;BC.Estimate.Factors["+3+5"]=1.12;BC.Estimate.Factors["+4+5"]=1.12;BC.Estimate.Factors["+3"]=1.1;BC.Estimate.Factors["+4"]=1.1;BC.Estimate.Factors["+5"]=1.1;BC.Estimate.Factors["+6"]=1.1;BC.Estimate.Factors["+7"]=1.09;BC.Estimate.Factors["+8"]=1.03;BC.Estimate.Factors["+9"]=1.06;BC.Estimate.Factors["+10"]=1.05;BC.Estimate.Factors["+11"]=1.05;BC.Estimate.Factors["+12"]=1.04;
BC.Estimate.Factors["+13"]=0.78;
BC.Titles={Edit:function(a,b){BC.Window.Create("Titles");var c=$("TitlesPage_"+a).innerHTML,d=$("TitlesType_"+a).innerHTML,e=$("TitlesParam_"+a+"_"+b).innerHTML;switch(d){case "static":c=""+c;break;case "blog":c="\u0420\u0430\u0437\u0434\u0435\u043b \u0441\u0442\u0430\u0442\u0435\u0439 &laquo;"+c+"&raquo;"}$("TitlesWinCaption_text").innerHTML="<b>"+c+":</b><br/>"+e;c=$("TitlesWin");c.text.value=$("TitlesValue_"+a+"_"+b).innerHTML;c.section.value=a;c.param.value=b;BC.Window.Open("Titles")},SaveProcess:function(a){a=
"ajax=ajax&param="+BC.Common.Escape(a.param.value)+"&section="+BC.Common.Escape(a.section.value)+"&text="+BC.Common.Escape(a.text.value);new Ajax.Request("/adv/edittitles/",{method:"post",postBody:a,onSuccess:BC.Titles.SaveResult,onFailure:function(){windowShowErrorText("\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437 \u0438\u043b\u0438 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044c \u043a \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0443.");
$("SearchTitles_InfoBar_"+id).style.display="none"}});BC.Window.Open("Processing");BC.Window.Close("Titles")},SaveResult:function(a){a=a.responseText;a=a.split("|");a[0]=="ok"?(BC.Window.SetOk(a[3]),$("TitlesValue_"+a[1]+"_"+a[2]).innerHTML=$("TitlesWin").text.value):BC.Window.SetError(a[3],"Titles");BC.Window.Close("Processing")}};
BC.Promo={BufferId:1,Timer:0,Timeout:0.5,Types:[],Settings:function(a,b){var c=$("PromoSettings"+a+"_"+b).className=="pt",d;for(d in BC.Promo.Types)if(typeof BC.Promo.Types[d]!="function")$("PromoSettings"+a+"_"+d).className="pt";if(c)$("PromoSettings"+a+"_"+b).className="pt opened",BC.Promo.GetContentCompanyRequest(a,BC.Promo.Types[b],b),BC.Promo.FindCompanyRequest("find"+a+"_"+b+"_addarea")},SaveSettings:function(a,b){var c=$("promo"+a+"_"+b+"_delarea"),d=[];for(i=0;i<c.options.length;i++)d.push(c.options[i].value);
c="ajax=ajax&company="+a+"&type="+BC.Promo.Types[b]+"&list="+d.join(",");new Ajax.Request("/adv/edit/?"+c,{method:"get",postBody:"",onSuccess:function(){BC.Promo.Settings(a,b)}})},CheckButtons:function(a,b,c){for(var d=$("promo"+a+"_"+b+"_"+c+"area").options,e=!0,f=0;f<d.length;f++)d[f].selected&&(e=!1);$("promo"+a+"_"+b+"_"+c).disabled=e},Disabler:function(a,b,c){if(c==void 0)for(var c=[],d=$("promo"+a+"_"+b+"_delarea"),e=0;e<d.options.length;e++)c.push(d.options[e].value);for(var a=$("promo"+a+
"_"+b+"_addarea"),e=0;e<a.options.length;e++)a.options[e].disabled=c.contain(a.options[e].value)?!0:!1},GroupClick:function(a,b){if(b.innerHTML!=""&&a.target==b)if(b.className==""){b.className="closed";var c=b.getElementsByTagName("option");for(i=0;i<c.length;i++)c[i].selected=!1}else b.className=""},GroupDblclick:function(a,b){if(b.innerHTML!=""&&a.target==b){b.className!=""&&BC.Promo.GroupClick(a,b);var c=b.childNodes;for(i=0;i<c.length;i++)if(!c[i].disabled)c[i].selected=!0}},AddItem:function(a,
b){var c=$("promo"+a+"_"+b+"_delarea"),d=$("promo"+a+"_"+b+"_addarea");if(b=="text")for(i=0;i<d.options.length;i++){if(d.options[i].selected){var e=d.options[i].blog,f=$("promo"+a+"_"+b+"_delarea_optgrp"+e);if(!f)f=document.createElement("optgroup"),f.label=d.options[i].parentNode.label,f.id="promo"+a+"_"+b+"_delarea_optgrp"+e,f.setAttribute("ondblclick",d.options[i].parentNode.getAttribute("ondblclick")),f.setAttribute("onclick",d.options[i].parentNode.getAttribute("onclick")),c.appendChild(f);e=
new Option(d.options[i].text,d.options[i].value);e.setAttribute("ondblclick",d.options[i].getAttribute("ondblclick"));f.appendChild(e);d.options[i].selected=!1;d.options[i].disabled=!0}}else for(i=0;i<d.options.length;i++)if(d.options[i].selected)f=c.options.length,c.options[f]=new Option(d.options[i].text,d.options[i].value),c.options[f].setAttribute("ondblclick",d.options[i].getAttribute("ondblclick")),d.options[i].selected=!1,d.options[i].disabled=!0;$("promo"+a+"_"+b+"_add").disabled=!0;$("promo"+
a+"_"+b+"_add").blur()},DeleteItem:function(a,b){var c=$("promo"+a+"_"+b+"_delarea");$("promo"+a+"_"+b+"_addarea");var d=[];if(b=="text")for(i=0;i<c.options.length;)if(c.options[i].selected){var e=c.options[i].parentNode;e.removeChild(c.options[i]);e.childNodes.length==0&&c.removeChild(e)}else d.push(c.options[i].value),i++;else for(i=0;i<c.options.length;)c.options[i].selected?c.options[i]=null:(d.push(c.options[i].value),i++);BC.Promo.Disabler(a,b,d);$("promo"+a+"_"+b+"_del").disabled=!0;$("promo"+
a+"_"+b+"_del").blur()},StartSearchRequest:function(a,b){clearTimeout(BC.Promo.Timer);a.keyCode==13?BC.Promo.FindCompanyRequest(b):BC.Promo.Timer=setTimeout("BC.Promo.FindCompanyRequest('"+b+"')",BC.Promo.Timeout*1E3)},FindCompanyRequest:function(a){clearTimeout(BC.Promo.Timer);var b=document.forms[a],b={ajax:"ajax",type:b.type.value,id:b.id.value,block:b.block.value,area:b.area.value,bid:BC.Promo.BufferId,search:b.search.value};$(a+"_loader").style.display="";BC.Promo.BufferId++;new Ajax.Request("/adv/find/",
{method:"post",parameters:b,onSuccess:this.FindCompanySetResult})},FindCompanySetResult:function(a){var a=a.responseJSON,b=a.search_results,c=a.p_block,d=a.p_id,e=a.p_area,a=a.bid;if(e=="add"){var f=$("promo"+d+"_"+c+"_addarea"),g=f.options.length;for(i=0;i<g;i++)f.options[0]=null;f.innerHTML="";i=0;var h="";if(c=="text")for(key in b){if(typeof b[key]!="function"){var l=$("promo"+d+"_"+c+"_addarea_optgrp"+key);if(!l)l=document.createElement("optgroup"),l.label=b[key].blog_name,l.disabled=b[key].full,
l.id="promo"+d+"_"+c+"_addarea_optgrp"+key,b[key].topics&&(l.setAttribute("ondblclick","BC.Promo.GroupDblclick(event,this); event.returnValue=false;"),l.setAttribute("onclick","BC.Promo.GroupClick(event,this); event.returnValue=false;")),f.appendChild(l);g=b[key].topics;for(key2 in g)if(typeof g[key2]!="function"){var m=new Option(g[key2].title,g[key2].parent_id),h="/topic/"+g[key2].parent_id+"/",h='window.open("'+h+'","promo_dest")';m.setAttribute("ondblclick",h);m.blog=key;l.appendChild(m)}}}else for(key in b)if(typeof b[key]!=
"function"){switch(c){case "static":f.options[i]=new Option(b[key].title,b[key].parent_id);h="";break;case "blogs":f.options[i]=new Option(b[key].title,b[key].parent_id);h="";break;case "term":f.options[i]=new Option(b[key].title,b[key].parent_id);h="/term/"+b[key].parent_id+"/";break;case "theme":f.options[i]=new Option(b[key].title,b[key].parent_id);h="/tags/"+b[key].parent_id+"/";break;default:h=""}h!=""&&(h='window.open("'+h+'","promo_dest")',f.options[i].setAttribute("ondblclick",h));i++}}else{f=
$("promo"+d+"_"+c+"_delarea");h=[];if(c=="text")for(key in b){if(typeof b[key]!="function")for(key2 in g=b[key].topics,g)typeof g[key2]!="function"&&h.push(g[key2].parent_id)}else for(key in b)typeof b[key]!="function"&&h.push(b[key].parent_id);for(i=0;i<f.options.length;i++)f.options[i].style.display=h.contain(f.options[i].value)?"":"none"}$("find"+d+"_"+c+"_"+e+"area_loader").style.display="none";$("promo"+d+"_"+c+"_"+e).disabled=!0;BC.Promo.Disabler(d,c);$("AdminBuffer").removeChild($("AdminBufferItem"+
a));eval("var res"+a+"=null")},GetContentCompanyRequest:function(a,b,c){b="&company="+a+"&type="+b+"&block="+c+"& bid="+BC.Promo.BufferId;$("find"+a+"_"+c+"_delarea_loader").style.display="";a=document.createElement("div");a.id="AdminBufferItem"+BC.Promo.BufferId;c=document.createElement("script");c.src="/adv/getcontent/?ajax=ajax"+b;c.type="text/javascript";a.appendChild(c);$("AdminBuffer").appendChild(a);BC.Promo.BufferId++},GetContentCompanySetResult:function(a,b,c){eval("var result=res"+c);var d=
$("promo"+a+"_"+b+"_delarea"),e=d.options.length;for(i=0;i<e;i++)d.options[0]=null;d.innerHTML="";i=0;e="";if(b=="text")for(key in result){if(typeof result[key]!="function"){var f=$("promo"+a+"_"+b+"_delarea_optgrp"+key);if(!f)f=document.createElement("optgroup"),f.label=result[key].title,f.disabled=result[key].full,f.id="promo"+a+"_"+b+"_delarea_optgrp"+key,result[key].topics&&(f.setAttribute("ondblclick","BC.Promo.GroupDblclick(event,this); event.returnValue=false;"),f.setAttribute("onclick","BC.Promo.GroupClick(event,this); event.returnValue=false;")),
d.appendChild(f);var g=result[key].topics;for(key2 in g)if(typeof g[key2]!="function"){var h=new Option(g[key2],key2),e="/topic/"+key2+"/",e='window.open("'+e+'","promo_dest")';h.setAttribute("ondblclick",e);h.blog=key;f.appendChild(h)}}}else for(key in result)if(typeof result[key]!="function"){switch(b){case "text":d.options[i]=new Option(result[key],key);e="/topic/"+key+"/";break;case "static":d.options[i]=new Option(result[key],key);e="";break;case "blogs":d.options[i]=new Option(result[key],key);
e="";break;case "term":d.options[i]=new Option(result[key],key);e="/term/"+key+"/";break;case "theme":d.options[i]=new Option(result[key][0],key);e="/tags/"+result[key][1]+"/";break;default:e=""}e!=""&&(e='window.open("'+e+'","promo_dest")',d.options[i].setAttribute("ondblclick",e));i++}$("find"+a+"_"+b+"_delarea_loader").style.display="none";$("promo"+a+"_"+b+"_del").disabled=!0;BC.Promo.Disabler(a,b);$("AdminBuffer").removeChild($("AdminBufferItem"+c));eval("var res"+c+"=null")},Confirm:function(a,
b){var c="",d="",e="";switch(b){case "Lock":c=BC.Lang.Promo.StatusWinTitle_lock;d=BC.Lang.Promo.StatusWinText_lock;e="BC.Promo.LockProcess("+a+");";break;case "Unlock":c=BC.Lang.Promo.StatusWinTitle_unlock;d=BC.Lang.Promo.StatusWinText_unlock;e="BC.Promo.UnlockProcess("+a+");";break;case "Deactivate":c=BC.Lang.Promo.StatusWinTitle_deactivate;d=BC.Lang.Promo.StatusWinText_deactivate;e="BC.Promo.DeactivateProcess("+a+");";break;case "Activate":c=BC.Lang.Promo.StatusWinTitle_activate,d=BC.Lang.Promo.StatusWinText_activate,
e="BC.Promo.ActivateProcess("+a+");"}$("WindowTitleConfirm").innerHTML=c;$("WindowConfirmText").innerHTML=d.replace(/#PROMO_TITLE#/i,$("PromoTitle_"+a).innerHTML);$("WindowConfirmBtnGo").setAttribute("onclick",e);BC.Window.Open("Confirm")},LockProcess:function(a){BC.Promo.StatusSave("/adv/"+a+"/lock/")},UnlockProcess:function(a){BC.Promo.StatusSave("/adv/"+a+"/unlock/")},DeactivateProcess:function(a){BC.Promo.StatusSave("/adv/"+a+"/deactive/")},ActivateProcess:function(a){BC.Promo.StatusSave("/adv/"+
a+"/activate/")},StatusSave:function(a){new Ajax.Request(a,{method:"post",postBody:"ajax=ajax",onSuccess:BC.Promo.StatusSaveResult});BC.Window.Open("Processing");BC.Window.Close("Confirm")},StatusSaveResult:function(a){var a=a.responseText,a=a.split("|"),b=a[1],c=$("PromoBlock_"+b);if(a[0]=="ok")switch(BC.Window.SetOk(a[2]),a[3]){case "locked":$("PromoBlock_"+b).className=BC.Common.StringAppendWord($("PromoBlock_"+b).className,"article-locked");$("PromoActionLock_"+b).style.display="none";$("PromoActionUnlock_"+
b).style.display="";break;case "unlocked":$("PromoBlock_"+b).className=BC.Common.StringRemoveWord($("PromoBlock_"+b).className,"article-locked");$("PromoActionLock_"+b).style.display="";$("PromoActionUnlock_"+b).style.display="none";break;case "deactivated":c.hasClassName("article-locked")&&c.removeClassName("article-locked");c.hide();$("PromoActionEdit_"+b).hide();$("PromoActionDeactivate_"+b).hide();$("PromoActionLock_"+b).hide();$("PromoActionUnlock_"+b).hide();break;case "activated":$("PromoBlock_"+
b).className=BC.Common.StringRemoveWord($("PromoBlock_"+b).className,"article-locked"),$("PromoActionUnlock_"+b).style.display=$("PromoActionActivate_"+b).style.display="none",$("PromoActionEdit_"+b).style.display=$("PromoActionLock_"+b).style.display=""}else BC.Window.SetError(a[2]);BC.Window.Close("Processing")},Add:function(){BC.Window.Create("PromoCompany");$("WindowTitlePromoCompany").innerHTML=BC.Lang.Promo.WinTitleAdd;$("PromoCompanyWinCaption_title").className=$("PromoCompanyWinCaption_keyname").className=
"caption like-window-caption";$("PromoCompanyWinCaption_title").innerHTML=BC.Lang.Promo.CaptionDefault_title;$("PromoCompanyWinCaption_keyname").innerHTML=BC.Lang.Promo.CaptionDefault_keyname;$("PromoCompanyWinInput_title").value=$("PromoCompanyWinInput_keyname").value="";$("PromoCompanyWin").action="/adv/addcompany/";BC.Window.Open("PromoCompany")},Edit:function(a){BC.Window.Create("PromoCompany");$("WindowTitlePromoCompany").innerHTML=BC.Lang.Promo.WinTitleEdit;$("PromoCompanyWinCaption_title").className=
$("PromoCompanyWinCaption_keyname").className="caption like-window-caption";$("PromoCompanyWinCaption_title").innerHTML=BC.Lang.Promo.CaptionDefault_title;$("PromoCompanyWinCaption_keyname").innerHTML=BC.Lang.Promo.CaptionDefault_keyname;$("PromoCompanyWinInput_title").value=$("PromoTitle_"+a).innerHTML;$("PromoCompanyWinInput_keyname").value=$("PromoKeyname_"+a).innerHTML;$("PromoCompanyWin").action="/adv/"+a+"/editcompany/";BC.Window.Open("PromoCompany")},Save:function(a){var b="title="+BC.Common.Escape(a.title.value)+
"&keyname="+BC.Common.Escape(a.keyname.value)+"&formName="+BC.Common.Escape(a.formName.value)+"&ajax=ajax";new Ajax.Request(a.action,{method:"post",postBody:b,onSuccess:BC.Promo.SaveResult});BC.Window.Open("Processing");BC.Window.Close("PromoCompany")},SaveResult:function(a){var a=a.responseText,a=a.split("|"),b=a[1];if(a[0]=="ok")BC.Window.SetOk(a[2]),$("PromoBlock_"+b)?($("PromoTitle_"+b).innerHTML=$("PromoCompanyWinInput_title").value,$("PromoKeyname_"+b).innerHTML=$("PromoCompanyWinInput_keyname").value):
window.location=window.location;else{BC.Window.SetError(a[2],"PromoCompany");for(b=3;b<a.length;b++){var c=a[b].split("*x*"),d=$("PromoCompanyWinCaption_"+c[0]);if(d)c[2]?(d.innerHTML=c[2],d.className="caption like-window-caption error"):(eval("var varCaption=BC.Lang.Promo.CaptionDefault_"+c[0]),d.innerHTML=varCaption,d.className="caption like-window-caption")}}BC.Window.Close("Processing")}};BC.Promo.Types.text=20;BC.Promo.Types.term=60;BC.Promo.Types.theme=90;BC.Promo.Types.blogs=100;
BC.Promo.Types["static"]=110;
BC.Context={IdNow:0,Timer:0,Timeout:0.5,AddFormOpen:!1,R:[],Add_title_symbol_count:25,Edit_title_symbol_count:25,Add_text_symbol_count:75,Edit_text_symbol_count:75,symbol_left_symbol_count:2E3,Click_array:[],Date_array:[],Graf_array:[],Calendar_close:!1,AdvShow:function(a){if(BC.Promo.IdNow>0)$("advtext"+BC.Promo.IdNow).style.display="none",$("advurl"+BC.Promo.IdNow).style.display="none";BC.Promo.IdNow!=a?($("advtext"+a).style.display="",$("advurl"+a).style.display="",BC.Promo.IdNow=a):BC.Promo.IdNow=
0;return!1},Color_array:[],Line_array:[],Color_counter:0,View_all_line:[],Resize_koef:!1,Create_Graf:!0,ShowLine:function(a,b){BC.Context.Line_array[b]==void 0&&(BC.Context.Line_array[b]=[]);var c=a.name,d=$("cadv_legend_"+c+"_"+b),e=BC.Context.Line_array[b],f;BC.Context.View_all_line[b]=!1;if(a.checked)if(BC.Context.Color_counter<BC.Context.Color_array[b].length){if($("line_all_"+b).checked)$("line_all_"+b).checked=!1,$("line_all_"+b).disabled=!1;for(var g=0;g<=BC.Context.Color_array[b].length-1;g++)if(BC.Context.Color_array[b][g]!=
null){f=BC.Context.Color_array[b][g];BC.Context.Color_array[b][g]=null;break}e[c]==void 0?(e[c]={news_id:c,color:f,visible:!0},BC.Context.Color_counter++):(e[c].visible=!0,e[c].color=f);d.color=e[c].color;Prototype.Browser.IE?d.setStyle({backgroundColor:e[c].color,display:"inline",position:"absolute",top:"10px"}):(d.setStyle({backgroundColor:e[c].color,display:"inline-block"}),a.setStyle({marginLeft:"2px"}));g=$("select_type_"+b).value;BC.Context.process_show(b);new Ajax.Request("/statistic/onenewsgraf/",
{method:"post",parameters:{ajax:"ajax",news_id:c,cadv_id:b,firstDate:$("Calendar_input_For_"+b).value,lastDate:$("Calendar_input_To_"+b).value,type:g,interval:$("select_interval_"+b).value},onSuccess:BC.Context.ShowLineRequest})}else BC.Window.SetError("Error");else BC.Context.Color_counter--,e[c].visible=!1,BC.Context.Color_array[b].each(function(a,d){if(a==null)throw BC.Context.Color_array[b][d]=e[c].color,$break;}),e[c].color=!1,BC.Context.Resize_koef=!1,e.each(function(a){a!=void 0&&a.visible&&
BC.Context.setResizeKoef(a.item)}),d.hide(),a.setStyle({marginLeft:"17px"}),BC.Context.Graf_redraw(b,g)},setResizeKoef:function(a){for(var b=0,c=0;c<=a.length-1;c++)b<parseFloat(a[c])&&(b=parseFloat(a[c]));a=b/100;if(BC.Context.Resize_koef){if(BC.Context.Resize_koef<a)BC.Context.Resize_koef=a}else BC.Context.Resize_koef=a},processing:function(a,b){var c=$("graph_processing_"+a),d=$("stat-left-legend_"+a),e=$("table-stat-graph-id-"+a);if(!Prototype.Browser.IE)switch(b){case "show":d.hide();e.hide();
c.show();break;case "hide":c.hide(),d.show(),e.show()}},process_show:function(a){BC.Context.processing(a,"show")},process_hide:function(a){BC.Context.processing(a,"hide")},Graf_redraw:function(a,b){var c=BC.Context.R[a];c==null&&(BC.Context.R[a]=c=Raphael("table-stat-graph-id-"+a,640,150));c.clear();BC.Context.Create_Graf=!0;var d=BC.Context.Line_array[a];if(Prototype.Browser.IE)for(key in d){var e=d[key];if(e.visible){var f=BC.Context.Graf._prepare(e.item,e.date,b,a,e.marker);BC.Context.Graf.create_line(f.y,
f.x,f.data_first,f.data_second,c,e.color,f.marker_array,f.left_legend)}}else d.each(function(d){if(d.visible){var e=BC.Context.Graf._prepare(d.item,d.date,b,a,d.marker);BC.Context.Graf.create_line(e.y,e.x,e.data_first,e.data_second,c,d.color,e.marker_array,e.left_legend)}});BC.Context.process_hide(a)},ShowLineRequest:function(a){var a=a.responseJSON,b=BC.Context.Line_array[a.cadv_id];b[a.news_id].item=a.item;b[a.news_id].date=a.date;b[a.news_id].marker=a.marker;BC.Context.setResizeKoef(a.item);BC.Context.Graf_redraw(a.cadv_id,
a.type)},Graf:{_prepare:function(a,b,c,d,e){a instanceof Array&&b instanceof Array||(a=a.split("*"),b=b.split("*"),e=e.split("*"));for(var f=[],g=[],h=0;h<=a.length-1;h++)switch(c){case "cost":a[h]+="";var l=a[h].split(".");l[1]!=void 0?l[1].length==1&&(l[1]+="0"):l[1]="00";g[h]="$"+l[0]+"."+l[1];break;case "ctr":temp_ctr=Math.roundWithZero(a[h],2);g[h]=temp_ctr+"%";break;default:g[h]=a[h]}if(BC.Context.Resize_koef&&!BC.Context.View_all_line[d])l=BC.Context.Resize_koef;else{for(var m=0,h=0;h<=a.length-
1;h++)m<parseFloat(a[h])&&(m=parseFloat(a[h]));l=m/100}var n=l*100,d=[];n==0?(d.push({y:104,d:""}),d.push({y:6,d:""}),d.push({y:56,d:""})):(h=n/2,c!="cost"&&c!="ctr"?(h=Math.floor(h),up=Math.roundTo(n,2)):(h=Math.roundWithZero(h,2),up=Math.roundWithZero(n,2)),c=100-(h/l-2)+4,d.push({y:104,d:""}),d.push({y:6,d:up}),d.push({y:c,d:h}));c=[];for(h=0;h<=a.length-1;h++)m==0?n=parseFloat(a[h]):(n=parseFloat(a[h])/l-2,n<0&&(n=0)),c[h]=100-n+4;if(b.length==1)a=Math.round(285),f.push(a);else{a=Math.round(570/
(b.length-1));f[0]=0;for(i=1;i<=b.length-1;i++)f.push(i*a)}a=[];for(k=0;k<=e.length-1;k++){m=e[k];for(q=0;q<=b.length;q++)if(m==b[q])a[k]={},a[k].x=f[q],m=m.split("-"),a[k].date=m[2]+"."+m[1]}return{x:f,y:c,data_first:b,data_second:g,marker_array:a,left_legend:d}},create_line:function(a,b,c,d,e,f,g,h){var l={font:"11px Fontin-Sans, Arial",fill:"#000"};if(BC.Context.Create_Graf)h.each(function(a){e.path("M0 "+a.y+"L640 "+a.y).attr({stroke:"#e8e2d6","stroke-width":1});e.text(15,a.y+10,a.d).attr(l).attr({fill:"#878181"}).attr({"font-size":12})}),
BC.Context.Create_Graf=!1;var m=BC.Browser.OP?4:0,f=e.path().attr({stroke:f,"stroke-width":1,"stroke-linejoin":"round"}),h=e.set(),n,r=!1,o=e.rect(10,10,80,32).attr({fill:"#eaea0c","stroke-width":0,stroke:"#eaea0c"}).hide(),s=e.text(30,10+m,"24.04.10").attr(l).attr({fill:"#000"}).hide(),t=e.image("/fnew/i/pointer.png",30,10,17,9).hide(),u=e.text(35,10+m,"24.04.10").attr(l).attr({fill:"#000"}).attr({"font-size":16}).hide();g.each(function(a){a!=void 0&&(e.path("M"+(a.x+30)+" 5L"+(a.x+30)+" 104").attr({stroke:"#e8e2d6",
"stroke-width":1}),e.text(a.x+49,98,a.date).attr(l).attr({fill:"#878181"}).attr({"font-size":12}))});for(var g=0,w=b.length;g<w;g++){f[g==0?"moveTo":"cplineTo"](b[g]+30,a[g],10);var x=e.circle(b[g]+30,a[g],2).attr({fill:"#000",stroke:"#000","stroke-width":0}),y=function(a){a.attr({fill:"#000",stroke:"#000",r:2,"stroke-width":0});n=setTimeout(function(){o.hide();s.hide();t.hide();u.hide();r=!1},1)};h.push(e.circle(b[g]+30,a[g],10).attr({stroke:"none",fill:"#fff",opacity:0}));var v=h[h.length-1];(function(a,
b,c,d,e){v.node.onmouseover=function(){clearTimeout(n);var f={x:+a+30-40,y:b+12},g=f.x;if(f.x<0)f.x=0;g+80>640&&(f.x-=g+80-640);o.show().animate({x:f.x,y:f.y},200*r);t.show().animateWith(o,{x:+a+21.9,y:+b+4},200*r);g={};g=Prototype.Browser.Opera?{first:20,second:6}:{first:24,second:10};s.attr({text:c}).show().animateWith(o,{x:+f.x+40,y:+f.y+g.first+m},200*r);u.attr({text:d}).show().animateWith(o,{x:+f.x+40,y:+f.y+g.second+m},200*r);e.attr({r:3,fill:"#ffffff",stroke:"#64ab1f","stroke-width":3});r=
!0;o.toFront();s.toFront();u.toFront();t.toFront()};v.node.onmouseout=function(){y(e)}})(b[g],a[g],c[g],d[g],x)}v.toFront()}},StatShow:function(a,b,c,d,e,f){if(!BC.Context.R[a]){var g=Raphael("table-stat-graph-id-"+a,640,150);g.clear();BC.Context.R[a]=g;if(!BC.Context.View_all_line[a])return BC.Context.Graf_redraw(a,e),!1;BC.Context.Graf_array[a]!=void 0&&d!="ajax"?(b=BC.Context.Graf_array[a].ys,c=BC.Context.Graf_array[a].ds):BC.Context.Graf_array[a]={ys:b,ds:c};BC.Context.Create_Graf=!0;b=BC.Context.Graf._prepare(b,
c,e,a,f);BC.Context.Graf.create_line(b.y,b.x,b.data_first,b.data_second,g,"#d3d3d3",b.marker_array,b.left_legend);BC.Context.process_hide(a)}},StatDetailShow:function(a,b){if(b=="simple"&&$("table-stat-asimple-id-"+a).className=="select")return!1;if(b=="detail"&&$("table-stat-adetail-id-"+a).className=="select")return!1;$("table-stat-detail-id-"+a).style.display=="none"?($("table-stat-detail-id-"+a).style.display="",$("table-stat-asimple-id-"+a).className="",$("table-stat-adetail-id-"+a).className=
"select"):($("table-stat-detail-id-"+a).style.display="none",$("table-stat-asimple-id-"+a).className="select",$("table-stat-adetail-id-"+a).className="");return!1},Calendar:null,ShowCalendar:function(a,b,c,d,e){BC.Context.Calendar?BC.Context.Calendar.updateelement=$(b):(c=$(c),new Draggable(c,{handle:"rtop",starteffect:Prototype.emptyFunction,endeffect:Prototype.emptyFunction}),BC.Context.Calendar=new scal(a,$(b),{aftercalchange:function(){BC.Context.ChangeStatistic(e,"true")},updateformat:"dd-mm-yyyy",
weekdaystart:-1,exactweeks:!1,closebutton:"&nbsp;",wrapper:c}));a=$F(b).split("-");a[0].charAt(0)=="0"&&(a[0]=a[0].charAt(1));a[1].charAt(0)=="0"&&(a[1]=a[1].charAt(1));var f=(new Date(parseInt(a[2]),parseInt(a[1])-1,parseInt(a[0]))).getDay()-1;f<0&&(f=6);var g="Calendar_input_To_"+e;b=="Calendar_input_To_"+e&&(g="Calendar_input_For_"+e);b=$F(g).split("-");b[0].charAt(0)=="0"&&(b[0]=b[0].charAt(1));b[1].charAt(0)=="0"&&(b[1]=b[1].charAt(1));g=(new Date(parseInt(b[2]),parseInt(b[1])-1,parseInt(b[0]))).getDay()-
1;g<0&&(g=6);(d=$(d))&&Position.clone($(d),c,{setWidth:!1,setHeight:!1,offsetLeft:d.getWidth()+2});BC.Context.Calendar.openCalendar();for(j=0;j<=6;j++)if(c=$$("div.cal_day_"+j+"_"+f),c[0]!=void 0)d=c[0].down(0),d=d.textContent,d==parseInt(a[0])&&c[0].addClassName("todaydate");for(j=0;j<=6;j++)if(c=$$("div.cal_day_"+j+"_"+g),c[0]!=void 0)d=c[0].down(0),d=d.textContent,d==parseInt(b[0])&&c[0].addClassName("anatherdate")},ChangeStatistic:function(a,b){if($("table-stat-id-"+a).style.display=="none"||
b){$("table-stat-id-"+a).style.display="";var c=$F("Calendar_input_For_"+a),d=$F("Calendar_input_To_"+a),e=$F("select_type_"+a),f=$F("select_interval_"+a),g=/[^0-9\-]/g;if(c.search(g)>=0||d.search(g)>=0)return BC.Window.SetError(BC.Lang.User.StatisticDateError),!1;BC.Context.Resize_koef=!1;var h=[];if($("line_all_"+a).checked)BC.Context.Color_array[a]=["#1B1BB3","#Ad009f","#00b25c","#FFBF00","#FF5600"],BC.Context.Line_array[a]=[],BC.Context.Color_counter=0,BC.Context.View_all_line[a]=!0;BC.Context.View_all_line[a]||
$$("input."+a).each(function(a){a.checked&&h.push(a.name)});if(f=="week"||f=="month")$("Calendar_select_"+a).style.display="none";else{if(BC.Context.Calendar&&BC.Context.Calendar.isOpen())BC.Context.Calendar.toggleCalendar(),BC.Context.Calendar.destroy(),BC.Context.Calendar=null;$("Calendar_select_"+a).style.display=""}g=c.split("-");g[0].charAt(0)=="0"&&(g[0]=g[0].charAt(1));g[1].charAt(0)=="0"&&(g[1]=g[1].charAt(1));var g=new Date(parseInt(g[2]),parseInt(g[1])-1,parseInt(g[0])),l=d.split("-");l[0].charAt(0)==
"0"&&(l[0]=l[0].charAt(1));l[1].charAt(0)=="0"&&(l[1]=l[1].charAt(1));l=new Date(parseInt(l[2]),parseInt(l[1])-1,parseInt(l[0]));g=g.getTime();if(l.getTime()<g)return BC.Window.SetError(BC.Lang.User.StatisticDateError),!1;c!=" "&&d!=" "&&(c="ajax=ajax&firstDay="+c+"&lastDay="+d+"&cadv_id="+a+"&selectType="+e+"&selectInterval="+f,c+=BC.Context.View_all_line[a]?"":"&news_array="+h,BC.Context.process_show(a),new Ajax.Request("/updatestatistic/",{method:"post",postBody:c,onSuccess:BC.Context.SaveResult}))}else $("table-stat-id-"+
a).style.display="none",BC.Context.R[a].clear(),BC.Context.R[a]=null,$("table-stat-graph-id-"+a).innerHTML=""},SaveResult:function(a){a=a.responseJSON;EJS.config({cache:!1});var b=(new EJS({url:"/fnew/js/templates/statistic_table.ejs"})).render(a);$("stat-table-"+a.cadv_id).innerHTML=b;b=a.selectType;if(BC.Context.View_all_line[a.cadv_id]){$("line_all_"+a.cadv_id).checked=!0;$("line_all_"+a.cadv_id).disabled=!0;if(BC.Context.R[a.cadv_id])BC.Context.R[a.cadv_id].clear(),BC.Context.R[a.cadv_id]=null,
$("table-stat-graph-id-"+a.cadv_id).innerHTML="";var c=a.graf_array.all;BC.Context.StatShow(a.cadv_id,c.item_string,c.date_string,"ajax",b,c.marker_string)}else{var d=a.graf_array,e=BC.Context.Line_array[a.cadv_id];for(c in d){var f=$("check_box_"+c+"_"+a.cadv_id),g=$("cadv_legend_"+c+"_"+a.cadv_id),h=d[c].item_string.split("*"),l=d[c].date_string.split("*"),m=d[c].marker_string.split("*");e[c].date=l;e[c].item=h;e[c].marker=m;BC.Context.setResizeKoef(h);f.checked=!0;g.setStyle({backgroundColor:e[c].color,
display:"inline-block"});f.setStyle({marginLeft:"2px"})}BC.Context.Graf_redraw(a.cadv_id,b)}},OpenContextAdv:function(a,b){a!="anonimous"?(BC.Context.AddFormOpen=!0,window.location="/user/"+a+"/context/"+b+"/"):BC.Window.SetError(BC.Lang.Topic.ContextADvAdd_Error)},SetFuncs:function(){Event.observe(document.body,"click",function(a){var b=!1;if(Event.element(a).localName!="rect"){var c=Event.element(a).up("div.floating");(a=Event.findElement(a,"input"))&&(b=$(a).hasClassName("calendar_input"))}if(c==
void 0&&!b&&BC.Context.Calendar&&BC.Context.Calendar.isOpen())BC.Context.Calendar.toggleCalendar(),BC.Context.Calendar.destroy(),BC.Context.Calendar=null})},OpenModerAdvWin:function(a,b){BC.Window.Create("ContextModer",!1,"");var c=BC.Lang.User.ContextAdvModer_Title,d=BC.Lang.User.ContextAdvModer_Text,d=d.replace(/#TITLE#/,b);$("WindowTitleContextModer").innerHTML=c;$("ContextModerText").innerHTML=d;$("ContextAdvModerWin_adv_id").value=a;BC.Window.Open("ContextModer")},ModerAdv:function(a){a="ajax=ajax&adv_id="+
BC.Common.Escape(a.adv_id.value);new Ajax.Request("/cadv/admin/moder/",{method:"post",postBody:a,onCreate:BC.Window.Close("ContextModer"),onLoading:BC.Window.Open("Processing"),onSuccess:BC.Context.ModerAdvSave})},ModerAdvSave:function(a){BC.Window.Close("Processing");a=a.responseText;a=a.split("*|*");a[0]=="OK"?(BC.Window.SetOk(a[3]),$("icon_moder_"+a[1])?$("icon_moder_"+a[1]).hide():$("icon_waitmoder_"+a[1]).hide(),a[2]=="0"&&$("adv-data-"+a[1],"adv_where_"+a[1],"adv-stat-"+a[1]).invoke("removeClassName",
"trans")):BC.Window.SetError(a[1])},AdminStopWindow:function(a,b,c){BC.Window.Create("ContextAdminStop",!1,"");var d=BC.Lang.User.ContextAdvAdminStop_Title,e=BC.Lang.User.ContextAdvAdminStop_Text,e=e.replace(/#TITLE#/,b);$("WindowTitleContextAdminStop").innerHTML=d;$("ContextAdminStopText").innerHTML=e;$("ContextAdvAdminStopWin_adv_id").value=a;$("ContextAdvAdminStopWin_from").value=c;BC.Window.Open("ContextAdminStop")},AdminStopAdv:function(a){a="ajax=ajax&adv_id="+BC.Common.Escape(a.adv_id.value)+
"&stop_reason="+BC.Common.Escape(a.stop_reason.value)+"&from="+BC.Common.Escape(a.from.value);new Ajax.Request("/cadv/admin/stopadv/",{method:"post",postBody:a,onCreate:BC.Window.Close("ContextAdminStop"),onLoading:BC.Window.Open("Processing"),onSuccess:BC.Context.AdminStopSave})},AdminStopSave:function(a){BC.Window.Close("Processing");a=a.responseText;a=a.split("|");if(a[0]=="OK"){var b=[];if(a[3]=="news")$$("div#cadv_of_news_"+a[2]).invoke("addClassName","trans"),$$("div#icon_stop_"+a[2]).invoke("hide"),
$$("div#cadv_of_news_"+a[2]).each(function(a){a.up(".item").setAttribute("class","item inactive")}),$$("div#cadv_of_news_"+a[2]).each(function(a){a=a.up(".data");a.down("div.active")==void 0&&a.setAttribute("class","data inactive")});else{b.push($("adv-data-"+a[2]));b.push($("adv_where_"+a[2]));b.push($("adv-stat-"+a[2]));b[1].up(".context-user").setAttribute("class","context-user inactive");if(b[1].up(".user_info_and_cadv")!=void 0){var c=b[1].up(".user_info_and_cadv");c.down("div.active")==void 0&&
c.setAttribute("class","user_info_and_cadv inactive")}$("icon_stop_"+a[2]).hide();$("icon_moder_"+a[2])?$("icon_moder_"+a[2]).hide():$("icon_waitmoder_"+a[2]).hide();for(i=0;i<=b.length-1;i++)b[i].addClassName("trans")}BC.Window.SetOk(a[1])}else BC.Window.SetError(a[1])},ChangePriseWindow:function(a,b,c){BC.Window.Create("ChangeCadvPrise");var d=BC.Lang.User.ChangeAdvPrise_Text,d=d.replace(/#TITLE#/,b),d=d.replace(/#PRISE#/,c);$("ChangeCadvPrise_text").innerHTML=d;$("ChangeCadvPrise_news_id").value=
a;$("changeCadvPrise_error").innerHTML="";$("ChangeCadvPrise_input").value="";BC.Window.Open("ChangeCadvPrise")},ChangePrise:function(a){var b=BC.Common.Escape(a.prise.value),b=b.replace(",","."),b=parseFloat(b)*100,a="ajax=ajax&news_id="+BC.Common.Escape(a.news_id.value)+"&prise="+b;new Ajax.Request("/cadv/admin/changeprise/",{method:"post",postBody:a,onCreate:BC.Window.Close("ChangeCadvPrise"),onLoading:BC.Window.Open("Processing"),onSuccess:BC.Context.ChangePriseSave})},ChangePriseSave:function(a){BC.Window.Close("Processing");
a=a.responseText;a=a.split("|");if(a[0]=="ok"){var b=a[3]*0.01;b+="";b.split(".")[1].length==1&&(b+="0");BC.Window.SetOk(a[1]);$("news_prise_"+a[2]).innerHTML="(\u0447\u0435\u0440\u0435\u0437 "+a[4]+" \u0434\u043d\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 $"+b+")"}else BC.Window.SetError(a[1],a[2]),a=a[3].split("*x*"),$("changeCadvPrise_error").innerHTML=a[2]},AddNonCashPayWindow:function(){BC.Window.Display("AddNonCashPay");$("AddNonCashPay_caption_amount").innerHTML=BC.Lang.User.AddnonCashCaptionDefault_amount;
$("AddNonCashPay_caption_amount").className="caption like-window-caption";$("AddNonCashPay_caption_login").innerHTML=BC.Lang.User.AddnonCashCaptionDefault_login;$("AddNonCashPay_caption_login").className="caption like-window-caption"},AddNonCashPay:function(a){var b=BC.Common.Escape(a.amount.value),b=b.replace(",",".");a.amount.value=b;a="ajax=ajax&login="+BC.Common.Escape(a.login.value)+"&amount="+b;new Ajax.Request("/cadv/admin/addnoncash/",{method:"post",postBody:a,onCreate:BC.Window.Close("AddNonCashPay"),
onLoading:BC.Window.Open("Processing"),onSuccess:BC.Context.AddNonCashPaySave})},AddNonCashPaySave:function(a){BC.Window.Close("Processing");a=a.responseText;a=a.split("|");if(a[0]=="ok")BC.Window.SetOk(a[1]),window.location=window.location;else{BC.Window.SetError(a[1],a[2]);for(var b=3;b<a.length;b++){var c=a[b].split("*x*"),d=$("AddNonCashPay_caption_"+c[0]);if(d)c[2]?(d.innerHTML=c[2],d.className="caption like-window-caption error"):(eval("var varCaption=BC.Lang.User.AddnonCashCaptionDefault_"+
c[0]),d.innerHTML=varCaption,d.className="caption like-window-caption")}}},Decline:function(a){BC.Window.Display("DeclineNonCashPay",{id_pay:a})},DeclineNonCashPay:function(a){a="ajax=ajax&id_pay="+BC.Common.Escape(a.id_pay.value);new Ajax.Request("/cadv/admin/declinenoncash/",{method:"post",postBody:a,onCreate:BC.Window.Close("DeclineNonCashPay"),onLoading:BC.Window.Open("Processing"),onSuccess:BC.Context.DeclineNonCashPaySave})},DeclineNonCashPaySave:function(a){BC.Window.Close("Processing");a=
a.responseText;a=a.split("|");a[0]=="OK"?(BC.Window.SetOk(a[1]),window.location=window.location):BC.Window.SetError(a[1])},gethelp:function(a,b){if(b)var c={wwidth:b};Prototype.Browser.IE&&a=="add"?BC.Window.Display("HelpAddIe",!c?!1:c):(BC.Window.Create("Termin",!c?!1:c),$("WindowTitleTermin").innerHTML=BC.Lang.User.ContextAdvAddForm_help,eval("var varText=BC.Lang.User.ContextAdvAddForm_help_"+a),$("WindowTerminText").insert(varText),BC.Window.Open("Termin"))},UpdateRates:function(){var a=[],b=[];
a.push($("currensy_input_rub").value,$("currensy_input_uah").value,$("currensy_input_eur").value);b.push("currensy_input_rub","currensy_input_uah","currensy_input_eur");for(i=0;i<=a.length-1;i++)a[i]=a[i].replace(",","."),$(b[i]).value=a[i];a="ajax=ajax&rub="+BC.Common.Escape(a[0])+"&uah="+BC.Common.Escape(a[1])+"&eur="+BC.Common.Escape(a[2]);new Ajax.Request("/rates/updaterates/",{method:"post",postBody:a,onLoading:BC.Window.Open("Processing"),onSuccess:BC.Context.UpdateRatesSave})},UpdateRatesSave:function(a){BC.Window.Close("Processing");
a=a.responseText;a=a.split("|");if(a[0]=="ok")BC.Window.SetOk(a[1]);else{BC.Window.SetError(a[1]);for(var b=2;b<a.length;b++){var c=a[b].split("*x*");if(c[2])$("error_"+c[0]).innerHTML=c[2]}}},SymbolCount:function(a,b){var c=$(a),d=c.value,e=$(b);eval("var symbol_max =  BC.Context."+b+"_symbol_count");d=symbol_max-d.length;d>=0?(e.innerHTML=BC.Lang.Messages.TextLeft2+" "+BC.Common.TextAfterNum(d,"BC.Lang.Messages.TextSymbol"),e=""):(e.innerHTML="\u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c 0 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432",
e="#FFAFAF");c.style.backgroundColor=e},ChangeCity:function(){BC.Window.Create("CityModer");var a=$("city_select"),b=$("city_input"),c="",d="";for(i=0;i<=a.length-1;i++)a.options[i].selected==!0&&(c+=", "+a.options[i].text,d+="|"+a.options[i].value);a=BC.Lang.User.ModerCityConfirm;a=a.replace(/#OLD#/,c.slice(2));a=a.replace(/#NEW#/,b.value);$("CityModerText").innerHTML=a;$("CityModerWin_new_city").value=b.value;$("CityModerWin_city_id").value=d.slice(1);BC.Window.Open("CityModer")},CityRequest:function(a){a=
"ajax=ajax&city_id="+BC.Common.Escape(a.city_id.value)+"&new_city="+BC.Common.Escape(a.new_city.value);new Ajax.Request("/city/edit/",{method:"post",postBody:a,onCreate:BC.Window.Close("CityModer"),onLoading:BC.Window.Open("Processing"),onSuccess:BC.Context.CitySave})},CitySave:function(a){BC.Window.Close("Processing");a=a.responseText;a=a.split("|");if(a[0]=="ok")BC.Window.SetOk(a[1]),window.location=window.location;else{BC.Window.SetError(a[1]);for(var b=2;b<a.length;b++){var c=a[b].split("*x*");
c[2]?($("title_"+c[0]).innerHTML=c[2],$("title_"+c[0]).className="caption like-window-caption error"):(eval("var title = BC.Lang.User.ChangeCityCaptionDefault_"+c[0]),$("title_"+c[0]).innerHTML=title,$("title_"+c[0]).className="caption_title")}}},SelectedCity:null,ChangeCountry:function(a,b){var c=a.options[a.selectedIndex].value,d=$("UserContextAdv"+b+"WinInput_city"),e=$("city_block_"+b);if(c==3)e.hide(),BC.Context.SelectedCity=d.value,d.value="";else if(e.show(),BC.Context.SelectedCity)d.value=
BC.Context.SelectedCity},SearchWithTimer:function(a,b){clearTimeout(BC.Context.Timer);a.keyCode==13?BC.Context.StartSearchAdvRequest(b.name):BC.Context.Timer=setTimeout("BC.Context.StartSearchAdvRequest('"+b.name+"')",1500)},StartSearchAdvRequest:function(a){a=document.forms[a];new Ajax.Request("/contextfind/",{method:"post",parameters:{ajax:"ajax",search:a.search.value,type:a.type.value,id:a.id.value,block:a.block.value,area:a.area.value},onLoading:BC.Context.ShowLoader(a.id.value,a.area.value),
onSuccess:BC.Context.SearchAdvSetResult})},ShowLoader:function(a,b){$("find"+a+"_blogs_"+b+"area_loader").show()},SearchAdvSetResult:function(a){a=a.responseJSON;$("find"+a.block_id+"_blogs_"+a.area+"area_loader").hide();if(a.result=="ok"){var b=$("promo"+a.block_id+"_blogs_delarea"),c=$("promo"+a.block_id+"_blogs_"+a.area+"area");if(a.empty){var d=$("promo"+a.block_id+"_blogs_"+a.area+"area_input");d.className="find_context";d.value="\u043f\u043e\u0438\u0441\u043a"}a=a.result_array;c.innerHTML="";
for(var e in a)if(typeof a[e]!="function"){d=document.createElement("OPTGROUP");d.label=a[e].name;c.appendChild(d);var f=a[e].article,g;for(g in f)if(typeof f[g]!="function"){var h=document.createElement("OPTION");h.innerHTML=f[g].title;h.value=f[g].id;h.setAttribute("ondblclick"," BC.Context.OpenWindow("+f[g].id+")");d.appendChild(h)}}if(b.length>0)for(i=0;i<=b.length-1;i++){e=b.options[i].value;for(j=0;j<=c.length-1;j++)if(c.options[j].value==e)c.options[j].disabled=!0}}else BC.Window.SetError(a.error_text)},
OpenWindow:function(a){window.open("/topic/"+a+"/","promo_dest")},Serchlabel:function(a){if(a.className=="find_context"&&a.value=="\u043f\u043e\u0438\u0441\u043a")a.className="find",a.value=""},InactiveAdv:function(a){$$("div.inactive").each(function(b){switch(a){case "hide":b.hide();break;case "show":b.show()}});var b=$("inactive_link"),c=$("active_link");switch(a){case "hide":b.innerHTML='<a href="" onclick="BC.Context.InactiveAdv(\'show\');  return event.returnValue=false; ">\u0432\u0441\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f</a>';
c.innerHTML="\u0442\u043e\u043b\u044c\u043a\u043e \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435";break;case "show":b.innerHTML="\u0432\u0441\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f",c.innerHTML='<a href="" onclick="BC.Context.InactiveAdv(\'hide\');  return event.returnValue=false; ">\u0442\u043e\u043b\u044c\u043a\u043e \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435</a>'}},NonCashPaySort:function(a){var b="ajax=ajax";b+="&order="+a;new Ajax.Request("/admincadv/noncashpaysort/",
{method:"post",postBody:b,onLoading:BC.Window.Open("Processing"),onSuccess:BC.Context.NonCashPaySortAnswer});return!1},NonCashPaySortAnswer:function(a){BC.Window.Close("Processing");a=a.responseText.split("|");if(a[0]=="ok")$("history_of_pay").innerHTML=a[1];var b=$("by_users"),c=$("by_time");switch(a[2]){case "user":b.innerHTML="\u043f\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c";c.innerHTML='<a href="" onclick="return BC.Context.NonCashPaySort(\'time\');">\u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438</a>';
break;case "time":b.innerHTML='<a href="" onclick="return BC.Context.NonCashPaySort(\'user\');">\u043f\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c</a>',c.innerHTML="\u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438"}},ActionWithCadvList:function(a,b){var c=$("adv_list_of_"+a),d=$("link_of_list_"+a);switch(b){case "hide":c.hide();d.setAttribute("onclick","BC.Context.ActionWithCadvList('"+a+"','show'); return event.returnValue=false; ");break;case "show":c.show(),
d.setAttribute("onclick","BC.Context.ActionWithCadvList('"+a+"','hide'); return event.returnValue=false; ")}},curentSlide:0,numberOfSlide:0,statArray:[],sendStatistic:!0,SlideWithTimer:function(a){$("down_slide_arrow").innerHTML="\u0435\u0449\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f";BC.Context.SlideCadv(a);BC.Context.Timer=setTimeout('BC.Context.SlideArrowActive("'+a+'")',1E3)},SlideCadv:function(){var a=BC.Context.curentSlide,b=BC.Context.numberOfSlide,c=$("ads_slider"),
d=[];a+=1;if(a<=b){$$("span.item-"+a).each(function(a){a.innerHTML=="last"?BC.Context.sendStatistic=!1:d.push(a.innerHTML)});if(BC.Context.sendStatistic)BC.Context.statArray=d,new Ajax.Request("/statistic/addtostaticviewajax/",{method:"post",parameters:{array:BC.Context.statArray.toString(),ajax:"ajax",news_id:BC.Topic.CurentTopic},onSuccess:BC.Context.StatisticViewAnswer});new Effect.Move(c,{x:-170,mode:"relative"});BC.Context.curentSlide=a}else c.setStyle({left:"0px"}),new Effect.Move(c,{x:-170,
mode:"relative"}),BC.Context.curentSlide=1},StatisticViewAnswer:function(){},SlideArrowActive:function(){$("down_slide_arrow").innerHTML='<a href=""  onclick="BC.Context.SlideWithTimer(\'down\'); return event.returnValue=false;">\u0435\u0449\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f</a>'}};
BC.Donate={CountrySMS:"UA",Currency:{USD:{value:[1,2,5,10],default_val:2},EUR:{value:[1,2,5,10],default_val:2},RUR:{value:[30,60,150,300],default_val:60},UAH:{value:[10,20,50,100],default_val:20}},setCurrency:function(a,b,c){var d=$("Donate"+a+"_Currency"),b=$(b),c=$(c),e;if(a!="Webmoney")e=a!="Robokassa"?BC.Donate.Currency[d.options[d.selectedIndex].value]:BC.Donate.Currency[d.value];else switch(d.options[d.selectedIndex].innerHTML){case "WMZ":e=BC.Donate.Currency.USD;break;case "WMU":e=BC.Donate.Currency.UAH;
break;case "WMR":e=BC.Donate.Currency.RUR;break;case "WME":e=BC.Donate.Currency.EUR}b.value=e.default_val+".00";for(a=c.options.length=0;a<e.value.length;a++)c.addOption(e.value[a]+".00",e.value[a]+".00",e.value[a]==e.default_val?!0:!1)},LiqpayDisplayWindow:function(){BC.Window.Display("DonateLiqpay");BC.Common.ComboBox.setComboBox(1);BC.Donate.setCurrency("Liqpay","txtcur","DonateLiqpay_Volume");BC.Donate.GetXmlToLiqpayDonation();$("txtcur").focus()},WebmoneyDisplayWindow:function(){BC.Window.Display("DonateWebmoney",
{Donate:BC.Var.Donate,desc:BC.Var.Desc_base64,Donate_x_WMID:BC.Var.Donate_x_WMID});BC.Common.ComboBox.setComboBox(1);BC.Donate.setCurrency("Webmoney","txtLMI_PAYMENT_AMOUNT","DonateWebmoney_Volume");$("txtLMI_PAYMENT_AMOUNT").focus()},MoneybookersDisplayWindow:function(){BC.Window.Display("DonateMoneybookers",{Donate:BC.Var.Donate});BC.Common.ComboBox.setComboBox(1);BC.Donate.setCurrency("Moneybookers","txtamount","DonateMoneybookers_Volume");$("txtamount").focus()},RobokassaDisplayWindow:function(){BC.Window.Display("DonateRobokassa",
{Desc:BC.Var.Desc,MrchLogin:BC.Var.RobokassaLogin,InvId:0});BC.Common.ComboBox.setComboBox(1);BC.Donate.setCurrency("Robokassa","txtOutSum","DonateRobokassa_Volume");BC.Donate.RobokassaSignRequest()},DonateSmsChangeCountry:function(){BC.Donate.CountrySMS=$("DonateSms_Country_UA").selected?"UA":"RU"},DonateSmsSubmit:function(){BC.Donate.CountrySMS=="UA"?smsBillDonatePopup():smsDonatePopup("")},smsBillDonatePopupOpen:function(){window.open("/smsbill/","smsdonate_popup","height=420,left="+(screen.width-
530>>1)+",resizable=yes,scrollbars=yes,top="+(screen.height-420>>1)+",width=530")},BeforePayWM:function(){var a=$("txtLMI_PAYMENT_AMOUNT").value.split(",");$("txtLMI_PAYMENT_AMOUNT").value=a.join(".")},BeforePayMB:function(){var a=$("DonateMoneybookers_Volume").value.split(",");$("DonateMoneybookers_Volume").value=a.join(".")},BeforePayRK:function(){var a=$("txtOutSum"),b=$("DonateRobokassa_VolumeTitle"),c=parseFloat(a.value.replace(/,/,"."));if(c)a.value=Math.roundWithZero(c,2);else return b.innerHTML=
BC.Lang.Error.AmountIsIncirect,b.className="caption error",!1},RobokassaSignRequest:function(){var a={ajax:"ajax",OutSum:$F("txtOutSum"),InvId:0};new Ajax.Request("/static/robokassasign/",{method:"post",parameters:a,onSuccess:BC.Donate.RobokassaSignAnswer});return!1},RobokassaSignAnswer:function(a){a=a.responseJSON;return a.success?($("DonateRobokassa_Sign").value=a.SignatureValue,!0):!1},DonateWMChangeCurrency:function(){BC.Donate.setCurrency("Webmoney","txtLMI_PAYMENT_AMOUNT","DonateWebmoney_Volume")},
DonateMBChangeCurrency:function(){BC.Donate.setCurrency("Moneybookers","txtamount","DonateMoneybookers_Volume")},liqpayChangeCurrency:function(){BC.Donate.setCurrency("Liqpay","txtcur","DonateLiqpay_Volume");BC.Donate.GetXmlToLiqpayDonation()},ChekLiqpaySum:function(){$("DonateLiqpay_Currency");var a=$("txtcur");$("Liqpay_topay");return parseFloat(a.value.replace(/,/,"."))},CheckLiqpayDonation:function(){$("txtcur");var a=$("DonateLiqpay_VolumeTitle");return BC.Donate.ChekLiqpaySum()?(a.innerHTML=
"\u0441\u0443\u043c\u043c\u0430",a.className="caption like-window-caption",!0):(a.innerHTML=BC.Lang.Error.AmountIsIncirect,a.className="caption error",!1)},HashCheck:function(){if(location.hash!=""){var a=location.hash.slice(1).split("__");switch(a[0]){case "liqpay":BC.Donate.LiqpayDisplayWindow();break;case "webmoney":BC.Donate.WebmoneyDisplayWindow();break;case "moneybookers":BC.Donate.MoneybookersDisplayWindow();break;case "donate_feedback":a[1]&&a[2]&&BC.Window.Display("DonateFeedback",{user_id:a[1],
question_id:a[2]})}}},DonateFeedbackRequest:function(a){for(var b=!1,c=0;c<a.answer.length;c++)if(a.answer[c].checked)b=a.answer[c].value;if(!b)return $("DonateFeedback_form_error").innerHTML=BC.Lang.Error.DonateFeedbackNowAnswer,$("DonateFeedback_form_error").show(),!1;a={ajax:"ajax",answer:b,other_answer:a.other_answer.value,user_id:a.user_id.value,question_id:a.question_id.value};BC.Window.Close("DonateFeedback");new Ajax.Request("/static/donatefeedback/",{method:"post",parameters:a,onCreate:BC.Window.Open("Processing"),
onSuccess:BC.Donate.DonateFeedbackAnswer})},DonateFeedbackAnswer:function(a){a=a.responseJSON;BC.Window.Close("Processing");a.success?BC.Window.SetOk(BC.Lang.Static.DonateFeedbackSuccess):a.error&&BC.Window.SetError(BC.Lang.Error[a.error_text],"DonateFeedback")},ToogleDonateStatusNotify:function(a,b){var c,d;b==void 0?(b=0,c=BC.Lang.Static.BlockDonateLetterNotifyMessage,d=BC.Lang.Static.BlockDonateLetterNotifyTitle):(c=BC.Lang.Static.AllowDonateLetterNotifyMessage,d=BC.Lang.Static.AllowDonateLetterNotifyTitle);
BC.Window.SetNotify(c,d,"BC.Donate.ToogleDonateStatusRequest("+a+","+b+")")},ToogleDonateStatusRequest:function(a,b){var c={ajax:"ajax",question_id:a,status:b};BC.Window.Close("Notify");new Ajax.Request("/static/toogledonatestatus/",{method:"post",parameters:c,onCreate:BC.Window.Open("Processing"),onSuccess:BC.Donate.ToogleDonateStatusAnswer})},ToogleDonateStatusAnswer:function(a){a=a.responseJSON;BC.Window.Close("Processing");a.success?(BC.Window.SetOk(!a.status?BC.Lang.Static.AllowDonateLetterSuccess:
BC.Lang.Static.BlockDonateLetterSuccess),window.location=window.location):a.error&&BC.Window.SetError(BC.Lang.Error[a.error_text],"Notify")},SendDonateLetterNotify:function(a,b){BC.Window.SetNotify(BC.Lang.Static.SendDonateLetterNotifyMessage,BC.Lang.Static.SendDonateLetterNotifyTitle,"BC.Donate.SendDonateLetterRequest("+a+","+b+")")},SendDonateLetterRequest:function(a,b){var c={ajax:"ajax",user_id:b,question_id:a};BC.Window.Close("Notify");new Ajax.Request("/static/senddonateletter/",{method:"post",
parameters:c,onCreate:BC.Window.Open("Processing"),onSuccess:BC.Donate.SendDonateLetterAnswer})},SendDonateLetterAnswer:function(a){a=a.responseJSON;BC.Window.Close("Processing");a.success?(BC.Window.SetOk(BC.Lang.Static.SendDonateLetterSuccess),window.location=window.location):a.error&&BC.Window.SetError(BC.Lang.Error[a.error_text],"Notify")},FeedbackTextareaClick:function(){$("answer_3").checked=!0},DonateInputClick:function(a){$("value_input_5").checked=!0;if(!parseInt(a.value)&&!parseFloat(a.value))a.value=
"",a.removeClassName("small-text")},BeforeSubmit:function(a){for(var b,c,d=0;d<a.donate_value.length;d++)a.donate_value[d].checked&&(b=d==4?a.different_value.value:a.donate_value[d].value);for(d=0;d<a.donate_type.length;d++)if(a.donate_type[d].checked)c=a.donate_type[d].value;b=parseFloat(b.replace(/,/,"."));if(!b)return BC.Window.SetError(BC.Lang.Error.AmountIsIncirect),!1;new Ajax.Request("/money/beforedonate/",{method:"post",parameters:{ajax:"ajax",donate_value:b,donate_type:c},onCreate:BC.Window.Open("Processing"),
onSuccess:BC.Donate.DonateSubmit})},DonateSubmit:function(a){a=a.responseJSON;if(a.success){$("donate_form").action=a.form_action;a=a.fields;$$("#donate_form input").each(function(a){a.name=""});var b=function(a,b){var c=document.createElement("input");c.setAttribute("type","hidden");c.setAttribute("value",b);c.setAttribute("name",a);$("donate_info").appendChild(c)},c;for(c in a)if(typeof a[c]==="object"){var d=c,e;for(e in a[c])typeof a[c][e]!=="function"&&b(d,a[c][e])}else typeof a[c]!=="function"&&
b(c,a[c]);$("donate_form").submit()}else a.error&&(BC.Window.Close("Processing"),BC.Window.SetError(BC.Lang.Error[a.error_text]))},BeforeQuestionPay:function(a){for(var b=0,c=0,c=0;c<a.sub_type.length;c++)if(a.sub_type[c].checked)b=a.sub_type[c].value;c="wI_other";if(a.confirm_rules&&!a.confirm_rules.checked)return BC.Window.SetError(BC.Lang.Error.QuestonRulesNotConfirmed),!1;if(BC.Var.User.role=="guest"){BC.Window.SetError(BC.Lang.Topic.ContextContinue_Error);a=""+c+":"+b+":1";if(BC.Var.TmpCommentData)b=
BC.Var.TmpCommentData.commentId,c=BC.Var.TmpCommentData.author,a+=":"+BC.Var.TopicId+":"+(b?b:0)+(c?":"+c:"");BC.Common.SetCookie("BC_QpData",a,null,"/")}else{if(!b)return BC.Window.SetError(BC.Lang.Error.QuestonSubTypeIsIncirect),!1;if(!c)return BC.Window.SetError(BC.Lang.Error.QuestonPayTypeIsIncirect),!1;a={ajax:"ajax",sub_type:b,pay_type:c};if(BC.Var.TmpCommentData){if(a.comment_id=BC.Var.TmpCommentData.commentId,a.topic_id=BC.Var.TopicId,BC.Var.TmpCommentData.reply)a.comment_author=BC.Var.TmpCommentData.author}else if(BC.Var.NewQuestionRequest)a.new_question=
1;new Ajax.Request("/money/beforequestionpay/",{method:"post",parameters:a,onCreate:BC.Window.Open("Processing"),onSuccess:BC.Donate.QuestionPaySubmit})}},QuestionPaySubmit:function(a){var b=a.responseJSON;if(b.success){var c=document.createElement("form");c.setAttribute("action",b.form_action);c.setAttribute("method","post");var a=function(a,b){var d=document.createElement("input");d.setAttribute("type","hidden");d.setAttribute("value",b);d.setAttribute("name",a);c.appendChild(d)},b=b.fields,d;for(d in b)if(typeof b[d]==
"object"){var e=d,f;for(f in b[d])typeof b[d][f]!="function"&&a(e,b[d][f])}else typeof b[d]!="function"&&a(d,b[d]);BC.Common.SetCookie("BC_QpReturnData",{},null,"/");$("QuestionTimeForms").appendChild(c);c.submit()}else b.error&&(BC.Window.Close("Processing"),BC.Window.SetError(BC.Lang.Error[b.error_text]))},OpenQuestionPayForm:function(){var a=BC.Var.QpParams;if(a){var b=a.split(":");BC.Var.QpParamsOpen={pay_type:b[0],sub_type:parseInt(b[1]),confirmed:parseInt(b[2])};b[3]?BC.Var.TopicId&&(a=parseInt(b[4])?
b[4]:!1,(b=b[5]?b[5]:!1)?BC.Comment.Write_with_quote(a,b):BC.Comment.Write(a)):BC.Topic.newQuestion()}}};
BC.Shop={Interval:!1,StartInterval:function(){BC.Shop.Interval=setInterval(function(){BC.Shop.SetFuncs()},1E3)},SetFuncs:function(a){console.log("!!!!waiting!!!!");BC.Shop.BassketAddClass();BC.Shop.PageSwitch(a)},BassketAddClass:function(){divs_array=$$("div.ecwid-minicart > div:first-child");divs_array.each(function(a){a.addClassName("shop-bassket-count")})},PageSwitch:function(a){this.ShopBreadCrumbs=$("ShopBreadCrumbs");switch(a.type){case "CHECKOUT_PAYMENT_DETAILS":BC.Shop.PaymentDetails();this.CreateCheckoutBreadCrumbs();
break;case "CHECKOUT_SHIPPING_ADDRESS":case "CHECKOUT_PLACE_ORDER":case "CHECKOUT_SHIPPING_ADDRESS":case "CHECKOUT_RESULT":this.CreateCheckoutBreadCrumbs();break;case "CATEGORY":this.CreateCategoryBreadCrumbs(!0);break;case "CART":this.CreateBagBreadCrumbs();break;case "PRODUCT":this.CreateProductBreadCrumbs()}},PaymentDetails:function(){},SetVkWidgets:function(a){var b={type:"button",pageTitle:$$("div.ecwid-productBrowser-head")[0].innerHTML,pageDescription:"sdasdasdassdasdas"};VK.init({apiId:BC.Var.VkId,
onlyWidgets:!0});VK.Widgets.Like("vk_like",b,a.productId)},ShopBreadCrumbs:!1,CreateCategoryBreadCrumbs:function(a){var b=$("ProductBrowser-1").select("div.ecwid-productBrowser-categoryPath-categoryLink a"),c;this._clearBreadCrumbs();for(var d=0;d<=b.length-1;d++)c=d==b.length-1&&a?!1:b[d].href,this.CreateBreadCrumbs(b[d].innerHTML,c)},CreateProductBreadCrumbs:function(){this.CreateCategoryBreadCrumbs(!1);this.CreateBreadCrumbs($$("div.ecwid-productBrowser-head")[0].innerHTML,!1)},CreateBagBreadCrumbs:function(){this._clearBreadCrumbs();
this.CreateBreadCrumbs("\u041f\u043b\u0430\u0442\u043d\u044b\u0439 \u0440\u0430\u0437\u0434\u0435\u043b",BC.Var.Host+"/shop/#ecwid:category=0");this.CreateBreadCrumbs("\u041a\u043e\u0440\u0437\u0438\u043d\u0430",!1)},CreateCheckoutBreadCrumbs:function(){this._clearBreadCrumbs();this.CreateBreadCrumbs("\u041f\u043b\u0430\u0442\u043d\u044b\u0439 \u0440\u0430\u0437\u0434\u0435\u043b",BC.Var.Host+"/shop/#ecwid:category=0");this.CreateBreadCrumbs("\u041a\u043e\u0440\u0437\u0438\u043d\u0430",BC.Var.Host+
"/shop/#ecwid:mode=cart");this.CreateBreadCrumbs("\u041e\u043f\u043b\u0430\u0442\u0430",!1)},CreateBreadCrumbs:function(a,b){this._createArrow();b?this._createLink(a,b):this._createCurrent(a)},_clearBreadCrumbs:function(){this.ShopBreadCrumbs.innerHTML=""},_createBreadCrumbElement:function(a,b,c,d){a=document.createElement(a);a.setAttribute("class",c);d!=void 0&&a.setAttribute("href",d);a.innerHTML=b;this.ShopBreadCrumbs.appendChild(a)},_createArrow:function(){this._createBreadCrumbElement("span",
"&rarr;","arrow")},_createLink:function(a,b){this._createBreadCrumbElement("a",a,"link",b)},_createCurrent:function(a){this._createBreadCrumbElement("span",a,"current")}};
BC.Pagination={FocusOnInput:!1,ToogleNavigation:function(){var a=$("page-goTo"),b=$("nextPage"),c=$("prevPage");this.FocusOnInput?(a.hide(),b.show(),c.show()):(a.show(),b.hide(),c.hide())},InputFocus:function(a){if(!this.FocusOnInput)this.ToogleNavigation(),this.FocusOnInput=!0;a.stopPropagation!=void 0?a.stopPropagation():a.cancelBubble=!0;return!1},BodyFocus:function(){if(this.FocusOnInput)this.ToogleNavigation(),this.FocusOnInput=!1;return!1},InputChange:function(a){var b=$("current-page"),c=parseInt(b.value);
if(c){if(a.keyCode==40){a.shiftKey?c-=10:c--;if(c<=0)return!1;b.value=c}else if(a.keyCode==38)a.shiftKey?c+=10:c++,b.value=c;$("pagination-form").action=BC.Var.Link+c}},FormSubmit:function(a){var b=$("current-page"),b=parseInt(b.value);if(!b||b>BC.Var.PageCount)return BC.Window.SetError("\u043d\u0435\u043a\u043e\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b"),a.returnValue=!1;window.location=$("pagination-form").action;return a.returnValue=
!1},SetFuncs:function(){Event.observe("content","click",function(){BC.Pagination.BodyFocus(this)});Event.observe("pagination-form","click",function(a){BC.Pagination.InputFocus(a)});Event.observe("current-page","focus",function(a){BC.Pagination.InputFocus(a)});Event.observe("pagination-form","submit",function(a){return BC.Pagination.FormSubmit(a)});Event.observe("current-page","keyup",function(a){BC.Pagination.InputChange(a)})}};
BC.Editor={Create:function(a,b,c,d){var e=function(c){BC.Editor.SetText(b,c.sender.instances[a]);CKEDITOR.removeListener("instanceReady",e);if(a=="comment_editor"&&BC.Var.CurCommentId)$("form"+BC.Var.CurCommentId).style.height=$("CommentFormBox").offsetHeight+60+"px"};CKEDITOR.on("instanceReady",e);c+=BC.Var.User.role!="member"?"Admin":"";CKEDITOR.instances[a]==void 0?CKEDITOR.replace(a,{toolbar:c,height:d!=void 0?d:"330px"}):BC.Editor.SetText(b,CKEDITOR.instances[a])},SetText:function(a,b){a==""?
b.focus():b.setData(a)},CreateCommentEditor:function(a,b){this.Create(a,b==void 0?"":b,"Comment")},CreateTopicEditor:function(a,b){this.Create(a,b==void 0?"":b,"Topic","500px")},Destroy:function(a){CKEDITOR.instances[a]!=void 0&&(CKEDITOR.instances[a].setData(""),CKEDITOR.instances[a].destroy())}};
(function(){var rsplit=function(string,regex){var result=regex.exec(string),retArr=new Array(),first_idx,last_idx,first_bit;while(result!=null){first_idx=result.index;last_idx=regex.lastIndex;if((first_idx)!=0){first_bit=string.substring(0,first_idx);retArr.push(string.substring(0,first_idx));string=string.slice(first_idx)}retArr.push(result[0]);string=string.slice(result[0].length);result=regex.exec(string)}if(!string==""){retArr.push(string)}return retArr},chop=function(string){return string.substr(0,string.length-1)},extend=function(d,s){for(var n in s){if(s.hasOwnProperty(n)){d[n]=s[n]}}};EJS=function(options){options=typeof options=="string"?{view:options}:options;this.set_options(options);if(options.precompiled){this.template={};this.template.process=options.precompiled;EJS.update(this.name,this);return }if(options.element){if(typeof options.element=="string"){var name=options.element;options.element=document.getElementById(options.element);if(options.element==null){throw name+"does not exist!"}}if(options.element.value){this.text=options.element.value}else{this.text=options.element.innerHTML}this.name=options.element.id;this.type="["}else{if(options.url){options.url=EJS.endExt(options.url,this.extMatch);this.name=this.name?this.name:options.url;var url=options.url;var template=EJS.get(this.name,this.cache);if(template){return template}if(template==EJS.INVALID_PATH){return null}try{this.text=EJS.request(url+(this.cache?"":"?"+Math.random()))}catch(e){}if(this.text==null){throw ({type:"EJS",message:"There is no template at "+url})}}}var template=new EJS.Compiler(this.text,this.type);template.compile(options,this.name);EJS.update(this.name,this);this.template=template};EJS.prototype={render:function(object,extra_helpers){object=object||{};this._extra_helpers=extra_helpers;var v=new EJS.Helpers(object,extra_helpers||{});return this.template.process.call(object,object,v)},update:function(element,options){if(typeof element=="string"){element=document.getElementById(element)}if(options==null){_template=this;return function(object){EJS.prototype.update.call(_template,element,object)}}if(typeof options=="string"){params={};params.url=options;_template=this;params.onComplete=function(request){var object=eval(request.responseText);EJS.prototype.update.call(_template,element,object)};EJS.ajax_request(params)}else{element.innerHTML=this.render(options)}},out:function(){return this.template.out},set_options:function(options){this.type=options.type||EJS.type;this.cache=options.cache!=null?options.cache:EJS.cache;this.text=options.text||null;this.name=options.name||null;this.ext=options.ext||EJS.ext;this.extMatch=new RegExp(this.ext.replace(/\./,"."))}};EJS.endExt=function(path,match){if(!path){return null}match.lastIndex=0;return path+(match.test(path)?"":this.ext)};EJS.Scanner=function(source,left,right){extend(this,{left_delimiter:left+"%",right_delimiter:"%"+right,double_left:left+"%%",double_right:"%%"+right,left_equal:left+"%=",left_comment:left+"%#"});this.SplitRegexp=left=="["?/(\[%%)|(%%\])|(\[%=)|(\[%#)|(\[%)|(%\]\n)|(%\])|(\n)/:new RegExp("("+this.double_left+")|(%%"+this.double_right+")|("+this.left_equal+")|("+this.left_comment+")|("+this.left_delimiter+")|("+this.right_delimiter+"\n)|("+this.right_delimiter+")|(\n)");this.source=source;this.stag=null;this.lines=0};EJS.Scanner.to_text=function(input){if(input==null||input===undefined){return""}if(input instanceof Date){return input.toDateString()}if(input.toString){return input.toString()}return""};EJS.Scanner.prototype={scan:function(block){scanline=this.scanline;regex=this.SplitRegexp;if(!this.source==""){var source_split=rsplit(this.source,/\n/);for(var i=0;i<source_split.length;i++){var item=source_split[i];this.scanline(item,regex,block)}}},scanline:function(line,regex,block){this.lines++;var line_split=rsplit(line,regex);for(var i=0;i<line_split.length;i++){var token=line_split[i];if(token!=null){try{block(token,this)}catch(e){throw {type:"EJS.Scanner",line:this.lines}}}}}};EJS.Buffer=function(pre_cmd,post_cmd){this.line=new Array();this.script="";this.pre_cmd=pre_cmd;this.post_cmd=post_cmd;for(var i=0;i<this.pre_cmd.length;i++){this.push(pre_cmd[i])}};EJS.Buffer.prototype={push:function(cmd){this.line.push(cmd)},cr:function(){this.script=this.script+this.line.join("; ");this.line=new Array();this.script=this.script+"\n"},close:function(){if(this.line.length>0){for(var i=0;i<this.post_cmd.length;i++){this.push(pre_cmd[i])}this.script=this.script+this.line.join("; ");line=null}}};EJS.Compiler=function(source,left){this.pre_cmd=["var ___ViewO = [];"];this.post_cmd=new Array();this.source=" ";if(source!=null){if(typeof source=="string"){source=source.replace(/\r\n/g,"\n");source=source.replace(/\r/g,"\n");this.source=source}else{if(source.innerHTML){this.source=source.innerHTML}}if(typeof this.source!="string"){this.source=""}}left=left||"<";var right=">";switch(left){case"[":right="]";break;case"<":break;default:throw left+" is not a supported deliminator";break}this.scanner=new EJS.Scanner(this.source,left,right);this.out=""};EJS.Compiler.prototype={compile:function(options,name){options=options||{};this.out="";var put_cmd="___ViewO.push(";var insert_cmd=put_cmd;var buff=new EJS.Buffer(this.pre_cmd,this.post_cmd);var content="";var clean=function(content){content=content.replace(/\\/g,"\\\\");content=content.replace(/\n/g,"\\n");content=content.replace(/"/g,'\\"');return content};this.scanner.scan(function(token,scanner){if(scanner.stag==null){switch(token){case"\n":content=content+"\n";buff.push(put_cmd+'"'+clean(content)+'");');buff.cr();content="";break;case scanner.left_delimiter:case scanner.left_equal:case scanner.left_comment:scanner.stag=token;if(content.length>0){buff.push(put_cmd+'"'+clean(content)+'")')}content="";break;case scanner.double_left:content=content+scanner.left_delimiter;break;default:content=content+token;break}}else{switch(token){case scanner.right_delimiter:switch(scanner.stag){case scanner.left_delimiter:if(content[content.length-1]=="\n"){content=chop(content);buff.push(content);buff.cr()}else{buff.push(content)}break;case scanner.left_equal:buff.push(insert_cmd+"(EJS.Scanner.to_text("+content+")))");break}scanner.stag=null;content="";break;case scanner.double_right:content=content+scanner.right_delimiter;break;default:content=content+token;break}}});if(content.length>0){buff.push(put_cmd+'"'+clean(content)+'")')}buff.close();this.out=buff.script+";";var to_be_evaled="/*"+name+"*/this.process = function(_CONTEXT,_VIEW) { try { with(_VIEW) { with (_CONTEXT) {"+this.out+" return ___ViewO.join('');}}}catch(e){e.lineNumber=null;throw e;}};";try{eval(to_be_evaled)}catch(e){if(typeof JSLINT!="undefined"){JSLINT(this.out);for(var i=0;i<JSLINT.errors.length;i++){var error=JSLINT.errors[i];if(error.reason!="Unnecessary semicolon."){error.line++;var e=new Error();e.lineNumber=error.line;e.message=error.reason;if(options.view){e.fileName=options.view}throw e}}}else{throw e}}}};EJS.config=function(options){EJS.cache=options.cache!=null?options.cache:EJS.cache;EJS.type=options.type!=null?options.type:EJS.type;EJS.ext=options.ext!=null?options.ext:EJS.ext;var templates_directory=EJS.templates_directory||{};EJS.templates_directory=templates_directory;EJS.get=function(path,cache){if(cache==false){return null}if(templates_directory[path]){return templates_directory[path]}return null};EJS.update=function(path,template){if(path==null){return }templates_directory[path]=template};EJS.INVALID_PATH=-1};EJS.config({cache:true,type:"<",ext:".ejs"});EJS.Helpers=function(data,extras){this._data=data;this._extras=extras;extend(this,extras)};EJS.Helpers.prototype={view:function(options,data,helpers){if(!helpers){helpers=this._extras}if(!data){data=this._data}return new EJS(options).render(data,helpers)},to_text:function(input,null_text){if(input==null||input===undefined){return null_text||""}if(input instanceof Date){return input.toDateString()}if(input.toString){return input.toString().replace(/\n/g,"<br />").replace(/''/g,"'")}return""}};EJS.newRequest=function(){var factories=[function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new XMLHttpRequest()},function(){return new ActiveXObject("Microsoft.XMLHTTP")}];for(var i=0;i<factories.length;i++){try{var request=factories[i]();if(request!=null){return request}}catch(e){continue}}};EJS.request=function(path){var request=new EJS.newRequest();request.open("GET",path,false);try{request.send(null)}catch(e){return null}if(request.status==404||request.status==2||(request.status==0&&request.responseText=="")){return null}return request.responseText};EJS.ajax_request=function(params){params.method=(params.method?params.method:"GET");var request=new EJS.newRequest();request.onreadystatechange=function(){if(request.readyState==4){if(request.status==200){params.onComplete(request)}else{params.onComplete(request)}}};request.open(params.method,params.url);request.send(null)}})();EJS.Helpers.prototype.date_tag=function(C,O,A){if(!(O instanceof Date)){O=new Date()}var B=["January","February","March","April","May","June","July","August","September","October","November","December"];var G=[],D=[],P=[];var J=O.getFullYear();var H=O.getMonth();var N=O.getDate();for(var M=J-15;M<J+15;M++){G.push({value:M,text:M})}for(var E=0;E<12;E++){D.push({value:(E),text:B[E]})}for(var I=0;I<31;I++){P.push({value:(I+1),text:(I+1)})}var L=this.select_tag(C+"[year]",J,G,{id:C+"[year]"});var F=this.select_tag(C+"[month]",H,D,{id:C+"[month]"});var K=this.select_tag(C+"[day]",N,P,{id:C+"[day]"});return L+F+K};EJS.Helpers.prototype.form_tag=function(B,A){A=A||{};A.action=B;if(A.multipart==true){A.method="post";A.enctype="multipart/form-data"}return this.start_tag_for("form",A)};EJS.Helpers.prototype.form_tag_end=function(){return this.tag_end("form")};EJS.Helpers.prototype.hidden_field_tag=function(A,C,B){return this.input_field_tag(A,C,"hidden",B)};EJS.Helpers.prototype.input_field_tag=function(A,D,C,B){B=B||{};B.id=B.id||A;B.value=D||"";B.type=C||"text";B.name=A;return this.single_tag_for("input",B)};EJS.Helpers.prototype.is_current_page=function(A){return(window.location.href==A||window.location.pathname==A?true:false)};EJS.Helpers.prototype.link_to=function(B,A,C){if(!B){var B="null"}if(!C){var C={}}if(C.confirm){C.onclick=' var ret_confirm = confirm("'+C.confirm+'"); if(!ret_confirm){ return false;} ';C.confirm=null}C.href=A;return this.start_tag_for("a",C)+B+this.tag_end("a")};EJS.Helpers.prototype.submit_link_to=function(B,A,C){if(!B){var B="null"}if(!C){var C={}}C.onclick=C.onclick||"";if(C.confirm){C.onclick=' var ret_confirm = confirm("'+C.confirm+'"); if(!ret_confirm){ return false;} ';C.confirm=null}C.value=B;C.type="submit";C.onclick=C.onclick+(A?this.url_for(A):"")+"return false;";return this.start_tag_for("input",C)};EJS.Helpers.prototype.link_to_if=function(F,B,A,D,C,E){return this.link_to_unless((F==false),B,A,D,C,E)};EJS.Helpers.prototype.link_to_unless=function(E,B,A,C,D){C=C||{};if(E){if(D&&typeof D=="function"){return D(B,A,C,D)}else{return B}}else{return this.link_to(B,A,C)}};EJS.Helpers.prototype.link_to_unless_current=function(B,A,C,D){C=C||{};return this.link_to_unless(this.is_current_page(A),B,A,C,D)};EJS.Helpers.prototype.password_field_tag=function(A,C,B){return this.input_field_tag(A,C,"password",B)};EJS.Helpers.prototype.select_tag=function(D,G,H,F){F=F||{};F.id=F.id||D;F.value=G;F.name=D;var B="";B+=this.start_tag_for("select",F);for(var E=0;E<H.length;E++){var C=H[E];var A={value:C.value};if(C.value==G){A.selected="selected"}B+=this.start_tag_for("option",A)+C.text+this.tag_end("option")}B+=this.tag_end("select");return B};EJS.Helpers.prototype.single_tag_for=function(A,B){return this.tag(A,B,"/>")};EJS.Helpers.prototype.start_tag_for=function(A,B){return this.tag(A,B)};EJS.Helpers.prototype.submit_tag=function(A,B){B=B||{};B.type=B.type||"submit";B.value=A||"Submit";return this.single_tag_for("input",B)};EJS.Helpers.prototype.tag=function(C,E,D){if(!D){var D=">"}var B=" ";for(var A in E){if(E[A]!=null){var F=E[A].toString()}else{var F=""}if(A=="Class"){A="class"}if(F.indexOf("'")!=-1){B+=A+'="'+F+'" '}else{B+=A+"='"+F+"' "}}return"<"+C+B+D};EJS.Helpers.prototype.tag_end=function(A){return"</"+A+">"};EJS.Helpers.prototype.text_area_tag=function(A,C,B){B=B||{};B.id=B.id||A;B.name=B.name||A;C=C||"";if(B.size){B.cols=B.size.split("x")[0];B.rows=B.size.split("x")[1];delete B.size}B.cols=B.cols||50;B.rows=B.rows||4;return this.start_tag_for("textarea",B)+C+this.tag_end("textarea")};EJS.Helpers.prototype.text_tag=EJS.Helpers.prototype.text_area_tag;EJS.Helpers.prototype.text_field_tag=function(A,C,B){return this.input_field_tag(A,C,"text",B)};EJS.Helpers.prototype.url_for=function(A){return'window.location="'+A+'";'};EJS.Helpers.prototype.img_tag=function(B,C,A){A=A||{};A.src=B;A.alt=C;return this.single_tag_for("img",A)}
