//-----------------------------------------------------------
// define all static texts in the current language
function setLinguisticTexts()
{
	// only there as "prototype"
	//
	// will be done in separated linguistic Javascript file
	// (europarl_en.js, europarl_it.js,...)
}


//-----------------------------------------------------------
function surfto(form) {
	var myindex=form.dest.selectedIndex
	window.open(form.dest.options[myindex].value,"_top","toolbar=yes,location=yes,status=yes,scrollbars=yes,resizable=1");
}

//-----------------------------------------------------------
var fullTextMode = false;

var document_domain = "";
var http_links_domain = ".eu.int";
var contents_for_intranet = false;

var breadcrumb_path  = "/home";
var original_url = "";
var http_url = "";
var document_date_of_publication = "n/a";
var template_display_date_online = 0;
var template_language = "en";
var template_target_language = "en";
var template_color_icons_name = "bleu";
var template_color_rgb = "#0066cc";
var template_color_president_text = "d";

var language_with_home_page = true;
var template_home_link = "/default.htm";
var template_main_section = 0;
var template_homepage = 0;

var template_mover_menu = "";
var template_mover_up = "";
var template_mover_sectprev = "";
var template_mover_sectnext = "";
var template_mover_first = "";
var template_mover_prev = "";
var template_mover_next = "";
var template_mover_last = "";
var template_page_search = "";
var template_page_help = "";
var template_page_info = "";
var template_page_sendmail = "";


// FULL TEXT MODE
var LVtext_navigation = "";
var LVtext_home = "";
var LVtext_navigationTitle = "";
var LVtext_linguisticTitle = "";
var LVtext_president = "";
var LVtext_political = "";
var LVtext_TextModeOff ="";
var LVprintPage = "";

// BREADCRUMBS SWITCH ON/OFF (for non official 11 languages)
var displayBreadcrumbs = true;

// External www server name used in conjunction with template_home_link
// Could be "www.europarl" when used with dynamic applications on wwwdb
externalServer = "";

//-----------------------------------------------------------
// Linguistic Version
// define protocol order and set if the language MUST be output even if it link nothing
var protocol_order = new Array(
			new Array("es", true),
			new Array("da", true),
			new Array("de", true),
			new Array("el", true),
			new Array("en", true),
			new Array("fr", true),
			new Array("it", true),
			new Array("nl", true),
			new Array("pt", true),
			new Array("fi", true),
			new Array("sv", true),
			new Array("bg", false),
			new Array("cs", false),
			new Array("et", false),
			new Array("ga", false),
			new Array("hu", false),
			new Array("lt", false),
			new Array("lv", false),
			new Array("mt", false),
			new Array("pl", false),
			new Array("ro", false),
			new Array("ru", false),
			new Array("sk", false),
			new Array("sl", false),
			new Array("tr", false)
		);

// Popup definitions: array of labels and hyperlinks
var popup_item= new Array();



//
//  *********  START OF THE COOKIE FUNCTIONS. ************.
//

//-----------------------------------------------------------
//
// "Internal" function to return the decoded value of a cookie
//
function getCookieVal (offset) {
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1)
    endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
}

//-----------------------------------------------------------
//
//  Function to return the value of the cookie specified by "name".
//    name - String object containing the cookie name.
//    returns - String object containing the cookie value, or null if
//		the cookie does not exist.
//
function GetCookie (name) {
  var arg = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while (i < clen) {
    var j = i + alen;
    if (document.cookie.substring(i, j) == arg)
      return getCookieVal (j);
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break;
  }
  return null;
}


//-----------------------------------------------------------
//
//  Function to create or update a cookie.
//    name - String object containing the cookie name.
//    value - String object containing the cookie value.  May contain
//	any valid string characters.
//    [expires] - Date object containing the expiration data of the cookie.
//    If omitted or null, expires the cookie at the end of the current session.
//    [path] - String object indicating the path for which the cookie is valid.
//	If omitted or null, uses the path of the calling document.
//    [domain] - String object indicating the domain for which the cookie is
//	valid.	If omitted or null, uses the domain of the calling document.
//    [secure] - Boolean (true/false) value Indicating whether cookie
//	transmission requires a secure channel (HTTPS).
//
//  The first two parameters are required. The others, if supplied, must
//  be passed in the order listed above.  To omit an unused optional field,
//  use null as a place holder.  For example, to call SetCookie using name,
//  value and path, you would code:
//
//	SetCookie ("textMode", "off", null, "/");
//
//  Note that trailing omitted parameters do not require a placeholder.
//
//  To set a secure cookie for path "/myPath", that expires after the
//  current session, you might code:
//
//	SetCookie (myCookieVar, cookieValueVar, null, "/myPath", null, true);
//
function SetCookie (name, value)
{
  var argv = SetCookie.arguments;
  var argc = SetCookie.arguments.length;
  var expires = (argc > 2) ? argv[2] : null;
  var path = (argc > 3) ? argv[3] : null;
  var domain = (argc > 4) ? argv[4] : null;
  var secure = (argc > 5) ? argv[5] : false;
  document.cookie = name + "=" + escape (value) +
	 ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
	 ((path == null) ? "" : ("; path=" + path)) +
	 ((domain == null) ? "" : ("; domain=" + domain)) +
	 ((secure == true) ? "; secure" : "");
}



//-----------------------------------------------------------
//  Function to delete a cookie. (Sets expiration date to current date/time)
//    name - String object containing the cookie name
//
function DeleteCookie (name)
{
  var exp = new Date(2000,1,1);
  exp.setTime(exp.getTime() - 3000);  // This cookie is history
  var cval = GetCookie (name);
  SetCookie(name, "", exp, "/")
 // PMW do not work :
 // document.cookie = name + "=" + cval + ";  expires=" + exp.toGMTString();
}

//-----------------------------------------------------------
//  Function to check a cookie.
//    if textMode is on, change the page in full text mode
//
function checkCoockies()
{
	if (GetCookie("textMode") == "on" )
	{
		fullTextMode = true;
	}
}



//-----------------------------------------------------------
//  Function to check a cookie.
//    if textMode is on, change the page in full text mode
function checkParameter()
{
	var textToFind = window.location.search;
	if (textToFind.indexOf("textMode",0) > 0)
	{
		fullTextMode = true;
	}
}

//-----------------------------------------------------------
// switch: turn cookie textMode to On
function setCookieOn()
{
	var expiryDate = new Date();
	// Basket available only 1000 days
	expiryDate.setTime(expiryDate.getTime() + (1000 * 24 * 60 * 60 * 1000));

	SetCookie ("textMode", "on", expiryDate, "/");
	document.location.reload();
}

//-----------------------------------------------------------
// switch: turn cookie textMode to Off
function setCookieOff()
{
	var expiryDate = new Date();
	// Basket available only 1000 days
	expiryDate.setTime(expiryDate.getTime() + (1000 * 24 * 60 * 60 * 1000));

	SetCookie ("textMode", "off", expiryDate, "/");
	document.location.reload();

}

//-----------------------------------------------------------
// cancel TextMode, depending on HOW the Textmode was called
// - with a cookie: turn cookie textMode to Off
// - with a URL parameter: recall the page without this parameter
function backtoGraphicMode()
{
	if (GetCookie("textMode") == "on" )
	{
		// switch: turn cookie textMode to Off
		setCookieOff();
	}
	else
	{
		var textToFind = location.href;
		var Ts=textToFind.split('?');

		var newUrl = Ts[0];
		document.location.href = newUrl;

		//alert('go to: ' + newUrl);
		//document.location.reload();

	}
}

