			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) { 
			  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 && document.getElementById) x=document.getElementById(n); return x;
			}
			
			function MM_showHideLayers() { 
			  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 popup(nomfichier, w, h) 
			{ fen = window.open (nomfichier,"lexique","0,0,0,0,0,scrollbars=yes,resizable=yes,width=" + w + ",height=" + h);
				window.fen.moveTo(350,150)	
			if( self.focus ) fen.focus(); }

			function popuphome(nomfichier, w, h) 
			{
			
				if (getCookieInfo("ViewHomepop") == null || getCookieInfo("ViewHomepop") == 'false')
				{
				 	fen = window.open (nomfichier,"home","0,0,0,0,0,scrollbars=no,resizable=no,width=" + w + ",height=" + h);
					window.fen.moveTo(350,150)	;
					if( self.focus ) fen.focus(); 
				}
				setCookie();
				
			}

                        function popnew(url,windowName,params) {
                        	window.open(url,windowName,params);
                        }


			function ResetCookie() {
			
			document.cookie = "ViewHomepop=false; expires=Thu, 01-Jan-04 00:00:01 GMT";
			popuphome('popup.htm','500','350');
			

			}
			
			function setCookie() {
			
			document.cookie = "ViewHomepop=true; expires=Thu, 01-Jan-04 00:00:01 GMT"

			}
			
			
			function getCookieInfo(dataName)
			{
			     var cookieLen = dataName.length;
			     var cookieData = document.cookie;
			     var allcookieLen = cookieData.length;
			
			     var i = 0;
			     var cookieEnd;
			
			     while(i < allcookieLen)
			     {
			          var j = i + cookieLen;
			          if (cookieData.substring(i,j) == dataName)
			          {
			               cookieEnd = cookieData.indexOf(";", j);
			               if (cookieEnd == -1)
			               {
			                    cookieEnd = cookieData.length;
			               }
			              return unescape(cookieData.substring(j+1, cookieEnd))
			         }
			         i++;
			     }
			
			} 




			
			function validlexisearch()
			{
			if (document.recherchelexi.search.value == '') alert ('false');
			return false;
			
			}
			
			function check_email(mail){
				if (mail==""){	
					return false;
				}
				
				if(mail != "") {	
					
							
					var chaine=new String(mail);
					
					// Definition du motif de recherche pour l'email
					// Au moins deux car. alphanumeriques (avec . et _), un arobas, 
					// Au moins deux car. alphanumeriques (sans .), un point, 
					// Entre 2 et 4 car. alphanumeriques 
					re = /[a-zA-Z0-9_\.]{2,}@[a-zA-Z0-9_]{2,}.[a-zA-Z]{2,4}/;
					
					// Si le motif n'est pas verifie 
					if((chaine.match(re))== null){
						return false;
					}
					else{
						decoupe=chaine.split('@')
						decoupe1=decoupe[1].split('.')
						
						// Verifie que l'extension est comprise entre 2 et 3 caractères
						if ((decoupe1[decoupe1.length-1].length ==1)||(decoupe1[decoupe1.length-1].length > 3)){
							return false;
							}
					}
				}
				return true;
			}	
			function controle(which) {
					
				var pass=true;
				erreur="";
				
				for (i=0;i<which.length;i++) {
					var tempobj=which.elements[i];
					if (tempobj.name.substring(6,16)=="familyname") {
						if (tempobj.value=='') {
							erreur="Nom\n";								
						}   
					}
					if (tempobj.name.substring(6,15)=="firstname") {
						if (tempobj.value=='') {
							erreur=erreur+"Prénom\n";								
						}   
					}
					if (tempobj.name.substring(6,11)=="email") {
						if (tempobj.value=='' || check_email(tempobj.value)==false) {
							erreur=erreur+"Email\n";
						}   
					}
				} 
				
				if (erreur !='') {
					alert("Les champs suivants sont incorrects et obligatoires:\n"+erreur);
					return false;
				}
				else{   
					return true; 
				}	
			}
			function controle2(which) {
					
				var pass=true;
				erreur="";
				
				for (i=0;i<which.length;i++) {
					var tempobj=which.elements[i];
					alert(tempobj.name);
					if (tempobj.name.substring(6,16)=="familyname") {
						if (tempobj.value=='') {
							erreur="Nom\n";								
						}   
					}
					if (tempobj.name.substring(6,15)=="firstname") {
						if (tempobj.value=='') {
							erreur=erreur+"Prénom\n";								
						}   
					}
					if (tempobj.name.substring(6,11)=="email") {
						if (tempobj.value=='' || check_email(tempobj.value)==false) {
							erreur=erreur+"Email\n";
						}   
					}
					if (tempobj.name.substring(6,12)=="select") {
						if (tempobj.value=='') {
							erreur=erreur+"Categorie\n";								
						}   
					}
					if (tempobj.name.substring(6,11)=="title") {
						if (tempobj.value=='') {
							erreur=erreur+"Titre\n";								
						}   
					}
				} 
				
				if (erreur !='') {
					alert("Les champs suivants sont incorrects et obligatoires:\n"+erreur);
					return false;
				}
				else{   
					return true; 
				}	
			}
			
			function urlEncode(str)
			{
				var ms = "%25#23 20?3F<3C>3E{7B}7D[5B]5D|7C^5E~7E`60";
				var msi = 0;
				var i,c,rs,ts;
				while (msi < ms.length)
				{
					c = ms.charAt(msi);
					rs = ms.substring(++msi, msi +2);
					msi += 2;
					i = 0;
					while (true)
					{
						i = str.indexOf(c, i);
						if (i == -1) break;
						ts = str.substring(0, i);
						str = ts+"%"+rs+str.substring(++i, str.length);
					}
				}
				return str;
			}

			
                        function AjoutFavo() { 
                                if ((navigator.appName.indexOf("Microsoft",0)>=0) && (parseInt(navigator.appVersion)>=4)) {

                                        window.external.AddFavorite("http://www.science-generation.nu","Science Generation" );

                                } else { 
                                        alert("Denna funktion stöds inte av din browser.") 
                                } 
                        } 
			
			function AjoutFavoGP() {
				if ((navigator.appName.indexOf("Microsoft",0)>=0) && (parseInt(navigator.appVersion)>=4)) {
					window.external.AddFavorite("http://www.science-generation.com/opergrou.xml","Science Generation - les Groupes Projet" );
				} else {
					alert("Cette fonction n'est proposée que par Internet Explorer 4+")
				}
			}

                        function HomePage(obj){ 
                                if ((navigator.appName.indexOf("Microsoft",0)>=0) && (parseInt(navigator.appVersion)>=4)) {

                                        obj.style.behavior='url(#default#homepage)'; 
                                        obj.setHomePage('http://www.science-generation.nu'); 
                                } else { 
                                        alert("Denna funktion stöds inte av din browser.") 
                                } 
                        } 

			function HomePageGP(obj){
				if ((navigator.appName.indexOf("Microsoft",0)>=0) && (parseInt(navigator.appVersion)>=4)) {
					obj.style.behavior='url(#default#homepage)';
					obj.setHomePage('http://www.science-generation.com/opergrou.xml');
				} else {
					alert("Cette fonction n'est proposée que par Internet Explorer 4+")
				}
			}

			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_findObj(n, d) { //v4.0
			  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 && document.getElementById) x=document.getElementById(n); return x;
			}
			
			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];}
			}
			
			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];}}
			}

			// Change language
			function ChangeLanguage(langue)
			{	
				url = window.location.toString()
				longs = url.length
				pos = url.indexOf('.com/')
				
				apres = url.substring(pos+5,longs)
				page ="http://"+ langue + ".science-generation.com/"+ apres
				window.location = page
			}

