

/*----------------------------------------------------------------------------------------------*/
/* Fichier script de base */
/*----------------------------------------------------------------------------------------------*/

	var ns4 = document.layers;
	var op5 = (navigator.userAgent.indexOf("Opera 5")!=-1) ||(navigator.userAgent.indexOf("Opera/5")!=-1);
	var op6 = (navigator.userAgent.indexOf("Opera 6")!=-1) ||(navigator.userAgent.indexOf("Opera/6")!=-1);
	var agt=navigator.userAgent.toLowerCase();
	var mac = (agt.indexOf("mac")!=-1);
	var ie = (agt.indexOf("msie") != -1);
	var ie7 = (document.all && !window.opera && window.XMLHttpRequest);
	var mac_ie = mac && ie;
	
	
/*----------------------------------------------------------------------------------------------*/
/* Fonctions de bases */
/*----------------------------------------------------------------------------------------------*/

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

	
/*----------------------------------------------------------------------------------------------*/
/* Change location */
/*----------------------------------------------------------------------------------------------*/

function chemin(adresse){
	location.href=""+ adresse +"";
}

/*----------------------------------------------------------------------------------------------*/
/* Affiche propriete */
/*----------------------------------------------------------------------------------------------*/

	function afficheProperties(obj){
		
		 var texte = "Propri�t�s de :\n";
		 for(i in obj){
		 //if(i.indexOf("Height") != - 1 || i.indexOf("Width") != - 1){
		 	texte+= i +" = "+ obj[i] + "          ";
	  	//}
	  }
	  alert(texte);
	}


/*----------------------------------------------------------------------------------------------*/
/* Affiche popup */
/*----------------------------------------------------------------------------------------------*/

function showwin(adresse,largeur,hauteur,s){
	//
	var pop;
	pop = window.open(""+ adresse +"","popup","toolbar=0,location=0,directories=0,menuBar=0,scrollbars="+ s +",resizable=1,width="+ largeur +",height="+ hauteur +",left=450,top=50");
	pop.focus();
}

function showwinOthers(adresse,largeur,hauteur,s){
	//
	var pop1;
	pop1 = window.open(""+ adresse +"","popupOthers","toolbar=0,location=0,directories=0,menuBar=0,scrollbars="+ s +",resizable=1,width="+ largeur +",height="+ hauteur +",left=450,top=50");
	pop1.focus();
}
	
/*----------------------------------------------------------------------------------------------*/
/* Update page */
/*----------------------------------------------------------------------------------------------*/

function btnUpdateWindowon(nodeID, langage, sessID){
	//
	alert(document.location.href);
	if(ie){
		document.location.href = "/default.asp?nodeId="+ nodeID +"&langage="+ langage +"&sessID="+ sessID +""//document.location.href ;
	}else{
		window.location.reload();
	}
}

/*----------------------------------------------------------------------------------------------*/
/* Vide un champs de sa valeur */
/*----------------------------------------------------------------------------------------------*/

function masqueTexte(obj){
	//
	if(obj.value == "<%=lcase(T354)%>"){
		obj.value = "";
	}
}


/*----------------------------------------------------------------------------------------------*/
/* Masque affiche les objects */
/*----------------------------------------------------------------------------------------------*/

var itemVisible = "";

function check(id) {
	
	if(document.getElementById(id).style.visibility=='visible') {
		hidden(id);
	} else {
		if(itemVisible){
			hidden(itemVisible);
		}
		visible(id);
	}
	itemVisible = id;
	//alert(itemVisible);
}
function hidden (id) {
	document.getElementById(id).style.position='absolute';
	document.getElementById(id).style.height='1';
	document.getElementById(id).style.visibility='hidden';
	document.getElementById(id).style.left= -2000;
	document.getElementById(id).style.top=-1500;
}
function visible (id) {
	if(navigator.appName == "Microsoft Internet Explorer") {
		document.getElementById(id).style.height='100%';
	} else {
		document.getElementById(id).style.height='';
	}
	document.getElementById(id).style.position='relative';
	document.getElementById(id).style.visibility='visible';
	document.getElementById(id).style.left=0;
	document.getElementById(id).style.top=0;
}