//
//  *********  END OF THE COOKIE FUNCTIONS. ************.
//



//-----------------------------------------------------------
// test if a string begin with a specified pattern
//
function StringStartsWith(stringtotest, patterntofind)
{
	return ((stringtotest.substring(0, patterntofind.length) == patterntofind));
}


//-----------------------------------------------------------
function StringReplace(s, sc, sr)
{
	var Goods="";
	var Ts=s.split(sc);
	for(i=0;i<Ts.length;i++)
	{
		if(i<Ts.length-1)
		{
			Goods+=Ts[i]+sr;
		}
		else
		{
			Goods+=Ts[i];
		}
	}
	return(Goods);
}

//-----------------------------------------------------------
// Page_Initialization("/wwwroot", "/wwwroot/testwcms", "en", "/wwwroot/testwcms/test_sipade_en.htm");
//-----------------------------------------------------------
function Page_Initialization(domain, folder, language_list, file_url)
{

	// cookies
	checkCoockies();

	// check if textMode parameter is present in url
	checkParameter();


	// to remember if page is in /wwwinter /wwwintra /wwwroot
	document_domain = domain;


	// build the HTTP URL without domain (/wwwinter /wwwintra /wwwroot)
	// remove all unwanted internal domain, we are in "URL" world
	// "/wwwroot/abc/default_en.htm" -> "/abc/default_en.htm"
	http_url = file_url;
	if (StringStartsWith(http_url, "/wwwroot/"))
	{
		http_url = StringReplace(http_url, "/wwwroot/", "/")
	}
	else if (StringStartsWith(http_url, "/wwwintra/"))
	{
		http_url = StringReplace(http_url, "/wwwintra/", "/")
	}
	else if (StringStartsWith(http_url, "/wwwinter/"))
	{
		http_url = StringReplace(http_url, "/wwwinter/", "/")
	}


	if (document_domain == "/wwwintra")
	{
		contents_for_intranet = true;
	}

	if (contents_for_intranet)
	{
		// this document is published or seen from Intranet

		http_links_domain = ".ep.ec";
	}

	// get the 'breadcrumbs path' associated with this URL
	Define_breadcrumb_path(domain, http_url);

	if (language_list == "")
	{
		// no language identified, by default "EN"
		// to display right popup, labels, icons,...
		language_list = "en";
	}


	// take the first LANGUAGE to activate language LINKS
	template_language  = language_list.substring(0, 2);

	// language for links (copyright, webmaster,...)
	template_target_language = template_language;
	if (template_language == 99)
	{
		// 99 -> "en"
		template_target_language = "en";
	}


	if (
		(StringStartsWith(http_url, "/home/default_") )
	    )
	{
		// THIS IS A HOME MENU
		template_homepage = 1;
	}
	else
	{
		// DOES THIS LANGUAGE HAS A HOME MENU PAGE ?
		if (language_with_home_page)
		{
		   template_home_link = '/home/default_' + template_language + '.htm';
		   if (externalServer != "")
		      template_home_link = 'http://' + externalServer + http_links_domain + template_home_link;
		}
	}



	// test if we are in one MAIN MENU (output president and group banner)
	// split the http url "/home/default_en.htm"
	var http_url_components = http_url.split("/");

	if (http_url_components.length == 3)
	{
		// we have only 2 parts /myfolder/yyy.htm
		// test if the folder is one we know...
		//
		// ENTER HERE NAME OF "FOLDER", NO BREADCRUMB ACRONYM
		//
		if (
			(http_url_components[1] == "home")
			|
			(http_url_components[1] == "abc")
			|
			(http_url_components[1] == "activities")
			|
			(http_url_components[1] == "press")
			|
			(http_url_components[1] == "reference")
		   )
		{
			template_main_section = 1;
		}

	}

	//breadcrumb_path = "/home/z_abc";
	//breadcrumb_path = "/home/z_activities";
	//breadcrumb_path = "/home/z_press";
	//breadcrumb_path = "/home/z_reference";
	//breadcrumb_path = "/home/xOTHERS";

	if (StringStartsWith(breadcrumb_path , "/home/z_abc"))
	{
		template_color_icons_name     = "vert";
		template_color_rgb	      = "#99cc99";
		template_color_president_text = "2";

	} else if (StringStartsWith(breadcrumb_path , "/home/z_activities"))
	{
		template_color_icons_name     = "jaune";
		template_color_rgb	      = "#dce299";
		template_color_president_text = "2";

	} else if (StringStartsWith(breadcrumb_path , "/home/z_press"))
	{
		template_color_icons_name     = "gris";
		template_color_rgb	      = "#cccccc";
		template_color_president_text = "2";

	} else if (StringStartsWith(breadcrumb_path , "/home/z_reference"))
	{
		template_color_icons_name     = "brun";
		template_color_rgb	      = "#cc9999";
		template_color_president_text = "d";
	}
	else
	{
		// by default
		template_color_icons_name     = "bleu";
		template_color_rgb	      = "#0066cc";
		template_color_president_text = "d";
	}

	// define all static texts in the current language
	// (some links depend on current Internet/Intranet domain "http_links_domain")
	setLinguisticTexts();

}


//-----------------------------------------------------------
// EUROPARL POPUP
function PopUpDisplay()
{

	var i;

	if (fullTextMode)
	{
		// FULL TEXT MODE: DISPLAY AS LIST OF TEXT
		document.write('<BR>');
		for(i=1;i<popup_item.length;i++)
		{
			document.write(
				'<a target="_top" href="' + popup_item[i][0] + '">' + popup_item[i][1] + '</a>&nbsp;'
				);
		}
	}
	else
	{
		// GRAPHIC MODE: DISPLAY IN ONE COMBO BOX (LIST)

		document.write(
			'<select name="dest" size="1" onchange="top.self.location.href=this.form.dest.options[this.form.dest.selectedIndex].value">' +
			'<option>' + popup_item[0][0] + '</option>'
			);

		for(i=1;i<popup_item.length;i++)
		{
			document.write(
				'<option value='+popup_item[i][0]+'>'+popup_item[i][1]+' </option>'
				);
		}
		document.write('</select>');
	}
}


//-----------------------------------------------------------
function LinguisticBarDisplay()
{
	// before calling this function, need to set a table containing all links
	//
	//	var linguistic_bar_tab = new Array(
	//		new Array("de", "index_de.htm", "3"),
	//		new Array("da", "index_da.htm", "2"),
	//		new Array("el", "index_el.pdf", "1")
	//		);

	var nbMaxIconsPerLine = 11;
	var nbIconsPerLine = 0;

	var language_code = "";
	var EEC_language = false;
	var language_alt_text = "";
	var language_url = "";
	var language_icon = "";

	document.write('<TABLE border="0" cellpadding="0" cellspacing="0" witdh="100%"><TR bgColor="' + template_color_rgb + '">');

	for(i=0;i<protocol_order.length;i++)
	{

		language_code = protocol_order[i][0];
		EEC_language  = protocol_order[i][1];


		// output ONLY EEC languages in the top banner
		if (EEC_language)
		{

			// ALT TEXT, no more "full name", only ISO-639 code
			language_url = "";
			language_icon = "1";

			for(j=0;j<linguistic_bar_tab.length;j++)
			{

				if (language_code == linguistic_bar_tab[j][0])
				{
					// found !

					language_icon = linguistic_bar_tab[j][2];
					if (language_icon == "3")
					{
						// ACTIVE LANGUAGE, no link to activate
					}
					else
					{
						language_url  = linguistic_bar_tab[j][1];
					}
				}
			}

			// icon found or do we have to display icon (es, da, en,..) ?

			nbIconsPerLine++;
			if (nbIconsPerLine > nbMaxIconsPerLine)
			{
				document.write('</TR><TR>');
				nbIconsPerLine = 1;
			}

			document.write('<TD width="21">');
			if (language_url != "")
			{
				document.write('<A HREF="' + language_url + '">');
			}
			document.write('<IMG src="/icons2000/' + language_code + language_icon + '.gif" alt="' + language_code + '" border="0">');

			if (language_url != "")
			{
				document.write('</A>');
			}
			document.write('</TD>');
		}
	}
	document.write('</TR></TABLE>');
}


