function checkSame(newHighlight, chosen)
{
	var same = false;
	var checked = 0;
	
	do
	{
		if(chosen[checked] != -1)
		{
			if(newHighlight == chosen[checked])
			{
				same = true;
			}
		}
		checked++;
	}
	while(same == false && checked < 2);
	return same;
}

function generateHighlights()
{
	var html = "<li id=\"highlights_dealer\"><a href=\"dealers.php\">Find a dealer</a></li>\n";
	html += "<li id=\"highlights_skype\"><a href=\"skype:catrike1?call\">Call us on Skype</a></li>\n";
	var highlights = new Array('usa', 'cad', 'maf', 'brol');
	var links = new Array('about.html', 'http://www.solidworks.com/', 'timeline.html', 'timeline.html');
	
	var i, rand, last;
	var chosen = new Array();
	chosen[0] = -1;
	for(i = 0; i < 2; i++)
	{
		do
		{
			rand = Math.floor(Math.random()*7);
			newHighlight = highlights[rand];
		}while(checkSame(newHighlight, chosen));
		
		chosen[i] = newHighlight;
		if(i == 1){last = " class=\"last\"";};
		html += "<li id=\"highlights_" + chosen[i] + "\"" + last + "><a href=\"" + links[rand] + "\">" + chosen[i] + "</a></li>\n";
	}

	document.getElementById('highlight_links').innerHTML = html;
}


function hd(){document.getElementById('sitemap_trikes').style.display="none";document.getElementById('sitemap_bikes').style.display="none";document.getElementById('sitemap_about').style.display="none";}
function sw(){document.getElementById('sitemap_trikes').style.display="block";document.getElementById('sitemap_bikes').style.display="block";document.getElementById('sitemap_about').style.display="block";}
