﻿function SwitchBlocks(Prefix, Count, Index)
{
//	var Blocks = document.getElementById(Id1 + Postfix);
//	var Block2 = document.getElementById(Id2 + Postfix);
//	var LastLi = document.getElementById('LastLi' + Postfix);
//	var PopularLi = document.getElementById('PopularLi' + Postfix);
//	
//	if (Type == "Last")
//	{
//		Block1.style.display = 'block';
//		Block2.style.display = 'none';
//		LastLi.className = 'act';
//		PopularLi.className = '';
//	}
//	else if (Type == "Popular")
//	{
//		Block2.style.display = 'block';
//		Block1.style.display = 'none';
//		PopularLi.className = 'act';
//		LastLi.className = '';
//	}
	for (i = 1; i <= Count; i++)
	{
	    var Block = document.getElementById(Prefix + 'Block' + i);
	    var Li = document.getElementById(Prefix + 'Li' + i);
	    if (i == Index)
	    {
		    Block.style.display = 'block';
		    if (Li != null)
		        Li.className = 'act';
	    }
	    else
	    {
		    Block.style.display = 'none';
		    if (Li != null)
		        Li.className = '';
	    }
	}
}

function HideBlock(Name)
{
    var Block = document.getElementById(Name);
    if (Block != null)
        Block.style.display = 'none';
}
