if(typeof console=="undefined"){var f=function(){};console={log:f,dir:f,warn:f}}var userAgent=navigator.userAgent.toLowerCase();Yakaz={v:"090424",ua:navigator.userAgent.toLowerCase(),get:function(c,b,m){if(!c){return null}if(c.nodeType){return c}else{if(c.length>0&&c.charAt(0)!="."){return document.getElementById(c)}else{var l=c.substring(1);var k=new Array();if(b==null){b=document}else{if(this.isString(b)){b=document.getElementById(b)}}if(m==null){m="*"}var e=b.getElementsByTagName(m);var a=e.length;var h=new RegExp("(^|\\s)"+l+"(\\s|$)");for(var g=0,d=0;g<a;g++){if(h.test(e[g].className)){k[d]=e[g];d++}}delete e;delete h;return k}}},getAncestor:function(d,b,a){b=b||"";var e=new RegExp("(^|\\s)"+b+"(\\s|$)");d=this.get(d);var c=d;while(c){if(c.nodeName.toLowerCase()==a&&(b.length==0||e.test(c.className))){return c}c=c.parentNode}return null},toggle:function(b){var a=this.get(b);if(a){a.style.display=(a.style.display=="none")?"":"none"}},remove:function(b,e,a){var d=this.get(b,e,a);if(d){if(Yakaz.isArray(d)){for(var c=0;c<d.length;c++){d[c].parentNode.removeChild(d[c])}}else{d.parentNode.removeChild(d)}}},setDisplay:function(b,d){var a=this.get(b);if(a){if(this.isArray(a)){for(var c=0;c<a.length;c++){a[c].style.display=d}}else{a.style.display=d}}},hide:function(){for(var a=0;a<arguments.length;a++){this.setDisplay(arguments[a],"none")}},show:function(){for(var a=0;a<arguments.length;a++){this.setDisplay(arguments[a],"")}},isString:function(a){return typeof a=="string"},isArray:function(a){return Object.prototype.toString.call(a)==="[object Array]"},isNumber:function(a){return typeof a=="number"},isUndefined:function(a){return typeof a=="undefined"},hasCls:function(b,a){b=this.get(b);if(!b){return false}var c=new RegExp("(^|\\s)"+a+"(\\s|$)");return c.test(b.className)},addCls:function(b,a){b=this.get(b);if(!this.hasCls(b,a)){b.className+=" "+a}},removeCls:function(b,a){b=this.get(b);b.className=this.trim(b.className.replace(a,""))},trim:function(a){return(a||"").replace(/^\s+|\s+$/g,"")},isIE:/msie/.test(userAgent)&&!/opera/.test(userAgent),isGecko:userAgent.indexOf("gecko")>-1,isSafari:/webkit/.test(userAgent),isOpera:/opera/.test(userAgent),browserVersion:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],scrollToCenter:function(b){b=this.get(b);var a=0,c=0;while(b!=null){c+=b.offsetTop;b=b.offsetParent}c-=Math.round(document.documentElement.clientHeight/2);window.scrollTo(a,c)},isValidEmail:function(a){var b=/^[a-z0-9,!#\$%&\'\*\+\/=\?\^_`\{\|}~-]+(\.[a-z0-9,!#\$%&\'\*\+\/=\?\^_`\{\|}~-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.([a-z]{2,})$/;return b.test(a)},hideModal:function(){Yakaz.remove("background");Yakaz.hide(".message-box")},d:function(b){var a=b.match(/.{1,5}/g);a.reverse();delete b;return a.join("")},showModal:function(b){b=this.get(b);this.addCls(b,"message-box");var a=Yakaz.get("background");if(!a){a=document.createElement("div")}a.setAttribute("id","background");a.className="background";a.onclick=this.hideModal;document.body.appendChild(a);Yakaz.show(b);b.style.marginTop=document.documentElement.clientHeight/2-b.offsetHeight/2+"px";b.style.marginLeft=document.documentElement.clientWidth/2-b.offsetWidth/2+"px";if(this.isIE){a.style.position="absolute";a.style.height=document.body.clientHeight;b.style.position="absolute";b.style.marginTop=document.documentElement.scrollTop+(document.documentElement.clientHeight/2-b.offsetHeight/2)+"px"}}};Yakaz.namespace=function(){var a=arguments,o=null,i,j,d,rt;for(i=0;i<a.length;++i){d=a[i].split(".");rt=d[0];eval("if (typeof "+rt+' == "undefined"){'+rt+" = {};} o = "+rt+";");for(j=1;j<d.length;++j){o[d[j]]=o[d[j]]||{};o=o[d[j]]}}};Yakaz.namespace("Yakaz.core");Yakaz.core.Array={inArray:function(c,b){return this.pos(c,b)!=-1},pos:function(d,b){for(var c=0;c<b.length;c++){if(b[c]==d){return c}}return -1},remove:function(c,b){var d=this.pos(c,b);if(d!==-1){b.splice(d,1)}}};Yakaz.core.Event={getTarget:function(a){a=a||window.event;return a.target||a.srcElement}};Yakaz.core.replaceQueryString=function(a,d,c){var b=new RegExp("([?|&])"+d+"=.*?(&|$)","i");if(a.match(b)){return a.replace(b,"$1"+d+"="+c+"$2")}else{if(a.indexOf("?")==-1){return a+"?"+d+"="+c}else{return a+"&"+d+"="+c}}};Yakaz.core.removeQueryString=function(a,c){var b=new RegExp("([?|&])"+c+"=.*?(&|$)","i");return a.match(b)?a.replace(b,"$2"):a};Yakaz.core.QueryString=function(a){var c={};var b=function(e){return e.substring(e.length-2)=="[]"};var d=function(h){var k=/(\[|%5B)\d+(\]|%5D)/g;h=h.replace(k,"[]");c={};var e=h.split("&");var j=null;for(var g=0;g<e.length;g++){j=e[g].split("=");if(j.length==2){if(b(j[0])){if(j[0] in c){c[j[0]].push(j[1])}else{c[j[0]]=[j[1]]}}else{c[j[0]]=j[1]}}}};if(a){d(a)}return{has:function(e,g){if(g){return(e in c)&&Yakaz.core.Array.inArray(g,c[e])}return e in c},get:function(e){return c[e]},set:function(e,g){if(b(e)){if(this.has(e)&&!this.has(e,g)){c[e].push(g)}else{c[e]=[g]}}else{c[e]=g}},remove:function(g,h){if(h){var e=c[g];if(e){if(e===h){delete c[g]}else{if(Yakaz.isArray(e)){Yakaz.core.Array.remove(h,e)}}}}else{delete c[g]}},toString:function(){var h=[];for(var g in c){if(Yakaz.isArray(c[g])){for(var e=0;e<c[g].length;e++){h.push(g+"="+c[g][e])}}else{if(typeof(c[g])!="undefined"){h.push(g+"="+c[g])}}}return h.sort().join("&")},parse:d}};String.prototype.format=function(o){if(Yakaz.isString(o)||Yakaz.isNumber(o)){var args=arguments;return this.replace(/\{(\d+)\}/g,function(m,i){return args[i]})}else{var pattern=/\{(\w+|\w+\.+\w+)\}/g;return this.replace(pattern,function(capture){var property=capture.replace(/{|}/g,"");return eval("o."+property)})}};function AjaxRequest(){var a=new Object();a.timeout=null;a.generateUniqueUrl=true;a.url=window.location.href;a.method="GET";a.async=true;a.username=null;a.password=null;a.parameters=new Object();a.requestIndex=AjaxRequest.numAjaxRequests++;a.responseReceived=false;a.groupName=null;a.queryString="";a.responseText=null;a.responseXML=null;a.status=null;a.statusText=null;a.aborted=false;a.xmlHttpRequest=null;a.onTimeout=null;a.onLoading=null;a.onLoaded=null;a.onInteractive=null;a.onComplete=null;a.onSuccess=null;a.onError=null;a.onGroupBegin=null;a.onGroupEnd=null;a.xmlHttpRequest=AjaxRequest.getXmlHttpRequest();if(a.xmlHttpRequest==null){return null}a.xmlHttpRequest.onreadystatechange=function(){if(a==null||a.xmlHttpRequest==null){return}if(a.xmlHttpRequest.readyState==1){a.onLoadingInternal(a)}if(a.xmlHttpRequest.readyState==2){a.onLoadedInternal(a)}if(a.xmlHttpRequest.readyState==3){a.onInteractiveInternal(a)}if(a.xmlHttpRequest.readyState==4){a.onCompleteInternal(a)}};a.onLoadingInternalHandled=false;a.onLoadedInternalHandled=false;a.onInteractiveInternalHandled=false;a.onCompleteInternalHandled=false;a.onLoadingInternal=function(){if(a.onLoadingInternalHandled){return}AjaxRequest.numActiveAjaxRequests++;if(AjaxRequest.numActiveAjaxRequests==1&&typeof(window.AjaxRequestBegin)=="function"){AjaxRequestBegin()}if(a.groupName!=null){if(typeof(AjaxRequest.numActiveAjaxGroupRequests[a.groupName])=="undefined"){AjaxRequest.numActiveAjaxGroupRequests[a.groupName]=0}AjaxRequest.numActiveAjaxGroupRequests[a.groupName]++;if(AjaxRequest.numActiveAjaxGroupRequests[a.groupName]==1&&typeof(a.onGroupBegin)=="function"){a.onGroupBegin(a.groupName)}}if(typeof(a.onLoading)=="function"){a.onLoading(a)}a.onLoadingInternalHandled=true};a.onLoadedInternal=function(){if(a.onLoadedInternalHandled){return}if(typeof(a.onLoaded)=="function"){a.onLoaded(a)}a.onLoadedInternalHandled=true};a.onInteractiveInternal=function(){if(a.onInteractiveInternalHandled){return}if(typeof(a.onInteractive)=="function"){a.onInteractive(a)}a.onInteractiveInternalHandled=true};a.onCompleteInternal=function(){if(a.onCompleteInternalHandled||a.aborted){return}a.onCompleteInternalHandled=true;AjaxRequest.numActiveAjaxRequests--;if(AjaxRequest.numActiveAjaxRequests==0&&typeof(window.AjaxRequestEnd)=="function"){AjaxRequestEnd(a.groupName)}if(a.groupName!=null){AjaxRequest.numActiveAjaxGroupRequests[a.groupName]--;if(AjaxRequest.numActiveAjaxGroupRequests[a.groupName]==0&&typeof(a.onGroupEnd)=="function"){a.onGroupEnd(a.groupName)}}a.responseReceived=true;a.status=a.xmlHttpRequest.status;a.statusText=a.xmlHttpRequest.statusText;a.responseText=a.xmlHttpRequest.responseText;a.responseXML=a.xmlHttpRequest.responseXML;if(typeof(a.onComplete)=="function"){a.onComplete(a)}if(a.xmlHttpRequest.status==200&&typeof(a.onSuccess)=="function"){a.onSuccess(a)}else{if(typeof(a.onError)=="function"){a.onError(a)}}delete a.xmlHttpRequest.onreadystatechange;a.xmlHttpRequest=null};a.onTimeoutInternal=function(){if(a!=null&&a.xmlHttpRequest!=null&&!a.onCompleteInternalHandled){a.aborted=true;a.xmlHttpRequest.abort();AjaxRequest.numActiveAjaxRequests--;if(AjaxRequest.numActiveAjaxRequests==0&&typeof(window.AjaxRequestEnd)=="function"){AjaxRequestEnd(a.groupName)}if(a.groupName!=null){AjaxRequest.numActiveAjaxGroupRequests[a.groupName]--;if(AjaxRequest.numActiveAjaxGroupRequests[a.groupName]==0&&typeof(a.onGroupEnd)=="function"){a.onGroupEnd(a.groupName)}}if(typeof(a.onTimeout)=="function"){a.onTimeout(a)}delete a.xmlHttpRequest.onreadystatechange;a.xmlHttpRequest=null}};a.process=function(){if(a.xmlHttpRequest!=null){if(a.generateUniqueUrl&&a.method=="GET"){a.parameters.AjaxRequestUniqueId=new Date().getTime()+""+a.requestIndex}var c=null;for(var b in a.parameters){if(a.queryString.length>0){a.queryString+="&"}a.queryString+=encodeURIComponent(b)+"="+encodeURIComponent(a.parameters[b])}if(a.method=="GET"){if(a.queryString.length>0){a.url+=((a.url.indexOf("?")>-1)?"&":"?")+a.queryString}}a.xmlHttpRequest.open(a.method,a.url,a.async,a.username,a.password);if(a.method=="POST"){if(typeof(a.xmlHttpRequest.setRequestHeader)!="undefined"){a.xmlHttpRequest.setRequestHeader("Content-type","application/x-www-form-urlencoded")}c=a.queryString}if(a.timeout>0){setTimeout(a.onTimeoutInternal,a.timeout)}a.xmlHttpRequest.send(c)}};a.handleArguments=function(b){for(var c in b){if(typeof(a[c])=="undefined"){a.parameters[c]=b[c]}else{a[c]=b[c]}}};a.getAllResponseHeaders=function(){if(a.xmlHttpRequest!=null){if(a.responseReceived){return a.xmlHttpRequest.getAllResponseHeaders()}alert("Cannot getAllResponseHeaders because a response has not yet been received")}};a.getResponseHeader=function(b){if(a.xmlHttpRequest!=null){if(a.responseReceived){return a.xmlHttpRequest.getResponseHeader(b)}alert("Cannot getResponseHeader because a response has not yet been received")}};return a}AjaxRequest.getXmlHttpRequest=function(){if(window.XMLHttpRequest){return new XMLHttpRequest()}else{if(window.ActiveXObject){try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(b){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(a){return null}}}else{return null}}};AjaxRequest.isActive=function(){return(AjaxRequest.numActiveAjaxRequests>0)};AjaxRequest.get=function(a){AjaxRequest.doRequest("GET",a)};AjaxRequest.post=function(a){AjaxRequest.doRequest("POST",a)};AjaxRequest.doRequest=function(c,a){if(typeof(a)!="undefined"&&a!=null){var b=new AjaxRequest();b.method=c;b.handleArguments(a);b.process()}};AjaxRequest.submit=function(a,b){if(typeof a=="string"){a=document.getElementById(a)}var d=new AjaxRequest();if(d==null){return false}var c=AjaxRequest.serializeForm(a);d.method=a.method.toUpperCase();d.url=a.action;d.handleArguments(b);d.queryString=c;d.process();return true};AjaxRequest.serializeForm=function(b){var e=b.elements;var a=e.length;var g="";this.addField=function(h,i){if(g.length>0){g+="&"}g+=encodeURIComponent(h)+"="+encodeURIComponent(i)};for(var d=0;d<a;d++){var f=e[d];if(!f.disabled){switch(f.type){case"text":case"password":case"hidden":case"textarea":this.addField(f.name,f.value);break;case"select-one":if(f.selectedIndex>=0){this.addField(f.name,f.options[f.selectedIndex].value)}break;case"select-multiple":for(var c=0;c<f.options.length;c++){if(f.options[c].selected){this.addField(f.name,f.options[c].value)}}break;case"checkbox":case"radio":if(f.checked){this.addField(f.name,f.value)}break}}}return g};AjaxRequest.numActiveAjaxRequests=0;AjaxRequest.numActiveAjaxGroupRequests=new Object();AjaxRequest.numAjaxRequests=0;function changeCatDisplay(){if(Yakaz.get("form-ref").ftype.value=="RSS"){Yakaz.show("fcat")}else{Yakaz.hide("fcat")}}function addFeed(a){Yakaz.hide("sticker");Yakaz.hide("form-ref");Yakaz.get("loading_status").innerHTML=Yakaz.get("result_loading").innerHTML;AjaxRequest.submit(a,{url:"/ajax/account.php?action=addfeed",onSuccess:function(c){var b=c.responseText;if(b=="{OK}"){if(Yakaz.get(a).ftype.value!="url"){document.location="/account/contrib.php"}else{Yakaz.hide("form-ref");Yakaz.get("loading_status").innerHTML=Yakaz.get("result_ok").innerHTML}}else{if(b=="{ERROR}"){Yakaz.hide("form-ref");Yakaz.get("loading_status").innerHTML=Yakaz.get("result_error").innerHTML}else{Yakaz.show("form-ref");Yakaz.get("loading_status").innerHTML="";Yakaz.show("sticker");Yakaz.get("form-result").innerHTML=b}}}})}function login(){Yakaz.get("login-dialog").innerHTML="<img src='/img/loading.gif' alt='*' />";AjaxRequest.submit("login",{url:"/ajax/account.php?action=login",onSuccess:function(c){var a=c.responseText;if(a=="{OK}"){document.location.href=Yakaz.get("login").url.value}else{var b=Yakaz.get("login-dialog");b.className="important";b.innerHTML=a}}})}function createAccount(){Yakaz.get("createAccount-dialog").innerHTML="<img src='/img/loading.gif' alt='*' />";AjaxRequest.submit("createAccount",{url:"/ajax/account.php?action=createaccount",onSuccess:function(c){var a=c.responseText;if(a=="{OK}"){document.location.href=Yakaz.get("createAccount").url.value}else{var b=Yakaz.get("createAccount-dialog");b.className="important";b.innerHTML=a}}})}function postContact(a){Yakaz.hide("sticker");AjaxRequest.submit(a,{url:"/ajax/form.php?action=contact",onSuccess:function(c){var b=c.responseText;if(b=="{OK}"){document.location.href="/confirm.php?sok"}else{Yakaz.show("sticker");Yakaz.get("form-result").innerHTML=b}}})}function recoverPassword(){Yakaz.hide("sticker");AjaxRequest.submit("password",{url:"/ajax/account.php?action=recoverpwd",onSuccess:function(b){var a=b.responseText;if(a=="{OK}"){document.location.href="/account/login.php?newpass=ok"}else{var c=Yakaz.get("password-dialog");c.className="important";c.innerHTML=a}}})}function editParams(){Yakaz.get("editParams-dialog").innerHTML="<img src='/img/loading.gif' alt='*' />";AjaxRequest.submit("editParams",{url:"/ajax/account.php?action=changepwd",onSuccess:function(b){var a=b.responseText;if(a=="{OK}"){document.location.href="/account/contrib.php?changes=ok"}else{var c=Yakaz.get("editParams-dialog");c.className="important";c.innerHTML=a}}})}function sendLink(a){Yakaz.hide("sticker");AjaxRequest.submit(a,{url:"/ajax/form.php?action=sendlink",onSuccess:function(c){var b=c.responseText;if(b=="{OK}"){document.location.href="/confirm.php?sok"}else{Yakaz.show("sticker");Yakaz.get("form-result").innerHTML=b}}})}var alternShowHide=function(a){Yakaz.toggle(a)};function addOpenSearch(a){try{window.external.AddSearchProvider(a)}catch(b){alert(bad_browser)}};