//-----------------------------------------------------------
function LinguisticBarDisplayNoEEC()
{
	// before calling this function, need to set a table containing all links
	//
	//	var linguistic_bar_tab = new Array(
	//		new Array("de", "index_de.htm", "3"),
	//		new Array("da", "index_da.htm", "2"),
	//		new Array("el", "index_el.pdf", "1")
	//		);

	var language_code = "";
	var EEC_language = false;
	var language_alt_text = "";
	var language_url = "";
	var language_icon = "";

	var language_found_protocol = false;

	document.write('<DIV align="center">');

	for(i=0;i<protocol_order.length;i++)
	{

		language_code = protocol_order[i][0];
		EEC_language  = protocol_order[i][1];


		// output ONLY EEC languages in the top banner
		if (! EEC_language)
		{

			// ALT TEXT, no more "full name", only ISO-639 code
			language_url = "";
			language_icon = "1";

			language_found_protocol = false;
			for(j=0;j<linguistic_bar_tab.length;j++)
			{

				if (language_code == linguistic_bar_tab[j][0])
				{
					// found !
					language_found_protocol = true;

					language_icon = linguistic_bar_tab[j][2];
					if (language_icon == "3")
					{
						// ACTIVE LANGUAGE, no link to activate
					}
					else
					{
						language_url  = linguistic_bar_tab[j][1];
					}
				}
			}

			// icon found or do we have to display icon (es, da, en,..) ?
			if (language_found_protocol)
			{
				if (language_url != "")
				{
					document.write('<A HREF="' + language_url + '">');
				}

				document.write('<IMG src="/icons2000/' + language_code + language_icon + '.gif" alt="' + language_code	+ '" border="0">');

				if (language_url != "")
				{
					document.write('</A>');
				}
				document.write('<BR><IMG src="/icons2000/blanc.gif" height="4"><BR>');
			}
		}
	}
	document.write('</DIV>');
}


//-----------------------------------------------------------
function LinguisticBarDisplay_Text()
{
	// before calling this function, need to set a table containing all links
	//
	//	var linguistic_bar_tab = new Array(
	//		new Array("de", "index_de.htm", "3"),
	//		new Array("da", "index_da.htm", "2"),
	//		new Array("el", "index_el.pdf", "1")
	//		);
	var i;
	var j;
	var language_code = "";
	var EEC_language = false;
	var language_alt_text = "";
	var language_url = "";
	var language_icon = "";
	var language_found_protocol = false;

	var language_textBar_to_display ="&nbsp;";

	for(i=0;i<protocol_order.length;i++)
	{

		language_code	       = protocol_order[i][0];
		EEC_language = protocol_order[i][1];

	    // ALT TEXT, no more "full name", only ISO-639 code
		language_alt_text= language_alt_text;
		language_url = "";
		language_icon = "1";

		language_found_protocol = false;
		for(j=0;j<linguistic_bar_tab.length;j++)
		{

			if (language_code == linguistic_bar_tab[j][0])
			{
				// found !
				language_found_protocol = true;

				language_icon = linguistic_bar_tab[j][2];
				if (language_icon == "3")
				{
					// ACTIVE LANGUAGE, no link to activate
				}
				else
				{
					language_url  = linguistic_bar_tab[j][1];
				}
			}
		}

		// language found or do we have to display links (es, da, en,..) ?
		if ((language_found_protocol) | (EEC_language) )
		{
			if (language_url != "")
			{
				language_textBar_to_display = language_textBar_to_display + "<A HREF=" + language_url + ">" + language_code + "</a>&nbsp;" ;
			}
		}
	}
	return language_textBar_to_display;
}


//-----------------------------------------------------------
function output_navigation_link(url_link, icon_to_use, alt_text, placeholder_icon)
{
	// empty hyperlink ?
	if (url_link == "")
	{
		// no link defined, for the HOME page (/home/default_##.htm)
		// we set a vertical line placeholder
		if (( template_homepage == 1) && (placeholder_icon == "") )
		{
			placeholder_icon = "/icons2000/linevlong.gif";
		}
	}

	if (fullTextMode)
	{
		if (url_link != "")
		{
			document.write('<A target="_top" href="' + url_link + '">'+ alt_text +'</A><BR>');
		}
	}
	else
	{
		if (url_link == "")
		{
			// no link defined, do we have a placeholder icon ?
			if (placeholder_icon != "")
			{
				document.write('<IMG src="' + placeholder_icon + '" border="0"><BR>');
			}
		}
		else
		{
			document.write('<A target="_top" href="' + url_link + '"><IMG src="' + icon_to_use + '" alt="' + alt_text + '" border="0"></A><BR>');
		}
	}
}


