// JavaScript Document

	<!--
	//Send this a number, 1 to 4, to make "mainContentN" and "ssN" visible and the others hidden.
	function showContent(num) {
		for (i = 1; i < 5; ++i)
		{
			if (num == i) {
				varyDisplay("mainContent"+i,"block");
				varyDisplay("ss"+i,"block");
				changeClass("nav"+i,"navHi");
			}
			else {
				varyDisplay("mainContent"+i,"none");
				varyDisplay("ss"+i,"none");
				changeClass("nav"+i,"navLo");
			}
		}
	}

	//Send this an element ID and a css display type, such as "block" or "none" to show/hide that object.
	function varyDisplay(ident,vStr) {
		var changeStr;
		var theObj;
		var dispStr;

		if (document.getElementById) {
			changeStr = "document.getElementById('" + ident + "')";	
			theObj = eval(changeStr);
			if (theObj) {
				theObj.style.display = vStr;
			}				
		} else if (document.all) {
			changeStr = "document.all['" + ident + "']";
			theObj = eval(changeStr);
			if (theObj) {
				theObj.style.display = vStr;
			}									
		} 
	}

	//Send this an element ID and a css class name to change the object's class.
	function changeClass(ident,vStr) {
		var changeStr;
		var theObj;
		var dispStr;

		if (document.getElementById) {
			changeStr = "document.getElementById('" + ident + "')";	
			theObj = eval(changeStr);
			if (theObj) {
				theObj.className = vStr;
			}				
		} else if (document.all) {
			changeStr = "document.all['" + ident + "']";
			theObj = eval(changeStr);
			if (theObj) {
				theObj.className = vStr;
			}									
		} 
	}

	//If there is an anchor in the URL, such as #earn, when the page loads then the relevant content will be shown.
	function detectAnchor(str) {
		if (location.hash == "#earn")
			showContent(1);
		else if (location.hash == "#brands")
			showContent(2);
		else if (location.hash == "#devices")
			showContent(3);
		else if (location.hash == "#easy")
			showContent(4);
	}
	//-->
