// based on suckerfish dropdowns: http://www.alistapart.com/articles/dropdowns
setUpDropdowns = function()
{ 
	if (document.all&&document.getElementById)
	{	
		// get the navlist nose and iterate through its children
		navRoot = document.getElementById("navlist");
		for (var i=0; i<navRoot.childNodes.length; i++)
		{
			node = navRoot.childNodes[i];
			// if its an LI
			if (node.nodeName=="LI")
			{ 
				// add mouseover and mouseout functions to change the class
				node.onmouseover=function()
				{
					this.className+=" over";
				}
  				node.onmouseout=function()
				{
  					this.className=this.className.replace(" over", ""); 
   				}
				/*/ then add the same thing for the ul
				for(var j=0; j<node.childNodes.length; j++ )
				{
					if( node.childNodes[j].nodeName == "UL" )
					{
						node.childNodes[j].onmouseover=function()
						{
							this.className+="over";
						}
						node.childNodes[j].onmouseout=function()
						{
							this.className=this.className.replace("over", "");
						}
					}
				}*/
   			}
  		}
 	}
}

writeLeftcol = function() {
	if (document.getElementById) {
		var check = "";
		var thisstr = '<div id="citiesnav"><p>'; 
		var title = "";
		for (var i=1; i<1000; i++) {
			if (!cities.entry[i]) break;
			title = cities.entry[i].title;
			if (cities.entry[i].title.substring(0,1) != check) {
				if (i > 1)thisstr = thisstr + '</p><p>';
				//title = '<b>'+cities.entry[i].title.substring(0,1)+'</b>'+cities.entry[i].title.substring(1,cities.entry[i].title.length);
			}
			else if (i>1) thisstr = thisstr + ', ';
			thisstr = thisstr + '<a href="'+cities.entry[i].url+'">'+title+'</a>';
			check = cities.entry[i].title.substring(0,1);
		}
		document.getElementById("leftcol").innerHTML = thisstr + '</div>';
	}
}