/*----------------------------------------------------------------------------------------------*/
/* fonction de generation de flash par javascript */
/*----------------------------------------------------------------------------------------------*/

 	// affiche le controle activeX Flash
	function CreateControl(DivID, CLSID, ObjectID, WIDTH, HEIGHT, URL, COLOR, WMODE)
	{
	  var d = document.getElementById(DivID);
	  d.innerHTML = 
		 '<object classid=' + CLSID + ' id=' + ObjectID +' name=' + ObjectID
		+ 'codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" ' 
		+ 'width=' + WIDTH + ' height=' + HEIGHT + '><PARAM NAME=movie VALUE=' + URL + '>' 
		+ '<PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=' + COLOR + '><PARAM NAME="wmode" value=' + WMODE + '>' 
		+ '<EMBED src=' + URL + ' ' 
		+ 'QUALITY=high BGCOLOR=' + COLOR + ' WIDTH=' + WIDTH + ' HEIGHT=' + HEIGHT + ' WMODE=' + WMODE + ' ' 
		+ 'TYPE="application/x-shockwave-flash" ' 
		+ 'PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">'
		+ '</EMBED></OBJECT>'
	}
	
	function CreateControlSECURE(DivID, CLSID, ObjectID, WIDTH, HEIGHT, URL, COLOR, WMODE)
	{
	  var d = document.getElementById(DivID);
	  d.innerHTML = 
		 '<object classid=' + CLSID + ' id=' + ObjectID +' name=' + ObjectID
		+ 'codebase="" ' 
		+ 'width=' + WIDTH + ' height=' + HEIGHT + '><PARAM NAME=movie VALUE=' + URL + '>' 
		+ '<PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=' + COLOR + '><PARAM NAME="wmode" value=' + WMODE + '>' 
		+ '<EMBED src=' + URL + ' ' 
		+ 'QUALITY=high BGCOLOR=' + COLOR + ' WIDTH=' + WIDTH + ' HEIGHT=' + HEIGHT + ' WMODE=' + WMODE + ' ' 
		+ 'TYPE="application/x-shockwave-flash" ' 
		+ 'PLUGINSPAGE="">'
		+ '</EMBED></OBJECT>'
	}
	
/*----------------------------------------------------------------------------------------------*/
/* Menu de navigation */
/*----------------------------------------------------------------------------------------------*/

function hover(obj){
  if(document.all){
    UL = obj.getElementsByTagName('ul');
    if(UL.length > 0){
      sousMenu = UL[0].style;
      if(sousMenu.display == 'none' || sousMenu.display == ''){
        sousMenu.display = 'block';
      }else{
        sousMenu.display = 'none';
      }
    }
  }
}

function setHover(){
	//on controle si le menu existe
  var menuNav = MM_findObj("menu");
	if(menuNav){
	
	  LI = document.getElementById('menu').getElementsByTagName('li');
	  nLI = LI.length;
	  for(i=0; i < nLI; i++){
		LI[i].onmouseenter = function(){
		  hover(this);
		}
		LI[i].onmouseleave = function(){
		  hover(this);
		}
	  }
	}
}
	
/*----------------------------------------------------------------------------------------------*/
/* Affiche dans le menu l'éléments en cours */
/*----------------------------------------------------------------------------------------------*/
	
	function showCurrentPageOnNav(item, clsname){
		//
		var myNavItem = MM_findObj("L_"+ item);
		if(myNavItem){
			var OClass = myNavItem.className;
			if(OClass != ""){
				myNavItem.className = OClass +" "+ clsname;
			}else{
				myNavItem.className = clsname;
			}
		}
	}	
	
/*----------------------------------------------------------------------------------------------*/
/* affiche isiboutique */
/*----------------------------------------------------------------------------------------------*/
	
	function ouvre_Isiboutique(){
		//
		showwin("flash/isiboutique/index.html",1000,1188,0);
	}
	
	
	function showform(){
		var lg = MM_findObj('login_frm');
		if(lg){
			//moveXY('login_frm',left, top);
			changeObjectVisibility('login_frm', 'visible');
		}
	}
	
	function hideform(){
		//
		var lg = MM_findObj('login_frm');
		if(lg){
			//moveXY('login_frm',left, top);
			changeObjectVisibility('login_frm', 'hidden');
		}
	}
	
		
/*----------------------------------------------------------------------------------------------*/
/* affiche isiboutique */
/*----------------------------------------------------------------------------------------------*/
	
	function printpage(url){
		showwin(url,800, 600, 1);
	}


/*----------------------------------------------------------------------------------------------*/
/* html editor */
/*----------------------------------------------------------------------------------------------*/

/*
	_editor_url = "admin/htmlEditor/";	
	var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
	if (navigator.userAgent.indexOf('Mac')        >= 0) { win_ie_ver = 0; }
	if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
	if (navigator.userAgent.indexOf('Opera')      >= 0) { win_ie_ver = 0; }
	if (win_ie_ver >= 5.5) {
	  document.write('<scr' + 'ipt src="' +_editor_url + 'editorPGM.js"');
	  document.write(' language="Javascript1.2"></scr' + 'ipt>');  
	} else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); }

*/

/*----------------------------------------------------------------------------------------------*/
/*--------------------- encodeE-mail adresse------ ---------------------------------------------*/
/*----------------------------------------------------------------------------------------------*/

	
	function emlMail(obj,prenom,nom)
	 {
		 var pnt=".";
		 var rbs="@";
		 obj.href="mailto:"+prenom+rbs+nom;
	 
	 
	 }
 
     //<a href="" target="_self" onClick="eml(this,'gion','columberg')";>contact</a>





