//<!-- COLORS_AND_MENUS.JS V1.3 jul/2009 -->
// Functions used to build the page layout, including top level banners,
// colors and the left-hand menu.
// The actual values used are defined in the file "tpl/menu.js" which should exist
// at the top level of every branch of the site. In case it is not found, we
// define a generic menu here.
// V1.0 Initial version
// V1.1 Changed build_menu() to allow simple labels to be added for the accordion by not including a link in the menu.js definition
// V1.2 Includes build_menu_cp() for Product Catalog and the option to set b_size to "" for custom banners directly in code
// V1.3 Added hidden logo to navbar which is displayed only when printing pages. Part of page print bug fix.
// V1.31 Added MM_jumpMenu function, already in use on home page

//******** SET DEFAULTS **************

// Set some default values for page layout in case there is no tpl/menu.js file found in the directory

if (typeof b_size == "undefined") {
	b_size = "banner_short";
	b_dir = "http://www.gemalto.com/_dotcom_template/images/";
	b_name = "bg_banner_corporate.gif";
	b_h1 = "The world leader";
	b_h2 = "in digital security";
	b_h3 = "";
	c_scheme = "container_corporate";
	div_size = "content_3_3";
};

if (typeof menu == "undefined") {
	var zeRubrique = "Company info";
	var menu = new Array();		/*	les menus et sous-menus 	*/
	menu[0] = new Array();

	menu[0][0] = "Company Home$http://www.gemalto.com/companyinfo/index.html";

	menu[0][1] = new Array();
	 menu[0][1][0] = "About Gemalto$http://www.gemalto.com/companyinfo/about/index.html";
	 menu[0][1][1] = "Customer Highlights$http://www.gemalto.com/companyinfo/about/highlights_public_sector.html";
	 menu[0][1][2] = "Global Alliances$http://www.gemalto.com/companyinfo/about/alliance.html";
	 menu[0][1][3] = "Merger of Equals$http://www.gemalto.com/companyinfo/about/merger/";
 
	menu[0][2] = "Our vision$http://www.gemalto.com/companyinfo/digital_security.html";

	menu[0][3] = new Array();
	 menu[0][3][0] = "Corporate Governance$http://www.gemalto.com/companyinfo/gov/index.html";
	 menu[0][3][1] = "Management$http://www.gemalto.com/companyinfo/gov/management.html";
	 menu[0][3][2] = "Board$http://www.gemalto.com/companyinfo/gov/board.html";
	 menu[0][3][3] = "Remuneration Policy$http://www.gemalto.com/companyinfo/gov/remuneration.html";
	 menu[0][3][4] = "Committees$http://www.gemalto.com/companyinfo/gov/committees.html";
	 menu[0][3][5] = "Principles$http://www.gemalto.com/companyinfo/gov/principles_charters.html";
	 menu[0][3][6] = "Our Values$http://www.gemalto.com/companyinfo/gov/values.html";
 
	menu[0][4] = new Array();
	 menu[0][4][0] = "Our Responsibilities$http://www.gemalto.com/companyinfo/about/social_responsibility/index.html";
	 menu[0][4][1] = "Environment$http://www.gemalto.com/companyinfo/about/social_responsibility/environment.html";
	 menu[0][4][2] = "Corporate citizenship$http://www.gemalto.com/companyinfo/about/social_responsibility/corp_citizen.html"; 
	 menu[0][4][3] = "Customers$http://www.gemalto.com/companyinfo/about/social_responsibility/customer.html";
	 menu[0][4][4] = "Employees$http://www.gemalto.com/companyinfo/about/social_responsibility/employees.html";
  
	menu[0][5] = new Array();
	 menu[0][5][0] = "Production$http://www.gemalto.com/companyinfo/about/production/";
	 menu[0][5][1] = "Quality$http://www.gemalto.com/companyinfo/about/production/quality.html";
	 menu[0][5][2] = "Security$http://www.gemalto.com/companyinfo/about/production/security_standards.html";

	menu[0][6] = new Array();
	 menu[0][6][0] = "Innovation$http://www.gemalto.com/companyinfo/r_d.html"; 
	 menu[0][6][1] = "Gemalto Technology$http://www.gemalto.com/companyinfo/r_d_techno.html"; 
	 menu[0][6][2] = "About smart cards$http://www.gemalto.com/companyinfo/smart_cards_basics/"; 
	 menu[0][6][3] = "Leveraging our <br/>expertise$http://www.gemalto.com/companyinfo/r_d_expertise.html"; 

	menu[0][7] = "Investors$http://www.gemalto.com/investors/index.html";
	
	menu[0][8] = "Press$http://www.gemalto.com/press/index.html";

	menu[0][9] = "Partners$http://www.gemalto.com/partners/program.html";

	menu[0][10] = "Worldwide Locations$http://www.gemalto.com/php/office_search.php";
 
	menu[0][11]= "Download Brochures$http://www.gemalto.com/brochures/";

}

