var bot = false;
var linkText = [ ['Sylph', 'The Greyest Day Sessions', 'Pelléas', 'A Wingless King', 'Ancestral Echo', 'Wunderzeit!', 'Miscellanea'], ['Sylph', 'The Greyest Day Sessions', 'Pelléas', 'A Wingless King', 'Ancestral Echo/Wunderzeit!', 'Shoppe'] ];
var linkURL = [ ['disc_sylph.php', 'disc_tgds.php', 'disc_pelleas.php', 'disc_a_wingless_king.php', 'disc_ancestral_echo.php', 'disc_wunderzeit.php', 'disc_three.php'], ['http://www.createspace.com/1716917', 'http://www.createspace.com/1717084', 'http://www.createspace.com/1716916', 'http://www.createspace.com/1716918', 'http://www.createspace.com/1729028', 'http://www.zazzle.com/writonwater'] ];
var linkTarget = [ '_self', '_blank' ];
function selectTab(t, i) {
	var j;
	if(!bot) {
		bot = document.getElementById('menu-bottomrow');
		if(navigator.platform == 'Win32')
			bot.parentNode.style.marginTop = "-1px";
		else
			bot.parentNode.style.marginTop = "1px";
	}
	for(j = 0; j < 7; j++) {
		if(j == t) document.getElementById('menutab' + j).className = 'hover';
		else document.getElementById('menutab' + j).className = '';
	}
	while(bot.hasChildNodes()) bot.removeChild(bot.firstChild);
	if(i) {
		bot.parentNode.className = 'hover';
		i--;
		for (j = 0; j < linkText[i].length; j++) {
			var li = document.createElement('li');
			var a = document.createElement('a');
			a.href = linkURL[i][j];
			a.target = linkTarget[i];
			a.appendChild(document.createTextNode(linkText[i][j]));
			li.appendChild(a);
			bot.appendChild(li);
		}
	}
	else bot.parentNode.className = '';
}
menucount = 0;
function div_mouseout() {
	menucount--;
	if(menucount < 1) {
		menucount = 0;
		if(!bot) bot = document.getElementById('menu-bottomrow');
		while(bot.hasChildNodes()) bot.removeChild(bot.firstChild);
		for(var i = 0; i < 7; i++)
			document.getElementById('menutab' + i).className = '';
		bot.parentNode.className = '';
	}
}
function div_mousein() {
	menucount++;
}
