//Top Menus
 //Home
 function overHome(){
 if(NS6){
 document.getElementById("nopic_home").style.background="#999999";
 document.getElementById("nopic_home").style.color="#eeeeee";
 }else{
 nopic_home.style.background="#eeeeee";
 nopic_home.style.color="#333333";
 }
 }
 function outHome(){
 if(NS6){
 document.getElementById("nopic_home").style.background="#eeeeee";
 document.getElementById("nopic_home").style.color="#333333";
 
 }else{
 nopic_home.style.background="#999999";
 nopic_home.style.color="#eeeeee";
 }
 }
 //Demo
 function overDemo(){
 nopic_Demo.style.background="#eeeeee";
 nopic_Demo.style.color="#333333";
 }
 function outDemo(){
 nopic_Demo.style.background="#999999";
 nopic_Demo.style.color="#eeeeee";
 }
 //SiteMap
 function overSiteMap(){
 nopic_SiteMap.style.background="#eeeeee";
 nopic_SiteMap.style.color="#333333";
 }
 function outSiteMap(){
 nopic_SiteMap.style.background="#999999";
 nopic_SiteMap.style.color="#eeeeee";
 }
 //Contact
  function overContact(){
 nopic_Contact.style.background="#eeeeee";
 nopic_Contact.style.color="#333333";
 }
 function outContact(){
 nopic_Contact.style.background="#999999";
 nopic_Contact.style.color="#eeeeee";
 }
 //Legal
 function overLegal(){
 nopic_Legal.style.background="#eeeeee";
 nopic_Legal.style.color="#333333";
 }
 function outLegal(){
 nopic_Legal.style.background="#999999";
 nopic_Legal.style.color="#eeeeee";
 }
 //French
 function overFrench(){
 nopic_French.style.background="#eeeeee";
 nopic_French.style.color="#333333";
 }
 function outFrench(){
 nopic_French.style.background="#999999";
 nopic_French.style.color="#eeeeee";
 }
//English
function overEnglish(){
 nopic_English.style.background="#eeeeee";
 nopic_English.style.color="#333333";
 }
 function outEnglish(){
 nopic_English.style.background="#999999";
 nopic_English.style.color="#eeeeee";
 }
//Now
 function overButtonNow(){
 nopic_ButtonNow.style.background="#eeeeee";
 nopic_ButtonNow.style.color="#333333";
 }
 function outButtonNow(){
 nopic_ButtonNow.style.background="#999999";
 nopic_ButtonNow.style.color="#eeeeee";
 }

 
 
 
