
var tower_titles = new Array;
var tower_descriptions = new Array;

tower_titles["00"] = "Basic Laser";
tower_descriptions["00"] = "Shoots 1 enemy with a high energy beam.";

tower_titles["01"] = "x2 Laser";
tower_descriptions["01"] = "Shoots 1 enemy rapidly.";

tower_titles["02"] = "x4 Laser";
tower_descriptions["02"] = "Shoots 1 enemy very rapidly.";

tower_titles["03"] = "3 Shooter Laser";
tower_descriptions["03"] = "Shoots up to 3 enemies at once.";

tower_titles["04"] = "6 Shooter Laser";
tower_descriptions["04"] = "Shoots up to 6 enemies at once.";

tower_titles["05"] = "Basic Bomb";
tower_descriptions["05"] = "Shoots bombs with splash damage.";

tower_titles["06"] = "x2 Bomb";
tower_descriptions["06"] = "Shoots bombs with splash damage.";

tower_titles["07"] = "x4 Bomb";
tower_descriptions["07"] = "Shoots bombs with splash damage.";

tower_titles["08"] = "Dual Bomb";
tower_descriptions["08"] = "Shoots 2 bombs with splash damage.";

tower_titles["09"] = "Quad Bomb";
tower_descriptions["09"] = "Shoots 4 bombs with splash damage.";

tower_titles["10"] = "Lightning Lv1";
tower_descriptions["10"] = "Shoots lightning at a single target.";

tower_titles["11"] = "Lightning Lv2";
tower_descriptions["11"] = "Shoots lightning that bounces once.";

tower_titles["12"] = "Lightning Lv3";
tower_descriptions["12"] = "Shoots lightning that bounces 2 times.";

tower_titles["13"] = "Lightning Lv4";
tower_descriptions["13"] = "Shoots lightning that bounces 3 times.";

tower_titles["14"] = "Rainbow Lightning";
tower_descriptions["14"] = "Shoots colored lightning that bounces 4 times.";

tower_titles["16"] = "Basic Slow";
tower_descriptions["16"] = "Slows enemies.";

tower_titles["17"] = "Stun";
tower_descriptions["17"] = "Stuns enemies for .5 seconds.";

tower_titles["18"] = "Heavy Stun";
tower_descriptions["18"] = "Stuns enemies for 1 second.";

tower_titles["19"] = "Area Slow";
tower_descriptions["19"] = "Slows all enemies in range by %25.";

tower_titles["20"] = "Heavy Area Slow";
tower_descriptions["20"] = "Slows all enemies in range by %50.";

tower_titles["21"] = "Lightning Strike";
tower_descriptions["21"] = "Powerful single strike with short range";

tower_titles["22"] = "Strike of the Gods";
tower_descriptions["22"] = "Extremely powerful strike with short range";


function updateTower(tower_img)
{
	//add border around selected tower
	tower_img.style.border = '#999999 2px solid';
	tower_img.style.margin = '0px 0px 0px 0px';

	//set thumbnail
	var tower_thumbnail = document.getElementById('tower_thumbnail');
	tower_thumbnail.style.backgroundImage = 'url(' + tower_img.src + ')';
	
	//
	var tower_num = tower_img.src.match(/tower([0-9]+)\.jpg/)[1];

	//set title
	var tower_title = document.getElementById('tower_title');
	tower_title.innerHTML = tower_titles[tower_num];

	//set description
	var tower_description = document.getElementById('tower_description');
	tower_description.innerHTML = tower_descriptions[tower_num];
}

function clearTower(tower_img)
{
	tower_img.style.border = 'none';
	tower_img.style.margin = '2px 2px 2px 2px';
}