var Tools={isDebugMode:function(){
return (_siteurl.indexOf("localhost")>0);
}};
Element.addMethods({getOuterHTML:function(_1){
var _2={"IMG":true,"BR":true,"INPUT":true,"META":true,"LINK":true,"PARAM":true,"HR":true};
if(!Prototype.Browser.IE){
var _3=_1.attributes;
var _4="<"+_1.tagName;
for(var i=0;i<_3.length;i++){
_4+=" "+_3[i].name+"=\""+_3[i].value+"\"";
}
if(_2[_1.tagName]){
return _4+">";
}
return _4+">"+_1.innerHTML+"</"+_1.tagName+">";
}else{
return _1.outerHTML;
}
},setOuterHTML:function(_6,_7){
if(!Prototype.Browser.IE){
var r=_6.ownerDocument.createRange();
r.setStartBefore(_6);
var df=r.createContextualFragment(_7);
_6.parentNode.replaceChild(df,_6);
}else{
_6.outerHTML=_7;
}
}});
String.prototype.trim=function(){
var _a=this;
_a=_a.replace(/^\s+/,"");
for(var i=_a.length-1;i>=0;i--){
if(/\S/.test(_a.charAt(i))){
_a=_a.substring(0,i+1);
break;
}
}
return _a;
};
var Url={encode:function(_c){
return escape(this._utf8_encode(_c));
},_utf8_encode:function(_d){
_d=_d.replace(/\r\n/g,"\n");
var _e="";
for(var n=0;n<_d.length;n++){
var c=_d.charCodeAt(n);
if(c<128){
_e+=String.fromCharCode(c);
}else{
if((c>127)&&(c<2048)){
_e+=String.fromCharCode((c>>6)|192);
_e+=String.fromCharCode((c&63)|128);
}else{
_e+=String.fromCharCode((c>>12)|224);
_e+=String.fromCharCode(((c>>6)&63)|128);
_e+=String.fromCharCode((c&63)|128);
}
}
}
return _e;
}};
function openPopup(url,_12,_13,_14){
w=window.open(url,"popup","width="+_12+",height="+_13+",scrollbars="+_14+",resizable");
w.focus();
}
var _pages_content={"vy_biography":["P",2],"vy_news":["N",5],"vy_materials":7,"gov_mission":8,"gov_structure":["HP","ministres"],"gov_programm":10,"gov_committees":11,"prj_economic":12,"prj_socia":13,"act_agenda":15,"act_regulation":16,"act_claim":["N",6],"act_results":["N",10],"law_initiative":["P",19,Plain],"law_activities":["P",66,Plain],"social_room":["HP","contacts"],"contacts":["HP","contacts"],"pv_photo":["HP","gallery"],"pv_video":["HP","video"],"press":["N",9],"kozak":["P",38,Plain],"azarov":["P",39,Plain],"kinah":["P",40,Plain],"lovochkin":["P",41,Plain],"slauta":["P",42,Plain],"yatsuba":["P",43,Plain],"boyko":["P",44,Plain],"grish":["P",45,Plain],"papiev":["P",46,Plain],"tolstouhov":["P",47,Plain],"boyko":["P",48,Plain],"kuzmuk":["P",49,Plain],"lavrinovich":["P",75,Plain],"bogoslavskaya":["P",318,Plain],"shufrich":["P",339,Plain],"korg":["P",374,Plain]};
function gen_embed(_15,_16){
var _17="";
_17+="<embed width=\"400\" height=\"330\""+"type=\"application/x-shockwave-flash\" allowscriptaccess=\"sameDomain\" flashvars=\"playList=video/video.xml&videoIndex="+_15+"&siteurl="+_siteurl+"\""+" menu=\"true\" name=\"fPlayer\" bgcolor=\"#fff\" devicefont=\"false\" wmode=\"window\" scale=\"exactfit\" loop=\"false\" play=\"true\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" quality=\"high\" src=\"swf/fPlayerEx.swf\"/>";
_17+="<br>"+_16;
return _17;
}
function gen_content(id,src,_1a,_1b,_1c){
var _1d="";
if(_1a==null){
_1a=true;
}
if(src!=null&&src.length>0){
for(var i=0;i<src.length;i++){
_1d+=src[i].genHTML(_1a);
}
}
if(_1b!=null){
_1d="<h1>"+_1b+"</h1>"+_1d;
}
if(_1c!=null){
_1d+=_1c.genHTML();
}
$(id).innerHTML=_1d;
}
function show_loading_progress(id){
var _20="<div class=\"loading\"><img src='"+_siteurl+"/images/loading.gif' height=16 width=16></div>";
$(id).innerHTML=_20;
}
JS={};
JS.extend=function(_21,_22){
function inheritance(){
}
inheritance.prototype=_22.prototype;
_21.prototype=new inheritance();
_21.prototype.constructor=_21;
_21.baseConstructor=_22;
_21.superClass=_22.prototype;
};
function ContentParams(){
this.language=_language;
this.category_id=null;
this.content_id="content";
this.page_id=null;
this.post_id=null;
this.page_name=null;
this.file_name=null;
this.resources=null;
this.callback=function(res,p){
if(typeof p.resources=="string"){
var s=p.resources+"="+p.resources+".concat(res);";
eval(s);
}
gen_content(p.content_id,res,p.more,p.title,p.navigator);
if(p.clear!=null&&p.clear){
if(p.page_name!=null&&p.page_name.length>0){
clear_viewport(p.page_name);
}
}
change_border();
};
this.search_str=null;
this.navigator=null;
this.title=null;
this.postClass=null;
this.more=true;
this.clear=true;
}
ContentParams.prototype.parseParams=function(_26){
if(typeof (_26)=="number"){
this.page_id=_26;
}else{
if(_26!=null&&typeof (_26)=="object"&&_26.length>1){
if(_26[0]=="P"){
this.page_id=_26[1];
if(_26.length==3&&this.postClass==null){
this.postClass=_26[2];
}
}else{
if(_26[0]=="N"){
this.category_id=_26[1];
}else{
if(_26[0]=="HP"){
this.file_name=_26[1];
}
}
}
}
}
};
function Post(id,_28,_29,_2a){
this.id=id;
this.date=_28;
this.title=_29;
this.content=_2a;
}
Post.prototype.genHTML=function(_2b){
return this.default_renderer(_2b);
};
Post.prototype.genMoreHTML=function(_2c){
var _2d="";
if(this.haveMore()&&_2c){
_2d+="<ul class=\"sig\">";
_2d+="<li class=\"date\">"+this.date+"</li>";
_2d+="<li class=\"more\"><a href=\"javascript:show_post('"+this.id+"');\">"+TL("more_text")+"</a></li>";
_2d+="</ul>";
}
return _2d;
};
Post.prototype.isEmpty=function(){
return (this.content.trim().lenght>0);
};
Post.prototype.haveMore=function(){
return (this.content.indexOf("<!--more-->")>-1);
};
Post.prototype.genContentHTML=function(_2e){
var _2f="";
var pos=-1;
if(!this.isEmpty()){
pos=this.content.indexOf("<!--more-->");
if(pos>-1&&_2e){
if(pos>3&&this.content.substring(pos-4,3)=="<p>"){
pos=pos-3;
}
_2f+=this.content.substring(0,pos);
}else{
_2f+=this.content.replace("<!--more-->","");
}
}else{
_2f+=TL("underconstruction");
}
return _2f;
};
Post.prototype.default_renderer=function(_31){
var _32="";
if(_31==null){
_31=true;
}
_32+="<div class=\"content_top\">";
_32+="<h2>"+this.title+"</h2>";
_32+=this.genContentHTML(_31);
_32+=this.genMoreHTML(_31);
_32+="</div>";
return _32;
};
function Ministr(id,_34,_35,_36){
Ministr.baseConstructor.call(this,id,_34,_35,_36);
}
JS.extend(Ministr,Post);
Ministr.prototype.genMoreHTML=function(_37){
var _38="";
if(this.haveMore()&&_37){
_38+="<p class=\"more\"><a href=\"javascript:show_minister("+this.id+");\">"+TL("more_text")+"</a></p>";
}
return _38;
};
Ministr.prototype.default_renderer=function(_39){
var _3a="";
if(_39==null){
_39=true;
}
_3a+="<div class=\"minister_content\">";
_3a+=this.genContentHTML(_39);
_3a+=this.genMoreHTML(_39);
_3a+="</div>";
return _3a;
};
function Plain(id,_3c,_3d,_3e){
Plain.baseConstructor.call(this,id,_3c,_3d,_3e);
}
JS.extend(Plain,Post);
Plain.prototype.genMoreHTML=function(_3f){
var _40="";
return _40;
};
function ShrinkedHTML(id,_42,_43,_44){
ShrinkedHTML.baseConstructor.call(this,id,_42,_43,_44);
}
JS.extend(ShrinkedHTML,Post);
ShrinkedHTML.prototype.genContentHTML=function(_45){
var _46=ShrinkedHTML.superClass.genContentHTML.call(this,_45);
var re=new RegExp("(<(/?[^>]+)>)","igm");
if(_45){
_46=_46.replace(re,"");
}
return _46;
};
function show_minister(_48){
show_page(_48,null,null,Plain,true,false);
set_active_menu(null,null);
}
function change_frame(el){
var s=el.hasClassName("search");
if(!$(el.parentNode).hasClassName("inner")&&!$(el.parentNode).hasClassName("widget")){
var _4b="<div class=\"outer\""+(el.hasClassName("tabpage")?" style=\"float:left;\"":"")+"><div class=\"inner\">"+el.getOuterHTML()+"</div></div>";
el.setOuterHTML(_4b);
if(s){
Event.stopObserving($("search_action"),"click");
Event.observe($("search_action"),"click",do_search);
Event.stopObserving($("search_str"),"keypress");
Event.observe($("search_str"),"keypress",function(ev){
var key=ev.keyCode||ev.which;
if(key==13){
do_search();
}
});
}
}
}
function change_border(){
$$("div.widget","div.content_top").each(function(el){
change_frame(el);
});
$$("div.widget","div.content_top").each(function(el){
Event.observe(el,"mouseover",function(e){
this.style.borderColor="#0084d7";
});
Event.observe(el,"mouseout",function(e){
this.style.borderColor="#828282";
});
});
}
function gen_all(){
var _52=new ContentParams();
_52.category_id=3;
new Navigator(4,show_news,_52);
set_active_menu("","");
}
function get_id_by_name(_53){
var _54=null;
if(_pages_content.propertyIsEnumerable(_53)){
_54=_pages_content[_53];
}
return _54;
}
function get_name_by_id(_55){
for(var _56 in _pages_content){
if(typeof _pages_content[_56]=="object"&&_pages_content[_56][0]=="P"){
if(_pages_content[_56][1]==_55){
return _56;
}
}else{
if(typeof _pages_content[_56]=="number"){
if(_pages_content[_56]==_55){
return _56;
}
}
}
}
return null;
}
function get_menu_by_id(_57){
var _58={"vy":["vy_biography","vy_news","vy_materials"],"gov":["gov_mission","gov_structure","gov_programm","gov_committees"],"prj":["prj_economic","prj_socia"],"act":["act_agenda","act_regulation","act_claim","act_results"],"law":["law_initiative","law_activities"],"social_room":["contacs"],"photo_video":["pv_photo","pv_video"],"press":["press"]};
for(var i in _58){
if((_58[i].find(function(s){
return s==_57;
}))!=null){
return i;
}
}
return null;
}
function clear_viewport(_5b){
if(_5b!=null){
$("content").innerHTML+="<div id='permalink' class='content_top permalink'><a href='"+_siteurl+"/#"+_5b+"'>"+TL("permalink")+"</a></div>";
}
change_frame($("permalink"));
scroll(0,0);
}
function show_search(_5c){
_5c.callback=function(res,_5e){
if(res!=null&&res.length>0){
_posts=res;
gen_content("content",res,null,TL("search_result"));
}else{
$("content").innerHTML="<h1>"+TL("search_result")+"</h1>";
$("content").innerHTML+="<div class='content_top'>"+TL("search_empty")+"</div>";
}
if(_5e.navigator!=null){
$("content").innerHTML+=_5e.navigator.genHTML();
}
change_border();
scroll(0,0);
};
get_content(_5c);
set_active_menu(null,null);
}
function show_news(_5f){
show_loading_progress(_5f.content_id);
if(_5f.resources==null){
_5f.resources="_posts";
}
get_content(_5f);
}
function show_forum(){
var _60=new ContentParams();
_60.content_id="forum_content";
_60.category_id=10;
_60.clear=false;
show_news(_60);
}
function show_tab(_61){
var _62=new Array();
if(_61!=null){
_61=_61.replace("_s","");
}
var _63={"actual":["N",8],"notice":["N",11],"conference":["P",37]};
var _64=false;
if(!_63.propertyIsEnumerable(_61)||_61==_tab_id){
return;
}
$$(".tab_menu ul li a.active").each(function(el){
el.removeClassName("active");
});
show_loading_progress("page_content");
$(_61).addClassName("active");
tab=_63[_61];
if(tab!=null){
var _66=new ContentParams();
_66.parseParams(tab);
_66.resources=_62;
_66.callback=function(res){
_62=res;
gen_content("page_content",res);
};
get_content(_66);
}
_tab_id=_61;
}
function show_page(_68,_69,_6a,_6b,_6c,_6d){
var _6e=new ContentParams();
_6e.page_id=_68;
_6e.postClass=_6b;
_6e.page_name=_69;
if(_6a!=null){
_6e.content_id=_6a;
}
_6e.resources="_pages";
_6e.more=_6d;
if(_6c!=null){
_6e.clear=_6c;
}
show_page_ex(_6e);
}
function show_page_ex(_6f){
if(_6f.page_id==null&&_6f.page_name!=null){
var _70=get_id_by_name(_6f.page_name);
_6f.parseParams(_70);
}
if(_6f.page_name==null&&_6f.page_id!=null){
_6f.page_name=get_name_by_id(_6f.page_id);
}
if(_6f.page_id==null){
return;
}
if(_6f.resources==null){
_6f.resources="_pages";
}
show_loading_progress(_6f.content_id);
get_content(_6f);
}
function show_post(_71){
var _72=false;
if(_posts!=null&&_posts.length>0){
for(var i=0;i<_posts.length;i++){
if(_posts[i].id==_71){
$("content").innerHTML=_posts[i].genHTML(false);
clear_viewport(_71);
change_border();
_72=true;
break;
}
}
}
if(!_72){
var _74=new ContentParams();
_74.post_id=_71;
_74.resources=_posts;
_74.callback=function(res){
_posts=_posts.concat(res);
_posts.each(function(el){
if(el.id==_71){
$("content").innerHTML=el.genHTML(false);
clear_viewport(_71);
change_border();
return;
}
});
};
get_content(_74);
}
}
function get_js(res){
re=new RegExp("(?:<script.*?>)((\n|.|\r)*?)(?:</script>)");
var m=res.match(re);
if(m!=null&&m.length>1){
return m[1];
}
return null;
}
function show_filepage(_79,_7a,_7b){
if(_7b==null){
_7b="content";
}
if(_79!=null){
get_filepage(_language,_79,function(res){
js=get_js(res);
$(_7b).innerHTML=res;
if(_7a!=null&&_7a.length>0){
clear_viewport(_7a);
}
change_border();
if(js!=null){
eval(js);
}
});
}
}
function get_filepage(_7d,_7e,_7f){
if(_7d==null||_7d.length==0){
return;
}
var url=_siteurl+"/filepage.php?lang="+_7d;
url+="&page_name="+_7e;
var _81=new Ajax.Request(url,{method:"get",onComplete:function(_82){
if(_7f!=null){
_7f(_82.responseText);
}
return true;
},onException:function(req,_84){
var msg=(typeof req=="object"&&req!=null?Object.toJSON(req):req);
alert("The request had a fatal exception thrown.\n\n"+_84+"\nresponse: "+msg);
return true;
}});
}