//PullDown Menu
//Company menu
 function menuClose(){
 closeCompany();
 closeTech();
 closeSolutions();
 closeServices();
 closeNews();
 closeCareers();
 closeLibrary();
 closeLogin();
 }
 function overCompany(){
 menuClose()
 inCompany=1;
 if(NS6){
 document.getElementById("nopic_company").style.background="#eeeeee";
 document.getElementById("nopic_company").style.color="#333333";
 document.getElementById("nubaseTopNav11").style.visibility = "visible";
 }else{
 nopic_company.style.background="#eeeeee";
 nopic_company.style.color="#333333";
 nubaseTopNav11.style.visibility = "visible";
 }
 }
 function outCompany(){
 inCompany=0;
 setTimeout("closeCompany();",1000);
 }
 function closeCompany(){
 if (inCompany==0){
 if (NS6){
 document.getElementById("nopic_company").style.background="#999999";
 document.getElementById("nopic_company").style.color="#eeeeee";
 document.getElementById("nubaseTopNav11").style.visibility = "hide"; 
 }else{
 nopic_company.style.background="#999999";
 nopic_company.style.color="#eeeeee";
 nubaseTopNav11.style.visibility = "hidden"; 
 }//NS
 }//in
 }//function
 //Technology Menu
 function overTech(){
 menuClose();
 inTech=1;
 nopic_technology.style.background="#eeeeee";
 nopic_technology.style.color="#333333";
 nubaseTopNav12.style.visibility = "visible"; 
 }
 function outTech(){
 inTech=0;
 setTimeout("closeTech();",1000);
 }
 function closeTech(){
 if (inTech==0){
 nopic_technology.style.background="#999999";
 nopic_technology.style.color="#eeeeee";
 if (NS6) { nubaseTopNav12.visibility = "hide";
      } else { nubaseTopNav12.style.visibility = "hidden"; }
 }
 }
 //Solution Menu
 function overSolutions(){
 menuClose();
 inSolutions=1;
 nopic_Solutions.style.background="#eeeeee";
 nopic_Solutions.style.color="#333333";
 nubaseTopNav13.style.visibility = "visible";
 }
 function outSolutions(){
 inSolutions=0;
 setTimeout("closeSolutions();",1000);
 }
 function closeSolutions(){
 if (inSolutions==0){
 nopic_Solutions.style.background="#999999";
 nopic_Solutions.style.color="#eeeeee";
 nubaseTopNav13.style.visibility = "hidden"; 
 }
 }
 //Services Menu
 function overServices(){
 menuClose();
 inServices=1;
 nopic_Services.style.background="#eeeeee";
 nopic_Services.style.color="#333333";
 nubaseTopNav14.style.visibility = "visible";
 }
 function outServices(){
 inServices=0;
 setTimeout("closeServices();",1000);
 }
 function closeServices(){
 if (inServices==0){
 nopic_Services.style.background="#999999";
 nopic_Services.style.color="#eeeeee";
 nubaseTopNav14.style.visibility = "hidden"; 
 }
 }
 //News & Events Menu
 function overNews(){
 menuClose();
 inNews=1;
 nopic_News.style.background="#eeeeee";
 nopic_News.style.color="#333333";
 nubaseTopNav15.style.visibility = "visible";
 }
 function outNews(){
 inNews=0;
 setTimeout("closeNews();",1000);
 }
 function closeNews(){
 if (inNews==0){
 nopic_News.style.background="#999999";
 nopic_News.style.color="#eeeeee";
 nubaseTopNav15.style.visibility = "hidden"; 
 }
 }
 //Careers Menu
 function overCareers(){
 menuClose();
 inCareers=1;
 nopic_Careers.style.background="#eeeeee";
 nopic_Careers.style.color="#333333";
 nubaseTopNav16.style.visibility = "visible";
 }
 function outCareers(){
 inCareers=0;
 setTimeout("closeCareers();",1000);
 }
 function closeCareers(){
 if (inCareers==0){
 nopic_Careers.style.background="#999999";
 nopic_Careers.style.color="#eeeeee";
 nubaseTopNav16.style.visibility = "hidden"; 
 }
 }
 //library Menu
 function overLibrary(){
 menuClose();
 inLibrary=1;
 nopic_Library.style.background="#eeeeee";
 nopic_Library.style.color="#333333";
 nubaseTopNav17.style.visibility = "visible";
 }
 function outLibrary(){
 inLibrary=0;
 setTimeout("closeLibrary();",1000);
 }
 function closeLibrary(){
 if (inLibrary==0){
 nopic_Library.style.background="#999999";
 nopic_Library.style.color="#eeeeee";
 nubaseTopNav17.style.visibility = "hidden"; 
 }
 }
 //Login Menu
 function overLogin(){
 menuClose();
 inLogin=1;
 nopic_Login.style.background="#eeeeee";
 nopic_Login.style.color="#333333";
 nubaseTopNav18.style.visibility = "visible";
 }
 function outLogin(){
 inLogin=0;
 setTimeout("closeLogin();",1000);
 }
 function closeLogin(){
 if (inLogin==0){
 nopic_Login.style.background="#999999";
 nopic_Login.style.color="#eeeeee";
 nubaseTopNav18.style.visibility = "hidden"; 
 }
 }


