function changeColoredTab (tabname)
{
	document.getElementById('tab_numbers').style.display = 'none';
	document.getElementById('tab_news').style.display = 'none';
	document.getElementById('tab_events').style.display = 'none';
	document.getElementById('tab_promo').style.display = 'none';
	document.getElementById('tab_research').style.display = 'none';
	document.getElementById('tab_catalog').style.display = 'none';
	document.getElementById('tab_forum').style.display = 'none';
	document.getElementById('tab_'+tabname).style.display = 'block';

	document.getElementById('tabnav_numbers').src = '/images/crn/menu_numbers_off.gif';
	document.getElementById('tabnav_news').src = '/images/crn/menu_news_off.gif';
	document.getElementById('tabnav_events').src = '/images/crn/menu_events_off.gif';
	document.getElementById('tabnav_promo').src = '/images/crn/menu_promo_off.gif';
	document.getElementById('tabnav_research').src = '/images/crn/menu_research_off.gif';
	document.getElementById('tabnav_catalog').src = '/images/crn/menu_catalog_off.gif';
	document.getElementById('tabnav_forum').src = '/images/crn/menu_forum_off.gif';
	document.getElementById('tabnav_'+tabname).src = '/images/crn/menu_'+tabname+'_on.gif';
}

function changeColoredTab3On (tabname)
{
	document.getElementById('tabnav3_'+tabname).src = '/images/crn/menu3_'+tabname+'_on.gif';
}

function changeColoredTab3Off (tabname)
{
	document.getElementById('tabnav3_'+tabname).src = '/images/crn/menu3_'+tabname+'_off.gif';
}

function SendLink(ElementID)
{
	width=400;
	height=520;
	var scroll = 'yes';
	var top=0, left=0;
	if(width > screen.width-10 || height > screen.height-28)
		scroll = 'yes';
	if(height < screen.height-28)
		top = Math.floor((screen.height - height)/2-14);
	if(width < screen.width-10)
		left = Math.floor((screen.width - width)/2);
	width = Math.min(width, screen.width-10);	
	height = Math.min(height, screen.height-28);
	window.open('/send-article/index.php?ID='+ElementID,'','scrollbars='+scroll+',resizable=yes,width='+width+',height='+height+',left='+left+',top='+top);
}

function SendEvent(ElementID)
{
	width=400;
	height=520;
	var scroll = 'yes';
	var top=0, left=0;
	if(width > screen.width-10 || height > screen.height-28)
		scroll = 'yes';
	if(height < screen.height-28)
		top = Math.floor((screen.height - height)/2-14);
	if(width < screen.width-10)
		left = Math.floor((screen.width - width)/2);
	width = Math.min(width, screen.width-10);	
	height = Math.min(height, screen.height-28);
	window.open('/send-event/index.php?ID='+ElementID,'','scrollbars='+scroll+',resizable=yes,width='+width+',height='+height+',left='+left+',top='+top);
}

function SendAuthor(ElementID)
{
	width=400;
	height=520;
	var scroll = 'yes';
	var top=0, left=0;
	if(width > screen.width-10 || height > screen.height-28)
		scroll = 'yes';
	if(height < screen.height-28)
		top = Math.floor((screen.height - height)/2-14);
	if(width < screen.width-10)
		left = Math.floor((screen.width - width)/2);
	width = Math.min(width, screen.width-10);	
	height = Math.min(height, screen.height-28);
	window.open('/send-author/index.php?ID='+ElementID,'','scrollbars='+scroll+',resizable=yes,width='+width+',height='+height+',left='+left+',top='+top);
}

function PrintVersion(ElementURL,Element)
{
	width=650;
	height=600;
	var scroll = 'yes';
	var top=0, left=0;
	if(width > screen.width-10 || height > screen.height-28)
		scroll = 'yes';
	if(height < screen.height-28)
		top = Math.floor((screen.height - height)/2-14);
	if(width < screen.width-10)
		left = Math.floor((screen.width - width)/2);
	width = Math.min(width, screen.width-10);	
	height = Math.min(height, screen.height-28);
	window.open(ElementURL+'?ID='+Element+'&print=P','','scrollbars='+scroll+',resizable=yes,width='+width+',height='+height+',left='+left+',top='+top);
}