function banner(){
	if (b_size == "min_spark") {
		document.write("<div id='banner_title_container'>");
		document.write("<div id='banner_title_bg' style='background-image:url(" + b_dir + b_name + ");'>");
		document.write("</div> <!-- /banner_title_bg banner couleur seul -->");
		document.write("<div id='banner_title_sparkle'> <!-- /banner_title_sparkle - sparkle flash transparent -->");
		document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0' width='910' height='58'>");
		document.write("<param name='movie' value='/_dotcom_template/images/sparkle910x58.swf'>");
		document.write("<param name='quality' value='high'>");
    	document.write("<param name='wmode' value='transparent'>");
		document.write("<embed src='/_dotcom_template/images/sparkle910x58.swf' quality='high' wmode='transparent' pluginspage='http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='910' height='58'></embed>");
		document.write("</object>");
		document.write("</div> <!-- /banner_short_sparkle - sparkle flash transparent -->");
		document.write("<div id='banner_title'>");
		document.write("<h1>" + b_h1 + "</h1>");
		document.write("</div> <!-- /banner_title -->");
		document.write("</div> <!-- /banner_title_container -->");
	}
	else if (b_size == "short_spark") {
		document.write("<div id='banner_short_container'>");
		document.write("<div id='banner_short_bg' style='background-image:url(" + b_dir + b_name + ");'>");
		document.write("</div> <!-- /banner_short_bg banner couleur seul -->");
		document.write("<div id='banner_short_sparkle'> <!-- /banner_title_sparkle - sparkle flash transparent -->");
		document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0' width='910' height='118'>");
		document.write("<param name='movie' value='/_dotcom_template/images/sparkle910x118.swf'>");
		document.write("<param name='quality' value='high'>");
    	document.write("<param name='wmode' value='transparent'>");
		document.write("<embed src='/_dotcom_template/images/sparkle910x118.swf' quality='high' wmode='transparent' pluginspage='http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='910' height='118'></embed>");
		document.write("</object>");
		document.write("</div> <!-- /banner_title_sparkle - sparkle flash transparent -->");
		document.write("<div id='banner_short_title'>");
		document.write("<h3>" + b_h3 + "</h3>");
		if (b_h1.length>0) document.write("<h1>" + b_h1 + "</h1>");
		document.write("<h2>" + b_h2 + "</h2>");
		document.write("</div> <!-- /banner_title -->");
		document.write("</div> <!-- /banner_title_container -->");
	}
	else if (b_size == "anim") {
		//alert(b_name.substr(0,b_name.indexOf(".")));
		document.write("<script type='text/javascript'>");
		document.write("AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','910','height','218','src','" + b_dir + b_name.substr(0,b_name.indexOf(".")) +  "','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','" + b_dir + b_name.substr(0,b_name.indexOf(".")) +  "','wmode','transparent' ); //end AC code");
		document.write("</script>");
		document.write("<noscript>");

		document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0' width='910px' height='218px'>");
          document.write("<param name='movie' value='" + b_dir + b_name + "'>");
          document.write("<param name='quality' value='high'>");
          document.write("<param name='wmode' value='transparent'>");
          document.write("<embed src='" + b_dir + b_name +  "' quality='high' wmode='transparent' pluginspage='http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='910px' height='218px'></embed>");
	    document.write("</object>");
   		document.write("</noscript>");
	}
	else if (b_size == "") {
	// Banner display is custom and goes directly in the page
	}
	else {		// Possibilities: banner, banner_short, banner_min
		document.write("<div id='" + b_size + "' style='background-image:url(" + b_dir + b_name + ");'>");
		if (b_size=="banner_short") document.write("<h3>" + b_h3 + "</h3>");
		if (b_h1.length>0) document.write("<h1>" + b_h1 + "</h1>");
		if (b_size!="banner_min")document.write("<h2>" + b_h2 + "</h2>");
		if (b_size=="banner") document.write("<h3>" + b_h3 + "</h3>");
		document.write("</div> <!-- /banner -->");
	}
}
	
