/*window.onload=init;
function init(e) {
    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';
}*/

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-245+"px";
		obj.style.top=y-65+'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 newWinSub(s)	 
	{	
	var h="subscr";
	var o=350;
	var p=250;
	var l=document.body.offsetWidth-o-28;
	var t=20;
	newswin=window.open(s,h,"resizable=0, scrollbars=0,toolbar=0,location=0,menubar=0,width="+o+",height="+p+",left="+l+",top="+t+"");
	newswin.focus();
	}
function newWin(s)
	{	
	var h="oVote";
	var o=550;
	var p=400;
	var l=document.body.offsetWidth-o-48;
	var t=40;
	basketwin=window.open(s,h,"resizable, scrollbars,toolbar=0,location=0,menubar=0,width="+o+",height="+p+",left="+l+",top="+t+"");
	basketwin.focus();
	}
