var slider=function(){
	var array=[]; var speed=10; var timer=10;
	return{
		init:function(t,c){
			var s,ds,l,i,y;
			s=document.getElementById(t); ds=s.getElementsByTagName('div'); l=ds.length; i=y=0;
			for(i=0;i<l;i++){
				var d,did; d=ds[i]; did=d.id;
				if(did.indexOf("header")!=-1){
					y++; d.onclick=new Function("slider.process(this)");
				}else if(did.indexOf("content")!=-1){
					array.push(did.replace('-content','')); d.maxh=d.offsetHeight;
					if(c!=y){d.style.height='0px'; d.style.display='none'}
					else{d.style.display='block'}
				} 
			}
		},
		process:function(d){
			var cl,i; cl=array.length; i=0;
			for(i;i<cl;i++){
				var s,h,c,cd;
				s=array[i]; h=document.getElementById(s+'-header');
				c=s+'-content'; cd=document.getElementById(c); clearInterval(cd.timer);
				if(h==d&&cd.style.display=='none'){
					cd.style.display='block'; this.islide(c,1);
				}else if(cd.style.display=='block'){this.islide(c,-1)}
			}
		},
		islide:function(i,d){var c,m; c=document.getElementById(i); m=c.maxh; c.direction=d; c.timer=setInterval("slider.slide('"+i +"')",timer)},
		slide:function(i){
			var c,m,h,dist; c=document.getElementById(i); m=c.maxh; h=c.offsetHeight;
			dist=(c.direction==1)?Math.round((m-h)/speed):Math.round(h/speed);
			if(dist<=1){dist=1}
			c.style.height=h+(dist*c.direction)+'px'; c.style.opacity=h/c.maxh; c.style.filter='alpha(opacity='+(h*100/c.maxh)+')';
			if(h<2&&c.direction!=1){
				c.style.display='none'; clearInterval(c.timer);
			}else if(h>(m-2)&&c.direction==1){clearInterval(c.timer)}
		}
};}();