function color_scheme(scheme_name,hauteur) {
	if (color_scheme.arguments.length == 2) { // when called within an index file
		c_scheme = scheme_name; 
	}
	if (c_scheme.length > 0) { // Set c_scheme to "" in menu.js to stop this div from being created
		document.write("</div> <!-- /head -->"); // close the head div if c_scheme defined
		document.write("<div id='" + c_scheme + "'");
		if (typeof (hauteur) != "undefined") document.write(" style='height:" + hauteur + "px;'");
		document.write(">");
	}
}

function build_menu_cp() {                        // specific build_menu for product catalog
  if (showLeftMenu) {
	var m_item = new Array;                       // m_item[0] is the text, m_item[1] is the link 
	var tog=0;                                    // Keep track of # of submenus to open the right one
	document.write("<div id='nav_left_container'>");
	if (typeof menu[0] == "object") {             // test that menu exists and is an array
		document.write("<h6>" + zeRubrique + "</h6>");
		document.write("<div id='nav_left_bloc'>");
		document.write("<div id='accordion'>");
		for (i=0; i<menu.length; i++) {        // loop through the whole menu
			if (typeof menu[i] == "object" && menu[i].length > 1) {  // case where there are more than 1 submenus
				for (j=0; j<menu[i].length; j++) {
					if (typeof menu[i][j] == "string") {
						m_item = menu[i][j].split("$"); 
						if (j==0) {               // use the first item in the submenu as the label
							document.write("<h5 class='toggler'>>" + m_item[0] +"</h5>");
							document.write("<div class='element'>");
							if (typeof m_item[1] != "undefined") if (m_item[1].length < 2) continue; // if no link, or only # don't display it as submenu item
						}                         // if the first item (or any item) in the submenu has no link don't display it
						if (typeof m_item[1] != "undefined") document.write("<h4><a href='" + m_item[1] + "?toggler=" + tog + "'>" + m_item[0] +"</a></h4>");
					}
				}
			document.write("</div>");
			tog++; 
			}
			else if (typeof menu[i] == "object" && menu[i].length == 1) {  // case of only one submenu (common in Prod Cat)
				m_item = menu[i][0].split("$");
				if (m_item[1].length >0) document.write("<a href='" + m_item[1] + "'><h5>>" + m_item[0] +"</h5></a>");
				else document.write("<h5 style='cursor: default;'>" + m_item[0] +"</h5>");
			}
			else if (typeof menu[i] == "string") {  // case where there are no submenus
				m_item = menu[i].split("$");
				if (m_item[1].length >0) document.write("<a href='" + m_item[1] + "'><h5>>" + m_item[0] +"</h5></a>");
				else document.write("<h5 style='cursor: default;'>" + m_item[0] +"</h5>");
			}
		}
		document.write("</div> <!-- /accordion -->");
		document.write("</div> <!-- /nav_left_bloc -->");
	}
	else {
	document.write("<h6>Products</h6>");	
	}
	document.write("</div> <!-- /nav_left_container -->");
  }
}

