/*'---------------------------------------------------------------------------
' Projet           : MokaSofa
' Fichier          : LibFctClient.js
' Version ToolsBox : v2.0.0
' Auteur           : Pascal Girard
' Date             : 2000-12-13,mai 2001
'
' Description      : Fichier contenant les fonctions d'usage general cote client.
'
' (c) 2002 Marcotte Multimédia, Inc. Tous droits reservés.
'---------------------------------------------------------------------------
'---------------------------------------------------------------------------
' Modifié par      : +AUTEURMODIF+
' En date du       : +DATEMODIF+
'
' Modification     : +MODIFICATION+
'-------------------------------------------------------------------------



*********************************************************************************
* Index des fonctions disponibles dans ce fichier (par ordre d'apparition):
* 
* Important:	Pour retrouver rapidement la fonction recherchee, faire une recherche
* 				sur le numero de la fonction + "-" ou par le nom de la fonction.
* _______________________________________________________________________________
* 
* 1- gf_JumpTo()	- Navigue à l'url envoyé
*
***********************************************************************************/

/*1**********************************************************
*Fontion:gf_JumpTo()
*Pascal Girard
*Entrée(s):Url->Url à ouvrir
		   bNewWin->1 si on ouvre dans une nouvelle fenêtre
*
*
*Description:Navigue à l'adresse donné en paramètre
**************************************************************/
var chvWindow = null
function CorpsHumain()
	{
		if(chvWindow && !chvWindow.closed){			
			gloWindow.close()
		}
		chvWindow = window.open('<%=NbRep%>Sante/CorpsHumain/illustration.asp', 'chvglossaire', 'width=720,height=750,scrollbars=yes,resizable,status=yes,menubar=no,toolbar=no')
				            
	}	


function gf_JumpTo(url)
	{
	var MyUrl=url.toString();
	if (MyUrl!='-1')
		{
		var ArrayVal=MyUrl.split(',');
		var bNewWin=ArrayVal[1];
		var MyUrl=ArrayVal[0];
		bNewWin=bNewWin.toString();
		if(bNewWin=='1')
			{
			window.open(MyUrl, 'SubMenuWinHead', 'width=550,height=380,scrollbars=yes,resizable=yes,toolbar=yes,status=yes,location=yes,menubar=yes');
			}
		else
			{
			document.location.href=MyUrl;
			}
		}	
	}
	
function gf_OuvrirFenetre(pAddy,pNom,pParam){
	window.open(pAddy,pNom,pParam);
}	

var gloWindow = null
function OpenGlossaireUrl(url)
	{
		if(gloWindow && !gloWindow.closed){			
			gloWindow.close()
		}
		gloWindow = window.open(url, 'wndglossaire', 'width=550,height=400,scrollbars=yes,resizable,menubar=yes,toolbar=yes')
				            
	}
function gf_LinkNews(idnews, bnewwindow, iChannel)
{
	if(bnewwindow)
	{
		window.open('RedirectNews.asp?idnews=' + idnews + '&idchannel=' + iChannel + '', 'NewWindow', 'width=700,height=400,status,scrollbars,resizable,location,toolbar,menubar')
	}
	else
	{
		window.location.href='RedirectNews.asp?idnews=' + idnews + '&idchannel=' + iChannel + ''
	}
} 

function gf_LinkMenu(idmenu, bnewwindow, iChannel)
{
	if(bnewwindow)
	{
		window.open('DetailMenu.asp?idmenu=' + idmenu + '&idchannel=' + iChannel + '', 'NewWindow', 'width=700,height=400,status,scrollbars,resizable,location,toolbar,menubar')
	}
	else
	{
		window.location.href='DetailMenu.asp?idmenu=' + idmenu + '&idchannel=' + iChannel + ''
	}
} 

function gf_LinkNewsAll(idnews, bnewwindow, iChannel)
{
	if(bnewwindow)
	{
		window.open('RedirectNewsAll.asp?idnews=' + idnews + '&idchannel=' + iChannel + '', 'NewWindow', 'width=700,height=400,status,scrollbars,resizable,location,toolbar,menubar')
	}
	else
	{
		window.location.href='RedirectNews.asp?idnews=' + idnews + '&idchannel=' + iChannel + ''
	}
} 

function gf_LostFocusField(Obj_Field,str_constante)
	{
	if(Obj_Field.value=='')
		{
		Obj_Field.value=str_constante;
		}
	}
function gf_GetFocusField(Obj_Field,str_constante)
	{	
	if(Obj_Field.value==str_constante)
		{
		Obj_Field.value='';
		}
	}
	
function Display_Flash(Flash,Width,Height)
{
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" height="248" width="403" border="0" VIEWASTEXT>');
document.write('<param name="allowScriptAccess" value="sameDomain"/>');
document.write('<param name="movie" value="'+Flash+'">');
document.write('<param name="quality" value="best">');
document.write('<param name="play" value="true">');
document.write('<param name="wmode" value="transparent"/>');
document.write('<embed height="248" wmode="transparent" allowScriptAccess="sameDomain" pluginspage="http://www.macromedia.com/go/getflashplayer" src="'+Flash+'?fashion=../fashion/home.asp&beauty=../beauty/home.asp&trends=../trends/home.asp&experts=../experts/home.asp&talk=../talk/home.asp&horoscope=../horoscope/home.asp&shop=../shop/home.asp" type="application/x-shockwave-flash" width="403" quality="best" play="true">');
document.write('</object>');
}

//****************************************************************
// 
// JavaScript Function:
//   getShockwaveVersion()
//
// Description:
//   Returns the major version of the installed Shockwave Player
//   plug-in, or zero if the player is not installed.
// 
//****************************************************************
function getShockwaveVersion()
{
  // Set local variables to avoid crashing bug
  var thearray = navigator.plugins;
  var arraylength = thearray.length;
 
  if(navigator.userAgent.indexOf("MSIE 7") != -1) 
  {
    return 1;
  }
  else{
 
      for (i=0; i<arraylength; i++)
      {
        theplugin = thearray[i];
        // Retrieve the plugin
        thename   = theplugin.name;
        // Get the plugin name
        thedesc   = theplugin.description;
        // Get the plugin description
          // If the plugin is the Shockwave Player...
          if (thedesc.indexOf("Shockwave")
            != -1 && thedesc.indexOf("Director") != -1)
            { 
            // ...parse out the version...
            versionString = thedesc.substring(thedesc.indexOf("version ") + 8);
            // ...pet the major version...
            majorVersion = parseInt(versionString);
            // ...and return it.
            return majorVersion;
            } 
       }
       // If we've went through the whole list of plugins without
       // finding Shockwave, we return zero.
       return 0;
      }
}