function unquote(str) {
    str = str.replace("&amp;", "&");
    return str;
}

function get_content(_86){
var _87=false;
if(_86.language==null||_86.language==0){
return !_87;
}
var url=_siteurl+"/content.php?lang="+_86.language;
if(_86.page_id!=null){
url+="&page_id="+_86.page_id;
}
if(_86.category_id!=null){
url+="&category_id="+_86.category_id;
}
if(_86.post_id!=null){
url+="&post_id="+_86.post_id;
}
if(_86.search_str!=null){
url+="&s="+Url.encode(_86.search_str);
}
if(_86.navigator!=null){
url+="&offset="+_86.navigator.offset;
url+="&postsperpage="+_86.navigator.postsperpage;
}
new Ajax.Request(url,{method:"get",onComplete:function(_89){
var res=new Array();
if(_89.responseXML==null||_89.responseXML.getElementsByTagName("posts")[0]==null){
_87=true;
}else{
var _8b=_89.responseXML.getElementsByTagName("posts")[0];
for(i=0;i<_8b.childNodes.length;i++){
post=_8b.childNodes[i];
var id=post.getAttribute("id");
var _8d=post.getAttribute("date");
var _8e=post.getAttribute("title");
var _8f="";
if(typeof post.getElementsByTagName("content")[0].childNodes[0]!="undefined"&&post.getElementsByTagName("content")[0].childNodes[0]!=null){
for(var j=0;j<post.getElementsByTagName("content")[0].childNodes.length;j++){
_8f+=post.getElementsByTagName("content")[0].childNodes[j].nodeValue;
}
}
var tmp=null;
if(_86.postClass!=null){
tmp=new _86.postClass(id,_8d,_8e,_8f,_86.renderer);
}else{
tmp=new Post(id,_8d,_8e,_8f,_86.renderer);
}
res.push(tmp);
}
var nav=_89.responseXML.getElementsByTagName("navigator")[0];
if(nav!=null){
var _93=nav.getAttribute("lastpage");
if(_86.navigator!=null){
_86.navigator.isLastPage=(_93=="1"?true:false);
}
}
}
if(_87){
res.push(new Post("-1","","\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445","\u041f\u0440\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430. \u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0412\u0430\u0448\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0441\u0435\u0442\u0438 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442."));
}
if(_86.callback!=null){
_86.callback(res,_86);
}
},onException:function(req,_95){
if(_95.number==-2146823281){
return true;
}
var msg="";
if(Tools.isDebugMode()){
msg="\n\nResponse object:\n"+(typeof req=="object"&&req!=null?Object.toJSON(req):req);
}
alert("The request had a fatal exception thrown.\n\nMessage:\n"+Object.toJSON(_95)+msg);
return true;
}});
if(_87){
setTimeout(get_content(_86),1000);
}
return !_87;
}
function parseXML(_97){
try{
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.loadXML(_97);
}
catch(e){
try{
parser=new DOMParser();
xmlDoc=parser.parseFromString(_97,"text/xml");
}
catch(e){
alert(e.message);
return;
}
}
}