function build_menu() {                           // standard build_menu
  if (showLeftMenu) {
	var m_item = new Array;                       // m_item[0] is the text, m_item[1] is the link 
//	var tog=0;                                    // Keep track of # of submenus to open the right one
	document.write("<div id='nav_left_container'>");
	if (typeof menu[0] == "object") {             // test that menu exists and is an array
		document.write("<h6>" + zeRubrique + "</h6>");
		document.write("<div id='nav_left_bloc'>");
		document.write("<div id='accordion'>");
		for (i=0; i<menu[0].length; i++) {        // loop through the whole menu
			if (typeof menu[0][i] == "object") {  // case where there are submenus
				for (j=0; j<menu[0][i].length; j++) {
					if (typeof menu[0][i][j] == "string") {
						m_item = menu[0][i][j].split("$"); 
						if (j==0) {               // use the first item in the submenu as the label
							document.write("<h5 class='toggler'>>" + m_item[0] +"</h5>");
							document.write("<div class='element'>");
						}                         // if the first item (or any item) in the submenu has no link, don't display it
						if (typeof m_item[1] != "undefined") document.write("<h4><a href='" + m_item[1] + "'>" + m_item[0] +"</a></h4>");
					}
				}
			document.write("</div>");
//			tog++; 
			}
			else if (typeof menu[0][i] == "string") {  // case where there are no submenus, only a single link
				m_item = menu[0][i].split("$");
				document.write("<a href='" + m_item[1] + "'><h5>>" + m_item[0] +"</h5></a>");
			}
		}
		document.write("</div> <!-- /accordion -->");
		document.write("</div> <!-- /nav_left_bloc -->");
	}
	else {
	document.write("<h6>No Menu Found</h6>");	
	}
	document.write("</div> <!-- /nav_left_container -->");
  }
}

function open_main() {
	if (div_size.length > 0) {
		document.write("<div id='" + div_size + "'>");
	}
	
	if(!noBreadCrumbs) {
		document.write("<div id='breadcrumbs'>");
		breadCrumb(); 
		document.write("</div> <!-- /breadcrumbs -->");
	}
}

// The set_height() function is called to make all the columns of the layout occupy the same space. It measures the biggest
// column, then sets the height for the containing block, forcing a recalculation of the child divs. Tested for Firefox
// IE7 and IE6.
function set_height() {
	var content_div = document.getElementById(div_size);
	if (div_size == "content_2_3") {
		var right_div = document.getElementById('content_1_3')
		if (right_div.scrollHeight > content_div.scrollHeight) content_div = right_div;
	}
	var container = document.getElementById(c_scheme);
	var nav = document.getElementById('nav_left_container');
	//alert('central column height= ' + central_div.scrollHeight + " Nav column height= " + nav.scrollHeight);
	if (nav.scrollHeight > content_div.scrollHeight) container.style.height = nav.scrollHeight+"px";
	else container.style.height = content_div.scrollHeight+"px";
	document.getElementById('nav_left_container').style.height="100%"; // Forces IE6 to recalculate the columns
}

// jumpMenu is called by the pulldown menu to switch to a regional site
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

/************* BREADCRUMB ***********************/

//
//  BreadCrumps displayer, lets the browser show you the path !!
//  Author: Hubert GREGOIRE, GEMPLUS 2000
//  Free for use, this peace of code is distributed as is and
//  without any support nether any garanty.
//

var bc_symbol =" > ";
//
// return a string with a link on the topic with an upperCase Cap.
//
function buildLink(Title,link)
{
	var aBC =Title.substring(0,1).toUpperCase() + Title.substring(1)  ;
	aBC = aBC.replace("_"," ");
	aBC="<a href='"+link+"'>"+aBC+"</a>";
	aBC= aBC+ bc_symbol;
	return aBC;
}

//
// return a string associated to the link passed
//

function getTopic(theLink)
{
	var thePaths = "/|/companyinfo|/companyinfo/gov|/press/jag|/joblikeme|/press";
	var theTopics = "home|Company Info|Governance|Just Ask Gemalto|JobLikeMe|Media Center";
	
	var topicTable = theTopics.split("|");  // transform a string in table
	var pathTable = thePaths.split("|");

	for (var i=0;i<pathTable.length;i++) 	{  // search in the link table
		if ( pathTable[i] == theLink)  
			return  topicTable[i];   // get the topic
	}
	return   theLink.substring(theLink.lastIndexOf("/")+1,theLink.length) ; // the topic is the lk
	
}

