var CACHE={},i,s,_B=document.body,fr=0,IE=!navigator.appName.search("Mic"),OPERA=!navigator.appName.search("Opera"),NN=!navigator.appName.search("Netscape"),_H_=new Array(),_N_=0;function get(id,w){var e=CACHE[id];if(!e||!e.offsetHeight){if(!w)w=window;CACHE[id]=e=w.document.getElementById(id)}return e}function $(id,w){return get(id,w)}function $w(e){return e.offsetWidth}function $h(e){return e.offsetHeight}function $l(e){return e.offsetLeft}function $t(e){return e.offsetTop}function $d(w){if(!w)w=window;return w.document}function get_XY(p,relative){var x=0,y=0;while(p){x+=p.offsetLeft<0?0:p.offsetLeft;y+=p.offsetTop;p=p.offsetParent;if(p&&IE){x+=p.clientLeft;y+=p.clientTop}if(relative&&p&&(p.style.position||p.className.match(/(^rb$|rb | rb|layer)/)))break}return{x:x,y:y,'0':x,'1':y}}function get_attr(o,n){return o[n]||(o.attributes&&(o=o.attributes.getNamedItem(n))?o.value:null)}function is_attr(o,n){return get_attr(o,n)!=null}function add_html(e,s,before){if(e.insertAdjacentHTML)e.insertAdjacentHTML(before?"beforeBegin":"afterEnd",s);else if(e.outerHTML)e.outerHTML=before?s+e.outerHTML:e.outerHTML+s;else{var r=$d().createRange();r.setStartBefore(e);var html=r.createContextualFragment(s);e.parentNode.insertBefore(html,before?e:e.nextSibling)}}function set_html(e,s){if(e.outerHTML)e.outerHTML=s;else{var r=$d().createRange();r.setStartBefore(e);var html=r.createContextualFragment(s);e.parentNode.replaceChild(html,e)}}function get_html(e){if(e.outerHTML)return e.outerHTML;else{var a=e.attributes,s="",i;for(i=0;i<a.length;i++)s+=" "+a[i].name+"=\""+a[i].value+"\"";return"<"+e.tagName+s+">"+e.innerHTML+"</"+e.tagName+">"}}function _cross(x1,x2,y1,y2){return(x1>y1)&&(x1<y2)||(x2>y1)&&(x2<y2)||(y1>x1)&&(y1<x2)||(y2>x1)&&(y2<x2)}function show_hide_elm(elm,s,x,y,dx,dy){if(!IE)return;var e=$d().getElementsByTagName(elm),o,t,m;for(i=0;i<e.length;i++){o=e[i];t=o.style;if(o.id=="_mon"||o.id=="currency")continue;if(s)t.visibility="";else{m=get_XY(o);if(_cross(x,x+dx,m[0],m[0]+$w(o))&&_cross(y,y+dy,m[1],m[1]+$h(o)))t.visibility="hidden";else t.visibility=""}}}function show_hide_elm2(elm,s,x,y,dx,dy){if(!IE)return;var e=$d().getElementsByTagName(elm),o,t,m;for(i=0;i<e.length;i++){o=e[i];t=o.style;if(o.id=="_mon"||o.id=="currency")continue;if(s){if(o.hidded!=null){t.visibility="";o.hidded=null}}else if(t.visibility!="hidden"){m=get_XY(o);if(_cross(x,x+dx,m[0],m[0]+$w(o))&&_cross(y,y+dy,m[1],m[1]+$h(o)))o.hidded=t.visibility="hidden"}}}function get_param(n){var m;return(m=location.search.match(new RegExp(n+"=([^\\s&]+)")))?m[1]:""}function get_cookie(n){var m;return(m=$d().cookie.match(new RegExp(n+"=([^\\s;]+)")))?m[1]:""}function set_cookie(n,v,noex){$d().cookie=n+"="+v+";path=/"+(noex?"":";expires=Fri, 31 Dec 2010 23:59:59 GMT")}function show_popup(url){window.open(url,"popup","menubar=0,scrollbars=1,titlebar=0,height=500,width=750,resizable=1,left=3000")}function move(o,x,y){o.style.left=x;o.style.top=y}function write_date(){var D=new Date();h=D.getHours();m=D.getMinutes();d=D.getDate();s=D.getMonth()+1;y=D.getFullYear();$d().write((d<10?'0'+d:d)+"."+(s<10?'0'+s:s)+"."+y+" "+(h<10?'0'+h:h)+":"+(m<10?'0'+m:m))}function set_hp(){o=event.srcElement;o.style.behavior='url(#default#homepage)';o.setHomePage(location.href.replace(/[&?]?SE=\w+/,""))}function disable(e,d,nf){if(typeof(e)=="string")e=$(e);var c=e.type=="checkbox";e.disabled=d;if(!c)e.className=d?"readonly":"";if(d)e.style.backgroundColor="";e.style.borderColor="";if(!d&&!nf&&!c)e.focus()}function hide_show(o,h){if(typeof(o)=="string")o=$(o);h=o.style.display=h==null&&o.style.display==""||h?"none":"";if(o.style.position!="absolute"&&o.className!="layer")on_change();return h}function attach_event(e,f,o){if(!o)o=window;if(o.attachEvent)o.attachEvent("on"+e,f);else o.addEventListener(e,f,false)}function detach_event(e,f,o){if(!o)o=window;if(window.detachEvent)o.detachEvent("on"+e,f);else o.removeEventListener(e,f,false)}function event_src(e){return window.event?event.srcElement:e.target}function ignore(){if(window.event)event.cancelBubble=true;return false}function round(v){return Math.round(v*100)/100}function show_layer(lnk,layer,top,relative){if(typeof(layer)=="string")layer=$(layer);move(layer,0,-500);if(!hide_show(layer)){var m=get_XY(lnk,relative),bw=_B.scrollWidth?_B.scrollWidth:$d().width,old_md=_B.onmousedown;if(m.x+$w(layer)>bw)m.x=bw-$w(layer);move(layer,m.x,top?m.y-$h(layer)-2:m.y+$h(lnk)+2);_B.onmousedown=function(e){var p;if((e=e||event)&&(p=e.srcElement||e.target)){while(p){if(p==layer||p==lnk)return;p=p.parentNode}hide_show(layer,1);_B.onmousedown=old_md;if(old_md)old_md(e)}}}return false}function on_change(){for(func in _H_)_H_[func]()}function add_handler_onchange(func){_H_[_N_++]=func}function fcmd(c){fr.cmd.value=c;fr.submit()}function load_js(url){var js=$d().createElement("script");if(url.charAt(0)=="/")url=url.replace("\.js","_v15.js");js.setAttribute("type","text/javascript");js.setAttribute("src",url);$d().getElementsByTagName("HEAD")[0].appendChild(js)}function ins_text(e,s){if(OPERA){e.form.focus();e.form.focus()}e.focus();if($d().selection)$d().selection.createRange().text=s;else if(typeof e.selectionStart!="undefined"){var b=e.selectionStart;e.value=e.value.substring(0,b)+s+e.value.substring(e.selectionEnd);if(!OPERA)s=s.replace(/\r/g,"");e.setSelectionRange(b+=s.length,b)}else e.value+=s}function init_form(){if(!fr)fr=document.forms.main||document.forms[0]}function warn(){return confirm("Вы уверены?")}if(window.screen&&screen.width>1024)$d().write("<style>body,tr{font-size:75%}</style>")