var previousSelectedLink = null;
var linkLevel = "";
function ChangeSubLinks(link){
	var sublink;
	
	if (link == "default")
	{
		document.getElementById('defaultSubLinks').style.display = 'block';
		document.getElementById('mouseOverSubLinks').style.display = 'none';
		if (previousSelectedLink != null)
			document.getElementById(previousSelectedLink).style.background = '#A2B4EA';
		previousSelectedLink != null;
	} 
	else
	{
		document.getElementById('defaultSubLinks').style.display = 'none'; 
		document.getElementById('mouseOverSubLinks').style.display = 'block';
		if (previousSelectedLink != null)
			document.getElementById(previousSelectedLink).style.background = '#A2B4EA';	
		document.getElementById(link).style.background = '#728DE0';
		previousSelectedLink = link;
		
		switch(link)
		{
			case 'homeLink':
				sublink = "&nbsp;";
				break;
			case 'aboutusLink':
				sublink = "<span><a href='" + linkLevel + "AboutTheProprietor.html'>About The Proprietor</a></span> | " + 
						  "<span><a href='" + linkLevel + "WhatSetsUsApart.html'>What Sets Us Apart</a></span> | " +
						  "<span><a href='" + linkLevel + "SuccessStories.html'>Success Stories</a></span> | " +
						  "<span><a href='" + linkLevel + "Portfolio.html'>Portfolio</a></span>";
				break;
			case 'servicesLink':
				sublink = "<span><a href='" + linkLevel + "WebSecurity.html'>Web Security</a></span> | " +
				          "<span><a href='" + linkLevel + "WebApps.html'>Web Applications</a></span> | " +
				          "<span><a href='" + linkLevel + "Hosting.html'>Web Hosting</a></span> | " +
				          "<span><a href='" + linkLevel + "WebsiteCreator.html'>Web Creater</a></span> | " +
						  "<span><a href='" + linkLevel + "TemplateStore/index.html'>Web Templates</a></span> | " +
						  "<span><a href='" + linkLevel + "Domains.aspx'>Domains</a></span> | " + 
						  "<span><a href='" + linkLevel + "IDProtect.html'>ID Protect</a></span> | ";
			    break;
			case 'libraryLink':
				sublink = "<span><a href='" + linkLevel + "ITGlossary.html'>IT Glossary</a></span> | " + 
						  "<span><a href='" + linkLevel + "ITSecurity.html'>IT Security</a></span>";
				break;
			case 'legalLink':
				sublink = "<span><a href='" + linkLevel + "TOS.html'>Terms of Service</a></span> | " +
						  "<span><a href='" + linkLevel + "PrivacyPolicy.html'>Privacy Policy</a></span> | " + 
						  "<span><a href='" + linkLevel + "BillingTerms.html'>Billing Terms</a></span> | " +
						  "<span><a href='" + linkLevel + "UseOfLogo.html'>Use of Logo</a></span>";
				break;
			case 'supportLink':
				sublink = "&nbsp;";
			case 'faqLink':
				sublink = "&nbsp;";
				break;
			case 'sitemapLink':
				sublink = "&nbsp;";
				break;
			case 'privacyLink':
				sublink = "&nbsp;";
				break;
			case 'contactUsLink':
				sublink = "&nbsp;<!--<span><a href='" + linkLevel + "BusinessHours.html'>Business Hours</a></span>-->";
				break;
			break;
		}
		document.getElementById('mouseOverSubLinks').innerHTML = sublink; 
	}
}

function setLinkLevel (value)
{
	linkLevel = value;
}
