var nTabs = 4;

function ResetTabs()
{
	if (document.getElementById)
	{
		document.write ("<style>#tabs .tab { display: none }</style>");
	}
}
function SwitchTab(tab)
{
	if (document.getElementById)
	{
		for (var i = 1; i < nTabs + 1; i++)
		{
			var tabbtn = document.getElementById("tabbtn" + i);
			if (tabbtn)
			{
				if (i != tab)
					tabbtn.className = "";
				else
					/*tabbtn.className = "selected";*/
					tabbtn.className = "";	/*12-04-2011 : changed to remove/hide the color change on select.*/
			}
			var tabcontent = document.getElementById("tab" + i);
			if (tabcontent)
			{
				if (i != tab)
					tabcontent.style.display = "none";
				else
					tabcontent.style.display = "block";
			}
		}
	}
	$("#tabcontrols a img").each(function(){
		var oldname = jQuery(this).attr('src');
		var newname = oldname.replace("-act.jpg", ".jpg");
		if (jQuery(this).parent().parent().parent().attr('class') != 'selected')
		{
			jQuery(this).attr('src',newname);
		}
	});

}

jQuery(document).ready(function(){

	$("#tabcontrols a img").each(function(){
		var oldname = jQuery(this).attr('src');
		var newname = oldname.replace(".jpg", "-act.jpg");
		/*12-04-2011*/
		/*Comment these event functions to remove the effect on tabs during mouseover and mouseout. */
		/*
		jQuery(this).mouseover(function() {
			jQuery(this).attr('src',newname);
		});
		jQuery(this).mouseout(function() {
			if (jQuery(this).parent().parent().parent().attr('class') != 'selected')
			{
				jQuery(this).attr('src',oldname);
			}
			else
			{
				jQuery(this).attr('src',newname);
			}
		});
		*/
	});
	/*12-04-2011*/
		/*Comment these event functions to remove the effect on tabs during mouseover and mouseout. */
	/*
	var oldnameact = jQuery("#tabcontrols .selected a img").attr('src');
	var newnameact = oldnameact.replace(".jpg", "-act.jpg");
	jQuery("#tabcontrols .selected a img").attr('src',newnameact);
	*/
})