/*
Copyright (c) Copyright (c) 2007, Carl S. Yestrau All rights reserved.
Code licensed under the BSD License: http://www.featureblend.com/license.txt
Version: 1.0.4
*/
var FlashDetect = new function(){
    var self = this;
    self.installed = false;
    self.raw = "";
    self.major = -1;
    self.minor = -1;
    self.revision = -1;
    self.revisionStr = "";
    var activeXDetectRules = [
        {
            "name":"ShockwaveFlash.ShockwaveFlash.7",
            "version":function(obj){
                return getActiveXVersion(obj);
            }
        },
        {
            "name":"ShockwaveFlash.ShockwaveFlash.6",
            "version":function(obj){
                var version = "6,0,21";
                try{
                    obj.AllowScriptAccess = "always";
                    version = getActiveXVersion(obj);
                }catch(err){}
                return version;
            }
        },
        {
            "name":"ShockwaveFlash.ShockwaveFlash",
            "version":function(obj){
                return getActiveXVersion(obj);
            }
        }
    ];
    /**
     * Extract the ActiveX version of the plugin.
     * 
     * @param {Object} The flash ActiveX object.
     * @type String
     */
    var getActiveXVersion = function(activeXObj){
        var version = -1;
        try{
            version = activeXObj.GetVariable("$version");
        }catch(err){}
        return version;
    };
    /**
     * Try and retrieve an ActiveX object having a specified name.
     * 
     * @param {String} name The ActiveX object name lookup.
     * @return One of ActiveX object or a simple object having an attribute of activeXError with a value of true.
     * @type Object
     */
    var getActiveXObject = function(name){
        var obj = -1;
        try{
            obj = new ActiveXObject(name);
        }catch(err){
            obj = {activeXError:true};
        }
        return obj;
    };
    /**
     * Parse an ActiveX $version string into an object.
     * 
     * @param {String} str The ActiveX Object GetVariable($version) return value. 
     * @return An object having raw, major, minor, revision and revisionStr attributes.
     * @type Object
     */
    var parseActiveXVersion = function(str){
        var versionArray = str.split(",");//replace with regex
        return {
            "raw":str,
            "major":parseInt(versionArray[0].split(" ")[1], 10),
            "minor":parseInt(versionArray[1], 10),
            "revision":parseInt(versionArray[2], 10),
            "revisionStr":versionArray[2]
        };
    };
    /**
     * Parse a standard enabledPlugin.description into an object.
     * 
     * @param {String} str The enabledPlugin.description value.
     * @return An object having raw, major, minor, revision and revisionStr attributes.
     * @type Object
     */
    var parseStandardVersion = function(str){
        var descParts = str.split(/ +/);
        var majorMinor = descParts[2].split(/\./);
        var revisionStr = descParts[3];
        return {
            "raw":str,
            "major":parseInt(majorMinor[0], 10),
            "minor":parseInt(majorMinor[1], 10), 
            "revisionStr":revisionStr,
            "revision":parseRevisionStrToInt(revisionStr)
        };
    };
    /**
     * Parse the plugin revision string into an integer.
     * 
     * @param {String} The revision in string format.
     * @type Number
     */
    var parseRevisionStrToInt = function(str){
        return parseInt(str.replace(/[a-zA-Z]/g, ""), 10) || self.revision;
    };
    /**
     * Is the major version greater than or equal to a specified version.
     * 
     * @param {Number} version The minimum required major version.
     * @type Boolean
     */
    self.majorAtLeast = function(version){
        return self.major >= version;
    };
    /**
     * Is the minor version greater than or equal to a specified version.
     * 
     * @param {Number} version The minimum required minor version.
     * @type Boolean
     */
    self.minorAtLeast = function(version){
        return self.minor >= version;
    };
    /**
     * Is the revision version greater than or equal to a specified version.
     * 
     * @param {Number} version The minimum required revision version.
     * @type Boolean
     */
    self.revisionAtLeast = function(version){
        return self.revision >= version;
    };
    /**
     * Is the version greater than or equal to a specified major, minor and revision.
     * 
     * @param {Number} major The minimum required major version.
     * @param {Number} (Optional) minor The minimum required minor version.
     * @param {Number} (Optional) revision The minimum required revision version.
     * @type Boolean
     */
    self.versionAtLeast = function(major){
        var properties = [self.major, self.minor, self.revision];
        var len = Math.min(properties.length, arguments.length);
        for(i=0; i<len; i++){
            if(properties[i]>=arguments[i]){
                if(i+1<len && properties[i]==arguments[i]){
                    continue;
                }else{
                    return true;
                }
            }else{
                return false;
            }
        }
    };
    /**
     * Constructor, sets raw, major, minor, revisionStr, revision and installed public properties.
     */
    self.FlashDetect = function(){
        if(navigator.plugins && navigator.plugins.length>0){
            var type = 'application/x-shockwave-flash';
            var mimeTypes = navigator.mimeTypes;
            if(mimeTypes && mimeTypes[type] && mimeTypes[type].enabledPlugin && mimeTypes[type].enabledPlugin.description){
                var version = mimeTypes[type].enabledPlugin.description;
                var versionObj = parseStandardVersion(version);
                self.raw = versionObj.raw;
                self.major = versionObj.major;
                self.minor = versionObj.minor; 
                self.revisionStr = versionObj.revisionStr;
                self.revision = versionObj.revision;
                self.installed = true;
            }
        }else if(navigator.appVersion.indexOf("Mac")==-1 && window.execScript){
            var version = -1;
            for(var i=0; i<activeXDetectRules.length && version==-1; i++){
                var obj = getActiveXObject(activeXDetectRules[i].name);
                if(!obj.activeXError){
                    self.installed = true;
                    version = activeXDetectRules[i].version(obj);
                    if(version!=-1){
                        var versionObj = parseActiveXVersion(version);
                        self.raw = versionObj.raw;
                        self.major = versionObj.major;
                        self.minor = versionObj.minor; 
                        self.revision = versionObj.revision;
                        self.revisionStr = versionObj.revisionStr;
                    }
                }
            }
        }
    }();
};
FlashDetect.JS_RELEASE = "1.0.4";

	if(!FlashDetect.installed){
		alert("Внимание! Для дальнейшего просмотра сайта Вам необходимо установить Adobe Flash Player, скачать который можно по адресу \«www.adobe.com\», в противном случае сайт будет отображаться некорректно! ");     	
	};

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-15630817-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

 /**
 * RokUtils - Utilities script for TerranTribune's RocketTheme Template (July 08)
 * 
 * @version		1.0
 * 
 * @author		Djamil Legato <djamil@rockettheme.com>
 * @copyright	Andy Miller @ Rockettheme, LLC
 */