//
// return a BreadCrump string  from a link
//

function buildBC (theLink)
{
	if (theLink=="")
		theLink="/";
	theTopic = getTopic(theLink);
	return buildLink(theTopic , theLink)
}

//
// return a BreadCrump string from the current page 
//

function BreadCrump()
{
	var theURI = ""+window.location.pathname;
	var theBreadCrump = "" ;
		
	var start=0;
	var nextSlash = 0;
	
	while(true) {
		nextSlash = theURI.indexOf("/",start);
		if (nextSlash == -1)
			return theBreadCrump;
		toBC = theURI.substring(0,nextSlash);
		
		theBreadCrump = theBreadCrump  + buildBC(toBC);
		start = nextSlash +1 ;
	}
}

//
// display the BreadCrump string @ the current location 
//

function breadCrumb()
{
	document.write(BreadCrump());
}

/********LANGUE DES MENUS DU HAUT****************
On teste si on est dans un site région
et on adapte les menus du haut si c'est le cas
*************************************************/

var dir = document.location.pathname.substring(1,document.location.pathname.indexOf("/",1)) ;
if (document.location.pathname.indexOf("_fr.php")>=0) dir = "france"; // Used for php scripts
if (document.location.pathname.indexOf("_po.php")>=0) dir = "brasil";
if (document.location.pathname.indexOf("_es.php")>=0) dir = "latam";


top_menu =new Array();