function nubase_showDate(){
today=new Date();
dayArray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
day=dayArray[today.getDay()];
monthArray=new Array("January","February","March","April","May","June", "July","August","September","October","November","December");
month=monthArray[today.getMonth()];
date=today.getDate();
year=today.getYear();
document.write(day+',&nbsp;'+month+'&nbsp;'+date+',&nbsp;'+year);
}
// JAG - End variables declaration...
function firstStart() {
    setJSPVars(US);
}
function nubase_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.nubase_pgW=innerWidth; document.nubase_pgH=innerHeight; onresize=nubase_reloadPage; }}
  else if (innerWidth!=document.nubase_pgW || innerHeight!=document.nubase_pgH) location.reload();
}
function menuLoadImage() {
	nubase_preloadImages(
	'nubasepic_company_light.gif',
	'/media/nubasepic_industries_1_e.gif',
	'/media/nubasepic_sevice_1_e.gif',
	'/media/nubasepic_investors_1_e.gif',
	'/media/nubasepic_careers_1_e.gif',
	'/media/nubasepic_news_1_e.gif',
	'/media/nubasepic_library_1_e.gif',
	'/media/nubasepic_tools_1_e.gif',
        '/media/nubasepic_home_1_e.gif',
		'/media/nubasepic_demo_1_e.gif',
		'/media/nubasepic_sitemap_1_e.gif',
        '/media/nubasepic_contact_1_e.gif',
        '/media/nubasepic_legal_1_f.gif',
		'/media/nubasepic_franch_1_e.gif',
        '/media/nubasepic_go_1_e.gif');

}
function nubase_preloadImages() { //v3.0
    var d=document;
    if(d.images){
        if(!d.nubase_p)
            d.nubase_p=new Array();
            var i,j=d.nubase_p.length,a=nubase_preloadImages.arguments;
            for(i=0; i<a.length; i++)
                if (a[i].indexOf("#")!=0){
                    d.nubase_p[j]=new Image; d.nubase_p[j++].src=a[i];
                }
    }
}
function popupJSP(popJSP)
{
	showMenu(popJSP);
	if ((activeParent != null) && (activeParent != 'null')) {
		switchImage(activeParent,IMG_ON);
	}
	if (activeItem != null) {
		switchImage(activeItem,IMG_ON);
	}
}
 function setJSPVars(langJS,strFlashV,strPageId,usrFlash,xactiveMenuLayer,xactiveItem,xactiveParent,strImgOn,mainJspId,nDocCateg,nDocLevel) {
        pageId          = strPageId;
        flashVersion    = strFlashV;
        userFlashChoice = usrFlash;
				activeMenuLayer	= xactiveMenuLayer;
				currentpopup 	= xactiveMenuLayer;
				activeItem      = xactiveItem;
				activepopup 	= xactiveMenuLayer;
				activeParent 	= xactiveParent;
        mainPagePath    = mainJspId;

       if (nDocCateg != null) {
          docCateg = nDocCateg;
        }

        if ((strImgOn != null) && (strImgOn != "null")) {
          switchImage(strImgOn,IMG_ON);
          imgAlwaysOn = strImgOn;
        }

	switch (langJS)
	{
		case 1:
			imgLangPostSufixOn  = "_light";
			imgLangPostSufixOff = "_dark";
                        imgPrefixLang       = "_e";
                        realLangue          = "US";
			break;
		case 2:
			imgLangPostSufixOn  = "_1_s";
			imgLangPostSufixOff = "_0_s";
                        imgPrefixLang       = "_s";
                        realLangue          = "ES";
			break;
		case 3:
			imgLangPostSufixOn  = "_1_f";
			imgLangPostSufixOff = "_0_f";
                        imgPrefixLang       = "_f";
                        realLangue          = "CA";
			break;
	}
        lang =realLangue;
}
function nubase_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function showMenu(strMenu)
// Show Menu Layer
{
    if ((strMenu == null) || (strMenu == 'none')) {
        return;
    }

    if (NS6) {
        menu=document.getElementById(strMenu);
    }
    else {
      if (NS4) {
          menu=eval("document.layers."+strMenu);
      }
      else {
        menu=eval(strMenu);
      }
    }

    if ((menu != null) && (strMenu != 'none')) {
      if (NS4) {
        menu.visibility = "show";
      }
      else {
        menu.style.visibility = "visible";
      }
    }
    disposeComboBox(false,strMenu);
}

function hideMenu()
// Hide Menu Layer
{
    if ((currentpopup == null) || (currentpopup == 'none')) {
        return;
    }

if (currentpopup != null)
        {
                if (NS6)
                        menu=document.getElementById(currentpopup);
                else if (NS4)
                        menu=eval("document.layers."+currentpopup)
                else
                        menu=eval(currentpopup);
		if ((menu != null) && (menu != 'none')) {
	            if (NS4) menu.visibility = "hide"
	            else menu.style.visibility = "hidden";
		}
        }
        disposeComboBox(true,currentpopup);
}
function checkmenu (currentpopup,check)
// Check to see if menu is open but not used, if so it is closed
{
    if ((currentpopup == null) || (currentpopup == 'none') || (menuWasOpen > 0)) {
        return;
    }
	if ((overmenu == 0) && (check == overcheck) && (currentpopup != null) && (currentpopup != activepopup))
	{
		if (NS6)
      		menu=document.getElementById(currentpopup)
		else if (NS4)
			menu=eval("document.layers."+currentpopup)
			else
            		menu=eval(currentpopup);
		if (NS4) menu.visibility = "hide";
		else menu.style.visibility = "hidden";
		showMenu(activepopup);
		if (currentParent != null)
			switchImage(currentParent,IMG_OFF);
		if (activeParent != null)
			switchImage(activeParent,IMG_ON);
		if (activeItem != null)
			switchImage(activeItem,IMG_ON);
	}
        if (textParentPopup != currentpopup) {
          hideTextMenu(textParentPopup);
          textParentPopup = null;
        }
        hideTextMenu(textChildPopup);
        textChildPopup = null;
        if (!bParentMenuOver) {
          disposeComboBox(true,currentpopup);
        }
}