var maxHeight=function(C){var B=document.getElements("div."+C);var A=0;B.each(function(D){A=Math.max(A,D.getSize().size.y);});B.setStyle("height",A);return A;};window.addEvent("domready",function(){if(!window.webkit&&!window.ie6){maxHeight("sameheight");maxHeight.delay(500,maxHeight,"sameheight");}var D=$$("table.blog tbody")[0];if(D){D=D.getChildren();if(D.length){var B=[];B.push(D.getFirst()[0].getFirst());var A=D.getFirst()[1];if(A){A=A.getFirst();B.push(A);}var C=tl=tr=bl=br=null;(B.length).times(function(E){C=new Element("div",{"class":"content-surround"}).inject(B[E],"before");tl=new Element("div",{"class":"content-corner-tl"}).inject(C);tr=new Element("div",{"class":"content-corner-tr"}).inject(tl);bl=new Element("div",{"class":"content-corner-bl"}).inject(tr);br=new Element("div",{"class":"content-corner-br"}).inject(bl).adopt(B[E]);});}}});if(window.webkit){window.addEvent("load",function(){maxHeight("sameheight");maxHeight.delay(500,maxHeight,"sameheight");});}
window.addEvent('domready', function() {
	var x = 0, y = 0, offset = 0, child = 0, horiznav = $('horiznav') || $$('#horiz-menu2 .menutop')[0] || null;
	
	if ($('horiznav') && $('horiz-menu2')) {
		var topnav = horiznav.getChildren();

		if (topnav.length) {
			x += horiznav.getCoordinates().width + $('horiz-menu2').getStyle('margin-left').toInt() + $('horiz-menu2').getStyle('margin-right').toInt() + $('horiz-menu2').getStyle('padding-left').toInt() + $('horiz-menu2').getStyle('padding-right').toInt();

			$('horiz-menu').setStyles({'position': '', 'width': x});
		};
	
	}
	
	var block = $$('#bottommodules2 div.block');
	if (block.length) {
		block[0].setStyle('border-left', '0pt none');
	}
});
/**
 * RokIEWarn - An IE6 Warning to invite people upgrading to IE6
 * 
 * @version		1.2-noOpacity
 * 
 * @license		MIT-style license
 * @author		Djamil Legato <djamil@rockettheme.com>
 * @client		RocketTheme, LLC.
 * @copyright	Author
 */
 
 
var RokIEWarn = new Class({
	'site': 'sitename',
	'initialize': function() {
		var warning = "<h3>Вы просматриваете данный ресурс с помощью Internet Explorer версии 6 (IE6).</h3><h4>Обратите внимание: Данный сайт совместим с Internet Explorer версии 6, но по нашему опыту, мы рекомендуем обновить ваш браузер до более новой версии.</h4><p>Последняя версия Internet Explorer 6 была датирована в виде пакета обновлений SP1 в декабре 2004 года. Продолжая использовать данную версию IE 6, ваш компьютер остается незащищенным, от уязвимостей выявленных после декабря 2004 г. В Октябре 2006 года, компания Майкрософт выпустила Internet Explorer версии 7, который можно скачать по ниже следующей ссылке.</p> <br /><a class=\"external\"  href=\"http://www.microsoft.com/downloads/details.aspx?FamilyId=9AE91EBE-3385-447C-8A30-081805B2F90B\">Скачать Internet Explorer 7 сейчас!</a>";
		
		this.box = new Element('div', {'id': 'iewarn'}).inject(document.body, 'top');
		var div = new Element('div').inject(this.box).setHTML(warning);
		
		var click = this.toggle.bind(this);
		var button = new Element('a', {'id': 'iewarn_close'}).addEvents({
			'mouseover': function() {
				this.addClass('cHover');
			},
			'mouseout': function() {
				this.removeClass('cHover');
			},
			'click': function() {
				click();	
			}
		}).inject(div, 'top');
		
		this.height = $('iewarn').getSize().size.y;
		
		this.fx = new Fx.Styles(this.box, {duration: 1000}).set({'margin-top': $('iewarn').getStyle('margin-top').toInt()});
		this.open = false;
		
		var cookie = Cookie.get('rokIEWarn'), height = this.height;
		//cookie = 'open'; // added for debug to not use the cookie value
		if (!cookie || cookie == "open") this.show();
		else this.fx.set({'margin-top': -height});

		
		return ;
	},
	
	'show': function() {
		this.fx.start({
			'margin-top': 0
		});
		this.open = true;
		Cookie.set('rokIEWarn', 'open', {duration: 7});
	},	
	'close': function() {
		var margin = this.height;
		this.fx.start({
			'margin-top': -margin
		});
		this.open = false;
		Cookie.set('rokIEWarn', 'close', {duration: 7});
	},	
	'status': function() {
		return this.open;
	},
	'toggle': function() {
		if (this.open) this.close();
		else this.show();
	}
});