switch (dir) {

	case "france" :
		top_menu[0]='Accueil$/france/index.html';
		
		top_menu[1]=new Array();
		top_menu[1][0]='Notre Compagnie$/france/apropos/index.html';
		top_menu[1][1]='Management$/france/apropos/management.html';
		top_menu[1][2]='Notre vision$/france/apropos/securite_numerique.html';
		top_menu[1][3]='Investisseurs$/france/investisseurs/index.html';
		top_menu[1][4]='Bureaux Gemalto France$/php/office_result.php?fRegion=0&fCountry=1';
		
		top_menu[2]=new Array();
		top_menu[2][0]='Produits &amp; Solutions$/france/pss/index.html';
		top_menu[2][1]='T&eacute;l&eacute;communications$/france/telecom/index.html';
		top_menu[2][2]='Services Financiers & Distribution$/france/banque/index.html';
		top_menu[2][3]='Entreprise$/france/entreprise/';
		top_menu[2][4]='Gouvernement$/france/secteur_public/index.html';
		top_menu[2][5]='Transport$/france/transport/index.html';
		top_menu[2][6]='Training (en anglais)$/training/index.html';
		
		top_menu[3]=new Array();
		top_menu[3][0]='Nous Contacter$#';
		top_menu[3][1]='Jobs/Carri&#232res$/companyinfo/careers/index.html';
		top_menu[3][2]='Support Technique (en anglais)$http://support.gemalto.com/';
		top_menu[3][3]='Ventes/Autres$/php/contactus_fr.php';
		
		top_menu[4]='Acheter$http://store.gemalto.com/is-bin/INTERSHOP.enfinity/eCS/Store';
		break;
	case "brasil" :
		top_menu[0]='Home$/brasil/index.html';
		
		top_menu[1]=new Array();
		top_menu[1][0]='Sobre a Gemalto$/brasil/sobre_gemalto/index.html';
		top_menu[1][1]='Management$/brasil/sobre_gemalto/management.html';
		top_menu[1][2]='Seguran&#231a digital$/brasil/sobre_gemalto/seguranca_digital.html';
		top_menu[1][3]='Escrit&#243rios Locais da Gemalto$/php/office_result.php?fRegion=11&fCountry=0';	
			
		top_menu[2]=new Array();
		top_menu[2][0]='Produtos/Solu&#231&#245es$/brasil/pss/index.html';
		top_menu[2][1]='Telecomunica&#231&#245es$/brasil/telecom/index.html';
		top_menu[2][2]='Servi&#231os Financeiros<br/>e Varejo$/brasil/servicos_financeiros/index.html';
		top_menu[2][3]='Empresa$/brasil/empresa/';
		top_menu[2][4]='Setor P&#250blico$/brasil/setor_publico/';
		top_menu[2][5]='Transporte$/brasil/transporte/index.html';
		top_menu[2][6]='Training (em ingl&#234s)$/training/index.html';
		
		top_menu[3]=new Array();
		top_menu[3][0]='Fale conosco$/php/contactus_po.php';
		top_menu[3][1]='Cadastre seu curriculo$http://www.vagas.com.br/gemalto';
		top_menu[3][2]='Technical Support (em ingl&#234s)$http://support.gemalto.com/';
		top_menu[3][3]='Sales/Others$/php/contactus_po.php';
		
		top_menu[4]='Compras$http://www.gemplusdobrasil.com.br/';
		break;
	case "latam" :
		top_menu[0]='Home$/latam/index.html';
		
		top_menu[1]=new Array();
		top_menu[1][0]='Acerca de Gemalto$/latam/acerca/index.html';
		top_menu[1][1]='Gerencia$/latam/acerca/management.html';
		top_menu[1][2]='Seguridad Digital$/latam/acerca/seguridad_digital.html';
		top_menu[1][3]='Oficinas locales de Gemalto$/php/office_result.php?fRegion=11&fCountry=0';	
			
		top_menu[2]=new Array();
		top_menu[2][0]='Productos y soluciones$/latam/pss/index.html';
		top_menu[2][1]='Telecomunicaciones$/latam/telecom/index.html';
		top_menu[2][2]='Servicios financieros$/latam/servicios_financieros/index.html';
		top_menu[2][3]='Empresa$/latam/empresa/index.html';
		top_menu[2][4]='Sector p&#250blico$/latam/sector_publico/index.html';
		top_menu[2][5]='Transporte (en ingl&#235s)$/latam/transporte/index.html';
		top_menu[2][6]='Training (en ingl&#235s)$/training/index.html';
		
		top_menu[3]=new Array();
		top_menu[3][0]='Contacto$/php/contactus_es.php';
		top_menu[3][1]='Jobs/Careers$/companyinfo/careers/index.html';
		top_menu[3][2]='Technical Support (en ingl&#237s)$http://support.gemalto.com/';
		top_menu[3][3]='Sales/Others$/php/contactus_es.php';
		
		top_menu[4]='Tienda$http://store.gemalto.com/is-bin/INTERSHOP.enfinity/eCS/Store';
break;
	case "deutschland" :
		top_menu[0]='Corporate$/index.html';
		
		top_menu[1]=new Array();
		top_menu[1][0]='&#220ber Gemalto$/deutschland/uber_gemalto.html';
		top_menu[1][1]='Management$/companyinfo/gov/management.html';
		top_menu[1][2]='Gemalto Offices$/php/office_result.php?fRegion=0&fCountry=9';	
			
		top_menu[2]=new Array();
		top_menu[2][0]='Gesundheit$/deutschland/kartenterminal.html';
		
		top_menu[3]=new Array();
		top_menu[3][0]='eBanking$/deutschland/ebanking/index.html';
		
		top_menu[4]=new Array();
		top_menu[4][0]='Unternehmen$/deutschland/unternehmen/index.html'; 

		top_menu[5]=new Array();
		top_menu[5][0]='Kontakt$/deutschland/tech_support.html';	
		break;
		
	case "japan":
		top_menu[0]='ジェムアルトについて$/japan/companyinfo/index.html';
		
		top_menu[1]=new Array();
		top_menu[1][0]='製品案内 $/japan/product/index.html';
								
		top_menu[2]=new Array();
		top_menu[2][0]='サポート $/japan/support/index.html';
						
		top_menu[3]=new Array();
		top_menu[3][0]='Online Shop$http://boutique.gemalto.com';
		
		top_menu[4]='Global Site $http://www.gemalto.com';
		break;
	
	case "china":
		top_menu[0]='首页$/china/';
		
		top_menu[1]=new Array();
		top_menu[1][0]='关于金雅拓$/china/companyinfo/index.htm';
		top_menu[1][1]='管理层$/china/companyinfo/management.html';
		top_menu[1][2]='数字安全$/china/companyinfo/digital_security.html';
		top_menu[1][3]='本地办事处$/china/companyinfo/china_offices.html';
						
		top_menu[2]=new Array();
		top_menu[2][0]='产品与解决方案$/china/pss/index.html';
		top_menu[2][1]='电信$/china/telecom';
		top_menu[2][2]='金融服务及零售$/china/financial/index.html';
		top_menu[2][3]='企业应用$/china/enterprise/index.html';
		top_menu[2][4]='公共部门$/china/public_sector/index.html';
		top_menu[2][5]='交通$/china/transport/index.html';
				
		top_menu[3]=new Array();
		top_menu[3][0]='联系我们$/php/contactus.php';
		
		top_menu[4]='在线采购$http://boutique.gemalto.com';
		break;
		
	case "sverige" :
		top_menu[0]='Hem$/sverige/index.html';
		
		top_menu[1]=new Array();
		top_menu[1][0]='Om Gemalto$/sverige/om_gemalto/index.html';
		top_menu[1][1]='Direktion$/companyinfo/gov/management.html';
		top_menu[1][2]='Digital s&#228kerhet$/sverige/om_gemalto/digital_sakerhet.html';
		top_menu[1][3]='Gemaltos lokala kontor$/sverige/om_gemalto/kontakt.html';	
			
		top_menu[2]=new Array();
		top_menu[2][0]='Produkter och l&#246sningar';
		top_menu[2][1]='Telekommunikation$/sverige/teleommunikation/';
		top_menu[2][2]='Finansiella tj&#228nster och &#229terf&#246rs&#228ljning$/sverige/finansiella/';
		top_menu[2][3]='F&#246retag$/sverige/foretag/';
		top_menu[2][4]='Offentlig sektor$/sverige/offentliga_sektorn/';
		top_menu[2][5]='Transport$/sverige/transport/';
		top_menu[2][6]='Training (in English)$/training/index.html';
		top_menu[2][7]='Webbutik$http://boutique.gemalto.com';
		
		
		top_menu[3]=new Array();
		top_menu[3][0]='Kontaktinformation$/sverige/om_gemalto/kontakt.html';
		top_menu[3][1]='Gemaltos kontor$http://www.gemalto.com/php/office_search.php';
		top_menu[3][2]='Jobb$http://www.gemalto.com/companyinfo/careers/index.html';
		top_menu[3][3]='Teknisk support (p&#229 engelska)$http://support.gemalto.com/';
		top_menu[3][4]='F&#246rs&#228ljning/Annat$/php/contactus.php';
		
		top_menu[4]=new Array();
		top_menu[4][0]='Media Center$http://www.gemalto.com/press/index.html';
		top_menu[4][1]='Lokala presskontakter$http://www.gemalto.com/press/contacts.html';
		top_menu[4][2]='Pressmeddelanden$http://www.gemalto.com/focus/index.html';
		break;


		
	default :
		top_menu[0]='Home$http://www.gemalto.com/index.html';
		
		top_menu[1]=new Array();
		top_menu[1][0]='About Gemalto$http://www.gemalto.com/companyinfo/index.html';
		top_menu[1][1]='Our Company$http://www.gemalto.com/companyinfo/about/index.html?toggler=0';
		top_menu[1][2]='Corporate Governance$http://www.gemalto.com/companyinfo/gov/index.html?toggler=1';
		top_menu[1][3]='Sustainability$http://www.gemalto.com/companyinfo/sustainability/index.html?toggler=1';
		top_menu[1][4]='Investors$http://www.gemalto.com/investors/index.html';
		top_menu[1][5]='Partners$http://www.gemalto.com/partners/index.html';
		top_menu[1][6]='Office Locations$http://www.gemalto.com/php/office_search.php';
		
		top_menu[2]=new Array();
		top_menu[2][0]='Products &amp; Solutions$http://www.gemalto.com/pss/index.html';
		top_menu[2][1]='Telecommunications$http://www.gemalto.com/telecom/index.html';
		top_menu[2][2]='Financial Services &amp; Retail$http://www.gemalto.com/financial/index.html';
		top_menu[2][3]='Enterprise$http://www.gemalto.com/enterprise/index.html';
		top_menu[2][4]='Government$http://www.gemalto.com/public_sector/index.html';
		top_menu[2][5]='Transport$http://www.gemalto.com/transport/index.html';
		top_menu[2][6]='Training$http://www.gemalto.com/training/index.html';
		top_menu[2][7]='Buy On-Line$http://boutique.gemalto.com';
		
		top_menu[3]=new Array();
		top_menu[3][0]='Contact Us$#';
		top_menu[3][1]='Office Locations$http://www.gemalto.com/php/office_search.php';
		top_menu[3][2]='Jobs/Careers$http://www.gemalto.com/companyinfo/careers/index.html';
		top_menu[3][3]='Tech Support$http://support.gemalto.com/';
		top_menu[3][4]='Sales/Other$http://www.gemalto.com/php/contactus.php';
		
		top_menu[4]=new Array();
		top_menu[4][0]='Media Center$http://www.gemalto.com/press/index.html';
		top_menu[4][1]='Media Contacts$http://www.gemalto.com/press/contacts.html';
		top_menu[4][2]='Feature articles$http://www.gemalto.com/focus/index.html';
};