function menutimeout(strMenu)
// Set a .5 second timeout when the menu is not being used to close
{
	overcheck=overcheck+1;
	setTimeout("checkmenu(currentpopup,"+overcheck+")",1000);
}

function tocItem (name,nMenuParent,strMenuLayer,popupMenu,fileExtension,imgRealName,noAddPrefix) {
    this.menuParent = nMenuParent;
    this.parentLayer = strMenuLayer;
    this.popupChild = popupMenu;
    this.on = new Image();
    this.off = new Image();
    if (noAddPrefix == null) {
        this.on.src = imgLangPreSufix + imgRealName + imgLangPostSufixOn + fileExtension;
        this.off.src = imgLangPreSufix + imgRealName + imgLangPostSufixOff + fileExtension;
    }
    else {
        this.on.src = imgLangPreSufix + imgRealName + "_1" + fileExtension;
        this.off.src = imgLangPreSufix + imgRealName + "_0" + fileExtension;
    }
}

function menu_show (name,nMenuParent,strMenuLayer,popupMenu,fileExtension,imgRealName,noAddPrefix) {
  if ((fileExtension != null) && (fileExtension != "") && (fileExtension != "null")) {
    if (fileExtension.indexOf(".") == -1) {
      fileExtension = "." + fileExtension;
    }
  }
  tocItem[name] = new tocItem(name,nMenuParent,strMenuLayer,popupMenu,fileExtension,imgRealName,noAddPrefix);
}
function checkMenuMO(strMenu) {
        bParentMenuOver = true;
	if ((tocItem[strMenu].popupChild == null) && (currentpopup != null)) {
		hideMenu();
	}

        if (textParentPopup != tocItem[strMenu].popupChild) {
            hideTextMenu(textParentPopup);
        }
	activeMenuLayer = tocItem[strMenu].parentLayer;
	overmenu = tocItem[strMenu].menuParent;
	if (tocItem[strMenu].popupChild != null) {
		if (currentParent != null) {
			switchImage(currentParent,IMG_OFF);
		}
		currentParent = strMenu;
		switchImage(strMenu,IMG_ON);
		if ( activeParent != strMenu) {
			switchImage(activeParent,IMG_OFF);
		}
		hideMenu();
		showMenu(tocItem[strMenu].popupChild);
		currentpopup = tocItem[strMenu].popupChild;
	}
	else {
		switchImage(strMenu,IMG_ON);
                disposeComboBox(false,strMenu);
	}
}
function checkMenuMOUT(strMenu) {
        bParentMenuOver = false;
	if (currentParent != strMenu)
		switchImage(strMenu,IMG_OFF);
	if (currentParent == activeParent)
		switchImage(activeItem,IMG_ON);
	overmenu = 0;
	if ((tocItem[strMenu].parentLayer != null) && (tocItem[strMenu].parentLayer != activepopup)) {
		menutimeout(tocItem[strMenu].parentLayer);
	}
	else {
		menutimeout(currentpopup);
	}

}
function switchImage(imgName,imgState) {
        if ((imgName == null) || (imgName == "") || (imgName == 'null')) {
          return;
        }
        if (imgAlwaysOn == imgName) {
          return;
        }
	if (document.images) {
		if ((imgName != null) && (imgName != 'null')) {
			if ((tocItem[imgName]) || (tocItem[imgName].parentLayer == null) || (IE4) || (NS6)) {
				document[imgName].src = eval("tocItem[imgName]."+imgState+".src");
			}
			else {
				image= eval("document.layers."+tocItem[imgName].parentLayer+".document.images['"+imgName+"']");
				eval("image.src = tocItem[imgName]."+imgState+".src");
			}
		}
	}
}
function openPopup(menuId,itemId,hLiteColor,childPopup) {
    //disposeComboBox(false,menuId);
    //setOverMenu(menuId,1);
    if (!NS4) {
        eItemNew = eval("document.all('" + itemId + "')");
        eParent = eItemNew.parentElement;
        if (!(hLiteColor == null)) {
            eParent.style.background = hLiteColor;
        }
    }/*
    if ((textChildPopup != null) && (childPopup == null) && (menuId != textChildPopup)) {
        hideTextMenu(textChildPopup);
        textChildPopup = null;
    }

    if (childPopup != null) {
        showTextMenu(childPopup);
        textChildPopup = childPopup;
        textParentPopup = menuId;
    }
	*/
}
function closePopup(menuId,itemId,bgColor,childPopup) {
    //setOverMenu(menuId,0);
    if (!NS4) {
        eItemNew = eval("document.all('" + itemId + "')");
        eParent = eItemNew.parentElement;
        if (!(bgColor == null)) {
            eParent.style.background = bgColor;
        }
    }
}
/*
function hideTextMenu(strMenu) {
    if (strMenu != null) {
        if (NS4) {
            menu = eval("document.layers."+strMenu);
        }
        else {
            menu = eval(strMenu);
        }
        if (!NS4) {
            menu.style.visibility = "hidden";
        }
        else {
            menu.visibility = "hidden";
        }
    }
    disposeComboBox(true,strMenu);
}
*/
function showTextMenu(strMenu) {
    if (strMenu != null) {
        if (NS4) {
            menu = eval("document.layers."+strMenu);
        }
        else {
            menu = eval(strMenu);
        }
        if (!NS4) {
            menu.style.visibility = "visible";
        }
        else {
            menu.visibility = "visible";
        }
    }
}
function setOverMenu(strMenu,state) {
    menuWasOpen = state;
    currentpopup = strMenu;
    if (state == 0) {
        menutimeout(currentpopup);
    }
}
function swapImgDirect(imgContainer,imgName,parentLayer) {
    if (document.images) {
        if (imgName != null) {
             if ((parentLayer == null) || (IE4) || (NS6)) {
                document[imgContainer].src = imgName;
            }
            else {
                image= eval("document.layers."+parentLayer+".document.images['"+imgContainer+"']");
                image.src = imgName;
            }
        }
    }
}
function linkToSpeech(objSelected) {
  if (objSelected != null) {
    getNewURL(objSelected.options[objSelected.selectedIndex].value);
  }
}
function nubase_menu1(){
menu_show('nubasepic_home',11,null,null,'gif','nubasepic_home');
menu_show('nubasepic_demo',11,null,null,'gif','nubasepic_demo');
menu_show('nubasepic_sitemap',11,null,null,'gif','nubasepic_sitemap'); 
menu_show('nubasepic_contact',11,null,null,'gif','nubasepic_contact');
menu_show('nubasepic_legal',11,null,null,'gif','nubasepic_legal');
menu_show('nubasepic_franch',11,null,null,'gif','nubasepic_franch');
}
function nubase_menu1_f(){
menu_show('nubasepic_home',11,null,null,'gif','nubasepic_home');
menu_show('nubasepic_demo',11,null,null,'gif','nubasepic_demo');
menu_show('nubasepic_sitemap',11,null,null,'gif','nubasepic_sitemap'); 
menu_show('nubasepic_contact',11,null,null,'gif','nubasepic_contact');
menu_show('nubasepic_legal',11,null,null,'gif','nubasepic_legal');
menu_show('nubasepic_english',11,null,null,'gif','nubasepic_english');
}
function nubase_menu2(){
menu_show('nubasepic_company',1,null,'nubaseTopNav11','gif','nubasepic_company');
menu_show('nubasepic_technology',1,null,'nubaseTopNav12','gif','nubasepic_technology');
menu_show('nubasepic_solutions',1,null,'nubaseTopNav13','gif','nubasepic_solutions');
menu_show('nubasepic_sevice',1,null,'nubaseTopNav14','gif','nubasepic_sevice');
menu_show('nubasepic_news',1,null,'nubaseTopNav15','gif','nubasepic_news');
menu_show('nubasepic_careers',1,null,'nubaseTopNav16','gif','nubasepic_careers');
menu_show('nubasepic_library',1,null,'nubaseTopNav17','gif','nubasepic_library');
menu_show('nubasepic_login',1,null,'nubaseTopNav18','gif','nubasepic_login');
}


