var last_pos = 'london_location';
var last_pos_type = 'first';

function showId(id_to_show)
{
document.getElementById(id_to_show).style.display= "block";
}

function hideId(id_to_hide)
{
document.getElementById(id_to_hide).style.display= "none";
}

var histo = false;

function showHist()
{
	if (!histo)
	{
		showId('moreinfo_history');
		histo = true;
	}
	else
	{
		hideId('moreinfo_history');
		histo = false;
	}
}



function displayInfo( objec, position )
{
	if (objec!=last_pos)
	{

		if (!(navigator.userAgent.indexOf("Firefox")!=-1) )
		{
		document.getElementById(last_pos).className  = "td_more_" + last_pos_type;
		document.getElementById(last_pos).setAttribute("class","td_more_" + last_pos_type);
		}
		document.getElementById(objec).className  = "td_more_" + position + "_on";
		document.getElementById(objec).setAttribute("class","td_more_" + position + "_on");

		showId(objec+"_info");
		hideId(last_pos+"_info");

		last_pos = objec;
		last_pos_type = position;
	}
}

	function toggleLayer( whichLayer )
	{
	  var elem, vis;
	  if( document.getElementById ) // this is the way the standards work
		elem = document.getElementById( whichLayer );
	  else if( document.all ) // this is the way old msie versions work
		  elem = document.all[whichLayer];
	  else if( document.layers ) // this is the way nn4 works
		elem = document.layers[whichLayer];
	  vis = elem.style;
	  // if the style.display value is blank we try to figure it out here
	  if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
		vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
	  vis.display = (vis.display==''||vis.display=='block')?'none':'block';
	}

	function closeBox()
	{
		toggleLayer("social_hold");
	}
	
	function loadBox()
	{
		if (document.getElementById("social_src"))
		{
			document.getElementById("social_src").src = "/social_box/index.htm";	
		}
		else
		{
			document.getElementById("social_content").innerHTML = '<iframe src="/social_box/index.htm" id="social_src" height="291" width="266" name="social_src" scrolling="no" horizontalscrolling="no" verticalscrolling="no" frameborder="0" noresize="noresize" frameborder="0" border="0"></iframe>';
		}
		toggleLayer("social_hold");
	}
	
	