function write_li(title_url,state) {	// Called by build_menu_hor
	var m_item = new Array;
	m_item = title_url.split("$");
	if (typeof m_item[1] != "undefined") {    // if submenu has no link, don't display it
		document.write("<li><a href='" + m_item[1] + "' title='" + m_item[0] + "'>" + m_item[0] +"</a>");
	}
	else {
		document.write("<li><div>" + m_item[0] + "</div>");  // added DIV as an alignment bug-fix for IE6 when top item isn't a link
	}
	if (state == 0) document.write("</li>");
	else if (state == 1) document.write("<ul>");
}


function build_menu_hor(){				// Builds top menu on each page
	document.write("<div id='logo_print'><img src='/_dotcom_template/images/logo_gemalto_head.gif' /></div>");	// logo for printed copy. Not displayed on screen.
	document.write("<div id='logo'><a href='/index.html' title='Home'></a></div>");	// link over logo. Dimensions controlled by style sheet.
	document.write("<ul id='nav'>");
	for (i=0; i<top_menu.length; i++) {    		// loop through the whole menu
		if (typeof top_menu[i] == "object") {   // test that menu exists and has submenus
			for (j=0; j<top_menu[i].length; j++) {	//loop through submenus
				if (typeof top_menu[i][j] == "string") {
					if (j==0) write_li(top_menu[i][j],1);   // use first item in submenu as main header
					else write_li(top_menu[i][j],0);
				}
			}
		document.write("</ul></li>");
		}
		else if (typeof top_menu[i] == "string") write_li(top_menu[i],0);  // case where there are no submenus, only a single link
	}
	document.write("</ul>");
}