function changeLang(strCurLang,strNextLang) {

  toHREF = top.location.href;
  if ((toHREF.indexOf("MainPage") > -1) && (toHREF.indexOf("Params=") == -1)) {
    toHREF = "MainPage.jsp?Params=" + flashVersion + "." + strNextLang + "." + pageId + "." + userFlashChoice;
  } else {
	 	var frRegs 	= new Array(/Params=(N|Y)\.CA\./i, /\/fr\//i, /langue=fr/i);
		var frTo 		= new Array("Params=$1.CA.", "/fr/", "langue=fr");
	
		var enRegs 	= new Array(/Params=(N|Y)\.US\./i, /\/en\//i, /langue=en/i);
		var enTo 		= new Array("Params=$1.US.", "/en/", "langue=en");
	
	  toHREF = top.location.href;
	
		var from 	= ((strCurLang=="CA")?frRegs:enRegs);
		var to 		= ((strCurLang=="CA")?enTo:frTo);
	
		for (var i = 0; i < from.length; i++) {
			toHREF = toHREF.replace(from[i], to[i]);
		}
 }

  top.location.href = toHREF;
}
function disposeComboBox(bOnOff,xMenu) {
    strUrl = top.location.pathname;
    strHref = top.location.href;
    if (	((pageId=="61000") && ((docCateg>=1996) && (docCateg<=2005)))){
      bHideCombo = (strHideComboOnMenu.indexOf(xMenu) == -1) ? false : true;
      itemCombo = null;
    }
    else {
      bHideCombo = false;
    }

    if (NS6 && bHideCombo) {
      itemCombo = document.getElementById("layerbox");
      if (itemCombo == null) {
        return;
      }
      itemCombo.style.visibility = bOnOff ? "visible" : "hidden";
    }
    else {
      if (NS4 && bHideCombo) {
          itemCombo = eval("document.layers.layerbox");
          if (itemCombo == null) {
            return;
          }
          itemCombo.visibility = bOnOff ? "visible" : "hide";
      }
      else {
        if (bHideCombo) {
          itemCombo = eval("layerbox");
          if (itemCombo == null) {
          return;
          }
          itemCombo.style.visibility = bOnOff ? "visible" : "hidden";
        }
      }
    }
}

function getUrlVars(strUrl) {
    strTemp = strUrl;
    strAux = "";
    nPos    = strTemp.indexOf('<FLASHEXT>');
    if (nPos > -1) {
        if (nPos == 0) {
            strTemp = flashVersion + strTemp.substring(10);
        }
        else {
            if ((flashVersion == "Y") && (userFlashChoice == "0")) {
                strAux = "_fla";
            }
            strTemp = strTemp.substring(0,nPos) + strAux + strTemp.substring(nPos + 10)
        }
    }
    nPos    = strTemp.indexOf('<FLASH>');
    if (nPos > -1) {
        if (nPos == 0) {
            strTemp = flashVersion + strTemp.substring(7);
        }
        else {
            strTemp = strTemp.substring(0,nPos) + flashVersion + strTemp.substring(nPos + 7)
        }
    }
    nPos = strTemp.indexOf('<LANG>');
    if (nPos > -1) {
        if (nPos == 0) {
            strTemp = realLangue + strTemp.substring(6);
        }
        else {
            strTemp = strTemp.substring(0,nPos) + realLangue + strTemp.substring(nPos + 6)
        }
    }
    nPos = strTemp.indexOf('<PAGEID>');
    if (nPos > -1) {
        if (nPos == 0) {
            strTemp = pageId + strTemp.substring(8);
        }
        else {
            strTemp = strTemp.substring(0,nPos) + pageId + strTemp.substring(nPos + 8)
        }
    }
    nPos = strTemp.indexOf('<USRFLASH>');
    if (nPos > -1) {
        if (nPos == 0) {
            strTemp = userFlashChoice + strTemp.substring(10);
        }
        else {
            strTemp = strTemp.substring(0,nPos) + userFlashChoice + strTemp.substring(nPos + 10)
        }
    }
    nPos = strTemp.indexOf('<INK>');
    if (nPos > -1) {
        if (nPos == 0) {
            strTemp = userFlashChoice + strTemp.substring(5);
        }
        else {
            strTemp = strTemp.substring(0,nPos) + "#" + strTemp.substring(nPos + 5)
        }
    }
    return strTemp;
}
function rout2Page(fixURL,bNewWindow, strPageId) {
    if (pageId == null || strPageId == null) {
        pageId = "0";
    }
    if (flashVersion == null) {
        flashVersion = "Y";
    }
    if (userFlashChoice == null) {
        userFlashChoice = "0";
    }
    if ((bNewWindow == null) || (!bNewWindow)) {
        top.location.href = fixURL + "?Params=" + flashVersion + "." + realLangue + "." + pageId + "." + userFlashChoice;
    }
    else {
        document.open(  fixURL + "?Params=" + flashVersion + "." + realLangue + "." + pageId + "." + userFlashChoice,
                        "","toolbar=yes,menubar=yes,scrollbars=yes,location=yes,status=yes,width=750,height=500,resizable=yes,top=0,left=0");
    }
}
function getNewURL(strPageId,bNewWindow,strLangParam,xParameters) {
    strNewPageId  = strPageId;
    strLangToUse  = realLangue;
    strInk        = "";
    strXParameter = "";
    nPos = strPageId.indexOf("INK");

    if (nPos > -1) {
        strNewPageId = strPageId.substring(0,nPos);
        strInk = "#" + strPageId.substring(nPos + 3);
    }
    if (flashVersion == null) {
        flashVersion = "Y";
    }
    if (userFlashChoice == null) {
        userFlashChoice = "0";
    }
    if (strLangParam != null) {
        strLangToUse = strLangParam;
    }
    if ((xParameters != null) && (xParameters != "") && (xParameters != "null")) {
      strXParameter = xParameters;
    }
    else {
      if ((pageId != null) && ((docCategToSearch.indexOf(pageId.substring(0,3)) > -1) && (docCateg == 0))) {
        strTemp = strPageId.substring(0,2) + "0";
        bIsDocOrCateg = ((docCategToSearch.indexOf(strTemp) > -1) || (docTypeToSearch.indexOf(strTemp) > -1));
        strTemp = pageId.substring(0,2) + "0";
        bPageIsCateg  = ((docCategToSearch.indexOf(strTemp) > -1) || (docTypeToSearch.indexOf(strTemp) > -1));
        if (bIsDocOrCateg) {
          strXParameter = "&categ=" + pageId.substring(0,3);
        }
      }
      else {
        if (docTypeToSearch.indexOf(strPageId.substring(0,2)) > -1) {
          if (docCateg == 0) {
            strXParameter = "&categ=" + strPageId.substring(0,2) + "0";
          }
          else {
            strXParameter = "&categ=" + docCateg;
          }
        }
      }
    }
    if ((bNewWindow == null) || (!bNewWindow)) {
        top.location.href = mainPagePath + flashVersion + "." + strLangToUse + "." + strNewPageId + "." + userFlashChoice + strInk + strXParameter;
    }
    else {
        document.open(  mainPagePath + flashVersion + "." + strLangToUse + "." + strNewPageId + "." + userFlashChoice + strInk + strXParameter,
                        "","toolbar=yes,menubar=yes,scrollbars=yes,location=yes,status=yes,width=750,height=500,resizable=yes,top=0,left=0");
    }
}

function forwardTo(strFixUrl,strPageId,bNewWindow) {
    strNewPageId = strPageId;
    strInk = "";
    nPos = strPageId.indexOf("INK");
    if (nPos > -1) {
        strNewPageId = strPageId.substring(0,nPos);
        strInk = "#" + strPageId.substring(nPos + 3);
    }
    if (flashVersion == null) {
        flashVersion = "Y";
    }
    if (userFlashChoice == null) {
        userFlashChoice = "0";
    }
    if ((bNewWindow == null) || (!bNewWindow)) {
        top.location.href = strFixUrl + mainPagePath + flashVersion + "." + realLangue + "." + strNewPageId + "." + userFlashChoice + strInk;
    }
    else {
        window.open(  strFixUrl + mainPagePath + flashVersion + "." + realLangue + "." + strNewPageId + "." + userFlashChoice + strInk,
                        "","toolbar=yes,menubar=yes,scrollbars=yes,location=yes,status=yes,width=750,height=500,resizable=yes,top=0,left=0");
    }
}
function linkToPressReleases(objSelected) {
  if (objSelected != null) {
    getNewURL("61000",null,null,"&categ=" + objSelected.options[objSelected.selectedIndex].value);
  }
}
function dummy() {
  return;
}
