﻿//
// Script Copyright JomiTech © 2006. All Rights Reserved.
//
var TabSets = new Array();

function NavOver( Item )
{
    Item.className = "navlinkover";
}

function NavOut( Item )
{
  Item.className = "navlink";
}

function NavSubOver( Item )
{
    Item.className = "navsublinkover";
}

function NavSubOut( Item )
{
  Item.className = "navsublink";
}

function TabClick( Item )
{
	var id;
	var old_id;
	var tab_set;
	
	id = Item.id;
	
	if( id.indexOf( "_" ) > -1 )
		id = id.substr( 0, id.indexOf( "_" ) ); 
	
	tab_set = TabSets[ id.substr( 0, id.length - 1 ) ];
	
	for( var i = 0; i < tab_set.length; ++i )
	{
		DeactivateTab( tab_set[ i ] );
		document.getElementById( tab_set[ i ] + "_content" ).className = "tabinvisibletable";
	}
	
	ActivateTab( id );
	document.getElementById( id + "_content" ).className = "tabvisibletable";
}

function TabOver( Item )
{
	
}

function TabOut( Item )
{
	
}

function ActivateTab( id )
{
	document.getElementById( id + "_left" ).className = "tabactiveleft";
	document.getElementById( id ).className = "tabactive";
	document.getElementById( id + "_right" ).className = "tabactiveright";
}

function DeactivateTab( id )
{
	document.getElementById( id + "_left" ).className = "tabinactiveleft";
	document.getElementById( id ).className = "tabinactive";
	document.getElementById( id + "_right" ).className = "tabinactiveright";
}

function CommentFormAddClick()
{
	if( document.getElementById( "commentform" ).className == "commentform" )
	{
		document.getElementById( "commentform" ).className = "expandcommentform";
		document.getElementById( "commentformtitle" ).className = "expandcommentform";
		
		return false;
	}
	else
	{
		return true;
	}
}

function expandNewsItem( Index )
{
	var i;
	
	for( i = 0; i < NewsCount; ++i )
	{
		if( i != Index )
		{
			document.getElementById( "news" + i ).className = "newsitemcontentshrunk";
		}
	}
	
	if( document.getElementById( "news" + Index ).className != "newsitemcontent" )
		document.getElementById( "news" + Index ).className = "newsitemcontent";
	else
		document.getElementById( "news" + Index ).className = "newsitemcontentshrunk"
}