window.addEvent('domready', function() {
	if (window.ie6) { (function() {var iewarn = new RokIEWarn();}).delay(2000); }
});
/*
 * Rokmoomenu - mootools menu widget
 *
 * mootools dependencies:
 *	- mootools 1.11
 *	- Moo, Utility, Common, Array, String, Function, Element, 
 *	  Dom, Fx.Base, Fx.CSS, Fx.Styles
 *
 * Copyright (c) 2007 Olmo Maldonado
 *
 * v1.2 - Adapted for IE6 by Djamil Legato (c) 2008
 * 
 * History
 * v1.1 - Flash Issues - Adapted for IE6 by Djamil Legato
 */
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('5 C=R G({6:{m:1t,7:\'1c\',j:12,l:{h:[\'z\',\'Q\'],F:G.1i}},1f:3(b,c){2.11(c);4(n.q)2.6.j=X;2.w=$(b);2.w.V(\'T\').9(3(a){a.1o({\'1l\':2.M.H(2,a),\'1e\':2.I.H(2,a)})},2)},M:3(b){$1b(b.L);4(!b.8(2.6.7)){4(n.q){5 c=b.P(\'E\').O(" ");5 d=2.6.7;c=c.D(3(y){k!y.p("-"+d)});c.9(3(a){4(b.8(a))b.o(a+"-"+d)},2);5 e=c.B("-")+"-"+d;4(!b.8(e))b.o(e)}b.o(2.6.7);5 f=b.A(\'x\');4(f){4(2.6.m)f.m({z:W});f.l(2.6.l)}b.v().9(3(a){a.g(2.6.7)},2)}},I:3(e){5 f=2.6.7;e.L=(3(){4(n.q){5 b=e.P(\'E\').O(" ");b=b.D(3(y){k y.p("-"+f)});b.9(3(a){4(e.8(a))e.g(a)},2);5 c=b.B("-")+"-"+f;4(!e.8(c))e.g(c)}e.g(f);5 d=e.A(\'U\');4(d)d.Y()}).j(2.6.j,2)}});C.Z(R 10);1s.1q({l:3(b){4(!2.u){2.u=2.1p(b.F);2.s=2.1m.1k(2,b.h);2.t={};1h(5 i 1g 2.s)2.t[i]=0}4(b.h.S(\'Q\')||b.h.S(\'1d\')){2.K(\'J\',\'1a\');2.N(\'x\').9(3(a){a.K(\'J\',\'19\')})}2.u.1j(2.t).18(2.s)},N:3(a){5 b=[];5 c=2.r();17(c&&c!==1n){4(c.16().p(a))b.15(c);c=c.r()}k b},v:3(){5 a=2.r().14();a.1r(a.13(2),1);k a}});',62,92,'||this|function|if|var|options|hoverClass|hasClass|each|||||||removeClass|props||delay|return|animate|bgiframe|window|addClass|test|ie6|getParent|now|FxEmpty|Fx|getSiblings|element|ul||opacity|getElement|join|Rokmoomenu|filter|class|opts|Class|bind|out|overflow|setStyle|sfTimer|over|getParents|split|getProperty|height|new|contains|li|iframe|getElements|false|50|remove|implement|Options|setOptions|500|indexOf|getChildren|push|getTag|while|start|visible|hidden|clear|sfHover|width|mouseout|initialize|in|for|empty|set|apply|mouseover|getStyles|document|addEvents|effects|extend|splice|Element|true'.split('|'),0,{}))

eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('9.o({5:v(2){6(L.B){6(!3.r(\'d.5\')){2=2||{};g a=$b(2.4,\'J:z\');c 2.4;g 8=$b(2.f,q);c 2.f;(p 9(\'d\',{\'n\':\'5\',m:0,j:-1,4:a,2:$i({h:-3.7(\'K\').e(),D:-3.7(\'C\').e(),y:3.x,w:3.A},2,{u:\'t\',s:\'E\',F:-1,G:8?"H(I=\'0\')":\'\'})})).l(3.k)}}M 3}});',49,49,'||styles|this|src|bgiframe|if|getStyle|ifopac|Element|ifsrc|pick|delete|iframe|toInt|opacity|var|top|merge|tabindex|firstChild|injectBefore|frameborder|class|extend|new|true|getElement|position|block|display|function|height|offsetWidth|width|false|offsetHeight|ie6|borderLeftWidth|left|absolute|zIndex|filter|Alpha|Opacity|javascript|borderTopWidth|window|return'.split('|'),0,{}))