function Extract_Page_Name()	// Called by Change_siteName()
{
	var nom_fic = document.location.pathname;
	nom_fic = nom_fic.substring(nom_fic.lastIndexOf("/"),nom_fic.length);
	if (nom_fic.length < 2) 
		nom_fic = "index";
	else 
		nom_fic = nom_fic.substring(1,nom_fic.indexOf("."));
	return nom_fic;
}



function Change_siteName ()		// Used in footer to set page name for Nedstat stats
{
	path_=document.location.pathname;
	path_ = path_.substring(0,path_.lastIndexOf("/"));
	path_= (path_.split("/")).join("."); 
	if (path_.substr(0, 1)==".")	
	   path_ = path_.substring(1,path_.length);	   
	if (path_.substr(path_.length-1, path_.length)==".")	
	   path_ = path_.substring(0,path_.length-1);  
	path_ = path_+"."+Extract_Page_Name();
	if (document.location.hostname != "www.gemalto.com")
		path_ = document.location.hostname+"."+path_;
	// Add local search query measurement for Google Custom Search
	if (path_ == "search.results") {
		path_ += "&amp;ns_search_term="+document.location.search.match(/&q=(.*)&/)[1].replace(/\W/g,"_");
		path_ += "&amp;ns_search_result=1"; // Have to set this to some value. 
		}
	return path_;
}

//***********************************************
