if (window == top)
{


document.write('<iframe frameborder="0" src="../en/top.html" height="90" width="100%" marginwidth="0" name="head" scroll="no"></iframe>');
document.write('<h1 align="center">' + document.title + '</h1>');
}

else 

{

if (document.title.length > 24)
	parent.frames.head.document.getElementById("title").innerHTML = document.title;
else  parent.frames.head.document.getElementById("title").innerHTML = "<br/>" + document.title;


// parent.frames.left.location = "../en/left.html";
}


function jp(postcode)
{
document.write('<div style="float:right;display:block; width:187px; height:235px;font-family:Arial, Verdana, Helvetica, sans-serif;background:url(http://www.tfl.gov.uk/tfl/gettingaround/journeyplanner/banners/images/jp-panel.gif) #fff no-repeat; font-size:90%;"> <div style="display:block;padding:35px 15px 15px 15px;"><strong style="color: rgb(36, 66, 102); text-align: center; display: block;">Journey Planner</strong> <form action="http://journeyplanner.tfl.gov.uk/user/XSLT_TRIP_REQUEST2" id="jpForm" method="post" target="tfl" style="margin:5px 0 0 0 !important;padding:0 !important;"><input type="hidden" name="language" value="en" /><!-- in language = english --><input type="hidden" name="execInst" value="" /> <input type="hidden" name="sessionID" value="0" /> <!-- to start a new session on JP the sessionID has to be 0 --> <input type="hidden" name="ptOptionsActive" value="-1" /> <!-- all pt options are active -->  <input type="hidden" name="place_origin" value="London" /> <!-- London is a hidden parameter for  the origin location -->  <input type="hidden" name="place_destination" value="London" /><div><input type="text"  name="name_origin" style="width:155px !important;" value="From"/></div><div><select style="width:155px !important;" name="type_origin"><option value="stop">Station or stop</option><option value="locator">Postcode</option><option value="address">Address</option><option value="poi">Place of interest</option></select></div><div><input type="text" name="name_destination" style="width:155px !important;" value="' + postcode + '"/></div><div><select style="width:155px !important;" name="type_destination"><option selected="selected" value="locator">Postcode</option><option value="stop">Station or stop</option><option value="address" >Address</option><option  value="poi">Place of interest</option></select></div><input type="submit" title="Leave now" value="Leave now"   style="width:155px !important;"/><div style="margin-top:5px;text-align:center;"><a style="text-decoration:none; color:#113B92;font-size:90%;background:#fffbfc;white-space:nowrap;" target="tfl" href="http://journeyplanner.tfl.gov.uk/user/XSLT_TRIP_REQUEST2?language=en&amp;ptOptionsActive=1"  onclick="javascript:document.getElementById(\'jpForm\').ptOptionsActive.value=\'1\';document.getElementById(\'jpForm\').execInst.value=\'readOnly\';document.getElementById(\'jpForm\').submit(); return false">Advanced options</a></div></form></div></div>');
}

var myGardens = new Array();
var element;

function checkMyGardens(garden)
{
if (!navigator.cookieEnabled)
{
	window.alert("Cookies are not enabled. I cannot record your gardens.");
	return (false);
}	

element = -1;
var cookieData = unescape(document.cookie).split(";");
for (i = 0; i < cookieData.length; i++)
{
	var userData = cookieData[i].split("=");
	if ((userData.length > 1) && (userData[0].indexOf("MyGardens") > -1)) 
	{
		myGardens = userData[1].split(",");
		for (j = 0; j < myGardens.length; j++) 
		{
		if (myGardens[j] == garden) element = j;
		}
	}
}
if (element > -1) return (true);
else return (false);
}


function deleteMyGardens(garden)
{
if (checkMyGardens(garden))
{
for (i=element;i< (myGardens.length - 1);i++)
	myGardens[i] = myGardens[i+1];

myGardens.length--;
document.cookie = "MyGardens=" + myGardens.join(",")  + ";expires=Wed, 30 Jun 2010 23:59:59 UTC;path=/";
document.getElementById('MG').href='javascript:addMyGardens(\'' + garden + '\')';
document.getElementById('MG').innerHTML="Add to My Gardens";
}
}


function addMyGardens(garden)
{
if (! checkMyGardens(garden))
{
myGardens[myGardens.length] = garden;
document.cookie = "MyGardens=" + myGardens.join(",")  + ";expires=Wed, 30 Jun 2010 23:59:59 UTC;path=/";
document.getElementById('MG').href='javascript:deleteMyGardens(\'' + garden + '\')';
document.getElementById('MG').innerHTML="Remove from My Gardens";
}
}