//-----------------------------------------------------------
function Display_Body_prefix_banner()
{
   if (fullTextMode)
   {
	document.write(
		'<form enctype="application/x-www-form-urlencoded" name="formbanner">' +
		'<a href="#navigation_links">' + LVtext_navigation + '</a>' +
		'<div class="textOnlymode">'
		);
   }
   else
   {
		// **********************************************
		// **** start body prefix: BANNER
		// **********************************************
		// **** banner containing menu + linguistic bar
		// **********************************************

		//document.write(
		//	'<font color="#ff0000"><strong>The page layout is currently being tested. do not worry if it appears curious.<br>' +
		//	'YOU CAN PUBLISH THIS PAGE, IT WILL BE WELL DESIGNED ON PRODUCTION.<br>' +
		//	'S. Broussin 28/11 16h15</strong></font>'
		//	);


		document.write(
			'<form method="POST" enctype="application/x-www-form-urlencoded" name="formbanner">' +
			'<table border="0" cellpadding="0" cellspacing="0" width="750" height="65" cols="4">' +
			'<tr>' +
			'<td nowrap="nowrap" colspan="4">' +
				'<a target="_top" href="' + template_home_link +'">' +
				'<img src="/icons2000/ban01.gif" width="519" height="20" border="0" alt="home">' +
				'</a>' +
			'</td>' +
			'<td nowrap="nowrap"  width="231">' +
				'<a OnClick="javascript:setCookieOn();" href="#top">' +
				'<img src="/icons2000/ban02.gif" width="231" height="20" border="0" alt="Text Mode">' +
				'</a>' +
			'</td>' +
			'</tr>' +
			'<tr>' +
			'<td nowrap="nowrap"  colspan="3"><a target="_top" href="' + template_home_link +'"><img src="/icons2000/ban03.gif" width="334" height="13" border="0" alt="home"></a></td>'
			);

		if ( (template_language == 99) || (template_main_section == 0) )
		{
			// NO LINGUISTIC BAR OR NOT A MAIN MENU
			// do not display "President" and "Groups" links

			document.write(
					'<td nowrap="nowrap"  width="185">' +
					'<img src="/icons2000/' + template_color_icons_name + '05n.gif" width="185" height="13" border="0" alt="-">' +
					'</td>'
				);

			if ( template_language != 99)
			{
				// LINGUISTIC BAR
				document.write(
					'<td nowrap="nowrap"  rowspan="2" width="231" valign="top">'
					);
				LinguisticBarDisplay();

			} else
			{
				document.write(
					'<td bgcolor="' + template_color_rgb + '" rowSpan="2" valign="bottom" width="231">' +
					'<img border="0" height="37" src="/icons2000/other.gif" width="231">'
					);

			}

		}
		else
		{
			document.write(
				'<td nowrap="nowrap"  width="185">' +
					'<img src="/icons2000/' + template_color_icons_name + '05.gif" width="185" height="13" border="0" alt="-">' +
				'</td>'
				);

			// LINGUISTIC BAR
			document.write(
				'<td nowrap="nowrap"  rowspan="2" width="231" valign="top">'
				);
			LinguisticBarDisplay();

		}


		document.write(
			'</td>' +
			'</tr>' +
			'<tr>' +
			'<td nowrap="nowrap" width="10"><img src="/icons2000/' + template_color_icons_name + '01.gif" width="10" height="32" border="0" alt="-"></td>' +
			'<td nowrap="nowrap" bgcolor="' + template_color_rgb + '" width="219">'
			);

		// EUROPARL POPUP
		PopUpDisplay();

		if ( (template_language == 99) || (template_main_section == 0) )
		{
			// NO LINGUISTIC BAR OR NOT A MAIN MENU
			// do not display "President" and "Groups" links

			document.write(
				'<img src="/icons2000/' + template_color_icons_name + '04.gif" width="219" height="1" border="0" alt="-"></td>' +
				'<td nowrap="nowrap" width="105" bgcolor="' + template_color_rgb + '">&nbsp;' +
				'</td>' +
				'<td nowrap="nowrap" width="185">' +
					'<img src="/icons2000/' + template_color_icons_name + '06n.gif" width="185" height="32" border="0" alt="-">' +
				'</td>'
				);
		}
		else
		{
			// president is only avalaible for EN/FR
			var template_language_president = "en";
			if ((template_language == "fr") || (template_language == "es") || (template_language == "pt") || (template_language == "it"))
			{
				template_language_president = "fr";
			}

			document.write(
				'<img src="/icons2000/' + template_color_icons_name + '04.gif" width="219" height="1" border="0" alt="-"></td>' +
				'<td nowrap="nowrap" width="105" bgcolor="' + template_color_rgb + '">' +
						'<a target="_top" href="/president/' + template_language_president + '/default.htm">' +
						'<img src="/icons2000/presi' + template_color_president_text + '_' + template_language + '.gif" width="105" height="32" border="0" alt="President">' +
						'</a>' +
						'</td>' +
				'<td nowrap="nowrap" width="185">' +
						'<a target="_top" href="/groups/default.htm">' +
						'<img src="/icons2000/' + template_color_icons_name + '06.gif" width="25" height="32" border="0" alt="-">' +
						'<img height="32" width="160" src="/icons2000/group_' + template_language + '.gif" border="0" alt="Political groups">' +
						'</a>' +
						'</td>'
				);
		}

		document.write(
			'</tr>' +
			'</table>' +
			'</form>'
			);
	}
}

//-----------------------------------------------------------
function Display_Body_prefix_header()
{
	// **********************************************
	// **** start body prefix: HEADER
	// **********************************************
	// **** containing breadcrumbs and table containing
	// **** the document corpus
	// **********************************************
	if (! fullTextMode)
	{
		document.write(
			'<table border="0" cellpadding="0" cellspacing="0" width="98%">' +
			'<tr>' +
			'<!-- GOUTTIERE -->' +
			'<td width="10">&nbsp;</td>' +
			'<!-- BREADCRUMBS -->' +
			'<td valign="top" colspan="2">'
			);
	}
	// during validation phase, we display the OLD EUROPARL url
	if (original_url != "")
	{
		// to output original URL
		// document.write("<center><a href=\"" + original_url  + "\" target=\"_blank\"><small>original file: " + original_url  + "</small></a></center>");
	}

	if (! fullTextMode)
	{
		// BREADCRUMBS
		document.write(
			'<div class="breadcrumbs">&nbsp;'
			);
		OutputBreadCrumbs();
		document.write(
			'</div>' +
			'</td>'
			);

		// in full text mode, we display the Navigation links at the bottom of the page
		// NAVIGATION LINKS
		OutputNavigationLinks();

		document.write(
			'<tr>' +
			'<!-- GOUTTIERE -->' +
			'<td width="10">&nbsp;</td>' +
			'<!-- MARGE GAUCHE -->' +
			'<td width="5%">&nbsp;</td>' +
			'<!-- CORPUS -->' +
			'<td width="95%" valign="top">'
			);
	}
}


//-----------------------------------------------------------
function OutputNavigationLinks()
{
	if (! fullTextMode)
	{
		document.write(
			'<!-- MARGE ICONES NAVIG -->' +
			'<td width="40" rowspan="2" valign="top" align="left">'
			);

	}
	// navigation links
	// FIX links (icon will be displayed either or not link defined)
	output_navigation_link(template_mover_menu,'/icons2000/menu.gif','menu', '/icons2000/linecs.gif');
	output_navigation_link(template_mover_up,'/icons2000/level.gif','up one level', '/icons2000/linevlong.gif');
	output_navigation_link(template_mover_prev,'/icons2000/prev.gif','previous', '/icons2000/linevlong.gif');
	output_navigation_link(template_mover_next,'/icons2000/next.gif','next', '/icons2000/linevlong.gif');
	// OPTIONAL links (icon not displayed if not present)
	output_navigation_link(template_mover_first,'/icons2000/first.gif','first', '');
	output_navigation_link(template_mover_last,'/icons2000/last.gif','last', '');
	//output_navigation_link(template_mover_sectprev,'/icons2000/prevsect.gif','previous level', '');
	//output_navigation_link(template_mover_sectnext,'/icons2000/nextsect.gif','next level', '');
	//output_navigation_link('','','', '/icons2000/linev.gif');
	output_navigation_link(template_page_search,'/icons2000/search.gif','search', '');
	output_navigation_link(template_page_help,'/icons2000/help.gif','help', '');
	output_navigation_link(template_page_info,'/icons2000/info.gif','info', '');
	output_navigation_link(template_page_sendmail,'/icons2000/mailto.gif','mail', '');
	// end the navigation bar
	output_navigation_link('','','', '/icons2000/linev.gif');

	if (! fullTextMode)
	{

		// display ICONS for non Official EEC languages (PECO: ru, bg, cs,...)
		LinguisticBarDisplayNoEEC();

		document.write(
			'</td>' +
			'</tr>');
	}

}

//-----------------------------------------------------------
// "Display_Body_prefix()": synonym depreciated
//
// now we can insert the call of an external Javascript
// between the banner and the table containing the
// breadcrumbs and the corpus
//
function Display_Body_prefix()
{
	Display_Body_prefix_banner();
	Display_Body_prefix_header();
}

