var swapNum=2;

function swapper()
{
	selSwap(swapNum);
	swapNum+=2;
	if(swapNum==10){swapNum=2;}
	setTimeout("swapper()",15000);
}

function selSwap(num)
{
	var img, title, desc;

	document.getElementById('segment2').src="images/segBlack.gif";
	document.getElementById('segment4').src="images/segBlack.gif";
	document.getElementById('segment6').src="images/segBlack.gif";
	document.getElementById('segment8').src="images/segBlack.gif";
	document.getElementById('segment'+num).src="images/segOrange.gif";

	switch(num) {
		case 2:	
			img="images/hobgoblin.jpg";
			title="Racial Spotlight - Hobgoblins";
			desc="Hobgoblins are larger cousins of goblins. Hobgoblins\' hair color ranges from dark reddish-brown to dark gray. They have dark orange to red-orange skin. Large males have blue or red noses. Hobgoblins/' eyes are yellowish or dark brown, while their teeth are yellow. Their garments tend to be brightly colored, often blood red with black-tinted leather. Their weaponry is kept polished and in good repair. <br/><br/>Though related to goblins and bugbears, hobgoblins should not be underestimated. They are capable of complex military tactics, often marching in formation and sending smaller forces to sneak behind and flank the enemy. They will not attack blindly, but will send in scouts or spies to assess the enemy. Hobgoblins are capable of maintaining and protecting small cities or outposts.";
			break;
	case 4:
			img="images/master.jpg";
			title="NPC Spotlight - The Master";
			desc="This short man appears to be in his late fifties or early sixties. Short, curly grey hair obscures his slightly pointed ears and his long, pale face is clean shaven. Strangely, you notice he never blinks. He is wearing a sharply cut, darkly colored suit. He very frequently wrings his hands. <br/><br/>The PCs first encountered \"The Master\" after rescuing the werewolf Arnold from a catfolk trap. Arnold brought the PCs back to the lycanthrope camp and they were introduced to \"The Master,\" for whom the lycanthropes act as guard. \"The Master\" supplies his pups with prey, and in exchange they guard him and his hilltop castle. <br/><br/>\"The Master\" seems to have an aversion to light, as all the windows of the castle are bricked shut. He seems to delight in torture and has an expansive room dedicated to the art. Rumors collected in Orkwall suggest that \"The Master\" is an elf, and is very old.";
			break;
	case 6:
			img="images/gnome.jpg";
			title="Racial Spotlight - Gnomes";
			desc="The gnomish race is known for its technical abilities and complex inventions. Many commonplace tools, expecially those with gears, cogs, or other moving parts, came from gnomish minds. Crueler gnomes have invested their energies in making incredibly complex and dangerous traps. The gnomes freely share the fruits of their labor, as the adoption of a gnomish invention into common use is a source of immeasurable pride for the inventor. <br/><br/>The last several years have seen a revolution in gnomish technology. The little people seem to have discovered a method of harnessing the raw power of steam. While a number of large projects are underway, the products of this discovery are starting to appear in the hands of other races. New forges are stoked by steam-powered machines. Massive balloons driven by steam lift adventurers and thrill-seekers alike into the sky. There have been promising, but failed, experiments in steam-powered engines for both land and sea transportation.";
			break;
	case 8:
			img="images/storn.jpg";
			title="NPC Spotlight - Storn \"Club\" OreForger";
			desc="This dwarf stands nearly five feet tall and has grey skin. His arms are disproportionally large for his build, and his hands are heavily calloused. He has a shaved head. Unlike the full beards worn by most dwarves, Storn wears a very thin braided beard that sprouts from his chin. <br/><br/>Not much is known about Storn OreForger. The PCs first encountered the dwarf in Orkwall, where Storn runs a private, low-profile blacksmith shop. Storn admits to having paid off the town guard, dealing with the black market, and hating elves. He has hinted to the PCs that he also goes by the name \"Club.\" Though he offered no origins for the name, he does seem to favor his left leg, suggesting a malformed or \"club\" foot. ";
			break;
	}

	document.getElementById('selImg').src=img;
	document.getElementById('selTitle').innerHTML=title;
	document.getElementById('selDesc').innerHTML=desc;
}

function divToggle(divName)
{
	document.getElementById('index').style.display='none';
	document.getElementById('plot').style.display='none';
	document.getElementById('npc').style.display='none';
	document.getElementById('locations').style.display='none';
	document.getElementById('goblins').style.display='none';
	document.getElementById('loot').style.display='none';

	document.getElementById(divName).style.display='block';

	if (divName=='goblins')
	{
	document.getElementById('goblinFeatures').style.display='block';
	document.getElementById('goblinPopulation').style.display='none';
	document.getElementById('goblinShop').style.display='none';
	document.getElementById('goblinMap').style.display='none';
	}
	
}

function divToggleGoblin(divName)
{
	document.getElementById('goblinFeatures').style.display='none';
	document.getElementById('goblinPopulation').style.display='none';
	document.getElementById('goblinShop').style.display='none';
	document.getElementById('goblinMap').style.display='none';

	document.getElementById(divName).style.display='block';
}
