var loc = location.href.toLowerCase();

if(typeof(navon) == "undefined") navon = '';

//////////////////////////////////////

var cls = 'navtitle';

function url(i) { location.href = i; }
function hoverover(i)
{
	if(i.className.match("navtitleon")) { return; }
	var tmp = i.className;
	i.className = tmp.replace("navtitle", "navtitleon");
	i.onmouseout = function() { i.className = tmp; }
}

document.write('<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse;" class="pointer" width="220">');
document.write('<tr><td style="padding-left: 7px;">');

document.write('<table cellpadding="0" cellspacing="0" style="border-collapse: collapse;">');

if(loc.match("overview.aspx") || loc == "http://www.quest.com/backstage/" || loc == "http://www-quest-com/backstage/") cls = 'navtitleon'; else cls = 'navtitle';
document.write('<tr><td class="navtop ' + cls + '" onclick="url(\'/backstage/overview.aspx\')" onmouseover="hoverover(this)" height="37">Backstage Home</td></tr>');

if(loc.match("product-info.aspx")) cls = 'navtitleon'; else cls = 'navtitle';
document.write('<tr><td class="navmid ' + cls + '" onclick="url(\'/backstage/product-info.aspx\')" onmouseover="hoverover(this)" height="37">Product Information</td></tr>');

if(loc.match("jukebox.aspx")) cls = 'navtitleon'; else cls = 'navtitle';
document.write('<tr><td class="navmid ' + cls + '" onclick="url(\'/backstage/jukebox.aspx\')" onmouseover="hoverover(this)">Audio/Video Jukebox</td></tr>');

if(loc.match("pow.aspx") || navon == "pow") cls = 'navtitleon'; else cls = 'navtitle';
document.write('<tr><td class="navmid ' + cls + '" onclick="url(\'/backstage/pow.aspx\')" onmouseover="hoverover(this)">Pain of the Week Webcasts</td></tr>');

if(loc.match("live-and-in-person.aspx")) cls = 'navtitleon'; else cls = 'navtitle';
document.write('<tr><td class="navmid ' + cls + '" onclick="url(\'/backstage/live-and-in-person.aspx\')" onmouseover="hoverover(this)">Live and in Person Events</td></tr>');

if(loc.match("promotion.aspx")) cls = 'navtitleon'; else cls = 'navtitle';
document.write('<tr><td class="navmid ' + cls + '" onclick="url(\'/backstage/promotion.aspx\')" onmouseover="hoverover(this)">Current Promotions</td></tr>');

cls = 'navtitle';
document.write('<tr><td class="navbtm ' + cls + '"></td></tr>');
document.write('</table>');

document.write('</td></tr></table>');

if(loc.match('backstage'))
{
	document.writeln('<div style="margin-top: 35px; margin-left: 6px;" id="bannerplaceholder">');
	document.writeln('<div id="secondary-banners"></div>');
	if(navigator.appName.indexOf("Microsoft") > -1)
	{
		obj = document.createElement('<script type="text/javascript" src="/backstage/banner.js">');	
	}
	else
	{
		obj = document.createElement('script');
		obj.setAttribute('src', '/backstage/banner.js');
		obj.setAttribute('type', 'text/javascript');
	}
	document.getElementById('bannerplaceholder').appendChild(obj);
	document.writeln('<br><div align="center" style="padding-right: 15px;"><a href="javascript:void(0);" onclick="prevSecondaryBanner();"><img src="/images/home/arrow-left.gif" hspace="10" vspace="4"></a><a href="javascript:void(0);" onclick="nextSecondaryBanner();"><img src="/images/home/arrow-right.gif" hspace="10" vspace="4"></a></div></div>');
}