//-----------------------------------------------------------
function Display_Body_suffix()
{
	if (fullTextMode)
	{
		//we display all Navigation menu with A HREF links
		document.write(
			'</div>' +
			'<HR>' +
			'<div align="left" class="navigationText">' +
			LVtext_navigationTitle +
			'<div>'
			);


		// BREADCRUMBS
		document.write(
			'<div class="breadcrumbs">&nbsp;'
			);
		OutputBreadCrumbs();
		document.write(
			'</div>'+ '<HR>'
			);



		//we display navigation links with A HREF links
		OutputNavigationLinks();
		document.write(
			'<HR>' +
			'<a name="navigation_links" href="' + template_home_link +'">' + LVtext_home +'</a>'
		);


		// EUROPARL POPUP
		PopUpDisplay();

		//we display President and Political groups with A HREF links
		if ( (template_language == 99) || (template_main_section == 0) )
		{
			// NO LINGUISTIC BAR OR NOT A MAIN MENU
			// do not display "President" and "Groups" links
		}
		else
		{
			// president is only avalaible for EN/FR
			var template_language_president = "en";
			if ((template_language == "fr") || (template_language == "es") || (template_language == "pt") || (template_language == "it"))
			{
				template_language_president = "fr";
			}
			document.write(
					'<BR>' +
					'<a href="/president/' + template_language_president + '/default.htm">' + LVtext_president +
					'</a>' + "&nbsp;"+
					'<a href="/groups/default.htm">' + LVtext_political +
					'</a>'
				);
		}

		//we display Linguistics version with A HREF links
		document.write(
			'<HR>'+
			'<div align="left" class="navigationText">' +
			LVtext_linguisticTitle +
			LinguisticBarDisplay_Text() +
			'<div>' +
			'<HR>'
			);
		//we display boddy suffix with A HREF links
		document.write(
			'<a href=" ' + template_home_link +' ">'+ LVtext_home + '</a>'
			);

		// date of publication
		if (template_display_date_online == 1)
		{
			document.write('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' +'On line:&nbsp;' + document_date_of_publication);
		}

		document.write(
			'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' +
			'<a href="/guide/faq/default_' + template_target_language + '.htm">Webmaster</a>' +
			'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' +
			'<a href="/guide/publisher/default_' + template_target_language + '.htm">&copy;</a>' +
			'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' +
			'<a href="/guide/disclaimer/default_' + template_target_language + '.htm">Disclaimer</a>'
			);

//		if (contents_for_intranet)
//		{
//			document.write(
//				'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' +
//				'<a href="http://www.europateam.cc.cec">Europa Team</a>&nbsp;'
//				);
//		}
//
		document.write(
//			'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' +
//			'<a href="http://www.europa.eu.int">Europa</a>'+
			'<HR>'+
			'<a onclick="javascript:backtoGraphicMode();" href="#top">'+LVtext_TextModeOff+'</a>'+
			'</form>'
			);
	}
	else
	{
		document.write(
			'</td>' +
			'</tr>' +
			'</table>' +
			'<table border="0" cellpadding="0" cellspacing="0" width="98%">' +
			'<tr>' +
			'<td width="20%" rowspan="2" valign="bottom"><img height="5" width="150" src="/icons2000/transp.gif" border="0" alt="-"><br>' +
			'<a target="_top" href="' + template_home_link +'"><img height="43" width="110" src="/icons2000/europarl.gif" border="0" alt="home"></a></td>' +
			'<td colspan="2" align="right" valign="bottom">' +
			'<table border="0" cellpadding="0" cellspacing="0" width="100%">' +
			'<tr>' +
			'<td width="96%" align="right" valign="bottom">' +
			'<hr width="100%">' +
			'<img height="7" width="150" src="/icons2000/transp.gif" border="0" alt="-"></td>' +
			'<td width="4%" align="left" valign="bottom"><a href="#top"><img height="35" width="27" src="/icons2000/top.gif" border="0" alt="top of page"></a></td>' +
			'</tr>' +
			'</table>' +
			'</td>' +
			'</tr>' +
			'<tr>' +
			'<td width="68%" valign="bottom">' +
			'<div align="left" class="footer">'
			);

		// date of publication
		if (template_display_date_online == 1)
		{
			document.write('On line:&nbsp;' + document_date_of_publication + '<br>');
		}

		document.write(
			'<a target="_top" href="/guide/faq/default_' + template_target_language + '.htm">Webmaster</a>' +
			'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' +
			'<a target="_top" href="/guide/publisher/default_' + template_target_language + '.htm">&copy;</a>' +
			'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' +
			'<a target="_top" href="/guide/disclaimer/default_' + template_target_language + '.htm">Disclaimer</a>' +
			'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' +
			'<a target = "_top" href="'+ window.location +'?textMode=on">'+ LVprintPage +'</a>'+
			'</div>' +
			'</td>' +
			'<td width="12%" align="center">'
			);

//		if (contents_for_intranet)
//		{
//			document.write(
//				'<A href="http://www.europateam.cc.cec" target="_blank">' +
//				'<IMG src="/icons/logoteam.gif" alt="Europa Team" height="26" width="36" border="0"></A>&nbsp;'
//				);
//		}
//
		document.write(
//			'<a target="_blank" href="http://www.europa.eu.int"><img height="30" width="91" src="/icons2000/europa.gif" border="0" alt="Europa"></a>' +
			'</td>' +
			'</tr>' +
			'</table>'
			);
	}//end au fullTextMode
}


//-----------------------------------------------------------
//
// OUTPUT BREADCRUMBS IN ASSOCIATED LANGUAGE
//
function OutputBreadCrumbs()
{

	// do not display breadcrumbs for NEUTRAL language (decision R. Fritsch, 01-JUN-2001)
	if (displayBreadcrumbs)
	{
		// Page_Initialization must has been called to define breadcrumb_path

		// split the breadcrumb path "/references/topics/archive"
		// to find LABEL and LINKS of each part
		var BreadcrumbParts= breadcrumb_path.split("/");


		;/// start at 1 the first '/' is ignored
		for(i=1; i < BreadcrumbParts.length; i++)
		{

			// READ LABEL AND LINK IN LINGUISTIC SUB-DOCUMENT
			var breadcrumb_info = getBreadCrumbsInfos(BreadcrumbParts[i]);

			var level_label = breadcrumb_info[0];
			var level_link	= breadcrumb_info[1];

			if ( i > 1)
			{
				document.write( "&nbsp;" );
			}
			document.write( ">&nbsp;" );
			if (level_label != "")
			{
				// if link is not empty AND link redirect not to the CURRENT page
				if ( ( level_link != "") && (level_link != http_url) )
				{
					document.write( "<a href=\"" + level_link + "\">" + level_label + "</a>" );
				}
				else
				{
					document.write( level_label );
				}
			}
			else
			{
				document.write( BreadcrumbParts[i] );
			}
		}
	}

}


