function open_dds()
{
	window.open("http://data.ftse.com/","_blank");
	return false;
}

function popup_landscape(the_url)
{
	var w = 800;
	var h = 580;
	var x = Math.round((screen.availWidth - w) / 2); 	 
	var y = Math.round((screen.availHeight - h) / 2);
	var features = "width=" + w + ",height=" + h + ",left=" + x + ",top=" + y + "toolbar=no" + "," + "menubar=yes" + "," + "scrollbars=yes" + "," + "resizable=yes";
	window.open(the_url, "ftse_popup", features);
}

function popup_portrait(the_url)
{
	var w = 660;
	var h = screen.availHeight - 80;
	var x = Math.round((screen.availWidth - w) / 2); 	 
	var y = Math.round((screen.availHeight - h) / 2);
	var features = "width=" + w + ",height=" + h + ",left=" + x + ",top=" + y + "toolbar=no" + "," + "menubar=yes" + "," + "scrollbars=yes" + "," + "resizable=yes";
	window.open(the_url, "ftse_popup", features);
}

function toggle_content(the_id)
{
	var selector_prefix = "selector_";
	var content_prefix = "content_";

	// Locate the selector and content based on the id
	if (document.getElementById)
	{
		this_selector = document.getElementById(selector_prefix + the_id);
		this_content = document.getElementById(content_prefix + the_id);
	}
	else if (document.all)
	{
		this_selector = eval("document.all." + selector_prefix + the_id);
		this_content = eval("document.all." + content_prefix + the_id);
	}
	else
	{
		return;
	}
	
	if (!this_content)
	{
		return;
	}
	
	// Change the properties of the selector and content
	var is_closed = (this_content.style.display == "none");
	this_content.style.display = is_closed ? "block" : "none";
	this_selector.className = is_closed ? "open" : "close";
}

function rollovers_setup()
{
	if (!document.getElementById)
	{
		return;
	}
	var rollover_suffix = "_r";
	var image_class_suffix = "rollover";
	
	var document_images = document.getElementsByTagName("img");
	var rollover_images = new Array();
	var current_image_src;

	for (var i = 0; i < document_images.length; i++)
	{
		var this_class_name = document_images[i].className;
		if (this_class_name.indexOf(image_class_suffix) == this_class_name.length - image_class_suffix.length)
		{
			var this_src = document_images[i].getAttribute("src");
			var file_extension = this_src.substring(this_src.lastIndexOf("."), this_src.length);
			var this_hsrc = this_src.replace(file_extension, rollover_suffix + file_extension);

			document_images[i].setAttribute("hsrc", this_hsrc);
			
			rollover_images[i] = new Image();
			rollover_images[i].src = this_hsrc;
			
			document_images[i].onmouseover = function()
			{
				current_image_src = this.getAttribute("src");
				this.setAttribute("src", this.getAttribute("hsrc"));
			}	
			
			document_images[i].onmouseout = function()
			{
				if (!current_image_src)
				{
					current_image_src = this.getAttribute("src").replace(rollover_suffix + file_extension, file_extension);
				}
				this.setAttribute("src", current_image_src);
			}
		}
	}
}
window.onload = rollovers_setup;