var hideCloseButton = false;
var startOfBodyCode = "";
function startOfBody()
{
	eval(startOfBodyCode);
}

function myfunc()
{
alert(1)
}

function rp_openContactWindow(l,t)
{
	var x = window.open(l,t,"width=400,height=250,scrollbars=yes,resizable=yes,menubar=yes");
	if (x.focus) x.focus();
}

function rp_openBookCoverWindow(l,t)
{
	var x = window.open("/richmondspain/catalogue/book-popup.asp?i="+l,t,"width=610,height=420,scrollbars=yes,resizable=yes,menubar=yes");
	if (x.focus) x.focus();
}

function rp_openLegalText(l,t)
{
	var x = window.open(l,t,"width=380,height=200,scrollbars=yes,resizable=yes");
	if (x.focus) x.focus();
}

/*******************************************************************/
function rp_popupWindow(url,target,width,height,opts)
/*
	Returns: (nothing)

	Required parameters:
	·	url: address of page to load in popup window, usually: this.href
	·	target: the name to give to the new window (for reusing windows)

	Optional parameters:
	·	width: (integer) only used if height is also specified
	·	height: (integer)
	·	opts: (string) specify which elements to display in the window:
			l - location (or address) bar
			m - menu bar (useful for access to the file menu for printing)
			r - resizable (usually this should be specified)
			s - scroll bars (usually this should be specified)
			t - tool bar (back, forward, reload, stop, etc)
			x - status bar

			e.g. 'mrs' means display menu bar, allow window to be resized
			and display scrollbars if content is too big for window
********************************************************************/
{
	var p = null;
	if (width == null || height == null) {
		p = null
	}
	else if (opts == null) {
		p = "width="+width+",height="+height
	}
	else
	{
		p = "width="+width+",height="+height

		opts = opts.toString().toLowerCase();

		if (opts.indexOf("l") >= 0) p += ",location=1"
		if (opts.indexOf("m") >= 0) p += ",menubar=1"
		if (opts.indexOf("r") >= 0) p += ",resizable=1"
		if (opts.indexOf("s") >= 0) p += ",scrollbars=1"
		if (opts.indexOf("t") >= 0) p += ",toolbar=1"
		if (opts.indexOf("x") >= 0) p += ",statusbar=1"
	}

	var x = window.open(url,target,p)
	if (x.focus) x.focus();
}
/*******************************************************************/


/*******************************************************************/
function makeSelfLinkBold() {
	if (!document.getElementById) return;
	for (var x=0; x < document.links.length; x++) {
		if (document.links[x].href == document.location.href) {
			document.links[x].style.fontWeight = "bold";
		}
		if (document.links[x].hostname != document.location.hostname) {
			document.links[x].target = "_blank";
		}
	}
}
/*******************************************************************/


/*******************************************************************/
function window_onload() {
	makeSelfLinkBold();
}
window.onload = window_onload;
/*******************************************************************/


/*******************************************************************/
function toggleWriteStyles()
{
	if (!document.getElementById) return;

	document.write('<style type="text/css" media="screen">\n');
	document.write('.toggle-section {\n');
	document.write('display:none;\n');
	document.write('margin: 0px 0px 0px 0px;\n');
	document.write('}\n');
	document.write('</style>\n');
}
toggleWriteStyles();
/*******************************************************************/

/*******************************************************************/
function toggleDisplay(s,link)
{
	if (!document.getElementById) return;

	if (link.className == "toggle-off") {
		document.getElementById(s).style.display = "block"
		link.className = "toggle-on"
	} else {
		document.getElementById(s).style.display = "none"
		link.className = "toggle-off"
	}
}
/*******************************************************************/
