window.onload=init;
function init(e) {
	var leftCol=0;
/*    if (window.event) {
        var leftCol=document.getElementById('leftColumn');
        var rightCol=document.getElementById('rightColumn');
        var z=60;
    } else {
        var leftCol=document.getElementById('contactBlock');
        var rightCol=document.getElementById('copyright');
        var z=0;
    }
    var yl=leftCol.offsetTop+leftCol.offsetHeight;
    var yr=rightCol.offsetTop+rightCol.offsetHeight-z;
    var xr=rightCol.offsetWidth;
    if (yl>yr) document.getElementById('contentMain').style.height=document.getElementById('contentMain').offsetHeight+(yl-yr)+'px';
    if (xr<508) document.getElementById('rightColumn').style.width='540px';
    document.getElementById('searchBot').style.top=document.getElementById('content').offsetHeight+'px';
*/
}

/*
    Всплывающее меню (версия 1.4)
    -----------------------------------
    MSIE 5.5+, Gecko, Opera 7+
    -----------------------------------
    Скрипт написан: Миша Спларов (mailto:splurov@gmail.com)
    -----------------------------------
*/
show=false;
timeout=false;
showSub=false;
function showMenu (id, el) {
	obj=document.getElementById(id);
	
	clearTimeout(timeout);
	if (show!=false && show!=obj) hideMenu(show);

	if (!obj) return false;

	if (obj.style.visibility!='visible') {
		base=document.getElementById(el);
		var addX=0;
		var x=addX;
		var addY=3;
		var y=addY+base.offsetHeight;
		o=base;
		do {
			x+=o.offsetLeft;
			y+=o.offsetTop;
		} while (o=o.offsetParent);

		if (self.innerHeight && self.pageXOffset) w_width=self.innerWidth+self.pageXOffset;
		else if (document.documentElement.clientWidth) w_width=document.documentElement.clientWidth+document.documentElement.scrollLeft;
		else if (document.body.clientWidth) w_width=document.body.clientWidth+document.body.scrollLeft;
		else w_width=800;

		oldClass=base.className;
		base.className=oldClass+' current';
		
		x=((w_width/2)<x)?(x-(obj.offsetWidth-base.offsetWidth)):(x)
	        obj.style.left=x+"px";
		obj.style.top=y+'px';
		obj.style.visibility='visible';
		
		show=obj;
	}
	timeout=setTimeout('hideMenu(obj)', 700);
}
function hideMenu (obj) {
	obj.style.visibility='hidden';
	obj.style.top='-1000px';
	obj.style.left='-1000px';
	base.className=oldClass;
}
function windowOpen (url,name) {
    if (window.innerWidth) var w=window.innerWidth;
    else var w=document.getElementsByTagName('body')[0].clientWidth;
    point=window.open(url, name,'resizable,scrollbars,toolbar=1,location=1,menubar=1,width=600,height=400,left='+(w-600-10)+',top=10');
    point.focus();
    return false;
}
function newWin(s,h)	 
	{	
	var o='600';
	var p='700';
	var l=document.body.offsetWidth-o-28;
	var t=20;
	newwin=window.open(s,h,"resizable, scrollbars,toolbar=0,location=0,menubar=0,width="+o+",height="+p+",left="+l+",top="+t+"");
	newwin.focus();
	}

function switch_desc(e0, e1, e2, e3, e4, z0, z1, z2, z3, z4)
{
if(document.getElementById("z0")) document.getElementById("z0").className=z0; 
if(document.getElementById("z1")) document.getElementById("z1").className=z1; 
if(document.getElementById("z2")) document.getElementById("z2").className=z2;
if(document.getElementById("z3")) document.getElementById("z3").className=z3;
if(document.getElementById("z4")) document.getElementById("z4").className=z4;
if(document.getElementById("e0")) document.getElementById("e0").className=e0; 
if(document.getElementById("e1")) document.getElementById("e1").className=e1; 
if(document.getElementById("e2")) document.getElementById("e2").className=e2;
if(document.getElementById("e3")) document.getElementById("e3").className=e3;
if(document.getElementById("e4")) document.getElementById("e4").className=e4;
}