//-----------------------------------------------------------
//
// FIND DYNAMICALLY BREADCRUMBS CONTEXT WITH A GIVEN URL
//
// parameters are:
//	  - domain: domain from which the page calls ("/wwwinter", "/wwwintra" or "/wwwroot")
//	  - http_url: http url of caller page (without domain)
//
// sample:
//	<script language="Javascript">
//		OutputBreadCrumbs("/wwwroot", "/abc/default_fr.htm");
//	</script>
//
function Define_breadcrumb_path(domain, http_url)
{

	// add a slash to make sure that '/codex' will not be interpretated as '/code'
	var urlRoot = http_url + "/";

	//---------------------------------------------------------------
	//---
	//--- FIND PATH AND ASSOCIATED BREADCRUMBS
	//---
	//--- note: path are descending ordered
	//---------------------------------------------------------------

// ### MAIN WINDOW (output president and group banner)
// template_main_section = 1;

// #################################
// ##WCMS.INSERT.BREADCRUMBS.START##
// ##################################################################################################
// file generated by WCMS [Breadcrumb.generateBreadcrumbJavascriptFile], do not edit manually
// updated at: 08/01/2002 12:12:47
// ##################################################################################################
if (StringStartsWith(urlRoot, "/workingpapers/women/"))
{
	breadcrumb_path   = "/home/z_references/s_Studies/s_Working_doc/sw_women";
}
else if (StringStartsWith(urlRoot, "/workingpapers/tran/"))
{
	breadcrumb_path   = "/home/z_references/s_Studies/s_Working_doc/sw_transport";
}
else if (StringStartsWith(urlRoot, "/workingpapers/stat/"))
{
	breadcrumb_path   = "/home/z_references/s_Studies/s_Working_doc/sw_statistics";
}
else if (StringStartsWith(urlRoot, "/workingpapers/soci/"))
{
	breadcrumb_path   = "/home/z_references/s_Studies/s_Working_doc/sw_social";
}
else if (StringStartsWith(urlRoot, "/workingpapers/saco/"))
{
	breadcrumb_path   = "/home/z_references/s_Studies/s_Working_doc/sw_health";
}
else if (StringStartsWith(urlRoot, "/workingpapers/rext/"))
{
	breadcrumb_path   = "/home/z_references/s_Studies/s_Working_doc/sw_rex";
}
else if (StringStartsWith(urlRoot, "/workingpapers/regi/"))
{
	breadcrumb_path   = "/home/z_references/s_Studies/s_Working_doc/sw_regions";
}
else if (StringStartsWith(urlRoot, "/workingpapers/poli/"))
{
	breadcrumb_path   = "/home/z_references/s_Studies/s_Working_doc/sw_political";
}
else if (StringStartsWith(urlRoot, "/workingpapers/pana/"))
{
	breadcrumb_path   = "/home/z_references/s_Studies/s_Working_doc/sw_parliaments";
}
else if (StringStartsWith(urlRoot, "/workingpapers/libe/"))
{
	breadcrumb_path   = "/home/z_references/s_Studies/s_Working_doc/sw_liberties";
}
else if (StringStartsWith(urlRoot, "/workingpapers/juri/"))
{
	breadcrumb_path   = "/home/z_references/s_Studies/s_Working_doc/sw_legal_affairs";
}
else if (StringStartsWith(urlRoot, "/workingpapers/forest/"))
{
	breadcrumb_path   = "/home/z_references/s_Studies/s_Catalogue/s_other";
}
else if (StringStartsWith(urlRoot, "/workingpapers/fish/"))
{
	breadcrumb_path   = "/home/z_references/s_Studies/s_Working_doc/sw_fisheries";
}
else if (StringStartsWith(urlRoot, "/workingpapers/femm/"))
{
	breadcrumb_path   = "/home/z_references/s_Studies/s_Working_doc/sw_women";
}
else if (StringStartsWith(urlRoot, "/workingpapers/envi/"))
{
	breadcrumb_path   = "/home/z_references/s_Studies/s_Working_doc/sw_environment";
}
else if (StringStartsWith(urlRoot, "/workingpapers/ener/"))
{
	breadcrumb_path   = "/home/z_references/s_Studies/s_Working_doc/sw_energy";
}
else if (StringStartsWith(urlRoot, "/workingpapers/educ/"))
{
	breadcrumb_path   = "/home/z_references/s_Studies/s_Working_doc/sw_education";
}
else if (StringStartsWith(urlRoot, "/workingpapers/econ/"))
{
	breadcrumb_path   = "/home/z_references/s_Studies/s_Working_doc/sw_economy";
}
else if (StringStartsWith(urlRoot, "/workingpapers/dive/"))
{
	breadcrumb_path   = "/home/z_references/s_Studies/s_Catalogue/s_other";
}
else if (StringStartsWith(urlRoot, "/workingpapers/deve/"))
{
	breadcrumb_path   = "/home/z_references/s_Studies/s_Working_doc/sw_development";
}
else if (StringStartsWith(urlRoot, "/workingpapers/cito/"))
{
	breadcrumb_path   = "/home/z_references/s_Studies/s_Working_doc/sw_citoyen";
}
else if (StringStartsWith(urlRoot, "/workingpapers/catalog/"))
{
	breadcrumb_path   = "/home/z_references/s_Studies/s_Catalogue";
}
else if (StringStartsWith(urlRoot, "/workingpapers/budg/reports/"))
{
	breadcrumb_path   = "/home/z_references/s_Studies/s_Catalogue/s_budget";
}
else if (StringStartsWith(urlRoot, "/workingpapers/budg/"))
{
	breadcrumb_path   = "/home/z_references/s_Studies/s_Working_doc/sw_budget";
}
else if (StringStartsWith(urlRoot, "/workingpapers/arch/"))
{
	breadcrumb_path   = "/home/z_references/s_Studies/s_Working_doc/s_z_archive";
}
else if (StringStartsWith(urlRoot, "/workingpapers/agri/"))
{
	breadcrumb_path   = "/home/z_references/s_Studies/s_Working_doc/sw_agriculture";
}
else if (StringStartsWith(urlRoot, "/workingpapers/"))
{
	breadcrumb_path   = "/home/z_references/s_Studies";
}
else if (StringStartsWith(urlRoot, "/whoswho/"))
{
	breadcrumb_path   = "/home/who";
}
else if (StringStartsWith(urlRoot, "/trans/"))
{
	breadcrumb_path   = "/home/z_abc/l_languages/l_translation";
}
else if (StringStartsWith(urlRoot, "/traineeships/"))
{
	breadcrumb_path   = "/home/z_abc/a_stages";
}
else if (StringStartsWith(urlRoot, "/topics/y2000/"))
{
	breadcrumb_path   = "/home/z_references/t_Topics/t_z_archives/y2000";
}
else if (StringStartsWith(urlRoot, "/topics/treaty/"))
{
	breadcrumb_path   = "/home/z_references/t_Topics/t_z_archives/t_treaties";
}
else if (StringStartsWith(urlRoot, "/topics/elections99/"))
{
	breadcrumb_path   = "/home/z_references/t_Topics/t_z_archives/t_elections";
}
else if (StringStartsWith(urlRoot, "/topics/"))
{
	breadcrumb_path   = "/home/z_references/t_Topics";
}
else if (StringStartsWith(urlRoot, "/terminology/"))
{
	breadcrumb_path   = "/home/z_abc/l_languages/l_terminology";
}
else if (StringStartsWith(urlRoot, "/tenders/ventevoiture/"))
{
	breadcrumb_path   = "/home/z_abc/tenders";
}
else if (StringStartsWith(urlRoot, "/tenders/"))
{
	breadcrumb_path   = "/home/z_abc/tenders";
}
else if (StringStartsWith(urlRoot, "/tempcom/bse2/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees/co_t_bse2";
}
else if (StringStartsWith(urlRoot, "/tempcom/"))
{
	breadcrumb_path   = "/home/z_activities";
}
else if (StringStartsWith(urlRoot, "/summits/"))
{
	breadcrumb_path   = "/home/z_references/summits";
}
else if (StringStartsWith(urlRoot, "/studies/"))
{
	breadcrumb_path   = "/home/z_references/s_Studies";
}
else if (StringStartsWith(urlRoot, "/stoa/"))
{
	breadcrumb_path   = "/home/z_references/s_stoa";
}
else if (StringStartsWith(urlRoot, "/stages/"))
{
	breadcrumb_path   = "/home/z_abc/a_stages";
}
else if (StringStartsWith(urlRoot, "/register/"))
{
	breadcrumb_path   = "/home/z_abc";
}
else if (StringStartsWith(urlRoot, "/references/bull/"))
{
	breadcrumb_path   = "/home/z_references/bulletins";
}
else if (StringStartsWith(urlRoot, "/references/"))
{
	breadcrumb_path   = "/home/z_references";
}
else if (StringStartsWith(urlRoot, "/questions/"))
{
	breadcrumb_path   = "/home/z_activities/questions";
}
else if (StringStartsWith(urlRoot, "/pressroom/com/"))
{
	breadcrumb_path   = "/home/z_references/t_Topics/t_z_archives/t_confhearing";
}
else if (StringStartsWith(urlRoot, "/pressroom/"))
{
	breadcrumb_path   = "/home/z_references/t_Topics/t_z_archives";
}
else if (StringStartsWith(urlRoot, "/presentation/"))
{
	breadcrumb_path   = "/home/z_abc/a_a_presentation";
}
else if (StringStartsWith(urlRoot, "/plenary/"))
{
	breadcrumb_path   = "/home/z_activities/p1_plenary sessions";
}
else if (StringStartsWith(urlRoot, "/petition/"))
{
	breadcrumb_path   = "/home/z_abc/a_petitions";
}
else if (StringStartsWith(urlRoot, "/parlcoop/"))
{
	breadcrumb_path   = "/home/z_activities";
}
else if (StringStartsWith(urlRoot, "/organs/"))
{
	breadcrumb_path   = "/home/z_activities/bodies ";
}
else if (StringStartsWith(urlRoot, "/opengov/"))
{
	breadcrumb_path   = "/home/z_abc/a_civis";
}
else if (StringStartsWith(urlRoot, "/oeil/"))
{
	breadcrumb_path   = "/home/z_activities";
}
else if (StringStartsWith(urlRoot, "/natparl/"))
{
	breadcrumb_path   = "/home/z_activities/parliaments";
}
else if (StringStartsWith(urlRoot, "/meetdocs_all/committees/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees/co_z_meetdocs ";
}
else if (StringStartsWith(urlRoot, "/meetdocs/delegations/"))
{
	breadcrumb_path   = "/home/z_activities/d1_delegations/d2_meetdocs";
}
else if (StringStartsWith(urlRoot, "/meetdocs/committees/rett/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees/co_z_meetdocs /co_rett_md";
}
else if (StringStartsWith(urlRoot, "/meetdocs/committees/pech/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees/co_z_meetdocs /co_pech_md";
}
else if (StringStartsWith(urlRoot, "/meetdocs/committees/libe/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees/co_z_meetdocs /co_libe_md";
}
else if (StringStartsWith(urlRoot, "/meetdocs/committees/juri/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees/co_z_meetdocs /co_juri_md";
}
else if (StringStartsWith(urlRoot, "/meetdocs/committees/itre/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees/co_itre";
}
else if (StringStartsWith(urlRoot, "/meetdocs/committees/femm/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees/co_z_meetdocs /co_femm_md";
}
else if (StringStartsWith(urlRoot, "/meetdocs/committees/envi/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees/co_z_meetdocs /co_envi_md";
}
else if (StringStartsWith(urlRoot, "/meetdocs/committees/empl/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees/co_z_meetdocs /co_empl_md";
}
else if (StringStartsWith(urlRoot, "/meetdocs/committees/econ/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees/co_z_meetdocs /co_econ_md";
}
else if (StringStartsWith(urlRoot, "/meetdocs/committees/deve/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees/co_z_meetdocs /co_deve_md";
}
else if (StringStartsWith(urlRoot, "/meetdocs/committees/cult/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees/co_z_meetdocs /co_cult_md";
}
else if (StringStartsWith(urlRoot, "/meetdocs/committees/cont/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees/co_z_meetdocs /co_cont_md";
}
else if (StringStartsWith(urlRoot, "/meetdocs/committees/budg/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees/co_z_meetdocs /co_budg_md";
}
else if (StringStartsWith(urlRoot, "/meetdocs/committees/agri/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees/co_z_meetdocs /co_agri_md";
}
else if (StringStartsWith(urlRoot, "/meetdocs/committees/afet/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees/co_z_meetdocs /co_afet_md";
}
else if (StringStartsWith(urlRoot, "/meetdocs/committees/afco/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees/co_z_meetdocs /co_afco_md";
}
else if (StringStartsWith(urlRoot, "/meetdocs/committees/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees";
}
else if (StringStartsWith(urlRoot, "/meetdocs/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees/co_z_meetdocs ";
}
else if (StringStartsWith(urlRoot, "/language/"))
{
	breadcrumb_path   = "/home/z_abc/l_languages";
}
else if (StringStartsWith(urlRoot, "/interp/"))
{
	breadcrumb_path   = "/home/z_abc/l_languages/l_interpretation";
}
else if (StringStartsWith(urlRoot, "/intcoop/tld/"))
{
	breadcrumb_path   = "/home/z_activities/intcoop/intcoop_tld";
}
else if (StringStartsWith(urlRoot, "/intcoop/acp/"))
{
	breadcrumb_path   = "/home/z_activities/intcoop/intcoop_acp";
}
else if (StringStartsWith(urlRoot, "/intcoop/"))
{
	breadcrumb_path   = "/home/z_activities/intcoop";
}
else if (StringStartsWith(urlRoot, "/index/"))
{
	breadcrumb_path   = "/home/z_abc/aa_index";
}
else if (StringStartsWith(urlRoot, "/igc2000/"))
{
	breadcrumb_path   = "/home/z_references/t_Topics/t_z_archives";
}
else if (StringStartsWith(urlRoot, "/igc1996/"))
{
	breadcrumb_path   = "/home/z_references/t_Topics/t_z_archives";
}
else if (StringStartsWith(urlRoot, "/hearings/20000523/libe/discrimination/"))
{
	breadcrumb_path   = "/home/z_activities/py_hearings";
}
else if (StringStartsWith(urlRoot, "/hearings/"))
{
	breadcrumb_path   = "/home/z_activities/py_hearings";
}
else if (StringStartsWith(urlRoot, "/guide/search/"))
{
	breadcrumb_path   = "/home/z_abc/aa_find";
}
else if (StringStartsWith(urlRoot, "/guide/publisher/"))
{
	breadcrumb_path   = "/home/z_abc/aa_copyright";
}
else if (StringStartsWith(urlRoot, "/guide/guidelines/images/"))
{
	breadcrumb_path   = "/home/z_abc";
}
else if (StringStartsWith(urlRoot, "/guide/faq/"))
{
	breadcrumb_path   = "/home/z_abc/aa_faq";
}
else if (StringStartsWith(urlRoot, "/guide/disclaimer/"))
{
	breadcrumb_path   = "/home/z_abc/aa_disclaimer";
}
else if (StringStartsWith(urlRoot, "/genetics/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees/co_t_genetics";
}
else if (StringStartsWith(urlRoot, "/faq/"))
{
	breadcrumb_path   = "/home/z_abc/aa_faq";
}
else if (StringStartsWith(urlRoot, "/factsheets/"))
{
	breadcrumb_path   = "/home/z_references/s_Studies/s_fact sheets";
}
else if (StringStartsWith(urlRoot, "/experts/"))
{
	breadcrumb_path   = "/home/z_references/t_Topics/t_z_archives/t_experts";
}
else if (StringStartsWith(urlRoot, "/euro/"))
{
	breadcrumb_path   = "/home/z_references/t_Topics/t_z_archives/t_euro";
}
else if (StringStartsWith(urlRoot, "/eucoop/"))
{
	breadcrumb_path   = "/home/z_activities/parliaments";
}
else if (StringStartsWith(urlRoot, "/enlargement/"))
{
	breadcrumb_path   = "/home/z_references/t_Topics/t_enlargement";
}
else if (StringStartsWith(urlRoot, "/ecprd/"))
{
	breadcrumb_path   = "/home/z_activities/parliaments";
}
else if (StringStartsWith(urlRoot, "/delegations/noneurope/"))
{
	breadcrumb_path   = "/home/z_activities/d1_delegations/d4_nonEurope";
}
else if (StringStartsWith(urlRoot, "/delegations/europe/"))
{
	breadcrumb_path   = "/home/z_activities/d1_delegations/d3_europe";
}
else if (StringStartsWith(urlRoot, "/delegations/"))
{
	breadcrumb_path   = "/home/z_activities/intcoop/d1_delegations";
}
else if (StringStartsWith(urlRoot, "/cre/"))
{
	breadcrumb_path   = "/home/z_activities/p1_plenary sessions/p_cre help";
}
else if (StringStartsWith(urlRoot, "/conferences/19961001/regi/"))
{
	breadcrumb_path   = "/home/z_activities/px_conferences";
}
else if (StringStartsWith(urlRoot, "/conferences/"))
{
	breadcrumb_path   = "/home/z_activities/px_conferences";
}
else if (StringStartsWith(urlRoot, "/competitions/"))
{
	breadcrumb_path   = "/home/z_abc";
}
else if (StringStartsWith(urlRoot, "/comparl/libe/elsj/scoreboard/justice/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees/co_libe/el_Elsj/el_scoreboard/el_justice";
}
else if (StringStartsWith(urlRoot, "/comparl/libe/elsj/scoreboard/external/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees/co_libe/el_Elsj/el_scoreboard/el_external";
}
else if (StringStartsWith(urlRoot, "/comparl/libe/elsj/scoreboard/drugs/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees/co_libe/el_Elsj/el_scoreboard/s_drugs";
}
else if (StringStartsWith(urlRoot, "/comparl/libe/elsj/scoreboard/crime/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees/co_libe/el_Elsj/el_scoreboard/el_crime";
}
else if (StringStartsWith(urlRoot, "/comparl/libe/elsj/scoreboard/citizenship/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees/co_libe/el_Elsj/el_scoreboard/el_citizenship";
}
else if (StringStartsWith(urlRoot, "/comparl/libe/elsj/scoreboard/borders/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees/co_libe/el_Elsj/el_scoreboard/el_borders";
}
else if (StringStartsWith(urlRoot, "/comparl/libe/elsj/scoreboard/asylum/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees/co_libe/el_Elsj/el_scoreboard/el_asylum";
}
else if (StringStartsWith(urlRoot, "/comparl/libe/elsj/scoreboard/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees/co_libe/el_Elsj/el_scoreboard";
}
else if (StringStartsWith(urlRoot, "/comparl/libe/elsj/charter/art22/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees/co_libe/co_libe_md/el_Elsj/el_elsj_charter/el_elsj_charter_art22";
}
else if (StringStartsWith(urlRoot, "/comparl/libe/elsj/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees/co_libe";
}
else if (StringStartsWith(urlRoot, "/comparl/afco/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees/co_afco";
}
else if (StringStartsWith(urlRoot, "/comparl/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees";
}
else if (StringStartsWith(urlRoot, "/commonpositions/2001/"))
{
	breadcrumb_path   = "/home/z_activities/p1_plenary sessions/p3_commonpositions/p_2001";
}
else if (StringStartsWith(urlRoot, "/commonpositions/2000/"))
{
	breadcrumb_path   = "/home/z_activities/p1_plenary sessions/p3_commonpositions/p_2000";
}
else if (StringStartsWith(urlRoot, "/commonpositions/1999/"))
{
	breadcrumb_path   = "/home/z_activities/p1_plenary sessions/p3_commonpositions/p_1999";
}
else if (StringStartsWith(urlRoot, "/commonpositions/"))
{
	breadcrumb_path   = "/home/z_activities/p1_plenary sessions/p3_commonpositions";
}
else if (StringStartsWith(urlRoot, "/committees/afco/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees/co_afco";
}
else if (StringStartsWith(urlRoot, "/committees/"))
{
	breadcrumb_path   = "/home/z_activities/c_committees";
}
else if (StringStartsWith(urlRoot, "/codex/"))
{
	breadcrumb_path   = "/home/z_references/codex";
}
else if (StringStartsWith(urlRoot, "/code/"))
{
	breadcrumb_path   = "/home/z_activities/p1_plenary sessions/p4_conciliation ";
}
else if (StringStartsWith(urlRoot, "/charter/"))
{
	breadcrumb_path   = "/home/z_references/t_Topics/t_charter";
}
else if (StringStartsWith(urlRoot, "/bulletins/"))
{
	breadcrumb_path   = "/home/z_references/bulletins";
}
else if (StringStartsWith(urlRoot, "/basicdoc/"))
{
	breadcrumb_path   = "/home/z_references/basic documents";
}
else if (StringStartsWith(urlRoot, "/addresses/parliament/thumbnails/"))
{
	breadcrumb_path   = "/home/z_abc/aa_addresses";
}
else if (StringStartsWith(urlRoot, "/addresses/parliament/pages/"))
{
	breadcrumb_path   = "/home/z_abc/aa_addresses";
}
else if (StringStartsWith(urlRoot, "/addresses/parliament/images/"))
{
	breadcrumb_path   = "/home/z_abc/aa_addresses";
}
else if (StringStartsWith(urlRoot, "/addresses/parliament/"))
{
	breadcrumb_path   = "/home/z_abc/aa_addresses";
}
else if (StringStartsWith(urlRoot, "/addresses/offices/"))
{
	breadcrumb_path   = "/home/z_abc/aa_addresses";
}
else if (StringStartsWith(urlRoot, "/addresses/institutions/"))
{
	breadcrumb_path   = "/home/z_abc/aa_addresses/aa_links";
}
else if (StringStartsWith(urlRoot, "/addresses/images/"))
{
	breadcrumb_path   = "/home/z_abc/aa_addresses";
}
else if (StringStartsWith(urlRoot, "/addresses/"))
{
	breadcrumb_path   = "/home/z_abc/aa_addresses";
}
else if (StringStartsWith(urlRoot, "/activities/"))
{
	breadcrumb_path   = "/home/z_activities";
}
else if (StringStartsWith(urlRoot, "/abc/visit/"))
{
	breadcrumb_path   = "/home/z_abc/a_visit";
}
else if (StringStartsWith(urlRoot, "/abc/"))
{
	breadcrumb_path   = "/home/z_abc";
}
// ##WCMS.INSERT.BREADCRUMBS.END##
// ###############################

	// Systematically add "/home"

	if (! StringStartsWith(breadcrumb_path, "/home"))
	{
		breadcrumb_path = "/home" + breadcrumb_path;
	}

}

